From a39703005afc3b07f77ea7f2e5cb3490f53e03eb Mon Sep 17 00:00:00 2001 From: Foad Nosrati Habibi Date: Mon, 6 Nov 2023 16:20:01 +1100 Subject: [PATCH 1/5] Add rate limit to confighttp (#1) --- config/confighttp/confighttp.go | 14 ++++ config/confighttp/ratelimit.go | 51 +++++++++++++ config/confighttp/ratelimit_test.go | 111 ++++++++++++++++++++++++++++ 3 files changed, 176 insertions(+) create mode 100644 config/confighttp/ratelimit.go create mode 100644 config/confighttp/ratelimit_test.go diff --git a/config/confighttp/confighttp.go b/config/confighttp/confighttp.go index ebf4f97c351..9294b6ee78c 100644 --- a/config/confighttp/confighttp.go +++ b/config/confighttp/confighttp.go @@ -224,6 +224,9 @@ type HTTPServerSettings struct { // Auth for this receiver Auth *configauth.Authentication `mapstructure:"auth"` + // RateLimit for this receiver + RateLimit *RateLimit `mapstructure:"rate_limit"` + // MaxRequestBodySize sets the maximum request body size in bytes MaxRequestBodySize int64 `mapstructure:"max_request_body_size"` @@ -309,6 +312,17 @@ func (hss *HTTPServerSettings) ToServer(host component.Host, settings component. handler = authInterceptor(handler, server) } + // The RateLimit interceptor should always be right after auth to ensure + // the request rate is within an acceptable threshold. + if hss.RateLimit != nil { + limiter, err := hss.RateLimit.rateLimiter(host.GetExtensions()) + if err != nil { + return nil, err + } + + handler = rateLimitInterceptor(handler, limiter) + } + // TODO: emit a warning when non-empty CorsHeaders and empty CorsOrigins. if hss.CORS != nil && len(hss.CORS.AllowedOrigins) > 0 { co := cors.Options{ diff --git a/config/confighttp/ratelimit.go b/config/confighttp/ratelimit.go new file mode 100644 index 00000000000..cfbe7bbc5cb --- /dev/null +++ b/config/confighttp/ratelimit.go @@ -0,0 +1,51 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package confighttp // import "go.opentelemetry.io/collector/config/confighttp" + +import ( + "context" + "fmt" + "net/http" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/extension" +) + +// RateLimit defines rate limiter settings for the receiver. +type RateLimit struct { + // RateLimiterID specifies the name of the extension to use in order to rate limit the incoming data point. + RateLimiterID component.ID `mapstructure:"rate_limiter"` +} + +type rateLimiter interface { + extension.Extension + + Take(context.Context, string, http.Header) error +} + +// rateLimiter attempts to select the appropriate rateLimiter from the list of extensions, +// based on the component id of the extension. If a rateLimiter is not found, an error is returned. +func (rl RateLimit) rateLimiter(extensions map[component.ID]component.Component) (rateLimiter, error) { + if ext, found := extensions[rl.RateLimiterID]; found { + if limiter, ok := ext.(rateLimiter); ok { + return limiter, nil + } + return nil, fmt.Errorf("extension %q is not a rate limit", rl.RateLimiterID) + } + return nil, fmt.Errorf("rate limit %q not found", rl.RateLimiterID) +} + +// rateLimitInterceptor adds interceptor for rate limit check. +// It returns TooManyRequests(429) status code if rate limiter rejects the request. +func rateLimitInterceptor(next http.Handler, limiter rateLimiter) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + err := limiter.Take(r.Context(), r.URL.Path, r.Header) + if err != nil { + http.Error(w, http.StatusText(http.StatusTooManyRequests), http.StatusTooManyRequests) + return + } + + next.ServeHTTP(w, r) + }) +} diff --git a/config/confighttp/ratelimit_test.go b/config/confighttp/ratelimit_test.go new file mode 100644 index 00000000000..b06f47010cd --- /dev/null +++ b/config/confighttp/ratelimit_test.go @@ -0,0 +1,111 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package confighttp + +import ( + "context" + "errors" + "fmt" + "net/http" + "net/http/httptest" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" +) + +func TestServerRateLimit(t *testing.T) { + // prepare + hss := HTTPServerSettings{ + Endpoint: "localhost:0", + RateLimit: &RateLimit{ + RateLimiterID: component.NewID("mock"), + }, + } + + limiter := &mockRateLimiter{} + + host := &mockHost{ + ext: map[component.ID]component.Component{ + component.NewID("mock"): limiter, + }, + } + + var handlerCalled bool + handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + handlerCalled = true + }) + + srv, err := hss.ToServer(host, componenttest.NewNopTelemetrySettings(), handler) + require.NoError(t, err) + + // test + srv.Handler.ServeHTTP(&httptest.ResponseRecorder{}, httptest.NewRequest("GET", "/", nil)) + + // verify + assert.True(t, handlerCalled) + assert.Equal(t, 1, limiter.calls) +} + +func TestInvalidServerRateLimit(t *testing.T) { + hss := HTTPServerSettings{ + RateLimit: &RateLimit{ + RateLimiterID: component.NewID("non-existing"), + }, + } + + srv, err := hss.ToServer(componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings(), http.NewServeMux()) + require.Error(t, err) + require.Nil(t, srv) +} + +func TestRejectedServerRateLimit(t *testing.T) { + // prepare + hss := HTTPServerSettings{ + Endpoint: "localhost:0", + RateLimit: &RateLimit{ + RateLimiterID: component.NewID("mock"), + }, + } + host := &mockHost{ + ext: map[component.ID]component.Component{ + component.NewID("mock"): &mockRateLimiter{ + err: errors.New("rate limited"), + }, + }, + } + + srv, err := hss.ToServer(host, componenttest.NewNopTelemetrySettings(), http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})) + require.NoError(t, err) + + // test + response := &httptest.ResponseRecorder{} + srv.Handler.ServeHTTP(response, httptest.NewRequest("GET", "/", nil)) + + // verify + assert.Equal(t, response.Result().StatusCode, http.StatusTooManyRequests) + assert.Equal(t, response.Result().Status, fmt.Sprintf("%v %s", http.StatusTooManyRequests, http.StatusText(http.StatusTooManyRequests))) +} + +// Mocks + +type mockRateLimiter struct { + calls int + err error +} + +func (m *mockRateLimiter) Take(context.Context, string, http.Header) error { + m.calls++ + return m.err +} + +func (m *mockRateLimiter) Start(_ context.Context, _ component.Host) error { + return nil +} + +func (m *mockRateLimiter) Shutdown(_ context.Context) error { + return nil +} From e6824bc5e38f24697d6d41981bdf854468b2b7f8 Mon Sep 17 00:00:00 2001 From: Foad Nosrati Habibi Date: Wed, 6 Mar 2024 10:39:20 +1100 Subject: [PATCH 2/5] Merge upstream v0.96.0 (#11) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [chore] use consistent file naming, we don't use camelcase (#9205) Signed-off-by: Bogdan Drutu * [chore] refactor otlpreceiver start logic, add lots of tests (#9206) Signed-off-by: Bogdan Drutu * [chore] use mdatagen for otlp receiver (#9180) Signed-off-by: Alex Boten * [chore] Fix PR template so that comments aren't seen in markdown (#9153) **Description:** Currently when submitting a PR the section descriptions will be shown in the markdown view when they should be hidden. This now follows [contrib's template formatting](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/.github/pull_request_template.md?plain=1). * [chore] Run make gotidy (#9212) **Description:** Unfortunately as a part of #9173 I committed some `go.mod` and `go.sum` updates incorrectly. I've run `make gotidy` and hopefully cleared those up. These goleak dependencies were added for goleak tests that ended up failing, so the tests weren't added as a part of the original PR. This ended up leaving the dependencies incorrectly added. * [chore] Enable goleak for tests failing on opencensus-go (#9210) **Description:** As described [here](https://github.com/open-telemetry/opentelemetry-collector/issues/9165#issuecomment-1874732291) and [here](https://github.com/open-telemetry/opentelemetry-collector/issues/9165#issuecomment-1874836336), there are quite a few packages that directly or indirectly import the [OpenCensus-go stats package](https://pkg.go.dev/go.opencensus.io/stats). Within the [stats/view package](https://pkg.go.dev/go.opencensus.io@v0.24.0/stats/view) there's an init() function that starts goroutines that aren't cleaned up. This causes goleak to fail. Since the failure is caused by OpenCensus always indirectly (from what I can tell), and OpenCensus is now read-only, I believe it's fair to ignore leaks caused by this dependency and specific leaking situation. **Link to tracking Issue:** #9165 **Testing:** All added tests are passing * [chore][service/internal/proctelemetry] Enable goleak check (#9227) **Description:** Add `goleak` to detect leaks in tests. Leaking goroutines were detected that were caused by a dependency that we can ignore (`go.opencensus.io/stats/view.(*worker).start`), some `Shutdown` calls were also added that were missing. **Link to tracking Issue:** #9165 **Testing:** Added check is passing as well as existing tests. * [chore][receiver/scraperhelper] Enable goleak check (#9226) **Description:** Add `goleak` to detect leaks in tests. Leaking goroutines were detected that were caused by a dependency that we can ignore (`go.opencensus.io/stats/view.(*worker).start`), a `Shutdown` call was also added that was missing. **Link to tracking Issue:** #9165 **Testing:** Added check is passing as well as existing tests. * [chore][exporter/exporterhelper] Enable goleak test (#9215) **Description:** This enables `goleak` to run on tests within `exporter/exporterhelper`. A known leak needs to be ignored, and we need to explicitly call shutdown on the queue to make sure no routines are still running after the test is complete. **Link to tracking Issue:** #9165 **Testing:** Goleak is now passing, all existing tests are passing. * [chore][internal/e2e] Enable goleak check (#9223) **Description:** Leaking goroutines were detected that were caused by a dependency that we can ignore (`go.opencensus.io/stats/view.(*worker).start`), as well as a missing server close call. **Link to tracking Issue:** #9165 **Testing:** Added check is passing as well as existing tests. * [chore][exporter/otlphttpexporter] Enable goleak check (#9222) **Description:** Enables goleak checks against all tests for the otlphttpexporter. This is the exact same change done in #9210 I just missed it in that change. **Link to tracking Issue:** #9165 **Testing:** All tests are passing. * [chore][CI/CD] Add make gotidy check in build-and-test.yml (#9216) **Description:** Every PR should be checked to make sure `make gotidy` can run successfully against its contents. I want to add this because as shown in #9212, I recently broke some dependencies on `main`. [Logic lifted from contrib.](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/0c27a3bccfd1b1f7418cc1ac05a535ce29a5a736/.github/workflows/build-and-test.yml#L198-L201) * [chore][service/internal/proctelemetry] Remove flaky goleak test (#9231) **Description:** Remove the goleak test from this package for now as it's flaky. This is reverting some of #9227, but leaving some added `Shutdown` calls. **Link to tracking Issue:** #9230: This issue will remain open to track debugging and re-enabling the test Co-authored-by: Bogdan Drutu * Bump github.com/cloudflare/circl from 1.3.3 to 1.3.7 in /internal/tools (#9236) Bumps [github.com/cloudflare/circl](https://github.com/cloudflare/circl) from 1.3.3 to 1.3.7.
Release notes

Sourced from github.com/cloudflare/circl's releases.

CIRCL v1.3.7

What's Changed

New Contributors

Full Changelog: https://github.com/cloudflare/circl/compare/v1.3.6...v1.3.7

CIRCL v1.3.6

What's Changed

New Contributors

Full Changelog: https://github.com/cloudflare/circl/compare/v1.3.3...v1.3.6

Commits
  • c48866b Releasing CIRCL v1.3.7
  • 75ef91e kyber: remove division by q in ciphertext compression
  • 899732a build(deps): bump golang.org/x/crypto
  • 99f0f71 Releasing CIRCL v1.3.6
  • e728d0d Apply thibmeu code review suggestions
  • ceb2d90 Updating blindrsa to be compliant with RFC9474.
  • 44133f7 spelling: tripped
  • c2076d6 spelling: transposes
  • dad2166 spelling: title
  • 171c418 spelling: threshold
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/cloudflare/circl&package-manager=go_modules&previous-version=1.3.3&new-version=1.3.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/open-telemetry/opentelemetry-collector/network/alerts).
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [config/configretry] Allow zero multiplier and arbitrary randomization factor (#9235) **Description:** Partial revert of #9091 to unblock open-telemetry/opentelemetry-collector-contrib/pull/30167 This does not mean that usage of a zero multiplier or a randomization factor outside of [0,1] is blessed upon by Collector maintainers, just that we need to unblock the release :) --------- Signed-off-by: Alex Boten Co-authored-by: Alex Boten * [chore][cmd/mdatagen] Properly test bytes attribute type (#9229) **Description:** As described in the [issue opened in the contrib repository](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/29923), mdatagen was originally generating tests for byte arrays incorrectly. This tests byte arrays in their proper format. As [requested](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/30106#issuecomment-1879321401), this ports the [contrib fix ](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/30106 )into core. **Link to tracking Issue:** https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/29923 **Testing:** I added a fake attribute and fake metric that used it, then generated tests. Fake attribute and metric: ``` attributes: # Added a fake attribute in a metadata.yaml file fake: description: "Fake attribute for testing" type: bytes metrics: container.cpu.usage.percpu: enabled: false description: "Per-core CPU usage by the container (Only available with cgroups v1)." unit: ns sum: value_type: int monotonic: true aggregation_temporality: cumulative attributes: - fake ``` Generated tests: ``` // First test reference: mb.RecordContainerCPUUsagePercpuDataPoint(ts, 1, []byte("fake-val")) // Second test reference: attrVal, ok := dp.Attributes().Get("fake") assert.True(t, ok) assert.EqualValues(t, []byte("fake-val"), attrVal.Bytes()) ``` * [chore] [exporterhelper] Make memory queue benchmarks deteministic (#9247) Ensure the queue always has enough capacity to make the benchmark results deterministic. Otherwise, it's unpredictable when the queue starts rejecting the new entries. It depends on how fast it processes them, which can significantly fluctuate. Also, remove the multiple consumers use cases from benchmarks as redundant. Not sure they provide any value. * Update module golang.org/x/net to v0.20.0 (#9248) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | golang.org/x/net | `v0.19.0` -> `v0.20.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fnet/v0.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2fnet/v0.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2fnet/v0.19.0/v0.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fnet/v0.19.0/v0.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Bogdan Drutu * Update module go.uber.org/goleak to v1.3.0 (#9246) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.uber.org/goleak](https://togithub.com/uber-go/goleak) | `v1.2.0` -> `v1.3.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.uber.org%2fgoleak/v1.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.uber.org%2fgoleak/v1.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.uber.org%2fgoleak/v1.2.0/v1.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.uber.org%2fgoleak/v1.2.0/v1.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
uber-go/goleak (go.uber.org/goleak) ### [`v1.3.0`](https://togithub.com/uber-go/goleak/releases/tag/v1.3.0) [Compare Source](https://togithub.com/uber-go/goleak/compare/v1.2.1...v1.3.0) ##### Fixed - Built-in ignores now match function names more accurately. They will no longer ignore stacks because of file names that look similar to function names. ([#​112](https://togithub.com/uber-go/goleak/issues/112)) ##### Added - Add an `IgnoreAnyFunction` option to ignore stack traces that have the provided function anywhere in the stack. ([#​113](https://togithub.com/uber-go/goleak/issues/113)) - Ignore `testing.runFuzzing` and `testing.runFuzzTests` alongside other already-ignored test functions (`testing.RunTests`, etc). ([#​105](https://togithub.com/uber-go/goleak/issues/105)) ##### Changed - Miscellaneous CI-related fixes. ([#​103](https://togithub.com/uber-go/goleak/issues/103), [#​108](https://togithub.com/uber-go/goleak/issues/108), [#​114](https://togithub.com/uber-go/goleak/issues/114)) ### [`v1.2.1`](https://togithub.com/uber-go/goleak/releases/tag/v1.2.1): v.1.2.1 [Compare Source](https://togithub.com/uber-go/goleak/compare/v1.2.0...v1.2.1) #### \[1.2.1] ##### Changed - Drop golang/x/lint dependency.
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Bogdan Drutu * Move error out of `ReportComponentStatus` function signature, use `ReportStatus` instead (#9175) Fixes #9148 * [chore][processor/batchprocessor] Enable goleak check (#9224) **Description:** Add `goleak` to detect leaks in tests. Leaking goroutines were detected that were caused by a dependency that we can ignore (`go.opencensus.io/stats/view.(*worker).start`), some `Shutdown` calls were also added that were missing. **Link to tracking Issue:** #9165 **Testing:** Added check is passing as well as existing tests. * [chore] make sharedcomponent Map threadsafe (#9170) **Description:** Add just enough code to make sharedcomponent Map thread safe. **Link to tracking Issue:** Relates to #9156 Follow up to #9157, should be reviewed after it is merged. * [chore] [exporterhelper] Add alloc report to persistent queue benchmarks (#9250) * [chore] Prepare release v1.0.1/v0.92.0 (#9255) The following commands were run to prepare this release: - make chlog-update VERSION=v1.0.1/v0.92.0 - make prepare-release PREVIOUS_VERSION=1.0.0 RELEASE_CANDIDATE=1.0.1 MODSET=stable - make prepare-release PREVIOUS_VERSION=0.91.0 RELEASE_CANDIDATE=0.92.0 MODSET=beta * [chore] make sure all contrib tests run (#9238) Fixes #9237 Co-authored-by: Alex Boten * remove deprecated types (#9256) Signed-off-by: Alex Boten * [configopaque] configopaque.String implements fmt.Stringer (#9214) **Description:** configopaque.String implements `fmt.Stringer`, outputting [REDACTED] when used as `fmt.Sprintf("%s", opaquestring)` **Link to tracking Issue:** Fixes #9213 --------- Co-authored-by: Pablo Baeyens * [confignet] Remove deprecated confignet functions (#9258) Instead of completely removing `Dial` and `Listen`, renames `DialContext` and `ListenContext` to `Dial` and `Listen` and deprecates `DialContext` and `ListenContext`. Related to https://github.com/open-telemetry/opentelemetry-collector/issues/9105 Updated tests * Mark configopaque change as a breaking change (#9267) Follow up to #9214. I think marking this as breaking is warranted since we have found 6 instances of breakage in contrib (fixed by open-telemetry/opentelemetry-collector-contrib#30304, open-telemetry/opentelemetry-collector-contrib#30402 and open-telemetry/opentelemetry-collector-contrib#30405). I am also: - Adding subtext explicitly stating how to fix this - Adding this to the user changelog, since it has user-facing implications. * [chore][bug_report.md] Comment out header descriptions (#9261) The descriptions for each header when reporting bugs is useful for the person filing the bug, but not useful to those reading and reviewing. I think it makes sense for these to be included as comments in the bug report, so they're hidden in the rendered report. Co-authored-by: Bogdan Drutu * [chore] simplify replacements with one mod edit call instead of many (#9259) This speeds up replacements and make build logs easier to parse. * [chore][processor/memorylimiter] Cleanup README (#9152) **Documentation:** Some of the wording was hard to follow in the README so I attempted to make it more clear. There shouldn't be any real content changes. * [chore] `make genotelcorecol` (#9275) Counterpart of open-telemetry/opentelemetry-collector-contrib/pull/30456 * [obsreport] deprecate test funcs/structs (#8538) This deprecates the remaining code under the obsreport package. Follows https://github.com/open-telemetry/opentelemetry-collector/commit/bf141227c5b3eb95e849067b33a67cf344992985 --------- Signed-off-by: Alex Boten * Remove deprecated connectortest router helpers (#9278) Signed-off-by: Bogdan Drutu * [exporterhelper] Cleanup logging for export failures (#9282) This change makes the logging of the exported error failures cleaner. 1. Ensure an error message is logged every time and only once when data is dropped/rejected due to export failure. 2. Update the wording. Specifically, don't use "dropped" term when an error is reported back to the pipeline. If there is no queue configured, the exporter doesn't drop data by itself but rather rejects it. Keep the "dropped" wording for failures after the enabled queue. 3. Properly report any error reported by a queue. For example, a persistent storage error must be reported as a storage error, not as "queue overflow". Fixes https://github.com/open-telemetry/opentelemetry-collector/issues/9219 * Update processor README (#9284) - Update recommended processors - Update ordering processors For recommended processors, either the log signal could be added or documentation could be made signal agnostic - opted for the latter. * Update module golang.org/x/sys to v0.16.0 (#9249) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | golang.org/x/sys | `v0.15.0` -> `v0.16.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fsys/v0.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2fsys/v0.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2fsys/v0.15.0/v0.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fsys/v0.15.0/v0.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update github.com/mitchellh/mapstructure digest to 8508981 (#9135) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/mitchellh/mapstructure](https://togithub.com/mitchellh/mapstructure) | require | digest | `bf980b3` -> `8508981` | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update golang.org/x/exp digest to 73b9e39 (#9144) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | golang.org/x/exp | require | digest | `aacd6d4` -> `73b9e39` | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [configopaque] Implement fmt.GoStringer interface for String (#9271) **Description:** Follow up to #9214. To make sure the output when using `%#v` is redacted, we must also implement the `fmt.GoStringer` interface. **Link to tracking Issue:** Relates to #9213 **Testing:** Adds some tests with YAML and JSON as well as more thorough testing of all `fmt` verbs **Documentation:** Clarify that printing this is also redacted. * Update module go.opentelemetry.io/collector/exporter/otlphttpexporter to v0.92.0 (#9291) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/collector/exporter/otlphttpexporter](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.91.0` -> `v0.92.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.92.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.92.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.91.0/v0.92.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.91.0/v0.92.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/exporter/otlphttpexporter) ### [`v0.92.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v101v0920) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.91.0...v0.92.0) ##### 🛑 Breaking changes 🛑 - `exporters/sending_queue`: Do not re-enqueue failed batches, rely on the retry_on_failure strategy instead. ([#​8382](https://togithub.com/open-telemetry/opentelemetry-collector/issues/8382)) The current re-enqueuing behavior is not obvious and cannot be configured. It takes place only for persistent queue and only if `retry_on_failure::enabled=true` even if `retry_on_failure` is a setting for a different backoff retry strategy. This change removes the re-enqueuing behavior. Consider increasing `retry_on_failure::max_elapsed_time` to reduce chances of data loss or set it to 0 to keep retrying until requests succeed. - `confmap`: Make the option `WithErrorUnused` enabled by default when unmarshaling configuration ([#​7102](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7102)) The option `WithErrorUnused` is now enabled by default, and a new option `WithIgnoreUnused` is introduced to ignore errors about unused fields. - `status`: Deprecate `ReportComponentStatus` in favor of `ReportStatus`. This new function does not return an error. ([#​9148](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9148)) ##### 🚩 Deprecations 🚩 - `connectortest`: Deprecate connectortest.New\[Metrics|Logs|Traces]Router in favour of connector.New\[Metrics|Logs|Traces]Router ([#​9095](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9095)) - `exporterhelper`: Deprecate exporterhelper.RetrySettings in favor of configretry.BackOffConfig ([#​9091](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9091)) - `extension/ballast`: Deprecate `memory_ballast` extension. ([#​8343](https://togithub.com/open-telemetry/opentelemetry-collector/issues/8343)) Use `GOMEMLIMIT` environment variable instead. - `connector`: Deprecate \[Metrics|Logs|Traces]Router in favour of \[Metrics|Logs|Traces]RouterAndConsumer ([#​9095](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9095)) ##### 💡 Enhancements 💡 - `exporterhelper`: Add RetrySettings validation function ([#​9089](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9089)) Validate that time.Duration, multiplier values in configretry are non-negative, and randomization_factor is between 0 and 1 - `service`: Enable `telemetry.useOtelForInternalMetrics` by updating the flag to beta ([#​7454](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7454)) The metrics generated should be consistent with the metrics generated previously with OpenCensus. Users can disable the behaviour by setting `--feature-gates -telemetry.useOtelForInternalMetrics` at collector start. - `mdatagen`: move component from contrib to core ([#​9172](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9172)) - `semconv`: Generated Semantic conventions 1.22.0. ([#​8686](https://togithub.com/open-telemetry/opentelemetry-collector/issues/8686)) - `confignet`: Add `dialer_timeout` config option. ([#​9066](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9066)) - `processor/memory_limiter`: Update config validation errors ([#​9059](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9059)) - Fix names of the config fields that are validated in the error messages - Move the validation from start to the initialization phrase - `exporterhelper`: Add config Validate for TimeoutSettings ([#​9104](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9104)) ##### 🧰 Bug fixes 🧰 - `memorylimiterprocessor`: Fixed leaking goroutines from memorylimiterprocessor ([#​9099](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9099)) - `cmd/otelcorecol`: Fix the code detecting if the collector is running as a service on Windows. ([#​7350](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7350)) Removed the `NO_WINDOWS_SERVICE` environment variable given it is not needed anymore. - `otlpexporter`: remove dependency of otlphttpreceiver on otlpexporter ([#​6454](https://togithub.com/open-telemetry/opentelemetry-collector/issues/6454))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * [docs/release] Swap Juraci and me for release duties (#9294) I can't do the v0.95.0 release, so I am swapping it for the v0.96.0 release. * Update module go.opentelemetry.io/collector/exporter/otlpexporter to v0.92.0 (#9290) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/collector/exporter/otlpexporter](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.91.0` -> `v0.92.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.92.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.92.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.91.0/v0.92.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.91.0/v0.92.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/exporter/otlpexporter) ### [`v0.92.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v101v0920) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.91.0...v0.92.0) ##### 🛑 Breaking changes 🛑 - `exporters/sending_queue`: Do not re-enqueue failed batches, rely on the retry_on_failure strategy instead. ([#​8382](https://togithub.com/open-telemetry/opentelemetry-collector/issues/8382)) The current re-enqueuing behavior is not obvious and cannot be configured. It takes place only for persistent queue and only if `retry_on_failure::enabled=true` even if `retry_on_failure` is a setting for a different backoff retry strategy. This change removes the re-enqueuing behavior. Consider increasing `retry_on_failure::max_elapsed_time` to reduce chances of data loss or set it to 0 to keep retrying until requests succeed. - `confmap`: Make the option `WithErrorUnused` enabled by default when unmarshaling configuration ([#​7102](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7102)) The option `WithErrorUnused` is now enabled by default, and a new option `WithIgnoreUnused` is introduced to ignore errors about unused fields. - `status`: Deprecate `ReportComponentStatus` in favor of `ReportStatus`. This new function does not return an error. ([#​9148](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9148)) ##### 🚩 Deprecations 🚩 - `connectortest`: Deprecate connectortest.New\[Metrics|Logs|Traces]Router in favour of connector.New\[Metrics|Logs|Traces]Router ([#​9095](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9095)) - `exporterhelper`: Deprecate exporterhelper.RetrySettings in favor of configretry.BackOffConfig ([#​9091](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9091)) - `extension/ballast`: Deprecate `memory_ballast` extension. ([#​8343](https://togithub.com/open-telemetry/opentelemetry-collector/issues/8343)) Use `GOMEMLIMIT` environment variable instead. - `connector`: Deprecate \[Metrics|Logs|Traces]Router in favour of \[Metrics|Logs|Traces]RouterAndConsumer ([#​9095](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9095)) ##### 💡 Enhancements 💡 - `exporterhelper`: Add RetrySettings validation function ([#​9089](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9089)) Validate that time.Duration, multiplier values in configretry are non-negative, and randomization_factor is between 0 and 1 - `service`: Enable `telemetry.useOtelForInternalMetrics` by updating the flag to beta ([#​7454](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7454)) The metrics generated should be consistent with the metrics generated previously with OpenCensus. Users can disable the behaviour by setting `--feature-gates -telemetry.useOtelForInternalMetrics` at collector start. - `mdatagen`: move component from contrib to core ([#​9172](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9172)) - `semconv`: Generated Semantic conventions 1.22.0. ([#​8686](https://togithub.com/open-telemetry/opentelemetry-collector/issues/8686)) - `confignet`: Add `dialer_timeout` config option. ([#​9066](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9066)) - `processor/memory_limiter`: Update config validation errors ([#​9059](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9059)) - Fix names of the config fields that are validated in the error messages - Move the validation from start to the initialization phrase - `exporterhelper`: Add config Validate for TimeoutSettings ([#​9104](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9104)) ##### 🧰 Bug fixes 🧰 - `memorylimiterprocessor`: Fixed leaking goroutines from memorylimiterprocessor ([#​9099](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9099)) - `cmd/otelcorecol`: Fix the code detecting if the collector is running as a service on Windows. ([#​7350](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7350)) Removed the `NO_WINDOWS_SERVICE` environment variable given it is not needed anymore. - `otlpexporter`: remove dependency of otlphttpreceiver on otlpexporter ([#​6454](https://togithub.com/open-telemetry/opentelemetry-collector/issues/6454))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update module go.opentelemetry.io/collector/receiver/otlpreceiver to v0.92.0 (#9292) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/collector/receiver/otlpreceiver](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.91.0` -> `v0.92.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.92.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.92.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.91.0/v0.92.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.91.0/v0.92.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/receiver/otlpreceiver) ### [`v0.92.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v101v0920) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.91.0...v0.92.0) ##### 🛑 Breaking changes 🛑 - `exporters/sending_queue`: Do not re-enqueue failed batches, rely on the retry_on_failure strategy instead. ([#​8382](https://togithub.com/open-telemetry/opentelemetry-collector/issues/8382)) The current re-enqueuing behavior is not obvious and cannot be configured. It takes place only for persistent queue and only if `retry_on_failure::enabled=true` even if `retry_on_failure` is a setting for a different backoff retry strategy. This change removes the re-enqueuing behavior. Consider increasing `retry_on_failure::max_elapsed_time` to reduce chances of data loss or set it to 0 to keep retrying until requests succeed. - `confmap`: Make the option `WithErrorUnused` enabled by default when unmarshaling configuration ([#​7102](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7102)) The option `WithErrorUnused` is now enabled by default, and a new option `WithIgnoreUnused` is introduced to ignore errors about unused fields. - `status`: Deprecate `ReportComponentStatus` in favor of `ReportStatus`. This new function does not return an error. ([#​9148](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9148)) ##### 🚩 Deprecations 🚩 - `connectortest`: Deprecate connectortest.New\[Metrics|Logs|Traces]Router in favour of connector.New\[Metrics|Logs|Traces]Router ([#​9095](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9095)) - `exporterhelper`: Deprecate exporterhelper.RetrySettings in favor of configretry.BackOffConfig ([#​9091](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9091)) - `extension/ballast`: Deprecate `memory_ballast` extension. ([#​8343](https://togithub.com/open-telemetry/opentelemetry-collector/issues/8343)) Use `GOMEMLIMIT` environment variable instead. - `connector`: Deprecate \[Metrics|Logs|Traces]Router in favour of \[Metrics|Logs|Traces]RouterAndConsumer ([#​9095](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9095)) ##### 💡 Enhancements 💡 - `exporterhelper`: Add RetrySettings validation function ([#​9089](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9089)) Validate that time.Duration, multiplier values in configretry are non-negative, and randomization_factor is between 0 and 1 - `service`: Enable `telemetry.useOtelForInternalMetrics` by updating the flag to beta ([#​7454](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7454)) The metrics generated should be consistent with the metrics generated previously with OpenCensus. Users can disable the behaviour by setting `--feature-gates -telemetry.useOtelForInternalMetrics` at collector start. - `mdatagen`: move component from contrib to core ([#​9172](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9172)) - `semconv`: Generated Semantic conventions 1.22.0. ([#​8686](https://togithub.com/open-telemetry/opentelemetry-collector/issues/8686)) - `confignet`: Add `dialer_timeout` config option. ([#​9066](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9066)) - `processor/memory_limiter`: Update config validation errors ([#​9059](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9059)) - Fix names of the config fields that are validated in the error messages - Move the validation from start to the initialization phrase - `exporterhelper`: Add config Validate for TimeoutSettings ([#​9104](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9104)) ##### 🧰 Bug fixes 🧰 - `memorylimiterprocessor`: Fixed leaking goroutines from memorylimiterprocessor ([#​9099](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9099)) - `cmd/otelcorecol`: Fix the code detecting if the collector is running as a service on Windows. ([#​7350](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7350)) Removed the `NO_WINDOWS_SERVICE` environment variable given it is not needed anymore. - `otlpexporter`: remove dependency of otlphttpreceiver on otlpexporter ([#​6454](https://togithub.com/open-telemetry/opentelemetry-collector/issues/6454))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update module golang.org/x/tools to v0.17.0 (#9293) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | golang.org/x/tools | `v0.16.1` -> `v0.17.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2ftools/v0.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2ftools/v0.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2ftools/v0.16.1/v0.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2ftools/v0.16.1/v0.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update module github.com/prometheus/common to v0.46.0 (#9289) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/prometheus/common](https://togithub.com/prometheus/common) | `v0.45.0` -> `v0.46.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fcommon/v0.46.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fcommon/v0.46.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fcommon/v0.45.0/v0.46.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fcommon/v0.45.0/v0.46.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
prometheus/common (github.com/prometheus/common) ### [`v0.46.0`](https://togithub.com/prometheus/common/releases/tag/v0.46.0) [Compare Source](https://togithub.com/prometheus/common/compare/v0.45.0...v0.46.0) #### What's Changed - Add golangci-lint config by [@​SuperQ](https://togithub.com/SuperQ) in [https://github.com/prometheus/common/pull/517](https://togithub.com/prometheus/common/pull/517) - model: add metric type values by [@​bboreham](https://togithub.com/bboreham) in [https://github.com/prometheus/common/pull/533](https://togithub.com/prometheus/common/pull/533) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/common/pull/532](https://togithub.com/prometheus/common/pull/532) - Bump github.com/aws/aws-sdk-go from 1.45.19 to 1.47.0 in /sigv4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/529](https://togithub.com/prometheus/common/pull/529) - Update modules by [@​SuperQ](https://togithub.com/SuperQ) in [https://github.com/prometheus/common/pull/534](https://togithub.com/prometheus/common/pull/534) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/common/pull/535](https://togithub.com/prometheus/common/pull/535) - Allow using empty Authorization credentials by [@​TheSpiritXIII](https://togithub.com/TheSpiritXIII) in [https://github.com/prometheus/common/pull/546](https://togithub.com/prometheus/common/pull/546) - enable errorlint linter by [@​mmorel-35](https://togithub.com/mmorel-35) in [https://github.com/prometheus/common/pull/550](https://togithub.com/prometheus/common/pull/550) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/common/pull/548](https://togithub.com/prometheus/common/pull/548) - Bump github.com/aws/aws-sdk-go from 1.47.0 to 1.48.10 in /sigv4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/539](https://togithub.com/prometheus/common/pull/539) - Bump github.com/alecthomas/kingpin/v2 from 2.3.2 to 2.4.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/542](https://togithub.com/prometheus/common/pull/542) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/common/pull/552](https://togithub.com/prometheus/common/pull/552) - Bump golang.org/x/net from 0.18.0 to 0.19.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/541](https://togithub.com/prometheus/common/pull/541) - Bump golang.org/x/oauth2 from 0.14.0 to 0.15.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/540](https://togithub.com/prometheus/common/pull/540) - Add hints for promlog by [@​lucacome](https://togithub.com/lucacome) in [https://github.com/prometheus/common/pull/556](https://togithub.com/prometheus/common/pull/556) - Bump google.golang.org/protobuf from 1.31.0 to 1.32.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/560](https://togithub.com/prometheus/common/pull/560) - Bump github.com/prometheus/client_golang from 1.17.0 to 1.18.0 in /sigv4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/558](https://togithub.com/prometheus/common/pull/558) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/common/pull/555](https://togithub.com/prometheus/common/pull/555) - Bump github.com/prometheus/client_golang from 1.17.0 to 1.18.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/559](https://togithub.com/prometheus/common/pull/559) - Bump github.com/aws/aws-sdk-go from 1.48.10 to 1.49.13 in /sigv4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/557](https://togithub.com/prometheus/common/pull/557) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/common/pull/561](https://togithub.com/prometheus/common/pull/561) - Make version getRevision public by [@​SuperQ](https://togithub.com/SuperQ) in [https://github.com/prometheus/common/pull/563](https://togithub.com/prometheus/common/pull/563) - enable gofumpt, goimports, testifylint linters by [@​mmorel-35](https://togithub.com/mmorel-35) in [https://github.com/prometheus/common/pull/551](https://togithub.com/prometheus/common/pull/551) - version: make GetTegs() public by [@​ArthurSens](https://togithub.com/ArthurSens) in [https://github.com/prometheus/common/pull/565](https://togithub.com/prometheus/common/pull/565) - switch to protodelim package (which pbutil now calls) by [@​stapelberg](https://togithub.com/stapelberg) in [https://github.com/prometheus/common/pull/567](https://togithub.com/prometheus/common/pull/567) - Bump Go modules by [@​SuperQ](https://togithub.com/SuperQ) in [https://github.com/prometheus/common/pull/568](https://togithub.com/prometheus/common/pull/568) #### New Contributors - [@​TheSpiritXIII](https://togithub.com/TheSpiritXIII) made their first contribution in [https://github.com/prometheus/common/pull/546](https://togithub.com/prometheus/common/pull/546) - [@​mmorel-35](https://togithub.com/mmorel-35) made their first contribution in [https://github.com/prometheus/common/pull/550](https://togithub.com/prometheus/common/pull/550) - [@​ArthurSens](https://togithub.com/ArthurSens) made their first contribution in [https://github.com/prometheus/common/pull/565](https://togithub.com/prometheus/common/pull/565) - [@​stapelberg](https://togithub.com/stapelberg) made their first contribution in [https://github.com/prometheus/common/pull/567](https://togithub.com/prometheus/common/pull/567) **Full Changelog**: https://github.com/prometheus/common/compare/v0.45.0...v0.46.0
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update golang.org/x/exp digest to db7319d (#9288) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | golang.org/x/exp | require | digest | `73b9e39` -> `db7319d` | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [chore] Clarify configopaque expectations (#9295) Documents `configopaque` expectations. The intention is that it is clear that we can add interface implementations after 1.0 if not doing so would leak opaque values. Fixes #9274 * [telemetry] mark useOtelForInternalMetrics stable (#9102) This marks the flag as stable. Leaving this as a draft until v0.92.0 is released. Closes https://github.com/open-telemetry/opentelemetry-collector/issues/8962 Fixes https://github.com/open-telemetry/opentelemetry-collector/issues/816 --------- Signed-off-by: Alex Boten * Update module golang.org/x/vuln to v1.0.2 (#9297) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | golang.org/x/vuln | `v1.0.1` -> `v1.0.2` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fvuln/v1.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2fvuln/v1.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2fvuln/v1.0.1/v1.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fvuln/v1.0.1/v1.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [chore] update schedule, fix couple of typos (#9286) Signed-off-by: Alex Boten Co-authored-by: Pablo Baeyens Co-authored-by: Curtis Robert * [chore] add mdatagen-test makefile target (#9280) This is copied verbatim from the contrib repo. Signed-off-by: Alex Boten * [OTLP/GRPC] Ensure OTLP receiver handles consume errors correctly (#8080) **Description:** Follow the receiver contract and return Unavailable for non-permanent and InvalidArgument for permanent errors for OTLP/gRPC receiver. Leave the "Retry-After" field blank and let the client implement an exponential backoff strategy. **Link to tracking Issue:** https://github.com/open-telemetry/opentelemetry-collector/issues/4335 **Testing:** Added relevant test cases. --------- Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com> * [CONTRIBUTING.md] Proofread the contributing doc (#9301) **Description:** Some small updates on the CONTRIBUTING.md doc to keep it updated: - Remove 'Up for Grabs' label which we have never used - Update minimum Go version - Remove outdated comment about OpenTelemetry project status - Link to dedicated observability doc * Remove the obsolete +build directive (#9304) `// +build` was replaced with `//go:build` directive in Go 1.17. The `+build` can be removed since we support only 1.20 and 1.21 * [chore] add @TylerHelmuth as triager (#9305) Fixes #9303 Signed-off-by: Alex Boten * [exporter/debug] Update readme to state output is not guaranteed (#9306) **Description:** Based on the SIG meeting discussion today, this PR adds a warning to the readme that the output is not guaranteed and may change at any time. * [chore] Fix typo in a changelog entry (#9308) * Update opentelemetry-go monorepo (#9245) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/otel](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.21.0` -> `v1.22.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel/v1.21.0/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel/v1.21.0/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/bridge/opencensus](https://togithub.com/open-telemetry/opentelemetry-go) | `v0.44.0` -> `v0.45.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fbridge%2fopencensus/v0.45.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fbridge%2fopencensus/v0.45.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fbridge%2fopencensus/v0.44.0/v0.45.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fbridge%2fopencensus/v0.44.0/v0.45.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc](https://togithub.com/open-telemetry/opentelemetry-go) | `v0.44.0` -> `v0.45.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetricgrpc/v0.45.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetricgrpc/v0.45.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetricgrpc/v0.44.0/v0.45.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetricgrpc/v0.44.0/v0.45.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp](https://togithub.com/open-telemetry/opentelemetry-go) | `v0.44.0` -> `v0.45.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetrichttp/v0.45.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetrichttp/v0.45.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetrichttp/v0.44.0/v0.45.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetrichttp/v0.44.0/v0.45.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.21.0` -> `v1.22.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracegrpc/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracegrpc/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracegrpc/v1.21.0/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracegrpc/v1.21.0/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.21.0` -> `v1.22.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracehttp/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracehttp/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracehttp/v1.21.0/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracehttp/v1.21.0/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/stdout/stdoutmetric](https://togithub.com/open-telemetry/opentelemetry-go) | `v0.44.0` -> `v0.45.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdoutmetric/v0.45.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdoutmetric/v0.45.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdoutmetric/v0.44.0/v0.45.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdoutmetric/v0.44.0/v0.45.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/stdout/stdouttrace](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.21.0` -> `v1.22.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdouttrace/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdouttrace/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdouttrace/v1.21.0/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdouttrace/v1.21.0/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/metric](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.21.0` -> `v1.22.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fmetric/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fmetric/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fmetric/v1.21.0/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fmetric/v1.21.0/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/sdk](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.21.0` -> `v1.22.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fsdk/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fsdk/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fsdk/v1.21.0/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fsdk/v1.21.0/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/sdk/metric](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.21.0` -> `v1.22.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fsdk%2fmetric/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fsdk%2fmetric/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fsdk%2fmetric/v1.21.0/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fsdk%2fmetric/v1.21.0/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/trace](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.21.0` -> `v1.22.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2ftrace/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2ftrace/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2ftrace/v1.21.0/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2ftrace/v1.21.0/v1.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes
open-telemetry/opentelemetry-go (go.opentelemetry.io/otel) ### [`v1.22.0`](https://togithub.com/open-telemetry/opentelemetry-go/releases/tag/v1.22.0): /v0.45.0 [Compare Source](https://togithub.com/open-telemetry/opentelemetry-go/compare/v1.21.0...v1.22.0) ##### Added - The `go.opentelemetry.io/otel/semconv/v1.22.0` package. The package contains semantic conventions from the `v1.22.0` version of the OpenTelemetry Semantic Conventions. ([#​4735](https://togithub.com/open-telemetry/opentelemetry-go/issues/4735)) - The `go.opentelemetry.io/otel/semconv/v1.23.0` package. The package contains semantic conventions from the `v1.23.0` version of the OpenTelemetry Semantic Conventions. ([#​4746](https://togithub.com/open-telemetry/opentelemetry-go/issues/4746)) - The `go.opentelemetry.io/otel/semconv/v1.23.1` package. The package contains semantic conventions from the `v1.23.1` version of the OpenTelemetry Semantic Conventions. ([#​4749](https://togithub.com/open-telemetry/opentelemetry-go/issues/4749)) - The `go.opentelemetry.io/otel/semconv/v1.24.0` package. The package contains semantic conventions from the `v1.24.0` version of the OpenTelemetry Semantic Conventions. ([#​4770](https://togithub.com/open-telemetry/opentelemetry-go/issues/4770)) - Add `WithResourceAsConstantLabels` option to apply resource attributes for every metric emitted by the Prometheus exporter. ([#​4733](https://togithub.com/open-telemetry/opentelemetry-go/issues/4733)) - Experimental cardinality limiting is added to the metric SDK. See [metric documentation](./sdk/metric/EXPERIMENTAL.md#cardinality-limit) for more information about this feature and how to enable it. ([#​4457](https://togithub.com/open-telemetry/opentelemetry-go/issues/4457)) - Add `NewMemberRaw` and `NewKeyValuePropertyRaw` in `go.opentelemetry.io/otel/baggage`. ([#​4804](https://togithub.com/open-telemetry/opentelemetry-go/issues/4804)) ##### Changed - Upgrade all use of `go.opentelemetry.io/otel/semconv` to use `v1.24.0`. ([#​4754](https://togithub.com/open-telemetry/opentelemetry-go/issues/4754)) - Update transformations in `go.opentelemetry.io/otel/exporters/zipkin` to follow `v1.19.0` version of the OpenTelemetry specification. ([#​4754](https://togithub.com/open-telemetry/opentelemetry-go/issues/4754)) - Record synchronous measurements when the passed context is canceled instead of dropping in `go.opentelemetry.io/otel/sdk/metric`. If you do not want to make a measurement when the context is cancelled, you need to handle it yourself (e.g `if ctx.Err() != nil`). ([#​4671](https://togithub.com/open-telemetry/opentelemetry-go/issues/4671)) - Improve `go.opentelemetry.io/otel/trace.TraceState`'s performance. ([#​4722](https://togithub.com/open-telemetry/opentelemetry-go/issues/4722)) - Improve `go.opentelemetry.io/otel/propagation.TraceContext`'s performance. ([#​4721](https://togithub.com/open-telemetry/opentelemetry-go/issues/4721)) - Improve `go.opentelemetry.io/otel/baggage` performance. ([#​4743](https://togithub.com/open-telemetry/opentelemetry-go/issues/4743)) - Improve performance of the `(*Set).Filter` method in `go.opentelemetry.io/otel/attribute` when the passed filter does not filter out any attributes from the set. ([#​4774](https://togithub.com/open-telemetry/opentelemetry-go/issues/4774)) - `Member.String` in `go.opentelemetry.io/otel/baggage` percent-encodes only when necessary. ([#​4775](https://togithub.com/open-telemetry/opentelemetry-go/issues/4775)) - `Property.Value` in `go.opentelemetry.io/otel/baggage` now returns a raw string instead of a percent-encoded value. ([#​4804](https://togithub.com/open-telemetry/opentelemetry-go/issues/4804)) ##### Fixed - Fix `Parse` in `go.opentelemetry.io/otel/baggage` to validate member value before percent-decoding. ([#​4755](https://togithub.com/open-telemetry/opentelemetry-go/issues/4755)) - Fix whitespace encoding of `Member.String` in `go.opentelemetry.io/otel/baggage`. ([#​4756](https://togithub.com/open-telemetry/opentelemetry-go/issues/4756)) - Fix baggage item key so that it is not canonicalized in `go.opentelemetry.io/otel/bridge/opentracing`. ([#​4776](https://togithub.com/open-telemetry/opentelemetry-go/issues/4776)) - Fix `go.opentelemetry.io/otel/bridge/opentracing` to properly handle baggage values that requires escaping during propagation. ([#​4804](https://togithub.com/open-telemetry/opentelemetry-go/issues/4804)) - Fix a bug where using multiple readers resulted in incorrect asynchronous counter values in `go.opentelemetry.io/otel/sdk/metric`. ([#​4742](https://togithub.com/open-telemetry/opentelemetry-go/issues/4742))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [configtls] support setting cipher suites (#9168) **Description:** Add `cipher_suites` to configtls: Users can specify a list of cipher suites to pick from. If left blank, a safe default list is used. **Link to tracking Issue:** Fixes #8105 **Testing:** Unit tests **Documentation:** godoc and README --------- Co-authored-by: Alex Boten * update grpc instrumentation (#9312) Potentially fix #9296 --------- Signed-off-by: Alex Boten * Fixed indentation in YAML for deployment at otel-config.yaml (#9311) The name/value entry had an incorrect indentation that made the documented process fail (Document ref: https://opentelemetry.io/docs/collector/installation/) * [configopaque] Implement encoding.BinaryMarshaler interface for String (#9279) **Description:** Implements the `encoding.BinaryMarshaler` interface for `String`. This prevents the situation `configopaque` -> `[]byte` -> `string` from leaking the `String` value. **Link to tracking Issue:** Closes https://github.com/open-telemetry/opentelemetry-collector/issues/9272 **Testing:** Added unit test --------- Co-authored-by: Antoine Toulme * [chore]swap logging exporter with debug exporter in README (#9335) * [chore][extension/zpages] ReportFatalError -> ReportStatus (#9332) **Description:** Remove use of the deprecated method `ReportFatalError` in favor of using `ReportStatus`. * [chore] Simplify general information in receivers/exporter readme (#9336) * [service] Refactor telemetry initialization (#9320) A part of #9319 that can be done without waiting for #9131 * [chore] remove waits as start is now deterministic (#9330) **Description:** This PR removes 3 TODOs and time.Sleep statements as otlp receiver start is now deterministic. This change is similar to https://github.com/open-telemetry/opentelemetry-collector/pull/9121 For good measure, I ran the tests 10,000 each (each test runs multiple sub-tests) and didn't have any failures. * [extension/zpages] remove mention of rpcz (#9329) **Description:** Remove mention of rpcz from tests and README. **Link to tracking Issue:** Fixes #9328 * [mdatagen] update crosslink to avoid replace statements (#9310) Fixes https://github.com/open-telemetry/opentelemetry-collector/issues/9281 --------- Signed-off-by: Alex Boten * [otelcol] Add unit test for implicit config use case (#9302) **Description:** * Add unit test that illustrates running the command without an external config * This models how Jaeger all-in-one uses collector because all-in-one can be run without arguments, for maximum user friendliness --------- Signed-off-by: Yuri Shkuro * Update module go.opentelemetry.io/contrib/config to v0.2.0 (#9342) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/contrib/config](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | `v0.1.1` -> `v0.2.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcontrib%2fconfig/v0.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcontrib%2fconfig/v0.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcontrib%2fconfig/v0.1.1/v0.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcontrib%2fconfig/v0.1.1/v0.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [docs] Add owner for darwin/amd64 (#9350) Adds owner for darwin/amd64 platform based on https://github.com/open-telemetry/opentelemetry-collector/issues/8526#issuecomment-1905979165. Fixes #9114 --------- Co-authored-by: Howard Cheung * Update actions/cache action to v4 (#9348) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/cache](https://togithub.com/actions/cache) | action | major | `v3` -> `v4` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes
actions/cache (actions/cache) ### [`v4`](https://togithub.com/actions/cache/compare/v3...v4) [Compare Source](https://togithub.com/actions/cache/compare/v3...v4)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * [chore] Remove internal LogStabilityLevel, not used (#9347) Remove `LogStabilityLevel` as it is not used anywhere and is an internal struct. * [chore] remove hostWrapper (#9346) Remove `hostWrapper`. This internal class is only used for extensions to wrap a specific logger, but since we have deprecated `ReportFatalError`, we should no longer expect this function to be called anyway. * Update golang.org/x/exp digest to 1b97071 (#9341) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | golang.org/x/exp | require | digest | `db7319d` -> `1b97071` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update module go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp to v0.47.0 (#9343) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | `v0.46.1` -> `v0.47.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fnet%2fhttp%2fotelhttp/v0.47.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fnet%2fhttp%2fotelhttp/v0.47.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fnet%2fhttp%2fotelhttp/v0.46.1/v0.47.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fnet%2fhttp%2fotelhttp/v0.46.1/v0.47.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update module go.opentelemetry.io/contrib/zpages to v0.47.0 (#9345) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/contrib/zpages](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | `v0.46.1` -> `v0.47.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcontrib%2fzpages/v0.47.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcontrib%2fzpages/v0.47.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcontrib%2fzpages/v0.46.1/v0.47.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcontrib%2fzpages/v0.46.1/v0.47.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [extension/memorylimiter] add memory limiter extension, a copy of memorylimiter processor (#8964) **Description:** Following https://github.com/open-telemetry/opentelemetry-collector/issues/8632, this change introduces memory limiter as an extension. This allows us to place the component to reject incoming connections due to limited memory, providing better protection from running out of memory. missing feature: receiver fairness. issue where a receiver hogs all the resource can happen. **Link to tracking Issue:** https://github.com/open-telemetry/opentelemetry-collector/issues/8632 --------- Co-authored-by: Dmitry Anoshin * Bump prometheus exporter and b3 propagation (#9354) Signed-off-by: Bogdan Drutu * Update go.opentelemetry.io/build-tools/crosslink digest to d70c842 (#9340) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [go.opentelemetry.io/build-tools/crosslink](https://togithub.com/open-telemetry/opentelemetry-go-build-tools) | require | digest | `6a6b657` -> `d70c842` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Replace local dependencies for mdatagen, unblocks release action (#9358) Signed-off-by: Bogdan Drutu * [chore] Prepare release v0.93.0 (#9359) The following commands were run to prepare this release: - make chlog-update VERSION=v0.93.0 - make prepare-release PREVIOUS_VERSION=0.92.0 RELEASE_CANDIDATE=0.93.0 MODSET=beta * [chore] Tune renovate (#9362) Closes https://github.com/open-telemetry/opentelemetry-collector/issues/9353. Changes are based on [Contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/30362), which has been working nicely * [receiver/otlp] Refactor error handling into helper (#9307) **Description:** Moves reused code into helper function **Link to tracking Issue:** Closes https://github.com/open-telemetry/opentelemetry-collector/issues/9300 **Testing:** Added unit tests * setup OSSF Scorecard workflow (#9317) **Description:** setup OSSF Scorecard workflow This will help identify and fix vulnerabilities. [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/open-telemetry/opentelemetry-collector/badge)](https://securityscorecards.dev/viewer/?uri=github.com/open-telemetry/opentelemetry-collector) Signed-off-by: Matthieu MOREL * [receiver/otlp, internal, featuregate] Add featuregate to switch to localhost defaults for server-like components (#8622) **Description:** - Define `component.UseLocalHostAsDefaultHost` in the `internal/localhostgate` package. - Define `featuregate.ErrIsAlreadyRegistered` error, returned by `Register` when a gate is already registered. - Adds support for the localhost gate on the OTLP receiver. This PR does not remove the current warning in any way, we can remove this separately. **Link to tracking Issue:** Updates #8510 **Testing:** Adds unit tests **Documentation:** Document on OTLP receiver template and add related logging. * [service] fix opencensus bridge in periodic readers (#9361) The periodic metric readers were not connecting to the opencensus bridge prior to this change, meaning anyone trying to emit metrics via the console or OTLP from components that used opencensus were failing to do so. --------- Signed-off-by: Alex Boten * docs: add @astencel-sumo as platform owner for `linux/386` (#9383) Fixes https://github.com/open-telemetry/opentelemetry-collector/issues/9351 * Remove deprecated funcs and types from component (#9283) Signed-off-by: Bogdan Drutu Signed-off-by: Alex Boten Co-authored-by: Alex Boten * [confignet] Remove deprecated functions (#9363) **Description:** Remove deprecated functions from confignet. **Link to tracking Issue:** Closes https://github.com/open-telemetry/opentelemetry-collector/issues/9105 * [confmap]remove stable featuregate (#9386) **Description:** Remove stable feature gate `confmap.expandEnabled` as it was declared stable in 0.75.0. **Link to tracking Issue:** Fixes #9369 * [config/configgrpc] introduce toListenerContext, deprecate toListener (#9390) Introduce `ToListenerContext` and deprecate `ToListener`. **Link to tracking Issue:** #9389 * Update module golang.org/x/vuln to v1.0.3 - abandoned (#9355) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | golang.org/x/vuln | `v1.0.2` -> `v1.0.3` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fvuln/v1.0.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2fvuln/v1.0.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2fvuln/v1.0.2/v1.0.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fvuln/v1.0.2/v1.0.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Alex Boten * [config/confighttp] Deprecate CORSSettings, use CORSConfig instead (#9392) **Description:** Deprecate CORSSettings, use CORSConfig instead **Link to tracking Issue:** #6767 * [confighttp] Deprecate HTTPServerSettings, use HTTPServerConfig instead (#9405) **Description:** Deprecate HTTPServerSettings, use HTTPServerConfig instead **Link to tracking Issue:** #6767 * [confighttp] Deprecate HTTPClientSettings, use HTTPClientConfig instead (#9404) **Description:** Deprecate HTTPClientSettings, use HTTPClientConfig instead **Link to tracking Issue:** #6767 * Update module go.opentelemetry.io/collector/receiver/otlpreceiver to v0.93.0 (#9424) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/collector/receiver/otlpreceiver](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.92.0` -> `v0.93.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.93.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.93.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.92.0/v0.93.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.92.0/v0.93.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/receiver/otlpreceiver) ### [`v0.93.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v0930) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.92.0...v0.93.0) ##### 🛑 Breaking changes 🛑 - `exporterhelper`: remove deprecated exporterhelper.RetrySettings and exporterhelper.NewDefaultRetrySettings ([#​9256](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9256)) - `configopaque`: configopaque.String implements `fmt.Stringer` and `fmt.GoStringer`, outputting \[REDACTED] when formatted with the %s, %q or %#v verbs`(#​9213) This may break applications that rely on the previous behavior of opaque strings with`fmt.Sprintf`to e.g. build URLs or headers. Explicitly cast the opaque string to a string before using it in`fmt.Sprintf\` to restore the previous behavior. ##### 🚀 New components 🚀 - `extension/memory_limiter`: Introduce a `memory_limiter` extension which receivers can use to reject incoming requests when collector doesn't have enough memory ([#​8632](https://togithub.com/open-telemetry/opentelemetry-collector/issues/8632)) The extension has the same configuration interface and behavior as the existing `memory_limiter` processor, which potentially can be deprecated and removed in the future ##### 💡 Enhancements 💡 - `configtls`: add `cipher_suites` to configtls. ([#​8105](https://togithub.com/open-telemetry/opentelemetry-collector/issues/8105)) Users can specify a list of cipher suites to pick from. If left blank, a safe default list is used. - `service`: mark `telemetry.useOtelForInternalMetrics` as stable ([#​816](https://togithub.com/open-telemetry/opentelemetry-collector/issues/816)) - `exporters`: Cleanup log messages for export failures ([#​9219](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9219)) 1. Ensure an error message is logged every time and only once when data is dropped/rejected due to export failure. 2. Update the wording. Specifically, don't use "dropped" term when an error is reported back to the pipeline. Keep the "dropped" wording for failures happened after the enabled queue. 3. Properly report any error reported by a queue. For example, a persistent storage error must be reported as a storage error, not as "queue overflow". ##### 🧰 Bug fixes 🧰 - `configgrpc`: Update dependency to address a potential crash in the grpc instrumentation ([#​9296](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9296)) - `otlpreceiver`: Ensure OTLP receiver handles consume errors correctly ([#​4335](https://togithub.com/open-telemetry/opentelemetry-collector/issues/4335)) Make sure OTLP receiver returns correct status code and follows the receiver contract (gRPC) - `zpagesextension`: Remove mention of rpcz page from zpages extension ([#​9328](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9328))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * [chore] add missing changelog for HTTPServerSettings->HTTPServerConfig for otlpreceiver Config (#9418) **Description:** add missing changelog for HTTPServerSettings->HTTPServerConfig for otlpreceiver Config **Link to tracking Issue:** https://github.com/open-telemetry/opentelemetry-collector/pull/9405#discussion_r1470269634 --------- Co-authored-by: Dmitrii Anoshin Co-authored-by: Alex Boten * Update module go.opentelemetry.io/collector to v0.93.0 (#9421) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/collector](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.92.0` -> `v0.93.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector/v0.93.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector/v0.93.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector/v0.92.0/v0.93.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector/v0.92.0/v0.93.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector) ### [`v0.93.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v0930) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.92.0...v0.93.0) ##### 🛑 Breaking changes 🛑 - `exporterhelper`: remove deprecated exporterhelper.RetrySettings and exporterhelper.NewDefaultRetrySettings ([#​9256](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9256)) - `configopaque`: configopaque.String implements `fmt.Stringer` and `fmt.GoStringer`, outputting \[REDACTED] when formatted with the %s, %q or %#v verbs`(#​9213) This may break applications that rely on the previous behavior of opaque strings with`fmt.Sprintf`to e.g. build URLs or headers. Explicitly cast the opaque string to a string before using it in`fmt.Sprintf\` to restore the previous behavior. ##### 🚀 New components 🚀 - `extension/memory_limiter`: Introduce a `memory_limiter` extension which receivers can use to reject incoming requests when collector doesn't have enough memory ([#​8632](https://togithub.com/open-telemetry/opentelemetry-collector/issues/8632)) The extension has the same configuration interface and behavior as the existing `memory_limiter` processor, which potentially can be deprecated and removed in the future ##### 💡 Enhancements 💡 - `configtls`: add `cipher_suites` to configtls. ([#​8105](https://togithub.com/open-telemetry/opentelemetry-collector/issues/8105)) Users can specify a list of cipher suites to pick from. If left blank, a safe default list is used. - `service`: mark `telemetry.useOtelForInternalMetrics` as stable ([#​816](https://togithub.com/open-telemetry/opentelemetry-collector/issues/816)) - `exporters`: Cleanup log messages for export failures ([#​9219](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9219)) 1. Ensure an error message is logged every time and only once when data is dropped/rejected due to export failure. 2. Update the wording. Specifically, don't use "dropped" term when an error is reported back to the pipeline. Keep the "dropped" wording for failures happened after the enabled queue. 3. Properly report any error reported by a queue. For example, a persistent storage error must be reported as a storage error, not as "queue overflow". ##### 🧰 Bug fixes 🧰 - `configgrpc`: Update dependency to address a potential crash in the grpc instrumentation ([#​9296](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9296)) - `otlpreceiver`: Ensure OTLP receiver handles consume errors correctly ([#​4335](https://togithub.com/open-telemetry/opentelemetry-collector/issues/4335)) Make sure OTLP receiver returns correct status code and follows the receiver contract (gRPC) - `zpagesextension`: Remove mention of rpcz page from zpages extension ([#​9328](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9328))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update module google.golang.org/grpc to v1.61.0 (#9425) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google.golang.org/grpc](https://togithub.com/grpc/grpc-go) | `v1.60.1` -> `v1.61.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/google.golang.org%2fgrpc/v1.61.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/google.golang.org%2fgrpc/v1.61.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/google.golang.org%2fgrpc/v1.60.1/v1.61.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/google.golang.org%2fgrpc/v1.60.1/v1.61.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
grpc/grpc-go (google.golang.org/grpc) ### [`v1.61.0`](https://togithub.com/grpc/grpc-go/releases/tag/v1.61.0): Release 1.61.0 [Compare Source](https://togithub.com/grpc/grpc-go/compare/v1.60.1...v1.61.0) ### New Features - resolver: provide method, `AuthorityOverrider`, to allow resolver.Builders to override the default authority for a `ClientConn`. (EXPERIMENTAL) ([#​6752](https://togithub.com/grpc/grpc-go/issues/6752)) - Special Thanks: [@​Aditya-Sood](https://togithub.com/Aditya-Sood) - xds: add support for mTLS Credentials in xDS bootstrap ([gRFC A65](github.com/grpc/proposal/blob/8c31bfedded5f0a51c4933e9e9a8246122f9c41a/A65-xds-mtls-creds-in-bootstrap.md)) ([#​6757](https://togithub.com/grpc/grpc-go/issues/6757)) - Special Thanks: [@​atollena](https://togithub.com/atollena) - server: add `grpc.WaitForHandlers` `ServerOption` to cause `Server.Stop` to block until method handlers return. (EXPERIMENTAL) ([#​6922](https://togithub.com/grpc/grpc-go/issues/6922)) ### Performance Improvements - grpc: skip compression of empty messages as an optimization ([#​6842](https://togithub.com/grpc/grpc-go/issues/6842)) - Special Thanks: [@​jroper](https://togithub.com/jroper) - orca: use atomic pointer to improve performance in server metrics recorder ([#​6799](https://togithub.com/grpc/grpc-go/issues/6799)) - Special Thanks: [@​danielzhaotongliu](https://togithub.com/danielzhaotongliu) ### Bug Fixes - client: correctly enable TCP keepalives with OS defaults on windows ([#​6863](https://togithub.com/grpc/grpc-go/issues/6863)) - Special Thanks: [@​mmatczuk](https://togithub.com/mmatczuk) - server: change some stream operations to return `UNAVAILABLE` instead of `UNKNOWN` when underlying connection is broken ([#​6891](https://togithub.com/grpc/grpc-go/issues/6891)) - Special Thanks: [@​mustafasen81](https://togithub.com/mustafasen81) - server: fix `GracefulStop` to block until all method handlers return (v1.60 regression). ([#​6922](https://togithub.com/grpc/grpc-go/issues/6922)) - server: fix two bugs that could lead to panics at shutdown when using [`NumStreamWorkers`](https://pkg.go.dev/google.golang.org/grpc#NumStreamWorkers) (EXPERIMENTAL). ([#​6856](https://togithub.com/grpc/grpc-go/issues/6856)) - reflection: do not send invalid descriptors to clients for files that cannot be fully resolved ([#​6771](https://togithub.com/grpc/grpc-go/issues/6771)) - Special Thanks: [@​jhump](https://togithub.com/jhump) - xds: don't fail channel/server startup when xds creds is specified, but bootstrap is missing certificate providers ([#​6848](https://togithub.com/grpc/grpc-go/issues/6848)) - xds: Atomically read and write xDS security configuration client side ([#​6796](https://togithub.com/grpc/grpc-go/issues/6796)) - xds/server: fix RDS handling for non-inline route configs ([#​6915](https://togithub.com/grpc/grpc-go/issues/6915))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update module github.com/klauspost/compress to v1.17.5 (#9419) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/klauspost/compress](https://togithub.com/klauspost/compress) | `v1.17.4` -> `v1.17.5` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fklauspost%2fcompress/v1.17.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fklauspost%2fcompress/v1.17.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fklauspost%2fcompress/v1.17.4/v1.17.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fklauspost%2fcompress/v1.17.4/v1.17.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
klauspost/compress (github.com/klauspost/compress) ### [`v1.17.5`](https://togithub.com/klauspost/compress/releases/tag/v1.17.5) [Compare Source](https://togithub.com/klauspost/compress/compare/v1.17.4...v1.17.5) #### What's Changed - flate: Fix reset with dictionary on custom window encodes by [@​klauspost](https://togithub.com/klauspost) in [https://github.com/klauspost/compress/pull/912](https://togithub.com/klauspost/compress/pull/912) - zstd: Limit better/best default window to 8MB by [@​klauspost](https://togithub.com/klauspost) in [https://github.com/klauspost/compress/pull/913](https://togithub.com/klauspost/compress/pull/913) - zstd: Shorter and faster asm for decSymbol.newState by [@​greatroar](https://togithub.com/greatroar) in [https://github.com/klauspost/compress/pull/896](https://togithub.com/klauspost/compress/pull/896) - zstd: Add Frame header encoding and stripping by [@​klauspost](https://togithub.com/klauspost) in [https://github.com/klauspost/compress/pull/908](https://togithub.com/klauspost/compress/pull/908) - zstd: Tweak noasm FSE decoder by [@​greatroar](https://togithub.com/greatroar) in [https://github.com/klauspost/compress/pull/910](https://togithub.com/klauspost/compress/pull/910) - s2: Fix callbacks for skippable blocks and disallow 0xfe (Padding) for custom use by [@​Jille](https://togithub.com/Jille) in [https://github.com/klauspost/compress/pull/916](https://togithub.com/klauspost/compress/pull/916) - s2: Fix incorrect length encoded by writer.AddSkippableBlock by [@​Jille](https://togithub.com/Jille) in [https://github.com/klauspost/compress/pull/917](https://togithub.com/klauspost/compress/pull/917) - s2: Fix up AddSkippableBlock more by [@​klauspost](https://togithub.com/klauspost) in [https://github.com/klauspost/compress/pull/919](https://togithub.com/klauspost/compress/pull/919) - s2: Document and test how to peek the stream for skippable blocks by [@​Jille](https://togithub.com/Jille) in [https://github.com/klauspost/compress/pull/918](https://togithub.com/klauspost/compress/pull/918) - internal/race,s2: add some race instrumentation by [@​egonelbre](https://togithub.com/egonelbre) in [https://github.com/klauspost/compress/pull/903](https://togithub.com/klauspost/compress/pull/903) - build(deps): bump the github-actions group with 4 updates by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/klauspost/compress/pull/900](https://togithub.com/klauspost/compress/pull/900) - CI: Hash pin sensitive actions and configure Dependabot to automatically update them by [@​diogoteles08](https://togithub.com/diogoteles08) in [https://github.com/klauspost/compress/pull/899](https://togithub.com/klauspost/compress/pull/899) - Update generator and executable go.mod by [@​klauspost](https://togithub.com/klauspost) in [https://github.com/klauspost/compress/pull/904](https://togithub.com/klauspost/compress/pull/904) - Update README.md by [@​pelenium](https://togithub.com/pelenium) in [https://github.com/klauspost/compress/pull/905](https://togithub.com/klauspost/compress/pull/905) - build(deps): bump the github-actions group with 1 update by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/klauspost/compress/pull/906](https://togithub.com/klauspost/compress/pull/906) #### New Contributors - [@​pelenium](https://togithub.com/pelenium) made their first contribution in [https://github.com/klauspost/compress/pull/905](https://togithub.com/klauspost/compress/pull/905) - [@​Jille](https://togithub.com/Jille) made their first contribution in [https://github.com/klauspost/compress/pull/916](https://togithub.com/klauspost/compress/pull/916) **Full Changelog**: https://github.com/klauspost/compress/compare/v1.17.4...v1.17.5
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [service] Move TracerProvider initialization to service/telemetry package (#9384) Second redo of https://github.com/open-telemetry/opentelemetry-collector/pull/8171 that does not depend on https://github.com/open-telemetry/opentelemetry-collector/pull/9131 Link to tracking Issue: Updates https://github.com/open-telemetry/opentelemetry-collector/issues/8170 --------- Co-authored-by: Alex Boten * Update module go.opentelemetry.io/collector/exporter/otlpexporter to v0.93.0 (#9422) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/collector/exporter/otlpexporter](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.92.0` -> `v0.93.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.93.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.93.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.92.0/v0.93.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.92.0/v0.93.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/exporter/otlpexporter) ### [`v0.93.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v0930) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.92.0...v0.93.0) ##### 🛑 Breaking changes 🛑 - `exporterhelper`: remove deprecated exporterhelper.RetrySettings and exporterhelper.NewDefaultRetrySettings ([#​9256](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9256)) - `configopaque`: configopaque.String implements `fmt.Stringer` and `fmt.GoStringer`, outputting \[REDACTED] when formatted with the %s, %q or %#v verbs`(#​9213) This may break applications that rely on the previous behavior of opaque strings with`fmt.Sprintf`to e.g. build URLs or headers. Explicitly cast the opaque string to a string before using it in`fmt.Sprintf\` to restore the previous behavior. ##### 🚀 New components 🚀 - `extension/memory_limiter`: Introduce a `memory_limiter` extension which receivers can use to reject incoming requests when collector doesn't have enough memory ([#​8632](https://togithub.com/open-telemetry/opentelemetry-collector/issues/8632)) The extension has the same configuration interface and behavior as the existing `memory_limiter` processor, which potentially can be deprecated and removed in the future ##### 💡 Enhancements 💡 - `configtls`: add `cipher_suites` to configtls. ([#​8105](https://togithub.com/open-telemetry/opentelemetry-collector/issues/8105)) Users can specify a list of cipher suites to pick from. If left blank, a safe default list is used. - `service`: mark `telemetry.useOtelForInternalMetrics` as stable ([#​816](https://togithub.com/open-telemetry/opentelemetry-collector/issues/816)) - `exporters`: Cleanup log messages for export failures ([#​9219](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9219)) 1. Ensure an error message is logged every time and only once when data is dropped/rejected due to export failure. 2. Update the wording. Specifically, don't use "dropped" term when an error is reported back to the pipeline. Keep the "dropped" wording for failures happened after the enabled queue. 3. Properly report any error reported by a queue. For example, a persistent storage error must be reported as a storage error, not as "queue overflow". ##### 🧰 Bug fixes 🧰 - `configgrpc`: Update dependency to address a potential crash in the grpc instrumentation ([#​9296](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9296)) - `otlpreceiver`: Ensure OTLP receiver handles consume errors correctly ([#​4335](https://togithub.com/open-telemetry/opentelemetry-collector/issues/4335)) Make sure OTLP receiver returns correct status code and follows the receiver contract (gRPC) - `zpagesextension`: Remove mention of rpcz page from zpages extension ([#​9328](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9328))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Alex Boten * Update github-actions deps (#9420) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/checkout](https://togithub.com/actions/checkout) | action | minor | `v3.1.0` -> `v3.6.0` | | [actions/upload-artifact](https://togithub.com/actions/upload-artifact) | action | patch | `v3.1.0` -> `v3.1.3` | | [github/codeql-action](https://togithub.com/github/codeql-action) | action | minor | `v2.2.4` -> `v2.23.2` | | [github/codeql-action](https://togithub.com/github/codeql-action) | action | patch | `v3.23.1` -> `v3.23.2` | | [ossf/scorecard-action](https://togithub.com/ossf/scorecard-action) | action | minor | `v2.1.2` -> `v2.3.1` | --- ### Release Notes
actions/checkout (actions/checkout) ### [`v3.6.0`](https://togithub.com/actions/checkout/blob/HEAD/CHANGELOG.md#v360) [Compare Source](https://togithub.com/actions/checkout/compare/v3.5.3...v3.6.0) - [Fix: Mark test scripts with Bash'isms to be run via Bash](https://togithub.com/actions/checkout/pull/1377) - [Add option to fetch tags even if fetch-depth > 0](https://togithub.com/actions/checkout/pull/579) ### [`v3.5.3`](https://togithub.com/actions/checkout/blob/HEAD/CHANGELOG.md#v353) [Compare Source](https://togithub.com/actions/checkout/compare/v3.5.2...v3.5.3) - [Fix: Checkout fail in self-hosted runners when faulty submodule are checked-in](https://togithub.com/actions/checkout/pull/1196) - [Fix typos found by codespell](https://togithub.com/actions/checkout/pull/1287) - [Add support for sparse checkouts](https://togithub.com/actions/checkout/pull/1369) ### [`v3.5.2`](https://togithub.com/actions/checkout/blob/HEAD/CHANGELOG.md#v352) [Compare Source](https://togithub.com/actions/checkout/compare/v3.5.1...v3.5.2) - [Fix api endpoint for GHES](https://togithub.com/actions/checkout/pull/1289) ### [`v3.5.1`](https://togithub.com/actions/checkout/blob/HEAD/CHANGELOG.md#v351) [Compare Source](https://togithub.com/actions/checkout/compare/v3.5.0...v3.5.1) - [Fix slow checkout on Windows](https://togithub.com/actions/checkout/pull/1246) ### [`v3.5.0`](https://togithub.com/actions/checkout/blob/HEAD/CHANGELOG.md#v350) [Compare Source](https://togithub.com/actions/checkout/compare/v3.4.0...v3.5.0) - [Add new public key for known_hosts](https://togithub.com/actions/checkout/pull/1237) ### [`v3.4.0`](https://togithub.com/actions/checkout/blob/HEAD/CHANGELOG.md#v340) [Compare Source](https://togithub.com/actions/checkout/compare/v3.3.0...v3.4.0) - [Upgrade codeql actions to v2](https://togithub.com/actions/checkout/pull/1209) - [Upgrade dependencies](https://togithub.com/actions/checkout/pull/1210) - [Upgrade @​actions/io](https://togithub.com/actions/checkout/pull/1225) ### [`v3.3.0`](https://togithub.com/actions/checkout/blob/HEAD/CHANGELOG.md#v330) [Compare Source](https://togithub.com/actions/checkout/compare/v3.2.0...v3.3.0) - [Implement branch list using callbacks from exec function](https://togithub.com/actions/checkout/pull/1045) - [Add in explicit reference to private checkout options](https://togithub.com/actions/checkout/pull/1050) - [Fix comment typos (that got added in #​770)](https://togithub.com/actions/checkout/pull/1057) ### [`v3.2.0`](https://togithub.com/actions/checkout/blob/HEAD/CHANGELOG.md#v320) [Compare Source](https://togithub.com/actions/checkout/compare/v3.1.0...v3.2.0) - [Add GitHub Action to perform release](https://togithub.com/actions/checkout/pull/942) - [Fix status badge](https://togithub.com/actions/checkout/pull/967) - [Replace datadog/squid with ubuntu/squid Docker image](https://togithub.com/actions/checkout/pull/1002) - [Wrap pipeline commands for submoduleForeach in quotes](https://togithub.com/actions/checkout/pull/964) - [Update @​actions/io to 1.1.2](https://togithub.com/actions/checkout/pull/1029) - [Upgrading version to 3.2.0](https://togithub.com/actions/checkout/pull/1039)
actions/upload-artifact (actions/upload-artifact) ### [`v3.1.3`](https://togithub.com/actions/upload-artifact/releases/tag/v3.1.3) [Compare Source](https://togithub.com/actions/upload-artifact/compare/v3.1.2...v3.1.3) #### What's Changed - chore(github): remove trailing whitespaces by [@​ljmf00](https://togithub.com/ljmf00) in [https://github.com/actions/upload-artifact/pull/313](https://togithub.com/actions/upload-artifact/pull/313) - Bump [@​actions/artifact](https://togithub.com/actions/artifact) version to v1.1.2 by [@​bethanyj28](https://togithub.com/bethanyj28) in [https://github.com/actions/upload-artifact/pull/436](https://togithub.com/actions/upload-artifact/pull/436) **Full Changelog**: https://github.com/actions/upload-artifact/compare/v3...v3.1.3 ### [`v3.1.2`](https://togithub.com/actions/upload-artifact/releases/tag/v3.1.2) [Compare Source](https://togithub.com/actions/upload-artifact/compare/v3.1.1...v3.1.2) - Update all `@actions/*` NPM packages to their latest versions- [#​374](https://togithub.com/actions/upload-artifact/issues/374) - Update all dev dependencies to their most recent versions - [#​375](https://togithub.com/actions/upload-artifact/issues/375) ### [`v3.1.1`](https://togithub.com/actions/upload-artifact/releases/tag/v3.1.1) [Compare Source](https://togithub.com/actions/upload-artifact/compare/v3.1.0...v3.1.1) - Update actions/core package to latest version to remove `set-output` deprecation warning [#​351](https://togithub.com/actions/upload-artifact/issues/351)
github/codeql-action (github/codeql-action) ### [`v2.23.2`](https://togithub.com/github/codeql-action/compare/v2.23.1...v2.23.2) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.23.1...v2.23.2) ### [`v2.23.1`](https://togithub.com/github/codeql-action/compare/v2.23.0...v2.23.1) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.23.0...v2.23.1) ### [`v2.23.0`](https://togithub.com/github/codeql-action/compare/v2.22.12...v2.23.0) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.22.12...v2.23.0) ### [`v2.22.12`](https://togithub.com/github/codeql-action/compare/v2.22.11...v2.22.12) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.22.11...v2.22.12) ### [`v2.22.11`](https://togithub.com/github/codeql-action/compare/v2.22.10...v2.22.11) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.22.10...v2.22.11) ### [`v2.22.10`](https://togithub.com/github/codeql-action/compare/v2.22.9...v2.22.10) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.22.9...v2.22.10) ### [`v2.22.9`](https://togithub.com/github/codeql-action/compare/v2.22.8...v2.22.9) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.22.8...v2.22.9) ### [`v2.22.8`](https://togithub.com/github/codeql-action/compare/v2.22.7...v2.22.8) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.22.7...v2.22.8) ### [`v2.22.7`](https://togithub.com/github/codeql-action/compare/v2.22.6...v2.22.7) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.22.6...v2.22.7) ### [`v2.22.6`](https://togithub.com/github/codeql-action/compare/v2.22.5...v2.22.6) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.22.5...v2.22.6) ### [`v2.22.5`](https://togithub.com/github/codeql-action/compare/v2.22.4...v2.22.5) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.22.4...v2.22.5) ### [`v2.22.4`](https://togithub.com/github/codeql-action/compare/v2.22.3...v2.22.4) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.22.3...v2.22.4) ### [`v2.22.3`](https://togithub.com/github/codeql-action/compare/v2.22.2...v2.22.3) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.22.2...v2.22.3) ### [`v2.22.2`](https://togithub.com/github/codeql-action/compare/v2.22.1...v2.22.2) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.22.1...v2.22.2) ### [`v2.22.1`](https://togithub.com/github/codeql-action/compare/v2.22.0...v2.22.1) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.22.0...v2.22.1) ### [`v2.22.0`](https://togithub.com/github/codeql-action/compare/v2.21.9...v2.22.0) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.21.9...v2.22.0) ### [`v2.21.9`](https://togithub.com/github/codeql-action/compare/v2.21.8...v2.21.9) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.21.8...v2.21.9) ### [`v2.21.8`](https://togithub.com/github/codeql-action/compare/v2.21.7...v2.21.8) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.21.7...v2.21.8) ### [`v2.21.7`](https://togithub.com/github/codeql-action/compare/v2.21.6...v2.21.7) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.21.6...v2.21.7) ### [`v2.21.6`](https://togithub.com/github/codeql-action/compare/v2.21.5...v2.21.6) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.21.5...v2.21.6) ### [`v2.21.5`](https://togithub.com/github/codeql-action/compare/v2.21.4...v2.21.5) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.21.4...v2.21.5) ### [`v2.21.4`](https://togithub.com/github/codeql-action/compare/v2.21.3...v2.21.4) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.21.3...v2.21.4) ### [`v2.21.3`](https://togithub.com/github/codeql-action/compare/v2.21.2...v2.21.3) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.21.2...v2.21.3) ### [`v2.21.2`](https://togithub.com/github/codeql-action/compare/v2.21.1...v2.21.2) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.21.1...v2.21.2) ### [`v2.21.1`](https://togithub.com/github/codeql-action/compare/v2.21.0...v2.21.1) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.21.0...v2.21.1) ### [`v2.21.0`](https://togithub.com/github/codeql-action/compare/v2.20.4...v2.21.0) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.20.4...v2.21.0) ### [`v2.20.4`](https://togithub.com/github/codeql-action/compare/v2.20.3...v2.20.4) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.20.3...v2.20.4) ### [`v2.20.3`](https://togithub.com/github/codeql-action/compare/v2.20.2...v2.20.3) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.20.2...v2.20.3) ### [`v2.20.2`](https://togithub.com/github/codeql-action/compare/v2.20.1...v2.20.2) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.20.1...v2.20.2) ### [`v2.20.1`](https://togithub.com/github/codeql-action/compare/v2.20.0...v2.20.1) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.20.0...v2.20.1) ### [`v2.20.0`](https://togithub.com/github/codeql-action/compare/v2.3.6...v2.20.0) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.3.6...v2.20.0) ### [`v2.3.6`](https://togithub.com/github/codeql-action/compare/v2.3.5...v2.3.6) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.3.5...v2.3.6) ### [`v2.3.5`](https://togithub.com/github/codeql-action/compare/v2.3.4...v2.3.5) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.3.4...v2.3.5) ### [`v2.3.4`](https://togithub.com/github/codeql-action/compare/v2.3.3...v2.3.4) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.3.3...v2.3.4) ### [`v2.3.3`](https://togithub.com/github/codeql-action/compare/v2.3.2...v2.3.3) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.3.2...v2.3.3) ### [`v2.3.2`](https://togithub.com/github/codeql-action/compare/v2.3.1...v2.3.2) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.3.1...v2.3.2) ### [`v2.3.1`](https://togithub.com/github/codeql-action/compare/v2.3.0...v2.3.1) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.3.0...v2.3.1) ### [`v2.3.0`](https://togithub.com/github/codeql-action/compare/v2.2.12...v2.3.0) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.2.12...v2.3.0) ### [`v2.2.12`](https://togithub.com/github/codeql-action/compare/v2.2.11...v2.2.12) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.2.11...v2.2.12) ### [`v2.2.11`](https://togithub.com/github/codeql-action/compare/v2.2.10...v2.2.11) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.2.10...v2.2.11) ### [`v2.2.10`](https://togithub.com/github/codeql-action/compare/v2.2.9...v2.2.10) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.2.9...v2.2.10) ### [`v2.2.9`](https://togithub.com/github/codeql-action/compare/v2.2.8...v2.2.9) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.2.8...v2.2.9) ### [`v2.2.8`](https://togithub.com/github/codeql-action/compare/v2.2.7...v2.2.8) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.2.7...v2.2.8) ### [`v2.2.7`](https://togithub.com/github/codeql-action/compare/v2.2.6...v2.2.7) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.2.6...v2.2.7) ### [`v2.2.6`](https://togithub.com/github/codeql-action/compare/v2.2.5...v2.2.6) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.2.5...v2.2.6) ### [`v2.2.5`](https://togithub.com/github/codeql-action/compare/v2.2.4...v2.2.5) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.2.4...v2.2.5)
ossf/scorecard-action (ossf/scorecard-action) ### [`v2.3.1`](https://togithub.com/ossf/scorecard-action/releases/tag/v2.3.1) [Compare Source](https://togithub.com/ossf/scorecard-action/compare/v2.3.0...v2.3.1) #### What's Changed - :seedling: Bump github.com/ossf/scorecard/v4 from v4.13.0 to v4.13.1 by [@​spencerschrock](https://togithub.com/spencerschrock) in [https://github.com/ossf/scorecard-action/pull/1282](https://togithub.com/ossf/scorecard-action/pull/1282) - Adds additional Fuzzing detection and fixes a SAST bug related to detecting CodeQL. For a full changelist of what this includes, see the [v4.13.1](https://togithub.com/ossf/scorecard/releases/tag/v4.13.1) release notes **Full Changelog**: https://github.com/ossf/scorecard-action/compare/v2.3.0...v2.3.1 ### [`v2.3.0`](https://togithub.com/ossf/scorecard-action/releases/tag/v2.3.0) [Compare Source](https://togithub.com/ossf/scorecard-action/compare/v2.2.0...v2.3.0) #### What's Changed - :seedling: Bump github.com/ossf/scorecard/v4 from v4.11.0 to v4.13.0 by [@​spencerschrock](https://togithub.com/spencerschrock) in [https://github.com/ossf/scorecard-action/pull/1270](https://togithub.com/ossf/scorecard-action/pull/1270) - For a full changelist of what this includes, see the [v4.12.0](https://togithub.com/ossf/scorecard/releases/tag/v4.12.0) and [v4.13.0](https://togithub.com/ossf/scorecard/releases/tag/v4.13.0) release notes - :sparkles: Send rekor tlog index to webapp when publishing results by [@​spencerschrock](https://togithub.com/spencerschrock) in [https://github.com/ossf/scorecard-action/pull/1169](https://togithub.com/ossf/scorecard-action/pull/1169) - :bug: Prevent url clipping for GHES instances by [@​rajbos](https://togithub.com/rajbos) in [https://github.com/ossf/scorecard-action/pull/1225](https://togithub.com/ossf/scorecard-action/pull/1225) ##### Documentation - :book: Update access rights needed to see the results in code scanning by [@​rajbos](https://togithub.com/rajbos) in [https://github.com/ossf/scorecard-action/pull/1229](https://togithub.com/ossf/scorecard-action/pull/1229) - :book: Add package comments. by [@​spencerschrock](https://togithub.com/spencerschrock) in [https://github.com/ossf/scorecard-action/pull/1221](https://togithub.com/ossf/scorecard-action/pull/1221) - :book: Add SECURITY.md file by [@​david-a-wheeler](https://togithub.com/david-a-wheeler) in [https://github.com/ossf/scorecard-action/pull/1250](https://togithub.com/ossf/scorecard-action/pull/1250) - :book: Fix typo in token input docs by [@​aabouzaid](https://togithub.com/aabouzaid) in [https://github.com/ossf/scorecard-action/pull/1258](https://togithub.com/ossf/scorecard-action/pull/1258) #### New Contributors - [@​david-a-wheeler](https://togithub.com/david-a-wheeler) made their first contribution in [https://github.com/ossf/scorecard-action/pull/1250](https://togithub.com/ossf/scorecard-action/pull/1250) - [@​aabouzaid](https://togithub.com/aabouzaid) made their first contribution in [https://github.com/ossf/scorecard-action/pull/1258](https://togithub.com/ossf/scorecard-action/pull/1258) **Full Changelog**: https://github.com/ossf/scorecard-action/compare/v2.2.0...v2.3.0 ### [`v2.2.0`](https://togithub.com/ossf/scorecard-action/releases/tag/v2.2.0) [Compare Source](https://togithub.com/ossf/scorecard-action/compare/v2.1.3...v2.2.0) #### What's Changed - :seedling: Bump github.com/ossf/scorecard/v4 from v4.10.5 to v4.11.0 by [@​spencerschrock](https://togithub.com/spencerschrock) in [https://github.com/ossf/scorecard-action/pull/1192](https://togithub.com/ossf/scorecard-action/pull/1192) #### Scorecard Result Viewer Thanks to contributions from [@​cynthia-sg](https://togithub.com/cynthia-sg) and [@​tegioz](https://togithub.com/tegioz) at [CLOMonitor](https://togithub.com/cncf/clomonitor), there is a new Scorecard Result visualization page at `https://securityscorecards.dev/viewer/?uri=`. - [https://github.com/ossf/scorecard-webapp/pull/406](https://togithub.com/ossf/scorecard-webapp/pull/406) - [https://github.com/ossf/scorecard-webapp/pull/422](https://togithub.com/ossf/scorecard-webapp/pull/422) As an example, you can see our own score visualized [here](https://securityscorecards.dev/viewer/?uri=github.com/ossf/scorecard) Checkout our [README](https://togithub.com/ossf/scorecard-action/blob/08b4669551908b1024bb425080c797723083c031/README.md#scorecard-badge) to learn how to link your README badge to the new visualization page. #### Publishing Results This release contains two fixes which will improve the user experience when `publish_results` is `true` - Runs that fail our [workflow restrictions](https://togithub.com/ossf/scorecard-action/blob/08b4669551908b1024bb425080c797723083c031/README.md#workflow-restrictions) will fail with a 400 response indicating the problem, instead of a vague 500 status. ([https://github.com/ossf/scorecard-action/pull/1156](https://togithub.com/ossf/scorecard-action/pull/1156), resolved [https://github.com/ossf/scorecard-action/issues/1150](https://togithub.com/ossf/scorecard-action/issues/1150)) - Scorecard action will retry when signing results and submitting them to our web API. This should help with flakiness from connection failures. ([https://github.com/ossf/scorecard-action/pull/1191](https://togithub.com/ossf/scorecard-action/pull/1191)) #### Docs - 📖 Update README to accept fine-grained tokens by [@​pnacht](https://togithub.com/pnacht) in [https://github.com/ossf/scorecard-action/pull/1175](https://togithub.com/ossf/scorecard-action/pull/1175) - 📖 Update installation instructions to match current GitHub UI by [@​joycebrum](https://togithub.com/joycebrum) in [https://github.com/ossf/scorecard-action/pull/1153](https://togithub.com/ossf/scorecard-action/pull/1153) - 📖 Document the GitHub action workflow restrictions when publishing results. by [@​spencerschrock](https://togithub.com/spencerschrock) in #### New Contributors - [@​bobcallaway](https://togithub.com/bobcallaway) made their first contribution in [https://github.com/ossf/scorecard-action/pull/1140](https://togithub.com/ossf/scorecard-action/pull/1140) - [@​pnacht](https://togithub.com/pnacht) made their first contribution in [https://github.com/ossf/scorecard-action/pull/1175](https://togithub.com/ossf/scorecard-action/pull/1175) **Full Changelog**: https://github.com/ossf/scorecard-action/compare/v2.1.3...v2.2.0 ### [`v2.1.3`](https://togithub.com/ossf/scorecard-action/releases/tag/v2.1.3) [Compare Source](https://togithub.com/ossf/scorecard-action/compare/v2.1.2...v2.1.3) #### What's Changed - 🌱 Bump github.com/ossf/scorecard/v4 from 4.10.2 to 4.10.5 by [@​spencerschrock](https://togithub.com/spencerschrock) in [https://github.com/ossf/scorecard-action/pull/1111](https://togithub.com/ossf/scorecard-action/pull/1111) ##### Bug Fixes - Invalid SARIF files from a bug in scorecard - [#​1076](https://togithub.com/ossf/scorecard-action/issues/1076), [#​1094](https://togithub.com/ossf/scorecard-action/issues/1094) - Vulnerabilities check crashes if a vulnerable dependency is found via OSVScanner - [#​1092](https://togithub.com/ossf/scorecard-action/issues/1092) - Scorecard action not reporting binary artifacts in the repo - [#​1116](https://togithub.com/ossf/scorecard-action/issues/1116) **Full Scorecard Changelog**: https://github.com/ossf/scorecard/compare/v4.10.2...v4.10.5 **Full Changelog**: https://github.com/ossf/scorecard-action/compare/v2.1.2...v2.1.3
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Alex Boten * [chore] remove unused opencensus code (#9108) Follows https://github.com/open-telemetry/opentelemetry-collector/pull/9102 --------- Signed-off-by: Alex Boten * Update module go.opentelemetry.io/collector/exporter/otlphttpexporter to v0.93.0 (#9423) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/collector/exporter/otlphttpexporter](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.92.0` -> `v0.93.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.93.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.93.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.92.0/v0.93.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.92.0/v0.93.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/exporter/otlphttpexporter) ### [`v0.93.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v0930) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.92.0...v0.93.0) ##### 🛑 Breaking changes 🛑 - `exporterhelper`: remove deprecated exporterhelper.RetrySettings and exporterhelper.NewDefaultRetrySettings ([#​9256](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9256)) - `configopaque`: configopaque.String implements `fmt.Stringer` and `fmt.GoStringer`, outputting \[REDACTED] when formatted with the %s, %q or %#v verbs`(#​9213) This may break applications that rely on the previous behavior of opaque strings with`fmt.Sprintf`to e.g. build URLs or headers. Explicitly cast the opaque string to a string before using it in`fmt.Sprintf\` to restore the previous behavior. ##### 🚀 New components 🚀 - `extension/memory_limiter`: Introduce a `memory_limiter` extension which receivers can use to reject incoming requests when collector doesn't have enough memory ([#​8632](https://togithub.com/open-telemetry/opentelemetry-collector/issues/8632)) The extension has the same configuration interface and behavior as the existing `memory_limiter` processor, which potentially can be deprecated and removed in the future ##### 💡 Enhancements 💡 - `configtls`: add `cipher_suites` to configtls. ([#​8105](https://togithub.com/open-telemetry/opentelemetry-collector/issues/8105)) Users can specify a list of cipher suites to pick from. If left blank, a safe default list is used. - `service`: mark `telemetry.useOtelForInternalMetrics` as stable ([#​816](https://togithub.com/open-telemetry/opentelemetry-collector/issues/816)) - `exporters`: Cleanup log messages for export failures ([#​9219](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9219)) 1. Ensure an error message is logged every time and only once when data is dropped/rejected due to export failure. 2. Update the wording. Specifically, don't use "dropped" term when an error is reported back to the pipeline. Keep the "dropped" wording for failures happened after the enabled queue. 3. Properly report any error reported by a queue. For example, a persistent storage error must be reported as a storage error, not as "queue overflow". ##### 🧰 Bug fixes 🧰 - `configgrpc`: Update dependency to address a potential crash in the grpc instrumentation ([#​9296](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9296)) - `otlpreceiver`: Ensure OTLP receiver handles consume errors correctly ([#​4335](https://togithub.com/open-telemetry/opentelemetry-collector/issues/4335)) Make sure OTLP receiver returns correct status code and follows the receiver contract (gRPC) - `zpagesextension`: Remove mention of rpcz page from zpages extension ([#​9328](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9328))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * [confighttp] move implementation checks to test files (#9433) move implementation checks to test files #9431 * [configtelemetry] move implementation checks to test files (#9432) **Description:** move implementation checks to test files **Link to tracking Issue:** #9431 * [chore][config/configopaque] Move implementation checks to test files (#9430) **Description:** Move implementation checks to test files. Reduces dependencies of the configopaque package. * [chore] Clarify timeline strictness in stabilization issues. (#9378) * [mdatagen] add generated test to check config struct (#9438) **Description:** Add a generated test that checks the config struct using `componenttest.CheckConfigStruct`. * Parallelizing contrib check (#9449) **Description:** Implements a job matrix for the contrib checks. If we think it would be worth it, we could add a setup job to download the repo only 1 time. **Link to tracking Issue:** Related to https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30880 * [confmap] Pass ConverterSettings and ProviderSettings to converters and providers (#9443) **Description:** For both #5615 and #9162 we need to be able to log during the confmap resolution. My proposed solution is to pass a `*zap.Logger` to converters and providers during initialization. These components can then use this to log any warnings they need. This PR does the first step: being able to pass anything to converters and providers during initialization. The obvious alternative to this is to change the interface of `confmap.Provider` and `confmap.Converter` to pass any warnings in an explicit struct. I think the `*zap.Logger` alternative is more natural for developers of providers and converters: you just use a logger like everywhere else in the Collector. One problem for the Collector usage of `confmap` is: How does one pass a `*zap.Logger` before knowing how a `*zap.Logger` should be configured? I think we can work around this by: 1. Passing a special 'deferred' Logger that just stores the warnings without actually logging them (we can use something like `zaptest/observer` for this) 2. Resolving configuration 3. Building a `*zap.Logger` with said configuration 4. Logging the entries stored in (1) with the logger from (3) (using `zaptest/observer` we can do that by taking the `zapcore.Core` out of the logger and manually writing) **We don't actually need ProviderSettings today, just ConverterSettings, but I think it can still be useful.** **Link to tracking Issue:** Relates to #5615 and #9162 --------- Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com> * Add enumeration expectations (#9447) **Description:** Adds expectations for how the repository handle enumerations **Link to tracking Issue:** Relates to https://github.com/open-telemetry/opentelemetry-collector/issues/9388 * [configopaque, confmap] Change yaml test by confmap test (#9442) **Description:** - Remove yaml test from configopaque - Add test in confmap testing `configopaque` **Link to tracking Issue:** From discussion on #9427 * [configcompression] make `IsCompressed` a member function (#9435) **Description:** Updates `IsCompressed` to be a member function. **Link to tracking Issue:** Closes https://github.com/open-telemetry/opentelemetry-collector/issues/9434 --------- Co-authored-by: Bogdan Drutu Co-authored-by: Pablo Baeyens * [receiver/otlp] Switch from InvalidArgument to Internal (#9415) The otlp receiver was recently updated via https://github.com/open-telemetry/opentelemetry-collector/pull/8080 to properly propagate consumer errors back to clients as either permanent or retriable. The code we're using to indicate a non-retriable error is `codes.InvalidArgument`, which is the equivalent of `400` in HTTP. While 100% correct according to the [OTLP specification](https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specification.md#failures) to indicate a non-retriable error, I think `codes.Internal` (which is equivalent to HTTP `500`), better conveys the actual state of the collector in these situations. Related to https://github.com/open-telemetry/opentelemetry-collector/pull/9357#discussion_r1467011281 --------- Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com> * [chore] Update groups (#9450) We'll need this if https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/30901 is merged * [chore] Use `grep -E` in root Makefile to fix warning (#9445) This removes a warning on recent GNU grep versions, but also works on other grep implementations. Contrib already is using the `-E` flag. * [chore] update mdatagen with latest changes from contrib (#9436) Update mdatagen with a few changes that happened in contrib, ahead of deleting mdatagen from contrib. --------- Co-authored-by: Alex Boten Co-authored-by: Alex Boten * [configgrpc] Deprecate GRPCServerSettings, use ServerConfig instead (#9403) **Description:** Deprecate GRPCServerSettings, use ~GRPC~ServerConfig instead **Link to tracking Issue:** #6767 * [chore] [pdata] update comments to make it clear which functions panic (#9107) **Description:** This updates comments and adds tests based on https://github.com/open-telemetry/opentelemetry-collector/issues/9070 **Link to tracking Issue:** #9070 **Testing:** This only updates comments, but I have added unit tests to verify the behaviour described in comments * [configgrpc] Deprecate GRPCClientSettings, use ClientConfig instead (#9402) **Description:** Deprecate GRPCClientSettings, use ClientConfig instead **Link to tracking Issue:** #6767 * [component] Add MustNewType constructor for component.Type (#9414) **Description:** - Adds `component.MustNewType` to create a type. This function panics if the type has invalid characters. Add similar functions `component.MustNewID` and `component.MustNewIDWithName`. - Adds `component.Type.String` to recover the string - Use `component.MustNewType`, `component.MustNewID`, `component.MustNewIDWithName` and `component.Type.String` everywhere in this codebase. To do this I changed `component.Type` into an opaque struct and checked for compile-time errors. Some notes: 1. All components currently on core and contrib follow this rule. This is still breaking for other components. 2. A future PR will change this into a struct, to actually validate this (right now you can just do `component.Type("anything")` to bypass validation). I want to do this in two steps to avoid breaking contrib tests: we first introduce this function, and after that we change into a struct. **Link to tracking Issue:** Updates #9208 * [chore] Update httpconfig API to not include HTTP prefix (#9453) Following discussion https://github.com/open-telemetry/opentelemetry-collector/pull/9403#discussion_r1471644409 * [mdatagen] Remove use of ReportFatalError in generated tests (#9439) **Description:** Remove use of ReportFatalError in generated tests **Link to tracking Issue:** https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30579 * [exporterhelper] Add WithRequestQueue option to the exporter (#8853) Introduce a way to enable queue in the new exporter helper with a developer interface suggested in https://github.com/open-telemetry/opentelemetry-collector/pull/8248#discussion_r1302102261. The new configuration interface for the end users provides a new `queue_size_items` option to limit the queue by a number of spans, log records, or metric data points. The previous way to limit the queue by number of requests is preserved under the same field, `queue_size,` which will later be deprecated through a longer transition process. Tracking issue: https://github.com/open-telemetry/opentelemetry-collector/issues/8122 * [chore][receiver/otlp] ReportFatalError -> ReportStatus (#9331) **Description:** Remove use of the deprecated method `ReportFatalError` in favor of using `ReportStatus`. Co-authored-by: Bogdan Drutu * [chore][config/configgrpc] Enable goleak check (#9217) **Description:** Enables goleak to run on the configgrpc package. Requires ignoring the opencensus-go leak. A few tests required an additional client connection close command to exit the client go routine. Additional information can be found [here](https://pkg.go.dev/google.golang.org/grpc#DialContext) in the explanation for the method grpc.DialContext, specifically this comment: ``` Users should call ClientConn.Close to terminate all the pending operations after this function returns. ``` configgrpc's method [`ToClientConn`](https://github.com/open-telemetry/opentelemetry-collector/blob/36730599ae4fb2ffc05d8e6e8a42e0bb0880703f/config/configgrpc/configgrpc.go#L178) is directly calling the `grpc.DialContext` method referenced. **Link to tracking Issue:** #9165 **Testing:** Added goleak check is passing * [receiver/otlpreceiver] Enable goleak check (#9225) **Description:** Add `goleak` to detect leaks in tests. Leaking goroutines were detected that were caused by a dependency that we can ignore (`go.opencensus.io/stats/view.(*worker).start`), a `Shutdown` call was also added that was missing. **Link to tracking Issue:** #9165 **Testing:** Added check is passing as well as existing tests. * Update module github.com/google/uuid to v1.6.0 (#9356) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/google/uuid](https://togithub.com/google/uuid) | `v1.5.0` -> `v1.6.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgoogle%2fuuid/v1.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fgoogle%2fuuid/v1.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fgoogle%2fuuid/v1.5.0/v1.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgoogle%2fuuid/v1.5.0/v1.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
google/uuid (github.com/google/uuid) ### [`v1.6.0`](https://togithub.com/google/uuid/releases/tag/v1.6.0) [Compare Source](https://togithub.com/google/uuid/compare/v1.5.0...v1.6.0) ##### Features - add Max UUID constant ([#​149](https://togithub.com/google/uuid/issues/149)) ([c58770e](https://togithub.com/google/uuid/commit/c58770eb495f55fe2ced6284f93c5158a62e53e3)) ##### Bug Fixes - fix typo in version 7 uuid documentation ([#​153](https://togithub.com/google/uuid/issues/153)) ([016b199](https://togithub.com/google/uuid/commit/016b199544692f745ffc8867b914129ecb47ef06)) - Monotonicity in UUIDv7 ([#​150](https://togithub.com/google/uuid/issues/150)) ([a2b2b32](https://togithub.com/google/uuid/commit/a2b2b32373ff0b1a312b7fdf6d38a977099698a6))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [docs/platform-support.md] Add owners for linux/ppc64le (#9371) **Description:** Add @IBM-Currency-Helper, @adilhusain-s and @seth-priya as owners for the `linux/ppc64le` platform. **Link to tracking Issue:** Fixes #8528 Co-authored-by: Alex Boten * [configcompression] Rename `CompressionType` to `Type` (#9416) **Description:** If we choose to go with the rename. **Link to tracking Issue:** Related to https://github.com/open-telemetry/opentelemetry-collector/issues/9388 --------- Co-authored-by: Pablo Baeyens * Update module github.com/shirou/gopsutil/v3 to v3.24.1 (#9471) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/shirou/gopsutil/v3](https://togithub.com/shirou/gopsutil) | `v3.23.12` -> `v3.24.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fshirou%2fgopsutil%2fv3/v3.24.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fshirou%2fgopsutil%2fv3/v3.24.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fshirou%2fgopsutil%2fv3/v3.23.12/v3.24.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fshirou%2fgopsutil%2fv3/v3.23.12/v3.24.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
shirou/gopsutil (github.com/shirou/gopsutil/v3) ### [`v3.24.1`](https://togithub.com/shirou/gopsutil/compare/v3.23.12...v3.24.1) [Compare Source](https://togithub.com/shirou/gopsutil/compare/v3.23.12...v3.24.1)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Treat PartialSuccess as Success (#9260) Changes the treatment of [PartialSuccess](https://opentelemetry.io/docs/specs/otlp/#partial-success), making them successful and logging a warning instead of returning an error to the caller. These responses are meant to convey successful receipt of valid data which could not be accepted for other reasons, specifically to cover situations where the OpenTelemetry SDK and Collector have done nothing wrong, specifically to avoid retries. While the existing OTLP exporter returns a permanent error (also avoids retries), it makes the situation look like a total failure when in fact it is more nuanced. As discussed in the tracking issue, it is a lot of work to propagate these "partial" successes backwards in a pipeline, so the appropriate simple way to handle these items is to return success. In this PR, we log a warning. In a future PR, (IMO) as discussed in https://github.com/open-telemetry/oteps/pull/238, we should count the spans/metrics/logs that are rejected in this way using a dedicated outcome label. **Link to tracking Issue:** Part of #9243 **Testing:** Tests for the "partial success" warning have been added. **Documentation:** PartialSuccess behavior was not documented. Given the level of detail in the README, it feels appropriate to continue not documenting, otherwise lots of new details should be added. --------- Co-authored-by: Alex Boten * Update module github.com/knadh/koanf/v2 to v2.0.2 (#9469) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/knadh/koanf/v2](https://togithub.com/knadh/koanf) | `v2.0.1` -> `v2.0.2` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fknadh%2fkoanf%2fv2/v2.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fknadh%2fkoanf%2fv2/v2.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fknadh%2fkoanf%2fv2/v2.0.1/v2.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fknadh%2fkoanf%2fv2/v2.0.1/v2.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
knadh/koanf (github.com/knadh/koanf/v2) ### [`v2.0.2`](https://togithub.com/knadh/koanf/releases/tag/v2.0.2) [Compare Source](https://togithub.com/knadh/koanf/compare/v2.0.1...v2.0.2) #### What's Changed - feat: add nats provider by [@​TECHNOFAB11](https://togithub.com/TECHNOFAB11) in [https://github.com/knadh/koanf/pull/213](https://togithub.com/knadh/koanf/pull/213) - feat: add flag to optionally fetch secret metadata by [@​Thunderbottom](https://togithub.com/Thunderbottom) in [https://github.com/knadh/koanf/pull/219](https://togithub.com/knadh/koanf/pull/219) - chore: change WithMeta to ExcludeMeta for backwards compatibility by [@​Thunderbottom](https://togithub.com/Thunderbottom) in [https://github.com/knadh/koanf/pull/220](https://togithub.com/knadh/koanf/pull/220) - typos and little clearer code by [@​GreyXor](https://togithub.com/GreyXor) in [https://github.com/knadh/koanf/pull/222](https://togithub.com/knadh/koanf/pull/222) - Fixed a nil panic issue in vault provider by [@​wangkang](https://togithub.com/wangkang) in [https://github.com/knadh/koanf/pull/224](https://togithub.com/knadh/koanf/pull/224) - Not use deprecated io/ioutil by [@​tchssk](https://togithub.com/tchssk) in [https://github.com/knadh/koanf/pull/226](https://togithub.com/knadh/koanf/pull/226) - Proposal: support Vault auth method by [@​missedone](https://togithub.com/missedone) in [https://github.com/knadh/koanf/pull/229](https://togithub.com/knadh/koanf/pull/229) - Add parameterstore provider by [@​tchssk](https://togithub.com/tchssk) in [https://github.com/knadh/koanf/pull/227](https://togithub.com/knadh/koanf/pull/227) - feat: optional support net/http transport by [@​missedone](https://togithub.com/missedone) in [https://github.com/knadh/koanf/pull/232](https://togithub.com/knadh/koanf/pull/232) - breaking change: [#​233](https://togithub.com/knadh/koanf/issues/233) return error struct to avoid panic at runtime by [@​missedone](https://togithub.com/missedone) in [https://github.com/knadh/koanf/pull/234](https://togithub.com/knadh/koanf/pull/234) - Bump github.com/nats-io/nkeys from 0.4.4 to 0.4.6 in /providers/nats by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/knadh/koanf/pull/246](https://togithub.com/knadh/koanf/pull/246) - Bump golang.org/x/net from 0.7.0 to 0.17.0 in /providers/etcd by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/knadh/koanf/pull/248](https://togithub.com/knadh/koanf/pull/248) - Bump golang.org/x/net from 0.7.0 to 0.17.0 in /providers/vault by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/knadh/koanf/pull/247](https://togithub.com/knadh/koanf/pull/247) - Bump github.com/nats-io/nats-server/v2 from 2.9.15 to 2.9.23 in /providers/nats by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/knadh/koanf/pull/241](https://togithub.com/knadh/koanf/pull/241) - Bump google.golang.org/grpc from 1.53.0 to 1.56.3 in /providers/etcd by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/knadh/koanf/pull/243](https://togithub.com/knadh/koanf/pull/243) - fix: typo by [@​testwill](https://togithub.com/testwill) in [https://github.com/knadh/koanf/pull/251](https://togithub.com/knadh/koanf/pull/251) - Bump golang.org/x/crypto from 0.14.0 to 0.17.0 in /providers/vault by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/knadh/koanf/pull/261](https://togithub.com/knadh/koanf/pull/261) - Bump golang.org/x/crypto from 0.14.0 to 0.17.0 in /providers/nats by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/knadh/koanf/pull/260](https://togithub.com/knadh/koanf/pull/260) - Add optional `Opt{}` param that takes a koanf instance to match posflag's default value behaviour in basic flag. Closes [#​255](https://togithub.com/knadh/koanf/issues/255). by [@​knadh](https://togithub.com/knadh) in [https://github.com/knadh/koanf/pull/259](https://togithub.com/knadh/koanf/pull/259) - Parser: KDL by [@​dezren39](https://togithub.com/dezren39) in [https://github.com/knadh/koanf/pull/266](https://togithub.com/knadh/koanf/pull/266) - Parser: KDL kdl-go dependency update by [@​dezren39](https://togithub.com/dezren39) in [https://github.com/knadh/koanf/pull/267](https://togithub.com/knadh/koanf/pull/267) #### New Contributors - [@​TECHNOFAB11](https://togithub.com/TECHNOFAB11) made their first contribution in [https://github.com/knadh/koanf/pull/213](https://togithub.com/knadh/koanf/pull/213) - [@​GreyXor](https://togithub.com/GreyXor) made their first contribution in [https://github.com/knadh/koanf/pull/222](https://togithub.com/knadh/koanf/pull/222) - [@​wangkang](https://togithub.com/wangkang) made their first contribution in [https://github.com/knadh/koanf/pull/224](https://togithub.com/knadh/koanf/pull/224) - [@​tchssk](https://togithub.com/tchssk) made their first contribution in [https://github.com/knadh/koanf/pull/226](https://togithub.com/knadh/koanf/pull/226) - [@​missedone](https://togithub.com/missedone) made their first contribution in [https://github.com/knadh/koanf/pull/229](https://togithub.com/knadh/koanf/pull/229) - [@​testwill](https://togithub.com/testwill) made their first contribution in [https://github.com/knadh/koanf/pull/251](https://togithub.com/knadh/koanf/pull/251) - [@​dezren39](https://togithub.com/dezren39) made their first contribution in [https://github.com/knadh/koanf/pull/266](https://togithub.com/knadh/koanf/pull/266) **Full Changelog**: https://github.com/knadh/koanf/compare/v2.0.1...v2.0.2
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update opentelemetry-go monorepo (#9486) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/otel](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.22.0` -> `v1.23.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel/v1.22.0/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel/v1.22.0/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.22.0` -> `v1.23.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracegrpc/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracegrpc/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracegrpc/v1.22.0/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracegrpc/v1.22.0/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.22.0` -> `v1.23.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracehttp/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracehttp/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracehttp/v1.22.0/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracehttp/v1.22.0/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/prometheus](https://togithub.com/open-telemetry/opentelemetry-go) | `v0.45.0` -> `v0.45.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fprometheus/v0.45.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fprometheus/v0.45.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fprometheus/v0.45.0/v0.45.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fprometheus/v0.45.0/v0.45.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/stdout/stdouttrace](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.22.0` -> `v1.23.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdouttrace/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdouttrace/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdouttrace/v1.22.0/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdouttrace/v1.22.0/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/metric](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.22.0` -> `v1.23.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fmetric/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fmetric/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fmetric/v1.22.0/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fmetric/v1.22.0/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/sdk](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.22.0` -> `v1.23.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fsdk/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fsdk/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fsdk/v1.22.0/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fsdk/v1.22.0/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/sdk/metric](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.22.0` -> `v1.23.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fsdk%2fmetric/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fsdk%2fmetric/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fsdk%2fmetric/v1.22.0/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fsdk%2fmetric/v1.22.0/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/trace](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.22.0` -> `v1.23.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2ftrace/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2ftrace/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2ftrace/v1.22.0/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2ftrace/v1.22.0/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-go (go.opentelemetry.io/otel) ### [`v1.23.0`](https://togithub.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.0): /v0.45.1 [Compare Source](https://togithub.com/open-telemetry/opentelemetry-go/compare/v1.22.0...v1.23.0) This release contains the first stable, `v1`, release of the following modules: - `go.opentelemetry.io/otel/bridge/opencensus` - `go.opentelemetry.io/otel/bridge/opencensus/test` - `go.opentelemetry.io/otel/example/opencensus` - `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` - `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` - `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. ##### Added - Add `WithEndpointURL` option to the `exporters/otlp/otlpmetric/otlpmetricgrpc`, `exporters/otlp/otlpmetric/otlpmetrichttp`, `exporters/otlp/otlptrace/otlptracegrpc` and `exporters/otlp/otlptrace/otlptracehttp` packages. ([#​4808](https://togithub.com/open-telemetry/opentelemetry-go/issues/4808)) - Experimental exemplar exporting is added to the metric SDK. See [metric documentation](./sdk/metric/EXPERIMENTAL.md#exemplars) for more information about this feature and how to enable it. ([#​4871](https://togithub.com/open-telemetry/opentelemetry-go/issues/4871)) - `ErrSchemaURLConflict` is added to `go.opentelemetry.io/otel/sdk/resource`. This error is returned when a merge of two `Resource`s with different (non-empty) schema URL is attempted. ([#​4876](https://togithub.com/open-telemetry/opentelemetry-go/issues/4876)) ##### Changed - The `Merge` and `New` functions in `go.opentelemetry.io/otel/sdk/resource` now returns a partial result if there is a schema URL merge conflict. Instead of returning `nil` when two `Resource`s with different (non-empty) schema URLs are merged the merged `Resource`, along with the new `ErrSchemaURLConflict` error, is returned. It is up to the user to decide if they want to use the returned `Resource` or not. It may have desired attributes overwritten or include stale semantic conventions. ([#​4876](https://togithub.com/open-telemetry/opentelemetry-go/issues/4876)) ##### Fixed - Fix `ContainerID` resource detection on systemd when cgroup path has a colon. ([#​4449](https://togithub.com/open-telemetry/opentelemetry-go/issues/4449)) - Fix `go.opentelemetry.io/otel/sdk/metric` to cache instruments to avoid leaking memory when the same instrument is created multiple times. ([#​4820](https://togithub.com/open-telemetry/opentelemetry-go/issues/4820)) - Fix missing `Mix` and `Max` values for `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` by introducing `MarshalText` and `MarshalJSON` for the `Extrema` type in `go.opentelemetry.io/sdk/metric/metricdata`. ([#​4827](https://togithub.com/open-telemetry/opentelemetry-go/issues/4827)) #### New Contributors - [@​Fricounet](https://togithub.com/Fricounet) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/4449](https://togithub.com/open-telemetry/opentelemetry-go/pull/4449) - [@​StLeoX](https://togithub.com/StLeoX) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/4855](https://togithub.com/open-telemetry/opentelemetry-go/pull/4855) - [@​m-posluszny](https://togithub.com/m-posluszny) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/4827](https://togithub.com/open-telemetry/opentelemetry-go/pull/4827) **Full Changelog**: https://github.com/open-telemetry/opentelemetry-go/compare/v1.22.0...v1.23.0
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Alex Boten * [builder] Close files immediately after writing is complete (#9466) Ensure that files written by `cmd/builder` are closed right after their content is written. This came about while investigating #5403 **Link to tracking Issue:** #5403 **Testing:** Local run on Windows **Documentation:** N/A * Add support of `Host` header (#9411) Closes #9395 * Update module go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp to v0.48.0 (#9497) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | `v0.47.0` -> `v0.48.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fnet%2fhttp%2fotelhttp/v0.48.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fnet%2fhttp%2fotelhttp/v0.48.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fnet%2fhttp%2fotelhttp/v0.47.0/v0.48.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fnet%2fhttp%2fotelhttp/v0.47.0/v0.48.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update module go.opentelemetry.io/contrib/config to v0.3.0 (#9496) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/contrib/config](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | `v0.2.0` -> `v0.3.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcontrib%2fconfig/v0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcontrib%2fconfig/v0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcontrib%2fconfig/v0.2.0/v0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcontrib%2fconfig/v0.2.0/v0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [chore] Prepare release v1.1.0/v0.94.0 (#9501) The following commands were run to prepare this release: - make chlog-update VERSION=v1.1.0/v0.94.0 - make prepare-release PREVIOUS_VERSION=1.0.1 RELEASE_CANDIDATE=1.1.0 MODSET=stable - make prepare-release PREVIOUS_VERSION=0.93.0 RELEASE_CANDIDATE=0.94.0 MODSET=beta --------- Signed-off-by: Anthony J Mirabella Co-authored-by: Anthony Mirabella * [exporter/otlphttp] added support for configurable telemetry encoding (#9276) **Description:** This PR adds support for encoding configuration in the `otlphttp` exporter. **Link to tracking Issue:** #6945 **Testing:** Updated existing tests, and added relevant tests **Documentation:** Updated the `otlphttp` docs to include the new configuration option. --------- Co-authored-by: Yang Song * Update module go.opentelemetry.io/contrib/zpages to v0.48.0 (#9499) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/contrib/zpages](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | `v0.47.0` -> `v0.48.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcontrib%2fzpages/v0.48.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcontrib%2fzpages/v0.48.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcontrib%2fzpages/v0.47.0/v0.48.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcontrib%2fzpages/v0.47.0/v0.48.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update module github.com/knadh/koanf/v2 to v2.1.0 (#9492) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/knadh/koanf/v2](https://togithub.com/knadh/koanf) | `v2.0.2` -> `v2.1.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fknadh%2fkoanf%2fv2/v2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fknadh%2fkoanf%2fv2/v2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fknadh%2fkoanf%2fv2/v2.0.2/v2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fknadh%2fkoanf%2fv2/v2.0.2/v2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
knadh/koanf (github.com/knadh/koanf/v2) ### [`v2.1.0`](https://togithub.com/knadh/koanf/releases/tag/v2.1.0) [Compare Source](https://togithub.com/knadh/koanf/compare/v2.0.2...v2.1.0) ### Important [https://github.com/mitchellh/mapstructure/issues/349#issuecomment-1860372162](https://togithub.com/mitchellh/mapstructure/issues/349#issuecomment-1860372162) is discontinued and koanf has switched to using the fork `github.com/go-viper/mapstructure/v2`. If you are referencing the mapstructure lib in your code (custom DecoderConfig), you have to switch the paths to the above forked version of koanf. `github.com/mitchellh/mapstructure` => `github.com/go-viper/mapstructure/v2` #### What's Changed - fix: retract v2.0.2 by [@​rhnvrm](https://togithub.com/rhnvrm) in [https://github.com/knadh/koanf/pull/270](https://togithub.com/knadh/koanf/pull/270) **Full Changelog**: https://github.com/knadh/koanf/compare/v2.0.2...v2.1.0
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Alex Boten * Update opentelemetry-go monorepo to v1 (major) (#9487) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/otel/bridge/opencensus](https://togithub.com/open-telemetry/opentelemetry-go) | `v0.45.0` -> `v1.23.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fbridge%2fopencensus/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fbridge%2fopencensus/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fbridge%2fopencensus/v0.45.0/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fbridge%2fopencensus/v0.45.0/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc](https://togithub.com/open-telemetry/opentelemetry-go) | `v0.45.0` -> `v1.23.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetricgrpc/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetricgrpc/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetricgrpc/v0.45.0/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetricgrpc/v0.45.0/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp](https://togithub.com/open-telemetry/opentelemetry-go) | `v0.45.0` -> `v1.23.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetrichttp/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetrichttp/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetrichttp/v0.45.0/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetrichttp/v0.45.0/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/stdout/stdoutmetric](https://togithub.com/open-telemetry/opentelemetry-go) | `v0.45.0` -> `v1.23.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdoutmetric/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdoutmetric/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdoutmetric/v0.45.0/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdoutmetric/v0.45.0/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | :warning: MAJOR VERSION UPDATE :warning: - please manually update this package --- ### Release Notes
open-telemetry/opentelemetry-go (go.opentelemetry.io/otel/bridge/opencensus) ### [`v1.23.0`](https://togithub.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.0): /v0.45.1 This release contains the first stable, `v1`, release of the following modules: - `go.opentelemetry.io/otel/bridge/opencensus` - `go.opentelemetry.io/otel/bridge/opencensus/test` - `go.opentelemetry.io/otel/example/opencensus` - `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` - `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` - `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. ##### Added - Add `WithEndpointURL` option to the `exporters/otlp/otlpmetric/otlpmetricgrpc`, `exporters/otlp/otlpmetric/otlpmetrichttp`, `exporters/otlp/otlptrace/otlptracegrpc` and `exporters/otlp/otlptrace/otlptracehttp` packages. ([#​4808](https://togithub.com/open-telemetry/opentelemetry-go/issues/4808)) - Experimental exemplar exporting is added to the metric SDK. See [metric documentation](./sdk/metric/EXPERIMENTAL.md#exemplars) for more information about this feature and how to enable it. ([#​4871](https://togithub.com/open-telemetry/opentelemetry-go/issues/4871)) - `ErrSchemaURLConflict` is added to `go.opentelemetry.io/otel/sdk/resource`. This error is returned when a merge of two `Resource`s with different (non-empty) schema URL is attempted. ([#​4876](https://togithub.com/open-telemetry/opentelemetry-go/issues/4876)) ##### Changed - The `Merge` and `New` functions in `go.opentelemetry.io/otel/sdk/resource` now returns a partial result if there is a schema URL merge conflict. Instead of returning `nil` when two `Resource`s with different (non-empty) schema URLs are merged the merged `Resource`, along with the new `ErrSchemaURLConflict` error, is returned. It is up to the user to decide if they want to use the returned `Resource` or not. It may have desired attributes overwritten or include stale semantic conventions. ([#​4876](https://togithub.com/open-telemetry/opentelemetry-go/issues/4876)) ##### Fixed - Fix `ContainerID` resource detection on systemd when cgroup path has a colon. ([#​4449](https://togithub.com/open-telemetry/opentelemetry-go/issues/4449)) - Fix `go.opentelemetry.io/otel/sdk/metric` to cache instruments to avoid leaking memory when the same instrument is created multiple times. ([#​4820](https://togithub.com/open-telemetry/opentelemetry-go/issues/4820)) - Fix missing `Mix` and `Max` values for `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` by introducing `MarshalText` and `MarshalJSON` for the `Extrema` type in `go.opentelemetry.io/sdk/metric/metricdata`. ([#​4827](https://togithub.com/open-telemetry/opentelemetry-go/issues/4827)) #### New Contributors - [@​Fricounet](https://togithub.com/Fricounet) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/4449](https://togithub.com/open-telemetry/opentelemetry-go/pull/4449) - [@​StLeoX](https://togithub.com/StLeoX) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/4855](https://togithub.com/open-telemetry/opentelemetry-go/pull/4855) - [@​m-posluszny](https://togithub.com/m-posluszny) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/4827](https://togithub.com/open-telemetry/opentelemetry-go/pull/4827) **Full Changelog**: https://github.com/open-telemetry/opentelemetry-go/compare/v1.22.0...v1.23.0
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Alex Boten Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [chore] Add newline to the end of the chloggen template (#9483) We should probably have one anyway, and this gets rid of the "no newline at end of file" symbol that GitHub puts in the PR diff. * Update module github.com/klauspost/compress to v1.17.6 (#9468) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/klauspost/compress](https://togithub.com/klauspost/compress) | `v1.17.5` -> `v1.17.6` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fklauspost%2fcompress/v1.17.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fklauspost%2fcompress/v1.17.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fklauspost%2fcompress/v1.17.5/v1.17.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fklauspost%2fcompress/v1.17.5/v1.17.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
klauspost/compress (github.com/klauspost/compress) ### [`v1.17.6`](https://togithub.com/klauspost/compress/releases/tag/v1.17.6) [Compare Source](https://togithub.com/klauspost/compress/compare/v1.17.5...v1.17.6) #### What's Changed - zstd: Fix incorrect repeat coding in best mode by [@​klauspost](https://togithub.com/klauspost) in [https://github.com/klauspost/compress/pull/923](https://togithub.com/klauspost/compress/pull/923) - s2: Fix DecodeConcurrent deadlock on errors by [@​klauspost](https://togithub.com/klauspost) in [https://github.com/klauspost/compress/pull/925](https://togithub.com/klauspost/compress/pull/925) - build: Remove garble compiler by [@​klauspost](https://togithub.com/klauspost) in [https://github.com/klauspost/compress/pull/924](https://togithub.com/klauspost/compress/pull/924) **Full Changelog**: https://github.com/klauspost/compress/compare/v1.17.5...v1.17.6
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Alex Boten * Update module go.opentelemetry.io/contrib/propagators/b3 to v1.23.0 (#9498) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/contrib/propagators/b3](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | `v1.22.0` -> `v1.23.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcontrib%2fpropagators%2fb3/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcontrib%2fpropagators%2fb3/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcontrib%2fpropagators%2fb3/v1.22.0/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcontrib%2fpropagators%2fb3/v1.22.0/v1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-go-contrib (go.opentelemetry.io/contrib/propagators/b3) ### [`v1.23.0`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v1.23.0): /v0.48.0/v0.17.0/v0.3.0 [Compare Source](https://togithub.com/open-telemetry/opentelemetry-go-contrib/compare/v1.22.0...v1.23.0) ##### Added - Add client metric support to `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp`. ([#​4707](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/4707)) - Add peer attributes to spans recorded by `NewClientHandler`, `NewServerHandler` in `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc`. ([#​4873](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/4873)) - Add support for `cloud.account.id`, `cloud.availability_zone` and `cloud.region` in the AWS ECS detector. ([#​4860](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/4860)) ##### Changed - The fallback options in `go.opentelemetry.io/contrib/exporters/autoexport` now accept factory functions. ([#​4891](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/4891)) - `WithFallbackMetricReader(metric.Reader) MetricOption` is replaced with `func WithFallbackMetricReader(func(context.Context) (metric.Reader, error)) MetricOption`. - `WithFallbackSpanExporter(trace.SpanExporter) SpanOption` is replaced with `WithFallbackSpanExporter(func(context.Context) (trace.SpanExporter, error)) SpanOption`. ##### Deprecated - The `RequestCount`, `RequestContentLength`, `ResponseContentLength`, `ServerLatency` constants in `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` are deprecated. ([#​4707](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/4707)) ##### Fixed - Do not panic in `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc` if `MeterProvider` returns a `nil` instrument. ([#​4875](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/4875)) #### New Contributors - [@​acpana](https://togithub.com/acpana) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go-contrib/pull/4831](https://togithub.com/open-telemetry/opentelemetry-go-contrib/pull/4831) - [@​hiroyaonoe](https://togithub.com/hiroyaonoe) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go-contrib/pull/4704](https://togithub.com/open-telemetry/opentelemetry-go-contrib/pull/4704) - [@​hcelaloner](https://togithub.com/hcelaloner) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go-contrib/pull/4891](https://togithub.com/open-telemetry/opentelemetry-go-contrib/pull/4891) **Full Changelog**: https://github.com/open-telemetry/opentelemetry-go-contrib/compare/v1.22.0...v1.23.0
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * add go 1.22 to tests (#9518) Related to #9507 Signed-off-by: Alex Boten * Revert "Update module go.opentelemetry.io/contrib/instrumentation/nethttp/otelhttp to v0.48.0 (#9497)" (#9520) This reverts commit f1a574a84e7f5c74bcd9b9796ef9847b97e2ca10. Fixes #9519 * [chore] prepare release v0.94.1 (#9521) Signed-off-by: Anthony J Mirabella * [configretry] validate max_elapsed_time (#9489) **Description:** Validate `max_elapsed_time`, ensure it is larger than `max_interval` and `initial_interval` respectively. --------- Co-authored-by: Dmitrii Anoshin * [configcompression] Remove deprecated types, constants and methods (#9517) **Description:** Removes deprecated types, constants and methods. **Link to tracking Issue:** Fixes #9388 * [confmap] Remove deprecated `confmap.WithErrorUnused` (#9503) **Description:** Remove deprecated `confmap.WithErrorUnused` **Link to tracking Issue:** Fixes #9484 --------- Co-authored-by: Pablo Baeyens Co-authored-by: Pablo Baeyens * [chore] Update release schedule (#9530) * [chore] remove comment (#9522) This comment has a typo and is invalid: we do not start the exporter in this function. * [config/configrpc] Deprecate SanitizedEndpoint, ToListener and ToListenerContext (#9512) **Description:** Updates #9481 and #9482 * [chore] fix typo in comment (#9539) * [component] Remove host.ReportFatalError (#9506) **Description:** Remove `host.ReportFatalError`. It has been deprecated since 0.87.0. **Link to tracking Issue:** #6344 --------- Co-authored-by: Pablo Baeyens Co-authored-by: Pablo Baeyens * [chore] change a few comments in receivertest (#9542) * [chore] fix a few comments in processortest (#9541) * [chore] fix couple doc comments (#9540) * [otlpexporter] Validate the configuration explicitly (#9523) **Description:** Use `Config.Validate` to validate the presence of the gRPC endpoint instead of making an assertion at creation time. * [confmap] Split converters and providers into their own modules (#9461) Resolves https://github.com/open-telemetry/opentelemetry-collector/issues/9460 Required for https://github.com/open-telemetry/opentelemetry-collector/issues/4759 I made this a single PR to reduce the review load, but I can break the changes into multiple PRs if we would like. * bump minimum go version (#9533) Fixes #9507 --------- Signed-off-by: Alex Boten * Added support for snappy to enable prometheus remote write (#8983) Adding a feature. This adds `snappy` support for the confighttp compression package. This provides support for enabling the prometheus remote write receiver which only supports snappy. https://github.com/open-telemetry/opentelemetry-collector/issues/7632 Added unit test coverage and testing integration with prometheus remote write compatibility. --------- Co-authored-by: Bogdan Drutu * [chore] implement shutdown verifier for metrics and logs (#9544) Co-authored-by: Bogdan Drutu * [chore][Makefile.Common] Enable make commands to run on individual packages (#9536) This is a QOL improvement. As shown in the testing section, existing `make` commands that rely on tools don't work in sub-packages. The issue was that the path reference for the tools dir was the current directory, instead of the repo's root dir. This updates the path to the tools dir to be from the root path instead of the current directory. This now matches [contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/2c870cebf0f1a4c02a0fc493db686f6422f8a23a/Makefile.Common#L22). **Testing:** Before: ``` crobert$ ~/dev/opentelemetry-collector/receiver/otlpreceiver $ make fmt /bin/bash: /Users/crobert/dev/opentelemetry-collector/receiver/otlpreceiver/internal/tools/tools.go: No such file or directory make: *** No rule to make target `/Users/crobert/dev/opentelemetry-collector/receiver/otlpreceiver/.tools/goimports', needed by `fmt'. Stop. crobert$ ~/dev/opentelemetry-collector/receiver/otlpreceiver $ make impi /bin/bash: /Users/crobert/dev/opentelemetry-collector/receiver/otlpreceiver/internal/tools/tools.go: No such file or directory make: *** No rule to make target `/Users/crobert/dev/opentelemetry-collector/receiver/otlpreceiver/.tools/impi', needed by `impi'. Stop. crobert$ ~/dev/opentelemetry-collector/receiver/otlpreceiver $ make install-tools /bin/bash: /Users/crobert/dev/opentelemetry-collector/receiver/otlpreceiver/internal/tools/tools.go: No such file or directory make: Nothing to be done for `install-tools'. ``` After: ``` crobert$ ~/dev/opentelemetry-collector/receiver/otlpreceiver $ make fmt cd /Users/crobert/dev/opentelemetry-collector/internal/tools && go build -o /Users/crobert/dev/opentelemetry-collector/.tools/goimports -trimpath golang.org/x/tools/cmd/goimports gofmt -w -s ./ /Users/crobert/dev/opentelemetry-collector/.tools/goimports -w -local go.opentelemetry.io/collector ./ crobert$ ~/dev/opentelemetry-collector/receiver/otlpreceiver $ make impi crobert$ ~/dev/opentelemetry-collector/receiver/otlpreceiver $ make install-tools cd /Users/crobert/dev/opentelemetry-collector/internal/tools && go build -o /Users/crobert/dev/opentelemetry-collector/.tools/envsubst -trimpath github.com/a8m/envsubst/cmd/envsubst cd /Users/crobert/dev/opentelemetry-collector/internal/tools && go build -o /Users/crobert/dev/opentelemetry-collector/.tools/misspell -trimpath github.com/client9/misspell/cmd/misspell cd /Users/crobert/dev/opentelemetry-collector/internal/tools && go build -o /Users/crobert/dev/opentelemetry-collector/.tools/golangci-lint -trimpath github.com/golangci/golangci-lint/cmd/golangci-lint # github.com/golangci/golangci-lint/cmd/golangci-lint ld: warning: -bind_at_load is deprecated on macOS cd /Users/crobert/dev/opentelemetry-collector/internal/tools && go build -o /Users/crobert/dev/opentelemetry-collector/.tools/addlicense -trimpath github.com/google/addlicense cd /Users/crobert/dev/opentelemetry-collector/internal/tools && go build -o /Users/crobert/dev/opentelemetry-collector/.tools/porto -trimpath github.com/jcchavezs/porto/cmd/porto cd /Users/crobert/dev/opentelemetry-collector/internal/tools && go build -o /Users/crobert/dev/opentelemetry-collector/.tools/checkfile -trimpath go.opentelemetry.io/build-tools/checkfile cd /Users/crobert/dev/opentelemetry-collector/internal/tools && go build -o /Users/crobert/dev/opentelemetry-collector/.tools/chloggen -trimpath go.opentelemetry.io/build-tools/chloggen cd /Users/crobert/dev/opentelemetry-collector/internal/tools && go build -o /Users/crobert/dev/opentelemetry-collector/.tools/crosslink -trimpath go.opentelemetry.io/build-tools/crosslink cd /Users/crobert/dev/opentelemetry-collector/internal/tools && go build -o /Users/crobert/dev/opentelemetry-collector/.tools/multimod -trimpath go.opentelemetry.io/build-tools/multimod cd /Users/crobert/dev/opentelemetry-collector/internal/tools && go build -o /Users/crobert/dev/opentelemetry-collector/.tools/semconvgen -trimpath go.opentelemetry.io/build-tools/semconvgen cd /Users/crobert/dev/opentelemetry-collector/internal/tools && go build -o /Users/crobert/dev/opentelemetry-collector/.tools/apidiff -trimpath golang.org/x/exp/cmd/apidiff cd /Users/crobert/dev/opentelemetry-collector/internal/tools && go build -o /Users/crobert/dev/opentelemetry-collector/.tools/govulncheck -trimpath golang.org/x/vuln/cmd/govulncheck ``` * [service] Replace telemetryInitializer by MeterProvider wrapper (#9454) **Description:** Refactor meter provider initialization; removes `telemetryInitializer` and replaces it by a MeterProvider wrapper that owns the lifetime of the OpenCensus registry and the servers associated with the MeterProvider. **Link to tracking Issue:** Relates to #4970 (first refactor before trying out the factory pattern in an internal package) * Update security-best-practices.md (#9566) **Description:** Minor documentation fix * [receiver/otlp] [chore] Remove unused constants (#9563) * Update opentelemetry-go monorepo (#9558) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/otel](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.23.0` -> `v1.23.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel/v1.23.0/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel/v1.23.0/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/bridge/opencensus](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.23.0` -> `v1.23.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fbridge%2fopencensus/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fbridge%2fopencensus/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fbridge%2fopencensus/v1.23.0/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fbridge%2fopencensus/v1.23.0/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.23.0` -> `v1.23.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetricgrpc/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetricgrpc/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetricgrpc/v1.23.0/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetricgrpc/v1.23.0/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.23.0` -> `v1.23.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetrichttp/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetrichttp/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetrichttp/v1.23.0/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetrichttp/v1.23.0/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.23.0` -> `v1.23.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracegrpc/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracegrpc/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracegrpc/v1.23.0/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracegrpc/v1.23.0/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.23.0` -> `v1.23.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracehttp/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracehttp/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracehttp/v1.23.0/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracehttp/v1.23.0/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/prometheus](https://togithub.com/open-telemetry/opentelemetry-go) | `v0.45.1` -> `v0.45.2` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fprometheus/v0.45.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fprometheus/v0.45.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fprometheus/v0.45.1/v0.45.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fprometheus/v0.45.1/v0.45.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/stdout/stdoutmetric](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.23.0` -> `v1.23.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdoutmetric/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdoutmetric/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdoutmetric/v1.23.0/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdoutmetric/v1.23.0/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/stdout/stdouttrace](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.23.0` -> `v1.23.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdouttrace/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdouttrace/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdouttrace/v1.23.0/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdouttrace/v1.23.0/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/metric](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.23.0` -> `v1.23.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fmetric/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fmetric/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fmetric/v1.23.0/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fmetric/v1.23.0/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/sdk](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.23.0` -> `v1.23.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fsdk/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fsdk/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fsdk/v1.23.0/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fsdk/v1.23.0/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/sdk/metric](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.23.0` -> `v1.23.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fsdk%2fmetric/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fsdk%2fmetric/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fsdk%2fmetric/v1.23.0/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fsdk%2fmetric/v1.23.0/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/trace](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.23.0` -> `v1.23.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2ftrace/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2ftrace/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2ftrace/v1.23.0/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2ftrace/v1.23.0/v1.23.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-go (go.opentelemetry.io/otel) ### [`v1.23.1`](https://togithub.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.1): /v0.45.2 [Compare Source](https://togithub.com/open-telemetry/opentelemetry-go/compare/v1.23.0...v1.23.1) ##### Fixed - Register all callbacks passed during observable instrument creation instead of just the last one multiple times in `go.opentelemetry.io/otel/sdk/metric`. ([#​4888](https://togithub.com/open-telemetry/opentelemetry-go/issues/4888))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update module golang.org/x/vuln to v1.0.4 (#9557) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | golang.org/x/vuln | `v1.0.3` -> `v1.0.4` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fvuln/v1.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2fvuln/v1.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2fvuln/v1.0.3/v1.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fvuln/v1.0.3/v1.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [chore] removing toolchain from gomod (#9572) Signed-off-by: Alex Boten * [chore] [scrapererror] Remove nil check from IsPartialScrapeError (#9555) Remove the nil check from `IsPartialScrapeError` as redundant, `errors.As` has the same condition * [confignet] Rename NetAddr and TCPAddr to follow conventions (#9529) **Description:** Rename types in `confignet` to adapt to conventions (avoid stuttering and end in `Config`) **Link to tracking Issue:** Updates #9509 * [chore] fix unused params (#9578) Related to #9577 Signed-off-by: Alex Boten * [chore] fix var naming (#9579) Part of #9577 Signed-off-by: Alex Boten * Update module golang.org/x/net to v0.21.0 (#9573) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | golang.org/x/net | `v0.20.0` -> `v0.21.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fnet/v0.21.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2fnet/v0.21.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2fnet/v0.20.0/v0.21.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fnet/v0.20.0/v0.21.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update module github.com/golangci/golangci-lint to v1.56.1 (#9559) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/golangci/golangci-lint](https://togithub.com/golangci/golangci-lint) | `v1.55.2` -> `v1.56.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgolangci%2fgolangci-lint/v1.56.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fgolangci%2fgolangci-lint/v1.56.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fgolangci%2fgolangci-lint/v1.55.2/v1.56.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgolangci%2fgolangci-lint/v1.55.2/v1.56.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
golangci/golangci-lint (github.com/golangci/golangci-lint) ### [`v1.56.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1561) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.56.0...v1.56.1) 1. updated linters - `errcheck`: from 1.6.3 to 1.7.0 - `govet`: disable `loopclosure` with go1.22 - `revive`: from 1.3.6 to 1.3.7 - `testifylint`: from 1.1.0 to 1.1.1 ### [`v1.56.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1560) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.55.2...v1.56.0) 1. new linters - feat: add `spancheck` linter https://github.com/jjti/go-spancheck 2. updated linters - `depguard`: from 2.1.0 to 2.2.0 - `exhaustive`: from 0.11.0 to 0.12.0 - `exhaustruct`: from 3.1.0 to 3.2.0 - `gci`: from 0.11.2 to 0.12.1 - `ginkgolinter`: from 0.14.1 to 0.15.2 - `go-check-sumtype`: from 0.1.3 to 0.1.4 - `go-critic`: from 0.9.0 to 0.11.0 - `go-errorlint`: from 1.4.5 to 1.4.8 - `go-spancheck`: from 0.4.2 to 0.5.2 - `goconst`: from 1.6.0 to 1.7.0 - `godot`: from 1.4.15 to 1.4.16 - `gofumpt`: from 0.5.0 to 0.6.0 - `inamedparam`: from 0.1.2 to 0.1.3 - `ineffassign`: from 0.0.0-20230610083614-0e73809eb601 to 0.1.0 - `ireturn`: from 0.2.2 to 0.3.0 - `misspell`: add mode option - `musttag`: from v0.7.2 to v0.8.0 - `paralleltest`: from 1.0.8 to 1.0.9 - `perfsprint`: from 0.2.0 to 0.6.0 - `protogetter`: from 0.2.3 to 0.3.4 - `revive`: from 1.3.4 to 1.3.6 - `sloglint`: add static-msg option - `sloglint`: from 0.1.2 to 0.4.0 - `testifylint`: from 0.2.3 to 1.1.0 - `unparam`: from [`2022122`](https://togithub.com/golangci/golangci-lint/commit/20221223090309)-7455f1af531d to [`2024010`](https://togithub.com/golangci/golangci-lint/commit/20240104100049)-c549a3470d14 - `whitespace`: update after moving to the `analysis` package - `wsl`: from 3.4.0 to 4.2.0 - `zerologlint`: from 0.1.3 to 0.1.5 3. misc. - 🎉 go1.22 support - Implement stats per linter with a flag - fix: make versioning inside Docker image consistent with binaries - fix: parse Go RC version 4. Documentation - Add missing fields to .golangci.reference.yml - Fix noctx description - Improve .golangci.reference.yml defaults - Improve typecheck FAQ - Note that `exhaustruct` struct regular expressions are expected to match the entire `package/name/structname` - Adjust wrapcheck ignoreSigs to new defaults **Important** `testifylint` has [breaking changes](https://togithub.com/Antonboom/testifylint/releases/tag/v1.0.0) about enabling/disabling checks: - If you were using the option `enable` with a filtered list of checks, you should either add `disable-all: true` (1) or use `disable` field (2). ```yml ``` ### Example (1) testifylint: disable-all: true enable: - bool-compare - compares - empty - error-is-as - error-nil - expected-actual - go-require - float-compare - len - nil-compare - require-error ### - suite-dont-use-pkg - suite-extra-assert-call - suite-thelper ``` ```yml ### Example (2) testifylint: disable: - suite-dont-use-pkg ```
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Signed-off-by: Alex Boten Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Alex Boten * [chore] remove unnecessary underscores (#9580) As per feedback from my previous PR Signed-off-by: Alex Boten * Update github-actions deps (#9470) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [Wandalen/wretry.action](https://togithub.com/Wandalen/wretry.action) | action | minor | `v1.3.0` -> `v1.4.4` | | [github/codeql-action](https://togithub.com/github/codeql-action) | action | minor | `v2.23.2` -> `v2.24.1` | | [github/codeql-action](https://togithub.com/github/codeql-action) | action | minor | `v3.23.2` -> `v3.24.1` | --- ### Release Notes
Wandalen/wretry.action (Wandalen/wretry.action) ### [`v1.4.4`](https://togithub.com/Wandalen/wretry.action/compare/v1.4.3...v1.4.4) [Compare Source](https://togithub.com/Wandalen/wretry.action/compare/v1.4.3...v1.4.4) ### [`v1.4.3`](https://togithub.com/Wandalen/wretry.action/compare/v1.4.2...v1.4.3) [Compare Source](https://togithub.com/Wandalen/wretry.action/compare/v1.4.2...v1.4.3) ### [`v1.4.2`](https://togithub.com/Wandalen/wretry.action/compare/v1.4.1...v1.4.2) [Compare Source](https://togithub.com/Wandalen/wretry.action/compare/v1.4.1...v1.4.2) ### [`v1.4.1`](https://togithub.com/Wandalen/wretry.action/compare/v1.4.0...v1.4.1) [Compare Source](https://togithub.com/Wandalen/wretry.action/compare/v1.4.0...v1.4.1) ### [`v1.4.0`](https://togithub.com/Wandalen/wretry.action/compare/v1.3.0...v1.4.0) [Compare Source](https://togithub.com/Wandalen/wretry.action/compare/v1.3.0...v1.4.0)
github/codeql-action (github/codeql-action) ### [`v2.24.1`](https://togithub.com/github/codeql-action/compare/v2.24.0...v2.24.1) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.24.0...v2.24.1) ### [`v2.24.0`](https://togithub.com/github/codeql-action/compare/v2.23.2...v2.24.0) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.23.2...v2.24.0)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update module golang.org/x/tools to v0.18.0 (#9575) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | golang.org/x/tools | `v0.17.0` -> `v0.18.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2ftools/v0.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2ftools/v0.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2ftools/v0.17.0/v0.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2ftools/v0.17.0/v0.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update module golang.org/x/sys to v0.17.0 (#9574) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | golang.org/x/sys | `v0.16.0` -> `v0.17.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fsys/v0.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2fsys/v0.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2fsys/v0.16.0/v0.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fsys/v0.16.0/v0.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Alex Boten * [chore] [exporterhelper] Move shutdown error from queue package (#9554) The error is created by the retry sender and used by the queue sender. It doesn't belong to queue package * [configopaque] Mark as stable (#9427) **Description:** Fixes #9167 * [mdatagen] produce scope name with full url (#9556) This is part of #9494 --------- Signed-off-by: Alex Boten * [chore] add @evan-bradley as triager (#9585) Fixes #9576 * Update module go.opentelemetry.io/contrib/zpages to v0.48.0 (#9570) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/contrib/zpages](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | `v0.47.0` -> `v0.48.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcontrib%2fzpages/v0.48.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcontrib%2fzpages/v0.48.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcontrib%2fzpages/v0.47.0/v0.48.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcontrib%2fzpages/v0.47.0/v0.48.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Alex Boten * [configgrpc] Remove deprecated ServerConfig.ToListener (#9583) Updates https://github.com/open-telemetry/opentelemetry-collector/issues/9481 * [service/telemetry] delete deprecated config types (#9546) **Description:** Delete deprecated config types which have moved to opentelemetry-go-contrib. See https://github.com/open-telemetry/opentelemetry-collector/pull/8620 for the first changes. * [chore] apply some nits to contract_checker. (#9543) The `idSet` struct used a mix of pointer and non-pointer receivers on functions, this is now uniformly using non-pointer functions. * [scraperhelper] Deprecate ScraperControllerSettings, use ControllerConfig instead (#9401) **Description:** Deprecate ScraperControllerSettings, use ~Scraper~ControllerConfig instead **Link to tracking Issue:** #6767 * [chore] [exporterhelper] Remove duplicated code between exporter helpers (#9603) * [chore] Prepare release v1.2.0/v0.95.0 (#9600) The following commands were run to prepare this release: - make chlog-update VERSION=v1.2.0/v0.95.0 - make prepare-release PREVIOUS_VERSION=1.1.0 RELEASE_CANDIDATE=1.2.0 MODSET=stable - make prepare-release PREVIOUS_VERSION=0.94.1 RELEASE_CANDIDATE=0.95.0 MODSET=beta * [chore] Fix dropreplace statements in restore-contrib make target (#9608) * Update to OTLP 1.1, regenerate protos and pdata (#9588) **Description:** Updates to OTLP 1.1, published in January 2024. Updates the `otel/build-protobuf` Docker image to the current release label. User-visible protocol changes: Adds Span flags and SpanLink flags. **Link to tracking Issue:** Fixes #9587 Fixes #9550 **Testing:** `make test` **Documentation:** Could not find any documentation on this process, added some in CONTRIBUTING.md. * Update module google.golang.org/grpc to v1.61.1 (#9606) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google.golang.org/grpc](https://togithub.com/grpc/grpc-go) | `v1.61.0` -> `v1.61.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/google.golang.org%2fgrpc/v1.61.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/google.golang.org%2fgrpc/v1.61.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/google.golang.org%2fgrpc/v1.61.0/v1.61.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/google.golang.org%2fgrpc/v1.61.0/v1.61.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
grpc/grpc-go (google.golang.org/grpc) ### [`v1.61.1`](https://togithub.com/grpc/grpc-go/releases/tag/v1.61.1): Release 1.61.1 [Compare Source](https://togithub.com/grpc/grpc-go/compare/v1.61.0...v1.61.1) ### Bug Fixes - server: wait to close connection until incoming socket is drained (with timeout) to prevent data loss on client-side ([#​6977](https://togithub.com/grpc/grpc-go/issues/6977)) - Special Thanks: [@​s-matyukevich](https://togithub.com/s-matyukevich) for discovering the root cause
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Bogdan Drutu * Update module github.com/prometheus/client_model to v0.6.0 (#9607) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/prometheus/client_model](https://togithub.com/prometheus/client_model) | `v0.5.0` -> `v0.6.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fclient_model/v0.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fclient_model/v0.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fclient_model/v0.5.0/v0.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fclient_model/v0.5.0/v0.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
prometheus/client_model (github.com/prometheus/client_model) ### [`v0.6.0`](https://togithub.com/prometheus/client_model/releases/tag/v0.6.0) [Compare Source](https://togithub.com/prometheus/client_model/compare/v0.5.0...v0.6.0) #### What's Changed - Add unit field to MetricFamily proto message by [@​vesari](https://togithub.com/vesari) in [https://github.com/prometheus/client_model/pull/75](https://togithub.com/prometheus/client_model/pull/75) - add exemplar to native histogram by [@​fatsheep9146](https://togithub.com/fatsheep9146) in [https://github.com/prometheus/client_model/pull/80](https://togithub.com/prometheus/client_model/pull/80) #### New Contributors - [@​vesari](https://togithub.com/vesari) made their first contribution in [https://github.com/prometheus/client_model/pull/75](https://togithub.com/prometheus/client_model/pull/75) - [@​fatsheep9146](https://togithub.com/fatsheep9146) made their first contribution in [https://github.com/prometheus/client_model/pull/80](https://togithub.com/prometheus/client_model/pull/80) **Full Changelog**: https://github.com/prometheus/client_model/compare/v0.5.0...v0.6.0
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update module go.opentelemetry.io/collector/exporter/otlphttpexporter to v0.95.0 (#9619) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/collector/exporter/otlphttpexporter](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.94.1` -> `v0.95.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.95.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.95.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.94.1/v0.95.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.94.1/v0.95.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/exporter/otlphttpexporter) ### [`v0.95.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v120v0950) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.94.1...v0.95.0) ##### 🛑 Breaking changes 🛑 - `all`: scope name for all generated Meter/Tracer funcs now includes full package name ([#​9494](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9494)) ##### 💡 Enhancements 💡 - `confighttp`: Adds support for Snappy decompression of HTTP requests. ([#​7632](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7632)) - `configretry`: Validate `max_elapsed_time`, ensure it is larger than `max_interval` and `initial_interval` respectively. ([#​9489](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9489)) - `configopaque`: Mark module as stable ([#​9167](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9167)) - `otlphttpexporter`: Add support for json content encoding when exporting telemetry ([#​6945](https://togithub.com/open-telemetry/opentelemetry-collector/issues/6945)) - `confmap/converter/expandconverter, confmap/provider/envprovider, confmap/provider/fileprovider, confmap/provider/httprovider, confmap/provider/httpsprovider, confmap/provider/yamlprovider`: Split confmap.Converter and confmap.Provider implementation packages out of confmap. ([#​4759](https://togithub.com/open-telemetry/opentelemetry-collector/issues/4759), [#​9460](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9460))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update module go.opentelemetry.io/collector/exporter/otlpexporter to v0.95.0 (#9618) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/collector/exporter/otlpexporter](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.94.1` -> `v0.95.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.95.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.95.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.94.1/v0.95.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.94.1/v0.95.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/exporter/otlpexporter) ### [`v0.95.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v120v0950) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.94.1...v0.95.0) ##### 🛑 Breaking changes 🛑 - `all`: scope name for all generated Meter/Tracer funcs now includes full package name ([#​9494](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9494)) ##### 💡 Enhancements 💡 - `confighttp`: Adds support for Snappy decompression of HTTP requests. ([#​7632](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7632)) - `configretry`: Validate `max_elapsed_time`, ensure it is larger than `max_interval` and `initial_interval` respectively. ([#​9489](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9489)) - `configopaque`: Mark module as stable ([#​9167](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9167)) - `otlphttpexporter`: Add support for json content encoding when exporting telemetry ([#​6945](https://togithub.com/open-telemetry/opentelemetry-collector/issues/6945)) - `confmap/converter/expandconverter, confmap/provider/envprovider, confmap/provider/fileprovider, confmap/provider/httprovider, confmap/provider/httpsprovider, confmap/provider/yamlprovider`: Split confmap.Converter and confmap.Provider implementation packages out of confmap. ([#​4759](https://togithub.com/open-telemetry/opentelemetry-collector/issues/4759), [#​9460](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9460))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * [client] Fix race condition in `Metadata.Get` (#9595) **Description:** Fixes a bug where `Get` was not thread safe. **Link to tracking Issue:** Closes https://github.com/open-telemetry/opentelemetry-collector/issues/9594 **Testing:** Tested locally * [chore] fix restore-contrib make task (#9628) Fix a missing backslash, breaking the command, add `configauth` which was missing, and fix the package name `zpagesextension` which has a typo. * [confignet] Remove deprecated structs (#9614) **Description:** Removes deprecated structs **Link to tracking Issue:** Closes https://github.com/open-telemetry/opentelemetry-collector/issues/9509 * [config/configgrpc] [chore] Remove usage of deprecated ToListenerContext (#9582) Not sure why the linter doesn't catch it * [mdatagen] Add flag to indicate seeking new code owners (#9552) Same implementation as https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/31167 * [chore] Fix the build (#9629) Update usage of removed `confignet` API * Update github-actions deps (#9604) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github/codeql-action](https://togithub.com/github/codeql-action) | action | patch | `v2.24.1` -> `v2.24.4` | | [github/codeql-action](https://togithub.com/github/codeql-action) | action | patch | `v3.24.1` -> `v3.24.4` | --- ### Release Notes
github/codeql-action (github/codeql-action) ### [`v2.24.4`](https://togithub.com/github/codeql-action/compare/v2.24.3...v2.24.4) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.24.3...v2.24.4) ### [`v2.24.3`](https://togithub.com/github/codeql-action/compare/v2.24.2...v2.24.3) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.24.2...v2.24.3) ### [`v2.24.2`](https://togithub.com/github/codeql-action/compare/v2.24.1...v2.24.2) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.24.1...v2.24.2)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * [confighttp] Remove deprecated items (#9625) **Description:** Removes deprecated items from `confighttp` **Link to tracking Issue:** Related to https://github.com/open-telemetry/opentelemetry-collector/issues/6767 * [component] Deprecate ErrNilNextConsumer (#9526) **Description:** Deprecate ErrNilNextConsumer and implement nil checks in the builder structs. * [receivertest] add metrics support to contract_checker (#9551) **Description:** add support for metrics in contract checker --------- Co-authored-by: Dmitrii Anoshin * add openssf badge to read me (#9630) The OpenSSF badge is a required part of CNCF project graduation. The self reporting has been completed already and this is to demonstrate publicly we have done the required step. Relevant issue: https://github.com/open-telemetry/community/issues/1942 * [chore] Fix version in ocb (#9638) Fix #9626 by aligning the ocb version with Collector's. Signed-off-by: Juraci Paixão Kröhling * [chore] make genotelcorecol (#9639) Related to https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/28839 * Update github-actions deps (#9643) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [Wandalen/wretry.action](https://togithub.com/Wandalen/wretry.action) | action | patch | `v1.4.4` -> `v1.4.5` | | [github/codeql-action](https://togithub.com/github/codeql-action) | action | patch | `v2.24.4` -> `v2.24.5` | | [github/codeql-action](https://togithub.com/github/codeql-action) | action | patch | `v3.24.4` -> `v3.24.5` | --- ### Release Notes
Wandalen/wretry.action (Wandalen/wretry.action) ### [`v1.4.5`](https://togithub.com/Wandalen/wretry.action/compare/v1.4.4...v1.4.5) [Compare Source](https://togithub.com/Wandalen/wretry.action/compare/v1.4.4...v1.4.5)
github/codeql-action (github/codeql-action) ### [`v2.24.5`](https://togithub.com/github/codeql-action/compare/v2.24.4...v2.24.5) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.24.4...v2.24.5)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * [chore] Add rules for `NewDefault*` pattern (#9640) **Description:** Adds new rules for configuration packages and a `NewDefault*` function to enable backwards-compatible use of the configuration. **Link to tracking Issue:** Related to https://github.com/open-telemetry/opentelemetry-collector/issues/9508 * [confmap] use github.com/go-viper/mapstructure/v2 (#9634) **Description:** Update mapstructure to use a maintained fork, github.com/go-viper/mapstructure/v2. See https://github.com/mitchellh/mapstructure/issues/349 for context **Link to tracking Issue:** #9161 Creating this as WIP to see if all tests pass. * [configretry] Allow max_elapsed_time to be set to 0 (#9653) **Description:** [configretry] Allow max_elapsed_time to be set to 0 **Link to tracking Issue:** https://github.com/open-telemetry/opentelemetry-collector/issues/9641 * [configgrpc] Remove deprecated functions/structs (#9616) **Description:** Removes deprecated functions/structs **Link to tracking Issue:** Related to https://github.com/open-telemetry/opentelemetry-collector/issues/9428 Related to https://github.com/open-telemetry/opentelemetry-collector/issues/9482 Closes https://github.com/open-telemetry/opentelemetry-collector/issues/9481 * [chore] improve troubleshooting docs for collector (#9621) **Description:** Add more troubleshooting docs around metric levels and traces. * Update opentelemetry-go monorepo (#9651) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/otel](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.23.1` -> `v1.24.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel/v1.23.1/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel/v1.23.1/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/bridge/opencensus](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.23.1` -> `v1.24.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fbridge%2fopencensus/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fbridge%2fopencensus/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fbridge%2fopencensus/v1.23.1/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fbridge%2fopencensus/v1.23.1/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.23.1` -> `v1.24.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetricgrpc/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetricgrpc/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetricgrpc/v1.23.1/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetricgrpc/v1.23.1/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.23.1` -> `v1.24.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetrichttp/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetrichttp/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetrichttp/v1.23.1/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetrichttp/v1.23.1/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.23.1` -> `v1.24.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracegrpc/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracegrpc/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracegrpc/v1.23.1/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracegrpc/v1.23.1/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.23.1` -> `v1.24.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracehttp/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracehttp/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracehttp/v1.23.1/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracehttp/v1.23.1/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/prometheus](https://togithub.com/open-telemetry/opentelemetry-go) | `v0.45.2` -> `v0.46.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fprometheus/v0.46.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fprometheus/v0.46.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fprometheus/v0.45.2/v0.46.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fprometheus/v0.45.2/v0.46.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/stdout/stdoutmetric](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.23.1` -> `v1.24.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdoutmetric/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdoutmetric/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdoutmetric/v1.23.1/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdoutmetric/v1.23.1/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/stdout/stdouttrace](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.23.1` -> `v1.24.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdouttrace/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdouttrace/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdouttrace/v1.23.1/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdouttrace/v1.23.1/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/metric](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.23.1` -> `v1.24.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fmetric/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fmetric/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fmetric/v1.23.1/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fmetric/v1.23.1/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/sdk](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.23.1` -> `v1.24.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fsdk/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fsdk/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fsdk/v1.23.1/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fsdk/v1.23.1/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/sdk/metric](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.23.1` -> `v1.24.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fsdk%2fmetric/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fsdk%2fmetric/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fsdk%2fmetric/v1.23.1/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fsdk%2fmetric/v1.23.1/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/trace](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.23.1` -> `v1.24.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2ftrace/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2ftrace/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2ftrace/v1.23.1/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2ftrace/v1.23.1/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-go (go.opentelemetry.io/otel) ### [`v1.24.0`](https://togithub.com/open-telemetry/opentelemetry-go/releases/tag/v1.24.0): /v0.46.0/v0.0.1-alpha [Compare Source](https://togithub.com/open-telemetry/opentelemetry-go/compare/v1.23.1...v1.24.0) This release is the last to support [Go 1.20]. The next release will require at least [Go 1.21]. ##### Added - Support [Go 1.22]. ([#​4890](https://togithub.com/open-telemetry/opentelemetry-go/issues/4890)) - Add exemplar support to `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. ([#​4900](https://togithub.com/open-telemetry/opentelemetry-go/issues/4900)) - Add exemplar support to `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. ([#​4900](https://togithub.com/open-telemetry/opentelemetry-go/issues/4900)) - The `go.opentelemetry.io/otel/log` module is added. This module includes OpenTelemetry Go's implementation of the Logs Bridge API. This module is in an alpha state, it is subject to breaking changes. See our [versioning policy](./VERSIONING.md) for more info. ([#​4961](https://togithub.com/open-telemetry/opentelemetry-go/issues/4961)) ##### Fixed - Fix registration of multiple callbacks when using the global meter provider from `go.opentelemetry.io/otel`. ([#​4945](https://togithub.com/open-telemetry/opentelemetry-go/issues/4945)) - Fix negative buckets in output of exponential histograms. ([#​4956](https://togithub.com/open-telemetry/opentelemetry-go/issues/4956)) ##### New Contributors - [@​kevinburkesegment](https://togithub.com/kevinburkesegment) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/4920](https://togithub.com/open-telemetry/opentelemetry-go/pull/4920) - [@​yizeng](https://togithub.com/yizeng) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/4947](https://togithub.com/open-telemetry/opentelemetry-go/pull/4947) - [@​ntriamme](https://togithub.com/ntriamme) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/4945](https://togithub.com/open-telemetry/opentelemetry-go/pull/4945) - [@​ericayin](https://togithub.com/ericayin) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/4956](https://togithub.com/open-telemetry/opentelemetry-go/pull/4956) **Full Changelog**: https://github.com/open-telemetry/opentelemetry-go/compare/v1.23.1...v1.24.0 [Go 1.22]: https://go.dev/doc/go1.22 [Go 1.21]: https://go.dev/doc/go1.21 [Go 1.20]: https://go.dev/doc/go1.20
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update module go.opentelemetry.io/contrib/zpages to v0.49.0 (#9649) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/contrib/zpages](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | `v0.48.0` -> `v0.49.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcontrib%2fzpages/v0.49.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcontrib%2fzpages/v0.49.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcontrib%2fzpages/v0.48.0/v0.49.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcontrib%2fzpages/v0.48.0/v0.49.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update module github.com/golangci/golangci-lint to v1.56.2 (#9605) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/golangci/golangci-lint](https://togithub.com/golangci/golangci-lint) | `v1.56.1` -> `v1.56.2` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgolangci%2fgolangci-lint/v1.56.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fgolangci%2fgolangci-lint/v1.56.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fgolangci%2fgolangci-lint/v1.56.1/v1.56.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgolangci%2fgolangci-lint/v1.56.1/v1.56.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
golangci/golangci-lint (github.com/golangci/golangci-lint) ### [`v1.56.2`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1562) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.56.1...v1.56.2) 1. updated linters - `go-critic`: from 0.11.0 to 0.11.1 - `gosec`: from 2.18.2 to 2.19.0 - `testifylint`: from 1.1.1 to 1.1.2 - `usestdlibvars`: from 1.24.0 to 1.25.0 - `wsl`: from 4.2.0 to 4.2.1 2. misc. - Fix missing version in Docker image 3. Documentation - Explain the limitation of new-from-rev and new-from-patch
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Update module github.com/prometheus/client_golang to v1.19.0 (#9652) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/prometheus/client_golang](https://togithub.com/prometheus/client_golang) | `v1.18.0` -> `v1.19.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fclient_golang/v1.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fclient_golang/v1.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fclient_golang/v1.18.0/v1.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fclient_golang/v1.18.0/v1.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
prometheus/client_golang (github.com/prometheus/client_golang) ### [`v1.19.0`](https://togithub.com/prometheus/client_golang/releases/tag/v1.19.0) [Compare Source](https://togithub.com/prometheus/client_golang/compare/v1.18.0...v1.19.0) #### What's Changed The module `prometheus/common v0.48.0` introduced a bug when used together with client_golang. If your project uses client_golang and you want to use `prometheus/common v0.48.0` or higher, please update client_golang to v1.19.0. - \[CHANGE] Minimum required go version is now 1.20 (we also test client_golang against new 1.22 version). [#​1445](https://togithub.com/prometheus/client_golang/issues/1445) [#​1449](https://togithub.com/prometheus/client_golang/issues/1449) - \[FEATURE] collectors: Add version collector. [#​1422](https://togithub.com/prometheus/client_golang/issues/1422) [#​1427](https://togithub.com/prometheus/client_golang/issues/1427) #### New Contributors - [@​michurin](https://togithub.com/michurin) made their first contribution in [https://github.com/prometheus/client_golang/pull/1423](https://togithub.com/prometheus/client_golang/pull/1423) - [@​kavu](https://togithub.com/kavu) made their first contribution in [https://github.com/prometheus/client_golang/pull/1445](https://togithub.com/prometheus/client_golang/pull/1445) - [@​ywwg](https://togithub.com/ywwg) made their first contribution in [https://github.com/prometheus/client_golang/pull/1448](https://togithub.com/prometheus/client_golang/pull/1448) **Full Changelog**: https://github.com/prometheus/client_golang/compare/v1.18.0...v1.19.0
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Update module github.com/klauspost/compress to v1.17.7 (#9644) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/klauspost/compress](https://togithub.com/klauspost/compress) | `v1.17.6` -> `v1.17.7` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fklauspost%2fcompress/v1.17.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fklauspost%2fcompress/v1.17.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fklauspost%2fcompress/v1.17.6/v1.17.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fklauspost%2fcompress/v1.17.6/v1.17.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
klauspost/compress (github.com/klauspost/compress) ### [`v1.17.7`](https://togithub.com/klauspost/compress/releases/tag/v1.17.7) [Compare Source](https://togithub.com/klauspost/compress/compare/v1.17.6...v1.17.7) #### What's Changed - s2: Add AsyncFlush method: Complete the block without flushing by [@​Jille](https://togithub.com/Jille) in [https://github.com/klauspost/compress/pull/927](https://togithub.com/klauspost/compress/pull/927) - s2: Fix literal+repeat exceeds dst crash by [@​klauspost](https://togithub.com/klauspost) in [https://github.com/klauspost/compress/pull/930](https://togithub.com/klauspost/compress/pull/930) **Full Changelog**: https://github.com/klauspost/compress/compare/v1.17.6...v1.17.7
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Dmitrii Anoshin * Update module go.opentelemetry.io/contrib/propagators/b3 to v1.24.0 (#9648) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/contrib/propagators/b3](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | `v1.23.0` -> `v1.24.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcontrib%2fpropagators%2fb3/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcontrib%2fpropagators%2fb3/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcontrib%2fpropagators%2fb3/v1.23.0/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcontrib%2fpropagators%2fb3/v1.23.0/v1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-go-contrib (go.opentelemetry.io/contrib/propagators/b3) ### [`v1.24.0`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v1.24.0): /v0.49.0/v0.18.0/v0.4.0 [Compare Source](https://togithub.com/open-telemetry/opentelemetry-go-contrib/compare/v1.23.0...v1.24.0) This release is the last to support [Go 1.20]. The next release will require at least [Go 1.21]. ##### Added - Support [Go 1.22]. ([#​5082](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/5082)) - Add support for Summary metrics to `go.opentelemetry.io/contrib/bridges/prometheus`. ([#​5089](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/5089)) - Add support for Exponential (native) Histograms in `go.opentelemetry.io/contrib/bridges/prometheus`. ([#​5093](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/5093)) ##### Removed - The deprecated `RequestCount` constant in `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` is removed. ([#​4894](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/4894)) - The deprecated `RequestContentLength` constant in `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` is removed. ([#​4894](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/4894)) - The deprecated `ResponseContentLength` constant in `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` is removed. ([#​4894](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/4894)) - The deprecated `ServerLatency` constant in `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` is removed. ([#​4894](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/4894)) ##### Fixed - Retrieving the body bytes count in `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` does not cause a data race anymore. ([#​5080](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/5080)) #### New Contributors - [@​arvindbr8](https://togithub.com/arvindbr8) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go-contrib/pull/4897](https://togithub.com/open-telemetry/opentelemetry-go-contrib/pull/4897) - [@​wushujames](https://togithub.com/wushujames) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go-contrib/pull/5135](https://togithub.com/open-telemetry/opentelemetry-go-contrib/pull/5135) **Full Changelog**: https://github.com/open-telemetry/opentelemetry-go-contrib/compare/v1.23.0...v1.24.0 [Go 1.22]: https://go.dev/doc/go1.22 [Go 1.21]: https://go.dev/doc/go1.21 [Go 1.20]: https://go.dev/doc/go1.20
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Update module go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp to v0.49.0 (#9646) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | `v0.47.0` -> `v0.49.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fnet%2fhttp%2fotelhttp/v0.49.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fnet%2fhttp%2fotelhttp/v0.49.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fnet%2fhttp%2fotelhttp/v0.47.0/v0.49.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fnet%2fhttp%2fotelhttp/v0.47.0/v0.49.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [chore] troubleshootings docs fix yaml code highlighting (#9659) * Update module go.opentelemetry.io/collector/receiver/otlpreceiver to v0.95.0 (#9613) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/collector/receiver/otlpreceiver](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.94.1` -> `v0.95.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.95.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.95.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.94.1/v0.95.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.94.1/v0.95.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/receiver/otlpreceiver) ### [`v0.95.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v120v0950) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.94.1...v0.95.0) ##### 🛑 Breaking changes 🛑 - `all`: scope name for all generated Meter/Tracer funcs now includes full package name ([#​9494](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9494)) ##### 💡 Enhancements 💡 - `confighttp`: Adds support for Snappy decompression of HTTP requests. ([#​7632](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7632)) - `configretry`: Validate `max_elapsed_time`, ensure it is larger than `max_interval` and `initial_interval` respectively. ([#​9489](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9489)) - `configopaque`: Mark module as stable ([#​9167](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9167)) - `otlphttpexporter`: Add support for json content encoding when exporting telemetry ([#​6945](https://togithub.com/open-telemetry/opentelemetry-collector/issues/6945)) - `confmap/converter/expandconverter, confmap/provider/envprovider, confmap/provider/fileprovider, confmap/provider/httprovider, confmap/provider/httpsprovider, confmap/provider/yamlprovider`: Split confmap.Converter and confmap.Provider implementation packages out of confmap. ([#​4759](https://togithub.com/open-telemetry/opentelemetry-collector/issues/4759), [#​9460](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9460))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Update module go.uber.org/zap to v1.27.0 (#9620) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.uber.org/zap](https://togithub.com/uber-go/zap) | `v1.26.0` -> `v1.27.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.uber.org%2fzap/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.uber.org%2fzap/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.uber.org%2fzap/v1.26.0/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.uber.org%2fzap/v1.26.0/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
uber-go/zap (go.uber.org/zap) ### [`v1.27.0`](https://togithub.com/uber-go/zap/releases/tag/v1.27.0) [Compare Source](https://togithub.com/uber-go/zap/compare/v1.26.0...v1.27.0) Enhancements: - [#​1378][]: Add `WithLazy` method for `SugaredLogger`. - [#​1399][]: zaptest: Add `NewTestingWriter` for customizing TestingWriter with more flexibility than `NewLogger`. - [#​1406][]: Add `Log`, `Logw`, `Logln` methods for `SugaredLogger`. - [#​1416][]: Add `WithPanicHook` option for testing panic logs. Thanks to [@​defval](https://togithub.com/defval), [@​dimmo](https://togithub.com/dimmo), [@​arxeiss](https://togithub.com/arxeiss), and [@​MKrupauskas](https://togithub.com/MKrupauskas) for their contributions to this release. [#​1378]: https://togithub.com/uber-go/zap/pull/1378 [#​1399]: https://togithub.com/uber-go/zap/pull/1399 [#​1406]: https://togithub.com/uber-go/zap/pull/1406 [#​1416]: https://togithub.com/uber-go/zap/pull/1416
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Update module go.opentelemetry.io/contrib/config to v0.4.0 (#9645) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/contrib/config](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | `v0.3.0` -> `v0.4.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcontrib%2fconfig/v0.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcontrib%2fconfig/v0.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcontrib%2fconfig/v0.3.0/v0.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcontrib%2fconfig/v0.3.0/v0.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [configtls] Rename config structs for consistency (#9495) **Description:** Simply renames a few structs in the `configtls` package for consistence. `TLSClientSetting` to `ClientConfig` `TLSServerSetting` to `ServerConfig` `TLSSetting` to `Config` **Link to tracking Issue:** Fixes #9474 * [configtls] add include_system_ca_certs_pool (#9142) **Description:** Add `include_system_ca_certs_pool` to configtls, allowing to load system certs and additional custom certs. **Link to tracking Issue:** Fixes #7774 * [otelcol] Allow passing confmap.Providers to otelcol.Collector (#9228) **Description:** One way to work toward https://github.com/open-telemetry/opentelemetry-collector/issues/4759. This implements the second approach that I've outlined here: https://github.com/open-telemetry/opentelemetry-collector/issues/4759#issuecomment-1863082504. I think the main advantage of this approach is that it cleans up the API for the package. `otelcol.ConfigProvider` is a fairly thin wrapper around `confmap.Resolver`, so I think we could ultimately remove the interface, and any custom functionality for config merging or unmarshaling could be exposed to users through settings rather through a custom implementation. **Link to tracking Issue:** Works toward https://github.com/open-telemetry/opentelemetry-collector/issues/4759 **Testing:** Unit tests **Documentation:** Added Godoc comments. * [chore] Remove or update mentions to spanmetrics processor (#9665) **Description:** Updates mentions to `spanmetrics` processor and references `spanmetrics` connector instead if applicable. **Link to tracking Issue:** Relates to open-telemetry/opentelemetry-collector-contrib#29567 * [chore] update codeboten affiliation (#9662) Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Update github-actions deps (major) (#9426) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/checkout](https://togithub.com/actions/checkout) | action | major | `v3.6.0` -> `v4.1.1` | | [actions/upload-artifact](https://togithub.com/actions/upload-artifact) | action | major | `v3.1.3` -> `v4.3.1` | | [github/codeql-action](https://togithub.com/github/codeql-action) | action | major | `v2.24.5` -> `v3.24.6` | --- ### Release Notes
actions/checkout (actions/checkout) ### [`v4.1.1`](https://togithub.com/actions/checkout/releases/tag/v4.1.1) [Compare Source](https://togithub.com/actions/checkout/compare/v4.1.0...v4.1.1) ##### What's Changed - Update CODEOWNERS to Launch team by [@​joshmgross](https://togithub.com/joshmgross) in [https://github.com/actions/checkout/pull/1510](https://togithub.com/actions/checkout/pull/1510) - Correct link to GitHub Docs by [@​peterbe](https://togithub.com/peterbe) in [https://github.com/actions/checkout/pull/1511](https://togithub.com/actions/checkout/pull/1511) - Link to release page from what's new section by [@​cory-miller](https://togithub.com/cory-miller) in [https://github.com/actions/checkout/pull/1514](https://togithub.com/actions/checkout/pull/1514) ##### New Contributors - [@​joshmgross](https://togithub.com/joshmgross) made their first contribution in [https://github.com/actions/checkout/pull/1510](https://togithub.com/actions/checkout/pull/1510) - [@​peterbe](https://togithub.com/peterbe) made their first contribution in [https://github.com/actions/checkout/pull/1511](https://togithub.com/actions/checkout/pull/1511) **Full Changelog**: https://github.com/actions/checkout/compare/v4.1.0...v4.1.1 ### [`v4.1.0`](https://togithub.com/actions/checkout/blob/HEAD/CHANGELOG.md#v410) [Compare Source](https://togithub.com/actions/checkout/compare/v4.0.0...v4.1.0) - [Add support for partial checkout filters](https://togithub.com/actions/checkout/pull/1396) ### [`v4.0.0`](https://togithub.com/actions/checkout/blob/HEAD/CHANGELOG.md#v400) [Compare Source](https://togithub.com/actions/checkout/compare/v3.6.0...v4.0.0) - [Support fetching without the --progress option](https://togithub.com/actions/checkout/pull/1067) - [Update to node20](https://togithub.com/actions/checkout/pull/1436)
actions/upload-artifact (actions/upload-artifact) ### [`v4.3.1`](https://togithub.com/actions/upload-artifact/releases/tag/v4.3.1) [Compare Source](https://togithub.com/actions/upload-artifact/compare/v4.3.0...v4.3.1) - Bump [@​actions/artifacts](https://togithub.com/actions/artifacts) to latest version to include [updated GHES host check](https://togithub.com/actions/toolkit/pull/1648) ### [`v4.3.0`](https://togithub.com/actions/upload-artifact/releases/tag/v4.3.0) [Compare Source](https://togithub.com/actions/upload-artifact/compare/v4.2.0...v4.3.0) ##### What's Changed - Reorganize upload code in prep for merge logic & add more tests by [@​robherley](https://togithub.com/robherley) in [https://github.com/actions/upload-artifact/pull/504](https://togithub.com/actions/upload-artifact/pull/504) - Add sub-action to merge artifacts by [@​robherley](https://togithub.com/robherley) in [https://github.com/actions/upload-artifact/pull/505](https://togithub.com/actions/upload-artifact/pull/505) **Full Changelog**: https://github.com/actions/upload-artifact/compare/v4...v4.3.0 ### [`v4.2.0`](https://togithub.com/actions/upload-artifact/releases/tag/v4.2.0) [Compare Source](https://togithub.com/actions/upload-artifact/compare/v4.1.0...v4.2.0) ##### What's Changed - Ability to overwrite an Artifact by [@​robherley](https://togithub.com/robherley) in [https://github.com/actions/upload-artifact/pull/501](https://togithub.com/actions/upload-artifact/pull/501) **Full Changelog**: https://github.com/actions/upload-artifact/compare/v4...v4.2.0 ### [`v4.1.0`](https://togithub.com/actions/upload-artifact/releases/tag/v4.1.0) [Compare Source](https://togithub.com/actions/upload-artifact/compare/v4.0.0...v4.1.0) #### What's Changed - Add migrations docs by [@​robherley](https://togithub.com/robherley) in [https://github.com/actions/upload-artifact/pull/482](https://togithub.com/actions/upload-artifact/pull/482) - Update README.md by [@​samuelwine](https://togithub.com/samuelwine) in [https://github.com/actions/upload-artifact/pull/492](https://togithub.com/actions/upload-artifact/pull/492) - Support artifact-url output by [@​konradpabjan](https://togithub.com/konradpabjan) in [https://github.com/actions/upload-artifact/pull/496](https://togithub.com/actions/upload-artifact/pull/496) - Update readme to reflect new 500 artifact per job limit by [@​robherley](https://togithub.com/robherley) in [https://github.com/actions/upload-artifact/pull/497](https://togithub.com/actions/upload-artifact/pull/497) #### New Contributors - [@​samuelwine](https://togithub.com/samuelwine) made their first contribution in [https://github.com/actions/upload-artifact/pull/492](https://togithub.com/actions/upload-artifact/pull/492) **Full Changelog**: https://github.com/actions/upload-artifact/compare/v4...v4.1.0 ### [`v4.0.0`](https://togithub.com/actions/upload-artifact/releases/tag/v4.0.0) [Compare Source](https://togithub.com/actions/upload-artifact/compare/v3.1.3...v4.0.0) #### What's Changed The release of upload-artifact@v4 and download-artifact@v4 are major changes to the backend architecture of Artifacts. They have numerous performance and behavioral improvements. For more information, see the [@​actions/artifact](https://togithub.com/actions/toolkit/tree/main/packages/artifact) documentation. #### New Contributors - [@​vmjoseph](https://togithub.com/vmjoseph) made their first contribution in [https://github.com/actions/upload-artifact/pull/464](https://togithub.com/actions/upload-artifact/pull/464) **Full Changelog**: https://github.com/actions/upload-artifact/compare/v3...v4.0.0
github/codeql-action (github/codeql-action) ### [`v3.24.6`](https://togithub.com/github/codeql-action/compare/v3.24.5...v3.24.6) [Compare Source](https://togithub.com/github/codeql-action/compare/v3.24.5...v3.24.6) ### [`v3.24.5`](https://togithub.com/github/codeql-action/compare/v3.24.4...v3.24.5) [Compare Source](https://togithub.com/github/codeql-action/compare/v3.24.4...v3.24.5) ### [`v3.24.4`](https://togithub.com/github/codeql-action/compare/v3.24.3...v3.24.4) [Compare Source](https://togithub.com/github/codeql-action/compare/v3.24.3...v3.24.4) ### [`v3.24.3`](https://togithub.com/github/codeql-action/compare/v3.24.2...v3.24.3) [Compare Source](https://togithub.com/github/codeql-action/compare/v3.24.2...v3.24.3) ### [`v3.24.2`](https://togithub.com/github/codeql-action/compare/v3.24.1...v3.24.2) [Compare Source](https://togithub.com/github/codeql-action/compare/v3.24.1...v3.24.2) ### [`v3.24.1`](https://togithub.com/github/codeql-action/compare/v3.24.0...v3.24.1) [Compare Source](https://togithub.com/github/codeql-action/compare/v3.24.0...v3.24.1) ### [`v3.24.0`](https://togithub.com/github/codeql-action/compare/v3.23.2...v3.24.0) [Compare Source](https://togithub.com/github/codeql-action/compare/v3.23.2...v3.24.0) ### [`v3.23.2`](https://togithub.com/github/codeql-action/compare/v3.23.1...v3.23.2) [Compare Source](https://togithub.com/github/codeql-action/compare/v3.23.1...v3.23.2) ### [`v3.23.1`](https://togithub.com/github/codeql-action/compare/v3.23.0...v3.23.1) [Compare Source](https://togithub.com/github/codeql-action/compare/v3.23.0...v3.23.1) ### [`v3.23.0`](https://togithub.com/github/codeql-action/compare/v3.22.12...v3.23.0) [Compare Source](https://togithub.com/github/codeql-action/compare/v3.22.12...v3.23.0) ### [`v3.22.12`](https://togithub.com/github/codeql-action/compare/v3.22.11...v3.22.12) [Compare Source](https://togithub.com/github/codeql-action/compare/v3.22.11...v3.22.12) ### [`v3.22.11`](https://togithub.com/github/codeql-action/compare/v2.22.11...v3.22.11) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.24.5...v3.22.11)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update module google.golang.org/grpc to v1.62.0 (#9650) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google.golang.org/grpc](https://togithub.com/grpc/grpc-go) | `v1.61.1` -> `v1.62.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/google.golang.org%2fgrpc/v1.62.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/google.golang.org%2fgrpc/v1.62.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/google.golang.org%2fgrpc/v1.61.1/v1.62.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/google.golang.org%2fgrpc/v1.61.1/v1.62.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
grpc/grpc-go (google.golang.org/grpc) ### [`v1.62.0`](https://togithub.com/grpc/grpc-go/releases/tag/v1.62.0): Release 1.62.0 [Compare Source](https://togithub.com/grpc/grpc-go/compare/v1.61.1...v1.62.0) ### New Features - grpc: Add StaticMethod CallOption as a signal to stats handler that a method is safe to use as an instrument key ([#​6986](https://togithub.com/grpc/grpc-go/issues/6986)) ### Behavior Changes - grpc: Return canonical target string from ClientConn.Target() and resolver.Address.String() ([#​6923](https://togithub.com/grpc/grpc-go/issues/6923)) ### Bug Fixes - server: wait to close connection until incoming socket is drained (with timeout) to prevent data loss on client-side ([#​6977](https://togithub.com/grpc/grpc-go/issues/6977)) - Special Thanks: [@​s-matyukevich](https://togithub.com/s-matyukevich) for discovering the root cause ### Performance Improvements - \*: Allow building without `x/net/trace` by using `grpcnotrace` to enable dead code elimination ([#​6954](https://togithub.com/grpc/grpc-go/issues/6954)) - Special Thanks: [@​hugelgupf](https://togithub.com/hugelgupf) - rand: improve performance and simplify implementation of `grpcrand` by adopting `math/rand`'s top-level functions for go version 1.21.0 and newer. ([#​6925](https://togithub.com/grpc/grpc-go/issues/6925)) - Special Thanks: [@​kmirzavaziri](https://togithub.com/kmirzavaziri) ### Dependencies - \*: Use google.golang.org/protobuf/proto instead of github.com/golang/protobuf. ([#​6919](https://togithub.com/grpc/grpc-go/issues/6919)) - Special Thanks: [@​Clement-Jean](https://togithub.com/Clement-Jean) > \[!NOTE] > The above change in proto library usage introduces a minor behavior change within those libraries. The old `github.com/golang/protobuf` library would error if given a `nil` message to `Marshal`, while the new `google.golang.org/protobuf` library will successfully output zero bytes in this case. This means server method handlers that did `return nil, nil` will now return an empty message and no error, while it used to return an error. This also affects the client side, where clients sending `nil` messages used to fail without sending the RPC, and now they will send an empty message.
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [chore] validate version format to prepare-release workflow (#9409) **Description:** enhance the "Automation - Prepare Release" GitHub Actions workflow by adding version format validation. The workflow now includes a new job, "validate-version," which checks whether the provided version inputs match the expected schema **Link to tracking Issue:** #7627 --------- Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> * [chore] fixes intendation issues in yaml file (#9668) fixes the intendation issue at: https://github.com/open-telemetry/opentelemetry-collector/blob/main/.github/workflows/prepare-release.yml **Description:** Refer - https://github.com/open-telemetry/opentelemetry-collector/pull/9409#issuecomment-1972971296 * [configgrpc] Add `ToServerContext` (#9624) Adds a new function, `ToServerContext` which does what `ToServer` does, but takes a `context.Context`. After the next release we'll deprecate `ToServerContext` and rename it to `ToServer`. Related to https://github.com/open-telemetry/opentelemetry-collector/issues/9490 --------- Co-authored-by: Dmitrii Anoshin * [chore] Fix prepare-release.yml (#9675) **Description:** Fixes https://github.com/open-telemetry/opentelemetry-collector/actions/runs/8139621131/workflow ``` The workflow is not valid. .github/workflows/prepare-release.yml (Line: 54, Col: 9): Job 'prepare-release' depends on unknown job 'validate-version'. ``` #9409 introduced some errors because the workflow is not tested on PRs, #9668 partly fixed them and I mistakenly believed Github would notify me of further errors in the workflow, the same way it did with this one, but it did not. * [chore] Prepare release v1.3.0/v0.96.0 (#9680) The following commands were run to prepare this release: - make chlog-update VERSION=v1.3.0/v0.96.0 - make prepare-release PREVIOUS_VERSION=1.2.0 RELEASE_CANDIDATE=1.3.0 MODSET=stable - make prepare-release PREVIOUS_VERSION=0.95.0 RELEASE_CANDIDATE=0.96.0 MODSET=beta --------- Signed-off-by: Bogdan Drutu Signed-off-by: Alex Boten Signed-off-by: dependabot[bot] Signed-off-by: Yuri Shkuro Signed-off-by: Matthieu MOREL Signed-off-by: Anthony J Mirabella Signed-off-by: Juraci Paixão Kröhling Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> Co-authored-by: Bogdan Drutu Co-authored-by: Alex Boten Co-authored-by: Curtis Robert Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Pablo Baeyens Co-authored-by: Dmitrii Anoshin Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Antoine Toulme Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Co-authored-by: Steve Flanders Co-authored-by: Pablo Baeyens Co-authored-by: VihasMakwana <121151420+VihasMakwana@users.noreply.github.com> Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com> Co-authored-by: Antoine Toulme Co-authored-by: joseg2 <9097155+joseg2@users.noreply.github.com> Co-authored-by: Yuri Shkuro Co-authored-by: Howard Cheung Co-authored-by: splunkertimn <109310003+timannguyen@users.noreply.github.com> Co-authored-by: Matthieu MOREL Co-authored-by: Andrzej Stencel Co-authored-by: Alex Boten Co-authored-by: Berkeli Halmyradov Co-authored-by: Joshua MacDonald Co-authored-by: Paulo Janotti Co-authored-by: Elena Nuretdinova <109675364+enuret@users.noreply.github.com> Co-authored-by: Anthony Mirabella Co-authored-by: Tal Vintrob Co-authored-by: Yang Song Co-authored-by: Justin Mason Co-authored-by: Cosmin Lazar Co-authored-by: Daniel Jaglowski Co-authored-by: Carter Socha <43380952+cartersocha@users.noreply.github.com> Co-authored-by: Juraci Paixão Kröhling Co-authored-by: Raj Nishtala <113392743+rnishtala-sumo@users.noreply.github.com> Co-authored-by: Povilas Versockas Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> Co-authored-by: Povilas Versockas Co-authored-by: Arjun Mahishi Co-authored-by: Sanket Teli <104385297+Sanket-0510@users.noreply.github.com> --- .chloggen/TEMPLATE.yaml | 2 +- .chloggen/builder-env.yaml | 25 - .../codeboten_deprecate-obsreporttest.yaml | 29 - .chloggen/codeboten_obsreport-dep.yaml | 29 - .chloggen/codeboten_obsreport-processor.yaml | 30 - .chloggen/codeboten_obsreport-scraper.yaml | 32 - .chloggen/codeboten_rm-pipelineconfig.yaml | 25 - .chloggen/codeboten_split-otelcol-module.yaml | 25 - .chloggen/codeboten_split-service-module.yaml | 25 - .chloggen/debug-exporter-2.yaml | 17 - .chloggen/debug-exporter.yaml | 16 - .chloggen/fix-incorrect-use-of-fsnotify.yaml | 25 - .chloggen/log-featuregates.yaml | 25 - .chloggen/s390x-platform-enablement.yaml | 16 - .codecov.yml | 1 + .gitattributes | 5 + .github/ISSUE_TEMPLATE/bug_report.md | 18 +- .github/ISSUE_TEMPLATE/feature_request.md | 4 +- .github/ISSUE_TEMPLATE/stabilization.md | 25 + .github/dependabot.yml | 194 -- .github/pull_request_template.md | 16 +- .github/workflows/api-compatibility.yml | 13 +- .github/workflows/build-and-test-windows.yaml | 12 +- .github/workflows/build-and-test.yml | 77 +- .../workflows/builder-integration-test.yaml | 9 +- .github/workflows/builder-release.yaml | 10 +- .github/workflows/changelog.yml | 11 +- .github/workflows/check-links.yaml | 11 +- .github/workflows/codeql-analysis.yml | 19 +- .github/workflows/contrib-tests.yml | 51 +- .github/workflows/create-dependabot-pr.yml | 18 - .../generate-semantic-conventions-pr.yaml | 109 ++ .github/workflows/milestone-add-to-pr.yml | 2 +- .github/workflows/perf.yml | 9 +- .github/workflows/prepare-release.yml | 37 +- .github/workflows/scorecard.yml | 69 + .github/workflows/scripts/dependabot-pr.sh | 46 - .../scripts/release-prepare-release.sh | 8 +- .github/workflows/shellcheck.yml | 7 +- .github/workflows/stale-pr.yaml | 8 +- .github/workflows/tidy-dependencies.yml | 22 +- .golangci.yml | 6 +- CHANGELOG-API.md | 217 +++ CHANGELOG.md | 263 +++ CONTRIBUTING.md | 47 +- Makefile | 277 ++- Makefile.Common | 21 +- README.md | 25 +- VERSIONING.md | 86 +- client/client.go | 26 +- client/client_test.go | 10 +- client/package_test.go | 14 + cmd/builder/README.md | 18 +- cmd/builder/go.mod | 16 +- cmd/builder/go.sum | 32 +- cmd/builder/internal/builder/config.go | 40 +- cmd/builder/internal/builder/config_test.go | 33 + cmd/builder/internal/builder/main.go | 49 +- cmd/builder/internal/builder/main_test.go | 21 +- cmd/builder/internal/builder/package_test.go | 14 + .../internal/builder/templates/go.mod.tmpl | 7 +- .../internal/builder/templates/main.go.tmpl | 8 +- .../builder/templates/main_others.go.tmpl | 1 - .../builder/templates/main_windows.go.tmpl | 39 +- cmd/builder/internal/command.go | 8 +- cmd/builder/internal/config/default.yaml | 25 +- cmd/builder/internal/package_test.go | 14 + cmd/builder/internal/version.go | 24 +- cmd/builder/test/core.builder.yaml | 15 +- cmd/builder/test/default.otel.yaml | 22 - cmd/mdatagen/Makefile | 1 + cmd/mdatagen/README.md | 56 + cmd/mdatagen/doc.go | 7 + cmd/mdatagen/documentation.md | 96 + cmd/mdatagen/embeded_templates.go | 13 + cmd/mdatagen/embeded_templates_test.go | 47 + cmd/mdatagen/go.mod | 81 + cmd/mdatagen/go.sum | 126 ++ .../internal/metadata/generated_config.go | 122 ++ .../metadata/generated_config_test.go | 145 ++ .../internal/metadata/generated_metrics.go | 425 +++++ .../metadata/generated_metrics_test.go | 215 +++ .../internal/metadata/generated_resource.go | 92 + .../metadata/generated_resource_test.go | 82 + .../internal/metadata/generated_status.go | 29 + .../internal/metadata/testdata/config.yaml | 55 + cmd/mdatagen/lint.go | 63 + cmd/mdatagen/lint_test.go | 50 + cmd/mdatagen/loader.go | 300 +++ cmd/mdatagen/loader_test.go | 282 +++ cmd/mdatagen/main.go | 385 ++++ cmd/mdatagen/main_test.go | 461 +++++ cmd/mdatagen/metadata-sample.yaml | 136 ++ cmd/mdatagen/metadata-schema.yaml | 113 ++ cmd/mdatagen/metadata.yaml | 6 + cmd/mdatagen/metricdata.go | 182 ++ cmd/mdatagen/metricdata_test.go | 26 + cmd/mdatagen/statusdata.go | 62 + cmd/mdatagen/statusdata_test.go | 59 + cmd/mdatagen/templates/component_test.go.tmpl | 448 +++++ cmd/mdatagen/templates/config.go.tmpl | 103 ++ cmd/mdatagen/templates/config_test.go.tmpl | 131 ++ cmd/mdatagen/templates/documentation.md.tmpl | 98 + cmd/mdatagen/templates/metrics.go.tmpl | 319 ++++ cmd/mdatagen/templates/metrics_test.go.tmpl | 174 ++ cmd/mdatagen/templates/readme.md.tmpl | 55 + cmd/mdatagen/templates/resource.go.tmpl | 51 + cmd/mdatagen/templates/resource_test.go.tmpl | 65 + cmd/mdatagen/templates/status.go.tmpl | 30 + .../templates/testdata/config.yaml.tmpl | 31 + cmd/mdatagen/testdata/invalid.yaml | 1 + .../testdata/invalid_aggregation.yaml | 22 + cmd/mdatagen/testdata/invalid_class.yaml | 8 + cmd/mdatagen/testdata/invalid_input_type.yaml | 20 + cmd/mdatagen/testdata/invalid_stability.yaml | 7 + .../testdata/invalid_stability_component.yaml | 7 + cmd/mdatagen/testdata/invalid_type_attr.yaml | 24 + cmd/mdatagen/testdata/invalid_type_rattr.yaml | 19 + cmd/mdatagen/testdata/metrics_and_type.yaml | 19 + cmd/mdatagen/testdata/no_aggregation.yaml | 22 + cmd/mdatagen/testdata/no_class.yaml | 7 + .../testdata/no_description_attr.yaml | 33 + .../testdata/no_description_rattr.yaml | 12 + cmd/mdatagen/testdata/no_enabled.yaml | 18 + .../testdata/no_metric_description.yaml | 22 + cmd/mdatagen/testdata/no_metric_type.yaml | 13 + cmd/mdatagen/testdata/no_metric_unit.yaml | 22 + cmd/mdatagen/testdata/no_monotonic.yaml | 22 + cmd/mdatagen/testdata/no_stability.yaml | 4 + .../testdata/no_stability_component.yaml | 6 + cmd/mdatagen/testdata/no_status.yaml | 1 + cmd/mdatagen/testdata/no_type.yaml | 6 + cmd/mdatagen/testdata/no_type_attr.yaml | 23 + cmd/mdatagen/testdata/no_type_rattr.yaml | 18 + cmd/mdatagen/testdata/no_value_type.yaml | 22 + cmd/mdatagen/testdata/parent.yaml | 3 + .../testdata/readme_with_cmd_class.md | 14 + .../testdata/readme_with_multiple_signals.md | 15 + cmd/mdatagen/testdata/readme_with_status.md | 14 + .../testdata/readme_with_status_codeowners.md | 15 + ...dme_with_status_codeowners_and_emeritus.md | 16 + ..._with_status_codeowners_and_seeking_new.md | 15 + .../testdata/readme_with_status_extension.md | 14 + cmd/mdatagen/testdata/readme_with_warnings.md | 16 + .../testdata/readme_without_status.md | 3 + .../testdata/resource_attributes_only.yaml | 17 + cmd/mdatagen/testdata/status_only.yaml | 6 + cmd/mdatagen/testdata/two_metric_types.yaml | 21 + .../testdata/unknown_metric_attribute.yaml | 19 + cmd/mdatagen/testdata/unknown_value_type.yaml | 18 + cmd/mdatagen/testdata/unused_attribute.yaml | 29 + .../testdata/with_tests_connector.yaml | 9 + .../testdata/with_tests_exporter.yaml | 9 + .../testdata/with_tests_extension.yaml | 9 + .../testdata/with_tests_processor.yaml | 9 + .../testdata/with_tests_receiver.yaml | 9 + cmd/mdatagen/third_party/golint/LICENSE | 27 + cmd/mdatagen/third_party/golint/golint.go | 51 + cmd/mdatagen/validate.go | 205 +++ cmd/mdatagen/validate_test.go | 153 ++ cmd/otelcorecol/builder-config.yaml | 33 +- cmd/otelcorecol/components.go | 2 + cmd/otelcorecol/go.mod | 195 +- cmd/otelcorecol/go.sum | 1405 ++------------ cmd/otelcorecol/main.go | 9 +- cmd/otelcorecol/main_others.go | 1 - cmd/otelcorecol/main_windows.go | 39 +- cmd/otelcorecol/package_test.go | 17 + component/component.go | 25 + component/component_test.go | 10 + component/componenttest/nop_host.go | 4 +- component/componenttest/nop_host_test.go | 4 +- component/componenttest/nop_telemetry.go | 10 +- .../componenttest}/obsreporttest.go | 126 +- .../componenttest}/otelprometheuschecker.go | 126 +- .../otelprometheuschecker_test.go | 12 +- component/componenttest/package_test.go | 14 + .../testdata/prometheus_response | 0 component/config.go | 43 +- component/config_test.go | 223 +++ component/go.mod | 47 +- component/go.sum | 81 +- component/host.go | 8 - component/identifiable.go | 33 +- component/identifiable_test.go | 9 +- component/package_test.go | 14 + component/status.go | 190 ++ component/status_test.go | 330 ++++ component/telemetry.go | 10 + config/configauth/configauth_test.go | 14 +- config/configauth/go.mod | 42 +- config/configauth/go.sum | 80 +- config/configauth/package_test.go | 14 + config/configcompression/compressionType.go | 38 - config/configcompression/compressiontype.go | 41 + ...onType_test.go => compressiontype_test.go} | 12 +- config/configcompression/go.mod | 7 +- config/configcompression/go.sum | 2 + config/configcompression/package_test.go | 14 + config/configgrpc/configgrpc.go | 59 +- config/configgrpc/configgrpc_test.go | 314 ++-- config/configgrpc/go.mod | 106 +- config/configgrpc/go.sum | 587 +----- config/configgrpc/package_test.go | 17 + config/confighttp/README.md | 8 +- config/confighttp/clientinfohandler.go | 2 - config/confighttp/clientinfohandler_test.go | 3 + config/confighttp/compression.go | 19 +- config/confighttp/compression_test.go | 39 +- config/confighttp/compressor.go | 10 +- config/confighttp/confighttp.go | 86 +- config/confighttp/confighttp_test.go | 476 +++-- config/confighttp/go.mod | 91 +- config/confighttp/go.sum | 106 +- config/confighttp/package_test.go | 14 + config/confignet/README.md | 1 + config/confignet/confignet.go | 51 +- config/confignet/confignet_test.go | 58 +- config/confignet/go.mod | 7 +- config/confignet/go.sum | 2 + config/confignet/package_test.go | 14 + config/configopaque/doc.go | 15 +- config/configopaque/go.mod | 13 +- config/configopaque/go.sum | 16 + config/configopaque/opaque.go | 24 +- config/configopaque/opaque_test.go | 84 +- config/configopaque/package_test.go | 14 + config/configretry/Makefile | 1 + config/configretry/backoff.go | 74 + config/configretry/backoff_test.go | 93 + config/configretry/go.mod | 18 + config/configretry/go.sum | 27 + config/configretry/package_test.go | 14 + config/configtelemetry/configtelemetry.go | 4 - .../configtelemetry/configtelemetry_test.go | 4 + config/configtelemetry/go.mod | 7 +- config/configtelemetry/go.sum | 2 + config/configtelemetry/package_test.go | 14 + config/configtls/README.md | 16 + config/configtls/configtls.go | 116 +- config/configtls/configtls_test.go | 206 ++- config/configtls/go.mod | 10 +- config/configtls/go.sum | 28 +- config/internal/go.mod | 25 +- config/internal/go.sum | 15 +- config/internal/package_test.go | 14 + config/internal/warning.go | 5 +- confmap/confmap.go | 14 +- confmap/confmap_test.go | 7 +- confmap/confmaptest/configtest_test.go | 2 +- confmap/confmaptest/package_test.go | 14 + confmap/converter.go | 4 + confmap/converter/expandconverter/Makefile | 1 + confmap/converter/expandconverter/expand.go | 2 +- .../converter/expandconverter/expand_test.go | 8 +- confmap/converter/expandconverter/go.mod | 24 + confmap/converter/expandconverter/go.sum | 31 + .../converter/expandconverter/package_test.go | 14 + confmap/go.mod | 10 +- confmap/go.sum | 17 +- confmap/internal/mapstructure/encoder.go | 2 +- confmap/internal/mapstructure/encoder_test.go | 2 +- confmap/internal/mapstructure/package_test.go | 14 + confmap/package_test.go | 14 + confmap/provider.go | 4 + confmap/provider/envprovider/Makefile | 1 + confmap/provider/envprovider/go.mod | 24 + confmap/provider/envprovider/go.sum | 31 + confmap/provider/envprovider/package_test.go | 14 + confmap/provider/envprovider/provider.go | 11 +- confmap/provider/fileprovider/Makefile | 1 + confmap/provider/fileprovider/go.mod | 24 + confmap/provider/fileprovider/go.sum | 31 + confmap/provider/fileprovider/package_test.go | 14 + confmap/provider/fileprovider/provider.go | 22 +- confmap/provider/httpprovider/Makefile | 1 + confmap/provider/httpprovider/go.mod | 24 + confmap/provider/httpprovider/go.sum | 31 + confmap/provider/httpprovider/package_test.go | 14 + confmap/provider/httpprovider/provider.go | 12 +- confmap/provider/httpsprovider/Makefile | 1 + confmap/provider/httpsprovider/go.mod | 24 + confmap/provider/httpsprovider/go.sum | 31 + .../provider/httpsprovider/package_test.go | 14 + confmap/provider/httpsprovider/provider.go | 13 +- .../configurablehttpprovider/package_test.go | 14 + .../configurablehttpprovider/provider.go | 2 +- .../configurablehttpprovider/provider_test.go | 35 +- .../testdata/otel-config.yaml | 6 +- confmap/provider/internal/package_test.go | 14 + confmap/provider/yamlprovider/Makefile | 1 + confmap/provider/yamlprovider/go.mod | 24 + confmap/provider/yamlprovider/go.sum | 31 + confmap/provider/yamlprovider/package_test.go | 14 + confmap/provider/yamlprovider/provider.go | 16 +- confmap/resolver.go | 8 - confmap/resolver_test.go | 4 +- connector/connector.go | 53 +- connector/connector_test.go | 210 ++- connector/connectortest/connector.go | 9 +- connector/connectortest/connector_test.go | 4 +- connector/connectortest/package_test.go | 14 + connector/connectortest/router.go | 84 - connector/connectortest/router_test.go | 109 -- connector/forwardconnector/README.md | 38 +- connector/forwardconnector/doc.go | 2 + connector/forwardconnector/forward.go | 17 +- connector/forwardconnector/forward_test.go | 2 +- connector/forwardconnector/go.mod | 69 +- connector/forwardconnector/go.sum | 81 +- .../internal/metadata/generated_status.go | 29 + connector/forwardconnector/metadata.yaml | 7 + connector/forwardconnector/package_test.go | 14 + connector/go.mod | 69 +- connector/go.sum | 81 +- connector/logs_router.go | 75 + connector/logs_router_test.go | 156 ++ connector/metrics_router.go | 75 + connector/metrics_router_test.go | 156 ++ connector/package_test.go | 14 + connector/traces_router.go | 75 + connector/traces_router_test.go | 156 ++ consumer/consumer.go | 4 +- consumer/consumererror/package_test.go | 14 + consumer/consumertest/err.go | 6 +- consumer/consumertest/nop.go | 6 +- consumer/consumertest/package_test.go | 14 + consumer/doc.go | 2 +- consumer/go.mod | 37 +- consumer/go.sum | 32 +- consumer/metrics.go | 10 +- consumer/package_test.go | 14 + consumer/traces.go | 8 +- docs/design.md | 2 +- docs/images/design-service-lifecycle.png | Bin 21842 -> 0 bytes docs/monitoring.md | 2 +- docs/observability.md | 55 +- docs/performance.md | 72 - docs/platform-support.md | 72 + docs/processing.md | 2 +- docs/release.md | 56 +- docs/roadmap.md | 29 - docs/scraping-receivers.md | 2 +- docs/security-best-practices.md | 4 +- docs/service-extensions.md | 146 -- docs/troubleshooting.md | 58 +- docs/vision.md | 2 - examples/k8s/otel-config.yaml | 20 +- examples/local/otel-config.yaml | 6 +- exporter/README.md | 21 +- exporter/debugexporter/README.md | 97 +- exporter/debugexporter/doc.go | 2 + exporter/debugexporter/factory.go | 16 +- exporter/debugexporter/go.mod | 72 +- exporter/debugexporter/go.sum | 169 +- .../internal/metadata/generated_status.go | 29 + exporter/debugexporter/metadata.yaml | 8 + exporter/debugexporter/package_test.go | 14 + exporter/exporter_test.go | 42 +- exporter/exporterhelper/README.md | 7 +- exporter/exporterhelper/common.go | 217 ++- exporter/exporterhelper/common_test.go | 59 +- exporter/exporterhelper/constants.go | 12 +- .../internal/bounded_memory_queue.go | 103 -- .../internal/bounded_memory_queue_test.go | 205 --- .../exporterhelper/internal/mock_storage.go | 93 - .../internal/persistent_queue.go | 133 -- .../internal/persistent_queue_test.go | 294 --- .../internal/persistent_storage.go | 413 ----- .../internal/persistent_storage_batch.go | 215 --- .../internal/persistent_storage_batch_test.go | 55 - .../internal/persistent_storage_test.go | 714 -------- .../internal/producer_consumer_queue.go | 40 - exporter/exporterhelper/internal/request.go | 36 - exporter/exporterhelper/logs.go | 91 +- exporter/exporterhelper/logs_test.go | 84 +- exporter/exporterhelper/metrics.go | 91 +- exporter/exporterhelper/metrics_test.go | 84 +- exporter/exporterhelper/obsexporter.go | 115 +- exporter/exporterhelper/obsexporter_test.go | 104 +- exporter/exporterhelper/obsreport.go | 115 -- exporter/exporterhelper/obsreport_test.go | 56 +- exporter/exporterhelper/package_test.go | 14 + exporter/exporterhelper/queue_sender.go | 187 +- exporter/exporterhelper/queue_sender_test.go | 407 +++-- exporter/exporterhelper/request.go | 55 +- exporter/exporterhelper/request_test.go | 14 +- exporter/exporterhelper/retry_sender.go | 109 +- exporter/exporterhelper/retry_sender_test.go | 209 +-- exporter/exporterhelper/timeout_sender.go | 28 +- .../exporterhelper/timeout_sender_test.go | 24 + exporter/exporterhelper/traces.go | 91 +- exporter/exporterhelper/traces_test.go | 82 +- exporter/exporterqueue/config.go | 61 + exporter/exporterqueue/config_test.go | 26 + exporter/exporterqueue/queue.go | 96 + exporter/exportertest/contract_checker.go | 280 +++ .../exportertest/contract_checker_test.go | 143 ++ exporter/exportertest/mock_consumer.go | 212 +++ exporter/exportertest/mock_consumer_test.go | 256 +++ exporter/exportertest/nop_exporter.go | 17 +- exporter/exportertest/nop_exporter_test.go | 4 +- exporter/exportertest/package_test.go | 14 + exporter/go.mod | 82 +- exporter/go.sum | 551 +----- exporter/internal/common/package_test.go | 14 + exporter/internal/experr/err.go | 27 + exporter/internal/experr/err_test.go | 24 + .../internal/otlptext/known_sync_error.go | 1 - .../otlptext/known_sync_error_other.go | 1 - .../otlptext/known_sync_error_windows.go | 1 - exporter/internal/otlptext/package_test.go | 14 + .../internal/queue/bounded_memory_queue.go | 70 + .../queue/bounded_memory_queue_test.go | 158 ++ exporter/internal/queue/consumers.go | 61 + exporter/internal/queue/mock_storage.go | 244 +++ exporter/internal/queue/package_test.go | 14 + exporter/internal/queue/persistent_queue.go | 573 ++++++ .../internal/queue/persistent_queue_test.go | 884 +++++++++ exporter/internal/queue/queue.go | 36 + exporter/internal/queue/queue_capacity.go | 74 + .../internal/queue/queue_capacity_test.go | 58 + exporter/loggingexporter/README.md | 19 +- exporter/loggingexporter/config.go | 2 +- exporter/loggingexporter/doc.go | 2 + exporter/loggingexporter/factory.go | 14 +- exporter/loggingexporter/go.mod | 72 +- exporter/loggingexporter/go.sum | 169 +- .../internal/metadata/generated_status.go | 29 + exporter/loggingexporter/metadata.yaml | 7 + exporter/loggingexporter/package_test.go | 14 + exporter/otlpexporter/README.md | 25 +- exporter/otlpexporter/config.go | 23 +- exporter/otlpexporter/config_test.go | 49 +- exporter/otlpexporter/doc.go | 2 + exporter/otlpexporter/factory.go | 50 +- exporter/otlpexporter/factory_test.go | 67 +- exporter/otlpexporter/go.mod | 108 +- exporter/otlpexporter/go.sum | 222 +-- .../internal/metadata/generated_status.go | 29 + exporter/otlpexporter/metadata.yaml | 8 + exporter/otlpexporter/otlp.go | 33 +- exporter/otlpexporter/otlp_test.go | 77 +- exporter/otlpexporter/package_test.go | 14 + .../testdata/invalid_configs.yaml | 55 + exporter/otlphttpexporter/README.md | 35 +- exporter/otlphttpexporter/config.go | 41 +- exporter/otlphttpexporter/config_test.go | 66 +- exporter/otlphttpexporter/doc.go | 2 + exporter/otlphttpexporter/factory.go | 36 +- exporter/otlphttpexporter/factory_test.go | 73 +- exporter/otlphttpexporter/go.mod | 120 +- exporter/otlphttpexporter/go.sum | 1316 +------------ .../internal/metadata/generated_status.go | 29 + exporter/otlphttpexporter/metadata.yaml | 8 + exporter/otlphttpexporter/otlp.go | 142 +- exporter/otlphttpexporter/otlp_test.go | 787 ++++---- exporter/otlphttpexporter/package_test.go | 14 + .../testdata/bad_invalid_encoding.yaml | 1 + exporter/package_test.go | 14 + extension/auth/authtest/mock_clientauth.go | 6 +- .../auth/authtest/mock_clientauth_test.go | 2 +- extension/auth/authtest/package_test.go | 14 + extension/auth/client.go | 2 +- extension/auth/client_test.go | 4 +- extension/auth/go.mod | 51 +- extension/auth/go.sum | 81 +- extension/auth/package_test.go | 14 + extension/auth/server_test.go | 6 +- extension/ballastextension/README.md | 27 +- extension/ballastextension/factory.go | 10 +- extension/ballastextension/go.mod | 70 +- extension/ballastextension/go.sum | 86 +- .../internal/metadata/generated_status.go | 27 + extension/ballastextension/memory_ballast.go | 4 +- extension/ballastextension/metadata.yaml | 7 + extension/ballastextension/package_test.go | 14 + extension/extension.go | 22 + extension/extension_test.go | 34 +- extension/extensiontest/nop_extension.go | 13 +- extension/extensiontest/nop_extension_test.go | 4 +- extension/extensiontest/package_test.go | 14 + .../extensiontest/statuswatcher_extension.go | 47 + .../statuswatcher_extension_test.go | 39 + extension/go.mod | 49 +- extension/go.sum | 81 +- extension/memorylimiterextension/Makefile | 1 + extension/memorylimiterextension/README.md | 22 + extension/memorylimiterextension/config.go | 10 + extension/memorylimiterextension/factory.go | 33 + .../memorylimiterextension/factory_test.go | 50 + extension/memorylimiterextension/go.mod | 72 + extension/memorylimiterextension/go.sum | 145 ++ .../internal/metadata/generated_status.go | 27 + .../memorylimiterextension/memorylimiter.go | 40 + .../memorylimiter_test.go | 106 ++ .../memorylimiterextension/metadata.yaml | 7 + .../testdata/config.yaml | 19 + extension/package_test.go | 14 + extension/zpagesextension/README.md | 25 +- extension/zpagesextension/config.go | 2 +- extension/zpagesextension/config_test.go | 2 +- extension/zpagesextension/doc.go | 2 + extension/zpagesextension/factory.go | 8 +- extension/zpagesextension/factory_test.go | 2 +- extension/zpagesextension/go.mod | 79 +- extension/zpagesextension/go.sum | 184 +- .../internal/metadata/generated_status.go | 27 + extension/zpagesextension/metadata.yaml | 7 + extension/zpagesextension/package_test.go | 14 + extension/zpagesextension/zpagesextension.go | 4 +- .../zpagesextension/zpagesextension_test.go | 12 +- featuregate/flag.go | 16 +- featuregate/flag_test.go | 12 +- featuregate/gate.go | 15 +- featuregate/gate_test.go | 11 +- featuregate/go.mod | 4 +- featuregate/go.sum | 4 + featuregate/package_test.go | 14 + featuregate/registry.go | 97 +- featuregate/registry_test.go | 79 +- go.mod | 99 +- go.sum | 572 +----- internal/cgroups/cgroup.go | 1 - internal/cgroups/cgroup_test.go | 1 - internal/cgroups/cgroups.go | 1 - internal/cgroups/cgroups_test.go | 1 - internal/cgroups/errors.go | 1 - internal/cgroups/mountpoint.go | 1 - internal/cgroups/mountpoint_test.go | 1 - internal/cgroups/package_test.go | 14 + internal/cgroups/subsys.go | 1 - internal/cgroups/subsys_test.go | 1 - internal/cgroups/util_test.go | 1 - internal/e2e/Makefile | 1 + internal/e2e/consume_contract_test.go | 82 + internal/e2e/go.mod | 134 ++ internal/e2e/go.sum | 176 ++ internal/e2e/otlphttp_test.go | 364 ++++ internal/e2e/package_test.go | 14 + internal/fanoutconsumer/logs.go | 116 +- internal/fanoutconsumer/logs_test.go | 191 +- internal/fanoutconsumer/metrics.go | 116 +- internal/fanoutconsumer/metrics_test.go | 191 +- internal/fanoutconsumer/package_test.go | 14 + internal/fanoutconsumer/traces.go | 116 +- internal/fanoutconsumer/traces_test.go | 192 +- internal/iruntime/package_test.go | 14 + internal/iruntime/total_memory_linux.go | 1 - internal/iruntime/total_memory_linux_test.go | 1 - internal/iruntime/total_memory_other.go | 1 - internal/iruntime/total_memory_other_test.go | 1 - internal/localhostgate/featuregate.go | 68 + internal/localhostgate/featuregate_test.go | 57 + internal/memorylimiter/config.go | 66 + internal/memorylimiter/config_test.go | 95 + internal/memorylimiter/memorylimiter.go | 262 +++ internal/memorylimiter/memorylimiter_test.go | 188 ++ .../memorylimiter}/testdata/config.yaml | 0 .../obsmetrics/obs_exporter.go | 43 +- .../obsmetrics/obs_processor.go | 46 - .../obsmetrics/obs_receiver.go | 38 - .../obsreportconfig/obsmetrics/obs_scraper.go | 18 - internal/obsreportconfig/obsreportconfig.go | 117 +- .../obsreportconfig/obsreportconfig_test.go | 45 - internal/obsreportconfig/package_test.go | 14 + internal/sharedcomponent/package_test.go | 14 + internal/sharedcomponent/sharedcomponent.go | 102 +- .../sharedcomponent/sharedcomponent_test.go | 231 ++- internal/testutil/package_test.go | 14 + internal/testutil/testutil.go | 7 +- internal/tools/go.mod | 173 +- internal/tools/go.sum | 453 ++--- internal/tools/jsonschema_patch.sed | 4 - internal/tools/semconvkit/main.go | 70 + .../tools/semconvkit/templates/doc.go.tmpl | 9 + .../tools/semconvkit/templates/schema.go.tmpl | 9 + internal/tools/tools.go | 5 +- obsreport/obsreport_exporter.go | 23 - obsreport/obsreport_processor.go | 34 - obsreport/obsreport_receiver.go | 23 - obsreport/obsreport_scraper.go | 23 - obsreport/obsreporttest/deprecated.go | 29 + obsreport/obsreporttest/obsreporttest_test.go | 253 --- obsreport/obsreporttest/package_test.go | 14 + otelcol/collector.go | 50 +- otelcol/collector_test.go | 281 +-- otelcol/collector_windows.go | 7 +- otelcol/collector_windows_test.go | 7 +- otelcol/command.go | 35 +- otelcol/command_components.go | 55 +- otelcol/command_components_test.go | 17 +- otelcol/command_test.go | 90 +- otelcol/command_validate.go | 2 +- otelcol/command_validate_test.go | 16 +- otelcol/config_test.go | 76 +- otelcol/configprovider.go | 14 +- otelcol/flags.go | 7 +- otelcol/go.mod | 130 +- otelcol/go.sum | 553 +----- otelcol/internal/configunmarshaler/configs.go | 2 +- .../configunmarshaler/configs_test.go | 16 +- .../configunmarshaler/package_test.go | 14 + otelcol/internal/grpclog/package_test.go | 14 + otelcol/otelcoltest/config.go | 11 +- otelcol/otelcoltest/config_test.go | 28 +- otelcol/otelcoltest/nop_factories_test.go | 22 +- otelcol/otelcoltest/package_test.go | 14 + otelcol/package_test.go | 14 + otelcol/testdata/otelcol-statuswatcher.yaml | 31 + otelcol/unmarshaler.go | 8 +- otelcol/unmarshaler_test.go | 9 +- pdata/go.mod | 15 +- pdata/go.sum | 29 +- .../cmd/pdatagen/internal/base_fields.go | 236 ++- .../cmd/pdatagen/internal/base_slices.go | 46 +- .../cmd/pdatagen/internal/base_structs.go | 45 +- .../cmd/pdatagen/internal/packages.go | 3 + .../cmd/pdatagen/internal/pmetric_package.go | 85 +- .../internal/primitive_slice_structs.go | 44 +- .../cmd/pdatagen/internal/ptrace_package.go | 9 + pdata/internal/data/package_test.go | 14 + .../internal/data/protogen/logs/v1/logs.pb.go | 14 +- .../data/protogen/metrics/v1/metrics.pb.go | 8 +- .../data/protogen/trace/v1/trace.pb.go | 260 ++- pdata/internal/generated_wrapper_byteslice.go | 11 +- .../generated_wrapper_float64slice.go | 11 +- .../generated_wrapper_instrumentationscope.go | 16 +- pdata/internal/generated_wrapper_resource.go | 16 +- .../internal/generated_wrapper_uint64slice.go | 11 +- pdata/internal/json/package_test.go | 14 + pdata/internal/otlp/package_test.go | 14 + pdata/internal/state.go | 22 + pdata/internal/wrapper_logs.go | 21 +- pdata/internal/wrapper_map.go | 14 +- pdata/internal/wrapper_metrics.go | 21 +- pdata/internal/wrapper_slice.go | 17 +- pdata/internal/wrapper_traces.go | 21 +- pdata/internal/wrapper_tracestate.go | 14 +- pdata/internal/wrapper_value.go | 14 +- pdata/pcommon/generated_byteslice.go | 14 +- pdata/pcommon/generated_byteslice_test.go | 23 + pdata/pcommon/generated_float64slice.go | 14 +- pdata/pcommon/generated_float64slice_test.go | 23 + .../pcommon/generated_instrumentationscope.go | 19 +- .../generated_instrumentationscope_test.go | 16 + pdata/pcommon/generated_resource.go | 17 +- pdata/pcommon/generated_resource_test.go | 8 + pdata/pcommon/generated_uint64slice.go | 14 +- pdata/pcommon/generated_uint64slice_test.go | 23 + pdata/pcommon/map.go | 56 +- pdata/pcommon/map_test.go | 75 +- pdata/pcommon/package_test.go | 14 + pdata/pcommon/slice.go | 25 +- pdata/pcommon/slice_test.go | 46 +- pdata/pcommon/trace_state.go | 14 +- pdata/pcommon/trace_state_test.go | 9 + pdata/pcommon/value.go | 94 +- pdata/pcommon/value_test.go | 75 +- pdata/plog/generated_logrecord.go | 25 +- pdata/plog/generated_logrecord_test.go | 13 +- pdata/plog/generated_logrecordslice.go | 25 +- pdata/plog/generated_logrecordslice_test.go | 19 +- pdata/plog/generated_resourcelogs.go | 18 +- pdata/plog/generated_resourcelogs_test.go | 14 +- pdata/plog/generated_resourcelogsslice.go | 25 +- .../plog/generated_resourcelogsslice_test.go | 19 +- pdata/plog/generated_scopelogs.go | 18 +- pdata/plog/generated_scopelogs_test.go | 14 +- pdata/plog/generated_scopelogsslice.go | 25 +- pdata/plog/generated_scopelogsslice_test.go | 19 +- pdata/plog/json.go | 6 +- pdata/plog/logs.go | 19 +- pdata/plog/logs_test.go | 59 + pdata/plog/package_test.go | 14 + .../generated_exportpartialsuccess.go | 16 +- .../generated_exportpartialsuccess_test.go | 18 + pdata/plog/plogotlp/grpc.go | 10 +- pdata/plog/plogotlp/package_test.go | 14 + pdata/plog/plogotlp/request.go | 16 +- pdata/plog/plogotlp/response.go | 14 +- pdata/pmetric/generated_exemplar.go | 20 +- pdata/pmetric/generated_exemplar_test.go | 11 +- pdata/pmetric/generated_exemplarslice.go | 22 +- pdata/pmetric/generated_exemplarslice_test.go | 19 +- .../pmetric/generated_exponentialhistogram.go | 17 +- .../generated_exponentialhistogram_test.go | 8 +- ...generated_exponentialhistogramdatapoint.go | 95 +- ...ated_exponentialhistogramdatapoint_test.go | 65 +- ...ed_exponentialhistogramdatapointbuckets.go | 16 +- ...ponentialhistogramdatapointbuckets_test.go | 18 + ...ated_exponentialhistogramdatapointslice.go | 25 +- ...exponentialhistogramdatapointslice_test.go | 19 +- pdata/pmetric/generated_gauge.go | 16 +- pdata/pmetric/generated_gauge_test.go | 10 +- pdata/pmetric/generated_histogram.go | 17 +- pdata/pmetric/generated_histogram_test.go | 8 +- pdata/pmetric/generated_histogramdatapoint.go | 81 +- .../generated_histogramdatapoint_test.go | 33 +- .../generated_histogramdatapointslice.go | 25 +- .../generated_histogramdatapointslice_test.go | 19 +- pdata/pmetric/generated_metric.go | 42 +- pdata/pmetric/generated_metric_test.go | 34 +- pdata/pmetric/generated_metricslice.go | 25 +- pdata/pmetric/generated_metricslice_test.go | 19 +- pdata/pmetric/generated_numberdatapoint.go | 22 +- .../pmetric/generated_numberdatapoint_test.go | 15 +- .../pmetric/generated_numberdatapointslice.go | 25 +- .../generated_numberdatapointslice_test.go | 19 +- pdata/pmetric/generated_resourcemetrics.go | 18 +- .../pmetric/generated_resourcemetrics_test.go | 14 +- .../pmetric/generated_resourcemetricsslice.go | 25 +- .../generated_resourcemetricsslice_test.go | 19 +- pdata/pmetric/generated_scopemetrics.go | 18 +- pdata/pmetric/generated_scopemetrics_test.go | 14 +- pdata/pmetric/generated_scopemetricsslice.go | 25 +- .../generated_scopemetricsslice_test.go | 19 +- pdata/pmetric/generated_sum.go | 18 +- pdata/pmetric/generated_sum_test.go | 10 +- pdata/pmetric/generated_summary.go | 16 +- pdata/pmetric/generated_summary_test.go | 10 +- pdata/pmetric/generated_summarydatapoint.go | 22 +- .../generated_summarydatapoint_test.go | 14 +- .../generated_summarydatapointslice.go | 25 +- .../generated_summarydatapointslice_test.go | 19 +- ...nerated_summarydatapointvalueatquantile.go | 16 +- ...ed_summarydatapointvalueatquantile_test.go | 22 + ...ed_summarydatapointvalueatquantileslice.go | 25 +- ...mmarydatapointvalueatquantileslice_test.go | 19 +- pdata/pmetric/json.go | 6 +- pdata/pmetric/metrics.go | 19 +- pdata/pmetric/metrics_test.go | 65 + pdata/pmetric/package_test.go | 14 + .../generated_exportpartialsuccess.go | 16 +- .../generated_exportpartialsuccess_test.go | 22 + pdata/pmetric/pmetricotlp/grpc.go | 10 +- pdata/pmetric/pmetricotlp/package_test.go | 14 + pdata/pmetric/pmetricotlp/request.go | 16 +- pdata/pmetric/pmetricotlp/response.go | 14 +- pdata/ptrace/generated_resourcespans.go | 18 +- pdata/ptrace/generated_resourcespans_test.go | 14 +- pdata/ptrace/generated_resourcespansslice.go | 25 +- .../generated_resourcespansslice_test.go | 19 +- pdata/ptrace/generated_scopespans.go | 18 +- pdata/ptrace/generated_scopespans_test.go | 14 +- pdata/ptrace/generated_scopespansslice.go | 25 +- .../ptrace/generated_scopespansslice_test.go | 19 +- pdata/ptrace/generated_span.go | 45 +- pdata/ptrace/generated_span_test.go | 33 +- pdata/ptrace/generated_spanevent.go | 18 +- pdata/ptrace/generated_spanevent_test.go | 12 +- pdata/ptrace/generated_spaneventslice.go | 25 +- pdata/ptrace/generated_spaneventslice_test.go | 19 +- pdata/ptrace/generated_spanlink.go | 32 +- pdata/ptrace/generated_spanlink_test.go | 22 +- pdata/ptrace/generated_spanlinkslice.go | 25 +- pdata/ptrace/generated_spanlinkslice_test.go | 19 +- pdata/ptrace/generated_spanslice.go | 25 +- pdata/ptrace/generated_spanslice_test.go | 19 +- pdata/ptrace/generated_status.go | 16 +- pdata/ptrace/generated_status_test.go | 10 + pdata/ptrace/json.go | 4 + pdata/ptrace/package_test.go | 14 + .../generated_exportpartialsuccess.go | 16 +- .../generated_exportpartialsuccess_test.go | 22 + pdata/ptrace/ptraceotlp/grpc.go | 10 +- pdata/ptrace/ptraceotlp/package_test.go | 14 + pdata/ptrace/ptraceotlp/request.go | 16 +- pdata/ptrace/ptraceotlp/response.go | 14 +- pdata/ptrace/traces.go | 19 +- pdata/ptrace/traces_test.go | 65 + processor/README.md | 20 +- processor/batchprocessor/README.md | 22 +- processor/batchprocessor/batch_processor.go | 16 +- .../batchprocessor/batch_processor_test.go | 50 +- processor/batchprocessor/factory.go | 21 +- processor/batchprocessor/factory_test.go | 3 + processor/batchprocessor/go.mod | 82 +- processor/batchprocessor/go.sum | 551 +----- .../internal/metadata/generated_status.go | 29 + processor/batchprocessor/metadata.yaml | 7 + processor/batchprocessor/metrics.go | 109 +- processor/batchprocessor/metrics_test.go | 85 +- processor/batchprocessor/package_test.go | 14 + processor/batchprocessor/splitlogs_test.go | 2 +- processor/batchprocessor/splitmetrics_test.go | 2 +- processor/batchprocessor/splittraces_test.go | 2 +- processor/go.mod | 82 +- processor/go.sum | 552 +----- processor/memorylimiterprocessor/README.md | 104 +- processor/memorylimiterprocessor/config.go | 40 +- .../memorylimiterprocessor/config_test.go | 38 - processor/memorylimiterprocessor/factory.go | 24 +- .../memorylimiterprocessor/factory_test.go | 26 +- processor/memorylimiterprocessor/go.mod | 74 +- processor/memorylimiterprocessor/go.sum | 169 +- .../internal/metadata/generated_status.go | 29 + .../memorylimiterprocessor/memorylimiter.go | 294 +-- .../memorylimiter_test.go | 797 ++++---- .../memorylimiterprocessor/metadata.yaml | 7 + .../memorylimiterprocessor/package_test.go | 14 + processor/package_test.go | 14 + processor/processor.go | 14 + processor/processor_test.go | 107 +- processor/processorhelper/logs.go | 4 - processor/processorhelper/logs_test.go | 3 - processor/processorhelper/metrics.go | 4 - processor/processorhelper/metrics_test.go | 3 - processor/processorhelper/obsreport.go | 68 +- processor/processorhelper/obsreport_test.go | 107 +- processor/processorhelper/package_test.go | 14 + processor/processorhelper/traces.go | 4 - processor/processorhelper/traces_test.go | 3 - processor/processortest/nop_processor.go | 23 +- processor/processortest/nop_processor_test.go | 4 +- processor/processortest/package_test.go | 14 + processor/processortest/shutdown_verifier.go | 60 +- .../processortest/shutdown_verifier_test.go | 103 ++ .../processortest/unhealthy_processor.go | 70 + .../processortest/unhealthy_processor_test.go | 49 + receiver/README.md | 18 +- receiver/go.mod | 82 +- receiver/go.sum | 552 +----- receiver/otlpreceiver/README.md | 24 +- receiver/otlpreceiver/config.go | 8 +- receiver/otlpreceiver/config.md | 4 +- receiver/otlpreceiver/config_test.go | 22 +- receiver/otlpreceiver/doc.go | 2 + receiver/otlpreceiver/encoder.go | 8 +- receiver/otlpreceiver/factory.go | 71 +- receiver/otlpreceiver/factory_test.go | 137 +- receiver/otlpreceiver/go.mod | 128 +- receiver/otlpreceiver/go.sum | 617 +------ .../otlpreceiver/internal/errors/errors.go | 26 + .../internal/errors/errors_test.go | 45 + receiver/otlpreceiver/internal/logs/otlp.go | 13 +- .../otlpreceiver/internal/logs/otlp_test.go | 21 +- .../internal/logs/package_test.go | 14 + .../internal/metadata/generated_status.go | 29 + .../otlpreceiver/internal/metrics/otlp.go | 13 +- .../internal/metrics/otlp_test.go | 21 +- .../internal/metrics/package_test.go | 14 + receiver/otlpreceiver/internal/trace/otlp.go | 13 +- .../otlpreceiver/internal/trace/otlp_test.go | 20 +- .../internal/trace/package_test.go | 14 + receiver/otlpreceiver/metadata.yaml | 8 + receiver/otlpreceiver/otlp.go | 245 +-- receiver/otlpreceiver/otlp_test.go | 830 ++++----- receiver/otlpreceiver/otlphttp.go | 103 +- receiver/otlpreceiver/package_test.go | 17 + receiver/package_test.go | 14 + receiver/receiver.go | 20 +- receiver/receiver_test.go | 101 +- receiver/receiverhelper/obsreport.go | 68 +- receiver/receiverhelper/obsreport_test.go | 107 +- receiver/receiverhelper/package_test.go | 14 + receiver/receivertest/contract_checker.go | 194 +- .../receivertest/contract_checker_test.go | 266 ++- receiver/receivertest/nop_receiver.go | 21 +- receiver/receivertest/nop_receiver_test.go | 6 +- receiver/receivertest/package_test.go | 14 + receiver/scrapererror/package_test.go | 14 + receiver/scrapererror/partialscrapeerror.go | 4 - .../scraperhelper/{settings.go => config.go} | 23 +- .../{settings_test.go => config_test.go} | 8 +- receiver/scraperhelper/obsreport.go | 42 +- receiver/scraperhelper/obsreport_test.go | 47 +- receiver/scraperhelper/package_test.go | 14 + receiver/scraperhelper/scraper.go | 2 +- receiver/scraperhelper/scrapercontroller.go | 5 +- .../scraperhelper/scrapercontroller_test.go | 47 +- renovate.json | 41 +- semconv/README.md | 16 +- semconv/go.mod | 3 +- semconv/go.sum | 2 + semconv/package_test.go | 14 + semconv/template.j2 | 5 +- semconv/v1.21.0/doc.go | 9 + semconv/v1.21.0/generated_event.go | 119 ++ semconv/v1.21.0/generated_resource.go | 1342 ++++++++++++++ semconv/v1.21.0/generated_trace.go | 1536 ++++++++++++++++ semconv/v1.21.0/schema.go | 9 + semconv/v1.22.0/doc.go | 9 + semconv/v1.22.0/generated_event.go | 119 ++ semconv/v1.22.0/generated_resource.go | 1473 +++++++++++++++ semconv/v1.22.0/generated_trace.go | 1471 +++++++++++++++ semconv/v1.22.0/schema.go | 9 + service/README.md | 1 - service/config_test.go | 20 +- service/extensions/extensions.go | 95 +- service/extensions/extensions_test.go | 363 +++- service/extensions/graph.go | 77 + service/extensions/graph_test.go | 21 + service/extensions/package_test.go | 14 + service/go.mod | 114 +- service/go.sum | 548 +----- service/host.go | 14 +- .../capabilityconsumer/package_test.go | 14 + service/internal/components/components.go | 21 - .../internal/components/components_test.go | 45 - service/internal/components/host_wrapper.go | 43 - .../internal/components/host_wrapper_test.go | 18 - service/internal/components/loggers.go | 28 +- service/internal/components/package_test.go | 14 + service/internal/graph/graph.go | 123 +- service/internal/graph/graph_test.go | 1624 ++++++++++------- service/internal/graph/nodes.go | 21 +- service/internal/graph/package_test.go | 14 + service/internal/graph/zpages.go | 2 +- service/internal/proctelemetry/config.go | 56 +- service/internal/proctelemetry/config_test.go | 322 ++-- .../proctelemetry/process_telemetry.go | 93 +- .../process_telemetry_linux_test.go | 42 +- .../proctelemetry/process_telemetry_test.go | 97 +- service/internal/resource/config.go | 44 + service/internal/resource/config_test.go | 103 ++ .../nop_telemetry_settings.go | 27 + .../nop_telemetry_settings_test.go | 35 + .../internal/servicetelemetry/package_test.go | 14 + .../servicetelemetry/telemetry_settings.go | 55 + .../telemetry_settings_test.go | 40 + service/internal/status/package_test.go | 14 + service/internal/status/status.go | 193 ++ service/internal/status/status_test.go | 353 ++++ .../testcomponents/example_connector.go | 34 +- .../testcomponents/example_exporter.go | 9 +- .../testcomponents/example_processor.go | 2 +- .../testcomponents/example_receiver.go | 2 +- .../internal/testcomponents/example_router.go | 8 +- .../testcomponents/example_router_test.go | 20 +- .../internal/testcomponents/package_test.go | 14 + .../testcomponents/stateful_component.go | 4 +- service/internal/zpages/package_test.go | 14 + service/pipelines/config_test.go | 22 +- service/pipelines/package_test.go | 14 + service/service.go | 155 +- service/service_test.go | 155 +- service/telemetry.go | 216 +-- service/telemetry/config.go | 94 +- service/telemetry/config_test.go | 184 +- service/telemetry/generated_config.go | 577 ------ service/telemetry/otel_trace_sampler.go | 2 +- service/telemetry/package_test.go | 14 + service/telemetry/telemetry.go | 95 +- service/telemetry/telemetry_test.go | 117 ++ service/telemetry_test.go | 175 +- versions.yaml | 16 +- 947 files changed, 40241 insertions(+), 23887 deletions(-) delete mode 100644 .chloggen/builder-env.yaml delete mode 100755 .chloggen/codeboten_deprecate-obsreporttest.yaml delete mode 100755 .chloggen/codeboten_obsreport-dep.yaml delete mode 100755 .chloggen/codeboten_obsreport-processor.yaml delete mode 100755 .chloggen/codeboten_obsreport-scraper.yaml delete mode 100755 .chloggen/codeboten_rm-pipelineconfig.yaml delete mode 100755 .chloggen/codeboten_split-otelcol-module.yaml delete mode 100755 .chloggen/codeboten_split-service-module.yaml delete mode 100644 .chloggen/debug-exporter-2.yaml delete mode 100644 .chloggen/debug-exporter.yaml delete mode 100644 .chloggen/fix-incorrect-use-of-fsnotify.yaml delete mode 100755 .chloggen/log-featuregates.yaml delete mode 100755 .chloggen/s390x-platform-enablement.yaml create mode 100644 .gitattributes create mode 100644 .github/ISSUE_TEMPLATE/stabilization.md delete mode 100644 .github/dependabot.yml delete mode 100644 .github/workflows/create-dependabot-pr.yml create mode 100644 .github/workflows/generate-semantic-conventions-pr.yaml create mode 100644 .github/workflows/scorecard.yml delete mode 100755 .github/workflows/scripts/dependabot-pr.sh create mode 100644 client/package_test.go create mode 100644 cmd/builder/internal/builder/package_test.go create mode 100644 cmd/builder/internal/package_test.go delete mode 100644 cmd/builder/test/default.otel.yaml create mode 100644 cmd/mdatagen/Makefile create mode 100644 cmd/mdatagen/README.md create mode 100644 cmd/mdatagen/doc.go create mode 100644 cmd/mdatagen/documentation.md create mode 100644 cmd/mdatagen/embeded_templates.go create mode 100644 cmd/mdatagen/embeded_templates_test.go create mode 100644 cmd/mdatagen/go.mod create mode 100644 cmd/mdatagen/go.sum create mode 100644 cmd/mdatagen/internal/metadata/generated_config.go create mode 100644 cmd/mdatagen/internal/metadata/generated_config_test.go create mode 100644 cmd/mdatagen/internal/metadata/generated_metrics.go create mode 100644 cmd/mdatagen/internal/metadata/generated_metrics_test.go create mode 100644 cmd/mdatagen/internal/metadata/generated_resource.go create mode 100644 cmd/mdatagen/internal/metadata/generated_resource_test.go create mode 100644 cmd/mdatagen/internal/metadata/generated_status.go create mode 100644 cmd/mdatagen/internal/metadata/testdata/config.yaml create mode 100644 cmd/mdatagen/lint.go create mode 100644 cmd/mdatagen/lint_test.go create mode 100644 cmd/mdatagen/loader.go create mode 100644 cmd/mdatagen/loader_test.go create mode 100644 cmd/mdatagen/main.go create mode 100644 cmd/mdatagen/main_test.go create mode 100644 cmd/mdatagen/metadata-sample.yaml create mode 100644 cmd/mdatagen/metadata-schema.yaml create mode 100644 cmd/mdatagen/metadata.yaml create mode 100644 cmd/mdatagen/metricdata.go create mode 100644 cmd/mdatagen/metricdata_test.go create mode 100644 cmd/mdatagen/statusdata.go create mode 100644 cmd/mdatagen/statusdata_test.go create mode 100644 cmd/mdatagen/templates/component_test.go.tmpl create mode 100644 cmd/mdatagen/templates/config.go.tmpl create mode 100644 cmd/mdatagen/templates/config_test.go.tmpl create mode 100644 cmd/mdatagen/templates/documentation.md.tmpl create mode 100644 cmd/mdatagen/templates/metrics.go.tmpl create mode 100644 cmd/mdatagen/templates/metrics_test.go.tmpl create mode 100644 cmd/mdatagen/templates/readme.md.tmpl create mode 100644 cmd/mdatagen/templates/resource.go.tmpl create mode 100644 cmd/mdatagen/templates/resource_test.go.tmpl create mode 100644 cmd/mdatagen/templates/status.go.tmpl create mode 100644 cmd/mdatagen/templates/testdata/config.yaml.tmpl create mode 100644 cmd/mdatagen/testdata/invalid.yaml create mode 100644 cmd/mdatagen/testdata/invalid_aggregation.yaml create mode 100644 cmd/mdatagen/testdata/invalid_class.yaml create mode 100644 cmd/mdatagen/testdata/invalid_input_type.yaml create mode 100644 cmd/mdatagen/testdata/invalid_stability.yaml create mode 100644 cmd/mdatagen/testdata/invalid_stability_component.yaml create mode 100644 cmd/mdatagen/testdata/invalid_type_attr.yaml create mode 100644 cmd/mdatagen/testdata/invalid_type_rattr.yaml create mode 100644 cmd/mdatagen/testdata/metrics_and_type.yaml create mode 100644 cmd/mdatagen/testdata/no_aggregation.yaml create mode 100644 cmd/mdatagen/testdata/no_class.yaml create mode 100644 cmd/mdatagen/testdata/no_description_attr.yaml create mode 100644 cmd/mdatagen/testdata/no_description_rattr.yaml create mode 100644 cmd/mdatagen/testdata/no_enabled.yaml create mode 100644 cmd/mdatagen/testdata/no_metric_description.yaml create mode 100644 cmd/mdatagen/testdata/no_metric_type.yaml create mode 100644 cmd/mdatagen/testdata/no_metric_unit.yaml create mode 100644 cmd/mdatagen/testdata/no_monotonic.yaml create mode 100644 cmd/mdatagen/testdata/no_stability.yaml create mode 100644 cmd/mdatagen/testdata/no_stability_component.yaml create mode 100644 cmd/mdatagen/testdata/no_status.yaml create mode 100644 cmd/mdatagen/testdata/no_type.yaml create mode 100644 cmd/mdatagen/testdata/no_type_attr.yaml create mode 100644 cmd/mdatagen/testdata/no_type_rattr.yaml create mode 100644 cmd/mdatagen/testdata/no_value_type.yaml create mode 100644 cmd/mdatagen/testdata/parent.yaml create mode 100644 cmd/mdatagen/testdata/readme_with_cmd_class.md create mode 100644 cmd/mdatagen/testdata/readme_with_multiple_signals.md create mode 100644 cmd/mdatagen/testdata/readme_with_status.md create mode 100644 cmd/mdatagen/testdata/readme_with_status_codeowners.md create mode 100644 cmd/mdatagen/testdata/readme_with_status_codeowners_and_emeritus.md create mode 100644 cmd/mdatagen/testdata/readme_with_status_codeowners_and_seeking_new.md create mode 100644 cmd/mdatagen/testdata/readme_with_status_extension.md create mode 100644 cmd/mdatagen/testdata/readme_with_warnings.md create mode 100644 cmd/mdatagen/testdata/readme_without_status.md create mode 100644 cmd/mdatagen/testdata/resource_attributes_only.yaml create mode 100644 cmd/mdatagen/testdata/status_only.yaml create mode 100644 cmd/mdatagen/testdata/two_metric_types.yaml create mode 100644 cmd/mdatagen/testdata/unknown_metric_attribute.yaml create mode 100644 cmd/mdatagen/testdata/unknown_value_type.yaml create mode 100644 cmd/mdatagen/testdata/unused_attribute.yaml create mode 100644 cmd/mdatagen/testdata/with_tests_connector.yaml create mode 100644 cmd/mdatagen/testdata/with_tests_exporter.yaml create mode 100644 cmd/mdatagen/testdata/with_tests_extension.yaml create mode 100644 cmd/mdatagen/testdata/with_tests_processor.yaml create mode 100644 cmd/mdatagen/testdata/with_tests_receiver.yaml create mode 100644 cmd/mdatagen/third_party/golint/LICENSE create mode 100644 cmd/mdatagen/third_party/golint/golint.go create mode 100644 cmd/mdatagen/validate.go create mode 100644 cmd/mdatagen/validate_test.go create mode 100644 cmd/otelcorecol/package_test.go rename {obsreport/obsreporttest => component/componenttest}/obsreporttest.go (57%) rename {obsreport/obsreporttest => component/componenttest}/otelprometheuschecker.go (55%) rename {obsreport/obsreporttest => component/componenttest}/otelprometheuschecker_test.go (89%) create mode 100644 component/componenttest/package_test.go rename {obsreport/obsreporttest => component/componenttest}/testdata/prometheus_response (100%) create mode 100644 component/package_test.go create mode 100644 component/status.go create mode 100644 component/status_test.go create mode 100644 config/configauth/package_test.go delete mode 100644 config/configcompression/compressionType.go create mode 100644 config/configcompression/compressiontype.go rename config/configcompression/{compressionType_test.go => compressiontype_test.go} (82%) create mode 100644 config/configcompression/package_test.go create mode 100644 config/configgrpc/package_test.go create mode 100644 config/confighttp/package_test.go create mode 100644 config/confignet/package_test.go create mode 100644 config/configopaque/package_test.go create mode 100644 config/configretry/Makefile create mode 100644 config/configretry/backoff.go create mode 100644 config/configretry/backoff_test.go create mode 100644 config/configretry/go.mod create mode 100644 config/configretry/go.sum create mode 100644 config/configretry/package_test.go create mode 100644 config/configtelemetry/package_test.go create mode 100644 config/internal/package_test.go create mode 100644 confmap/confmaptest/package_test.go create mode 100644 confmap/converter/expandconverter/Makefile create mode 100644 confmap/converter/expandconverter/go.mod create mode 100644 confmap/converter/expandconverter/go.sum create mode 100644 confmap/converter/expandconverter/package_test.go create mode 100644 confmap/internal/mapstructure/package_test.go create mode 100644 confmap/package_test.go create mode 100644 confmap/provider/envprovider/Makefile create mode 100644 confmap/provider/envprovider/go.mod create mode 100644 confmap/provider/envprovider/go.sum create mode 100644 confmap/provider/envprovider/package_test.go create mode 100644 confmap/provider/fileprovider/Makefile create mode 100644 confmap/provider/fileprovider/go.mod create mode 100644 confmap/provider/fileprovider/go.sum create mode 100644 confmap/provider/fileprovider/package_test.go create mode 100644 confmap/provider/httpprovider/Makefile create mode 100644 confmap/provider/httpprovider/go.mod create mode 100644 confmap/provider/httpprovider/go.sum create mode 100644 confmap/provider/httpprovider/package_test.go create mode 100644 confmap/provider/httpsprovider/Makefile create mode 100644 confmap/provider/httpsprovider/go.mod create mode 100644 confmap/provider/httpsprovider/go.sum create mode 100644 confmap/provider/httpsprovider/package_test.go create mode 100644 confmap/provider/internal/configurablehttpprovider/package_test.go create mode 100644 confmap/provider/internal/package_test.go create mode 100644 confmap/provider/yamlprovider/Makefile create mode 100644 confmap/provider/yamlprovider/go.mod create mode 100644 confmap/provider/yamlprovider/go.sum create mode 100644 confmap/provider/yamlprovider/package_test.go create mode 100644 connector/connectortest/package_test.go delete mode 100644 connector/connectortest/router.go delete mode 100644 connector/connectortest/router_test.go create mode 100644 connector/forwardconnector/internal/metadata/generated_status.go create mode 100644 connector/forwardconnector/metadata.yaml create mode 100644 connector/forwardconnector/package_test.go create mode 100644 connector/logs_router.go create mode 100644 connector/logs_router_test.go create mode 100644 connector/metrics_router.go create mode 100644 connector/metrics_router_test.go create mode 100644 connector/package_test.go create mode 100644 connector/traces_router.go create mode 100644 connector/traces_router_test.go create mode 100644 consumer/consumererror/package_test.go create mode 100644 consumer/consumertest/package_test.go create mode 100644 consumer/package_test.go delete mode 100644 docs/images/design-service-lifecycle.png delete mode 100644 docs/performance.md create mode 100644 docs/platform-support.md delete mode 100644 docs/roadmap.md delete mode 100644 docs/service-extensions.md create mode 100644 exporter/debugexporter/internal/metadata/generated_status.go create mode 100644 exporter/debugexporter/metadata.yaml create mode 100644 exporter/debugexporter/package_test.go delete mode 100644 exporter/exporterhelper/internal/bounded_memory_queue.go delete mode 100644 exporter/exporterhelper/internal/bounded_memory_queue_test.go delete mode 100644 exporter/exporterhelper/internal/mock_storage.go delete mode 100644 exporter/exporterhelper/internal/persistent_queue.go delete mode 100644 exporter/exporterhelper/internal/persistent_queue_test.go delete mode 100644 exporter/exporterhelper/internal/persistent_storage.go delete mode 100644 exporter/exporterhelper/internal/persistent_storage_batch.go delete mode 100644 exporter/exporterhelper/internal/persistent_storage_batch_test.go delete mode 100644 exporter/exporterhelper/internal/persistent_storage_test.go delete mode 100644 exporter/exporterhelper/internal/producer_consumer_queue.go delete mode 100644 exporter/exporterhelper/internal/request.go delete mode 100644 exporter/exporterhelper/obsreport.go create mode 100644 exporter/exporterhelper/package_test.go create mode 100644 exporter/exporterhelper/timeout_sender_test.go create mode 100644 exporter/exporterqueue/config.go create mode 100644 exporter/exporterqueue/config_test.go create mode 100644 exporter/exporterqueue/queue.go create mode 100644 exporter/exportertest/contract_checker.go create mode 100644 exporter/exportertest/contract_checker_test.go create mode 100644 exporter/exportertest/mock_consumer.go create mode 100644 exporter/exportertest/mock_consumer_test.go create mode 100644 exporter/exportertest/package_test.go create mode 100644 exporter/internal/common/package_test.go create mode 100644 exporter/internal/experr/err.go create mode 100644 exporter/internal/experr/err_test.go create mode 100644 exporter/internal/otlptext/package_test.go create mode 100644 exporter/internal/queue/bounded_memory_queue.go create mode 100644 exporter/internal/queue/bounded_memory_queue_test.go create mode 100644 exporter/internal/queue/consumers.go create mode 100644 exporter/internal/queue/mock_storage.go create mode 100644 exporter/internal/queue/package_test.go create mode 100644 exporter/internal/queue/persistent_queue.go create mode 100644 exporter/internal/queue/persistent_queue_test.go create mode 100644 exporter/internal/queue/queue.go create mode 100644 exporter/internal/queue/queue_capacity.go create mode 100644 exporter/internal/queue/queue_capacity_test.go create mode 100644 exporter/loggingexporter/internal/metadata/generated_status.go create mode 100644 exporter/loggingexporter/metadata.yaml create mode 100644 exporter/loggingexporter/package_test.go create mode 100644 exporter/otlpexporter/internal/metadata/generated_status.go create mode 100644 exporter/otlpexporter/metadata.yaml create mode 100644 exporter/otlpexporter/package_test.go create mode 100644 exporter/otlpexporter/testdata/invalid_configs.yaml create mode 100644 exporter/otlphttpexporter/internal/metadata/generated_status.go create mode 100644 exporter/otlphttpexporter/metadata.yaml create mode 100644 exporter/otlphttpexporter/package_test.go create mode 100644 exporter/otlphttpexporter/testdata/bad_invalid_encoding.yaml create mode 100644 exporter/package_test.go create mode 100644 extension/auth/authtest/package_test.go create mode 100644 extension/auth/package_test.go create mode 100644 extension/ballastextension/internal/metadata/generated_status.go create mode 100644 extension/ballastextension/metadata.yaml create mode 100644 extension/ballastextension/package_test.go create mode 100644 extension/extensiontest/package_test.go create mode 100644 extension/extensiontest/statuswatcher_extension.go create mode 100644 extension/extensiontest/statuswatcher_extension_test.go create mode 100644 extension/memorylimiterextension/Makefile create mode 100644 extension/memorylimiterextension/README.md create mode 100644 extension/memorylimiterextension/config.go create mode 100644 extension/memorylimiterextension/factory.go create mode 100644 extension/memorylimiterextension/factory_test.go create mode 100644 extension/memorylimiterextension/go.mod create mode 100644 extension/memorylimiterextension/go.sum create mode 100644 extension/memorylimiterextension/internal/metadata/generated_status.go create mode 100644 extension/memorylimiterextension/memorylimiter.go create mode 100644 extension/memorylimiterextension/memorylimiter_test.go create mode 100644 extension/memorylimiterextension/metadata.yaml create mode 100644 extension/memorylimiterextension/testdata/config.yaml create mode 100644 extension/package_test.go create mode 100644 extension/zpagesextension/internal/metadata/generated_status.go create mode 100644 extension/zpagesextension/metadata.yaml create mode 100644 extension/zpagesextension/package_test.go create mode 100644 featuregate/package_test.go create mode 100644 internal/cgroups/package_test.go create mode 100644 internal/e2e/Makefile create mode 100644 internal/e2e/consume_contract_test.go create mode 100644 internal/e2e/go.mod create mode 100644 internal/e2e/go.sum create mode 100644 internal/e2e/otlphttp_test.go create mode 100644 internal/e2e/package_test.go create mode 100644 internal/fanoutconsumer/package_test.go create mode 100644 internal/iruntime/package_test.go create mode 100644 internal/localhostgate/featuregate.go create mode 100644 internal/localhostgate/featuregate_test.go create mode 100644 internal/memorylimiter/config.go create mode 100644 internal/memorylimiter/config_test.go create mode 100644 internal/memorylimiter/memorylimiter.go create mode 100644 internal/memorylimiter/memorylimiter_test.go rename {processor/memorylimiterprocessor => internal/memorylimiter}/testdata/config.yaml (100%) delete mode 100644 internal/obsreportconfig/obsreportconfig_test.go create mode 100644 internal/obsreportconfig/package_test.go create mode 100644 internal/sharedcomponent/package_test.go create mode 100644 internal/testutil/package_test.go delete mode 100644 internal/tools/jsonschema_patch.sed create mode 100644 internal/tools/semconvkit/main.go create mode 100644 internal/tools/semconvkit/templates/doc.go.tmpl create mode 100644 internal/tools/semconvkit/templates/schema.go.tmpl delete mode 100644 obsreport/obsreport_exporter.go delete mode 100644 obsreport/obsreport_processor.go delete mode 100644 obsreport/obsreport_receiver.go delete mode 100644 obsreport/obsreport_scraper.go create mode 100644 obsreport/obsreporttest/deprecated.go delete mode 100644 obsreport/obsreporttest/obsreporttest_test.go create mode 100644 obsreport/obsreporttest/package_test.go create mode 100644 otelcol/internal/configunmarshaler/package_test.go create mode 100644 otelcol/internal/grpclog/package_test.go create mode 100644 otelcol/otelcoltest/package_test.go create mode 100644 otelcol/package_test.go create mode 100644 otelcol/testdata/otelcol-statuswatcher.yaml create mode 100644 pdata/internal/data/package_test.go create mode 100644 pdata/internal/json/package_test.go create mode 100644 pdata/internal/otlp/package_test.go create mode 100644 pdata/internal/state.go create mode 100644 pdata/pcommon/package_test.go create mode 100644 pdata/plog/package_test.go create mode 100644 pdata/plog/plogotlp/package_test.go create mode 100644 pdata/pmetric/package_test.go create mode 100644 pdata/pmetric/pmetricotlp/package_test.go create mode 100644 pdata/ptrace/package_test.go create mode 100644 pdata/ptrace/ptraceotlp/package_test.go create mode 100644 processor/batchprocessor/internal/metadata/generated_status.go create mode 100644 processor/batchprocessor/metadata.yaml create mode 100644 processor/batchprocessor/package_test.go delete mode 100644 processor/memorylimiterprocessor/config_test.go create mode 100644 processor/memorylimiterprocessor/internal/metadata/generated_status.go create mode 100644 processor/memorylimiterprocessor/metadata.yaml create mode 100644 processor/memorylimiterprocessor/package_test.go create mode 100644 processor/package_test.go create mode 100644 processor/processorhelper/package_test.go create mode 100644 processor/processortest/package_test.go create mode 100644 processor/processortest/shutdown_verifier_test.go create mode 100644 processor/processortest/unhealthy_processor.go create mode 100644 processor/processortest/unhealthy_processor_test.go create mode 100644 receiver/otlpreceiver/internal/errors/errors.go create mode 100644 receiver/otlpreceiver/internal/errors/errors_test.go create mode 100644 receiver/otlpreceiver/internal/logs/package_test.go create mode 100644 receiver/otlpreceiver/internal/metadata/generated_status.go create mode 100644 receiver/otlpreceiver/internal/metrics/package_test.go create mode 100644 receiver/otlpreceiver/internal/trace/package_test.go create mode 100644 receiver/otlpreceiver/metadata.yaml create mode 100644 receiver/otlpreceiver/package_test.go create mode 100644 receiver/package_test.go create mode 100644 receiver/receiverhelper/package_test.go create mode 100644 receiver/receivertest/package_test.go create mode 100644 receiver/scrapererror/package_test.go rename receiver/scraperhelper/{settings.go => config.go} (64%) rename receiver/scraperhelper/{settings_test.go => config_test.go} (84%) create mode 100644 receiver/scraperhelper/package_test.go create mode 100644 semconv/package_test.go create mode 100644 semconv/v1.21.0/doc.go create mode 100644 semconv/v1.21.0/generated_event.go create mode 100644 semconv/v1.21.0/generated_resource.go create mode 100644 semconv/v1.21.0/generated_trace.go create mode 100644 semconv/v1.21.0/schema.go create mode 100644 semconv/v1.22.0/doc.go create mode 100644 semconv/v1.22.0/generated_event.go create mode 100644 semconv/v1.22.0/generated_resource.go create mode 100644 semconv/v1.22.0/generated_trace.go create mode 100644 semconv/v1.22.0/schema.go create mode 100644 service/extensions/graph.go create mode 100644 service/extensions/graph_test.go create mode 100644 service/extensions/package_test.go create mode 100644 service/internal/capabilityconsumer/package_test.go delete mode 100644 service/internal/components/components.go delete mode 100644 service/internal/components/components_test.go delete mode 100644 service/internal/components/host_wrapper.go delete mode 100644 service/internal/components/host_wrapper_test.go create mode 100644 service/internal/components/package_test.go create mode 100644 service/internal/graph/package_test.go create mode 100644 service/internal/resource/config.go create mode 100644 service/internal/resource/config_test.go create mode 100644 service/internal/servicetelemetry/nop_telemetry_settings.go create mode 100644 service/internal/servicetelemetry/nop_telemetry_settings_test.go create mode 100644 service/internal/servicetelemetry/package_test.go create mode 100644 service/internal/servicetelemetry/telemetry_settings.go create mode 100644 service/internal/servicetelemetry/telemetry_settings_test.go create mode 100644 service/internal/status/package_test.go create mode 100644 service/internal/status/status.go create mode 100644 service/internal/status/status_test.go create mode 100644 service/internal/testcomponents/package_test.go create mode 100644 service/internal/zpages/package_test.go create mode 100644 service/pipelines/package_test.go delete mode 100644 service/telemetry/generated_config.go create mode 100644 service/telemetry/package_test.go create mode 100644 service/telemetry/telemetry_test.go diff --git a/.chloggen/TEMPLATE.yaml b/.chloggen/TEMPLATE.yaml index 5f4d66bd650..3e6c5003947 100644 --- a/.chloggen/TEMPLATE.yaml +++ b/.chloggen/TEMPLATE.yaml @@ -22,4 +22,4 @@ subtext: # 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: [] \ No newline at end of file +change_logs: [] diff --git a/.chloggen/builder-env.yaml b/.chloggen/builder-env.yaml deleted file mode 100644 index 600f8064564..00000000000 --- a/.chloggen/builder-env.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Use this changelog template to create an entry for release notes. - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: builder - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: fix setting `dist.*` keys from env - -# One or more tracking issues or pull requests related to the change -issues: [8239] - -# (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: - -# 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: [] diff --git a/.chloggen/codeboten_deprecate-obsreporttest.yaml b/.chloggen/codeboten_deprecate-obsreporttest.yaml deleted file mode 100755 index da127796df9..00000000000 --- a/.chloggen/codeboten_deprecate-obsreporttest.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# Use this changelog template to create an entry for release notes. - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: deprecation - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: obsreporttest - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: deprecate To*CreateSettings funcs in obsreporttest - -# One or more tracking issues or pull requests related to the change -issues: [8492] - -# (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: | - The following TestTelemetry methods have been deprecated: - - ToExporterCreateSettings -> exportertest.NewCreateSettings - - ToProcessorCreateSettings -> processortest.NewCreateSettings - - ToReceiverCreateSettings -> receivertest.NewCreateSettings - -# 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] \ No newline at end of file diff --git a/.chloggen/codeboten_obsreport-dep.yaml b/.chloggen/codeboten_obsreport-dep.yaml deleted file mode 100755 index dc524453e02..00000000000 --- a/.chloggen/codeboten_obsreport-dep.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# Use this changelog template to create an entry for release notes. - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: deprecation - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: obsreport - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "Deprecating `obsreport.Exporter`, `obsreport.ExporterSettings`, `obsreport.NewExporter`" - -# One or more tracking issues or pull requests related to the change -issues: [8492] - -# (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: | - These deprecated methods/structs have been moved to exporterhelper: - - `obsreport.Exporter` -> `exporterhelper.ObsReport` - - `obsreport.ExporterSettings` -> `exporterhelper.ObsReportSettings` - - `obsreport.NewExporter` -> `exporterhelper.NewObsReport` - -# 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/.chloggen/codeboten_obsreport-processor.yaml b/.chloggen/codeboten_obsreport-processor.yaml deleted file mode 100755 index e7732da6763..00000000000 --- a/.chloggen/codeboten_obsreport-processor.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# Use this changelog template to create an entry for release notes. - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: deprecation - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: obsreport - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "Deprecating `obsreport.BuildProcessorCustomMetricName`, `obsreport.Processor`, `obsreport.ProcessorSettings`, `obsreport.NewProcessor`" - -# One or more tracking issues or pull requests related to the change -issues: [8492] - -# (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: | - These deprecated methods/structs have been moved to processorhelper: - - `obsreport.BuildProcessorCustomMetricName` -> `processorhelper.BuildCustomMetricName` - - `obsreport.Processor` -> `processorhelper.ObsReport` - - `obsreport.ProcessorSettings` -> `processorhelper.ObsReportSettings` - - `obsreport.NewProcessor` -> `processorhelper.NewObsReport` - -# 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] \ No newline at end of file diff --git a/.chloggen/codeboten_obsreport-scraper.yaml b/.chloggen/codeboten_obsreport-scraper.yaml deleted file mode 100755 index 33dff252304..00000000000 --- a/.chloggen/codeboten_obsreport-scraper.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# Use this changelog template to create an entry for release notes. - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: deprecation - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: obsreport - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "Deprecating obsreport scraper and receiver API" - -# One or more tracking issues or pull requests related to the change -issues: [8492] - -# (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: | - These deprecated methods/structs have been moved to receiverhelper and scraperhelper: - - `obsreport.Receiver` -> `receiverhelper.ObsReport` - - `obsreport.ReceiverSettings` -> `receiverhelper.ObsReportSettings` - - `obsreport.NewReceiver` -> `receiverhelper.NewObsReport` - - `obsreport.Scraper` -> `scraperhelper.ObsReport` - - `obsreport.ScraperSettings` -> `scraperhelper.ObsReportSettings` - - `obsreport.NewScraper` -> `scraperhelper.NewObsReport` - -# 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] \ No newline at end of file diff --git a/.chloggen/codeboten_rm-pipelineconfig.yaml b/.chloggen/codeboten_rm-pipelineconfig.yaml deleted file mode 100755 index 3a434ba9363..00000000000 --- a/.chloggen/codeboten_rm-pipelineconfig.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Use this changelog template to create an entry for release notes. - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: breaking - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: service - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: remove deprecated service.PipelineConfig - -# One or more tracking issues or pull requests related to the change -issues: [8485] - -# (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: - -# 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] \ No newline at end of file diff --git a/.chloggen/codeboten_split-otelcol-module.yaml b/.chloggen/codeboten_split-otelcol-module.yaml deleted file mode 100755 index 54ec42558a6..00000000000 --- a/.chloggen/codeboten_split-otelcol-module.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# 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. otlpreceiver) -component: otelcol - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Splitting otelcol into its own module. - -# One or more tracking issues or pull requests related to the change -issues: [7924] - -# (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: - -# 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] \ No newline at end of file diff --git a/.chloggen/codeboten_split-service-module.yaml b/.chloggen/codeboten_split-service-module.yaml deleted file mode 100755 index eac53d5a636..00000000000 --- a/.chloggen/codeboten_split-service-module.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# 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. otlpreceiver) -component: service - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Split service into its own module - -# One or more tracking issues or pull requests related to the change -issues: [7923] - -# (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: - -# 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] \ No newline at end of file diff --git a/.chloggen/debug-exporter-2.yaml b/.chloggen/debug-exporter-2.yaml deleted file mode 100644 index 11d7e548e64..00000000000 --- a/.chloggen/debug-exporter-2.yaml +++ /dev/null @@ -1,17 +0,0 @@ - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: new_component - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: debugexporter - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Add debug exporter, which replaces the logging exporter - -# One or more tracking issues or pull requests related to the change -issues: [7769] - -# (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: diff --git a/.chloggen/debug-exporter.yaml b/.chloggen/debug-exporter.yaml deleted file mode 100644 index c82a36f4f2f..00000000000 --- a/.chloggen/debug-exporter.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: deprecation - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: loggingexporter - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Mark the logging exporter as deprecated, in favour of debug exporter - -# One or more tracking issues or pull requests related to the change -issues: [7769] - -# (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: diff --git a/.chloggen/fix-incorrect-use-of-fsnotify.yaml b/.chloggen/fix-incorrect-use-of-fsnotify.yaml deleted file mode 100644 index a9b21921364..00000000000 --- a/.chloggen/fix-incorrect-use-of-fsnotify.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Use this changelog template to create an entry for release notes. - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: configtls - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: fix incorrect use of fsnotify - -# One or more tracking issues or pull requests related to the change -issues: [8438] - -# (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: - -# 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: [] diff --git a/.chloggen/log-featuregates.yaml b/.chloggen/log-featuregates.yaml deleted file mode 100755 index 08e245dab45..00000000000 --- a/.chloggen/log-featuregates.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# 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. otlpreceiver) -component: featuregate - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: List valid feature gates when failing to load invalid gate - -# One or more tracking issues or pull requests related to the change -issues: [8505] - -# (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: - -# 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: [] \ No newline at end of file diff --git a/.chloggen/s390x-platform-enablement.yaml b/.chloggen/s390x-platform-enablement.yaml deleted file mode 100755 index 1e7a88eb69c..00000000000 --- a/.chloggen/s390x-platform-enablement.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# 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. otlpreceiver) -component: supported platforms - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Add `linux/s390x` architecture to cross build tests in CI - -# One or more tracking issues or pull requests related to the change -issues: [8213] - -# (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: diff --git a/.codecov.yml b/.codecov.yml index 684b3772c07..b7698210cd3 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -19,3 +19,4 @@ coverage: ignore: - "pdata/internal/data/protogen/**/*" + - "cmd/mdatagen/third_party/**/*" diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000000..d46e10b98c1 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +# This file is documented at https://git-scm.com/docs/gitattributes. +# Linguist-specific attributes are documented at +# https://github.com/github/linguist. + +go.sum linguist-generated=true diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 9003260b2e4..9211c804bae 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -8,26 +8,26 @@ assignees: '' --- **Describe the bug** -A clear and concise description of what the bug is. + **Steps to reproduce** -If possible, provide a recipe for reproducing the error. + **What did you expect to see?** -A clear and concise description of what you expected to see. + **What did you see instead?** -A clear and concise description of what you saw instead. + **What version did you use?** -Version: (e.g., `v0.4.0`, `1eb551b`, etc) + **What config did you use?** -Config: (e.g. the yaml config file) + **Environment** -OS: (e.g., "Ubuntu 20.04") -Compiler(if manually compiled): (e.g., "go 14.2") + + **Additional context** -Add any other context about the problem here. + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 7c965d578f0..17843187e81 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -9,8 +9,8 @@ assignees: '' ## Important (read before submitting) We are currently preparing for the upcoming 1.0 GA release. Feature requests that are not aligned with -the current roadmap https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/roadmap.md -and are not aimed at stabilizing and preparing the Collector for the release will not be prioritized. +the current roadmap and are not aimed at stabilizing and preparing the Collector for the release will +not be prioritized. _Delete this paragraph before submitting._ diff --git a/.github/ISSUE_TEMPLATE/stabilization.md b/.github/ISSUE_TEMPLATE/stabilization.md new file mode 100644 index 00000000000..aea8102517b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/stabilization.md @@ -0,0 +1,25 @@ +--- +name: Module stabilization +about: Stabilize a module before a 1.0 release +title: 'Stabilize module X' +labels: 'stabilization' +assignees: '' +--- + +Before stabilizing a module, an approver or maintainer must make sure that the following criteria have been met for at least two successive minor version releases (regardless of when this issue was opened): + +- [ ] No open issues or PRs in the module that would require breaking changes +- [ ] No TODOs in the module code that would require breaking changes +- [ ] No deprecated symbols in the module +- [ ] No symbols marked as experimental in the module +- [ ] The module follows the [Coding guidelines](https://github.com/open-telemetry/opentelemetry-collector/blob/main/CONTRIBUTING.md) + +Please also make sure to publicly announce our intent to stabilize the module on: + +- [ ] The #otel-collector CNCF Slack Channel +- [ ] The #opentelemetry CNCF Slack channel +- [ ] A Collector SIG meeting (if unable to attend, just add to the agenda) + +To help other people verify the above criteria, please link to the announcement and other links used to complete the above in a comment on this issue. + +Once all criteria are met, close this issue by moving this module to the `stable` module set. diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 3614e5e928d..00000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,194 +0,0 @@ -# File generated by "make gendependabot"; DO NOT EDIT. - -version: 2 -updates: - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/cmd/builder" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/cmd/otelcorecol" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/component" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/config/configauth" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/config/configcompression" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/config/configgrpc" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/config/confighttp" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/config/confignet" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/config/configopaque" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/config/configtelemetry" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/config/configtls" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/config/internal" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/confmap" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/connector" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/connector/forwardconnector" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/consumer" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/debugexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/loggingexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/otlpexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/exporter/otlphttpexporter" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/extension" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/extension/auth" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/extension/ballastextension" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/extension/zpagesextension" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/featuregate" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/internal/tools" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/otelcol" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/pdata" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/processor" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/processor/batchprocessor" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/processor/memorylimiterprocessor" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/receiver/otlpreceiver" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/semconv" - schedule: - interval: "weekly" - day: "wednesday" - - package-ecosystem: "gomod" - directory: "/service" - schedule: - interval: "weekly" - day: "wednesday" diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 308a6cf2bc5..cde4e56a1c5 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,18 +1,18 @@ ## Important (read before submitting) We are currently preparing for the upcoming 1.0 GA release. Pull requests that are not aligned with -the current roadmap https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/roadmap.md -and are not aimed at stabilizing and preparing the Collector for the release will not be accepted. +the current roadmap and are not aimed at stabilizing and preparing the Collector for the release will +not be accepted. -_Delete this paragraph before submitting._ +_Delete the preceding paragraph before submitting._ -**Description:** +**Description:** + **Link to tracking Issue:** -**Testing:** < Describe what testing was performed and which tests were added.> +**Testing:** -**Documentation:** < Describe the documentation added.> +**Documentation:** _Please delete paragraphs that you did not use before submitting._ diff --git a/.github/workflows/api-compatibility.yml b/.github/workflows/api-compatibility.yml index 5e73b1dde85..8bed13f01a8 100644 --- a/.github/workflows/api-compatibility.yml +++ b/.github/workflows/api-compatibility.yml @@ -7,11 +7,12 @@ name: "Inform Incompatible PRs" on: pull_request: - paths-ignore: - - 'cmd/builder/**' branches: - main +permissions: + contents: read + jobs: Check-Compatibility: runs-on: macos-latest @@ -21,20 +22,20 @@ jobs: steps: - name: Checkout-Main - uses: actions/checkout@v4 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: ref: ${{ github.base_ref }} path: ${{ github.base_ref }} - name: Checkout-HEAD - uses: actions/checkout@v4 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: path: ${{ github.head_ref }} - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: ~1.20.8 + go-version: ~1.21.5 # Generate apidiff states of Main - name: Generate-States diff --git a/.github/workflows/build-and-test-windows.yaml b/.github/workflows/build-and-test-windows.yaml index 653536a0763..4fca5f3ffc6 100644 --- a/.github/workflows/build-and-test-windows.yaml +++ b/.github/workflows/build-and-test-windows.yaml @@ -10,18 +10,22 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref }} cancel-in-progress: true +permissions: + contents: read + jobs: windows-unittest: runs-on: windows-latest steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: ~1.20.8 + go-version: ~1.21.5 + cache: false - name: Cache Go - uses: actions/cache@v3 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 env: cache-name: cache-go-modules with: diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 3d5a9a60a82..a9421cb4976 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -15,14 +15,15 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: ~1.20.8 + go-version: ~1.21.5 + cache: false - name: Cache Go id: go-cache - uses: actions/cache@v3 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 with: path: | ~/go/bin @@ -37,14 +38,15 @@ jobs: needs: [setup-environment] steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: ~1.20.8 + go-version: ~1.21.5 + cache: false - name: Cache Go id: go-cache - uses: actions/cache@v3 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 with: path: | ~/go/bin @@ -60,14 +62,15 @@ jobs: timeout-minutes: 30 steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: ~1.20.8 + go-version: ~1.21.5 + cache: false - name: Cache Go id: go-cache - uses: actions/cache@v3 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 with: path: | ~/go/bin @@ -84,14 +87,15 @@ jobs: needs: [setup-environment] steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: ~1.20.8 + go-version: ~1.21.5 + cache: false - name: Cache Go id: go-cache - uses: actions/cache@v3 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 with: path: | ~/go/bin @@ -103,6 +107,10 @@ jobs: run: make misspell - name: checkdoc run: make checkdoc + - name: Check for go mod dependency changes + run: | + make gotidy + git diff --exit-code || (echo 'go.mod/go.sum deps changes detected, please run "make gotidy" and commit the changes in this PR.' && exit 1) - name: go:porto run: | make goporto @@ -115,10 +123,6 @@ jobs: run: | make genpdata git diff --exit-code || (echo 'Generated code is out of date, please run "make genpdata" and commit the changes in this PR.' && exit 1) - - name: Gen dependabot - run: | - make gendependabot - git diff -s --exit-code || (echo 'ALL_MODULES have been changed, please run "make gendependabot" and commit the changes in this PR.' && exit 1) - name: Gen otelcorecol run: | make genotelcorecol @@ -133,26 +137,27 @@ jobs: unittest-matrix: strategy: matrix: - go-version: ["~1.21.1", "~1.20.8"] # 1.20 needs quotes otherwise it's interpreted as 1.2 + go-version: ["~1.22", "~1.21.5"] # 1.20 needs quotes otherwise it's interpreted as 1.2 runs-on: ubuntu-latest needs: [setup-environment] steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: go-version: ${{ matrix.go-version }} + cache: false - name: Cache Go id: go-cache - uses: actions/cache@v3 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 with: path: | ~/go/bin ~/go/pkg/mod key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }} - name: Cache Build - uses: actions/cache@v3 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 with: path: ~/.cache/go-build key: unittest-${{ runner.os }}-go-build-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} @@ -180,28 +185,29 @@ jobs: needs: [setup-environment] steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: ~1.20.6 + go-version: ~1.21.5 + cache: false - name: Cache Go id: go-cache - uses: actions/cache@v3 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 with: path: | ~/go/bin ~/go/pkg/mod key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }} - name: Cache Build - uses: actions/cache@v3 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 with: path: ~/.cache/go-build key: coverage-${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} - name: Run Unit Tests With Coverage run: make gotest-with-cover - name: Upload coverage report - uses: Wandalen/wretry.action@v1.3.0 + uses: Wandalen/wretry.action@0ef67d343938e879e0a9bb37c107a55731e8ed35 # v1.4.5 with: action: codecov/codecov-action@v3 with: | @@ -247,14 +253,15 @@ jobs: steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: ~1.20.8 + go-version: ~1.21.5 + cache: false - name: Cache Go id: go-cache - uses: actions/cache@v3 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 with: path: | ~/go/bin diff --git a/.github/workflows/builder-integration-test.yaml b/.github/workflows/builder-integration-test.yaml index 11673455023..840fe378de3 100644 --- a/.github/workflows/builder-integration-test.yaml +++ b/.github/workflows/builder-integration-test.yaml @@ -20,16 +20,19 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref }} cancel-in-progress: true +permissions: + contents: read + jobs: integration-test: name: Integration test runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: ~1.20.8 + go-version: ~1.21.5 - name: Test run: make builder-integration-test diff --git a/.github/workflows/builder-release.yaml b/.github/workflows/builder-release.yaml index c674b08dc57..12b128e8d17 100644 --- a/.github/workflows/builder-release.yaml +++ b/.github/workflows/builder-release.yaml @@ -10,15 +10,15 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: fetch-depth: 0 - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: ~1.20.8 + go-version: ~1.21.5 - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v5 + uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0 with: distribution: goreleaser-pro version: latest @@ -31,7 +31,7 @@ jobs: gh release create ${{ github.ref_name }} -t ${{ github.ref_name }} -n "### Images and binaries here: https://github.com/open-telemetry/opentelemetry-collector-releases/releases/tag/${{ github.ref_name }}" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/github-script@v6 + - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 with: script: | const milestones = await github.rest.issues.listMilestones({ diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 19ee4aad2b2..7a57b9421d5 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -14,6 +14,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref }} cancel-in-progress: true +permissions: + contents: read + jobs: changelog: runs-on: ubuntu-latest @@ -23,16 +26,16 @@ jobs: PR_HEAD: ${{ github.event.pull_request.head.sha }} steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: fetch-depth: 0 - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: ~1.20.8 + go-version: ~1.21.5 - name: Cache Go id: go-cache - uses: actions/cache@v3 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 with: path: | ~/go/bin diff --git a/.github/workflows/check-links.yaml b/.github/workflows/check-links.yaml index 88ce28e6de9..338e0718131 100644 --- a/.github/workflows/check-links.yaml +++ b/.github/workflows/check-links.yaml @@ -2,16 +2,15 @@ name: check-links on: push: branches: [ main ] - paths-ignore: - - 'cmd/builder/**' pull_request: - paths-ignore: - - 'cmd/builder/**' concurrency: group: ${{ github.workflow }}-${{ github.head_ref }} cancel-in-progress: true +permissions: + contents: read + jobs: changedfiles: name: changed files @@ -22,7 +21,7 @@ jobs: md: ${{ steps.changes.outputs.md }} steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: fetch-depth: 0 - name: Get changed files @@ -35,7 +34,7 @@ jobs: if: ${{needs.changedfiles.outputs.md}} steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: fetch-depth: 0 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index e3ff82e2256..c49d7dc19af 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -8,27 +8,34 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref }} cancel-in-progress: true +permissions: + contents: read + jobs: CodeQL-Build: + permissions: + actions: read # for github/codeql-action/init to get workflow details + contents: read # for actions/checkout to fetch code + security-events: write # for github/codeql-action/autobuild to send a status report runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: ~1.20.8 + go-version: ~1.21.5 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@47b3d888fe66b639e431abf22ebca059152f1eea # v3.24.5 with: languages: go - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@47b3d888fe66b639e431abf22ebca059152f1eea # v3.24.5 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@47b3d888fe66b639e431abf22ebca059152f1eea # v3.24.5 diff --git a/.github/workflows/contrib-tests.yml b/.github/workflows/contrib-tests.yml index 2a9d85d4f63..d17bfb6f9a8 100644 --- a/.github/workflows/contrib-tests.yml +++ b/.github/workflows/contrib-tests.yml @@ -12,20 +12,57 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref }} cancel-in-progress: true +permissions: + contents: read + jobs: - contrib_tests: + contrib-tests-matrix: runs-on: ubuntu-latest if: ${{ !contains(github.event.pull_request.labels.*.name, 'Skip Contrib Tests') }} - + strategy: + matrix: + group: + - receiver-0 + - receiver-1 + - receiver-2 + - receiver-3 + - processor + - exporter-0 + - exporter-1 + - extension + - connector + - internal + - pkg + - cmd-0 + - cmd-1 + - other steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: ~1.20.8 + go-version: ~1.21.5 + cache: false - name: Run Contrib Tests run: | contrib_path=/tmp/opentelemetry-collector-contrib - git clone https://github.com/open-telemetry/opentelemetry-collector-contrib.git $contrib_path - make CONTRIB_PATH=$contrib_path SKIP_RESTORE_CONTRIB=true check-contrib + git clone --depth=1 https://github.com/open-telemetry/opentelemetry-collector-contrib.git $contrib_path + make CONTRIB_PATH=$contrib_path SKIP_RESTORE_CONTRIB=true GROUP=${{ matrix.group }} check-contrib + + contrib_tests: + runs-on: ubuntu-latest + if: ${{ !contains(github.event.pull_request.labels.*.name, 'Skip Contrib Tests') }} + needs: [ contrib-tests-matrix ] + steps: + - name: Print result + run: echo ${{ needs.contrib-tests-matrix.result }} + - name: Interpret result + run: | + if [[ success == ${{ needs.contrib-tests-matrix.result }} ]] + then + echo "All matrix jobs passed!" + else + echo "One or more matrix jobs failed." + false + fi diff --git a/.github/workflows/create-dependabot-pr.yml b/.github/workflows/create-dependabot-pr.yml deleted file mode 100644 index de5d84bda45..00000000000 --- a/.github/workflows/create-dependabot-pr.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Automation - Dependabot PR - -on: - workflow_dispatch: - -jobs: - create-pr: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Setup Go - uses: actions/setup-go@v4 - with: - go-version: ~1.20.8 - - name: Run dependabot-pr.sh - run: ./.github/workflows/scripts/dependabot-pr.sh - env: - GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} diff --git a/.github/workflows/generate-semantic-conventions-pr.yaml b/.github/workflows/generate-semantic-conventions-pr.yaml new file mode 100644 index 00000000000..ad3275a2123 --- /dev/null +++ b/.github/workflows/generate-semantic-conventions-pr.yaml @@ -0,0 +1,109 @@ +name: Generate Semantic Conventions PR + +on: + schedule: + # Daily at 01:30 (UTC) + - cron: '30 1 * * *' + workflow_dispatch: + +jobs: + check-versions: + runs-on: ubuntu-latest + outputs: + latest-version: ${{ steps.check-versions.outputs.latest-version }} + already-added: ${{ steps.check-versions.outputs.already-added }} + already-opened: ${{ steps.check-versions.outputs.already-opened }} + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - id: check-versions + name: Check versions + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + # version in this repo are prefixed with v + latest_version=v$(gh release view \ + --repo open-telemetry/semantic-conventions \ + --json tagName \ + --jq .tagName \ + | sed 's/^v//') + + rc=$(find semconv -name $latest_version | grep .) + if $rc == 0; then + already_added=true + fi + + matches=$(gh pr list \ + --author opentelemetrybot \ + --state open \ + --search "in:title \"Add semantic conventions version $latest_version\"") + if [ ! -z "$matches" ] + then + already_opened=true + fi + + echo "latest-version=$latest_version" >> $GITHUB_OUTPUT + echo "already-added=$already_added" >> $GITHUB_OUTPUT + echo "already-opened=$already_opened" >> $GITHUB_OUTPUT + + update-semantic-conventions: + permissions: + contents: write # for Git to git push + runs-on: ubuntu-latest + if: | + needs.check-versions.outputs.already-added != 'true' && + needs.check-versions.outputs.already-opened != 'true' + needs: + - check-versions + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Checkout semantic-convention + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + repository: open-telemetry/semantic-convention + path: tmp-semantic-conventions + + - name: Update version + env: + VERSION: ${{ needs.check-versions.outputs.latest-version }} + run: | + make gensemconv SPECPATH=./tmp-semantic-conventions SPECTAG=$VERSION + git diff + + - name: Use CLA approved github bot + run: | + git config user.name opentelemetrybot + git config user.email 107717825+opentelemetrybot@users.noreply.github.com + + - name: Create pull request against main + env: + VERSION: ${{ needs.check-versions.outputs.latest-version }} + # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows + GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} + run: | + message="Add semantic conventions version $VERSION" + body="Add semantic conventions version \`$VERSION\`." + branch="opentelemetrybot/add-semantic-conventions-${VERSION}" + + git checkout -b $branch + git add semconv/ + git commit -m "$message" + git push --set-upstream origin $branch + url=$(gh pr create --title "$message" \ + --body "$body" \ + --base main) + + pull_request_number=${url//*\//} + + # see the template for change log entry file at blob/main/.chloggen/TEMPLATE.yaml + cat > .chloggen/semconv-$VERSION.yaml << EOF + change_type: enhancement + component: semconv + note: Add semantic conventions version $VERSION + issues: [ $pull_request_number ] + EOF + + git add .chloggen/semconv-$VERSION.yaml + + git commit -m "Add change log entry" + git push diff --git a/.github/workflows/milestone-add-to-pr.yml b/.github/workflows/milestone-add-to-pr.yml index bebe064b5f3..7181d8a2999 100644 --- a/.github/workflows/milestone-add-to-pr.yml +++ b/.github/workflows/milestone-add-to-pr.yml @@ -12,7 +12,7 @@ jobs: if: github.event.pull_request.merged runs-on: ubuntu-latest steps: - - uses: actions/github-script@v6 + - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 with: script: | const milestones = await github.rest.issues.listMilestones({ diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index 01d6ce59b8b..cc103bafcea 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -4,16 +4,19 @@ on: push: branches: [main] +permissions: + contents: read + jobs: runperf: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: ~1.20.8 + go-version: ~1.21.5 - name: Run benchmark run: make gobenchmark diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index 6ba1b94351b..6ff746ec06a 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -19,11 +19,42 @@ on: required: true description: Current version (beta, like 0.69.1). Don't include `v`. jobs: + #validate-version format + validate-versions: + runs-on: ubuntu-latest + + steps: + - name: Validate version format + run: | + validate_beta_version() { + local regex_pattern_beta='^[0-9]+\.[0-9]+\.[0-9]+$' + if [[ ! "$1" =~ $regex_pattern_beta ]]; then + echo "Invalid $2 version format. For beta, it can be 0.1.0 or higher" + exit 1 + fi + } + + validate_stable_version() { + local regex_pattern_stable='^[1-9][0-9]*\.[0-9]+\.[0-9]+$' + if [[ ! "$1" =~ $regex_pattern_stable ]]; then + echo "Invalid stable version format for $2. Major version must be greater than 1." + exit 1 + fi + } + + validate_beta_version "${{ inputs.candidate-beta }}" "candidate-beta" + validate_beta_version "${{ inputs.current-beta }}" "current-beta" + validate_stable_version "${{ inputs.candidate-stable }}" "candidate-stable" + validate_stable_version "${{ inputs.current-stable }}" "current-stable" + shell: bash + # Releasing opentelemetry-collector prepare-release: + needs: + - validate-versions runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: fetch-depth: 0 # Make sure that there are no open issues with release:blocker label in Core. The release has to be delayed until they are resolved. @@ -51,9 +82,9 @@ jobs: REPO: open-telemetry/opentelemetry-collector-contrib run: ./.github/workflows/scripts/release-check-build-status.sh - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: ~1.20.8 + go-version: ~1.21.5 # Prepare Core for release. # - Update CHANGELOG.md file, this is done via chloggen # - Run make prepare-release PREVIOUS_VERSION=1.0.0 RELEASE_CANDIDATE=1.1.0 MODSET=stable diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml new file mode 100644 index 00000000000..2b8b2e72658 --- /dev/null +++ b/.github/workflows/scorecard.yml @@ -0,0 +1,69 @@ +name: Scorecard supply-chain security + +on: + # For Branch-Protection check. Only the default branch is supported. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection + branch_protection_rule: + # To guarantee Maintained check is occasionally updated. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained + schedule: + - cron: '39 1 * * 3' + push: + branches: [ "main" ] + +# Declare default permissions as read only. +permissions: read-all + +jobs: + analysis: + name: Scorecard analysis + runs-on: ubuntu-latest + permissions: + # Needed to upload the results to code-scanning dashboard. + security-events: write + # Needed to publish results and get a badge (see publish_results below). + id-token: write + # Uncomment the permissions below if installing in a private repository. + # contents: read + # actions: read + + steps: + - name: "Checkout code" + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + persist-credentials: false + + - name: "Run analysis" + uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1 + with: + results_file: results.sarif + results_format: sarif + # (Optional) "write" PAT token. Uncomment the `repo_token` line below if: + # - you want to enable the Branch-Protection check on a *public* repository, or + # - you are installing Scorecard on a *private* repository + # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat. + # repo_token: ${{ secrets.SCORECARD_TOKEN }} + + # Public repositories: + # - Publish results to OpenSSF REST API for easy access by consumers + # - Allows the repository to include the Scorecard badge. + # - See https://github.com/ossf/scorecard-action#publishing-results. + # For private repositories: + # - `publish_results` will always be set to `false`, regardless + # of the value entered here. + publish_results: true + + # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF + # format to the repository Actions tab. + - name: "Upload artifact" + uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 + with: + name: SARIF file + path: results.sarif + retention-days: 5 + + # Upload the results to GitHub's code scanning dashboard. + - name: "Upload to code-scanning" + uses: github/codeql-action/upload-sarif@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6 + with: + sarif_file: results.sarif diff --git a/.github/workflows/scripts/dependabot-pr.sh b/.github/workflows/scripts/dependabot-pr.sh deleted file mode 100755 index 198b7e81b0f..00000000000 --- a/.github/workflows/scripts/dependabot-pr.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -ex -# -# Copyright The OpenTelemetry Authors -# SPDX-License-Identifier: Apache-2.0 - -git config user.name opentelemetrybot -git config user.email 107717825+opentelemetrybot@users.noreply.github.com - -PR_NAME=dependabot-prs/$(date +'%Y-%m-%dT%H%M%S') -git checkout -b "$PR_NAME" - -IFS=$'\n' -requests=$( gh pr list --search "author:app/dependabot" --json title --jq '.[].title' | sort ) -message="" -dirs=$(find . -type f -name "go.mod" -exec dirname {} \; | sort ) - -for line in $requests; do - if [[ $line != Bump* ]]; then - continue - fi - - module=$(echo "$line" | cut -f 2 -d " ") - if [[ $module == go.opentelemetry.io/collector* ]]; then - continue - fi - version=$(echo "$line" | cut -f 6 -d " ") - - topdir=$(pwd) - for dir in $dirs; do - echo "checking $dir" - cd "$dir" && if grep -q "$module " go.mod; then go get "$module"@v"$version"; fi - cd "$topdir" - done - message+=$line - message+=$'\n' -done - -make gotidy -make genotelcorecol - -git add --all -git commit -m "dependabot updates $(date) -$message" -git push origin "$PR_NAME" - -gh pr create --title "[chore] dependabot updates $(date)" --body "$message" diff --git a/.github/workflows/scripts/release-prepare-release.sh b/.github/workflows/scripts/release-prepare-release.sh index d7c09ba63af..e26ff155a6d 100755 --- a/.github/workflows/scripts/release-prepare-release.sh +++ b/.github/workflows/scripts/release-prepare-release.sh @@ -26,14 +26,14 @@ git add --all git commit -m "Changelog update ${RELEASE_VERSION}" if [ "${CANDIDATE_STABLE}" != "" ]; then - make prepare-release GH=none PREVIOUS_VERSION="${CURRENT_STABLE}" RELEASE_CANDIDATE="${CANDIDATE_STABLE}" MODSET=stable + make prepare-release PREVIOUS_VERSION="${CURRENT_STABLE}" RELEASE_CANDIDATE="${CANDIDATE_STABLE}" MODSET=stable COMMANDS+=" -- make prepare-release GH=none PREVIOUS_VERSION=${CURRENT_STABLE} RELEASE_CANDIDATE=${CANDIDATE_STABLE} MODSET=stable" +- make prepare-release PREVIOUS_VERSION=${CURRENT_STABLE} RELEASE_CANDIDATE=${CANDIDATE_STABLE} MODSET=stable" fi if [ "${CANDIDATE_BETA}" != "" ]; then - make prepare-release GH=none PREVIOUS_VERSION="${CURRENT_BETA}" RELEASE_CANDIDATE="${CANDIDATE_BETA}" MODSET=beta + make prepare-release PREVIOUS_VERSION="${CURRENT_BETA}" RELEASE_CANDIDATE="${CANDIDATE_BETA}" MODSET=beta COMMANDS+=" -- make prepare-release GH=none PREVIOUS_VERSION=${CURRENT_BETA} RELEASE_CANDIDATE=${CANDIDATE_BETA} MODSET=beta" +- make prepare-release PREVIOUS_VERSION=${CURRENT_BETA} RELEASE_CANDIDATE=${CANDIDATE_BETA} MODSET=beta" fi git push origin "${BRANCH}" diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index 723bbbf77f7..92446e0fbda 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -5,11 +5,14 @@ on: pull_request: branches: [ main ] +permissions: + contents: read + jobs: shellcheck: name: Shellcheck runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Run ShellCheck - uses: ludeeus/action-shellcheck@2.0.0 + uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # 2.0.0 diff --git a/.github/workflows/stale-pr.yaml b/.github/workflows/stale-pr.yaml index 355edc64da4..312fb051980 100644 --- a/.github/workflows/stale-pr.yaml +++ b/.github/workflows/stale-pr.yaml @@ -3,11 +3,17 @@ on: schedule: - cron: "12 3 * * *" # arbitrary time not to DDOS GitHub +permissions: + contents: read + jobs: stale: + permissions: + issues: write # for actions/stale to close stale issues + pull-requests: write # for actions/stale to close stale PRs runs-on: ubuntu-latest steps: - - uses: actions/stale@v8 + - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0 with: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-pr-message: 'This PR was marked stale due to lack of activity. It will be closed in 14 days.' diff --git a/.github/workflows/tidy-dependencies.yml b/.github/workflows/tidy-dependencies.yml index d0901a16372..28752e3a56d 100644 --- a/.github/workflows/tidy-dependencies.yml +++ b/.github/workflows/tidy-dependencies.yml @@ -5,24 +5,27 @@ on: branches: - main +permissions: + contents: read + jobs: setup-environment: + permissions: + contents: write # for Git to git push timeout-minutes: 30 runs-on: ubuntu-latest - if: ${{ contains(github.event.pull_request.labels.*.name, 'dependencies') }} + if: ${{ !contains(github.event.pull_request.labels.*.name, 'dependency-major-update') && (github.actor == 'renovate[bot]' || contains(github.event.pull_request.labels.*.name, 'renovatebot')) }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: - repository: "renovate-bot/open-telemetry-_-opentelemetry-collector" ref: ${{ github.head_ref }} - token: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} - - uses: actions/setup-go@v4 + - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: ~1.20.8 + go-version: ~1.21.5 cache: false - name: Cache Go id: go-cache - uses: actions/cache@v3 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 with: path: | ~/go/bin @@ -41,5 +44,6 @@ jobs: git config user.email 107717825+opentelemetrybot@users.noreply.github.com echo "git diff --exit-code || (git add . && git commit -m \"go mod tidy\" && git push)" git diff --exit-code || (git add . && git commit -m "go mod tidy" && git push) - env: - GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} + - uses: actions-ecosystem/action-remove-labels@2ce5d41b4b6aa8503e285553f75ed56e0a40bae0 # v1.3.0 + with: + labels: renovatebot diff --git a/.golangci.yml b/.golangci.yml index 65589afbc2f..90d7a1b51c2 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -17,6 +17,7 @@ run: # default value is empty list, but default dirs are skipped independently # from this option's value (see skip-dirs-use-default). skip-dirs: + - third_party # default is true. Enables skipping of directories: # vendor$, third_party$, testdata$, examples$, Godeps$, builtin$ @@ -69,8 +70,11 @@ linters-settings: - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf enable-all: true - # TODO: Enable this and fix the alignment issues. disable: + # We want to order fields according to readability and grouping them by use cases. + # This linter does not offer a discernible performance improvement as the structs + # defined in this repository are not in the execution hot path. + # See https://github.com/open-telemetry/opentelemetry-collector/issues/2789 - fieldalignment revive: diff --git a/CHANGELOG-API.md b/CHANGELOG-API.md index e62cd022ed4..6ebdddf897f 100644 --- a/CHANGELOG-API.md +++ b/CHANGELOG-API.md @@ -7,6 +7,223 @@ If you are looking for user-facing changes, check out [CHANGELOG.md](./CHANGELOG +## v1.3.0/v0.96.0 + +### 🚩 Deprecations 🚩 + +- `configgrpc`: Deprecates `ToServer`. Use `ToServerContext` instead. (#9624) +- `component`: deprecate component.ErrNilNextConsumer (#9526) +- `configtls`: Rename TLSClientSetting, TLSServerSetting, and TLSSetting based on the naming convention used in other config packages. (#9474) + +### 💡 Enhancements 💡 + +- `receivertest`: add support for metrics in contract checker (#9551) + +## v1.2.0/v0.95.0 + +### 🛑 Breaking changes 🛑 + +- `all`: Bump minimum go version to go 1.21 (#9507) +- `service/telemetry`: Delete generated_config types, use go.opentelemetry.io/contrib/config types instead (#9546) +- `configcompression`: Remove deprecated `configcompression` types, constants and methods. (#9388) +- `component`: Remove `host.ReportFatalError` (#6344) +- `configgrpc`: Remove deprecated `configgrpc.ServerConfig.ToListener` (#9481) +- `confmap`: Remove deprecated `confmap.WithErrorUnused` (#9484) + +### 🚩 Deprecations 🚩 + +- `confignet`: Deprecate `confignet.NetAddr` and `confignet.TCPAddr` in favor of `confignet.AddrConfig` and `confignet.TCPAddrConfig`. (#9509) +- `config/configgrpc`: Deprecate `configgrpc.ClientConfig.SanitizedEndpoint`, `configgrpc.ServerConfig.ToListener` and `configgrpc.ServerConfig.ToListenerContext` (#9481, #9482) +- `scraperhelper`: Deprecate ScraperControllerSettings, use ControllerConfig instead (#6767) + +## v1.1.0/v0.94.0 + +### 🛑 Breaking changes 🛑 + +- `confignet`: Remove deprecated `DialContext` and `ListenContext` functions (#9363) +- `confmap/converter/expandconverter`: Add `confmap.ConverterSettings` argument to experimental `expandconverter.New` function. (#5615, #9162) + - The `confmap.ConverterSettings` struct currently has no fields. It will be used to pass a logger. + +- `component`: Remove deprecated funcs and types (#9283) +- `otlpexporter`: Config struct is moving from embedding the deprecated GRPCClientSettings struct to using ClientConfig instead. (#6767) +- `otlphttpexporter`: otlphttpexporter.Config embeds the struct confighttp.ClientConfig instead of confighttp.HTTPClientSettings (#6767) +- `otlpreceiver`: HTTPConfig struct is moving from embedding the deprecated ServerSettings struct to using HTTPServerConfig instead. (#6767) +- `component`: Validate component.Type at creation and unmarshaling time. (#9208) + - A component.Type must start with an ASCII alphabetic character and can only contain ASCII alphanumeric characters and '_'. + + +### 🚩 Deprecations 🚩 + +- `configcompressions`: Deprecate `IsCompressed`. Use `CompressionType.IsCompressed instead` instead. (#9435) +- `configcompression`: Deprecate `CompressionType`, use `Type` instead. (#9416) +- `confighttp`: Deprecate CORSSettings, use CORSConfig instead (#6767) +- `configgrpc`: Deprecate `ToListener` function in favor of `ToListenerContext` (#9389) +- `configgrpc`: Deprecate GRPCServerSettings, use ServerConfig instead (#6767) +- `confighttp`: Deprecate HTTPClientSettings, use ClientConfig instead (#6767) +- `confighttp`: Deprecate HTTPServerSettings, use ServerConfig instead (#6767) +- `confmap/provider`: Deprecate .New in favor of .NewWithSettings for all core providers (#5615, #9162) + - NewWithSettings now takes an empty confmap.ProviderSettings struct. This will be used to pass a logger in the future. + + +### 💡 Enhancements 💡 + +- `exporter/exporterhelper`: Add API for enabling queue in the new exporter helpers. (#7874) + The following experimental API is introduced in exporter package: + - `exporterhelper.WithRequestQueue`: a new exporter helper option for using a queue. + - `exporterqueue.Queue`: an interface for queue implementations. + - `exporterqueue.Factory`: a queue factory interface, implementations of this interface are intended to be used with WithRequestQueue option. + - `exporterqueue.Settings`: queue factory settings. + - `exporterqueue.Config`: common configuration for queue implementations. + - `exporterqueue.NewDefaultConfig`: a function for creating a default queue configuration. + - `exporterqueue.NewMemoryQueueFactory`: a new factory for creating a memory queue. + - `exporterqueue.NewPersistentQueueFactory: a factory for creating a persistent queue. + +- `featuregate`: Add the `featuregate.ErrAlreadyRegistered` error, which is returned by `featuregate.Registry`'s `Register` when adding a feature gate that is already registered. (#8622) + Use `errors.Is` to check for this error. + + +## v0.93.0 + +### 🛑 Breaking changes 🛑 + +- `bug_fix`: Implement `encoding.BinaryMarshaler` interface to prevent `configopaque` -> `[]byte` -> `string` conversions from leaking the value (#9279) +- `configopaque`: configopaque.String implements `fmt.Stringer` and `fmt.GoStringer`, outputting [REDACTED] when formatted with the %s, %q or %#v verbs` (#9213) + This may break applications that rely on the previous behavior of opaque strings with `fmt.Sprintf` to e.g. build URLs or headers. + Explicitly cast the opaque string to a string before using it in `fmt.Sprintf` to restore the previous behavior. + +- `all`: Remove obsolete "// +build" directives (#9304) +- `connectortest`: Remove deprecated connectortest router helpers. (#9278) + +### 🚩 Deprecations 🚩 + +- `obsreporttest`: deprecate test funcs/structs (#8492) + The following methods/structs have been moved from obsreporttest to componenttest: + - obsreporttest.TestTelemetry -> componenttest.TestTelemetry + - obsreporttest.SetupTelemetry -> componenttest.SetupTelemetry + - obsreporttest.CheckScraperMetrics -> TestTelemetry.CheckScraperMetrics + - obserporttest.TestTelemetry.TelemetrySettings -> componenttest.TestTelemetry.TelemetrySettings() + +- `confignet`: Deprecates `DialContext` and `ListenContext` functions. Use `Dial` and `Listen` instead. (#9258) + Unlike the previous `Dial` and `Listen` functions, the new `Dial` and `Listen` functions take a `context.Context` like `DialContext` and `ListenContext`. + +## v1.0.1/v0.92.0 + +### 🛑 Breaking changes 🛑 + +- `otlpexporter`: Change Config members names to use Config suffix. (#9091) +- `component`: Remove deprecated unused TelemetrySettingsBase (#9145) + +### 🚩 Deprecations 🚩 + +- `confignet`: Deprecates the `Dial` and `Listen` functions in favor of `DialContext` and `ListenContext`. (#9163) +- `component`: Deprecate unnecessary type StatusFunc (#9146) + +## v0.91.0 + +## v1.0.0/v0.90.0 + +### 🛑 Breaking changes 🛑 + +- `exporterhelper`: Replace converter interface with function in the new experimental exporter helper. (#8122) +- `featuregate`: Remove deprecate function `featuregate.NewFlag` (#8727) + Use `featuregate.Registry`'s `RegisterFlags` method instead. + +### 🚩 Deprecations 🚩 + +- `telemetry`: deprecate jsonschema generated types (#15009) + +### 💡 Enhancements 💡 + +- `pdata`: Add ZeroThreshold field to exponentialHistogramDataPoint in pmetric package. (#8802) + +## v1.0.0-rcv0018/v0.89.0 + +### 🛑 Breaking changes 🛑 + +- `otelcol`: CollectorSettings.Factories now expects: `func() (Factories, error)` (#8478) +- `exporter/exporterhelper`: The experimental Request API is updated. (#7874) + - `Request` interface now includes ItemsCount() method. + - `RequestItemsCounter` is removed. + - The following interfaces are added: + - Added an optional interface for handling errors that occur during request processing `RequestErrorHandler`. + - Added a function to unmarshal bytes into a Request `RequestUnmarshaler`. + - Added a function to marshal a Request into bytes `RequestMarshaler` + + +### 🚩 Deprecations 🚩 + +- `featuregate`: Deprecate `featuregate.NewFlag` in favor of `featuregate.Registry`'s `RegisterFlags` method (#8727) + +### 💡 Enhancements 💡 + +- `featuregate`: Add validation for feature gates ID, URL and versions. (#8766) + Feature gates IDs are now explicitly restricted to ASCII alphanumerics and dots. + + +## v1.0.0-rcv0017/v0.88.0 + +### 💡 Enhancements 💡 + +- `pdata`: Add IsReadOnly() method to p[metrics|logs|traces].[Metrics|Logs|Spans] pdata structs allowing to check if the struct is read-only. (#6794) + +## v1.0.0-rcv0016/v0.87.0 + +### 💡 Enhancements 💡 + +- `pdata`: Introduce API to control pdata mutability (#6794) + This change introduces new API pdata methods to control the mutability: + - p[metric|trace|log].[Metrics|Traces|Logs].MarkReadOnly() - marks the pdata as read-only. Any subsequent + mutations will result in a panic. + - p[metric|trace|log].[Metrics|Traces|Logs].IsReadOnly() - returns true if the pdata is marked as read-only. + Currently, all the data is kept mutable. This API will be used by fanout consumer in the following releases. + +### 🛑 Breaking changes 🛑 + +- `obsreport`: remove methods/structs deprecated in previous release. (#8492) +- `extension`: remove deprecated Configs and Factories (#8631) + +## v1.0.0-rcv0015/v0.86.0 + +### 🛑 Breaking changes 🛑 + +- `service`: remove deprecated service.PipelineConfig (#8485) + +### 🚩 Deprecations 🚩 + +- `obsreporttest`: deprecate To*CreateSettings funcs in obsreporttest (#8492) + The following TestTelemetry methods have been deprecated. Use structs instead: + - ToExporterCreateSettings -> exporter.CreateSettings + - ToProcessorCreateSettings -> processor.CreateSettings + - ToReceiverCreateSettings -> receiver.CreateSettings + +- `obsreport`: Deprecating `obsreport.Exporter`, `obsreport.ExporterSettings`, `obsreport.NewExporter` (#8492) + These deprecated methods/structs have been moved to exporterhelper: + - `obsreport.Exporter` -> `exporterhelper.ObsReport` + - `obsreport.ExporterSettings` -> `exporterhelper.ObsReportSettings` + - `obsreport.NewExporter` -> `exporterhelper.NewObsReport` + +- `obsreport`: Deprecating `obsreport.BuildProcessorCustomMetricName`, `obsreport.Processor`, `obsreport.ProcessorSettings`, `obsreport.NewProcessor` (#8492) + These deprecated methods/structs have been moved to processorhelper: + - `obsreport.BuildProcessorCustomMetricName` -> `processorhelper.BuildCustomMetricName` + - `obsreport.Processor` -> `processorhelper.ObsReport` + - `obsreport.ProcessorSettings` -> `processorhelper.ObsReportSettings` + - `obsreport.NewProcessor` -> `processorhelper.NewObsReport` + +- `obsreport`: Deprecating obsreport scraper and receiver API (#8492) + These deprecated methods/structs have been moved to receiverhelper and scraperhelper: + - `obsreport.Receiver` -> `receiverhelper.ObsReport` + - `obsreport.ReceiverSettings` -> `receiverhelper.ObsReportSettings` + - `obsreport.NewReceiver` -> `receiverhelper.NewObsReport` + - `obsreport.Scraper` -> `scraperhelper.ObsReport` + - `obsreport.ScraperSettings` -> `scraperhelper.ObsReportSettings` + - `obsreport.NewScraper` -> `scraperhelper.NewObsReport` + + +### 💡 Enhancements 💡 + +- `otelcol`: Splitting otelcol into its own module. (#7924) +- `service`: Split service into its own module (#7923) + ## v0.85.0 ## v0.84.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index e14ace59693..f1238d56c8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,269 @@ If you are looking for developer-facing changes, check out [CHANGELOG-API.md](./ +## v1.3.0/v0.96.0 + +### 🛑 Breaking changes 🛑 + +- `configgrpc`: Remove deprecated `GRPCClientSettings`, `GRPCServerSettings`, and `ServerConfig.ToListenerContext`. (#9616) +- `confighttp`: Remove deprecated `HTTPClientSettings`, `NewDefaultHTTPClientSettings`, and `CORSSettings`. (#9625) +- `confignet`: Removes deprecated `NetAddr` and `TCPAddr` (#9614) + +### 💡 Enhancements 💡 + +- `configtls`: Add `include_system_ca_certs_pool` to configtls, allowing to load system certs and additional custom certs. (#7774) +- `otelcol`: Add `ConfigProviderSettings` to `CollectorSettings` (#4759) + This allows passing a custom list of `confmap.Provider`s to `otelcol.NewCommand`. +- `pdata`: Update to OTLP v1.1.0 (#9587) + Introduces Span and SpanLink flags. +- `confmap`: Update mapstructure to use a maintained fork, github.com/go-viper/mapstructure/v2. (#9634) + See https://github.com/mitchellh/mapstructure/issues/349 for context. + + +### 🧰 Bug fixes 🧰 + +- `configretry`: Allow max_elapsed_time to be set to 0 for indefinite retries (#9641) +- `client`: Make `Metadata.Get` thread safe (#9595) + +## v1.2.0/v0.95.0 + +### 🛑 Breaking changes 🛑 + +- `all`: scope name for all generated Meter/Tracer funcs now includes full package name (#9494) + +### 💡 Enhancements 💡 + +- `confighttp`: Adds support for Snappy decompression of HTTP requests. (#7632) +- `configretry`: Validate `max_elapsed_time`, ensure it is larger than `max_interval` and `initial_interval` respectively. (#9489) +- `configopaque`: Mark module as stable (#9167) +- `otlphttpexporter`: Add support for json content encoding when exporting telemetry (#6945) +- `confmap/converter/expandconverter, confmap/provider/envprovider, confmap/provider/fileprovider, confmap/provider/httprovider, confmap/provider/httpsprovider, confmap/provider/yamlprovider`: Split confmap.Converter and confmap.Provider implementation packages out of confmap. (#4759, #9460) + +## v1.1.0/v0.94.0 + +### 🛑 Breaking changes 🛑 + +- `receiver/otlp`: Update gRPC code from `codes.InvalidArgument` to `codes.Internal` when a permanent error doesn't contain a gRPC status (#9415) + +### 🚩 Deprecations 🚩 + +- `configgrpc`: Deprecate GRPCClientSettings, use ClientConfig instead (#6767) + +### 💡 Enhancements 💡 + +- `mdatagen`: Add a generated test that checks the config struct using `componenttest.CheckConfigStruct` (#9438) +- `component`: Add `component.UseLocalHostAsDefaultHost` feature gate that changes default endpoints from 0.0.0.0 to localhost (#8510) + The only component in this repository affected by this is the OTLP receiver. + +- `confighttp`: Add support of Host header (#9395) +- `mdatagen`: Remove use of ReportFatalError in generated tests (#9439) + +### 🧰 Bug fixes 🧰 + +- `service`: fix opencensus bridge configuration in periodic readers (#9361) +- `otlpreceiver`: Fix goroutine leak when GRPC server is started but HTTP server is unsuccessful (#9165) +- `otlpexporter`: PartialSuccess is treated as success, logged as warning. (#9243) + +## v0.93.0 + +### 🛑 Breaking changes 🛑 + +- `exporterhelper`: remove deprecated exporterhelper.RetrySettings and exporterhelper.NewDefaultRetrySettings (#9256) +- `configopaque`: configopaque.String implements `fmt.Stringer` and `fmt.GoStringer`, outputting [REDACTED] when formatted with the %s, %q or %#v verbs` (#9213) + This may break applications that rely on the previous behavior of opaque strings with `fmt.Sprintf` to e.g. build URLs or headers. + Explicitly cast the opaque string to a string before using it in `fmt.Sprintf` to restore the previous behavior. + + +### 🚀 New components 🚀 + +- `extension/memory_limiter`: Introduce a `memory_limiter` extension which receivers can use to reject incoming requests when collector doesn't have enough memory (#8632) + The extension has the same configuration interface and behavior as the existing `memory_limiter` processor, which potentially can be deprecated and removed in the future + +### 💡 Enhancements 💡 + +- `configtls`: add `cipher_suites` to configtls. (#8105) + Users can specify a list of cipher suites to pick from. If left blank, a safe default list is used. + +- `service`: mark `telemetry.useOtelForInternalMetrics` as stable (#816) +- `exporters`: Cleanup log messages for export failures (#9219) + 1. Ensure an error message is logged every time and only once when data is dropped/rejected due to export failure. + 2. Update the wording. Specifically, don't use "dropped" term when an error is reported back to the pipeline. + Keep the "dropped" wording for failures happened after the enabled queue. + 3. Properly report any error reported by a queue. For example, a persistent storage error must be reported as a storage error, not as "queue overflow". + + +### 🧰 Bug fixes 🧰 + +- `configgrpc`: Update dependency to address a potential crash in the grpc instrumentation (#9296) +- `otlpreceiver`: Ensure OTLP receiver handles consume errors correctly (#4335) + Make sure OTLP receiver returns correct status code and follows the receiver contract (gRPC) +- `zpagesextension`: Remove mention of rpcz page from zpages extension (#9328) + +## v1.0.1/v0.92.0 + +### 🛑 Breaking changes 🛑 + +- `exporters/sending_queue`: Do not re-enqueue failed batches, rely on the retry_on_failure strategy instead. (#8382) + The current re-enqueuing behavior is not obvious and cannot be configured. It takes place only for persistent queue + and only if `retry_on_failure::enabled=true` even if `retry_on_failure` is a setting for a different backoff retry + strategy. This change removes the re-enqueuing behavior. Consider increasing `retry_on_failure::max_elapsed_time` + to reduce chances of data loss or set it to 0 to keep retrying until requests succeed. + +- `confmap`: Make the option `WithErrorUnused` enabled by default when unmarshaling configuration (#7102) + The option `WithErrorUnused` is now enabled by default, and a new option `WithIgnoreUnused` is introduced to ignore + errors about unused fields. + +- `status`: Deprecate `ReportComponentStatus` in favor of `ReportStatus`. This new function does not return an error. (#9148) + +### 🚩 Deprecations 🚩 + +- `connectortest`: Deprecate connectortest.New[Metrics|Logs|Traces]Router in favour of connector.New[Metrics|Logs|Traces]Router (#9095) +- `exporterhelper`: Deprecate exporterhelper.RetrySettings in favor of configretry.BackOffConfig (#9091) +- `extension/ballast`: Deprecate `memory_ballast` extension. (#8343) + Use `GOMEMLIMIT` environment variable instead. + +- `connector`: Deprecate [Metrics|Logs|Traces]Router in favour of [Metrics|Logs|Traces]RouterAndConsumer (#9095) + +### 💡 Enhancements 💡 + +- `exporterhelper`: Add RetrySettings validation function (#9089) + Validate that time.Duration, multiplier values in configretry are non-negative, and randomization_factor is between 0 and 1 + +- `service`: Enable `telemetry.useOtelForInternalMetrics` by updating the flag to beta (#7454) + The metrics generated should be consistent with the metrics generated + previously with OpenCensus. Users can disable the behaviour + by setting `--feature-gates -telemetry.useOtelForInternalMetrics` at + collector start. + +- `mdatagen`: move component from contrib to core (#9172) +- `semconv`: Generated Semantic conventions 1.22.0. (#8686) +- `confignet`: Add `dialer_timeout` config option. (#9066) +- `processor/memory_limiter`: Update config validation errors (#9059) + - Fix names of the config fields that are validated in the error messages + - Move the validation from start to the initialization phrase + +- `exporterhelper`: Add config Validate for TimeoutSettings (#9104) + +### 🧰 Bug fixes 🧰 + +- `memorylimiterprocessor`: Fixed leaking goroutines from memorylimiterprocessor (#9099) +- `cmd/otelcorecol`: Fix the code detecting if the collector is running as a service on Windows. (#7350) + Removed the `NO_WINDOWS_SERVICE` environment variable given it is not needed anymore. +- `otlpexporter`: remove dependency of otlphttpreceiver on otlpexporter (#6454) + +## v0.91.0 + +### 💡 Enhancements 💡 + +- `statusreporting`: Automates status reporting upon the completion of component.Start(). (#7682) +- `service`: add resource attributes as labels to otel metrics to ensures backwards compatibility with OpenCensus metrics. (#9029) +- `semconv`: Generated Semantic conventions 1.21. (#9056) +- `config/confighttp`: Exposes http/2 transport settings to enable health check and workaround golang http/2 issue https://github.com/golang/go/issues/59690 (#9022) +- `cmd/builder`: running builder version on binaries installed with `go install` will output the version specified at the suffix. (#8770) + +### 🧰 Bug fixes 🧰 + +- `exporterhelper`: fix missed metric aggregations (#9048) + This ensures that context cancellation in the exporter doesn't interfere with metric aggregation. The OTel + SDK currently returns if there's an error in the context used in `Add`. This means that if there's a + cancelled context in an export, the metrics are now recorded. + +- `service`: Fix bug where MutatesData would not correctly propagate through connectors. (#9053) + +## v0.90.1 + +### 🧰 Bug fixes 🧰 + +- `exporterhelper`: Remove noisy log (#9017) + +## v1.0.0/v0.90.0 + +### 🛑 Breaking changes 🛑 + +- `service`: To remain backwards compatible w/ the metrics generated today, otel generated metrics will be generated without the `_total` suffix (#7454) +- `service`: use WithNamespace instead of WrapRegistererWithPrefix (#8988) + Using this functionality in the otel prom exporter fixes a bug where the + target_info was prefixed as otelcol_target_info previously. + + +### 💡 Enhancements 💡 + +- `exporter/debug`: Change default `verbosity` from `normal` to `basic` (#8844) + This change has currently no effect, as `basic` and `normal` verbosity share the same behavior. This might change in the future though, with the `normal` verbosity being more verbose than it currently is (see https://github.com/open-telemetry/opentelemetry-collector/issues/7806). This is why we are changing the default to `basic`, which is expected to stay at the current level of verbosity (one line per batch). +- `exporterhelper`: Fix shutdown logic in persistent queue to not require consumers to be closed first (#8899) +- `confighttp`: Support proxy configuration field in all exporters that support confighttp (#5761) + +### 🧰 Bug fixes 🧰 + +- `exporterhelper`: Fix invalid write index updates in the persistent queue (#8115) + +## v1.0.0-rcv0018/v0.89.0 + +### 💡 Enhancements 💡 + +- `builder`: remove replace statement in builder template (#8763) +- `service/extensions`: Allow extensions to declare dependencies on other extensions and guarantee start/stop/notification order accordingly. (#8732) +- `exporterhelper`: Log export errors when retry is not used by the component. (#8791) +- `cmd/builder`: Add --verbose flag to log `go` subcommands output that are ran as part of a build (#8715) +- `exporterhelper`: Remove internal goroutine loop for persistent queue (#8868) +- `exporterhelper`: Simplify usage of storage client, avoid unnecessary allocations (#8830) +- `exporterhelper`: Simplify logic in boundedMemoryQueue, use channels len/cap (#8829) + +### 🧰 Bug fixes 🧰 + +- `exporterhelper`: fix bug with queue size and capacity metrics (#8682) +- `obsreporttest`: split handler for otel vs oc test path in TestTelemetry (#8758) +- `builder`: Fix featuregate late initialization (#4967) +- `service`: Fix connector logger zap kind key (#8878) + +## v1.0.0-rcv0017/v0.88.0 + +### 💡 Enhancements 💡 + +- `fanoutconsumer`: Enable runtime assertions to catch incorrect pdata mutations in the components claiming as non-mutating pdata. (#6794) + This change enables the runtime assertions to catch unintentional pdata mutations in components that are claimed + as non-mutating pdata. Without these assertions, runtime errors may still occur, but thrown by unrelated components, + making it very difficult to troubleshoot. + + +### 🧰 Bug fixes 🧰 + +- `exporterhelper`: make enqueue failures available for otel metrics (#8673) +- `exporterhelper`: Fix nil pointer dereference when stopping persistent queue after a start encountered an error (#8718) +- `cmd/builder`: Fix ocb ignoring `otelcol_version` when set to v0.86.0 or later (#8692) + +## v1.0.0-rcv0016/v0.87.0 + +### 💡 Enhancements 💡 + +- `service/telemetry exporter/exporterhelper`: Enable sampling logging by default and apply it to all components. (#8134) + The sampled logger configuration can be disabled easily by setting the `service::telemetry::logs::sampling::enabled` to `false`. +- `core`: Adds the ability for components to report status and for extensions to subscribe to status events by implementing an optional StatusWatcher interface. (#7682) + +### 🧰 Bug fixes 🧰 + +- `telemetry`: remove workaround to ignore errors when an instrument includes a `/` (#8346) + +## v1.0.0-rcv0015/v0.86.0 + +### 🚩 Deprecations 🚩 + +- `loggingexporter`: Mark the logging exporter as deprecated, in favour of debug exporter (#7769) + +### 🚀 New components 🚀 + +- `debugexporter`: Add debug exporter, which replaces the logging exporter (#7769) + +### 💡 Enhancements 💡 + +- `featuregate`: List valid feature gates when failing to load invalid gate (#8505) +- `supported platforms`: Add `linux/s390x` architecture to cross build tests in CI (#8213) + +### 🧰 Bug fixes 🧰 + +- `builder`: fix setting `dist.*` keys from env (#8239) +- `configtls`: fix incorrect use of fsnotify (#8438) + ## v0.85.0 ### 💡 Enhancements 💡 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b8c2865fbd8..1f99bb80c8c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -95,15 +95,14 @@ for general practices for OpenTelemetry project. Select a good issue from the links below (ordered by difficulty/complexity): * [Good First Issue](https://github.com/open-telemetry/opentelemetry-collector/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) -* [Up for Grabs](https://github.com/open-telemetry/opentelemetry-collector/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Aup-for-grabs+) * [Help Wanted](https://github.com/open-telemetry/opentelemetry-collector/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) Comment on the issue that you want to work on so we can assign it to you and clarify anything related to it. If you would like to work on something that is not listed as an issue -(e.g. a new feature or enhancement) please first read our [vision](docs/vision.md) and -[roadmap](docs/roadmap.md) to make sure your proposal aligns with the goals of the +(e.g. a new feature or enhancement) please first read our [vision](docs/vision.md) +to make sure your proposal aligns with the goals of the Collector, then create an issue and describe your proposal. It is best to do this in advance so that maintainers can decide if the proposal is a good fit for this repository. This will help avoid situations when you spend significant time @@ -148,7 +147,7 @@ section of general project contributing guide. Working with the project sources requires the following tools: 1. [git](https://git-scm.com/) -2. [go](https://golang.org/) (version 1.18 and up) +2. [go](https://golang.org/) (version 1.20 and up) 3. [make](https://www.gnu.org/software/make/) 4. [docker](https://www.docker.com/) @@ -205,7 +204,7 @@ before merging (but see above paragraph about writing good commit messages in th ## General Notes -This project uses Go 1.18.* and [Github Actions.](https://github.com/features/actions) +This project uses Go 1.20.* and [Github Actions.](https://github.com/features/actions) It is recommended to run `make gofmt all` before submitting your PR @@ -214,8 +213,7 @@ The dependencies are managed with `go mod` if you work with the sources under yo ## Coding Guidelines -Although OpenTelemetry project as a whole is still in Alpha stage we consider -OpenTelemetry Collector to be close to production quality and the quality bar +We consider the OpenTelemetry Collector to be close to production quality and the quality bar for contributions is set accordingly. Contributions must have readable code written with maintainability in mind (if in doubt check [Effective Go](https://golang.org/doc/effective_go.html) for coding advice). The code must adhere to the following robustness principles that @@ -253,6 +251,20 @@ To keep naming patterns consistent across the project, naming patterns are enfor - `func CreateTracesExport(...) {...}` - `func CreateTracesToTracesFunc(...) {...}` +### Enumerations + +To keep naming patterns consistent across the project, enumeration patterns are enforced to make intent clear: + +- Enumerations should be defined using a type definition, such as `type Level int32`. +- Enumerations should use either `int` or `string` as the underlying type +- Enumeration name should succinctly describe the enumeration's purpose + - If the package name represents the entity described by the enumeration then the package name should be factored into the name of the enumeration. For example, `component.Type` instead of `component.ComponentType`. + - The name should convey a sense of limited categorization. For example, `pcommon.ValueType` is better than `pcommon.Value` and `component.Kind` is better than `component.KindType`, since `Kind` already conveys categorization. +- Constant values of an enumeration should be prefixed with the enumeration type name in the name: + - `pcommon.ValueTypeStr` for `pcommon.ValueType` + - `pmetric.MetricTypeGauge` for `pmetric.MetricType` + + ### Recommended Libraries / Defaults In order to simplify developing within the project, library recommendations have been set @@ -266,6 +278,11 @@ and should be followed. Within the project, there are some packages that are yet to follow the recommendations and are being address, however, any new code should adhere to the recommendations. +### Default Configuration + +To guarantee backwards compatible behavior, all configuration packages should supply a `NewDefault[config name]` functions that create a default version of the config. The package does not need to guarantee that `NewDefault[config name]` returns a usable configuration, only that default values will be set. For example, if the configuration requires that a field, such as `Endpoint` be set, but there is no valid default value, then `NewDefault[config name]` may set that value to `""` with the expectation that the user will set a valid value. + +Users should always initialize the config struct with this function and overwrite anything as needed. ### Startup Error Handling @@ -364,8 +381,7 @@ The following limitations are recommended: ### Observability Out of the box, your users should be able to observe the state of your component. -The collector exposes an OpenMetrics endpoint at `http://localhost:8888/metrics` -where your data will land. +See [observability.md](docs/observability.md) for more details. When using the regular helpers, you should have some metrics added around key events automatically. For instance, exporters should have `otelcol_exporter_sent_spans` @@ -650,6 +666,19 @@ target would result in unacceptable latency in the local development loop. The default repo-level target (i.e. running `make` at the root of the repo) should meaningfully validate the entire repo. This should include running the default common target for each module as well as additional repo-level targets. +## How to update the OTLP protocol version + +When a new OTLP version is published, the following steps are required to update this code base: + +1. Edit the top-level Makefile's `OPENTELEMETRY_PROTO_VERSION` variable +2. Run `make genproto` +3. Inspect modifications to the generated code in `pdata/internal/data/protogen` +4. When new fields are added in the protocol, make corresponding changes in `pdata/internal/cmd/pdatagen/internal` +5. Run `make genpdata` +6. Inspect modifications to the generated code in `pdata/*` +7. Run `make genproto-cleanup`, to remove temporary files +8. Update the supported OTLP version in [README.md](./README.md). + ## Exceptions While the rules in this and other documents in this repository is what we strive to follow, we acknowledge that rules may be diff --git a/Makefile b/Makefile index de19ea41afc..c2cbc2c0bdb 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ include ./Makefile.Common # This is the code that we want to run lint, etc. ALL_SRC := $(shell find . -name '*.go' \ -not -path './internal/tools/*' \ + -not -path '*/third_party/*' \ -not -path './pdata/internal/data/protogen/*' \ -not -path './service/internal/zpages/tmplgen/*' \ -type f | sort) @@ -12,7 +13,7 @@ ALL_DOC := $(shell find . \( -name "*.md" -o -name "*.yaml" \) \ -type f | sort) # ALL_MODULES includes ./* dirs (excludes . dir) -ALL_MODULES := $(shell find . -type f -name "go.mod" -exec dirname {} \; | sort | egrep '^./' ) +ALL_MODULES := $(shell find . -type f -name "go.mod" -exec dirname {} \; | sort | grep -E '^./' ) CMD?= @@ -57,7 +58,7 @@ gotest-with-cover: .PHONY: goporto goporto: $(PORTO) - $(PORTO) -w --include-internal ./ + $(PORTO) -w --include-internal --skip-dirs "^cmd/mdatagen/third_party$$" ./ .PHONY: golint golint: @@ -77,7 +78,9 @@ gotidy: .PHONY: gogenerate gogenerate: + cd cmd/mdatagen && $(GOCMD) install . @$(MAKE) for-all-target TARGET="generate" + $(MAKE) fmt .PHONY: addlicense addlicense: $(ADDLICENSE) @@ -148,37 +151,13 @@ ocb: $(MAKE) -C cmd/builder config $(MAKE) -C cmd/builder ocb -DEPENDABOT_PATH=".github/dependabot.yml" -.PHONY: internal-gendependabot -internal-gendependabot: - @echo "Add rule for \"${PACKAGE}\" in \"${DIR}\""; - @echo " - package-ecosystem: \"${PACKAGE}\"" >> ${DEPENDABOT_PATH}; - @echo " directory: \"${DIR}\"" >> ${DEPENDABOT_PATH}; - @echo " schedule:" >> ${DEPENDABOT_PATH}; - @echo " interval: \"weekly\"" >> ${DEPENDABOT_PATH}; - @echo " day: \"wednesday\"" >> ${DEPENDABOT_PATH}; - -# This target should run on /bin/bash since the syntax DIR=$${dir:1} is not supported by /bin/sh. -.PHONY: gendependabot -gendependabot: $(eval SHELL:=/bin/bash) - @echo "Recreating ${DEPENDABOT_PATH} file" - @echo "# File generated by \"make gendependabot\"; DO NOT EDIT." > ${DEPENDABOT_PATH} - @echo "" >> ${DEPENDABOT_PATH} - @echo "version: 2" >> ${DEPENDABOT_PATH} - @echo "updates:" >> ${DEPENDABOT_PATH} - $(MAKE) internal-gendependabot DIR="/" PACKAGE="github-actions" - $(MAKE) internal-gendependabot DIR="/" PACKAGE="gomod" - @set -e; for dir in $(ALL_MODULES); do \ - $(MAKE) internal-gendependabot DIR=$${dir:1} PACKAGE="gomod"; \ - done - # Definitions for ProtoBuf generation. # The source directory for OTLP ProtoBufs. OPENTELEMETRY_PROTO_SRC_DIR=pdata/internal/opentelemetry-proto -# The SHA matching the current version of the proto to use -OPENTELEMETRY_PROTO_VERSION=v1.0.0 +# The branch matching the current version of the proto to use +OPENTELEMETRY_PROTO_VERSION=v1.1.0 # Find all .proto files. OPENTELEMETRY_PROTO_FILES := $(subst $(OPENTELEMETRY_PROTO_SRC_DIR)/,,$(wildcard $(OPENTELEMETRY_PROTO_SRC_DIR)/opentelemetry/proto/*/v1/*.proto $(OPENTELEMETRY_PROTO_SRC_DIR)/opentelemetry/proto/collector/*/v1/*.proto)) @@ -192,7 +171,7 @@ PROTO_PACKAGE=go.opentelemetry.io/collector/$(PROTO_TARGET_GEN_DIR) # Intermediate directory used during generation. PROTO_INTERMEDIATE_DIR=pdata/internal/.patched-otlp-proto -DOCKER_PROTOBUF ?= otel/build-protobuf:0.9.0 +DOCKER_PROTOBUF ?= otel/build-protobuf:0.23.0 PROTOC := docker run --rm -u ${shell id -u} -v${PWD}:${PWD} -w${PWD}/$(PROTO_INTERMEDIATE_DIR) ${DOCKER_PROTOBUF} --proto_path=${PWD} PROTO_INCLUDES := -I/usr/include/github.com/gogo/protobuf -I./ @@ -250,82 +229,66 @@ genpdata: $(GOCMD) run pdata/internal/cmd/pdatagen/main.go $(MAKE) fmt -# The source directory for configuration schema. -OPENTELEMETRY_JSONSCHEMA_SRC_DIR=service/internal/proctelemetry/opentelememetry-configuration - -# The SHA matching the current version of the configuration schema to use -OPENTELEMETRY_JSONSCHEMA_VERSION=main - -# Cleanup temporary directory -genjsonschema-cleanup: - rm -Rf ${OPENTELEMETRY_JSONSCHEMA_SRC_DIR} - -# Generate structs for configuration from configuration schema -genjsonschema: genjsonschema-cleanup $(GOJSONSCHEMA) - mkdir -p ${OPENTELEMETRY_JSONSCHEMA_SRC_DIR} - curl -sSL https://api.github.com/repos/open-telemetry/opentelemetry-configuration/tarball/${OPENTELEMETRY_JSONSCHEMA_VERSION} | tar xz --strip 1 -C ${OPENTELEMETRY_JSONSCHEMA_SRC_DIR} - $(GOJSONSCHEMA) \ - --package telemetry \ - --tags mapstructure \ - --output ./service/telemetry/generated_config.go \ - --schema-package=https://opentelemetry.io/otelconfig/opentelemetry_configuration.json=github.com/open-telemetry/opentelemetry-collector/schema \ - ${OPENTELEMETRY_JSONSCHEMA_SRC_DIR}/schema/opentelemetry_configuration.json - @echo Modify jsonschema generated files. - sed -f $(TOOLS_MOD_DIR)/jsonschema_patch.sed service/telemetry/generated_config.go > service/telemetry/generated_config_tmp.go - mv service/telemetry/generated_config_tmp.go service/telemetry/generated_config.go - $(MAKE) fmt - $(MAKE) genjsonschema-cleanup - # Generate semantic convention constants. Requires a clone of the opentelemetry-specification repo -gensemconv: +gensemconv: $(SEMCONVGEN) $(SEMCONVKIT) @[ "${SPECPATH}" ] || ( echo ">> env var SPECPATH is not set"; exit 1 ) @[ "${SPECTAG}" ] || ( echo ">> env var SPECTAG is not set"; exit 1 ) @echo "Generating semantic convention constants from specification version ${SPECTAG} at ${SPECPATH}" - semconvgen -o semconv/${SPECTAG} -t semconv/template.j2 -s ${SPECTAG} -i ${SPECPATH}/semantic_conventions/. --only=resource -p conventionType=resource -f generated_resource.go - semconvgen -o semconv/${SPECTAG} -t semconv/template.j2 -s ${SPECTAG} -i ${SPECPATH}/semantic_conventions/. --only=event -p conventionType=event -f generated_event.go - semconvgen -o semconv/${SPECTAG} -t semconv/template.j2 -s ${SPECTAG} -i ${SPECPATH}/semantic_conventions/. --only=span -p conventionType=trace -f generated_trace.go + $(SEMCONVGEN) -o semconv/${SPECTAG} -t semconv/template.j2 -s ${SPECTAG} -i ${SPECPATH}/model/. --only=resource -p conventionType=resource -f generated_resource.go + $(SEMCONVGEN) -o semconv/${SPECTAG} -t semconv/template.j2 -s ${SPECTAG} -i ${SPECPATH}/model/. --only=event -p conventionType=event -f generated_event.go + $(SEMCONVGEN) -o semconv/${SPECTAG} -t semconv/template.j2 -s ${SPECTAG} -i ${SPECPATH}/model/. --only=span -p conventionType=trace -f generated_trace.go + $(SEMCONVKIT) -output "semconv/$(SPECTAG)" -tag "$(SPECTAG)" # Checks that the HEAD of the contrib repo checked out in CONTRIB_PATH compiles # against the current version of this repo. .PHONY: check-contrib check-contrib: @echo Setting contrib at $(CONTRIB_PATH) to use this core checkout - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector=$(CURDIR)" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/component=$(CURDIR)/component" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/config/configauth=$(CURDIR)/config/configauth" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/config/configcompression=$(CURDIR)/config/configcompression" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/config/configgrpc=$(CURDIR)/config/configgrpc" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/config/confighttp=$(CURDIR)/config/confighttp" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/config/confignet=$(CURDIR)/config/confignet" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/config/configopaque=$(CURDIR)/config/configopaque" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/config/configtelemetry=$(CURDIR)/config/configtelemetry" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/config/configtls=$(CURDIR)/config/configtls" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/config/internal=$(CURDIR)/config/internal" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/confmap=$(CURDIR)/confmap" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/connector=$(CURDIR)/connector" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/connector/forwardconnector=$(CURDIR)/connector/forwardconnector" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/consumer=$(CURDIR)/consumer" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/exporter=$(CURDIR)/exporter" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/exporter/debugexporter=$(CURDIR)/exporter/debugexporter" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/exporter/loggingexporter=$(CURDIR)/exporter/loggingexporter" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/exporter/otlpexporter=$(CURDIR)/exporter/otlpexporter" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/exporter/otlphttpexporter=$(CURDIR)/exporter/otlphttpexporter" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/extension=$(CURDIR)/extension" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/extension/auth=$(CURDIR)/extension/auth" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/extension/ballastextension=$(CURDIR)/extension/ballastextension" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/extension/zpagesextension=$(CURDIR)/extension/zpagesextension" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/featuregate=$(CURDIR)/featuregate" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/otelcol=$(CURDIR)/otelcol" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/pdata=$(CURDIR)/pdata" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/processor=$(CURDIR)/processor" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/processor/batchprocessor=$(CURDIR)/processor/batchprocessor" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/processor/memorylimiterprocessor=$(CURDIR)/processor/memorylimiterprocessor" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/receiver=$(CURDIR)/receiver" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/receiver/otlpreceiver=$(CURDIR)/receiver/otlpreceiver" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/semconv=$(CURDIR)/semconv" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/service=$(CURDIR)/service" - @$(MAKE) -C $(CONTRIB_PATH) -j2 gotidy - @$(MAKE) -C $(CONTRIB_PATH) test + @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit \ + -replace go.opentelemetry.io/collector=$(CURDIR) \ + -replace go.opentelemetry.io/collector/component=$(CURDIR)/component \ + -replace go.opentelemetry.io/collector/config/configauth=$(CURDIR)/config/configauth \ + -replace go.opentelemetry.io/collector/config/configcompression=$(CURDIR)/config/configcompression \ + -replace go.opentelemetry.io/collector/config/configgrpc=$(CURDIR)/config/configgrpc \ + -replace go.opentelemetry.io/collector/config/confighttp=$(CURDIR)/config/confighttp \ + -replace go.opentelemetry.io/collector/config/confignet=$(CURDIR)/config/confignet \ + -replace go.opentelemetry.io/collector/config/configopaque=$(CURDIR)/config/configopaque \ + -replace go.opentelemetry.io/collector/config/configretry=$(CURDIR)/config/configretry \ + -replace go.opentelemetry.io/collector/config/configtelemetry=$(CURDIR)/config/configtelemetry \ + -replace go.opentelemetry.io/collector/config/configtls=$(CURDIR)/config/configtls \ + -replace go.opentelemetry.io/collector/config/internal=$(CURDIR)/config/internal \ + -replace go.opentelemetry.io/collector/confmap=$(CURDIR)/confmap \ + -replace go.opentelemetry.io/collector/confmap/converter/expandconverter=$(CURDIR)/confmap/converter/expandconverter \ + -replace go.opentelemetry.io/collector/confmap/provider/envprovider=$(CURDIR)/confmap/provider/envprovider \ + -replace go.opentelemetry.io/collector/confmap/provider/fileprovider=$(CURDIR)/confmap/provider/fileprovider \ + -replace go.opentelemetry.io/collector/confmap/provider/httpprovider=$(CURDIR)/confmap/provider/httpprovider \ + -replace go.opentelemetry.io/collector/confmap/provider/httpsprovider=$(CURDIR)/confmap/provider/httpsprovider \ + -replace go.opentelemetry.io/collector/confmap/provider/yamlprovider=$(CURDIR)/confmap/provider/yamlprovider \ + -replace go.opentelemetry.io/collector/connector=$(CURDIR)/connector \ + -replace go.opentelemetry.io/collector/connector/forwardconnector=$(CURDIR)/connector/forwardconnector \ + -replace go.opentelemetry.io/collector/consumer=$(CURDIR)/consumer \ + -replace go.opentelemetry.io/collector/exporter=$(CURDIR)/exporter \ + -replace go.opentelemetry.io/collector/exporter/debugexporter=$(CURDIR)/exporter/debugexporter \ + -replace go.opentelemetry.io/collector/exporter/loggingexporter=$(CURDIR)/exporter/loggingexporter \ + -replace go.opentelemetry.io/collector/exporter/otlpexporter=$(CURDIR)/exporter/otlpexporter \ + -replace go.opentelemetry.io/collector/exporter/otlphttpexporter=$(CURDIR)/exporter/otlphttpexporter \ + -replace go.opentelemetry.io/collector/extension=$(CURDIR)/extension \ + -replace go.opentelemetry.io/collector/extension/auth=$(CURDIR)/extension/auth \ + -replace go.opentelemetry.io/collector/extension/ballastextension=$(CURDIR)/extension/ballastextension \ + -replace go.opentelemetry.io/collector/extension/memorylimiterextension=$(CURDIR)/extension/memorylimiterextension \ + -replace go.opentelemetry.io/collector/extension/zpagesextension=$(CURDIR)/extension/zpagesextension \ + -replace go.opentelemetry.io/collector/featuregate=$(CURDIR)/featuregate \ + -replace go.opentelemetry.io/collector/otelcol=$(CURDIR)/otelcol \ + -replace go.opentelemetry.io/collector/pdata=$(CURDIR)/pdata \ + -replace go.opentelemetry.io/collector/processor=$(CURDIR)/processor \ + -replace go.opentelemetry.io/collector/processor/batchprocessor=$(CURDIR)/processor/batchprocessor \ + -replace go.opentelemetry.io/collector/processor/memorylimiterprocessor=$(CURDIR)/processor/memorylimiterprocessor \ + -replace go.opentelemetry.io/collector/receiver=$(CURDIR)/receiver \ + -replace go.opentelemetry.io/collector/receiver/otlpreceiver=$(CURDIR)/receiver/otlpreceiver \ + -replace go.opentelemetry.io/collector/semconv=$(CURDIR)/semconv \ + -replace go.opentelemetry.io/collector/service=$(CURDIR)/service" + @$(MAKE) -C $(CONTRIB_PATH) gotidy + @$(MAKE) -C $(CONTRIB_PATH) gotest @if [ -z "$(SKIP_RESTORE_CONTRIB)" ]; then \ $(MAKE) restore-contrib; \ fi @@ -334,39 +297,49 @@ check-contrib: .PHONY: restore-contrib restore-contrib: @echo Restoring contrib at $(CONTRIB_PATH) to its original state - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/component" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/config/configcompression" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/config/configgrpc" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/config/confighttp" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/config/confignet" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/config/configopaque" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/config/configtelemetry" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/config/configtls" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/config/internal" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/confmap" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/connector" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/connector/forwardconnector" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/consumer" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/exporter" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/exporter/debugexporter" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/exporter/loggingexporter" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/exporter/otlpexporter" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/exporter/otlphttpexporter" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/extension" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/extension/auth" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/extension/ballastextension" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/extension/zpagestextension" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/featuregate" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/otelcol" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/pdata" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/processor" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/processor/batchprocessor" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/processor/memorylimiterprocessor" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/receiver" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/receiver/otlpreceiver" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/semconv" - @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/service" + @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit \ + -dropreplace go.opentelemetry.io/collector \ + -dropreplace go.opentelemetry.io/collector/component \ + -dropreplace go.opentelemetry.io/collector/config/configauth \ + -dropreplace go.opentelemetry.io/collector/config/configcompression \ + -dropreplace go.opentelemetry.io/collector/config/configgrpc \ + -dropreplace go.opentelemetry.io/collector/config/confighttp \ + -dropreplace go.opentelemetry.io/collector/config/confignet \ + -dropreplace go.opentelemetry.io/collector/config/configopaque \ + -dropreplace go.opentelemetry.io/collector/config/configretry \ + -dropreplace go.opentelemetry.io/collector/config/configtelemetry \ + -dropreplace go.opentelemetry.io/collector/config/configtls \ + -dropreplace go.opentelemetry.io/collector/config/internal \ + -dropreplace go.opentelemetry.io/collector/confmap \ + -dropreplace go.opentelemetry.io/collector/confmap/converter/expandconverter \ + -dropreplace go.opentelemetry.io/collector/confmap/provider/envprovider \ + -dropreplace go.opentelemetry.io/collector/confmap/provider/fileprovider \ + -dropreplace go.opentelemetry.io/collector/confmap/provider/httpprovider \ + -dropreplace go.opentelemetry.io/collector/confmap/provider/httpsprovider \ + -dropreplace go.opentelemetry.io/collector/confmap/provider/yamlprovider \ + -dropreplace go.opentelemetry.io/collector/connector \ + -dropreplace go.opentelemetry.io/collector/connector/forwardconnector \ + -dropreplace go.opentelemetry.io/collector/consumer \ + -dropreplace go.opentelemetry.io/collector/exporter \ + -dropreplace go.opentelemetry.io/collector/exporter/debugexporter \ + -dropreplace go.opentelemetry.io/collector/exporter/loggingexporter \ + -dropreplace go.opentelemetry.io/collector/exporter/otlpexporter \ + -dropreplace go.opentelemetry.io/collector/exporter/otlphttpexporter \ + -dropreplace go.opentelemetry.io/collector/extension \ + -dropreplace go.opentelemetry.io/collector/extension/auth \ + -dropreplace go.opentelemetry.io/collector/extension/ballastextension \ + -dropreplace go.opentelemetry.io/collector/extension/memorylimiterextension \ + -dropreplace go.opentelemetry.io/collector/extension/zpagesextension \ + -dropreplace go.opentelemetry.io/collector/featuregate \ + -dropreplace go.opentelemetry.io/collector/otelcol \ + -dropreplace go.opentelemetry.io/collector/pdata \ + -dropreplace go.opentelemetry.io/collector/processor \ + -dropreplace go.opentelemetry.io/collector/processor/batchprocessor \ + -dropreplace go.opentelemetry.io/collector/processor/memorylimiterprocessor \ + -dropreplace go.opentelemetry.io/collector/receiver \ + -dropreplace go.opentelemetry.io/collector/receiver/otlpreceiver \ + -dropreplace go.opentelemetry.io/collector/semconv \ + -dropreplace go.opentelemetry.io/collector/service" @$(MAKE) -C $(CONTRIB_PATH) -j2 gotidy # List of directories where certificates are stored for unit tests. @@ -432,44 +405,8 @@ push-tags: $(MULTIMOD) done; .PHONY: check-changes -check-changes: $(YQ) -ifndef MODSET - @echo "MODSET not defined" - @echo "usage: make check-changes PREVIOUS_VERSION= MODSET=beta" - exit 1 -endif -ifndef PREVIOUS_VERSION - @echo "PREVIOUS_VERSION not defined" - @echo "usage: make check-changes PREVIOUS_VERSION= MODSET=beta" - exit 1 -else -ifeq (, $(findstring v,$(PREVIOUS_VERSION))) -NORMALIZED_PREVIOUS_VERSION="v$(PREVIOUS_VERSION)" -else -NORMALIZED_PREVIOUS_VERSION="$(PREVIOUS_VERSION)" -endif -endif - @all_submods=$$($(YQ) e '.module-sets.*.modules[] | select(. != "go.opentelemetry.io/collector")' versions.yaml | sed 's/^go\.opentelemetry\.io\/collector\///'); \ - mods=$$($(YQ) e '.module-sets.$(MODSET).modules[]' versions.yaml | sed 's/^go\.opentelemetry\.io\/collector\///'); \ - changed_files=""; \ - for mod in $${mods}; do \ - if [ "$${mod}" == "go.opentelemetry.io/collector" ]; then \ - changed_files+=$$(git diff --name-only $(NORMALIZED_PREVIOUS_VERSION) -- $$(printf '%s\n' $${all_submods[@]} | sed 's/^/:!/' | paste -sd' ' -) | grep -E '.+\.go$$'); \ - elif ! git rev-parse --quiet --verify $${mod}/$(NORMALIZED_PREVIOUS_VERSION) >/dev/null; then \ - echo "Module $${mod} does not have a $(NORMALIZED_PREVIOUS_VERSION) tag"; \ - echo "$(MODSET) release is required."; \ - exit 0; \ - else \ - changed_files+=$$(git diff --name-only $${mod}/$(NORMALIZED_PREVIOUS_VERSION) -- $${mod} | grep -E '.+\.go$$'); \ - fi; \ - done; \ - if [ -n "$${changed_files}" ]; then \ - echo "The following files changed in $(MODSET) modules since $(NORMALIZED_PREVIOUS_VERSION): $${changed_files}"; \ - else \ - echo "No $(MODSET) modules have changed since $(NORMALIZED_PREVIOUS_VERSION)"; \ - echo "No need to release $(MODSET)."; \ - exit 1; \ - fi +check-changes: $(MULTIMOD) + $(MULTIMOD) diff -p $(PREVIOUS_VERSION) -m $(MODSET) .PHONY: prepare-release prepare-release: @@ -494,8 +431,6 @@ else endif # ensure a clean branch git diff -s --exit-code || (echo "local repository not clean"; exit 1) - # check if any modules have changed since the previous release - $(MAKE) check-changes # update files with new version sed -i.bak 's/$(PREVIOUS_VERSION)/$(RELEASE_CANDIDATE)/g' versions.yaml sed -i.bak 's/$(PREVIOUS_VERSION)/$(RELEASE_CANDIDATE)/g' ./cmd/builder/internal/builder/config.go @@ -550,3 +485,9 @@ chlog-update: $(CHLOGGEN) .PHONY: builder-integration-test builder-integration-test: $(ENVSUBST) cd ./cmd/builder && ./test/test.sh + +.PHONY: mdatagen-test +mdatagen-test: + cd cmd/mdatagen && $(GOCMD) install . + cd cmd/mdatagen && $(GOCMD) generate ./... + cd cmd/mdatagen && $(GOCMD) test ./... diff --git a/Makefile.Common b/Makefile.Common index 6b51e353ec1..195701daf59 100644 --- a/Makefile.Common +++ b/Makefile.Common @@ -1,3 +1,4 @@ +SHELL = /bin/bash # ALL_PKGS is the list of all packages where ALL_SRC files reside. ALL_PKGS := $(sort $(shell go list ./...)) # COVER_PKGS is the list of packages to include in the coverage @@ -9,8 +10,11 @@ GOTEST=$(GOCMD) test GOOS := $(shell $(GOCMD) env GOOS) GOARCH := $(shell $(GOCMD) env GOARCH) -TOOLS_MOD_DIR := $(PWD)/internal/tools -TOOLS_BIN_DIR := $(PWD)/.tools +# SRC_ROOT is the top of the source tree. +SRC_ROOT := $(shell git rev-parse --show-toplevel) + +TOOLS_MOD_DIR := $(SRC_ROOT)/internal/tools +TOOLS_BIN_DIR := $(SRC_ROOT)/.tools TOOLS_MOD_REGEX := "\s+_\s+\".*\"" TOOLS_PKG_NAMES := $(shell grep -E $(TOOLS_MOD_REGEX) < $(TOOLS_MOD_DIR)/tools.go | tr -d " _\"" | grep -vE '/v[0-9]+$$') TOOLS_BIN_NAMES := $(addprefix $(TOOLS_BIN_DIR)/, $(notdir $(shell echo $(TOOLS_PKG_NAMES)))) @@ -23,19 +27,17 @@ CHLOGGEN := $(TOOLS_BIN_DIR)/chloggen CROSSLINK := $(TOOLS_BIN_DIR)/crosslink ENVSUBST := $(TOOLS_BIN_DIR)/envsubst GOIMPORTS := $(TOOLS_BIN_DIR)/goimports -GOJSONSCHEMA := $(TOOLS_BIN_DIR)/gojsonschema GOVULNCHECK := $(TOOLS_BIN_DIR)/govulncheck LINT := $(TOOLS_BIN_DIR)/golangci-lint IMPI := $(TOOLS_BIN_DIR)/impi MISSPELL := $(TOOLS_BIN_DIR)/misspell MULTIMOD := $(TOOLS_BIN_DIR)/multimod PORTO := $(TOOLS_BIN_DIR)/porto -YQ := $(TOOLS_BIN_DIR)/yq - -GH := $(shell which gh) +SEMCONVGEN := $(TOOLS_BIN_DIR)/semconvgen +SEMCONVKIT := $(TOOLS_BIN_DIR)/semconvkit .PHONY: install-tools -install-tools: $(TOOLS_BIN_NAMES) $(YQ) +install-tools: $(TOOLS_BIN_NAMES) $(TOOLS_BIN_DIR): mkdir -p $@ @@ -43,9 +45,6 @@ $(TOOLS_BIN_DIR): $(TOOLS_BIN_NAMES): $(TOOLS_BIN_DIR) $(TOOLS_MOD_DIR)/go.mod cd $(TOOLS_MOD_DIR) && $(GOCMD) build -o $@ -trimpath $(filter %/$(notdir $@),$(TOOLS_PKG_NAMES)) -$(YQ): $(TOOLS_BIN_DIR) $(TOOLS_MOD_DIR)/go.mod - cd $(TOOLS_MOD_DIR) && $(GOCMD) build -o $@ -trimpath github.com/mikefarah/yq/v4 - .PHONY: test test: $(GOTEST) $(GOTEST_OPT) ./... @@ -67,7 +66,7 @@ fmt: $(GOIMPORTS) .PHONY: tidy tidy: rm -fr go.sum - $(GOCMD) mod tidy -compat=1.20 + $(GOCMD) mod tidy -compat=1.21 .PHONY: lint lint: $(LINT) diff --git a/README.md b/README.md index d1ae701b0cd..9736c07a617 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,8 @@ GitHub release (latest by date including pre-releases) + +

@@ -35,12 +37,8 @@   •   Monitoring   •   - Performance -   •   Security   •   - Roadmap -   •   Package

@@ -63,6 +61,13 @@ Objectives: - Extensible: Customizable without touching the core code. - Unified: Single codebase, deployable as an agent or collector with support for traces, metrics and logs. +## Supported OTLP version + +This code base is currently built against using OTLP protocol v1.1.0, +considered Stable. [See the OpenTelemetry Protocol Stability +definition +here.](https://github.com/open-telemetry/opentelemetry-proto?tab=readme-ov-file#stability-definition) + ## Stability levels The collector components and implementation are in different stages of stability, and usually split between @@ -100,7 +105,7 @@ A component identified as unmaintained does not have an active code owner. Such When used as a library, the OpenTelemetry Collector attempts to track the currently supported versions of Go, as [defined by the Go team](https://go.dev/doc/devel/release#policy). Removing support for an unsupported Go version is not considered a breaking change. -Starting with the release of Go 1.18, support for Go versions on the OpenTelemetry Collector will be updated as follows: +Support for Go versions on the OpenTelemetry Collector is updated as follows: 1. The first release after the release of a new Go minor version `N` will add build and tests steps for the new Go minor version. 2. The first release after the release of a new Go minor version `N` will remove support for Go version `N-2`. @@ -117,6 +122,9 @@ Here is a list of community roles with current and previous members: - [Andrzej Stencel](https://github.com/astencel-sumo), Sumo Logic - [Antoine Toulme](https://github.com/atoulme), Splunk + - [Evan Bradley](https://github.com/evan-bradley), Dynatrace + - [Tyler Helmuth](https://github.com/TylerHelmuth), Honeycomb + - [Yang Song](https://github.com/songy23), Datadog - Actively seeking contributors to triage issues - Emeritus Triagers: @@ -131,7 +139,6 @@ Here is a list of community roles with current and previous members: - [Anthony Mirabella](https://github.com/Aneurysm9), AWS - [Daniel Jaglowski](https://github.com/djaglowski), observIQ - [Juraci Paixão Kröhling](https://github.com/jpkrohling), Grafana Labs - - [Pablo Baeyens](https://github.com/mx-psi), DataDog - Emeritus Approvers: @@ -141,13 +148,13 @@ Here is a list of community roles with current and previous members: - [Owais Lone](https://github.com/owais), Splunk - [Rahul Patel](https://github.com/rghetia), Google - [Steven Karis](https://github.com/sjkaris), Splunk - - [Yang Song](https://github.com/songy23), Google - Maintainers ([@open-telemetry/collector-maintainers](https://github.com/orgs/open-telemetry/teams/collector-maintainers)): - - [Alex Boten](https://github.com/codeboten), Lightstep - - [Bogdan Drutu](https://github.com/BogdanDrutu), Splunk + - [Alex Boten](https://github.com/codeboten), Honeycomb + - [Bogdan Drutu](https://github.com/BogdanDrutu), Snowflake - [Dmitrii Anoshin](https://github.com/dmitryax), Splunk + - [Pablo Baeyens](https://github.com/mx-psi), DataDog - Emeritus Maintainers: diff --git a/VERSIONING.md b/VERSIONING.md index 08e1b9ca547..e0dcc6781b5 100644 --- a/VERSIONING.md +++ b/VERSIONING.md @@ -5,7 +5,55 @@ is designed so that the following goal can be achieved: **Users are provided a codebase of value that is stable and secure.** -## Policy +## Public API expectations + +The following public API expectations apply to all modules in opentelemetry-collector and opentelemetry-collector-contrib. +As a general rule, stability guarantees of modules versioned as `v1` or higher are aligned with [Go 1 compatibility promise](https://go.dev/doc/go1compat). + +### General Go API considerations + +OpenTelemetry authors reserve the right to introduce API changes breaking compatibility between minor versions in the following scenarios: +* **Struct literals.** It may be necessary to add new fields to exported structs in the API. Code that uses unkeyed + struct literals (such as pkg.T{3, "x"}) to create values of these types would fail to compile after such a change. + However, code that uses keyed literals (pkg.T{A: 3, B: "x"}) will continue to compile. We therefore recommend + using OpenTelemetry collector structs with the keyed literals only. +* **Methods.** As with struct fields, it may be necessary to add methods to types. Under some circumstances, + such as when the type is embedded in a struct along with another type, the addition of the new method may + break the struct by creating a conflict with an existing method of the other embedded type. We cannot protect + against this rare case and do not guarantee compatibility in such scenarios. +* **Dot imports.** If a program imports a package using `import .`, additional names defined in the imported package + in future releases may conflict with other names defined in the program. We do not recommend the use of + `import .` with OpenTelemetry Collector modules. + +Unless otherwise specified in the documentation, the following may change in any way between minor versions: +* **String representation**. The `String` method of any struct is intended to be human-readable and may change its output + in any way. +* **Go version compatibility**. Removing support for an unsupported Go version is not considered a breaking change. +* **OS version compatibility**. Removing support for an unsupported OS version is not considered a breaking change. Upgrading or downgrading OS version support per the [platform support](docs/platform-support.md) document is not considered a breaking change. +* **Dependency updates**. Updating dependencies is not considered a breaking change except when their types are part of the +public API or the update may change the behavior of applications in an incompatible way. + +### Configuration structures + +Configuration structures are part of the public API and backwards +compatibility should be maintained through any changes made to configuration structures. + +Unless otherwise specified in the documentation, the following may change in any way between minor versions: +* **Adding new fields to configuration structures**. Because configuration structures are typically instantiated through +unmarshalling a serialized representation of the structure, and not through structure literals, additive changes to +the set of exported fields in a configuration structure are not considered to break backward compatibility. +* **Relaxing validation rules**. An invalid configuration struct as defined by its `Validate` method return value +may become valid after a change to the validation rules. + +The following are explicitly considered to be breaking changes: +* **Modifying struct tags related to serialization**. Struct tags used to configure serialization mechanisms (`yaml:`, +`mapstructure:`, etc) are part of the structure definition and must maintain compatibility to the same extent as the +structure. +* **Making validation rules more strict**. A valid configuration struct as defined by its `Validate` method return value +must continue to be valid after a change to the validation rules, except when the configuration struct would cause an error +on its intended usage (e.g. when calling a method or when passed to any method or function in any module under opentelemetry-collector). + +## Versioning and module schema * Versioning of this project will be idiomatic of a Go project using [Go modules](https://golang.org/ref/mod#versions). @@ -32,7 +80,7 @@ is designed so that the following goal can be achieved: * A single module should exist, rooted at the top level of this repository, that contains all packages provided for use outside this repository. * Additional modules may be created in this repository to provide for - isolation of build-time tools or other commands. Such modules should be + isolation of build-time tools, other commands or independent libraries. Such modules should be versioned in sync with the `go.opentelemetry.io/collector` module. * Experimental modules still under active development will be versioned with a major version of `v0` to imply the stability guarantee defined by @@ -40,16 +88,6 @@ is designed so that the following goal can be achieved: > Major version zero (0.y.z) is for initial development. Anything MAY > change at any time. The public API SHOULD NOT be considered stable. - - * Configuration structures should be considered part of the public API and backward - compatibility maintained through any changes made to configuration structures. - * Because configuration structures are typically instantiated through unmarshalling - a serialized representation of the structure, and not through structure literals, - additive changes to the set of exported fields in a configuration structure are - not considered to break backward compatibility. - * Struct tags used to configure serialization mechanisms (`yaml:`, `mapstructure:`, etc) - are to be considered part of the structure definition and must maintain compatibility - to the same extent as the structure. * Versioning of the associated [contrib repository](https://github.com/open-telemetry/opentelemetry-collector-contrib) of this project will be idiomatic of a Go project using [Go @@ -72,14 +110,8 @@ is designed so that the following goal can be achieved: whenever you are using the module name). * If a module is version `v0` or `v1`, do not include the major version in either the module path or the import path. - * Configuration structures should be considered part of the public API and backward - compatibility maintained through any changes made to configuration structures. - * Because configuration structures are typically instantiated through unmarshalling - a serialized representation of the structure, and not through structure literals, - additive changes to the set of exported fields in a configuration structure are - not considered to break backward compatibility. - * Modules will be used to encapsulate receivers, processor, exporters, - extensions, and any other independent sets of related components. + * Modules will be used to encapsulate receivers, processors, exporters, + extensions, connectors and any other independent sets of related components. * Experimental modules still under active development will be versioned with a major version of `v0` to imply the stability guarantee defined by [semver](https://semver.org/spec/v2.0.0.html#spec-item-4). @@ -102,17 +134,3 @@ is designed so that the following goal can be achieved: * Contrib modules will be kept up to date with this project's releases. * GitHub releases will be made for all releases. * Go modules will be made available at Go package mirrors. -* Stability guaranties of modules versioned as `v1` or higher are aligned with [Go 1 compatibility - promise](https://go.dev/doc/go1compat). OpenTelemetry authors reserve the right to introduce API changes breaking - compatibility between minor versions in the following scenarios: - * **Struct literals.** It may be necessary to add new fields to exported structs in the API. Code that uses unkeyed - struct literals (such as pkg.T{3, "x"}) to create values of these types would fail to compile after such a change. - However, code that uses keyed literals (pkg.T{A: 3, B: "x"}) will continue to compile. We therefore recommend - using OpenTelemetry collector structs with the keyed literals only. - * **Methods.** As with struct fields, it may be necessary to add methods to types. Under some circumstances, - such as when the type is embedded in a struct along with another type, the addition of the new method may - break the struct by creating a conflict with an existing method of the other embedded type. We cannot protect - against this rare case and do not guarantee compatibility in such scenarios. - * **Dot imports.** If a program imports a package using `import .`, additional names defined in the imported package - in future releases may conflict with other names defined in the program. We do not recommend the use of - `import .` with OpenTelemetry Collector modules. diff --git a/client/client.go b/client/client.go index 1f385f6af81..b8775d5a440 100644 --- a/client/client.go +++ b/client/client.go @@ -141,28 +141,24 @@ func FromContext(ctx context.Context) Info { // NewMetadata creates a new Metadata object to use in Info. md is used as-is. func NewMetadata(md map[string][]string) Metadata { + c := make(map[string][]string, len(md)) + for k, v := range md { + c[strings.ToLower(k)] = v + } return Metadata{ - data: md, + data: c, } } // Get gets the value of the key from metadata, returning a copy. func (m Metadata) Get(key string) []string { - vals := m.data[key] + if len(m.data) == 0 { + return nil + } + + vals := m.data[strings.ToLower(key)] if len(vals) == 0 { - // we didn't find the key, but perhaps it just has different cases? - for k, v := range m.data { - if strings.EqualFold(key, k) { - vals = v - // we optimize for the next lookup - m.data[key] = v - } - } - - // if it's still not found, it's really not here - if len(vals) == 0 { - return nil - } + return nil } ret := make([]string, len(vals)) diff --git a/client/client_test.go b/client/client_test.go index f71b7da0728..ddec6bd89dd 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -77,10 +77,11 @@ func TestFromContext(t *testing.T) { } func TestMetadata(t *testing.T) { - source := map[string][]string{"test-key": {"test-val"}} + source := map[string][]string{"test-key": {"test-val"}, "TEST-KEY-2": {"test-val"}} md := NewMetadata(source) assert.Equal(t, []string{"test-val"}, md.Get("test-key")) - assert.Equal(t, []string{"test-val"}, md.Get("test-KEY")) // case insensitive lookup + assert.Equal(t, []string{"test-val"}, md.Get("test-KEY")) // case insensitive lookup + assert.Equal(t, []string{"test-val"}, md.Get("test-key-2")) // case insensitive lookup // test if copy. In regular use, source cannot change val := md.Get("test-key") @@ -89,3 +90,8 @@ func TestMetadata(t *testing.T) { assert.Empty(t, md.Get("non-existent-key")) } + +func TestUninstantiatedMetadata(t *testing.T) { + i := Info{} + assert.Empty(t, i.Metadata.Get("test")) +} diff --git a/client/package_test.go b/client/package_test.go new file mode 100644 index 00000000000..a5731000b98 --- /dev/null +++ b/client/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package client + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/cmd/builder/README.md b/cmd/builder/README.md index d89534565ad..7a4259d59e5 100644 --- a/cmd/builder/README.md +++ b/cmd/builder/README.md @@ -1,5 +1,4 @@ # OpenTelemetry Collector Builder (ocb) -[![CI](https://github.com/open-telemetry/opentelemetry-collector-builder/actions/workflows/go.yaml/badge.svg)](https://github.com/open-telemetry/opentelemetry-collector-builder/actions/workflows/go.yaml?query=branch%3Amain) This program generates a custom OpenTelemetry Collector binary based on a given configuration. @@ -51,8 +50,21 @@ $ /tmp/dist/otelcol-custom --config=/tmp/otelcol.yaml ## Installation -Download the binary for your respective platform under the ["Releases"](https://github.com/open-telemetry/opentelemetry-collector/releases/latest) page. -If install an official release build, the binary is named `ocb`, but if you installed by using `go install`, it will be called `builder`. +There are two supported ways to install the builder: via the official releases (recommended) and through `go install`. + +### Official releases + +This is the recommended installation method. Download the binary for your respective platform under the ["Releases"](https://github.com/open-telemetry/opentelemetry-collector/releases?q=builder) page. + +### `go install` + +You need to have a `go` compiler in your PATH. Run the following command to install the latest version: + +``` +go install go.opentelemetry.io/collector/cmd/builder@latest +``` + +If installing through this method the binary will be called `builder`. Binaries installed through this method [will incorrectly show `dev` as their version](https://github.com/open-telemetry/opentelemetry-collector/issues/8691). ## Running diff --git a/cmd/builder/go.mod b/cmd/builder/go.mod index fabff549794..0c607dd0aab 100644 --- a/cmd/builder/go.mod +++ b/cmd/builder/go.mod @@ -3,33 +3,35 @@ module go.opentelemetry.io/collector/cmd/builder -go 1.20 +go 1.21 require ( + github.com/hashicorp/go-version v1.6.0 github.com/knadh/koanf/parsers/yaml v0.1.0 github.com/knadh/koanf/providers/env v0.1.0 github.com/knadh/koanf/providers/file v0.1.0 github.com/knadh/koanf/providers/fs v0.1.0 - github.com/knadh/koanf/v2 v2.0.1 - github.com/spf13/cobra v1.7.0 + github.com/knadh/koanf/v2 v2.1.0 + github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 + go.uber.org/zap v1.27.0 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect - golang.org/x/sys v0.12.0 // indirect + golang.org/x/sys v0.14.0 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/cmd/builder/go.sum b/cmd/builder/go.sum index d5cbd3af3aa..c2ebb096a71 100644 --- a/cmd/builder/go.sum +++ b/cmd/builder/go.sum @@ -1,9 +1,13 @@ -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 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/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= @@ -16,8 +20,8 @@ github.com/knadh/koanf/providers/file v0.1.0 h1:fs6U7nrV58d3CFAFh8VTde8TM262ObYf github.com/knadh/koanf/providers/file v0.1.0/go.mod h1:rjJ/nHQl64iYCtAW2QQnF0eSmDEX/YZ/eNFj5yR6BvA= github.com/knadh/koanf/providers/fs v0.1.0 h1:9Hln9GS3bWTItAnGVFYyfkoAIxAFq7pvlF64pTNiDdQ= github.com/knadh/koanf/providers/fs v0.1.0/go.mod h1:Cva1yH8NBxkEeVZx8CUmF5TunbgO72E+GwqDbqpP2sE= -github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= -github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -27,8 +31,6 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -38,20 +40,20 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 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= diff --git a/cmd/builder/internal/builder/config.go b/cmd/builder/internal/builder/config.go index 4128fc32344..bbdbaefc432 100644 --- a/cmd/builder/internal/builder/config.go +++ b/cmd/builder/internal/builder/config.go @@ -11,11 +11,12 @@ import ( "path/filepath" "strings" + "github.com/hashicorp/go-version" "go.uber.org/multierr" "go.uber.org/zap" ) -const defaultOtelColVersion = "0.85.0" +const defaultOtelColVersion = "0.96.0" // ErrInvalidGoMod indicates an invalid gomod var ErrInvalidGoMod = errors.New("invalid gomod specification for module") @@ -27,6 +28,7 @@ type Config struct { SkipCompilation bool `mapstructure:"-"` SkipGetModules bool `mapstructure:"-"` LDFlags string `mapstructure:"-"` + Verbose bool `mapstructure:"-"` Distribution Distribution `mapstructure:"dist"` Exporters []Module `mapstructure:"exporters"` @@ -40,15 +42,16 @@ type Config struct { // Distribution holds the parameters for the final binary type Distribution struct { - Module string `mapstructure:"module"` - Name string `mapstructure:"name"` - Go string `mapstructure:"go"` - Description string `mapstructure:"description"` - OtelColVersion string `mapstructure:"otelcol_version"` - OutputPath string `mapstructure:"output_path"` - Version string `mapstructure:"version"` - BuildTags string `mapstructure:"build_tags"` - DebugCompilation bool `mapstructure:"debug_compilation"` + Module string `mapstructure:"module"` + Name string `mapstructure:"name"` + Go string `mapstructure:"go"` + Description string `mapstructure:"description"` + OtelColVersion string `mapstructure:"otelcol_version"` + RequireOtelColModule bool `mapstructure:"-"` // required for backwards-compatibility with builds older than 0.86.0 + OutputPath string `mapstructure:"output_path"` + Version string `mapstructure:"version"` + BuildTags string `mapstructure:"build_tags"` + DebugCompilation bool `mapstructure:"debug_compilation"` } // Module represents a receiver, exporter, processor or extension for the distribution @@ -96,7 +99,7 @@ func (c *Config) Validate() error { func (c *Config) SetGoPath() error { if !c.SkipCompilation || !c.SkipGetModules { // #nosec G204 - if _, err := exec.Command(c.Distribution.Go, "env").CombinedOutput(); err != nil { + if _, err := exec.Command(c.Distribution.Go, "env").CombinedOutput(); err != nil { // nolint G204 path, err := exec.LookPath("go") if err != nil { return ErrGoNotFound @@ -108,6 +111,21 @@ func (c *Config) SetGoPath() error { return nil } +func (c *Config) SetRequireOtelColModule() error { + constraint, err := version.NewConstraint(">= 0.86.0") + if err != nil { + return err + } + + otelColVersion, err := version.NewVersion(c.Distribution.OtelColVersion) + if err != nil { + return err + } + + c.Distribution.RequireOtelColModule = constraint.Check(otelColVersion) + return nil +} + // ParseModules will parse the Modules entries and populate the missing values func (c *Config) ParseModules() error { var err error diff --git a/cmd/builder/internal/builder/config_test.go b/cmd/builder/internal/builder/config_test.go index 7c8766bdffe..dccee464fe4 100644 --- a/cmd/builder/internal/builder/config_test.go +++ b/cmd/builder/internal/builder/config_test.go @@ -192,3 +192,36 @@ func TestDebugOptionSetConfig(t *testing.T) { assert.NoError(t, cfg.Validate()) assert.True(t, cfg.Distribution.DebugCompilation) } + +func TestRequireOtelColModule(t *testing.T) { + tests := []struct { + Version string + ExpectedRequireOtelColModule bool + }{ + { + Version: "0.85.0", + ExpectedRequireOtelColModule: false, + }, + { + Version: "0.86.0", + ExpectedRequireOtelColModule: true, + }, + { + Version: "0.86.1", + ExpectedRequireOtelColModule: true, + }, + { + Version: "1.0.0", + ExpectedRequireOtelColModule: true, + }, + } + + for _, tt := range tests { + t.Run(tt.Version, func(t *testing.T) { + cfg := NewDefaultConfig() + cfg.Distribution.OtelColVersion = tt.Version + require.NoError(t, cfg.SetRequireOtelColModule()) + assert.Equal(t, tt.ExpectedRequireOtelColModule, cfg.Distribution.RequireOtelColModule) + }) + } +} diff --git a/cmd/builder/internal/builder/main.go b/cmd/builder/internal/builder/main.go index 0267b071c52..3b22300be2e 100644 --- a/cmd/builder/internal/builder/main.go +++ b/cmd/builder/internal/builder/main.go @@ -13,6 +13,7 @@ import ( "time" "go.uber.org/zap" + "go.uber.org/zap/zapio" ) var ( @@ -20,6 +21,27 @@ var ( ErrGoNotFound = errors.New("go binary not found") ) +func runGoCommand(cfg Config, args ...string) error { + cfg.Logger.Info("Running go subcommand.", zap.Any("arguments", args)) + // #nosec G204 -- cfg.Distribution.Go is trusted to be a safe path and the caller is assumed to have carried out necessary input validation + cmd := exec.Command(cfg.Distribution.Go, args...) + cmd.Dir = cfg.Distribution.OutputPath + + if cfg.Verbose { + writer := &zapio.Writer{Log: cfg.Logger} + defer func() { _ = writer.Close() }() + cmd.Stdout = writer + cmd.Stderr = writer + return cmd.Run() + } + + if out, err := cmd.CombinedOutput(); err != nil { + return fmt.Errorf("go subcommand failed with args '%v': %w. Output:\n%s", args, err, out) + } + + return nil +} + // GenerateAndCompile will generate the source files based on the given configuration, update go mod, and will compile into a binary func GenerateAndCompile(cfg Config) error { if err := Generate(cfg); err != nil { @@ -93,11 +115,8 @@ func Compile(cfg Config) error { if cfg.Distribution.BuildTags != "" { args = append(args, "-tags", cfg.Distribution.BuildTags) } - // #nosec G204 -- cfg.Distribution.Go is trusted to be a safe path and the caller is assumed to have carried out necessary input validation - cmd := exec.Command(cfg.Distribution.Go, args...) - cmd.Dir = cfg.Distribution.OutputPath - if out, err := cmd.CombinedOutput(); err != nil { - return fmt.Errorf("failed to compile the OpenTelemetry Collector distribution: %w. Output:\n%s", err, out) + if err := runGoCommand(cfg, args...); err != nil { + return fmt.Errorf("failed to compile the OpenTelemetry Collector distribution: %w", err) } cfg.Logger.Info("Compiled", zap.String("binary", fmt.Sprintf("%s/%s", cfg.Distribution.OutputPath, cfg.Distribution.Name))) @@ -111,11 +130,13 @@ func GetModules(cfg Config) error { return nil } - // #nosec G204 -- cfg.Distribution.Go is trusted to be a safe path - cmd := exec.Command(cfg.Distribution.Go, "mod", "tidy", "-compat=1.20") - cmd.Dir = cfg.Distribution.OutputPath - if out, err := cmd.CombinedOutput(); err != nil { - return fmt.Errorf("failed to update go.mod: %w. Output:\n%s", err, out) + // ambiguous import: found package cloud.google.com/go/compute/metadata in multiple modules + if err := runGoCommand(cfg, "get", "cloud.google.com/go"); err != nil { + return fmt.Errorf("failed to go get: %w", err) + } + + if err := runGoCommand(cfg, "mod", "tidy", "-compat=1.21"); err != nil { + return fmt.Errorf("failed to update go.mod: %w", err) } cfg.Logger.Info("Getting go modules") @@ -124,11 +145,8 @@ func GetModules(cfg Config) error { retries := 3 failReason := "unknown" for i := 1; i <= retries; i++ { - // #nosec G204 - cmd := exec.Command(cfg.Distribution.Go, "mod", "download") - cmd.Dir = cfg.Distribution.OutputPath - if out, err := cmd.CombinedOutput(); err != nil { - failReason = fmt.Sprintf("%s. Output:\n%s", err, out) + if err := runGoCommand(cfg, "mod", "download"); err != nil { + failReason = err.Error() cfg.Logger.Info("Failed modules download", zap.String("retry", fmt.Sprintf("%d/%d", i, retries))) time.Sleep(5 * time.Second) continue @@ -144,5 +162,6 @@ func processAndWrite(cfg Config, tmpl *template.Template, outFile string, tmplPa return err } + defer out.Close() return tmpl.Execute(out, tmplParams) } diff --git a/cmd/builder/internal/builder/main_test.go b/cmd/builder/internal/builder/main_test.go index e9f2fbbd303..6a237743b29 100644 --- a/cmd/builder/internal/builder/main_test.go +++ b/cmd/builder/internal/builder/main_test.go @@ -10,7 +10,6 @@ import ( "path/filepath" "runtime" "testing" - "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -36,25 +35,21 @@ func TestGenerateInvalidOutputPath(t *testing.T) { } func TestSkipGenerate(t *testing.T) { - if runtime.GOOS == "windows" { - t.Skip("skipping the test on Windows, see https://github.com/open-telemetry/opentelemetry-collector/issues/5403") - } - cfg := NewDefaultConfig() cfg.Distribution.OutputPath = t.TempDir() cfg.SkipGenerate = true err := Generate(cfg) require.NoError(t, err) outputFile, err := os.Open(cfg.Distribution.OutputPath) + defer func() { + require.NoError(t, outputFile.Close()) + }() require.NoError(t, err) _, err = outputFile.Readdirnames(1) require.ErrorIs(t, err, io.EOF, "skip generate should leave output directory empty") } func TestGenerateAndCompile(t *testing.T) { - if runtime.GOOS == "windows" { - t.Skip("skipping the test on Windows, see https://github.com/open-telemetry/opentelemetry-collector/issues/5403") - } // This test is dependent on the current file structure. // The goal is find the root of the repo so we can replace the root module. _, thisFile, _, _ := runtime.Caller(0) @@ -64,6 +59,12 @@ func TestGenerateAndCompile(t *testing.T) { fmt.Sprintf("go.opentelemetry.io/collector/config/confignet => %s/config/confignet", workspaceDir), fmt.Sprintf("go.opentelemetry.io/collector/config/configtelemetry => %s/config/configtelemetry", workspaceDir), fmt.Sprintf("go.opentelemetry.io/collector/confmap => %s/confmap", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/confmap/converter/expandconverter => %s/confmap/converter/expandconverter", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/confmap/provider/envprovider => %s/confmap/provider/envprovider", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/confmap/provider/fileprovider => %s/confmap/provider/fileprovider", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/confmap/provider/httpprovider => %s/confmap/provider/httpprovider", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/confmap/provider/httpsprovider => %s/confmap/provider/httpsprovider", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/confmap/provider/yamlprovider => %s/confmap/provider/yamlprovider", workspaceDir), fmt.Sprintf("go.opentelemetry.io/collector/consumer => %s/consumer", workspaceDir), fmt.Sprintf("go.opentelemetry.io/collector/connector => %s/connector", workspaceDir), fmt.Sprintf("go.opentelemetry.io/collector/exporter => %s/exporter", workspaceDir), @@ -129,8 +130,4 @@ func TestGenerateAndCompile(t *testing.T) { require.NoError(t, GenerateAndCompile(cfg)) }) } - - // Sleep for 1 second to make sure all processes using the files are completed - // (on Windows fail to delete temp dir otherwise). - time.Sleep(1 * time.Second) } diff --git a/cmd/builder/internal/builder/package_test.go b/cmd/builder/internal/builder/package_test.go new file mode 100644 index 00000000000..f5e333a7095 --- /dev/null +++ b/cmd/builder/internal/builder/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package builder + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/cmd/builder/internal/builder/templates/go.mod.tmpl b/cmd/builder/internal/builder/templates/go.mod.tmpl index b134bf4b3cb..f70306ae95b 100644 --- a/cmd/builder/internal/builder/templates/go.mod.tmpl +++ b/cmd/builder/internal/builder/templates/go.mod.tmpl @@ -2,7 +2,7 @@ module {{.Distribution.Module}} -go 1.20 +go 1.21 require ( {{- range .Connectors}} @@ -20,7 +20,7 @@ require ( {{- range .Processors}} {{if .GoMod}}{{.GoMod}}{{end}} {{- end}} - go.opentelemetry.io/collector v{{.Distribution.OtelColVersion}} + go.opentelemetry.io/collector{{if .Distribution.RequireOtelColModule}}/otelcol{{end}} v{{.Distribution.OtelColVersion}} ) require ( @@ -49,6 +49,3 @@ replace {{.}} {{- range .Excludes}} exclude {{.}} {{- end}} - -// ambiguous import: found package cloud.google.com/go/compute/metadata in multiple modules -replace cloud.google.com/go => cloud.google.com/go v0.110.2 diff --git a/cmd/builder/internal/builder/templates/main.go.tmpl b/cmd/builder/internal/builder/templates/main.go.tmpl index 2def32ffe0b..64a81295bcb 100644 --- a/cmd/builder/internal/builder/templates/main.go.tmpl +++ b/cmd/builder/internal/builder/templates/main.go.tmpl @@ -5,23 +5,19 @@ package main import ( "log" + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/otelcol" ) func main() { - factories, err := components() - if err != nil { - log.Fatalf("failed to build components: %v", err) - } - info := component.BuildInfo{ Command: "{{ .Distribution.Name }}", Description: "{{ .Distribution.Description }}", Version: "{{ .Distribution.Version }}", } - if err := run(otelcol.CollectorSettings{BuildInfo: info, Factories: factories}); err != nil { + if err := run(otelcol.CollectorSettings{BuildInfo: info, Factories: components}); err != nil { log.Fatal(err) } } diff --git a/cmd/builder/internal/builder/templates/main_others.go.tmpl b/cmd/builder/internal/builder/templates/main_others.go.tmpl index e80a51cd4e0..3735aecb586 100644 --- a/cmd/builder/internal/builder/templates/main_others.go.tmpl +++ b/cmd/builder/internal/builder/templates/main_others.go.tmpl @@ -1,7 +1,6 @@ // Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT. //go:build !windows -// +build !windows package main diff --git a/cmd/builder/internal/builder/templates/main_windows.go.tmpl b/cmd/builder/internal/builder/templates/main_windows.go.tmpl index ba327180578..a4930afdca1 100644 --- a/cmd/builder/internal/builder/templates/main_windows.go.tmpl +++ b/cmd/builder/internal/builder/templates/main_windows.go.tmpl @@ -1,46 +1,27 @@ // Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT. //go:build windows -// +build windows package main import ( + "errors" "fmt" - "os" + "golang.org/x/sys/windows" "golang.org/x/sys/windows/svc" "go.opentelemetry.io/collector/otelcol" ) func run(params otelcol.CollectorSettings) error { - if useInteractiveMode, err := checkUseInteractiveMode(); err != nil { - return err - } else if useInteractiveMode { - return runInteractive(params) - } else { - return runService(params) - } -} - -func checkUseInteractiveMode() (bool, error) { - // If environment variable NO_WINDOWS_SERVICE is set with any value other - // than 0, use interactive mode instead of running as a service. This should - // be set in case running as a service is not possible or desired even - // though the current session is not detected to be interactive - if value, present := os.LookupEnv("NO_WINDOWS_SERVICE"); present && value != "0" { - return true, nil - } - - isInteractiveSession, err := svc.IsAnInteractiveSession() - if err != nil { - return false, fmt.Errorf("failed to determine if we are running in an interactive session: %w", err) - } - return isInteractiveSession, nil -} - -func runService(params otelcol.CollectorSettings) error { - // do not need to supply service name when startup is invoked through Service Control Manager directly + // No need to supply service name when startup is invoked through + // the Service Control Manager directly. if err := svc.Run("", otelcol.NewSvcHandler(params)); err != nil { + if errors.Is(err, windows.ERROR_FAILED_SERVICE_CONTROLLER_CONNECT) { + // Per https://learn.microsoft.com/en-us/windows/win32/api/winsvc/nf-winsvc-startservicectrldispatchera#return-value + // this means that the process is not running as a service, so run interactively. + return runInteractive(params) + } + return fmt.Errorf("failed to start collector server: %w", err) } diff --git a/cmd/builder/internal/command.go b/cmd/builder/internal/command.go index 35c086d3d54..34d1b0b13b9 100644 --- a/cmd/builder/internal/command.go +++ b/cmd/builder/internal/command.go @@ -31,6 +31,7 @@ const ( distributionOutputPathFlag = "output-path" distributionGoFlag = "go" distributionModuleFlag = "module" + verboseFlag = "verbose" ) var ( @@ -52,7 +53,7 @@ build configuration given by the "--config" argument. If no build configuration is provided, ocb will generate a default Collector. `, Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { if err := initConfig(cmd.Flags()); err != nil { return err } @@ -64,6 +65,10 @@ configuration is provided, ocb will generate a default Collector. return fmt.Errorf("go not found: %w", err) } + if err := cfg.SetRequireOtelColModule(); err != nil { + return fmt.Errorf("unable to compare otelcol version: %w", err) + } + if err := cfg.ParseModules(); err != nil { return fmt.Errorf("invalid module configuration: %w", err) } @@ -78,6 +83,7 @@ configuration is provided, ocb will generate a default Collector. cmd.Flags().BoolVar(&cfg.SkipGenerate, skipGenerateFlag, false, "Whether builder should skip generating go code (default false)") cmd.Flags().BoolVar(&cfg.SkipCompilation, skipCompilationFlag, false, "Whether builder should only generate go code with no compile of the collector (default false)") cmd.Flags().BoolVar(&cfg.SkipGetModules, skipGetModulesFlag, false, "Whether builder should skip updating go.mod and retrieve Go module list (default false)") + cmd.Flags().BoolVar(&cfg.Verbose, verboseFlag, false, "Whether builder should print verbose output (default false)") cmd.Flags().StringVar(&cfg.LDFlags, ldflagsFlag, "", `ldflags to include in the "go build" command`) cmd.Flags().StringVar(&cfg.Distribution.Name, distributionNameFlag, "otelcol-custom", "The executable name for the OpenTelemetry Collector distribution") if err := cmd.Flags().MarkDeprecated(distributionNameFlag, "use config distribution::name"); err != nil { diff --git a/cmd/builder/internal/config/default.yaml b/cmd/builder/internal/config/default.yaml index 4fc54f5a09e..1aee339e91b 100644 --- a/cmd/builder/internal/config/default.yaml +++ b/cmd/builder/internal/config/default.yaml @@ -2,22 +2,23 @@ dist: module: go.opentelemetry.io/collector/cmd/otelcorecol name: otelcorecol description: Local OpenTelemetry Collector binary, testing only. - version: 0.85.0-dev - otelcol_version: 0.85.0 + version: 0.96.0-dev + otelcol_version: 0.96.0 receivers: - - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.85.0 + - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.96.0 exporters: - - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.85.0 - - gomod: go.opentelemetry.io/collector/exporter/loggingexporter v0.85.0 - - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.85.0 - - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.85.0 + - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.96.0 + - gomod: go.opentelemetry.io/collector/exporter/loggingexporter v0.96.0 + - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.96.0 + - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.96.0 extensions: - - gomod: go.opentelemetry.io/collector/extension/ballastextension v0.85.0 - - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.85.0 + - gomod: go.opentelemetry.io/collector/extension/ballastextension v0.96.0 + - gomod: go.opentelemetry.io/collector/extension/memorylimiterextension v0.96.0 + - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.96.0 processors: - - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.85.0 - - gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.85.0 + - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.96.0 + - gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.96.0 connectors: - - gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.85.0 + - gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.96.0 diff --git a/cmd/builder/internal/package_test.go b/cmd/builder/internal/package_test.go new file mode 100644 index 00000000000..4486cdb28aa --- /dev/null +++ b/cmd/builder/internal/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package internal + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/cmd/builder/internal/version.go b/cmd/builder/internal/version.go index be1fe805b2b..9ffbbf30955 100644 --- a/cmd/builder/internal/version.go +++ b/cmd/builder/internal/version.go @@ -5,22 +5,42 @@ package internal // import "go.opentelemetry.io/collector/cmd/builder/internal" import ( "fmt" + "runtime/debug" "github.com/spf13/cobra" ) var ( - version = "dev" + version = "" date = "unknown" ) +// binVersion returns the version of the binary. +// If the version is not set, it attempts to read the build information. +// Returns an error if the build information cannot be read. +func binVersion() (string, error) { + if version != "" { + return version, nil + } + info, ok := debug.ReadBuildInfo() + if !ok { + return "", fmt.Errorf("failed to read build info") + } + return info.Main.Version, nil +} + func versionCommand() *cobra.Command { return &cobra.Command{ Use: "version", Short: "Version of ocb", Long: "Prints the version of the ocb binary", - Run: func(cmd *cobra.Command, args []string) { + RunE: func(cmd *cobra.Command, _ []string) error { + version, err := binVersion() + if err != nil { + return err + } cmd.Println(fmt.Sprintf("%s version %s", cmd.Parent().Name(), version)) + return nil }, } } diff --git a/cmd/builder/test/core.builder.yaml b/cmd/builder/test/core.builder.yaml index 719c653bc3a..0f4fe8e9df4 100644 --- a/cmd/builder/test/core.builder.yaml +++ b/cmd/builder/test/core.builder.yaml @@ -1,20 +1,20 @@ dist: module: go.opentelemetry.io/collector/builder/test/core - otelcol_version: 0.85.0 + otelcol_version: 0.94.0 extensions: - import: go.opentelemetry.io/collector/extension/zpagesextension - gomod: go.opentelemetry.io/collector v0.85.0 + gomod: go.opentelemetry.io/collector v0.94.0 path: ${WORKSPACE_DIR} receivers: - import: go.opentelemetry.io/collector/receiver/otlpreceiver - gomod: go.opentelemetry.io/collector v0.85.0 + gomod: go.opentelemetry.io/collector v0.94.0 path: ${WORKSPACE_DIR} exporters: - import: go.opentelemetry.io/collector/exporter/debugexporter - gomod: go.opentelemetry.io/collector v0.85.0 + gomod: go.opentelemetry.io/collector v0.94.0 path: ${WORKSPACE_DIR} replaces: @@ -26,10 +26,17 @@ replaces: - go.opentelemetry.io/collector/config/confighttp => ${WORKSPACE_DIR}/config/confighttp - go.opentelemetry.io/collector/config/confignet => ${WORKSPACE_DIR}/config/confignet - go.opentelemetry.io/collector/config/configopaque => ${WORKSPACE_DIR}/config/configopaque + - go.opentelemetry.io/collector/config/configretry => ${WORKSPACE_DIR}/config/configretry - go.opentelemetry.io/collector/config/configtelemetry => ${WORKSPACE_DIR}/config/configtelemetry - go.opentelemetry.io/collector/config/configtls => ${WORKSPACE_DIR}/config/configtls - go.opentelemetry.io/collector/config/internal => ${WORKSPACE_DIR}/config/internal - go.opentelemetry.io/collector/confmap => ${WORKSPACE_DIR}/confmap + - go.opentelemetry.io/collector/confmap/converter/expandconverter => ${WORKSPACE_DIR}/confmap/converter/expandconverter + - go.opentelemetry.io/collector/confmap/provider/envprovider => ${WORKSPACE_DIR}/confmap/provider/envprovider + - go.opentelemetry.io/collector/confmap/provider/fileprovider => ${WORKSPACE_DIR}/confmap/provider/fileprovider + - go.opentelemetry.io/collector/confmap/provider/httpprovider => ${WORKSPACE_DIR}/confmap/provider/httpprovider + - go.opentelemetry.io/collector/confmap/provider/httpsprovider => ${WORKSPACE_DIR}/confmap/provider/httpsprovider + - go.opentelemetry.io/collector/confmap/provider/yamlprovider => ${WORKSPACE_DIR}/confmap/provider/yamlprovider - go.opentelemetry.io/collector/consumer => ${WORKSPACE_DIR}/consumer - go.opentelemetry.io/collector/connector => ${WORKSPACE_DIR}/connector - go.opentelemetry.io/collector/exporter => ${WORKSPACE_DIR}/exporter diff --git a/cmd/builder/test/default.otel.yaml b/cmd/builder/test/default.otel.yaml deleted file mode 100644 index e87c0fc6784..00000000000 --- a/cmd/builder/test/default.otel.yaml +++ /dev/null @@ -1,22 +0,0 @@ -extensions: - zpages: - -receivers: - otlp: - protocols: - grpc: - -processors: - -exporters: - debug: - -service: - extensions: [zpages] - pipelines: - traces: - receivers: - - otlp - processors: [] - exporters: - - debug diff --git a/cmd/mdatagen/Makefile b/cmd/mdatagen/Makefile new file mode 100644 index 00000000000..ded7a36092d --- /dev/null +++ b/cmd/mdatagen/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common diff --git a/cmd/mdatagen/README.md b/cmd/mdatagen/README.md new file mode 100644 index 00000000000..b2affa6c780 --- /dev/null +++ b/cmd/mdatagen/README.md @@ -0,0 +1,56 @@ +# Metadata Generator + +Every component's documentation should include a brief description of the component and guidance on how to use it. +There is also some information about the component (or metadata) that should be included to help end-users understand the current state of the component and whether it is right for their use case. +Examples of this metadata about a component are: + +* its stability level +* the distributions containing it +* the types of pipelines it supports +* metrics emitted in the case of a scraping receiver + +The metadata generator defines a schema for specifying this information to ensure it is complete and well-formed. +The metadata generator is then able to ingest the metadata, validate it against the schema and produce documentation in a standardized format. +An example of how this generated documentation looks can be found in [documentation.md](./documentation.md). + +## Using the Metadata Generator + +In order for a component to benefit from the metadata generator (`mdatagen`) these requirements need to be met: +1. A `metadata.yaml` file containing the metadata needs to be included in the component +2. The component should declare a `go:generate mdatagen` directive which tells `mdatagen` what to generate + +As an example, here is a minimal `metadata.yaml` for the [OTLP receiver](https://github.com/open-telemetry/opentelemetry-collector/tree/main/receiver/otlpreceiver): +```yaml +type: otlp +status: + class: receiver + stability: + beta: [logs] + stable: [metrics, traces] +``` + +Detailed information about the schema of `metadata.yaml` can be found in [metadata-schema.yaml](./metadata-schema.yaml). + +The `go:generate mdatagen` directive is usually defined in a `doc.go` file in the same package as the component, for example: +```go +//go:generate mdatagen metadata.yaml + +package main +``` + +Below are some more examples that can be used for reference: + +* The ElasticSearch receiver has an extensive [metadata.yaml](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/elasticsearchreceiver/metadata.yaml) +* The host metrics receiver has internal subcomponents, each with their own `metadata.yaml` and `doc.go`. See [cpuscraper](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/hostmetricsreceiver/internal/scraper/cpuscraper) for example. + +You can run `cd cmd/mdatagen && $(GOCMD) install .` to install the `mdatagen` tool in `GOBIN` and then run `mdatagen metadata.yaml` to generate documentation for a specific component or you can run `make generate` to generate documentation for all components. + +## Contributing to the Metadata Generator + +The code for generating the documentation can be found in [loader.go](./loader.go) and the templates for rendering the documentation can be found in [templates](./templates). +When making updates to the metadata generator or introducing support for new functionality: + +1. Ensure the [metadata-schema.yaml](./metadata-schema.yaml) and [./metadata.yaml](metadata.yaml) files reflect the changes. +2. Run `make mdatagen-test`. +3. Make sure all tests are passing including [generated tests](./internal/metadata/generated_metrics_test.go). +4. Run `make generate`. diff --git a/cmd/mdatagen/doc.go b/cmd/mdatagen/doc.go new file mode 100644 index 00000000000..8f1fc6a7176 --- /dev/null +++ b/cmd/mdatagen/doc.go @@ -0,0 +1,7 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Generate a test metrics builder from a sample metrics set covering all configuration options. +//go:generate mdatagen metadata-sample.yaml + +package main diff --git a/cmd/mdatagen/documentation.md b/cmd/mdatagen/documentation.md new file mode 100644 index 00000000000..1955e081535 --- /dev/null +++ b/cmd/mdatagen/documentation.md @@ -0,0 +1,96 @@ +[comment]: <> (Code generated by mdatagen. DO NOT EDIT.) + +# file + +## Default Metrics + +The following metrics are emitted by default. Each of them can be disabled by applying the following configuration: + +```yaml +metrics: + : + enabled: false +``` + +### default.metric + +Monotonic cumulative sum int metric enabled by default. + +The metric will be become optional soon. + +| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | +| ---- | ----------- | ---------- | ----------------------- | --------- | +| s | Sum | Int | Cumulative | true | + +#### Attributes + +| Name | Description | Values | +| ---- | ----------- | ------ | +| string_attr | Attribute with any string value. | Any Str | +| state | Integer attribute with overridden name. | Any Int | +| enum_attr | Attribute with a known set of string values. | Str: ``red``, ``green``, ``blue`` | +| slice_attr | Attribute with a slice value. | Any Slice | +| map_attr | Attribute with a map value. | Any Map | + +### default.metric.to_be_removed + +[DEPRECATED] Non-monotonic delta sum double metric enabled by default. + +The metric will be will be removed soon. + +| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | +| ---- | ----------- | ---------- | ----------------------- | --------- | +| s | Sum | Double | Delta | false | + +## Optional Metrics + +The following metrics are not emitted by default. Each of them can be enabled by applying the following configuration: + +```yaml +metrics: + : + enabled: true +``` + +### optional.metric + +[DEPRECATED] Gauge double metric disabled by default. + +| Unit | Metric Type | Value Type | +| ---- | ----------- | ---------- | +| 1 | Gauge | Double | + +#### Attributes + +| Name | Description | Values | +| ---- | ----------- | ------ | +| string_attr | Attribute with any string value. | Any Str | +| boolean_attr | Attribute with a boolean value. | Any Bool | + +### optional.metric.empty_unit + +[DEPRECATED] Gauge double metric disabled by default. + +| Unit | Metric Type | Value Type | +| ---- | ----------- | ---------- | +| | Gauge | Double | + +#### Attributes + +| Name | Description | Values | +| ---- | ----------- | ------ | +| string_attr | Attribute with any string value. | Any Str | +| boolean_attr | Attribute with a boolean value. | Any Bool | + +## Resource Attributes + +| Name | Description | Values | Enabled | +| ---- | ----------- | ------ | ------- | +| map.resource.attr | Resource attribute with a map value. | Any Map | true | +| optional.resource.attr | Explicitly disabled ResourceAttribute. | Any Str | false | +| slice.resource.attr | Resource attribute with a slice value. | Any Slice | true | +| string.enum.resource.attr | Resource attribute with a known set of string values. | Str: ``one``, ``two`` | true | +| string.resource.attr | Resource attribute with any string value. | Any Str | true | +| string.resource.attr_disable_warning | Resource attribute with any string value. | Any Str | true | +| string.resource.attr_remove_warning | Resource attribute with any string value. | Any Str | false | +| string.resource.attr_to_be_removed | Resource attribute with any string value. | Any Str | true | diff --git a/cmd/mdatagen/embeded_templates.go b/cmd/mdatagen/embeded_templates.go new file mode 100644 index 00000000000..dace6c43f32 --- /dev/null +++ b/cmd/mdatagen/embeded_templates.go @@ -0,0 +1,13 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package main + +import "embed" + +// templateFS ensures that the files needed +// to generate metadata as an embedded filesystem since +// `go get` doesn't require these files to be downloaded. +// +//go:embed templates/*.tmpl templates/testdata/*.tmpl +var templateFS embed.FS diff --git a/cmd/mdatagen/embeded_templates_test.go b/cmd/mdatagen/embeded_templates_test.go new file mode 100644 index 00000000000..1f4c4684e4e --- /dev/null +++ b/cmd/mdatagen/embeded_templates_test.go @@ -0,0 +1,47 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package main + +import ( + "io/fs" + "path" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestEnsureTemplatesLoaded(t *testing.T) { + t.Parallel() + + const ( + rootDir = "templates" + ) + + var ( + templateFiles = map[string]struct{}{ + path.Join(rootDir, "component_test.go.tmpl"): {}, + path.Join(rootDir, "documentation.md.tmpl"): {}, + path.Join(rootDir, "metrics.go.tmpl"): {}, + path.Join(rootDir, "metrics_test.go.tmpl"): {}, + path.Join(rootDir, "resource.go.tmpl"): {}, + path.Join(rootDir, "resource_test.go.tmpl"): {}, + path.Join(rootDir, "config.go.tmpl"): {}, + path.Join(rootDir, "config_test.go.tmpl"): {}, + path.Join(rootDir, "readme.md.tmpl"): {}, + path.Join(rootDir, "status.go.tmpl"): {}, + path.Join(rootDir, "testdata", "config.yaml.tmpl"): {}, + } + count = 0 + ) + assert.NoError(t, fs.WalkDir(templateFS, ".", func(path string, d fs.DirEntry, _ error) error { + if d != nil && d.IsDir() { + return nil + } + count++ + assert.Contains(t, templateFiles, path) + return nil + })) + assert.Equal(t, len(templateFiles), count, "Must match the expected number of calls") + +} diff --git a/cmd/mdatagen/go.mod b/cmd/mdatagen/go.mod new file mode 100644 index 00000000000..e654d0832c7 --- /dev/null +++ b/cmd/mdatagen/go.mod @@ -0,0 +1,81 @@ +module go.opentelemetry.io/collector/cmd/mdatagen + +go 1.21 + +require ( + github.com/google/go-cmp v0.6.0 + github.com/stretchr/testify v1.8.4 + go.opentelemetry.io/collector/component v0.96.0 + go.opentelemetry.io/collector/confmap v0.96.0 + go.opentelemetry.io/collector/confmap/provider/fileprovider v0.96.0 + go.opentelemetry.io/collector/pdata v1.3.0 + go.opentelemetry.io/collector/receiver v0.96.0 + go.opentelemetry.io/collector/semconv v0.96.0 + go.opentelemetry.io/otel/metric v1.24.0 + go.opentelemetry.io/otel/trace v1.24.0 + go.uber.org/multierr v1.11.0 + go.uber.org/zap v1.27.0 + golang.org/x/text v0.14.0 +) + +require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/knadh/koanf/maps v0.1.1 // indirect + github.com/knadh/koanf/providers/confmap v0.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect + go.opentelemetry.io/collector/consumer v0.96.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sys v0.17.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + +replace go.opentelemetry.io/collector/component => ../../component + +replace go.opentelemetry.io/collector/confmap => ../../confmap + +replace go.opentelemetry.io/collector/confmap/provider/fileprovider => ../../confmap/provider/fileprovider + +replace go.opentelemetry.io/collector/pdata => ../../pdata + +replace go.opentelemetry.io/collector/receiver => ../../receiver + +replace go.opentelemetry.io/collector/semconv => ../../semconv + +replace go.opentelemetry.io/collector/featuregate => ../../featuregate + +replace go.opentelemetry.io/collector/consumer => ../../consumer + +replace go.opentelemetry.io/collector => ../.. + +replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry + +retract ( + v0.76.2 + v0.76.1 + v0.65.0 +) diff --git a/cmd/mdatagen/go.sum b/cmd/mdatagen/go.sum new file mode 100644 index 00000000000..06616cda85d --- /dev/null +++ b/cmd/mdatagen/go.sum @@ -0,0 +1,126 @@ +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +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= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= +github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= +github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= +github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +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/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +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/cmd/mdatagen/internal/metadata/generated_config.go b/cmd/mdatagen/internal/metadata/generated_config.go new file mode 100644 index 00000000000..92937f48dbf --- /dev/null +++ b/cmd/mdatagen/internal/metadata/generated_config.go @@ -0,0 +1,122 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import "go.opentelemetry.io/collector/confmap" + +// MetricConfig provides common config for a particular metric. +type MetricConfig struct { + Enabled bool `mapstructure:"enabled"` + + enabledSetByUser bool +} + +func (ms *MetricConfig) Unmarshal(parser *confmap.Conf) error { + if parser == nil { + return nil + } + err := parser.Unmarshal(ms) + if err != nil { + return err + } + ms.enabledSetByUser = parser.IsSet("enabled") + return nil +} + +// MetricsConfig provides config for file metrics. +type MetricsConfig struct { + DefaultMetric MetricConfig `mapstructure:"default.metric"` + DefaultMetricToBeRemoved MetricConfig `mapstructure:"default.metric.to_be_removed"` + OptionalMetric MetricConfig `mapstructure:"optional.metric"` + OptionalMetricEmptyUnit MetricConfig `mapstructure:"optional.metric.empty_unit"` +} + +func DefaultMetricsConfig() MetricsConfig { + return MetricsConfig{ + DefaultMetric: MetricConfig{ + Enabled: true, + }, + DefaultMetricToBeRemoved: MetricConfig{ + Enabled: true, + }, + OptionalMetric: MetricConfig{ + Enabled: false, + }, + OptionalMetricEmptyUnit: MetricConfig{ + Enabled: false, + }, + } +} + +// ResourceAttributeConfig provides common config for a particular resource attribute. +type ResourceAttributeConfig struct { + Enabled bool `mapstructure:"enabled"` + + enabledSetByUser bool +} + +func (rac *ResourceAttributeConfig) Unmarshal(parser *confmap.Conf) error { + if parser == nil { + return nil + } + err := parser.Unmarshal(rac) + if err != nil { + return err + } + rac.enabledSetByUser = parser.IsSet("enabled") + return nil +} + +// ResourceAttributesConfig provides config for file resource attributes. +type ResourceAttributesConfig struct { + MapResourceAttr ResourceAttributeConfig `mapstructure:"map.resource.attr"` + OptionalResourceAttr ResourceAttributeConfig `mapstructure:"optional.resource.attr"` + SliceResourceAttr ResourceAttributeConfig `mapstructure:"slice.resource.attr"` + StringEnumResourceAttr ResourceAttributeConfig `mapstructure:"string.enum.resource.attr"` + StringResourceAttr ResourceAttributeConfig `mapstructure:"string.resource.attr"` + StringResourceAttrDisableWarning ResourceAttributeConfig `mapstructure:"string.resource.attr_disable_warning"` + StringResourceAttrRemoveWarning ResourceAttributeConfig `mapstructure:"string.resource.attr_remove_warning"` + StringResourceAttrToBeRemoved ResourceAttributeConfig `mapstructure:"string.resource.attr_to_be_removed"` +} + +func DefaultResourceAttributesConfig() ResourceAttributesConfig { + return ResourceAttributesConfig{ + MapResourceAttr: ResourceAttributeConfig{ + Enabled: true, + }, + OptionalResourceAttr: ResourceAttributeConfig{ + Enabled: false, + }, + SliceResourceAttr: ResourceAttributeConfig{ + Enabled: true, + }, + StringEnumResourceAttr: ResourceAttributeConfig{ + Enabled: true, + }, + StringResourceAttr: ResourceAttributeConfig{ + Enabled: true, + }, + StringResourceAttrDisableWarning: ResourceAttributeConfig{ + Enabled: true, + }, + StringResourceAttrRemoveWarning: ResourceAttributeConfig{ + Enabled: false, + }, + StringResourceAttrToBeRemoved: ResourceAttributeConfig{ + Enabled: true, + }, + } +} + +// MetricsBuilderConfig is a configuration for file metrics builder. +type MetricsBuilderConfig struct { + Metrics MetricsConfig `mapstructure:"metrics"` + ResourceAttributes ResourceAttributesConfig `mapstructure:"resource_attributes"` +} + +func DefaultMetricsBuilderConfig() MetricsBuilderConfig { + return MetricsBuilderConfig{ + Metrics: DefaultMetricsConfig(), + ResourceAttributes: DefaultResourceAttributesConfig(), + } +} diff --git a/cmd/mdatagen/internal/metadata/generated_config_test.go b/cmd/mdatagen/internal/metadata/generated_config_test.go new file mode 100644 index 00000000000..bfb90940386 --- /dev/null +++ b/cmd/mdatagen/internal/metadata/generated_config_test.go @@ -0,0 +1,145 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "path/filepath" + "testing" + + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap/confmaptest" +) + +func TestMetricsBuilderConfig(t *testing.T) { + tests := []struct { + name string + want MetricsBuilderConfig + }{ + { + name: "default", + want: DefaultMetricsBuilderConfig(), + }, + { + name: "all_set", + want: MetricsBuilderConfig{ + Metrics: MetricsConfig{ + DefaultMetric: MetricConfig{Enabled: true}, + DefaultMetricToBeRemoved: MetricConfig{Enabled: true}, + OptionalMetric: MetricConfig{Enabled: true}, + OptionalMetricEmptyUnit: MetricConfig{Enabled: true}, + }, + ResourceAttributes: ResourceAttributesConfig{ + MapResourceAttr: ResourceAttributeConfig{Enabled: true}, + OptionalResourceAttr: ResourceAttributeConfig{Enabled: true}, + SliceResourceAttr: ResourceAttributeConfig{Enabled: true}, + StringEnumResourceAttr: ResourceAttributeConfig{Enabled: true}, + StringResourceAttr: ResourceAttributeConfig{Enabled: true}, + StringResourceAttrDisableWarning: ResourceAttributeConfig{Enabled: true}, + StringResourceAttrRemoveWarning: ResourceAttributeConfig{Enabled: true}, + StringResourceAttrToBeRemoved: ResourceAttributeConfig{Enabled: true}, + }, + }, + }, + { + name: "none_set", + want: MetricsBuilderConfig{ + Metrics: MetricsConfig{ + DefaultMetric: MetricConfig{Enabled: false}, + DefaultMetricToBeRemoved: MetricConfig{Enabled: false}, + OptionalMetric: MetricConfig{Enabled: false}, + OptionalMetricEmptyUnit: MetricConfig{Enabled: false}, + }, + ResourceAttributes: ResourceAttributesConfig{ + MapResourceAttr: ResourceAttributeConfig{Enabled: false}, + OptionalResourceAttr: ResourceAttributeConfig{Enabled: false}, + SliceResourceAttr: ResourceAttributeConfig{Enabled: false}, + StringEnumResourceAttr: ResourceAttributeConfig{Enabled: false}, + StringResourceAttr: ResourceAttributeConfig{Enabled: false}, + StringResourceAttrDisableWarning: ResourceAttributeConfig{Enabled: false}, + StringResourceAttrRemoveWarning: ResourceAttributeConfig{Enabled: false}, + StringResourceAttrToBeRemoved: ResourceAttributeConfig{Enabled: false}, + }, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + cfg := loadMetricsBuilderConfig(t, tt.name) + if diff := cmp.Diff(tt.want, cfg, cmpopts.IgnoreUnexported(MetricConfig{}, ResourceAttributeConfig{})); diff != "" { + t.Errorf("Config mismatch (-expected +actual):\n%s", diff) + } + }) + } +} + +func loadMetricsBuilderConfig(t *testing.T, name string) MetricsBuilderConfig { + cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) + require.NoError(t, err) + sub, err := cm.Sub(name) + require.NoError(t, err) + cfg := DefaultMetricsBuilderConfig() + require.NoError(t, component.UnmarshalConfig(sub, &cfg)) + return cfg +} + +func TestResourceAttributesConfig(t *testing.T) { + tests := []struct { + name string + want ResourceAttributesConfig + }{ + { + name: "default", + want: DefaultResourceAttributesConfig(), + }, + { + name: "all_set", + want: ResourceAttributesConfig{ + MapResourceAttr: ResourceAttributeConfig{Enabled: true}, + OptionalResourceAttr: ResourceAttributeConfig{Enabled: true}, + SliceResourceAttr: ResourceAttributeConfig{Enabled: true}, + StringEnumResourceAttr: ResourceAttributeConfig{Enabled: true}, + StringResourceAttr: ResourceAttributeConfig{Enabled: true}, + StringResourceAttrDisableWarning: ResourceAttributeConfig{Enabled: true}, + StringResourceAttrRemoveWarning: ResourceAttributeConfig{Enabled: true}, + StringResourceAttrToBeRemoved: ResourceAttributeConfig{Enabled: true}, + }, + }, + { + name: "none_set", + want: ResourceAttributesConfig{ + MapResourceAttr: ResourceAttributeConfig{Enabled: false}, + OptionalResourceAttr: ResourceAttributeConfig{Enabled: false}, + SliceResourceAttr: ResourceAttributeConfig{Enabled: false}, + StringEnumResourceAttr: ResourceAttributeConfig{Enabled: false}, + StringResourceAttr: ResourceAttributeConfig{Enabled: false}, + StringResourceAttrDisableWarning: ResourceAttributeConfig{Enabled: false}, + StringResourceAttrRemoveWarning: ResourceAttributeConfig{Enabled: false}, + StringResourceAttrToBeRemoved: ResourceAttributeConfig{Enabled: false}, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + cfg := loadResourceAttributesConfig(t, tt.name) + if diff := cmp.Diff(tt.want, cfg, cmpopts.IgnoreUnexported(ResourceAttributeConfig{})); diff != "" { + t.Errorf("Config mismatch (-expected +actual):\n%s", diff) + } + }) + } +} + +func loadResourceAttributesConfig(t *testing.T, name string) ResourceAttributesConfig { + cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) + require.NoError(t, err) + sub, err := cm.Sub(name) + require.NoError(t, err) + sub, err = sub.Sub("resource_attributes") + require.NoError(t, err) + cfg := DefaultResourceAttributesConfig() + require.NoError(t, component.UnmarshalConfig(sub, &cfg)) + return cfg +} diff --git a/cmd/mdatagen/internal/metadata/generated_metrics.go b/cmd/mdatagen/internal/metadata/generated_metrics.go new file mode 100644 index 00000000000..a6d8a7e4169 --- /dev/null +++ b/cmd/mdatagen/internal/metadata/generated_metrics.go @@ -0,0 +1,425 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "time" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/receiver" + conventions "go.opentelemetry.io/collector/semconv/v1.9.0" +) + +// AttributeEnumAttr specifies the a value enum_attr attribute. +type AttributeEnumAttr int + +const ( + _ AttributeEnumAttr = iota + AttributeEnumAttrRed + AttributeEnumAttrGreen + AttributeEnumAttrBlue +) + +// String returns the string representation of the AttributeEnumAttr. +func (av AttributeEnumAttr) String() string { + switch av { + case AttributeEnumAttrRed: + return "red" + case AttributeEnumAttrGreen: + return "green" + case AttributeEnumAttrBlue: + return "blue" + } + return "" +} + +// MapAttributeEnumAttr is a helper map of string to AttributeEnumAttr attribute value. +var MapAttributeEnumAttr = map[string]AttributeEnumAttr{ + "red": AttributeEnumAttrRed, + "green": AttributeEnumAttrGreen, + "blue": AttributeEnumAttrBlue, +} + +type metricDefaultMetric struct { + data pmetric.Metric // data buffer for generated metric. + config MetricConfig // metric config provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills default.metric metric with initial data. +func (m *metricDefaultMetric) init() { + m.data.SetName("default.metric") + m.data.SetDescription("Monotonic cumulative sum int metric enabled by default.") + m.data.SetUnit("s") + m.data.SetEmptySum() + m.data.Sum().SetIsMonotonic(true) + m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) + m.data.Sum().DataPoints().EnsureCapacity(m.capacity) +} + +func (m *metricDefaultMetric) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, stringAttrAttributeValue string, overriddenIntAttrAttributeValue int64, enumAttrAttributeValue string, sliceAttrAttributeValue []any, mapAttrAttributeValue map[string]any) { + if !m.config.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntValue(val) + dp.Attributes().PutStr("string_attr", stringAttrAttributeValue) + dp.Attributes().PutInt("state", overriddenIntAttrAttributeValue) + dp.Attributes().PutStr("enum_attr", enumAttrAttributeValue) + dp.Attributes().PutEmptySlice("slice_attr").FromRaw(sliceAttrAttributeValue) + dp.Attributes().PutEmptyMap("map_attr").FromRaw(mapAttrAttributeValue) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricDefaultMetric) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricDefaultMetric) emit(metrics pmetric.MetricSlice) { + if m.config.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricDefaultMetric(cfg MetricConfig) metricDefaultMetric { + m := metricDefaultMetric{config: cfg} + if cfg.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricDefaultMetricToBeRemoved struct { + data pmetric.Metric // data buffer for generated metric. + config MetricConfig // metric config provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills default.metric.to_be_removed metric with initial data. +func (m *metricDefaultMetricToBeRemoved) init() { + m.data.SetName("default.metric.to_be_removed") + m.data.SetDescription("[DEPRECATED] Non-monotonic delta sum double metric enabled by default.") + m.data.SetUnit("s") + m.data.SetEmptySum() + m.data.Sum().SetIsMonotonic(false) + m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityDelta) +} + +func (m *metricDefaultMetricToBeRemoved) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64) { + if !m.config.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetDoubleValue(val) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricDefaultMetricToBeRemoved) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricDefaultMetricToBeRemoved) emit(metrics pmetric.MetricSlice) { + if m.config.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricDefaultMetricToBeRemoved(cfg MetricConfig) metricDefaultMetricToBeRemoved { + m := metricDefaultMetricToBeRemoved{config: cfg} + if cfg.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricOptionalMetric struct { + data pmetric.Metric // data buffer for generated metric. + config MetricConfig // metric config provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills optional.metric metric with initial data. +func (m *metricOptionalMetric) init() { + m.data.SetName("optional.metric") + m.data.SetDescription("[DEPRECATED] Gauge double metric disabled by default.") + m.data.SetUnit("1") + m.data.SetEmptyGauge() + m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) +} + +func (m *metricOptionalMetric) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, stringAttrAttributeValue string, booleanAttrAttributeValue bool) { + if !m.config.Enabled { + return + } + dp := m.data.Gauge().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetDoubleValue(val) + dp.Attributes().PutStr("string_attr", stringAttrAttributeValue) + dp.Attributes().PutBool("boolean_attr", booleanAttrAttributeValue) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricOptionalMetric) updateCapacity() { + if m.data.Gauge().DataPoints().Len() > m.capacity { + m.capacity = m.data.Gauge().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricOptionalMetric) emit(metrics pmetric.MetricSlice) { + if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricOptionalMetric(cfg MetricConfig) metricOptionalMetric { + m := metricOptionalMetric{config: cfg} + if cfg.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricOptionalMetricEmptyUnit struct { + data pmetric.Metric // data buffer for generated metric. + config MetricConfig // metric config provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills optional.metric.empty_unit metric with initial data. +func (m *metricOptionalMetricEmptyUnit) init() { + m.data.SetName("optional.metric.empty_unit") + m.data.SetDescription("[DEPRECATED] Gauge double metric disabled by default.") + m.data.SetUnit("") + m.data.SetEmptyGauge() + m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) +} + +func (m *metricOptionalMetricEmptyUnit) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, stringAttrAttributeValue string, booleanAttrAttributeValue bool) { + if !m.config.Enabled { + return + } + dp := m.data.Gauge().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetDoubleValue(val) + dp.Attributes().PutStr("string_attr", stringAttrAttributeValue) + dp.Attributes().PutBool("boolean_attr", booleanAttrAttributeValue) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricOptionalMetricEmptyUnit) updateCapacity() { + if m.data.Gauge().DataPoints().Len() > m.capacity { + m.capacity = m.data.Gauge().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricOptionalMetricEmptyUnit) emit(metrics pmetric.MetricSlice) { + if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricOptionalMetricEmptyUnit(cfg MetricConfig) metricOptionalMetricEmptyUnit { + m := metricOptionalMetricEmptyUnit{config: cfg} + if cfg.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +// MetricsBuilder provides an interface for scrapers to report metrics while taking care of all the transformations +// required to produce metric representation defined in metadata and user config. +type MetricsBuilder struct { + config MetricsBuilderConfig // config of the metrics builder. + startTime pcommon.Timestamp // start time that will be applied to all recorded data points. + metricsCapacity int // maximum observed number of metrics per resource. + metricsBuffer pmetric.Metrics // accumulates metrics data before emitting. + buildInfo component.BuildInfo // contains version information. + metricDefaultMetric metricDefaultMetric + metricDefaultMetricToBeRemoved metricDefaultMetricToBeRemoved + metricOptionalMetric metricOptionalMetric + metricOptionalMetricEmptyUnit metricOptionalMetricEmptyUnit +} + +// metricBuilderOption applies changes to default metrics builder. +type metricBuilderOption func(*MetricsBuilder) + +// WithStartTime sets startTime on the metrics builder. +func WithStartTime(startTime pcommon.Timestamp) metricBuilderOption { + return func(mb *MetricsBuilder) { + mb.startTime = startTime + } +} + +func NewMetricsBuilder(mbc MetricsBuilderConfig, settings receiver.CreateSettings, options ...metricBuilderOption) *MetricsBuilder { + if !mbc.Metrics.DefaultMetric.enabledSetByUser { + settings.Logger.Warn("[WARNING] Please set `enabled` field explicitly for `default.metric`: This metric will be disabled by default soon.") + } + if mbc.Metrics.DefaultMetricToBeRemoved.Enabled { + settings.Logger.Warn("[WARNING] `default.metric.to_be_removed` should not be enabled: This metric is deprecated and will be removed soon.") + } + if mbc.Metrics.OptionalMetric.enabledSetByUser { + settings.Logger.Warn("[WARNING] `optional.metric` should not be configured: This metric is deprecated and will be removed soon.") + } + if mbc.Metrics.OptionalMetricEmptyUnit.enabledSetByUser { + settings.Logger.Warn("[WARNING] `optional.metric.empty_unit` should not be configured: This metric is deprecated and will be removed soon.") + } + if !mbc.ResourceAttributes.StringResourceAttrDisableWarning.enabledSetByUser { + settings.Logger.Warn("[WARNING] Please set `enabled` field explicitly for `string.resource.attr_disable_warning`: This resource_attribute will be disabled by default soon.") + } + if mbc.ResourceAttributes.StringResourceAttrRemoveWarning.enabledSetByUser { + settings.Logger.Warn("[WARNING] `string.resource.attr_remove_warning` should not be configured: This resource_attribute is deprecated and will be removed soon.") + } + if mbc.ResourceAttributes.StringResourceAttrToBeRemoved.Enabled { + settings.Logger.Warn("[WARNING] `string.resource.attr_to_be_removed` should not be enabled: This resource_attribute is deprecated and will be removed soon.") + } + mb := &MetricsBuilder{ + config: mbc, + startTime: pcommon.NewTimestampFromTime(time.Now()), + metricsBuffer: pmetric.NewMetrics(), + buildInfo: settings.BuildInfo, + metricDefaultMetric: newMetricDefaultMetric(mbc.Metrics.DefaultMetric), + metricDefaultMetricToBeRemoved: newMetricDefaultMetricToBeRemoved(mbc.Metrics.DefaultMetricToBeRemoved), + metricOptionalMetric: newMetricOptionalMetric(mbc.Metrics.OptionalMetric), + metricOptionalMetricEmptyUnit: newMetricOptionalMetricEmptyUnit(mbc.Metrics.OptionalMetricEmptyUnit), + } + for _, op := range options { + op(mb) + } + return mb +} + +// NewResourceBuilder returns a new resource builder that should be used to build a resource associated with for the emitted metrics. +func (mb *MetricsBuilder) NewResourceBuilder() *ResourceBuilder { + return NewResourceBuilder(mb.config.ResourceAttributes) +} + +// updateCapacity updates max length of metrics and resource attributes that will be used for the slice capacity. +func (mb *MetricsBuilder) updateCapacity(rm pmetric.ResourceMetrics) { + if mb.metricsCapacity < rm.ScopeMetrics().At(0).Metrics().Len() { + mb.metricsCapacity = rm.ScopeMetrics().At(0).Metrics().Len() + } +} + +// ResourceMetricsOption applies changes to provided resource metrics. +type ResourceMetricsOption func(pmetric.ResourceMetrics) + +// WithResource sets the provided resource on the emitted ResourceMetrics. +// It's recommended to use ResourceBuilder to create the resource. +func WithResource(res pcommon.Resource) ResourceMetricsOption { + return func(rm pmetric.ResourceMetrics) { + res.CopyTo(rm.Resource()) + } +} + +// WithStartTimeOverride overrides start time for all the resource metrics data points. +// This option should be only used if different start time has to be set on metrics coming from different resources. +func WithStartTimeOverride(start pcommon.Timestamp) ResourceMetricsOption { + return func(rm pmetric.ResourceMetrics) { + var dps pmetric.NumberDataPointSlice + metrics := rm.ScopeMetrics().At(0).Metrics() + for i := 0; i < metrics.Len(); i++ { + switch metrics.At(i).Type() { + case pmetric.MetricTypeGauge: + dps = metrics.At(i).Gauge().DataPoints() + case pmetric.MetricTypeSum: + dps = metrics.At(i).Sum().DataPoints() + } + for j := 0; j < dps.Len(); j++ { + dps.At(j).SetStartTimestamp(start) + } + } + } +} + +// EmitForResource saves all the generated metrics under a new resource and updates the internal state to be ready for +// recording another set of data points as part of another resource. This function can be helpful when one scraper +// needs to emit metrics from several resources. Otherwise calling this function is not required, +// just `Emit` function can be called instead. +// Resource attributes should be provided as ResourceMetricsOption arguments. +func (mb *MetricsBuilder) EmitForResource(rmo ...ResourceMetricsOption) { + rm := pmetric.NewResourceMetrics() + rm.SetSchemaUrl(conventions.SchemaURL) + ils := rm.ScopeMetrics().AppendEmpty() + ils.Scope().SetName("go.opentelemetry.io/collector") + ils.Scope().SetVersion(mb.buildInfo.Version) + ils.Metrics().EnsureCapacity(mb.metricsCapacity) + mb.metricDefaultMetric.emit(ils.Metrics()) + mb.metricDefaultMetricToBeRemoved.emit(ils.Metrics()) + mb.metricOptionalMetric.emit(ils.Metrics()) + mb.metricOptionalMetricEmptyUnit.emit(ils.Metrics()) + + for _, op := range rmo { + op(rm) + } + if ils.Metrics().Len() > 0 { + mb.updateCapacity(rm) + rm.MoveTo(mb.metricsBuffer.ResourceMetrics().AppendEmpty()) + } +} + +// Emit returns all the metrics accumulated by the metrics builder and updates the internal state to be ready for +// recording another set of metrics. This function will be responsible for applying all the transformations required to +// produce metric representation defined in metadata and user config, e.g. delta or cumulative. +func (mb *MetricsBuilder) Emit(rmo ...ResourceMetricsOption) pmetric.Metrics { + mb.EmitForResource(rmo...) + metrics := mb.metricsBuffer + mb.metricsBuffer = pmetric.NewMetrics() + return metrics +} + +// RecordDefaultMetricDataPoint adds a data point to default.metric metric. +func (mb *MetricsBuilder) RecordDefaultMetricDataPoint(ts pcommon.Timestamp, val int64, stringAttrAttributeValue string, overriddenIntAttrAttributeValue int64, enumAttrAttributeValue AttributeEnumAttr, sliceAttrAttributeValue []any, mapAttrAttributeValue map[string]any) { + mb.metricDefaultMetric.recordDataPoint(mb.startTime, ts, val, stringAttrAttributeValue, overriddenIntAttrAttributeValue, enumAttrAttributeValue.String(), sliceAttrAttributeValue, mapAttrAttributeValue) +} + +// RecordDefaultMetricToBeRemovedDataPoint adds a data point to default.metric.to_be_removed metric. +func (mb *MetricsBuilder) RecordDefaultMetricToBeRemovedDataPoint(ts pcommon.Timestamp, val float64) { + mb.metricDefaultMetricToBeRemoved.recordDataPoint(mb.startTime, ts, val) +} + +// RecordOptionalMetricDataPoint adds a data point to optional.metric metric. +func (mb *MetricsBuilder) RecordOptionalMetricDataPoint(ts pcommon.Timestamp, val float64, stringAttrAttributeValue string, booleanAttrAttributeValue bool) { + mb.metricOptionalMetric.recordDataPoint(mb.startTime, ts, val, stringAttrAttributeValue, booleanAttrAttributeValue) +} + +// RecordOptionalMetricEmptyUnitDataPoint adds a data point to optional.metric.empty_unit metric. +func (mb *MetricsBuilder) RecordOptionalMetricEmptyUnitDataPoint(ts pcommon.Timestamp, val float64, stringAttrAttributeValue string, booleanAttrAttributeValue bool) { + mb.metricOptionalMetricEmptyUnit.recordDataPoint(mb.startTime, ts, val, stringAttrAttributeValue, booleanAttrAttributeValue) +} + +// Reset resets metrics builder to its initial state. It should be used when external metrics source is restarted, +// and metrics builder should update its startTime and reset it's internal state accordingly. +func (mb *MetricsBuilder) Reset(options ...metricBuilderOption) { + mb.startTime = pcommon.NewTimestampFromTime(time.Now()) + for _, op := range options { + op(mb) + } +} diff --git a/cmd/mdatagen/internal/metadata/generated_metrics_test.go b/cmd/mdatagen/internal/metadata/generated_metrics_test.go new file mode 100644 index 00000000000..4860ac1ba2b --- /dev/null +++ b/cmd/mdatagen/internal/metadata/generated_metrics_test.go @@ -0,0 +1,215 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "go.uber.org/zap" + "go.uber.org/zap/zaptest/observer" + + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/receiver/receivertest" +) + +type testConfigCollection int + +const ( + testSetDefault testConfigCollection = iota + testSetAll + testSetNone +) + +func TestMetricsBuilder(t *testing.T) { + tests := []struct { + name string + configSet testConfigCollection + }{ + { + name: "default", + configSet: testSetDefault, + }, + { + name: "all_set", + configSet: testSetAll, + }, + { + name: "none_set", + configSet: testSetNone, + }, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + start := pcommon.Timestamp(1_000_000_000) + ts := pcommon.Timestamp(1_000_001_000) + observedZapCore, observedLogs := observer.New(zap.WarnLevel) + settings := receivertest.NewNopCreateSettings() + settings.Logger = zap.New(observedZapCore) + mb := NewMetricsBuilder(loadMetricsBuilderConfig(t, test.name), settings, WithStartTime(start)) + + expectedWarnings := 0 + if test.configSet == testSetDefault { + assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `default.metric`: This metric will be disabled by default soon.", observedLogs.All()[expectedWarnings].Message) + expectedWarnings++ + } + if test.configSet == testSetDefault || test.configSet == testSetAll { + assert.Equal(t, "[WARNING] `default.metric.to_be_removed` should not be enabled: This metric is deprecated and will be removed soon.", observedLogs.All()[expectedWarnings].Message) + expectedWarnings++ + } + if test.configSet == testSetAll || test.configSet == testSetNone { + assert.Equal(t, "[WARNING] `optional.metric` should not be configured: This metric is deprecated and will be removed soon.", observedLogs.All()[expectedWarnings].Message) + expectedWarnings++ + } + if test.configSet == testSetAll || test.configSet == testSetNone { + assert.Equal(t, "[WARNING] `optional.metric.empty_unit` should not be configured: This metric is deprecated and will be removed soon.", observedLogs.All()[expectedWarnings].Message) + expectedWarnings++ + } + if test.configSet == testSetDefault { + assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `string.resource.attr_disable_warning`: This resource_attribute will be disabled by default soon.", observedLogs.All()[expectedWarnings].Message) + expectedWarnings++ + } + if test.configSet == testSetAll || test.configSet == testSetNone { + assert.Equal(t, "[WARNING] `string.resource.attr_remove_warning` should not be configured: This resource_attribute is deprecated and will be removed soon.", observedLogs.All()[expectedWarnings].Message) + expectedWarnings++ + } + if test.configSet == testSetDefault || test.configSet == testSetAll { + assert.Equal(t, "[WARNING] `string.resource.attr_to_be_removed` should not be enabled: This resource_attribute is deprecated and will be removed soon.", observedLogs.All()[expectedWarnings].Message) + expectedWarnings++ + } + + assert.Equal(t, expectedWarnings, observedLogs.Len()) + + defaultMetricsCount := 0 + allMetricsCount := 0 + + defaultMetricsCount++ + allMetricsCount++ + mb.RecordDefaultMetricDataPoint(ts, 1, "string_attr-val", 19, AttributeEnumAttrRed, []any{"slice_attr-item1", "slice_attr-item2"}, map[string]any{"key1": "map_attr-val1", "key2": "map_attr-val2"}) + + defaultMetricsCount++ + allMetricsCount++ + mb.RecordDefaultMetricToBeRemovedDataPoint(ts, 1) + + allMetricsCount++ + mb.RecordOptionalMetricDataPoint(ts, 1, "string_attr-val", true) + + allMetricsCount++ + mb.RecordOptionalMetricEmptyUnitDataPoint(ts, 1, "string_attr-val", true) + + rb := mb.NewResourceBuilder() + rb.SetMapResourceAttr(map[string]any{"key1": "map.resource.attr-val1", "key2": "map.resource.attr-val2"}) + rb.SetOptionalResourceAttr("optional.resource.attr-val") + rb.SetSliceResourceAttr([]any{"slice.resource.attr-item1", "slice.resource.attr-item2"}) + rb.SetStringEnumResourceAttrOne() + rb.SetStringResourceAttr("string.resource.attr-val") + rb.SetStringResourceAttrDisableWarning("string.resource.attr_disable_warning-val") + rb.SetStringResourceAttrRemoveWarning("string.resource.attr_remove_warning-val") + rb.SetStringResourceAttrToBeRemoved("string.resource.attr_to_be_removed-val") + res := rb.Emit() + metrics := mb.Emit(WithResource(res)) + + if test.configSet == testSetNone { + assert.Equal(t, 0, metrics.ResourceMetrics().Len()) + return + } + + assert.Equal(t, 1, metrics.ResourceMetrics().Len()) + rm := metrics.ResourceMetrics().At(0) + assert.Equal(t, res, rm.Resource()) + assert.Equal(t, 1, rm.ScopeMetrics().Len()) + ms := rm.ScopeMetrics().At(0).Metrics() + if test.configSet == testSetDefault { + assert.Equal(t, defaultMetricsCount, ms.Len()) + } + if test.configSet == testSetAll { + assert.Equal(t, allMetricsCount, ms.Len()) + } + validatedMetrics := make(map[string]bool) + for i := 0; i < ms.Len(); i++ { + switch ms.At(i).Name() { + case "default.metric": + assert.False(t, validatedMetrics["default.metric"], "Found a duplicate in the metrics slice: default.metric") + validatedMetrics["default.metric"] = true + assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) + assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) + assert.Equal(t, "Monotonic cumulative sum int metric enabled by default.", ms.At(i).Description()) + assert.Equal(t, "s", ms.At(i).Unit()) + assert.Equal(t, true, ms.At(i).Sum().IsMonotonic()) + assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) + dp := ms.At(i).Sum().DataPoints().At(0) + assert.Equal(t, start, dp.StartTimestamp()) + assert.Equal(t, ts, dp.Timestamp()) + assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType()) + assert.Equal(t, int64(1), dp.IntValue()) + attrVal, ok := dp.Attributes().Get("string_attr") + assert.True(t, ok) + assert.EqualValues(t, "string_attr-val", attrVal.Str()) + attrVal, ok = dp.Attributes().Get("state") + assert.True(t, ok) + assert.EqualValues(t, 19, attrVal.Int()) + attrVal, ok = dp.Attributes().Get("enum_attr") + assert.True(t, ok) + assert.EqualValues(t, "red", attrVal.Str()) + attrVal, ok = dp.Attributes().Get("slice_attr") + assert.True(t, ok) + assert.EqualValues(t, []any{"slice_attr-item1", "slice_attr-item2"}, attrVal.Slice().AsRaw()) + attrVal, ok = dp.Attributes().Get("map_attr") + assert.True(t, ok) + assert.EqualValues(t, map[string]any{"key1": "map_attr-val1", "key2": "map_attr-val2"}, attrVal.Map().AsRaw()) + case "default.metric.to_be_removed": + assert.False(t, validatedMetrics["default.metric.to_be_removed"], "Found a duplicate in the metrics slice: default.metric.to_be_removed") + validatedMetrics["default.metric.to_be_removed"] = true + assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) + assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) + assert.Equal(t, "[DEPRECATED] Non-monotonic delta sum double metric enabled by default.", ms.At(i).Description()) + assert.Equal(t, "s", ms.At(i).Unit()) + assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) + assert.Equal(t, pmetric.AggregationTemporalityDelta, ms.At(i).Sum().AggregationTemporality()) + dp := ms.At(i).Sum().DataPoints().At(0) + assert.Equal(t, start, dp.StartTimestamp()) + assert.Equal(t, ts, dp.Timestamp()) + assert.Equal(t, pmetric.NumberDataPointValueTypeDouble, dp.ValueType()) + assert.Equal(t, float64(1), dp.DoubleValue()) + case "optional.metric": + assert.False(t, validatedMetrics["optional.metric"], "Found a duplicate in the metrics slice: optional.metric") + validatedMetrics["optional.metric"] = true + assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type()) + assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len()) + assert.Equal(t, "[DEPRECATED] Gauge double metric disabled by default.", ms.At(i).Description()) + assert.Equal(t, "1", ms.At(i).Unit()) + dp := ms.At(i).Gauge().DataPoints().At(0) + assert.Equal(t, start, dp.StartTimestamp()) + assert.Equal(t, ts, dp.Timestamp()) + assert.Equal(t, pmetric.NumberDataPointValueTypeDouble, dp.ValueType()) + assert.Equal(t, float64(1), dp.DoubleValue()) + attrVal, ok := dp.Attributes().Get("string_attr") + assert.True(t, ok) + assert.EqualValues(t, "string_attr-val", attrVal.Str()) + attrVal, ok = dp.Attributes().Get("boolean_attr") + assert.True(t, ok) + assert.EqualValues(t, true, attrVal.Bool()) + case "optional.metric.empty_unit": + assert.False(t, validatedMetrics["optional.metric.empty_unit"], "Found a duplicate in the metrics slice: optional.metric.empty_unit") + validatedMetrics["optional.metric.empty_unit"] = true + assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type()) + assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len()) + assert.Equal(t, "[DEPRECATED] Gauge double metric disabled by default.", ms.At(i).Description()) + assert.Equal(t, "", ms.At(i).Unit()) + dp := ms.At(i).Gauge().DataPoints().At(0) + assert.Equal(t, start, dp.StartTimestamp()) + assert.Equal(t, ts, dp.Timestamp()) + assert.Equal(t, pmetric.NumberDataPointValueTypeDouble, dp.ValueType()) + assert.Equal(t, float64(1), dp.DoubleValue()) + attrVal, ok := dp.Attributes().Get("string_attr") + assert.True(t, ok) + assert.EqualValues(t, "string_attr-val", attrVal.Str()) + attrVal, ok = dp.Attributes().Get("boolean_attr") + assert.True(t, ok) + assert.EqualValues(t, true, attrVal.Bool()) + } + } + }) + } +} diff --git a/cmd/mdatagen/internal/metadata/generated_resource.go b/cmd/mdatagen/internal/metadata/generated_resource.go new file mode 100644 index 00000000000..da69b3c0841 --- /dev/null +++ b/cmd/mdatagen/internal/metadata/generated_resource.go @@ -0,0 +1,92 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/pdata/pcommon" +) + +// ResourceBuilder is a helper struct to build resources predefined in metadata.yaml. +// The ResourceBuilder is not thread-safe and must not to be used in multiple goroutines. +type ResourceBuilder struct { + config ResourceAttributesConfig + res pcommon.Resource +} + +// NewResourceBuilder creates a new ResourceBuilder. This method should be called on the start of the application. +func NewResourceBuilder(rac ResourceAttributesConfig) *ResourceBuilder { + return &ResourceBuilder{ + config: rac, + res: pcommon.NewResource(), + } +} + +// SetMapResourceAttr sets provided value as "map.resource.attr" attribute. +func (rb *ResourceBuilder) SetMapResourceAttr(val map[string]any) { + if rb.config.MapResourceAttr.Enabled { + rb.res.Attributes().PutEmptyMap("map.resource.attr").FromRaw(val) + } +} + +// SetOptionalResourceAttr sets provided value as "optional.resource.attr" attribute. +func (rb *ResourceBuilder) SetOptionalResourceAttr(val string) { + if rb.config.OptionalResourceAttr.Enabled { + rb.res.Attributes().PutStr("optional.resource.attr", val) + } +} + +// SetSliceResourceAttr sets provided value as "slice.resource.attr" attribute. +func (rb *ResourceBuilder) SetSliceResourceAttr(val []any) { + if rb.config.SliceResourceAttr.Enabled { + rb.res.Attributes().PutEmptySlice("slice.resource.attr").FromRaw(val) + } +} + +// SetStringEnumResourceAttrOne sets "string.enum.resource.attr=one" attribute. +func (rb *ResourceBuilder) SetStringEnumResourceAttrOne() { + if rb.config.StringEnumResourceAttr.Enabled { + rb.res.Attributes().PutStr("string.enum.resource.attr", "one") + } +} + +// SetStringEnumResourceAttrTwo sets "string.enum.resource.attr=two" attribute. +func (rb *ResourceBuilder) SetStringEnumResourceAttrTwo() { + if rb.config.StringEnumResourceAttr.Enabled { + rb.res.Attributes().PutStr("string.enum.resource.attr", "two") + } +} + +// SetStringResourceAttr sets provided value as "string.resource.attr" attribute. +func (rb *ResourceBuilder) SetStringResourceAttr(val string) { + if rb.config.StringResourceAttr.Enabled { + rb.res.Attributes().PutStr("string.resource.attr", val) + } +} + +// SetStringResourceAttrDisableWarning sets provided value as "string.resource.attr_disable_warning" attribute. +func (rb *ResourceBuilder) SetStringResourceAttrDisableWarning(val string) { + if rb.config.StringResourceAttrDisableWarning.Enabled { + rb.res.Attributes().PutStr("string.resource.attr_disable_warning", val) + } +} + +// SetStringResourceAttrRemoveWarning sets provided value as "string.resource.attr_remove_warning" attribute. +func (rb *ResourceBuilder) SetStringResourceAttrRemoveWarning(val string) { + if rb.config.StringResourceAttrRemoveWarning.Enabled { + rb.res.Attributes().PutStr("string.resource.attr_remove_warning", val) + } +} + +// SetStringResourceAttrToBeRemoved sets provided value as "string.resource.attr_to_be_removed" attribute. +func (rb *ResourceBuilder) SetStringResourceAttrToBeRemoved(val string) { + if rb.config.StringResourceAttrToBeRemoved.Enabled { + rb.res.Attributes().PutStr("string.resource.attr_to_be_removed", val) + } +} + +// Emit returns the built resource and resets the internal builder state. +func (rb *ResourceBuilder) Emit() pcommon.Resource { + r := rb.res + rb.res = pcommon.NewResource() + return r +} diff --git a/cmd/mdatagen/internal/metadata/generated_resource_test.go b/cmd/mdatagen/internal/metadata/generated_resource_test.go new file mode 100644 index 00000000000..c0bde40a087 --- /dev/null +++ b/cmd/mdatagen/internal/metadata/generated_resource_test.go @@ -0,0 +1,82 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestResourceBuilder(t *testing.T) { + for _, test := range []string{"default", "all_set", "none_set"} { + t.Run(test, func(t *testing.T) { + cfg := loadResourceAttributesConfig(t, test) + rb := NewResourceBuilder(cfg) + rb.SetMapResourceAttr(map[string]any{"key1": "map.resource.attr-val1", "key2": "map.resource.attr-val2"}) + rb.SetOptionalResourceAttr("optional.resource.attr-val") + rb.SetSliceResourceAttr([]any{"slice.resource.attr-item1", "slice.resource.attr-item2"}) + rb.SetStringEnumResourceAttrOne() + rb.SetStringResourceAttr("string.resource.attr-val") + rb.SetStringResourceAttrDisableWarning("string.resource.attr_disable_warning-val") + rb.SetStringResourceAttrRemoveWarning("string.resource.attr_remove_warning-val") + rb.SetStringResourceAttrToBeRemoved("string.resource.attr_to_be_removed-val") + + res := rb.Emit() + assert.Equal(t, 0, rb.Emit().Attributes().Len()) // Second call should return empty Resource + + switch test { + case "default": + assert.Equal(t, 6, res.Attributes().Len()) + case "all_set": + assert.Equal(t, 8, res.Attributes().Len()) + case "none_set": + assert.Equal(t, 0, res.Attributes().Len()) + return + default: + assert.Failf(t, "unexpected test case: %s", test) + } + + val, ok := res.Attributes().Get("map.resource.attr") + assert.True(t, ok) + if ok { + assert.EqualValues(t, map[string]any{"key1": "map.resource.attr-val1", "key2": "map.resource.attr-val2"}, val.Map().AsRaw()) + } + val, ok = res.Attributes().Get("optional.resource.attr") + assert.Equal(t, test == "all_set", ok) + if ok { + assert.EqualValues(t, "optional.resource.attr-val", val.Str()) + } + val, ok = res.Attributes().Get("slice.resource.attr") + assert.True(t, ok) + if ok { + assert.EqualValues(t, []any{"slice.resource.attr-item1", "slice.resource.attr-item2"}, val.Slice().AsRaw()) + } + val, ok = res.Attributes().Get("string.enum.resource.attr") + assert.True(t, ok) + if ok { + assert.EqualValues(t, "one", val.Str()) + } + val, ok = res.Attributes().Get("string.resource.attr") + assert.True(t, ok) + if ok { + assert.EqualValues(t, "string.resource.attr-val", val.Str()) + } + val, ok = res.Attributes().Get("string.resource.attr_disable_warning") + assert.True(t, ok) + if ok { + assert.EqualValues(t, "string.resource.attr_disable_warning-val", val.Str()) + } + val, ok = res.Attributes().Get("string.resource.attr_remove_warning") + assert.Equal(t, test == "all_set", ok) + if ok { + assert.EqualValues(t, "string.resource.attr_remove_warning-val", val.Str()) + } + val, ok = res.Attributes().Get("string.resource.attr_to_be_removed") + assert.True(t, ok) + if ok { + assert.EqualValues(t, "string.resource.attr_to_be_removed-val", val.Str()) + } + }) + } +} diff --git a/cmd/mdatagen/internal/metadata/generated_status.go b/cmd/mdatagen/internal/metadata/generated_status.go new file mode 100644 index 00000000000..7e332e5ba4a --- /dev/null +++ b/cmd/mdatagen/internal/metadata/generated_status.go @@ -0,0 +1,29 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" +) + +var ( + Type = component.MustNewType("file") + scopeName = "go.opentelemetry.io/collector" +) + +const ( + TracesStability = component.StabilityLevelBeta + LogsStability = component.StabilityLevelDevelopment + MetricsStability = component.StabilityLevelStable +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter(scopeName) +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer(scopeName) +} diff --git a/cmd/mdatagen/internal/metadata/testdata/config.yaml b/cmd/mdatagen/internal/metadata/testdata/config.yaml new file mode 100644 index 00000000000..8283dc2dd70 --- /dev/null +++ b/cmd/mdatagen/internal/metadata/testdata/config.yaml @@ -0,0 +1,55 @@ +default: +all_set: + metrics: + default.metric: + enabled: true + default.metric.to_be_removed: + enabled: true + optional.metric: + enabled: true + optional.metric.empty_unit: + enabled: true + resource_attributes: + map.resource.attr: + enabled: true + optional.resource.attr: + enabled: true + slice.resource.attr: + enabled: true + string.enum.resource.attr: + enabled: true + string.resource.attr: + enabled: true + string.resource.attr_disable_warning: + enabled: true + string.resource.attr_remove_warning: + enabled: true + string.resource.attr_to_be_removed: + enabled: true +none_set: + metrics: + default.metric: + enabled: false + default.metric.to_be_removed: + enabled: false + optional.metric: + enabled: false + optional.metric.empty_unit: + enabled: false + resource_attributes: + map.resource.attr: + enabled: false + optional.resource.attr: + enabled: false + slice.resource.attr: + enabled: false + string.enum.resource.attr: + enabled: false + string.resource.attr: + enabled: false + string.resource.attr_disable_warning: + enabled: false + string.resource.attr_remove_warning: + enabled: false + string.resource.attr_to_be_removed: + enabled: false diff --git a/cmd/mdatagen/lint.go b/cmd/mdatagen/lint.go new file mode 100644 index 00000000000..f169ac4fdbb --- /dev/null +++ b/cmd/mdatagen/lint.go @@ -0,0 +1,63 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package main + +import ( + "errors" + "strings" + "unicode" + + "go.opentelemetry.io/collector/cmd/mdatagen/third_party/golint" +) + +// formatIdentifier variable in a go-safe way +func formatIdentifier(s string, exported bool) (string, error) { + if s == "" { + return "", errors.New("string cannot be empty") + } + // Convert various characters to . for strings.Title to operate on. + replace := strings.NewReplacer("_", ".", "-", ".", "<", ".", ">", ".", "/", ".", ":", ".") + str := replace.Replace(s) + str = strings.Title(str) // nolint SA1019 + str = strings.ReplaceAll(str, ".", "") + + var word string + var output string + + // Fixup acronyms to make lint happy. + for idx, r := range str { + if idx == 0 { + if exported { + r = unicode.ToUpper(r) + } else { + r = unicode.ToLower(r) + } + } + + if unicode.IsUpper(r) || unicode.IsNumber(r) { + // If the current word is an acronym and it's either exported or it's not the + // beginning of an unexported variable then upper case it. + if golint.Acronyms[strings.ToUpper(word)] && (exported || output != "") { + output += strings.ToUpper(word) + word = string(r) + } else { + output += word + word = string(r) + } + } else { + word += string(r) + } + } + + if golint.Acronyms[strings.ToUpper(word)] && output != "" { + output += strings.ToUpper(word) + } else { + output += word + } + + // Remove white spaces + output = strings.Join(strings.Fields(output), "") + + return output, nil +} diff --git a/cmd/mdatagen/lint_test.go b/cmd/mdatagen/lint_test.go new file mode 100644 index 00000000000..5c470f302d7 --- /dev/null +++ b/cmd/mdatagen/lint_test.go @@ -0,0 +1,50 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package main + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func Test_formatIdentifier(t *testing.T) { + var tests = []struct { + input string + want string + exported bool + wantErr string + }{ + // Unexported. + {input: "max.cpu", want: "maxCPU"}, + {input: "max.foo", want: "maxFoo"}, + {input: "cpu.utilization", want: "cpuUtilization"}, + {input: "cpu", want: "cpu"}, + {input: "max.ip.addr", want: "maxIPAddr"}, + {input: "some_metric", want: "someMetric"}, + {input: "some-metric", want: "someMetric"}, + {input: "Upper.Case", want: "upperCase"}, + {input: "max.ip6", want: "maxIP6"}, + {input: "max.ip6.idle", want: "maxIP6Idle"}, + {input: "node_netstat_IpExt_OutOctets", want: "nodeNetstatIPExtOutOctets"}, + + // Exported. + {input: "cpu.state", want: "CPUState", exported: true}, + + // Errors + {input: "", want: "", wantErr: "string cannot be empty"}, + } + for _, tt := range tests { + t.Run(tt.input, func(t *testing.T) { + got, err := formatIdentifier(tt.input, tt.exported) + + if tt.wantErr != "" { + require.EqualError(t, err, tt.wantErr) + } else { + require.NoError(t, err) + require.Equal(t, tt.want, got) + } + }) + } +} diff --git a/cmd/mdatagen/loader.go b/cmd/mdatagen/loader.go new file mode 100644 index 00000000000..8b4b996a5e2 --- /dev/null +++ b/cmd/mdatagen/loader.go @@ -0,0 +1,300 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package main + +import ( + "context" + "errors" + "fmt" + "os" + "path/filepath" + "strings" + + "go.opentelemetry.io/collector/confmap" + "go.opentelemetry.io/collector/confmap/provider/fileprovider" + "go.opentelemetry.io/collector/pdata/pcommon" +) + +type metricName string + +func (mn metricName) Render() (string, error) { + return formatIdentifier(string(mn), true) +} + +func (mn metricName) RenderUnexported() (string, error) { + return formatIdentifier(string(mn), false) +} + +type attributeName string + +func (mn attributeName) Render() (string, error) { + return formatIdentifier(string(mn), true) +} + +func (mn attributeName) RenderUnexported() (string, error) { + return formatIdentifier(string(mn), false) +} + +// ValueType defines an attribute value type. +type ValueType struct { + // ValueType is type of the attribute value. + ValueType pcommon.ValueType +} + +// UnmarshalText implements the encoding.TextUnmarshaler interface. +func (mvt *ValueType) UnmarshalText(text []byte) error { + switch vtStr := string(text); vtStr { + case "string": + mvt.ValueType = pcommon.ValueTypeStr + case "int": + mvt.ValueType = pcommon.ValueTypeInt + case "double": + mvt.ValueType = pcommon.ValueTypeDouble + case "bool": + mvt.ValueType = pcommon.ValueTypeBool + case "bytes": + mvt.ValueType = pcommon.ValueTypeBytes + case "slice": + mvt.ValueType = pcommon.ValueTypeSlice + case "map": + mvt.ValueType = pcommon.ValueTypeMap + default: + return fmt.Errorf("invalid type: %q", vtStr) + } + return nil +} + +// String returns capitalized name of the ValueType. +func (mvt ValueType) String() string { + return strings.Title(strings.ToLower(mvt.ValueType.String())) // nolint SA1019 +} + +// Primitive returns name of primitive type for the ValueType. +func (mvt ValueType) Primitive() string { + switch mvt.ValueType { + case pcommon.ValueTypeStr: + return "string" + case pcommon.ValueTypeInt: + return "int64" + case pcommon.ValueTypeDouble: + return "float64" + case pcommon.ValueTypeBool: + return "bool" + case pcommon.ValueTypeBytes: + return "[]byte" + case pcommon.ValueTypeSlice: + return "[]any" + case pcommon.ValueTypeMap: + return "map[string]any" + case pcommon.ValueTypeEmpty: + return "" + default: + return "" + } +} + +type metric struct { + // Enabled defines whether the metric is enabled by default. + Enabled bool `mapstructure:"enabled"` + + // Warnings that will be shown to user under specified conditions. + Warnings warnings `mapstructure:"warnings"` + + // Description of the metric. + Description string `mapstructure:"description"` + + // ExtendedDocumentation of the metric. If specified, this will + // be appended to the description used in generated documentation. + ExtendedDocumentation string `mapstructure:"extended_documentation"` + + // Unit of the metric. + Unit *string `mapstructure:"unit"` + + // Sum stores metadata for sum metric type + Sum *sum `mapstructure:"sum,omitempty"` + // Gauge stores metadata for gauge metric type + Gauge *gauge `mapstructure:"gauge,omitempty"` + + // Attributes is the list of attributes that the metric emits. + Attributes []attributeName `mapstructure:"attributes"` +} + +func (m *metric) Unmarshal(parser *confmap.Conf) error { + if !parser.IsSet("enabled") { + return errors.New("missing required field: `enabled`") + } + err := parser.Unmarshal(m) + if err != nil { + return err + } + return nil +} +func (m metric) Data() MetricData { + if m.Sum != nil { + return m.Sum + } + if m.Gauge != nil { + return m.Gauge + } + return nil +} + +type warnings struct { + // A warning that will be displayed if the field is enabled in user config. + IfEnabled string `mapstructure:"if_enabled"` + // A warning that will be displayed if `enabled` field is not set explicitly in user config. + IfEnabledNotSet string `mapstructure:"if_enabled_not_set"` + // A warning that will be displayed if the field is configured by user in any way. + IfConfigured string `mapstructure:"if_configured"` +} + +type attribute struct { + // Description describes the purpose of the attribute. + Description string `mapstructure:"description"` + // NameOverride can be used to override the attribute name. + NameOverride string `mapstructure:"name_override"` + // Enabled defines whether the attribute is enabled by default. + Enabled bool `mapstructure:"enabled"` + // Enum can optionally describe the set of values to which the attribute can belong. + Enum []string `mapstructure:"enum"` + // Type is an attribute type. + Type ValueType `mapstructure:"type"` + // FullName is the attribute name populated from the map key. + FullName attributeName `mapstructure:"-"` + // Warnings that will be shown to user under specified conditions. + Warnings warnings `mapstructure:"warnings"` +} + +// Name returns actual name of the attribute that is set on the metric after applying NameOverride. +func (a attribute) Name() attributeName { + if a.NameOverride != "" { + return attributeName(a.NameOverride) + } + return a.FullName +} + +func (a attribute) TestValue() string { + if a.Enum != nil { + return fmt.Sprintf(`"%s"`, a.Enum[0]) + } + switch a.Type.ValueType { + case pcommon.ValueTypeEmpty: + return "" + case pcommon.ValueTypeStr: + return fmt.Sprintf(`"%s-val"`, a.FullName) + case pcommon.ValueTypeInt: + return fmt.Sprintf("%d", len(a.FullName)) + case pcommon.ValueTypeDouble: + return fmt.Sprintf("%f", 0.1+float64(len(a.FullName))) + case pcommon.ValueTypeBool: + return fmt.Sprintf("%t", len(a.FullName)%2 == 0) + case pcommon.ValueTypeMap: + return fmt.Sprintf(`map[string]any{"key1": "%s-val1", "key2": "%s-val2"}`, a.FullName, a.FullName) + case pcommon.ValueTypeSlice: + return fmt.Sprintf(`[]any{"%s-item1", "%s-item2"}`, a.FullName, a.FullName) + case pcommon.ValueTypeBytes: + return fmt.Sprintf(`[]byte("%s-val")`, a.FullName) + } + return "" +} + +type tests struct { + Config any `mapstructure:"config"` + SkipLifecycle bool `mapstructure:"skip_lifecycle"` + ExpectConsumerError bool `mapstructure:"expect_consumer_error"` +} + +type metadata struct { + // Type of the component. + Type string `mapstructure:"type"` + // Type of the parent component (applicable to subcomponents). + Parent string `mapstructure:"parent"` + // Status information for the component. + Status *Status `mapstructure:"status"` + // SemConvVersion is a version number of OpenTelemetry semantic conventions applied to the scraped metrics. + SemConvVersion string `mapstructure:"sem_conv_version"` + // ResourceAttributes that can be emitted by the component. + ResourceAttributes map[attributeName]attribute `mapstructure:"resource_attributes"` + // Attributes emitted by one or more metrics. + Attributes map[attributeName]attribute `mapstructure:"attributes"` + // Metrics that can be emitted by the component. + Metrics map[metricName]metric `mapstructure:"metrics"` + // ScopeName of the metrics emitted by the component. + ScopeName string `mapstructure:"-"` + // ShortFolderName is the shortened folder name of the component, removing class if present + ShortFolderName string `mapstructure:"-"` + + Tests *tests `mapstructure:"tests"` +} + +func setAttributesFullName(attrs map[attributeName]attribute) { + for k, v := range attrs { + v.FullName = k + attrs[k] = v + } +} + +type templateContext struct { + metadata + // Package name for generated code. + Package string +} + +func loadMetadata(filePath string) (metadata, error) { + cp, err := fileprovider.New().Retrieve(context.Background(), "file:"+filePath, nil) + if err != nil { + return metadata{}, err + } + + conf, err := cp.AsConf() + if err != nil { + return metadata{}, err + } + + md := metadata{ScopeName: scopeName(filePath), ShortFolderName: shortFolderName(filePath)} + if err := conf.Unmarshal(&md); err != nil { + return md, err + } + + if err := md.Validate(); err != nil { + return md, err + } + + setAttributesFullName(md.Attributes) + setAttributesFullName(md.ResourceAttributes) + + return md, nil +} + +var componentTypes = []string{ + "connector", + "exporter", + "extension", + "processor", + "scraper", + "receiver", +} + +func shortFolderName(filePath string) string { + parentFolder := filepath.Base(filepath.Dir(filePath)) + for _, cType := range componentTypes { + if strings.HasSuffix(parentFolder, cType) { + return strings.TrimSuffix(parentFolder, cType) + } + } + return parentFolder +} + +func scopeName(filePath string) string { + sn := "go.opentelemetry.io/collector" + dirs := strings.Split(filepath.Dir(filePath), string(os.PathSeparator)) + for _, dir := range dirs { + for _, cType := range componentTypes { + if strings.HasSuffix(dir, cType) { + sn += "/" + dir + } + } + } + return sn +} diff --git a/cmd/mdatagen/loader_test.go b/cmd/mdatagen/loader_test.go new file mode 100644 index 00000000000..aafacc8f252 --- /dev/null +++ b/cmd/mdatagen/loader_test.go @@ -0,0 +1,282 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package main + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" +) + +func Test_loadMetadata(t *testing.T) { + tests := []struct { + name string + want metadata + wantErr string + }{ + { + name: "metadata-sample.yaml", + want: metadata{ + Type: "file", + SemConvVersion: "1.9.0", + Status: &Status{ + Class: "receiver", + Stability: map[string][]string{ + "development": {"logs"}, + "beta": {"traces"}, + "stable": {"metrics"}, + }, + Distributions: []string{"contrib"}, + Warnings: []string{"Any additional information that should be brought to the consumer's attention"}, + }, + ResourceAttributes: map[attributeName]attribute{ + "string.resource.attr": { + Description: "Resource attribute with any string value.", + Enabled: true, + Type: ValueType{ + ValueType: pcommon.ValueTypeStr, + }, + FullName: "string.resource.attr", + }, + "string.enum.resource.attr": { + Description: "Resource attribute with a known set of string values.", + Enabled: true, + Enum: []string{"one", "two"}, + Type: ValueType{ + ValueType: pcommon.ValueTypeStr, + }, + FullName: "string.enum.resource.attr", + }, + "optional.resource.attr": { + Description: "Explicitly disabled ResourceAttribute.", + Enabled: false, + Type: ValueType{ + ValueType: pcommon.ValueTypeStr, + }, + FullName: "optional.resource.attr", + }, + "slice.resource.attr": { + Description: "Resource attribute with a slice value.", + Enabled: true, + Type: ValueType{ + ValueType: pcommon.ValueTypeSlice, + }, + FullName: "slice.resource.attr", + }, + "map.resource.attr": { + Description: "Resource attribute with a map value.", + Enabled: true, + Type: ValueType{ + ValueType: pcommon.ValueTypeMap, + }, + FullName: "map.resource.attr", + }, + "string.resource.attr_disable_warning": { + Description: "Resource attribute with any string value.", + Warnings: warnings{ + IfEnabledNotSet: "This resource_attribute will be disabled by default soon.", + }, + Enabled: true, + Type: ValueType{ + ValueType: pcommon.ValueTypeStr, + }, + FullName: "string.resource.attr_disable_warning", + }, + "string.resource.attr_remove_warning": { + Description: "Resource attribute with any string value.", + Warnings: warnings{ + IfConfigured: "This resource_attribute is deprecated and will be removed soon.", + }, + Enabled: false, + Type: ValueType{ + ValueType: pcommon.ValueTypeStr, + }, + FullName: "string.resource.attr_remove_warning", + }, + "string.resource.attr_to_be_removed": { + Description: "Resource attribute with any string value.", + Warnings: warnings{ + IfEnabled: "This resource_attribute is deprecated and will be removed soon.", + }, + Enabled: true, + Type: ValueType{ + ValueType: pcommon.ValueTypeStr, + }, + FullName: "string.resource.attr_to_be_removed", + }, + }, + + Attributes: map[attributeName]attribute{ + "enum_attr": { + Description: "Attribute with a known set of string values.", + NameOverride: "", + Enum: []string{"red", "green", "blue"}, + Type: ValueType{ + ValueType: pcommon.ValueTypeStr, + }, + FullName: "enum_attr", + }, + "string_attr": { + Description: "Attribute with any string value.", + NameOverride: "", + Type: ValueType{ + ValueType: pcommon.ValueTypeStr, + }, + FullName: "string_attr", + }, + "overridden_int_attr": { + Description: "Integer attribute with overridden name.", + NameOverride: "state", + Type: ValueType{ + ValueType: pcommon.ValueTypeInt, + }, + FullName: "overridden_int_attr", + }, + "boolean_attr": { + Description: "Attribute with a boolean value.", + Type: ValueType{ + ValueType: pcommon.ValueTypeBool, + }, + FullName: "boolean_attr", + }, + "slice_attr": { + Description: "Attribute with a slice value.", + Type: ValueType{ + ValueType: pcommon.ValueTypeSlice, + }, + FullName: "slice_attr", + }, + "map_attr": { + Description: "Attribute with a map value.", + Type: ValueType{ + ValueType: pcommon.ValueTypeMap, + }, + FullName: "map_attr", + }, + }, + Metrics: map[metricName]metric{ + "default.metric": { + Enabled: true, + Description: "Monotonic cumulative sum int metric enabled by default.", + ExtendedDocumentation: "The metric will be become optional soon.", + Warnings: warnings{ + IfEnabledNotSet: "This metric will be disabled by default soon.", + }, + Unit: strPtr("s"), + Sum: &sum{ + MetricValueType: MetricValueType{pmetric.NumberDataPointValueTypeInt}, + AggregationTemporality: AggregationTemporality{Aggregation: pmetric.AggregationTemporalityCumulative}, + Mono: Mono{Monotonic: true}, + }, + Attributes: []attributeName{"string_attr", "overridden_int_attr", "enum_attr", "slice_attr", "map_attr"}, + }, + "optional.metric": { + Enabled: false, + Description: "[DEPRECATED] Gauge double metric disabled by default.", + Warnings: warnings{ + IfConfigured: "This metric is deprecated and will be removed soon.", + }, + Unit: strPtr("1"), + Gauge: &gauge{ + MetricValueType: MetricValueType{pmetric.NumberDataPointValueTypeDouble}, + }, + Attributes: []attributeName{"string_attr", "boolean_attr"}, + }, + "optional.metric.empty_unit": { + Enabled: false, + Description: "[DEPRECATED] Gauge double metric disabled by default.", + Warnings: warnings{ + IfConfigured: "This metric is deprecated and will be removed soon.", + }, + Unit: strPtr(""), + Gauge: &gauge{ + MetricValueType: MetricValueType{pmetric.NumberDataPointValueTypeDouble}, + }, + Attributes: []attributeName{"string_attr", "boolean_attr"}, + }, + + "default.metric.to_be_removed": { + Enabled: true, + Description: "[DEPRECATED] Non-monotonic delta sum double metric enabled by default.", + ExtendedDocumentation: "The metric will be will be removed soon.", + Warnings: warnings{ + IfEnabled: "This metric is deprecated and will be removed soon.", + }, + Unit: strPtr("s"), + Sum: &sum{ + MetricValueType: MetricValueType{pmetric.NumberDataPointValueTypeDouble}, + AggregationTemporality: AggregationTemporality{Aggregation: pmetric.AggregationTemporalityDelta}, + Mono: Mono{Monotonic: false}, + }, + }, + }, + ScopeName: "go.opentelemetry.io/collector", + ShortFolderName: ".", + }, + }, + { + name: "testdata/parent.yaml", + want: metadata{ + Type: "subcomponent", + Parent: "parentComponent", + ScopeName: "go.opentelemetry.io/collector", + ShortFolderName: "testdata", + }, + }, + { + name: "testdata/invalid_type_rattr.yaml", + want: metadata{}, + wantErr: "1 error(s) decoding:\n\n* error decoding 'resource_attributes[string.resource.attr].type': invalid type: \"invalidtype\"", + }, + { + name: "testdata/no_enabled.yaml", + want: metadata{}, + wantErr: "1 error(s) decoding:\n\n* error decoding 'metrics[system.cpu.time]': missing required field: `enabled`", + }, + { + name: "testdata/no_value_type.yaml", + want: metadata{}, + wantErr: "1 error(s) decoding:\n\n* error decoding 'metrics[system.cpu.time]': 1 error(s) decoding:\n\n" + + "* error decoding 'sum': missing required field: `value_type`", + }, + { + name: "testdata/unknown_value_type.yaml", + wantErr: "1 error(s) decoding:\n\n* error decoding 'metrics[system.cpu.time]': 1 error(s) decoding:\n\n* error decoding 'sum': 1 error(s) decoding:\n\n* error decoding 'value_type': invalid value_type: \"unknown\"", + }, + { + name: "testdata/no_aggregation.yaml", + want: metadata{}, + wantErr: "1 error(s) decoding:\n\n* error decoding 'metrics[default.metric]': 1 error(s) decoding:\n\n* error decoding 'sum': missing required field: `aggregation_temporality`", + }, + { + name: "testdata/invalid_aggregation.yaml", + want: metadata{}, + wantErr: "1 error(s) decoding:\n\n* error decoding 'metrics[default.metric]': 1 error(s) decoding:\n\n* error decoding 'sum': 1 error(s) decoding:\n\n* error decoding 'aggregation_temporality': invalid aggregation: \"invalidaggregation\"", + }, + { + name: "testdata/invalid_type_attr.yaml", + want: metadata{}, + wantErr: "1 error(s) decoding:\n\n* error decoding 'attributes[used_attr].type': invalid type: \"invalidtype\"", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := loadMetadata(tt.name) + if tt.wantErr != "" { + require.Error(t, err) + require.EqualError(t, err, tt.wantErr) + } else { + require.NoError(t, err) + require.Equal(t, tt.want, got) + } + }) + } +} + +func strPtr(s string) *string { + return &s +} diff --git a/cmd/mdatagen/main.go b/cmd/mdatagen/main.go new file mode 100644 index 00000000000..4d04bd0696f --- /dev/null +++ b/cmd/mdatagen/main.go @@ -0,0 +1,385 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package main + +import ( + "bytes" + "errors" + "flag" + "fmt" + "go/format" + "log" + "os" + "path/filepath" + "regexp" + "strings" + "text/template" + + "golang.org/x/text/cases" + "golang.org/x/text/language" +) + +const ( + statusStart = "" + statusEnd = "" +) + +func main() { + flag.Parse() + yml := flag.Arg(0) + if err := run(yml); err != nil { + log.Fatal(err) + } +} + +func run(ymlPath string) error { + if ymlPath == "" { + return errors.New("argument must be metadata.yaml file") + } + ymlPath, err := filepath.Abs(ymlPath) + if err != nil { + return fmt.Errorf("failed to get absolute path for %v: %w", ymlPath, err) + } + + ymlDir := filepath.Dir(ymlPath) + + md, err := loadMetadata(ymlPath) + if err != nil { + return fmt.Errorf("failed loading %v: %w", ymlPath, err) + } + + tmplDir := "templates" + + codeDir := filepath.Join(ymlDir, "internal", "metadata") + if err = os.MkdirAll(codeDir, 0700); err != nil { + return fmt.Errorf("unable to create output directory %q: %w", codeDir, err) + } + if md.Status != nil { + if md.Status.Class != "cmd" && md.Status.Class != "pkg" { + if err = generateFile(filepath.Join(tmplDir, "status.go.tmpl"), + filepath.Join(codeDir, "generated_status.go"), md, "metadata"); err != nil { + return err + } + } + + if _, err = os.Stat(filepath.Join(ymlDir, "README.md")); err == nil { + if err = inlineReplace( + filepath.Join(tmplDir, "readme.md.tmpl"), + filepath.Join(ymlDir, "README.md"), + md, statusStart, statusEnd); err != nil { + return err + } + } + } + + if md.Tests != nil { + if err = generateFile(filepath.Join(tmplDir, "component_test.go.tmpl"), + filepath.Join(ymlDir, "generated_component_test.go"), md, md.ShortFolderName+md.Status.Class); err != nil { + return err + } + } + + if len(md.Metrics) == 0 && len(md.ResourceAttributes) == 0 { + return nil + } + + if err = os.MkdirAll(filepath.Join(codeDir, "testdata"), 0700); err != nil { + return fmt.Errorf("unable to create output directory %q: %w", filepath.Join(codeDir, "testdata"), err) + } + if err = generateFile(filepath.Join(tmplDir, "testdata", "config.yaml.tmpl"), + filepath.Join(codeDir, "testdata", "config.yaml"), md, "metadata"); err != nil { + return err + } + + if err = generateFile(filepath.Join(tmplDir, "config.go.tmpl"), + filepath.Join(codeDir, "generated_config.go"), md, "metadata"); err != nil { + return err + } + if err = generateFile(filepath.Join(tmplDir, "config_test.go.tmpl"), + filepath.Join(codeDir, "generated_config_test.go"), md, "metadata"); err != nil { + return err + } + + if len(md.ResourceAttributes) > 0 { + if err = generateFile(filepath.Join(tmplDir, "resource.go.tmpl"), + filepath.Join(codeDir, "generated_resource.go"), md, "metadata"); err != nil { + return err + } + if err = generateFile(filepath.Join(tmplDir, "resource_test.go.tmpl"), + filepath.Join(codeDir, "generated_resource_test.go"), md, "metadata"); err != nil { + return err + } + } + + if len(md.Metrics) == 0 { + return nil + } + + if err = generateFile(filepath.Join(tmplDir, "metrics.go.tmpl"), + filepath.Join(codeDir, "generated_metrics.go"), md, "metadata"); err != nil { + return err + } + if err = generateFile(filepath.Join(tmplDir, "metrics_test.go.tmpl"), + filepath.Join(codeDir, "generated_metrics_test.go"), md, "metadata"); err != nil { + return err + } + + return generateFile(filepath.Join(tmplDir, "documentation.md.tmpl"), filepath.Join(ymlDir, "documentation.md"), md, "metadata") +} + +func templatize(tmplFile string, md metadata) *template.Template { + return template.Must( + template. + New(filepath.Base(tmplFile)). + Option("missingkey=error"). + Funcs(map[string]any{ + "publicVar": func(s string) (string, error) { + return formatIdentifier(s, true) + }, + "attributeInfo": func(an attributeName) attribute { + return md.Attributes[an] + }, + "metricInfo": func(mn metricName) metric { + return md.Metrics[mn] + }, + "parseImportsRequired": func(metrics map[metricName]metric) bool { + for _, m := range metrics { + if m.Data().HasMetricInputType() { + return true + } + } + return false + }, + "stringsJoin": strings.Join, + "stringsSplit": strings.Split, + "userLinks": func(elems []string) []string { + result := make([]string, len(elems)) + for i, elem := range elems { + if elem == "open-telemetry/collector-approvers" { + result[i] = "[@open-telemetry/collector-approvers](https://github.com/orgs/open-telemetry/teams/collector-approvers)" + } else { + result[i] = fmt.Sprintf("[@%s](https://www.github.com/%s)", elem, elem) + } + } + return result + }, + "casesTitle": cases.Title(language.English).String, + "toCamelCase": func(s string) string { + caser := cases.Title(language.English).String + parts := strings.Split(s, "_") + result := "" + for _, part := range parts { + result += caser(part) + } + return result + }, + "inc": func(i int) int { return i + 1 }, + "distroURL": func(name string) string { + return distros[name] + }, + "isExporter": func() bool { + return md.Status.Class == "exporter" + }, + "isProcessor": func() bool { + return md.Status.Class == "processor" + }, + "isReceiver": func() bool { + return md.Status.Class == "receiver" + }, + "isExtension": func() bool { + return md.Status.Class == "extension" + }, + "isConnector": func() bool { + return md.Status.Class == "connector" + }, + "skipLifecycle": func() bool { + return md.Tests.SkipLifecycle + }, + "supportsLogs": func() bool { + for _, signals := range md.Status.Stability { + for _, s := range signals { + if s == "logs" { + return true + } + } + } + return false + }, + "supportsMetrics": func() bool { + for _, signals := range md.Status.Stability { + for _, s := range signals { + if s == "metrics" { + return true + } + } + } + return false + }, + "supportsTraces": func() bool { + for _, signals := range md.Status.Stability { + for _, s := range signals { + if s == "traces" { + return true + } + } + } + return false + }, + "supportsLogsToLogs": func() bool { + for _, signals := range md.Status.Stability { + for _, s := range signals { + if s == "logs_to_logs" { + return true + } + } + } + return false + }, + "supportsLogsToMetrics": func() bool { + for _, signals := range md.Status.Stability { + for _, s := range signals { + if s == "logs_to_metrics" { + return true + } + } + } + return false + }, + "supportsLogsToTraces": func() bool { + for _, signals := range md.Status.Stability { + for _, s := range signals { + if s == "logs_to_traces" { + return true + } + } + } + return false + }, + "supportsMetricsToLogs": func() bool { + for _, signals := range md.Status.Stability { + for _, s := range signals { + if s == "metrics_to_logs" { + return true + } + } + } + return false + }, + "supportsMetricsToMetrics": func() bool { + for _, signals := range md.Status.Stability { + for _, s := range signals { + if s == "metrics_to_metrics" { + return true + } + } + } + return false + }, + "supportsMetricsToTraces": func() bool { + for _, signals := range md.Status.Stability { + for _, s := range signals { + if s == "metrics_to_traces" { + return true + } + } + } + return false + }, + "supportsTracesToLogs": func() bool { + for _, signals := range md.Status.Stability { + for _, s := range signals { + if s == "traces_to_logs" { + return true + } + } + } + return false + }, + "supportsTracesToMetrics": func() bool { + for _, signals := range md.Status.Stability { + for _, s := range signals { + if s == "traces_to_metrics" { + return true + } + } + } + return false + }, + "supportsTracesToTraces": func() bool { + for _, signals := range md.Status.Stability { + for _, s := range signals { + if s == "traces_to_traces" { + return true + } + } + } + return false + }, + "expectConsumerError": func() bool { + return md.Tests.ExpectConsumerError + }, + // ParseFS delegates the parsing of the files to `Glob` + // which uses the `\` as a special character. + // Meaning on windows based machines, the `\` needs to be replaced + // with a `/` for it to find the file. + }).ParseFS(templateFS, strings.ReplaceAll(tmplFile, "\\", "/"))) +} + +func inlineReplace(tmplFile string, outputFile string, md metadata, start string, end string) error { + var readmeContents []byte + var err error + if readmeContents, err = os.ReadFile(outputFile); err != nil { // nolint: gosec + return err + } + + var re = regexp.MustCompile(fmt.Sprintf("%s[\\s\\S]*%s", start, end)) + if !re.Match(readmeContents) { + return nil + } + + tmpl := templatize(tmplFile, md) + buf := bytes.Buffer{} + + if err := tmpl.Execute(&buf, templateContext{metadata: md, Package: "metadata"}); err != nil { + return fmt.Errorf("failed executing template: %w", err) + } + + result := buf.String() + + s := re.ReplaceAllString(string(readmeContents), result) + if err := os.WriteFile(outputFile, []byte(s), 0600); err != nil { + return fmt.Errorf("failed writing %q: %w", outputFile, err) + } + + return nil +} + +func generateFile(tmplFile string, outputFile string, md metadata, goPackage string) error { + tmpl := templatize(tmplFile, md) + buf := bytes.Buffer{} + + if err := tmpl.Execute(&buf, templateContext{metadata: md, Package: goPackage}); err != nil { + return fmt.Errorf("failed executing template: %w", err) + } + + if err := os.Remove(outputFile); err != nil && !errors.Is(err, os.ErrNotExist) { + return fmt.Errorf("unable to remove genererated file %q: %w", outputFile, err) + } + + result := buf.Bytes() + var formatErr error + if strings.HasSuffix(outputFile, ".go") { + if formatted, err := format.Source(buf.Bytes()); err == nil { + result = formatted + } else { + formatErr = fmt.Errorf("failed formatting %s:%w", outputFile, err) + } + } + + if err := os.WriteFile(outputFile, result, 0600); err != nil { + return fmt.Errorf("failed writing %q: %w", outputFile, err) + } + + return formatErr +} diff --git a/cmd/mdatagen/main_test.go b/cmd/mdatagen/main_test.go new file mode 100644 index 00000000000..df3387fd167 --- /dev/null +++ b/cmd/mdatagen/main_test.go @@ -0,0 +1,461 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package main + +import ( + "bytes" + "fmt" + "os" + "path/filepath" + "testing" + + "github.com/stretchr/testify/require" + + md "go.opentelemetry.io/collector/cmd/mdatagen/internal/metadata" + "go.opentelemetry.io/collector/receiver/receivertest" +) + +func Test_runContents(t *testing.T) { + tests := []struct { + yml string + wantMetricsGenerated bool + wantConfigGenerated bool + wantStatusGenerated bool + wantTestsGenerated bool + wantErr bool + }{ + { + yml: "invalid.yaml", + wantErr: true, + }, + { + yml: "metrics_and_type.yaml", + wantMetricsGenerated: true, + wantConfigGenerated: true, + wantStatusGenerated: true, + }, + { + yml: "resource_attributes_only.yaml", + wantConfigGenerated: true, + wantStatusGenerated: true, + }, + { + yml: "status_only.yaml", + wantStatusGenerated: true, + }, + { + yml: "with_tests_receiver.yaml", + wantTestsGenerated: true, + wantStatusGenerated: true, + }, + { + yml: "with_tests_exporter.yaml", + wantTestsGenerated: true, + wantStatusGenerated: true, + }, + { + yml: "with_tests_processor.yaml", + wantTestsGenerated: true, + wantStatusGenerated: true, + }, + { + yml: "with_tests_extension.yaml", + wantTestsGenerated: true, + wantStatusGenerated: true, + }, + { + yml: "with_tests_connector.yaml", + wantTestsGenerated: true, + wantStatusGenerated: true, + }, + } + for _, tt := range tests { + t.Run(tt.yml, func(t *testing.T) { + tmpdir := filepath.Join(t.TempDir(), "shortname") + err := os.MkdirAll(tmpdir, 0750) + require.NoError(t, err) + ymlContent, err := os.ReadFile(filepath.Join("testdata", tt.yml)) + require.NoError(t, err) + metadataFile := filepath.Join(tmpdir, "metadata.yaml") + require.NoError(t, os.WriteFile(metadataFile, ymlContent, 0600)) + require.NoError(t, os.WriteFile(filepath.Join(tmpdir, "README.md"), []byte(` + +foo +`), 0600)) + + err = run(metadataFile) + if tt.wantErr { + require.Error(t, err) + return + } + require.NoError(t, err) + + if tt.wantMetricsGenerated { + require.FileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_metrics.go")) + require.FileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_metrics_test.go")) + require.FileExists(t, filepath.Join(tmpdir, "documentation.md")) + } else { + require.NoFileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_metrics.go")) + require.NoFileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_metrics_test.go")) + require.NoFileExists(t, filepath.Join(tmpdir, "documentation.md")) + } + + if tt.wantConfigGenerated { + require.FileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_config.go")) + require.FileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_config_test.go")) + } else { + require.NoFileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_config.go")) + require.NoFileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_config_test.go")) + } + + if tt.wantStatusGenerated { + require.FileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_status.go")) + contents, err := os.ReadFile(filepath.Join(tmpdir, "README.md")) // nolint: gosec + require.NoError(t, err) + require.NotContains(t, string(contents), "foo") + } else { + require.NoFileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_status.go")) + contents, err := os.ReadFile(filepath.Join(tmpdir, "README.md")) // nolint: gosec + require.NoError(t, err) + require.Contains(t, string(contents), "foo") + } + + if tt.wantTestsGenerated { + require.FileExists(t, filepath.Join(tmpdir, "generated_component_test.go")) + contents, err := os.ReadFile(filepath.Join(tmpdir, "generated_component_test.go")) // nolint: gosec + require.NoError(t, err) + require.Contains(t, string(contents), "func Test") + } else { + require.NoFileExists(t, filepath.Join(tmpdir, "generated_component_test.go")) + } + }) + } +} + +func Test_run(t *testing.T) { + type args struct { + ymlPath string + } + tests := []struct { + name string + args args + wantErr bool + }{ + { + name: "no argument", + args: args{""}, + wantErr: true, + }, + { + name: "no such file", + args: args{"/no/such/file"}, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if err := run(tt.args.ymlPath); (err != nil) != tt.wantErr { + t.Errorf("run() error = %v, wantErr %v", err, tt.wantErr) + } + }) + } +} + +func Test_inlineReplace(t *testing.T) { + tests := []struct { + name string + markdown string + outputFile string + componentClass string + warnings []string + stability map[string][]string + distros []string + codeowners *Codeowners + }{ + { + name: "readme with empty status", + markdown: `# Some component + + + + +Some info about a component +`, + outputFile: "readme_with_status.md", + componentClass: "receiver", + distros: []string{"contrib"}, + }, + { + name: "readme with status for extension", + markdown: `# Some component + + + + +Some info about a component +`, + outputFile: "readme_with_status_extension.md", + componentClass: "extension", + distros: []string{"contrib"}, + }, + { + name: "readme with status with codeowners and seeking new", + markdown: `# Some component + + + + +Some info about a component +`, + outputFile: "readme_with_status_codeowners_and_seeking_new.md", + componentClass: "receiver", + distros: []string{"contrib"}, + codeowners: &Codeowners{ + Active: []string{"foo"}, + SeekingNew: true, + }, + }, + { + name: "readme with status with codeowners and emeritus", + markdown: `# Some component + + + + +Some info about a component +`, + outputFile: "readme_with_status_codeowners_and_emeritus.md", + componentClass: "receiver", + distros: []string{"contrib"}, + codeowners: &Codeowners{ + Active: []string{"foo"}, + Emeritus: []string{"bar"}, + }, + }, + { + name: "readme with status with codeowners", + markdown: `# Some component + + + + +Some info about a component +`, + outputFile: "readme_with_status_codeowners.md", + componentClass: "receiver", + distros: []string{"contrib"}, + codeowners: &Codeowners{ + Active: []string{"foo"}, + }, + }, + { + name: "readme with status table", + markdown: `# Some component + + +| Status | | +| ------------------------ |-----------| + + +Some info about a component +`, + outputFile: "readme_with_status.md", + componentClass: "receiver", + distros: []string{"contrib"}, + }, + { + name: "readme with no status", + markdown: `# Some component + +Some info about a component +`, + outputFile: "readme_without_status.md", + distros: []string{"contrib"}, + }, + { + name: "component with warnings", + markdown: `# Some component + + + + +Some info about a component +### warnings +Some warning there. +`, + outputFile: "readme_with_warnings.md", + warnings: []string{"warning1"}, + distros: []string{"contrib"}, + }, + { + name: "readme with multiple signals", + markdown: `# Some component + + + + +Some info about a component +`, + outputFile: "readme_with_multiple_signals.md", + stability: map[string][]string{"beta": {"metrics"}, "alpha": {"logs"}}, + distros: []string{"contrib"}, + }, + { + name: "readme with cmd class", + markdown: `# Some component + + + + +Some info about a component +`, + outputFile: "readme_with_cmd_class.md", + stability: map[string][]string{"beta": {"metrics"}, "alpha": {"logs"}}, + componentClass: "cmd", + distros: []string{}, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + stability := map[string][]string{"beta": {"metrics"}} + if len(tt.stability) > 0 { + stability = tt.stability + } + md := metadata{ + Type: "foo", + ShortFolderName: "foo", + Status: &Status{ + Stability: stability, + Distributions: tt.distros, + Class: tt.componentClass, + Warnings: tt.warnings, + Codeowners: tt.codeowners, + }, + } + tmpdir := t.TempDir() + + readmeFile := filepath.Join(tmpdir, "README.md") + require.NoError(t, os.WriteFile(readmeFile, []byte(tt.markdown), 0600)) + + err := inlineReplace("templates/readme.md.tmpl", readmeFile, md, statusStart, statusEnd) + require.NoError(t, err) + + require.FileExists(t, filepath.Join(tmpdir, "README.md")) + got, err := os.ReadFile(filepath.Join(tmpdir, "README.md")) // nolint: gosec + require.NoError(t, err) + got = bytes.ReplaceAll(got, []byte("\r\n"), []byte("\n")) + expected, err := os.ReadFile(filepath.Join("testdata", tt.outputFile)) + require.NoError(t, err) + expected = bytes.ReplaceAll(expected, []byte("\r\n"), []byte("\n")) + fmt.Println(string(got)) + fmt.Println(string(expected)) + require.Equal(t, string(expected), string(got)) + }) + } +} + +func TestGenerateStatusMetadata(t *testing.T) { + tests := []struct { + name string + output string + md metadata + expected string + }{ + { + name: "foo component with beta status", + md: metadata{ + Type: "foo", + Status: &Status{ + Stability: map[string][]string{"beta": {"metrics"}}, + Distributions: []string{"contrib"}, + Class: "receiver", + }, + }, + expected: `// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("foo") + scopeName = "" +) + +const ( + MetricsStability = component.StabilityLevelBeta +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter(scopeName) +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer(scopeName) +} +`, + }, + { + name: "foo component with alpha status", + md: metadata{ + Type: "foo", + Status: &Status{ + Stability: map[string][]string{"alpha": {"metrics"}}, + Distributions: []string{"contrib"}, + Class: "receiver", + }, + }, + expected: `// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("foo") + scopeName = "" +) + +const ( + MetricsStability = component.StabilityLevelAlpha +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter(scopeName) +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer(scopeName) +} +`, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + tmpdir := t.TempDir() + err := generateFile("templates/status.go.tmpl", + filepath.Join(tmpdir, "generated_status.go"), tt.md, "metadata") + require.NoError(t, err) + actual, err := os.ReadFile(filepath.Join(tmpdir, "generated_status.go")) // nolint: gosec + require.NoError(t, err) + require.Equal(t, tt.expected, string(actual)) + }) + } +} + +// TestGenerated verifies that the internal/metadata API is generated correctly. +func TestGenerated(t *testing.T) { + mb := md.NewMetricsBuilder(md.DefaultMetricsBuilderConfig(), receivertest.NewNopCreateSettings()) + m := mb.Emit() + require.Equal(t, 0, m.ResourceMetrics().Len()) +} diff --git a/cmd/mdatagen/metadata-sample.yaml b/cmd/mdatagen/metadata-sample.yaml new file mode 100644 index 00000000000..b9a5f8f6c90 --- /dev/null +++ b/cmd/mdatagen/metadata-sample.yaml @@ -0,0 +1,136 @@ +# Sample metric metadata file with all available configurations. + +type: file + +sem_conv_version: 1.9.0 + +status: + class: receiver + stability: + development: [logs] + beta: [traces] + stable: [metrics] + distributions: [contrib] + warnings: + - Any additional information that should be brought to the consumer's attention + +resource_attributes: + string.resource.attr: + description: Resource attribute with any string value. + type: string + enabled: true + + string.enum.resource.attr: + description: Resource attribute with a known set of string values. + type: string + enum: [one, two] + enabled: true + + optional.resource.attr: + description: Explicitly disabled ResourceAttribute. + type: string + enabled: false + + slice.resource.attr: + description: Resource attribute with a slice value. + type: slice + enabled: true + + map.resource.attr: + description: Resource attribute with a map value. + type: map + enabled: true + + string.resource.attr_disable_warning: + description: Resource attribute with any string value. + type: string + enabled: true + warnings: + if_enabled_not_set: This resource_attribute will be disabled by default soon. + + string.resource.attr_remove_warning: + description: Resource attribute with any string value. + type: string + enabled: false + warnings: + if_configured: This resource_attribute is deprecated and will be removed soon. + + string.resource.attr_to_be_removed: + description: Resource attribute with any string value. + type: string + enabled: true + warnings: + if_enabled: This resource_attribute is deprecated and will be removed soon. + +attributes: + string_attr: + description: Attribute with any string value. + type: string + + overridden_int_attr: + name_override: state + description: Integer attribute with overridden name. + type: int + + enum_attr: + description: Attribute with a known set of string values. + type: string + enum: [red, green, blue] + + boolean_attr: + description: Attribute with a boolean value. + type: bool + + slice_attr: + description: Attribute with a slice value. + type: slice + + map_attr: + description: Attribute with a map value. + type: map + +metrics: + default.metric: + enabled: true + description: Monotonic cumulative sum int metric enabled by default. + extended_documentation: The metric will be become optional soon. + unit: s + sum: + value_type: int + monotonic: true + aggregation_temporality: cumulative + attributes: [string_attr, overridden_int_attr, enum_attr, slice_attr, map_attr] + warnings: + if_enabled_not_set: This metric will be disabled by default soon. + + optional.metric: + enabled: false + description: "[DEPRECATED] Gauge double metric disabled by default." + unit: 1 + gauge: + value_type: double + attributes: [string_attr, boolean_attr] + warnings: + if_configured: This metric is deprecated and will be removed soon. + + optional.metric.empty_unit: + enabled: false + description: "[DEPRECATED] Gauge double metric disabled by default." + unit: "" + gauge: + value_type: double + attributes: [string_attr, boolean_attr] + warnings: + if_configured: This metric is deprecated and will be removed soon. + + default.metric.to_be_removed: + enabled: true + description: "[DEPRECATED] Non-monotonic delta sum double metric enabled by default." + extended_documentation: The metric will be will be removed soon. + unit: s + sum: + value_type: double + monotonic: false + aggregation_temporality: delta + warnings: + if_enabled: This metric is deprecated and will be removed soon. diff --git a/cmd/mdatagen/metadata-schema.yaml b/cmd/mdatagen/metadata-schema.yaml new file mode 100644 index 00000000000..879307fdd3d --- /dev/null +++ b/cmd/mdatagen/metadata-schema.yaml @@ -0,0 +1,113 @@ +# Required: The type of the component - Usually the name. The type and class combined uniquely identify the component (eg. receiver/otlp) or subcomponent (eg. receiver/hostmetricsreceiver/cpu) +type: + +# Required for subcomponents: The type of the parent component. +parent: string + +# Required for components (Optional for subcomponents): A high-level view of the development status and use of this component +status: + # Required: The class of the component (For example receiver) + class: + # Required: The stability of the component - See https://github.com/open-telemetry/opentelemetry-collector#stability-levels + stability: + development: [] + alpha: [] + beta: [] + stable: [] + deprecated: [] + unmaintained: [] + # Optional: The distributions that this component is bundled with (For example core or contrib). See statusdata.go for a list of common distros. + distributions: [string] + # Optional: A list of warnings that should be brought to the attention of users looking to use this component + warnings: [string] + # Optional: Metadata related to codeowners of the component + codeowners: + active: [string] + emeritus: [string] + unsupported_platforms: [] + +# Optional: OTel Semantic Conventions version that will be associated with the scraped metrics. +# This attribute should be set for metrics compliant with OTel Semantic Conventions. +sem_conv_version: 1.9.0 + +# Optional: map of resource attribute definitions with the key being the attribute name. +resource_attributes: + : + # Required: whether the resource attribute is added the emitted metrics by default. + enabled: bool + # Required: description of the attribute. + description: + # Optional: array of attribute values if they are static values (currently, only string type is supported). + enum: [string] + # Required: attribute value type. + type: + # Optional: warnings that will be shown to user under specified conditions. + warnings: + # A warning that will be displayed if the resource_attribute is enabled in user config. + # Should be used for deprecated default resource_attributes that will be removed soon. + if_enabled: + # A warning that will be displayed if `enabled` field is not set explicitly in user config. + # Should be used for resource_attributes that will be turned from default to optional or vice versa. + if_enabled_not_set: + # A warning that will be displayed if the resource_attribute is configured by user in any way. + # Should be used for deprecated optional resource_attributes that will be removed soon. + if_configured: + + +# Optional: map of attribute definitions with the key being the attribute name and value +# being described below. +attributes: + : + # Optional: this field can be used to override the actual attribute name defined by the key. + # It should be used if multiple metrics have different attributes with the same name. + name_override: + # Required: description of the attribute. + description: + # Optional: array of attribute values if they are static values (currently, only string type is supported). + enum: [string] + # Required: attribute value type. + type: + +# Optional: map of metric names with the key being the metric name and value +# being described below. +metrics: + : + # Required: whether the metric is collected by default. + enabled: bool + # Required: metric description. + description: + # Optional: extended documentation of the metric. + extended_documentation: + # Optional: warnings that will be shown to user under specified conditions. + warnings: + # A warning that will be displayed if the metric is enabled in user config. + # Should be used for deprecated default metrics that will be removed soon. + if_enabled: + # A warning that will be displayed if `enabled` field is not set explicitly in user config. + # Should be used for metrics that will be turned from default to optional or vice versa. + if_enabled_not_set: + # A warning that will be displayed if the metrics is configured by user in any way. + # Should be used for deprecated optional metrics that will be removed soon. + if_configured: + # Required: metric unit as defined by https://ucum.org/ucum.html. + unit: + # Required: metric type with its settings. + : + # Required for sum and gauge metrics: type of number data point values. + value_type: + # Required for sum metric: whether the metric is monotonic (no negative delta values). + monotonic: bool + # Required for sum metric: whether reported values incorporate previous measurements + # (cumulative) or not (delta). + aggregation_temporality: + # Optional: Indicates the type the metric needs to be parsed from. If set, the generated + # functions will parse the value from string to value_type. + input_type: string + # Optional: array of attributes that were defined in the attributes section that are emitted by this metric. + attributes: [string] + +# Lifecycle tests generated for this component. +tests: + config: # {} by default, specific testing configuration for lifecycle tests. + skip_lifecycle: false # false by default + expect_consumer_error: true # false by default diff --git a/cmd/mdatagen/metadata.yaml b/cmd/mdatagen/metadata.yaml new file mode 100644 index 00000000000..65bb097a962 --- /dev/null +++ b/cmd/mdatagen/metadata.yaml @@ -0,0 +1,6 @@ +type: mdatagen + +status: + class: cmd + codeowners: + active: [dmitryax] \ No newline at end of file diff --git a/cmd/mdatagen/metricdata.go b/cmd/mdatagen/metricdata.go new file mode 100644 index 00000000000..f4515136aae --- /dev/null +++ b/cmd/mdatagen/metricdata.go @@ -0,0 +1,182 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package main + +import ( + "errors" + "fmt" + + "go.opentelemetry.io/collector/confmap" + "go.opentelemetry.io/collector/pdata/pmetric" +) + +var ( + _ MetricData = &gauge{} + _ MetricData = &sum{} +) + +// MetricData is generic interface for all metric datatypes. +type MetricData interface { + Type() string + HasMonotonic() bool + HasAggregated() bool + HasMetricInputType() bool +} + +// AggregationTemporality defines a metric aggregation type. +type AggregationTemporality struct { + // Aggregation describes if the aggregator reports delta changes + // since last report time, or cumulative changes since a fixed start time. + Aggregation pmetric.AggregationTemporality +} + +// UnmarshalText implements the encoding.TextUnmarshaler interface. +func (agg *AggregationTemporality) UnmarshalText(text []byte) error { + switch vtStr := string(text); vtStr { + case "cumulative": + agg.Aggregation = pmetric.AggregationTemporalityCumulative + case "delta": + agg.Aggregation = pmetric.AggregationTemporalityDelta + default: + return fmt.Errorf("invalid aggregation: %q", vtStr) + } + return nil +} + +// String returns string representation of the aggregation temporality. +func (agg *AggregationTemporality) String() string { + return agg.Aggregation.String() +} + +// Mono defines the metric monotonicity. +type Mono struct { + // Monotonic is true if the sum is monotonic. + Monotonic bool `mapstructure:"monotonic"` +} + +// MetricInputType defines the metric input value type +type MetricInputType struct { + // InputType is the type the metric needs to be parsed from, options are "string" + InputType string `mapstructure:"input_type"` +} + +func (mit MetricInputType) HasMetricInputType() bool { + return mit.InputType != "" +} + +// Type returns name of the datapoint type. +func (mit MetricInputType) String() string { + return mit.InputType +} + +// MetricValueType defines the metric number type. +type MetricValueType struct { + // ValueType is type of the metric number, options are "double", "int". + ValueType pmetric.NumberDataPointValueType +} + +func (mvt *MetricValueType) Unmarshal(parser *confmap.Conf) error { + if !parser.IsSet("value_type") { + return errors.New("missing required field: `value_type`") + } + return nil +} + +// UnmarshalText implements the encoding.TextUnmarshaler interface. +func (mvt *MetricValueType) UnmarshalText(text []byte) error { + switch vtStr := string(text); vtStr { + case "int": + mvt.ValueType = pmetric.NumberDataPointValueTypeInt + case "double": + mvt.ValueType = pmetric.NumberDataPointValueTypeDouble + default: + return fmt.Errorf("invalid value_type: %q", vtStr) + } + return nil +} + +// Type returns name of the datapoint type. +func (mvt MetricValueType) String() string { + return mvt.ValueType.String() +} + +// BasicType returns name of a golang basic type for the datapoint type. +func (mvt MetricValueType) BasicType() string { + switch mvt.ValueType { + case pmetric.NumberDataPointValueTypeInt: + return "int64" + case pmetric.NumberDataPointValueTypeDouble: + return "float64" + case pmetric.NumberDataPointValueTypeEmpty: + return "" + default: + return "" + } +} + +type gauge struct { + MetricValueType `mapstructure:"value_type"` + MetricInputType `mapstructure:",squash"` +} + +// Unmarshal is a custom unmarshaler for gauge. Needed mostly to avoid MetricValueType.Unmarshal inheritance. +func (d *gauge) Unmarshal(parser *confmap.Conf) error { + if err := d.MetricValueType.Unmarshal(parser); err != nil { + return err + } + return parser.Unmarshal(d) +} + +func (d gauge) Type() string { + return "Gauge" +} + +func (d gauge) HasMonotonic() bool { + return false +} + +func (d gauge) HasAggregated() bool { + return false +} + +type sum struct { + AggregationTemporality `mapstructure:"aggregation_temporality"` + Mono `mapstructure:",squash"` + MetricValueType `mapstructure:"value_type"` + MetricInputType `mapstructure:",squash"` +} + +// Unmarshal is a custom unmarshaler for sum. Needed mostly to avoid MetricValueType.Unmarshal inheritance. +func (d *sum) Unmarshal(parser *confmap.Conf) error { + if !parser.IsSet("aggregation_temporality") { + return errors.New("missing required field: `aggregation_temporality`") + } + if err := d.MetricValueType.Unmarshal(parser); err != nil { + return err + } + return parser.Unmarshal(d) +} + +// TODO: Currently, this func will not be called because of https://github.com/open-telemetry/opentelemetry-collector/issues/6671. Uncomment function and +// add a test case to Test_loadMetadata for file no_monotonic.yaml once the issue is solved. +// +// Unmarshal is a custom unmarshaler for Mono. +// func (m *Mono) Unmarshal(parser *confmap.Conf) error { +// if !parser.IsSet("monotonic") { +// return errors.New("missing required field: `monotonic`") +// } +// return parser.Unmarshal(m) +// } + +func (d sum) Type() string { + return "Sum" +} + +func (d sum) HasMonotonic() bool { + return true +} + +func (d sum) HasAggregated() bool { + return true +} diff --git a/cmd/mdatagen/metricdata_test.go b/cmd/mdatagen/metricdata_test.go new file mode 100644 index 00000000000..10b7f46613e --- /dev/null +++ b/cmd/mdatagen/metricdata_test.go @@ -0,0 +1,26 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package main + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestMetricData(t *testing.T) { + for _, arg := range []struct { + metricData MetricData + typ string + hasAggregated bool + hasMonotonic bool + }{ + {&gauge{}, "Gauge", false, false}, + {&sum{}, "Sum", true, true}, + } { + assert.Equal(t, arg.typ, arg.metricData.Type()) + assert.Equal(t, arg.hasAggregated, arg.metricData.HasAggregated()) + assert.Equal(t, arg.hasMonotonic, arg.metricData.HasMonotonic()) + } +} diff --git a/cmd/mdatagen/statusdata.go b/cmd/mdatagen/statusdata.go new file mode 100644 index 00000000000..d65a5c20f58 --- /dev/null +++ b/cmd/mdatagen/statusdata.go @@ -0,0 +1,62 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package main + +import ( + "sort" +) + +// distros is a collection of distributions that can be referenced in the metadata.yaml files. +// The rules below apply to every distribution added to this list: +// - The distribution must be open source. +// - The link must point to a publicly accessible repository. +var distros = map[string]string{ + "core": "https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol", + "contrib": "https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib", + "aws": "https://github.com/aws-observability/aws-otel-collector", + "grafana": "https://github.com/grafana/agent", + "observiq": "https://github.com/observIQ/observiq-otel-collector", + "redhat": "https://github.com/os-observability/redhat-opentelemetry-collector", + "splunk": "https://github.com/signalfx/splunk-otel-collector", + "sumo": "https://github.com/SumoLogic/sumologic-otel-collector", + "liatrio": "https://github.com/liatrio/liatrio-otel-collector", +} + +type Codeowners struct { + // Active codeowners + Active []string `mapstructure:"active"` + // Emeritus codeowners + Emeritus []string `mapstructure:"emeritus"` + // Whether new codeowners are being sought + SeekingNew bool `mapstructure:"seeking_new"` +} + +type Status struct { + Stability map[string][]string `mapstructure:"stability"` + Distributions []string `mapstructure:"distributions"` + Class string `mapstructure:"class"` + Warnings []string `mapstructure:"warnings"` + Codeowners *Codeowners `mapstructure:"codeowners"` + UnsupportedPlatforms []string `mapstructure:"unsupported_platforms"` +} + +func (s *Status) SortedDistributions() []string { + sorted := s.Distributions + sort.Slice(sorted, func(i, j int) bool { + if s.Distributions[i] == "core" { + return true + } + if s.Distributions[i] == "contrib" { + return s.Distributions[j] != "core" + } + if s.Distributions[j] == "core" { + return false + } + if s.Distributions[j] == "contrib" { + return s.Distributions[i] == "core" + } + return s.Distributions[i] < s.Distributions[j] + }) + return sorted +} diff --git a/cmd/mdatagen/statusdata_test.go b/cmd/mdatagen/statusdata_test.go new file mode 100644 index 00000000000..947065b1d6f --- /dev/null +++ b/cmd/mdatagen/statusdata_test.go @@ -0,0 +1,59 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package main + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestSortedDistributions(t *testing.T) { + tests := []struct { + name string + s Status + result []string + }{ + { + "all combined", + Status{Distributions: []string{"arm", "contrib", "core", "foo", "bar"}}, + []string{"core", "contrib", "arm", "bar", "foo"}, + }, + { + "core only", + Status{Distributions: []string{"core"}}, + []string{"core"}, + }, + { + "core and contrib only", + Status{Distributions: []string{"core", "contrib"}}, + []string{"core", "contrib"}, + }, + { + "core and contrib reversed", + Status{Distributions: []string{"contrib", "core"}}, + []string{"core", "contrib"}, + }, + { + "neither core nor contrib", + Status{Distributions: []string{"foo", "bar"}}, + []string{"bar", "foo"}, + }, + { + "no core, contrib, something else", + Status{Distributions: []string{"foo", "contrib", "bar"}}, + []string{"contrib", "bar", "foo"}, + }, + { + "core, no contrib, something else", + Status{Distributions: []string{"foo", "core", "bar"}}, + []string{"core", "bar", "foo"}, + }, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + assert.Equal(t, test.result, test.s.SortedDistributions()) + }) + } +} diff --git a/cmd/mdatagen/templates/component_test.go.tmpl b/cmd/mdatagen/templates/component_test.go.tmpl new file mode 100644 index 00000000000..3c82b1ed2d2 --- /dev/null +++ b/cmd/mdatagen/templates/component_test.go.tmpl @@ -0,0 +1,448 @@ +// Code generated by mdatagen. DO NOT EDIT. + +{{ if len .Status.UnsupportedPlatforms -}} +//go:build {{ range $i, $v := .Status.UnsupportedPlatforms }}{{ if $i }} && {{ end }}!{{ . }}{{ end }} +{{- end }} + +package {{ .Package }} + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" +{{ if isExporter }} + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" +{{ end }} +{{ if isProcessor }} + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/processor" + "go.opentelemetry.io/collector/processor/processortest" +{{ end }} +{{ if isReceiver }} + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/receiver" + "go.opentelemetry.io/collector/receiver/receivertest" +{{ end }} +{{ if isExtension }} + "go.opentelemetry.io/collector/extension/extensiontest" +{{ end }} +{{ if isConnector }} + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/connector/connectortest" +{{ end }} + "go.opentelemetry.io/collector/confmap/confmaptest" +{{ if or (isExporter) (isProcessor) }} + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/testdata" +{{ end }} +) + +func TestCheckConfigStruct(t *testing.T) { + componenttest.CheckConfigStruct(NewFactory().CreateDefaultConfig()) +} + +{{ if isExporter }} +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct{ + name string + createFn func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) + }{ +{{ if supportsLogs }} + { + name: "logs", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateLogsExporter(ctx, set, cfg) + }, + }, +{{ end }} +{{ if supportsMetrics }} + { + name: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, +{{ end }} +{{ if supportsTraces }} + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, +{{ end }} + } + + cm, err := confmaptest.LoadConf("metadata.yaml") + require.NoError(t, err) + cfg := factory.CreateDefaultConfig() + sub, err := cm.Sub("tests::config") + require.NoError(t, err) + require.NoError(t, component.UnmarshalConfig(sub, cfg)) + + for _, test := range tests { + t.Run(test.name + "-shutdown", func(t *testing.T) { + c, err := test.createFn(context.Background(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + + t.Run(test.name + "-lifecycle", func(t *testing.T) { + {{ if skipLifecycle }} + // TODO support lifecycle + t.SkipNow() + {{ end }} + c, err := test.createFn(context.Background(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + err = c.Start(context.Background(), host) + require.NoError(t, err) + require.NotPanics(t, func() { + switch e := c.(type) { + case exporter.Logs: + logs := testdata.GenerateLogsManyLogRecordsSameResource(2) + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case exporter.Metrics: + metrics := testdata.GenerateMetricsTwoMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case exporter.Traces: + traces := testdata.GenerateTracesTwoSpansSameResource() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + {{ if not expectConsumerError }} + require.NoError(t, err) + {{ end }} + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} +{{ end }} + +{{ if isProcessor }} +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct{ + name string + createFn func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) + }{ +{{ if supportsLogs }} + { + name: "logs", + createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateLogsProcessor(ctx, set, cfg, consumertest.NewNop()) + }, + }, +{{ end }} +{{ if supportsMetrics }} + { + name: "metrics", + createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsProcessor(ctx, set, cfg, consumertest.NewNop()) + }, + }, +{{ end }} +{{ if supportsTraces }} + { + name: "traces", + createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesProcessor(ctx, set, cfg, consumertest.NewNop()) + }, + }, +{{ end }} + } + + cm, err := confmaptest.LoadConf("metadata.yaml") + require.NoError(t, err) + cfg := factory.CreateDefaultConfig() + sub, err := cm.Sub("tests::config") + require.NoError(t, err) + require.NoError(t, component.UnmarshalConfig(sub, cfg)) + + for _, test := range tests { + t.Run(test.name + "-shutdown", func(t *testing.T) { + c, err := test.createFn(context.Background(), processortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + + t.Run(test.name + "-lifecycle", func(t *testing.T) { + {{ if skipLifecycle }} + // TODO support lifecycle + t.SkipNow() + {{ end }} + c, err := test.createFn(context.Background(), processortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + err = c.Start(context.Background(), host) + require.NoError(t, err) + require.NotPanics(t, func() { + switch e := c.(type) { + case processor.Logs: + logs := testdata.GenerateLogsManyLogRecordsSameResource(2) + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case processor.Metrics: + metrics := testdata.GenerateMetricsTwoMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case processor.Traces: + traces := testdata.GenerateTracesTwoSpansSameResource() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} +{{ end }} + +{{ if isReceiver }} +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct{ + name string + createFn func(ctx context.Context, set receiver.CreateSettings, cfg component.Config) (component.Component, error) + }{ +{{ if supportsLogs }} + { + name: "logs", + createFn: func(ctx context.Context, set receiver.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateLogsReceiver(ctx, set, cfg, consumertest.NewNop()) + }, + }, +{{ end }} +{{ if supportsMetrics }} + { + name: "metrics", + createFn: func(ctx context.Context, set receiver.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsReceiver(ctx, set, cfg, consumertest.NewNop()) + }, + }, +{{ end }} +{{ if supportsTraces }} + { + name: "traces", + createFn: func(ctx context.Context, set receiver.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesReceiver(ctx, set, cfg, consumertest.NewNop()) + }, + }, +{{ end }} + } + + cm, err := confmaptest.LoadConf("metadata.yaml") + require.NoError(t, err) + cfg := factory.CreateDefaultConfig() + sub, err := cm.Sub("tests::config") + require.NoError(t, err) + require.NoError(t, component.UnmarshalConfig(sub, cfg)) + + for _, test := range tests { + t.Run(test.name + "-shutdown", func(t *testing.T) { + c, err := test.createFn(context.Background(), receivertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + + t.Run(test.name + "-lifecycle", func(t *testing.T) { + {{ if skipLifecycle }} + // TODO support lifecycle + t.SkipNow() + {{ end }} + firstRcvr, err := test.createFn(context.Background(), receivertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + require.NoError(t, err) + require.NoError(t, firstRcvr.Start(context.Background(), host)) + require.NoError(t, firstRcvr.Shutdown(context.Background())) + secondRcvr, err := test.createFn(context.Background(), receivertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondRcvr.Start(context.Background(), host)) + require.NoError(t, secondRcvr.Shutdown(context.Background())) + }) + } +} +{{ end }} + +{{ if isExtension }} +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + cm, err := confmaptest.LoadConf("metadata.yaml") + require.NoError(t, err) + cfg := factory.CreateDefaultConfig() + sub, err := cm.Sub("tests::config") + require.NoError(t, err) + require.NoError(t, component.UnmarshalConfig(sub, cfg)) + + t.Run("shutdown", func(t *testing.T) { + e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) + + t.Run("lifecycle", func(t *testing.T) { + {{ if skipLifecycle }} + // TODO support lifecycle + t.SkipNow() + {{ end }} + firstExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, firstExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, firstExt.Shutdown(context.Background())) + + secondExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, secondExt.Shutdown(context.Background())) + }) +} +{{ end }} + +{{ if isConnector }} +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct{ + name string + createFn func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) + }{ +{{ if supportsLogsToLogs }} + { + name: "logs_to_logs", + createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateLogsToLogs(ctx, set, cfg, consumertest.NewNop()) + }, + }, +{{ end }} +{{ if supportsLogsToMetrics }} + { + name: "logs_to_metrics", + createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateLogsToMetrics(ctx, set, cfg, consumertest.NewNop()) + }, + }, +{{ end }} +{{ if supportsLogsToTraces }} + { + name: "logs_to_traces", + createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateLogsToTraces(ctx, set, cfg, consumertest.NewNop()) + }, + }, +{{ end }} +{{ if supportsMetricsToLogs }} + { + name: "metrics_to_logs", + createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsToLogs(ctx, set, cfg, consumertest.NewNop()) + }, + }, +{{ end }} +{{ if supportsMetricsToMetrics }} + { + name: "metrics_to_metrics", + createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsToMetrics(ctx, set, cfg, consumertest.NewNop()) + }, + }, +{{ end }} +{{ if supportsMetricsToTraces }} + { + name: "metrics_to_traces", + createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsToTraces(ctx, set, cfg, consumertest.NewNop()) + }, + }, +{{ end }} +{{ if supportsTracesToLogs }} + { + name: "traces_to_logs", + createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesToLogs(ctx, set, cfg, consumertest.NewNop()) + }, + }, +{{ end }} +{{ if supportsTracesToMetrics }} + { + name: "traces_to_metrics", + createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesToMetrics(ctx, set, cfg, consumertest.NewNop()) + }, + }, +{{ end }} +{{ if supportsTracesToTraces }} + { + name: "traces_to_traces", + createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesToTraces(ctx, set, cfg, consumertest.NewNop()) + }, + }, +{{ end }} + } + + cm, err := confmaptest.LoadConf("metadata.yaml") + require.NoError(t, err) + cfg := factory.CreateDefaultConfig() + sub, err := cm.Sub("tests::config") + require.NoError(t, err) + require.NoError(t, component.UnmarshalConfig(sub, cfg)) + + for _, test := range tests { + t.Run(test.name + "-shutdown", func(t *testing.T) { + c, err := test.createFn(context.Background(), connectortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + + t.Run(test.name + "-lifecycle", func(t *testing.T) { + {{ if skipLifecycle }} + // TODO support lifecycle + t.SkipNow() + {{ end }} + firstConnector, err := test.createFn(context.Background(), connectortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := newAssertNoErrorHost(t) + require.NoError(t, err) + require.NoError(t, firstConnector.Start(context.Background(), host)) + require.NoError(t, firstConnector.Shutdown(context.Background())) + secondConnector, err := test.createFn(context.Background(), connectortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondConnector.Start(context.Background(), host)) + require.NoError(t, secondConnector.Shutdown(context.Background())) + }) + } +} +{{ end }} \ No newline at end of file diff --git a/cmd/mdatagen/templates/config.go.tmpl b/cmd/mdatagen/templates/config.go.tmpl new file mode 100644 index 00000000000..712602222e7 --- /dev/null +++ b/cmd/mdatagen/templates/config.go.tmpl @@ -0,0 +1,103 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package {{ .Package }} + +{{ if or .Metrics .ResourceAttributes -}} +import "go.opentelemetry.io/collector/confmap" +{{- end }} + +{{ if .Metrics -}} + +// MetricConfig provides common config for a particular metric. +type MetricConfig struct { + Enabled bool `mapstructure:"enabled"` + + enabledSetByUser bool +} + +func (ms *MetricConfig) Unmarshal(parser *confmap.Conf) error { + if parser == nil { + return nil + } + err := parser.Unmarshal(ms) + if err != nil { + return err + } + ms.enabledSetByUser = parser.IsSet("enabled") + return nil +} + +// MetricsConfig provides config for {{ .Type }} metrics. +type MetricsConfig struct { + {{- range $name, $metric := .Metrics }} + {{ $name.Render }} MetricConfig `mapstructure:"{{ $name }}"` + {{- end }} +} + +func DefaultMetricsConfig() MetricsConfig { + return MetricsConfig{ + {{- range $name, $metric := .Metrics }} + {{ $name.Render }}: MetricConfig{ + Enabled: {{ $metric.Enabled }}, + }, + {{- end }} + } +} +{{- end }} + +{{ if .ResourceAttributes -}} +// ResourceAttributeConfig provides common config for a particular resource attribute. +type ResourceAttributeConfig struct { + Enabled bool `mapstructure:"enabled"` + + enabledSetByUser bool +} + +func (rac *ResourceAttributeConfig) Unmarshal(parser *confmap.Conf) error { + if parser == nil { + return nil + } + err := parser.Unmarshal(rac) + if err != nil { + return err + } + rac.enabledSetByUser = parser.IsSet("enabled") + return nil +} + +// ResourceAttributesConfig provides config for {{ .Type }} resource attributes. +type ResourceAttributesConfig struct { + {{- range $name, $attr := .ResourceAttributes }} + {{ $name.Render }} ResourceAttributeConfig `mapstructure:"{{ $name }}"` + {{- end }} +} + +func DefaultResourceAttributesConfig() ResourceAttributesConfig { + return ResourceAttributesConfig{ + {{- range $name, $attr := .ResourceAttributes }} + {{ $name.Render }}: ResourceAttributeConfig { + Enabled: {{ $attr.Enabled }}, + }, + {{- end }} + } +} +{{- end }} + +{{ if .Metrics -}} +// MetricsBuilderConfig is a configuration for {{ .Type }} metrics builder. +type MetricsBuilderConfig struct { + Metrics MetricsConfig `mapstructure:"metrics"` + {{- if .ResourceAttributes }} + ResourceAttributes ResourceAttributesConfig `mapstructure:"resource_attributes"` + {{- end }} +} + +func DefaultMetricsBuilderConfig() MetricsBuilderConfig { + return MetricsBuilderConfig { + Metrics: DefaultMetricsConfig(), + {{- if .ResourceAttributes }} + ResourceAttributes: DefaultResourceAttributesConfig(), + {{- end }} + } +} +{{- end }} diff --git a/cmd/mdatagen/templates/config_test.go.tmpl b/cmd/mdatagen/templates/config_test.go.tmpl new file mode 100644 index 00000000000..3f6a636bc6e --- /dev/null +++ b/cmd/mdatagen/templates/config_test.go.tmpl @@ -0,0 +1,131 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package {{ .Package }} + +import ( + "path/filepath" + "testing" + + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap/confmaptest" +) + +{{ if .Metrics }} +func TestMetricsBuilderConfig(t *testing.T) { + tests := []struct { + name string + want MetricsBuilderConfig + }{ + { + name: "default", + want: DefaultMetricsBuilderConfig(), + }, + { + name: "all_set", + want: MetricsBuilderConfig{ + Metrics: MetricsConfig{ + {{- range $name, $_ := .Metrics }} + {{ $name.Render }}: MetricConfig{Enabled: true}, + {{- end }} + }, + {{- if .ResourceAttributes }} + ResourceAttributes: ResourceAttributesConfig{ + {{- range $name, $_ := .ResourceAttributes }} + {{ $name.Render }}: ResourceAttributeConfig{Enabled: true}, + {{- end }} + }, + {{- end }} + }, + }, + { + name: "none_set", + want: MetricsBuilderConfig{ + Metrics: MetricsConfig{ + {{- range $name, $_ := .Metrics }} + {{ $name.Render }}: MetricConfig{Enabled: false}, + {{- end }} + }, + {{- if .ResourceAttributes }} + ResourceAttributes: ResourceAttributesConfig{ + {{- range $name, $_ := .ResourceAttributes }} + {{ $name.Render }}: ResourceAttributeConfig{Enabled: false}, + {{- end }} + }, + {{- end }} + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + cfg := loadMetricsBuilderConfig(t, tt.name) + if diff := cmp.Diff(tt.want, cfg, cmpopts.IgnoreUnexported(MetricConfig{} + {{- if .ResourceAttributes }}, ResourceAttributeConfig{}{{ end }})); diff != "" { + t.Errorf("Config mismatch (-expected +actual):\n%s", diff) + } + }) + } +} + +func loadMetricsBuilderConfig(t *testing.T, name string) MetricsBuilderConfig { + cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) + require.NoError(t, err) + sub, err := cm.Sub(name) + require.NoError(t, err) + cfg := DefaultMetricsBuilderConfig() + require.NoError(t, component.UnmarshalConfig(sub, &cfg)) + return cfg +} +{{- end }} + +{{ if .ResourceAttributes -}} +func TestResourceAttributesConfig(t *testing.T) { + tests := []struct { + name string + want ResourceAttributesConfig + }{ + { + name: "default", + want: DefaultResourceAttributesConfig(), + }, + { + name: "all_set", + want: ResourceAttributesConfig{ + {{- range $name, $_ := .ResourceAttributes }} + {{ $name.Render }}: ResourceAttributeConfig{Enabled: true}, + {{- end }} + }, + }, + { + name: "none_set", + want: ResourceAttributesConfig{ + {{- range $name, $_ := .ResourceAttributes }} + {{ $name.Render }}: ResourceAttributeConfig{Enabled: false}, + {{- end }} + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + cfg := loadResourceAttributesConfig(t, tt.name) + if diff := cmp.Diff(tt.want, cfg, cmpopts.IgnoreUnexported(ResourceAttributeConfig{})); diff != "" { + t.Errorf("Config mismatch (-expected +actual):\n%s", diff) + } + }) + } +} + +func loadResourceAttributesConfig(t *testing.T, name string) ResourceAttributesConfig { + cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) + require.NoError(t, err) + sub, err := cm.Sub(name) + require.NoError(t, err) + sub, err = sub.Sub("resource_attributes") + require.NoError(t, err) + cfg := DefaultResourceAttributesConfig() + require.NoError(t, component.UnmarshalConfig(sub, &cfg)) + return cfg +} +{{- end }} diff --git a/cmd/mdatagen/templates/documentation.md.tmpl b/cmd/mdatagen/templates/documentation.md.tmpl new file mode 100644 index 00000000000..eda8dc9fffe --- /dev/null +++ b/cmd/mdatagen/templates/documentation.md.tmpl @@ -0,0 +1,98 @@ +{{- define "metric-documenation" -}} +{{- $metricName := . }} +{{- $metric := $metricName | metricInfo -}} + +### {{ $metricName }} + +{{ $metric.Description }} + +{{- if $metric.ExtendedDocumentation }} + +{{ $metric.ExtendedDocumentation }} + +{{- end }} + +| Unit | Metric Type | Value Type |{{ if $metric.Data.HasAggregated }} Aggregation Temporality |{{ end }}{{ if $metric.Data.HasMonotonic }} Monotonic |{{ end }} +| ---- | ----------- | ---------- |{{ if $metric.Data.HasAggregated }} ----------------------- |{{ end }}{{ if $metric.Data.HasMonotonic }} --------- |{{ end }} +| {{ $metric.Unit }} | {{ $metric.Data.Type }} | {{ $metric.Data.MetricValueType }} | +{{- if $metric.Data.HasAggregated }} {{ $metric.Data.AggregationTemporality }} |{{ end }} +{{- if $metric.Data.HasMonotonic }} {{ $metric.Data.Monotonic }} |{{ end }} + +{{- if $metric.Attributes }} + +#### Attributes + +| Name | Description | Values | +| ---- | ----------- | ------ | +{{- range $metric.Attributes }} +{{- $attribute := . | attributeInfo }} +| {{ $attribute.Name }} | {{ $attribute.Description }} | +{{- if $attribute.Enum }} {{ $attribute.Type }}: ``{{ stringsJoin $attribute.Enum "``, ``" }}``{{ else }} Any {{ $attribute.Type }}{{ end }} | +{{- end }} + +{{- end }} + +{{- end -}} + +[comment]: <> (Code generated by mdatagen. DO NOT EDIT.) + +# {{ .Type }} + +{{- if .Parent }} + +**Parent Component:** {{ .Parent }} +{{- end }} + +## Default Metrics + +The following metrics are emitted by default. Each of them can be disabled by applying the following configuration: + +```yaml +metrics: + : + enabled: false +``` + +{{- range $metricName, $metric := .Metrics }} +{{- if $metric.Enabled }} + +{{ template "metric-documenation" $metricName }} + +{{- end }} +{{- end }} + +{{- $optionalMetricSeen := false }} +{{- range $metricName, $metric := .Metrics }} +{{- if not $metric.Enabled }} +{{- if not $optionalMetricSeen }} + +## Optional Metrics + +The following metrics are not emitted by default. Each of them can be enabled by applying the following configuration: + +```yaml +metrics: + : + enabled: true +``` + +{{- end }} +{{- $optionalMetricSeen = true }} + +{{ template "metric-documenation" $metricName }} + +{{- end }} +{{- end }} + +{{- if .ResourceAttributes }} + +## Resource Attributes + +| Name | Description | Values | Enabled | +| ---- | ----------- | ------ | ------- | +{{- range $attributeName, $attribute := .ResourceAttributes }} +| {{ $attributeName }} | {{ $attribute.Description }} | +{{- if $attribute.Enum }} {{ $attribute.Type }}: ``{{ stringsJoin $attribute.Enum "``, ``" }}``{{ else }} Any {{ $attribute.Type }}{{ end }} | {{ $attribute.Enabled }} | +{{- end }} + +{{- end }} diff --git a/cmd/mdatagen/templates/metrics.go.tmpl b/cmd/mdatagen/templates/metrics.go.tmpl new file mode 100644 index 00000000000..c76623c40fc --- /dev/null +++ b/cmd/mdatagen/templates/metrics.go.tmpl @@ -0,0 +1,319 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package {{ .Package }} + +import ( + {{- if .Metrics | parseImportsRequired }} + "strconv" + "fmt" + {{- end }} + "time" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/receiver" + {{- if .SemConvVersion }} + conventions "go.opentelemetry.io/collector/semconv/v{{ .SemConvVersion }}" + {{- end }} +) + +{{ range $name, $info := .Attributes }} +{{- if $info.Enum -}} +// Attribute{{ $name.Render }} specifies the a value {{ $name }} attribute. +type Attribute{{ $name.Render }} int + +const ( + _ Attribute{{ $name.Render }} = iota + {{- range $info.Enum }} + Attribute{{ $name.Render }}{{ . | publicVar }} + {{- end }} +) + +// String returns the string representation of the Attribute{{ $name.Render }}. +func (av Attribute{{ $name.Render }}) String() string { + switch av { + {{- range $info.Enum }} + case Attribute{{ $name.Render }}{{ . | publicVar }}: + return "{{ . }}" + {{- end }} + } + return "" +} + +// MapAttribute{{ $name.Render }} is a helper map of string to Attribute{{ $name.Render }} attribute value. +var MapAttribute{{ $name.Render }} = map[string]Attribute{{ $name.Render }}{ + {{- range $info.Enum }} + "{{ . }}": Attribute{{ $name.Render }}{{ . | publicVar }}, + {{- end }} +} + +{{ end }} +{{- end }} + +{{ range $name, $metric := .Metrics -}} +type metric{{ $name.Render }} struct { + data pmetric.Metric // data buffer for generated metric. + config MetricConfig // metric config provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills {{ $name }} metric with initial data. +func (m *metric{{ $name.Render }}) init() { + m.data.SetName("{{ $name }}") + m.data.SetDescription("{{ $metric.Description }}") + m.data.SetUnit("{{ $metric.Unit }}") + m.data.SetEmpty{{ $metric.Data.Type }}() + {{- if $metric.Data.HasMonotonic }} + m.data.{{ $metric.Data.Type }}().SetIsMonotonic({{ $metric.Data.Monotonic }}) + {{- end }} + {{- if $metric.Data.HasAggregated }} + m.data.{{ $metric.Data.Type }}().SetAggregationTemporality(pmetric.AggregationTemporality{{ $metric.Data.AggregationTemporality }}) + {{- end }} + {{- if $metric.Attributes }} + m.data.{{ $metric.Data.Type }}().DataPoints().EnsureCapacity(m.capacity) + {{- end }} +} + +func (m *metric{{ $name.Render }}) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val {{ $metric.Data.MetricValueType.BasicType }} +{{- range $metric.Attributes -}}, {{ .RenderUnexported }}AttributeValue {{ (attributeInfo .).Type.Primitive }}{{ end }}) { + if !m.config.Enabled { + return + } + dp := m.data.{{ $metric.Data.Type }}().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.Set{{ $metric.Data.MetricValueType }}Value(val) + {{- range $metric.Attributes }} + {{- if eq (attributeInfo .).Type.Primitive "[]byte" }} + dp.Attributes().PutEmptyBytes("{{ (attributeInfo .).Name }}").FromRaw({{ .RenderUnexported }}AttributeValue) + {{- else if eq (attributeInfo .).Type.Primitive "[]any" }} + dp.Attributes().PutEmptySlice("{{ (attributeInfo .).Name }}").FromRaw({{ .RenderUnexported }}AttributeValue) + {{- else if eq (attributeInfo .).Type.Primitive "map[string]any" }} + dp.Attributes().PutEmptyMap("{{ (attributeInfo .).Name }}").FromRaw({{ .RenderUnexported }}AttributeValue) + {{- else }} + dp.Attributes().Put{{ (attributeInfo .).Type }}("{{ (attributeInfo .).Name }}", {{ .RenderUnexported }}AttributeValue) + {{- end }} + {{- end }} +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metric{{ $name.Render }}) updateCapacity() { + if m.data.{{ $metric.Data.Type }}().DataPoints().Len() > m.capacity { + m.capacity = m.data.{{ $metric.Data.Type }}().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metric{{ $name.Render }}) emit(metrics pmetric.MetricSlice) { + if m.config.Enabled && m.data.{{ $metric.Data.Type }}().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetric{{ $name.Render }}(cfg MetricConfig) metric{{ $name.Render }} { + m := metric{{ $name.Render }}{config: cfg} + if cfg.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +{{ end -}} + +// MetricsBuilder provides an interface for scrapers to report metrics while taking care of all the transformations +// required to produce metric representation defined in metadata and user config. +type MetricsBuilder struct { + config MetricsBuilderConfig // config of the metrics builder. + startTime pcommon.Timestamp // start time that will be applied to all recorded data points. + metricsCapacity int // maximum observed number of metrics per resource. + metricsBuffer pmetric.Metrics // accumulates metrics data before emitting. + buildInfo component.BuildInfo // contains version information. + {{- range $name, $metric := .Metrics }} + metric{{ $name.Render }} metric{{ $name.Render }} + {{- end }} +} + +// metricBuilderOption applies changes to default metrics builder. +type metricBuilderOption func(*MetricsBuilder) + +// WithStartTime sets startTime on the metrics builder. +func WithStartTime(startTime pcommon.Timestamp) metricBuilderOption { + return func(mb *MetricsBuilder) { + mb.startTime = startTime + } +} + +func NewMetricsBuilder(mbc MetricsBuilderConfig, settings receiver.CreateSettings, options ...metricBuilderOption) *MetricsBuilder { + {{- range $name, $metric := .Metrics }} + {{- if $metric.Warnings.IfEnabled }} + if mbc.Metrics.{{ $name.Render }}.Enabled { + settings.Logger.Warn("[WARNING] `{{ $name }}` should not be enabled: {{ $metric.Warnings.IfEnabled }}") + } + {{- end }} + {{- if $metric.Warnings.IfEnabledNotSet }} + if !mbc.Metrics.{{ $name.Render }}.enabledSetByUser { + settings.Logger.Warn("[WARNING] Please set `enabled` field explicitly for `{{ $name }}`: {{ $metric.Warnings.IfEnabledNotSet }}") + } + {{- end }} + {{- if $metric.Warnings.IfConfigured }} + if mbc.Metrics.{{ $name.Render }}.enabledSetByUser { + settings.Logger.Warn("[WARNING] `{{ $name }}` should not be configured: {{ $metric.Warnings.IfConfigured }}") + } + {{- end }} + {{- end }} + {{- range $name, $attr := .ResourceAttributes }} + {{- if $attr.Warnings.IfEnabled }} + if mbc.ResourceAttributes.{{ $name.Render }}.Enabled { + settings.Logger.Warn("[WARNING] `{{ $name }}` should not be enabled: {{ $attr.Warnings.IfEnabled }}") + } + {{- end }} + {{- if $attr.Warnings.IfEnabledNotSet }} + if !mbc.ResourceAttributes.{{ $name.Render }}.enabledSetByUser { + settings.Logger.Warn("[WARNING] Please set `enabled` field explicitly for `{{ $name }}`: {{ $attr.Warnings.IfEnabledNotSet }}") + } + {{- end }} + {{- if $attr.Warnings.IfConfigured }} + if mbc.ResourceAttributes.{{ $name.Render }}.enabledSetByUser { + settings.Logger.Warn("[WARNING] `{{ $name }}` should not be configured: {{ $attr.Warnings.IfConfigured }}") + } + {{- end }} + {{- end }} + mb := &MetricsBuilder{ + config: mbc, + startTime: pcommon.NewTimestampFromTime(time.Now()), + metricsBuffer: pmetric.NewMetrics(), + buildInfo: settings.BuildInfo, + {{- range $name, $metric := .Metrics }} + metric{{ $name.Render }}: newMetric{{ $name.Render }}(mbc.Metrics.{{ $name.Render }}), + {{- end }} + } + for _, op := range options { + op(mb) + } + return mb +} + +{{- if .ResourceAttributes }} +// NewResourceBuilder returns a new resource builder that should be used to build a resource associated with for the emitted metrics. +func (mb *MetricsBuilder) NewResourceBuilder() *ResourceBuilder { + return NewResourceBuilder(mb.config.ResourceAttributes) +} +{{- end }} + +// updateCapacity updates max length of metrics and resource attributes that will be used for the slice capacity. +func (mb *MetricsBuilder) updateCapacity(rm pmetric.ResourceMetrics) { + if mb.metricsCapacity < rm.ScopeMetrics().At(0).Metrics().Len() { + mb.metricsCapacity = rm.ScopeMetrics().At(0).Metrics().Len() + } +} + +// ResourceMetricsOption applies changes to provided resource metrics. +type ResourceMetricsOption func(pmetric.ResourceMetrics) + +// WithResource sets the provided resource on the emitted ResourceMetrics. +// It's recommended to use ResourceBuilder to create the resource. +func WithResource(res pcommon.Resource) ResourceMetricsOption { + return func(rm pmetric.ResourceMetrics) { + res.CopyTo(rm.Resource()) + } +} + +// WithStartTimeOverride overrides start time for all the resource metrics data points. +// This option should be only used if different start time has to be set on metrics coming from different resources. +func WithStartTimeOverride(start pcommon.Timestamp) ResourceMetricsOption { + return func(rm pmetric.ResourceMetrics) { + var dps pmetric.NumberDataPointSlice + metrics := rm.ScopeMetrics().At(0).Metrics() + for i := 0; i < metrics.Len(); i++ { + switch metrics.At(i).Type() { + case pmetric.MetricTypeGauge: + dps = metrics.At(i).Gauge().DataPoints() + case pmetric.MetricTypeSum: + dps = metrics.At(i).Sum().DataPoints() + } + for j := 0; j < dps.Len(); j++ { + dps.At(j).SetStartTimestamp(start) + } + } + } +} + +// EmitForResource saves all the generated metrics under a new resource and updates the internal state to be ready for +// recording another set of data points as part of another resource. This function can be helpful when one scraper +// needs to emit metrics from several resources. Otherwise calling this function is not required, +// just `Emit` function can be called instead. +// Resource attributes should be provided as ResourceMetricsOption arguments. +func (mb *MetricsBuilder) EmitForResource(rmo ...ResourceMetricsOption) { + rm := pmetric.NewResourceMetrics() + {{- if .SemConvVersion }} + rm.SetSchemaUrl(conventions.SchemaURL) + {{- end }} + ils := rm.ScopeMetrics().AppendEmpty() + ils.Scope().SetName("{{ .ScopeName }}") + ils.Scope().SetVersion(mb.buildInfo.Version) + ils.Metrics().EnsureCapacity(mb.metricsCapacity) + {{- range $name, $metric := .Metrics }} + mb.metric{{- $name.Render }}.emit(ils.Metrics()) + {{- end }} + + for _, op := range rmo { + op(rm) + } + if ils.Metrics().Len() > 0 { + mb.updateCapacity(rm) + rm.MoveTo(mb.metricsBuffer.ResourceMetrics().AppendEmpty()) + } +} + +// Emit returns all the metrics accumulated by the metrics builder and updates the internal state to be ready for +// recording another set of metrics. This function will be responsible for applying all the transformations required to +// produce metric representation defined in metadata and user config, e.g. delta or cumulative. +func (mb *MetricsBuilder) Emit(rmo ...ResourceMetricsOption) pmetric.Metrics { + mb.EmitForResource(rmo...) + metrics := mb.metricsBuffer + mb.metricsBuffer = pmetric.NewMetrics() + return metrics +} + +{{ range $name, $metric := .Metrics -}} +// Record{{ $name.Render }}DataPoint adds a data point to {{ $name }} metric. +func (mb *MetricsBuilder) Record{{ $name.Render }}DataPoint(ts pcommon.Timestamp + {{- if $metric.Data.HasMetricInputType }}, inputVal {{ $metric.Data.MetricInputType.String }} + {{- else }}, val {{ $metric.Data.MetricValueType.BasicType }} + {{- end }} + {{- range $metric.Attributes -}} + , {{ .RenderUnexported }}AttributeValue {{ if (attributeInfo .).Enum }}Attribute{{ .Render }}{{ else }}{{ (attributeInfo .).Type.Primitive }}{{ end }} + {{- end }}) + {{- if $metric.Data.HasMetricInputType }} error{{ end }} { + {{- if $metric.Data.HasMetricInputType }} + {{- if eq $metric.Data.MetricValueType.BasicType "float64" }} + val, err := strconv.ParseFloat(inputVal, 64) + {{- else if eq $metric.Data.MetricValueType.BasicType "int64" }} + val, err := strconv.ParseInt(inputVal, 10, 64) + {{- end }} + if err != nil { + return fmt.Errorf("failed to parse {{ $metric.Data.MetricValueType.BasicType }} for {{ $name.Render }}, value was %s: %w", inputVal, err) + } + {{- end }} + mb.metric{{ $name.Render }}.recordDataPoint(mb.startTime, ts, val + {{- range $metric.Attributes -}} + , {{ .RenderUnexported }}AttributeValue{{ if (attributeInfo .).Enum }}.String(){{ end }} + {{- end }}) + {{- if $metric.Data.HasMetricInputType }} + return nil + {{- end }} +} +{{ end }} + +// Reset resets metrics builder to its initial state. It should be used when external metrics source is restarted, +// and metrics builder should update its startTime and reset it's internal state accordingly. +func (mb *MetricsBuilder) Reset(options ...metricBuilderOption) { + mb.startTime = pcommon.NewTimestampFromTime(time.Now()) + for _, op := range options { + op(mb) + } +} diff --git a/cmd/mdatagen/templates/metrics_test.go.tmpl b/cmd/mdatagen/templates/metrics_test.go.tmpl new file mode 100644 index 00000000000..bf7b09d05a9 --- /dev/null +++ b/cmd/mdatagen/templates/metrics_test.go.tmpl @@ -0,0 +1,174 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package {{ .Package }} + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/receiver/receivertest" + "go.uber.org/zap" + "go.uber.org/zap/zaptest/observer" +) + + +type testConfigCollection int + +const ( + testSetDefault testConfigCollection = iota + testSetAll + testSetNone +) + +func TestMetricsBuilder(t *testing.T) { + tests := []struct { + name string + configSet testConfigCollection + }{ + { + name: "default", + configSet: testSetDefault, + }, + { + name: "all_set", + configSet: testSetAll, + }, + { + name: "none_set", + configSet: testSetNone, + }, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + start := pcommon.Timestamp(1_000_000_000) + ts := pcommon.Timestamp(1_000_001_000) + observedZapCore, observedLogs := observer.New(zap.WarnLevel) + settings := receivertest.NewNopCreateSettings() + settings.Logger = zap.New(observedZapCore) + mb := NewMetricsBuilder(loadMetricsBuilderConfig(t, test.name), settings, WithStartTime(start)) + + expectedWarnings := 0 + {{- range $name, $metric := .Metrics }} + {{- if and $metric.Enabled $metric.Warnings.IfEnabled }} + if test.configSet == testSetDefault || test.configSet == testSetAll { + assert.Equal(t, "[WARNING] `{{ $name }}` should not be enabled: {{ $metric.Warnings.IfEnabled }}", observedLogs.All()[expectedWarnings].Message) + expectedWarnings++ + } + {{- end }} + {{- if $metric.Warnings.IfEnabledNotSet }} + if test.configSet == testSetDefault { + assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `{{ $name }}`: {{ $metric.Warnings.IfEnabledNotSet }}", observedLogs.All()[expectedWarnings].Message) + expectedWarnings++ + } + {{- end }} + {{- if $metric.Warnings.IfConfigured }} + if test.configSet == testSetAll || test.configSet == testSetNone { + assert.Equal(t, "[WARNING] `{{ $name }}` should not be configured: {{ $metric.Warnings.IfConfigured }}", observedLogs.All()[expectedWarnings].Message) + expectedWarnings++ + } + {{- end }} + {{- end }} + {{- range $name, $attr := .ResourceAttributes }} + {{- if and $attr.Enabled $attr.Warnings.IfEnabled }} + if test.configSet == testSetDefault || test.configSet == testSetAll { + assert.Equal(t, "[WARNING] `{{ $name }}` should not be enabled: {{ $attr.Warnings.IfEnabled }}", observedLogs.All()[expectedWarnings].Message) + expectedWarnings++ + } + {{- end }} + {{- if $attr.Warnings.IfEnabledNotSet }} + if test.configSet == testSetDefault { + assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `{{ $name }}`: {{ $attr.Warnings.IfEnabledNotSet }}", observedLogs.All()[expectedWarnings].Message) + expectedWarnings++ + } + {{- end }} + {{- if $attr.Warnings.IfConfigured }} + if test.configSet == testSetAll || test.configSet == testSetNone { + assert.Equal(t, "[WARNING] `{{ $name }}` should not be configured: {{ $attr.Warnings.IfConfigured }}", observedLogs.All()[expectedWarnings].Message) + expectedWarnings++ + } + {{- end }} + {{- end }} + + + assert.Equal(t, expectedWarnings, observedLogs.Len()) + + defaultMetricsCount := 0 + allMetricsCount := 0 + {{- range $name, $metric := .Metrics }} + + {{ if $metric.Enabled }}defaultMetricsCount++{{ end }} + allMetricsCount++ + mb.Record{{ $name.Render }}DataPoint(ts, {{ if $metric.Data.HasMetricInputType }}"1"{{ else }}1{{ end }} + {{- range $metric.Attributes -}} + , {{ if (attributeInfo .).Enum }}Attribute{{ .Render }}{{ (index (attributeInfo .).Enum 0) | publicVar }}{{ else }}{{ (attributeInfo .).TestValue }}{{ end }} + {{- end }}) + {{- end }} + + {{ if .ResourceAttributes }} + rb := mb.NewResourceBuilder() + {{- range $name, $attr := .ResourceAttributes }} + {{- if $attr.Enum }} + rb.Set{{ $attr.Name.Render }}{{ index $attr.Enum 0 | publicVar }}() + {{- else }} + rb.Set{{ $attr.Name.Render }}({{ $attr.TestValue }}) + {{- end }} + {{- end }} + res := rb.Emit() + {{- else }} + res := pcommon.NewResource() + {{- end }} + metrics := mb.Emit(WithResource(res)) + + if test.configSet == testSetNone { + assert.Equal(t, 0, metrics.ResourceMetrics().Len()) + return + } + + assert.Equal(t, 1, metrics.ResourceMetrics().Len()) + rm := metrics.ResourceMetrics().At(0) + assert.Equal(t, res, rm.Resource()) + assert.Equal(t, 1, rm.ScopeMetrics().Len()) + ms := rm.ScopeMetrics().At(0).Metrics() + if test.configSet == testSetDefault { + assert.Equal(t, defaultMetricsCount, ms.Len()) + } + if test.configSet == testSetAll { + assert.Equal(t, allMetricsCount, ms.Len()) + } + validatedMetrics := make(map[string]bool) + for i := 0; i < ms.Len(); i++ { + switch ms.At(i).Name() { + {{- range $name, $metric := .Metrics }} + case "{{ $name }}": + assert.False(t, validatedMetrics["{{ $name }}"], "Found a duplicate in the metrics slice: {{ $name }}") + validatedMetrics["{{ $name }}"] = true + assert.Equal(t, pmetric.MetricType{{ $metric.Data.Type }}, ms.At(i).Type()) + assert.Equal(t, 1, ms.At(i).{{ $metric.Data.Type }}().DataPoints().Len()) + assert.Equal(t, "{{ $metric.Description }}", ms.At(i).Description()) + assert.Equal(t, "{{ $metric.Unit }}", ms.At(i).Unit()) + {{- if $metric.Data.HasMonotonic }} + assert.Equal(t, {{ $metric.Data.Monotonic }}, ms.At(i).{{ $metric.Data.Type }}().IsMonotonic()) + {{- end }} + {{- if $metric.Data.HasAggregated }} + assert.Equal(t, pmetric.AggregationTemporality{{ $metric.Data.AggregationTemporality }}, ms.At(i).{{ $metric.Data.Type }}().AggregationTemporality()) + {{- end }} + dp := ms.At(i).{{ $metric.Data.Type }}().DataPoints().At(0) + assert.Equal(t, start, dp.StartTimestamp()) + assert.Equal(t, ts, dp.Timestamp()) + assert.Equal(t, pmetric.NumberDataPointValueType{{ $metric.Data.MetricValueType }}, dp.ValueType()) + assert.Equal(t, {{ $metric.Data.MetricValueType.BasicType }}(1), dp.{{ $metric.Data.MetricValueType }}Value()) + + {{- range $i, $attr := $metric.Attributes }} + attrVal, ok {{ if eq $i 0 }}:{{ end }}= dp.Attributes().Get("{{ (attributeInfo $attr).Name }}") + assert.True(t, ok) + assert.EqualValues(t, {{ (attributeInfo $attr).TestValue }}, attrVal.{{ (attributeInfo $attr).Type }}() + {{- if or (eq (attributeInfo $attr).Type.String "Slice") (eq (attributeInfo $attr).Type.String "Map")}}.AsRaw(){{ end }}) + {{- end }} + {{- end }} + } + } + }) + } +} diff --git a/cmd/mdatagen/templates/readme.md.tmpl b/cmd/mdatagen/templates/readme.md.tmpl new file mode 100644 index 00000000000..ad41f11dd42 --- /dev/null +++ b/cmd/mdatagen/templates/readme.md.tmpl @@ -0,0 +1,55 @@ + +{{- if len .Status.Stability }} +| Status | | +| ------------- |-----------| +{{- $class := .Status.Class }} +{{- $shortName := .ShortFolderName }} +{{- if ne $class "connector" }} +{{- $idx := 0 }} +{{- range $stability, $value := .Status.Stability }} +| {{ if not $idx }}Stability{{ else }} {{ end }} | [{{ $stability }}]{{ if ne $class "extension" }}: {{ stringsJoin $value ", " }} {{ end }} | +{{- $idx = inc $idx }} +{{- end }} +{{- end}} +{{- if and (ne $class "cmd") (ne $class "pkg") }} +| Distributions | [{{ stringsJoin .Status.SortedDistributions "], [" }}] | +{{- end }} +{{- if .Status.Warnings }} +| Warnings | [{{ stringsJoin .Status.Warnings ", " }}](#warnings) | +{{- end }} +{{- if ne $class "" }} +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3A{{ $class }}%2F{{ $shortName }}%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3A{{ $class }}%2F{{ $shortName }}) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3A{{ $class }}%2F{{ $shortName }}%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3A{{ $class }}%2F{{ $shortName }}) | +{{- end }} +{{- if .Status.Codeowners }} +{{- $codeowners := userLinks .Status.Codeowners.Active }} +{{- $emeritus := userLinks .Status.Codeowners.Emeritus }} +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | {{ stringsJoin $codeowners ", " }} {{ if .Status.Codeowners.SeekingNew }}\| Seeking more code owners! {{ end }}| +{{- if $emeritus }} +| Emeritus | {{ stringsJoin $emeritus ", " }} | +{{- end }} +{{- end }} +{{range $stability, $val := .Status.Stability}} +[{{ $stability }}]: https://github.com/open-telemetry/opentelemetry-collector#{{ $stability }} +{{- end }} +{{- range .Status.SortedDistributions }} +[{{.}}]: {{ distroURL . }} +{{- end }} +{{- if eq $class "connector"}} + +## Supported Pipeline Types + +| [Exporter Pipeline Type] | [Receiver Pipeline Type] | [Stability Level] | +| ------------------------ | ------------------------ | ----------------- | +{{- range $stability, $pipelines := .Status.Stability }} +{{- range $pipeline := $pipelines }} +{{- $parts := stringsSplit $pipeline "_to_" }} +| {{index $parts 0}} | {{index $parts 1}} | [{{$stability}}] | +{{- end }} +{{- end }} + +[Exporter Pipeline Type]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/connector/README.md#exporter-pipeline-type +[Receiver Pipeline Type]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/connector/README.md#receiver-pipeline-type +[Stability Level]: https://github.com/open-telemetry/opentelemetry-collector#stability-levels +{{- end }} +{{- end }} + \ No newline at end of file diff --git a/cmd/mdatagen/templates/resource.go.tmpl b/cmd/mdatagen/templates/resource.go.tmpl new file mode 100644 index 00000000000..aa6b8e8b685 --- /dev/null +++ b/cmd/mdatagen/templates/resource.go.tmpl @@ -0,0 +1,51 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package {{ .Package }} + +import ( + "go.opentelemetry.io/collector/pdata/pcommon" +) + +// ResourceBuilder is a helper struct to build resources predefined in metadata.yaml. +// The ResourceBuilder is not thread-safe and must not to be used in multiple goroutines. +type ResourceBuilder struct { + config ResourceAttributesConfig + res pcommon.Resource +} + +// NewResourceBuilder creates a new ResourceBuilder. This method should be called on the start of the application. +func NewResourceBuilder(rac ResourceAttributesConfig) *ResourceBuilder { + return &ResourceBuilder{ + config: rac, + res: pcommon.NewResource(), + } +} + +{{- range $name, $attr := .ResourceAttributes }} +{{- range $attr.Enum }} +// Set{{ $name.Render }}{{ . | publicVar }} sets "{{ $name }}={{ . }}" attribute. +func (rb *ResourceBuilder) Set{{ $name.Render }}{{ . | publicVar }}() { + if rb.config.{{ $name.Render }}.Enabled { + rb.res.Attributes().PutStr("{{ $name }}", "{{ . }}") + } +} +{{- else }} +// Set{{ $name.Render }} sets provided value as "{{ $name }}" attribute. +func (rb *ResourceBuilder) Set{{ $name.Render }}(val {{ $attr.Type.Primitive }}) { + if rb.config.{{ $name.Render }}.Enabled { + {{- if or (eq $attr.Type.String "Bytes") (eq $attr.Type.String "Slice") (eq $attr.Type.String "Map") }} + rb.res.Attributes().PutEmpty{{ $attr.Type }}("{{ $name }}").FromRaw(val) + {{- else }} + rb.res.Attributes().Put{{ $attr.Type }}("{{ $name }}", val) + {{- end }} + } +} +{{- end }} +{{ end }} + +// Emit returns the built resource and resets the internal builder state. +func (rb *ResourceBuilder) Emit() pcommon.Resource { + r := rb.res + rb.res = pcommon.NewResource() + return r +} diff --git a/cmd/mdatagen/templates/resource_test.go.tmpl b/cmd/mdatagen/templates/resource_test.go.tmpl new file mode 100644 index 00000000000..7c1422e3d3b --- /dev/null +++ b/cmd/mdatagen/templates/resource_test.go.tmpl @@ -0,0 +1,65 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package {{ .Package }} + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +{{- $enabledAttrCount := 0 }} +{{- range $_, $attr := .ResourceAttributes }} +{{- if $attr.Enabled }} +{{- $enabledAttrCount = inc $enabledAttrCount }} +{{- end }} +{{- end }} + +func TestResourceBuilder(t *testing.T) { + for _, test := range []string{"default", "all_set", "none_set"} { + t.Run(test, func(t *testing.T) { + cfg := loadResourceAttributesConfig(t, test) + rb := NewResourceBuilder(cfg) + {{- range $name, $attr := .ResourceAttributes }} + {{- if $attr.Enum }} + rb.Set{{ $name.Render }}{{ index $attr.Enum 0 | publicVar }}() + {{- else }} + rb.Set{{ $name.Render }}({{ $attr.TestValue }}) + {{- end }} + {{- end }} + + res := rb.Emit() + assert.Equal(t, 0, rb.Emit().Attributes().Len()) // Second call should return empty Resource + + switch test { + case "default": + assert.Equal(t, {{ $enabledAttrCount }}, res.Attributes().Len()) + case "all_set": + assert.Equal(t, {{ len .ResourceAttributes }}, res.Attributes().Len()) + case "none_set": + assert.Equal(t, 0, res.Attributes().Len()) + return + default: + assert.Failf(t, "unexpected test case: %s", test) + } + + {{ $assignSign := ":=" }} + {{- range $name, $attr := .ResourceAttributes }} + val, ok {{ $assignSign }} res.Attributes().Get("{{ $name }}") + {{- if $attr.Enabled }} + assert.True(t, ok) + {{- else }} + assert.Equal(t, test == "all_set", ok) + {{- end }} + if ok { + assert.EqualValues(t, {{ $attr.TestValue }}, val.{{ $attr.Type }}() + {{- if or (eq $attr.Type.String "Bytes") (eq $attr.Type.String "Slice") (eq $attr.Type.String "Map") -}} + .AsRaw() + {{- end -}} + ) + } + {{- $assignSign = "=" }} + {{- end }} + }) + } +} diff --git a/cmd/mdatagen/templates/status.go.tmpl b/cmd/mdatagen/templates/status.go.tmpl new file mode 100644 index 00000000000..d35cf76ff01 --- /dev/null +++ b/cmd/mdatagen/templates/status.go.tmpl @@ -0,0 +1,30 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package {{ .Package }} + +import ( + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +var ( + Type = component.MustNewType("{{ .Type }}") + scopeName = "{{ .ScopeName }}" +) + +const ( + {{- range $stability, $signals := .Status.Stability }} + {{- range $signal := $signals }} + {{ toCamelCase $signal }}Stability = component.StabilityLevel{{ casesTitle $stability }} + {{- end }} + {{- end }} +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter(scopeName) +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer(scopeName) +} diff --git a/cmd/mdatagen/templates/testdata/config.yaml.tmpl b/cmd/mdatagen/templates/testdata/config.yaml.tmpl new file mode 100644 index 00000000000..8b32773ec45 --- /dev/null +++ b/cmd/mdatagen/templates/testdata/config.yaml.tmpl @@ -0,0 +1,31 @@ +default: +all_set: + {{- if .Metrics }} + metrics: + {{- range $name, $_ := .Metrics }} + {{ $name }}: + enabled: true + {{- end }} + {{- end }} + {{- if .ResourceAttributes }} + resource_attributes: + {{- range $name, $_ := .ResourceAttributes }} + {{ $name }}: + enabled: true + {{- end }} + {{- end }} +none_set: + {{- if .Metrics }} + metrics: + {{- range $name, $_ := .Metrics }} + {{ $name }}: + enabled: false + {{- end }} + {{- end }} + {{- if .ResourceAttributes }} + resource_attributes: + {{- range $name, $_ := .ResourceAttributes }} + {{ $name }}: + enabled: false + {{- end }} + {{- end }} diff --git a/cmd/mdatagen/testdata/invalid.yaml b/cmd/mdatagen/testdata/invalid.yaml new file mode 100644 index 00000000000..e466dcbd8e8 --- /dev/null +++ b/cmd/mdatagen/testdata/invalid.yaml @@ -0,0 +1 @@ +invalid \ No newline at end of file diff --git a/cmd/mdatagen/testdata/invalid_aggregation.yaml b/cmd/mdatagen/testdata/invalid_aggregation.yaml new file mode 100644 index 00000000000..3165d1a7101 --- /dev/null +++ b/cmd/mdatagen/testdata/invalid_aggregation.yaml @@ -0,0 +1,22 @@ +type: metricreceiver + +status: + class: receiver + stability: + development: [logs] + beta: [traces] + stable: [metrics] + distributions: [contrib] + warnings: + - Any additional information that should be brought to the consumer's attention + +metrics: + default.metric: + enabled: true + description: Monotonic cumulative sum int metric enabled by default. + extended_documentation: The metric will be become optional soon. + unit: s + sum: + value_type: int + monotonic: true + aggregation_temporality: invalidaggregation diff --git a/cmd/mdatagen/testdata/invalid_class.yaml b/cmd/mdatagen/testdata/invalid_class.yaml new file mode 100644 index 00000000000..6fcd9b9d7e7 --- /dev/null +++ b/cmd/mdatagen/testdata/invalid_class.yaml @@ -0,0 +1,8 @@ +type: test + +status: + class: incorrectclass + stability: + development: [logs] + beta: [traces] + stable: [metrics] \ No newline at end of file diff --git a/cmd/mdatagen/testdata/invalid_input_type.yaml b/cmd/mdatagen/testdata/invalid_input_type.yaml new file mode 100644 index 00000000000..9e28b42120d --- /dev/null +++ b/cmd/mdatagen/testdata/invalid_input_type.yaml @@ -0,0 +1,20 @@ +type: metricreceiver + +status: + class: receiver + stability: + development: [logs] + beta: [traces] + stable: [metrics] + +metrics: + system.cpu.time: + enabled: true + description: Total CPU seconds broken down by different states. + unit: s + sum: + value_type: double + monotonic: true + aggregation_temporality: cumulative + input_type: double + attributes: diff --git a/cmd/mdatagen/testdata/invalid_stability.yaml b/cmd/mdatagen/testdata/invalid_stability.yaml new file mode 100644 index 00000000000..259aade2445 --- /dev/null +++ b/cmd/mdatagen/testdata/invalid_stability.yaml @@ -0,0 +1,7 @@ +type: file +status: + class: receiver + stability: + incorrectstability: [logs] + beta: [traces] + stable: [metrics] \ No newline at end of file diff --git a/cmd/mdatagen/testdata/invalid_stability_component.yaml b/cmd/mdatagen/testdata/invalid_stability_component.yaml new file mode 100644 index 00000000000..5aa538865fa --- /dev/null +++ b/cmd/mdatagen/testdata/invalid_stability_component.yaml @@ -0,0 +1,7 @@ +type: file +status: + class: receiver + stability: + development: [incorrectcomponent] + beta: [traces] + stable: [metrics] \ No newline at end of file diff --git a/cmd/mdatagen/testdata/invalid_type_attr.yaml b/cmd/mdatagen/testdata/invalid_type_attr.yaml new file mode 100644 index 00000000000..ed951be6d6d --- /dev/null +++ b/cmd/mdatagen/testdata/invalid_type_attr.yaml @@ -0,0 +1,24 @@ +type: metricreceiver + +sem_conv_version: 1.9.0 + +status: + class: receiver + stability: + development: [logs] + beta: [traces] + stable: [metrics] + +attributes: + used_attr: + description: Used attribute. + type: invalidtype + +metrics: + metric: + enabled: true + description: Metric. + unit: 1 + gauge: + value_type: double + attributes: [used_attr] diff --git a/cmd/mdatagen/testdata/invalid_type_rattr.yaml b/cmd/mdatagen/testdata/invalid_type_rattr.yaml new file mode 100644 index 00000000000..90e9c33dae3 --- /dev/null +++ b/cmd/mdatagen/testdata/invalid_type_rattr.yaml @@ -0,0 +1,19 @@ +type: file + +sem_conv_version: 1.9.0 + +status: + class: receiver + stability: + development: [logs] + beta: [traces] + stable: [metrics] + distributions: [contrib] + warnings: + - Any additional information that should be brought to the consumer's attention + +resource_attributes: + string.resource.attr: + description: Resource attribute with any string value. + type: invalidtype + enabled: true diff --git a/cmd/mdatagen/testdata/metrics_and_type.yaml b/cmd/mdatagen/testdata/metrics_and_type.yaml new file mode 100644 index 00000000000..81d66bde9c1 --- /dev/null +++ b/cmd/mdatagen/testdata/metrics_and_type.yaml @@ -0,0 +1,19 @@ +type: metricreceiver + +status: + class: receiver + stability: + development: [logs] + beta: [traces] + stable: [metrics] + distributions: [contrib] + warnings: + - Any additional information that should be brought to the consumer's attention + +metrics: + metric: + enabled: true + description: Description. + unit: s + gauge: + value_type: double diff --git a/cmd/mdatagen/testdata/no_aggregation.yaml b/cmd/mdatagen/testdata/no_aggregation.yaml new file mode 100644 index 00000000000..02c14b6b1e7 --- /dev/null +++ b/cmd/mdatagen/testdata/no_aggregation.yaml @@ -0,0 +1,22 @@ +type: file + +status: + class: receiver + stability: + development: [logs] + beta: [traces] + stable: [metrics] + distributions: [contrib] + warnings: + - Any additional information that should be brought to the consumer's attention + + +metrics: + default.metric: + enabled: true + description: Monotonic cumulative sum int metric enabled by default. + extended_documentation: The metric will be become optional soon. + unit: s + sum: + value_type: int + monotonic: false \ No newline at end of file diff --git a/cmd/mdatagen/testdata/no_class.yaml b/cmd/mdatagen/testdata/no_class.yaml new file mode 100644 index 00000000000..8d33f9c019a --- /dev/null +++ b/cmd/mdatagen/testdata/no_class.yaml @@ -0,0 +1,7 @@ +type: test + +status: + stability: + development: [logs] + beta: [traces] + stable: [metrics] \ No newline at end of file diff --git a/cmd/mdatagen/testdata/no_description_attr.yaml b/cmd/mdatagen/testdata/no_description_attr.yaml new file mode 100644 index 00000000000..1942f74e111 --- /dev/null +++ b/cmd/mdatagen/testdata/no_description_attr.yaml @@ -0,0 +1,33 @@ +# Sample metric metadata file with all available configurations. + +type: file + +sem_conv_version: 1.9.0 + +status: + class: receiver + stability: + development: [logs] + beta: [traces] + stable: [metrics] + distributions: [contrib] + warnings: + - Any additional information that should be brought to the consumer's attention + +attributes: + string_attr: + type: string + +metrics: + default.metric: + enabled: true + description: Monotonic cumulative sum int metric enabled by default. + extended_documentation: The metric will be become optional soon. + unit: s + sum: + value_type: int + monotonic: true + aggregation_temporality: cumulative + attributes: [string_attr] + warnings: + if_enabled_not_set: This metric will be disabled by default soon. diff --git a/cmd/mdatagen/testdata/no_description_rattr.yaml b/cmd/mdatagen/testdata/no_description_rattr.yaml new file mode 100644 index 00000000000..d489eaa7cb6 --- /dev/null +++ b/cmd/mdatagen/testdata/no_description_rattr.yaml @@ -0,0 +1,12 @@ +type: file +status: + class: receiver + stability: + development: [logs] + beta: [traces] + stable: [metrics] + +resource_attributes: + string.resource.attr: + type: string + enabled: true diff --git a/cmd/mdatagen/testdata/no_enabled.yaml b/cmd/mdatagen/testdata/no_enabled.yaml new file mode 100644 index 00000000000..ab1dfafed32 --- /dev/null +++ b/cmd/mdatagen/testdata/no_enabled.yaml @@ -0,0 +1,18 @@ +type: metricreceiver + +status: + class: receiver + stability: + development: [logs] + beta: [traces] + stable: [metrics] + +metrics: + system.cpu.time: + description: Total CPU seconds broken down by different states. + unit: s + sum: + value_type: double + monotonic: true + aggregation_temporality: cumulative + attributes: diff --git a/cmd/mdatagen/testdata/no_metric_description.yaml b/cmd/mdatagen/testdata/no_metric_description.yaml new file mode 100644 index 00000000000..de9cbd42087 --- /dev/null +++ b/cmd/mdatagen/testdata/no_metric_description.yaml @@ -0,0 +1,22 @@ +type: file + +status: + class: receiver + stability: + development: [logs] + beta: [traces] + stable: [metrics] + distributions: [contrib] + warnings: + - Any additional information that should be brought to the consumer's attention + + +metrics: + default.metric: + enabled: true + extended_documentation: The metric will be become optional soon. + unit: s + sum: + value_type: int + monotonic: true + aggregation_temporality: cumulative diff --git a/cmd/mdatagen/testdata/no_metric_type.yaml b/cmd/mdatagen/testdata/no_metric_type.yaml new file mode 100644 index 00000000000..1f0e0283f2a --- /dev/null +++ b/cmd/mdatagen/testdata/no_metric_type.yaml @@ -0,0 +1,13 @@ +type: metricreceiver +status: + class: receiver + stability: + development: [logs] + beta: [traces] + stable: [metrics] +metrics: + system.cpu.time: + enabled: true + description: Total CPU seconds broken down by different states. + unit: s + attributes: diff --git a/cmd/mdatagen/testdata/no_metric_unit.yaml b/cmd/mdatagen/testdata/no_metric_unit.yaml new file mode 100644 index 00000000000..cc5c49a7c9a --- /dev/null +++ b/cmd/mdatagen/testdata/no_metric_unit.yaml @@ -0,0 +1,22 @@ +type: file + +status: + class: receiver + stability: + development: [logs] + beta: [traces] + stable: [metrics] + distributions: [contrib] + warnings: + - Any additional information that should be brought to the consumer's attention + + +metrics: + default.metric: + enabled: true + description: Monotonic cumulative sum int metric enabled by default. + extended_documentation: The metric will be become optional soon. + sum: + value_type: int + monotonic: true + aggregation_temporality: cumulative diff --git a/cmd/mdatagen/testdata/no_monotonic.yaml b/cmd/mdatagen/testdata/no_monotonic.yaml new file mode 100644 index 00000000000..2f99cecab58 --- /dev/null +++ b/cmd/mdatagen/testdata/no_monotonic.yaml @@ -0,0 +1,22 @@ +type: file + +status: + class: receiver + stability: + development: [logs] + beta: [traces] + stable: [metrics] + distributions: [contrib] + warnings: + - Any additional information that should be brought to the consumer's attention + + +metrics: + default.metric: + enabled: true + description: Monotonic cumulative sum int metric enabled by default. + extended_documentation: The metric will be become optional soon. + unit: s + sum: + value_type: int + aggregation_temporality: cumulative diff --git a/cmd/mdatagen/testdata/no_stability.yaml b/cmd/mdatagen/testdata/no_stability.yaml new file mode 100644 index 00000000000..29b00be6ffa --- /dev/null +++ b/cmd/mdatagen/testdata/no_stability.yaml @@ -0,0 +1,4 @@ +type: test + +status: + class: receiver \ No newline at end of file diff --git a/cmd/mdatagen/testdata/no_stability_component.yaml b/cmd/mdatagen/testdata/no_stability_component.yaml new file mode 100644 index 00000000000..9c0631e8bec --- /dev/null +++ b/cmd/mdatagen/testdata/no_stability_component.yaml @@ -0,0 +1,6 @@ +type: file +status: + class: receiver + stability: + beta: + stable: [metrics] \ No newline at end of file diff --git a/cmd/mdatagen/testdata/no_status.yaml b/cmd/mdatagen/testdata/no_status.yaml new file mode 100644 index 00000000000..75db25c3b05 --- /dev/null +++ b/cmd/mdatagen/testdata/no_status.yaml @@ -0,0 +1 @@ +type: test \ No newline at end of file diff --git a/cmd/mdatagen/testdata/no_type.yaml b/cmd/mdatagen/testdata/no_type.yaml new file mode 100644 index 00000000000..72d92e5dee8 --- /dev/null +++ b/cmd/mdatagen/testdata/no_type.yaml @@ -0,0 +1,6 @@ +status: + class: receiver + stability: + development: [logs] + beta: [traces] + stable: [metrics] \ No newline at end of file diff --git a/cmd/mdatagen/testdata/no_type_attr.yaml b/cmd/mdatagen/testdata/no_type_attr.yaml new file mode 100644 index 00000000000..914a9820bda --- /dev/null +++ b/cmd/mdatagen/testdata/no_type_attr.yaml @@ -0,0 +1,23 @@ +type: metricreceiver + +sem_conv_version: 1.9.0 + +status: + class: receiver + stability: + development: [logs] + beta: [traces] + stable: [metrics] + +attributes: + used_attr: + description: Used attribute. + +metrics: + metric: + enabled: true + description: Metric. + unit: 1 + gauge: + value_type: double + attributes: [used_attr] diff --git a/cmd/mdatagen/testdata/no_type_rattr.yaml b/cmd/mdatagen/testdata/no_type_rattr.yaml new file mode 100644 index 00000000000..e6961b1801e --- /dev/null +++ b/cmd/mdatagen/testdata/no_type_rattr.yaml @@ -0,0 +1,18 @@ +type: file + +sem_conv_version: 1.9.0 + +status: + class: receiver + stability: + development: [logs] + beta: [traces] + stable: [metrics] + distributions: [contrib] + warnings: + - Any additional information that should be brought to the consumer's attention + +resource_attributes: + string.resource.attr: + description: Resource attribute with any string value. + enabled: true \ No newline at end of file diff --git a/cmd/mdatagen/testdata/no_value_type.yaml b/cmd/mdatagen/testdata/no_value_type.yaml new file mode 100644 index 00000000000..046f457b510 --- /dev/null +++ b/cmd/mdatagen/testdata/no_value_type.yaml @@ -0,0 +1,22 @@ +type: metricreceiver + +status: + class: receiver + stability: + development: [logs] + beta: [traces] + stable: [metrics] + distributions: [contrib] + warnings: + - Any additional information that should be brought to the consumer's attention + + +metrics: + system.cpu.time: + enabled: true + description: Total CPU seconds broken down by different states. + unit: s + sum: + monotonic: true + aggregation_temporality: cumulative + attributes: diff --git a/cmd/mdatagen/testdata/parent.yaml b/cmd/mdatagen/testdata/parent.yaml new file mode 100644 index 00000000000..1f8fc15ba17 --- /dev/null +++ b/cmd/mdatagen/testdata/parent.yaml @@ -0,0 +1,3 @@ +type: subcomponent + +parent: parentComponent \ No newline at end of file diff --git a/cmd/mdatagen/testdata/readme_with_cmd_class.md b/cmd/mdatagen/testdata/readme_with_cmd_class.md new file mode 100644 index 00000000000..71a8ad7598c --- /dev/null +++ b/cmd/mdatagen/testdata/readme_with_cmd_class.md @@ -0,0 +1,14 @@ +# Some component + + +| Status | | +| ------------- |-----------| +| Stability | [alpha]: logs | +| | [beta]: metrics | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Acmd%2Ffoo%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Acmd%2Ffoo) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Acmd%2Ffoo%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Acmd%2Ffoo) | + +[alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta + + +Some info about a component diff --git a/cmd/mdatagen/testdata/readme_with_multiple_signals.md b/cmd/mdatagen/testdata/readme_with_multiple_signals.md new file mode 100644 index 00000000000..8de1ed6221a --- /dev/null +++ b/cmd/mdatagen/testdata/readme_with_multiple_signals.md @@ -0,0 +1,15 @@ +# Some component + + +| Status | | +| ------------- |-----------| +| Stability | [alpha]: logs | +| | [beta]: metrics | +| Distributions | [contrib] | + +[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 + + +Some info about a component diff --git a/cmd/mdatagen/testdata/readme_with_status.md b/cmd/mdatagen/testdata/readme_with_status.md new file mode 100644 index 00000000000..92e0b1f4258 --- /dev/null +++ b/cmd/mdatagen/testdata/readme_with_status.md @@ -0,0 +1,14 @@ +# Some component + + +| Status | | +| ------------- |-----------| +| Stability | [beta]: metrics | +| Distributions | [contrib] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Areceiver%2Ffoo%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Areceiver%2Ffoo) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Areceiver%2Ffoo%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Areceiver%2Ffoo) | + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib + + +Some info about a component diff --git a/cmd/mdatagen/testdata/readme_with_status_codeowners.md b/cmd/mdatagen/testdata/readme_with_status_codeowners.md new file mode 100644 index 00000000000..f350b593360 --- /dev/null +++ b/cmd/mdatagen/testdata/readme_with_status_codeowners.md @@ -0,0 +1,15 @@ +# Some component + + +| Status | | +| ------------- |-----------| +| Stability | [beta]: metrics | +| Distributions | [contrib] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Areceiver%2Ffoo%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Areceiver%2Ffoo) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Areceiver%2Ffoo%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Areceiver%2Ffoo) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@foo](https://www.github.com/foo) | + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib + + +Some info about a component diff --git a/cmd/mdatagen/testdata/readme_with_status_codeowners_and_emeritus.md b/cmd/mdatagen/testdata/readme_with_status_codeowners_and_emeritus.md new file mode 100644 index 00000000000..203de2f3dd0 --- /dev/null +++ b/cmd/mdatagen/testdata/readme_with_status_codeowners_and_emeritus.md @@ -0,0 +1,16 @@ +# Some component + + +| Status | | +| ------------- |-----------| +| Stability | [beta]: metrics | +| Distributions | [contrib] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Areceiver%2Ffoo%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Areceiver%2Ffoo) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Areceiver%2Ffoo%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Areceiver%2Ffoo) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@foo](https://www.github.com/foo) | +| Emeritus | [@bar](https://www.github.com/bar) | + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib + + +Some info about a component diff --git a/cmd/mdatagen/testdata/readme_with_status_codeowners_and_seeking_new.md b/cmd/mdatagen/testdata/readme_with_status_codeowners_and_seeking_new.md new file mode 100644 index 00000000000..f396db459d4 --- /dev/null +++ b/cmd/mdatagen/testdata/readme_with_status_codeowners_and_seeking_new.md @@ -0,0 +1,15 @@ +# Some component + + +| Status | | +| ------------- |-----------| +| Stability | [beta]: metrics | +| Distributions | [contrib] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Areceiver%2Ffoo%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Areceiver%2Ffoo) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Areceiver%2Ffoo%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Areceiver%2Ffoo) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@foo](https://www.github.com/foo) \| Seeking more code owners! | + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib + + +Some info about a component diff --git a/cmd/mdatagen/testdata/readme_with_status_extension.md b/cmd/mdatagen/testdata/readme_with_status_extension.md new file mode 100644 index 00000000000..1c454afe9a9 --- /dev/null +++ b/cmd/mdatagen/testdata/readme_with_status_extension.md @@ -0,0 +1,14 @@ +# Some component + + +| Status | | +| ------------- |-----------| +| Stability | [beta] | +| Distributions | [contrib] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Ffoo%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Ffoo) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Ffoo%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Ffoo) | + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib + + +Some info about a component diff --git a/cmd/mdatagen/testdata/readme_with_warnings.md b/cmd/mdatagen/testdata/readme_with_warnings.md new file mode 100644 index 00000000000..6cf1afa3866 --- /dev/null +++ b/cmd/mdatagen/testdata/readme_with_warnings.md @@ -0,0 +1,16 @@ +# Some component + + +| Status | | +| ------------- |-----------| +| Stability | [beta]: metrics | +| Distributions | [contrib] | +| Warnings | [warning1](#warnings) | + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib + + +Some info about a component +### warnings +Some warning there. diff --git a/cmd/mdatagen/testdata/readme_without_status.md b/cmd/mdatagen/testdata/readme_without_status.md new file mode 100644 index 00000000000..be610f8c087 --- /dev/null +++ b/cmd/mdatagen/testdata/readme_without_status.md @@ -0,0 +1,3 @@ +# Some component + +Some info about a component diff --git a/cmd/mdatagen/testdata/resource_attributes_only.yaml b/cmd/mdatagen/testdata/resource_attributes_only.yaml new file mode 100644 index 00000000000..05e031bcf45 --- /dev/null +++ b/cmd/mdatagen/testdata/resource_attributes_only.yaml @@ -0,0 +1,17 @@ +type: test + +status: + class: receiver + stability: + development: [logs] + beta: [traces] + stable: [metrics] + distributions: [contrib] + warnings: + - Any additional information that should be brought to the consumer's attention + +resource_attributes: + res.attr1: + description: Resource attribute 1. + type: string + enabled: true diff --git a/cmd/mdatagen/testdata/status_only.yaml b/cmd/mdatagen/testdata/status_only.yaml new file mode 100644 index 00000000000..2365b43f1d9 --- /dev/null +++ b/cmd/mdatagen/testdata/status_only.yaml @@ -0,0 +1,6 @@ +type: metricreceiver +status: + class: exporter + stability: + beta: [traces, metrics, logs] + distributions: [contrib] diff --git a/cmd/mdatagen/testdata/two_metric_types.yaml b/cmd/mdatagen/testdata/two_metric_types.yaml new file mode 100644 index 00000000000..572eab2f3bc --- /dev/null +++ b/cmd/mdatagen/testdata/two_metric_types.yaml @@ -0,0 +1,21 @@ +type: metricreceiver + +status: + class: receiver + stability: + development: [logs] + beta: [traces] + stable: [metrics] + +metrics: + system.cpu.time: + enabled: true + description: Total CPU seconds broken down by different states. + unit: s + gauge: + value_type: double + sum: + value_type: double + monotonic: true + aggregation_temporality: cumulative + attributes: diff --git a/cmd/mdatagen/testdata/unknown_metric_attribute.yaml b/cmd/mdatagen/testdata/unknown_metric_attribute.yaml new file mode 100644 index 00000000000..d86b5afe401 --- /dev/null +++ b/cmd/mdatagen/testdata/unknown_metric_attribute.yaml @@ -0,0 +1,19 @@ +type: metricreceiver + +status: + class: receiver + stability: + development: [logs] + beta: [traces] + stable: [metrics] + +metrics: + system.cpu.time: + enabled: true + description: Total CPU seconds broken down by different states. + unit: s + sum: + value_type: double + monotonic: true + aggregation_temporality: cumulative + attributes: [missing] diff --git a/cmd/mdatagen/testdata/unknown_value_type.yaml b/cmd/mdatagen/testdata/unknown_value_type.yaml new file mode 100644 index 00000000000..1a4890045d8 --- /dev/null +++ b/cmd/mdatagen/testdata/unknown_value_type.yaml @@ -0,0 +1,18 @@ +type: metricreceiver + +status: + class: receiver + stability: + development: [logs] + beta: [traces] + stable: [metrics] + +metrics: + system.cpu.time: + enabled: true + description: Total CPU seconds broken down by different states. + unit: s + sum: + value_type: unknown + monotonic: true + aggregation_temporality: cumulative diff --git a/cmd/mdatagen/testdata/unused_attribute.yaml b/cmd/mdatagen/testdata/unused_attribute.yaml new file mode 100644 index 00000000000..cc0eb08f767 --- /dev/null +++ b/cmd/mdatagen/testdata/unused_attribute.yaml @@ -0,0 +1,29 @@ +type: metricreceiver + +sem_conv_version: 1.9.0 + +status: + class: receiver + stability: + development: [logs] + beta: [traces] + stable: [metrics] + +attributes: + used_attr: + description: Used attribute. + type: string + + unused_attr: + name_override: state + description: Unused attribute. + type: string + +metrics: + metric: + enabled: true + description: Metric. + unit: 1 + gauge: + value_type: double + attributes: [used_attr] diff --git a/cmd/mdatagen/testdata/with_tests_connector.yaml b/cmd/mdatagen/testdata/with_tests_connector.yaml new file mode 100644 index 00000000000..ad05872698e --- /dev/null +++ b/cmd/mdatagen/testdata/with_tests_connector.yaml @@ -0,0 +1,9 @@ +type: foobar + +status: + class: connector + stability: + beta: [traces_to_metrics, traces_to_traces, traces_to_logs, metrics_to_logs, metrics_to_metrics, metrics_to_traces, logs_to_logs, logs_to_metrics, logs_to_traces] + +tests: + config: diff --git a/cmd/mdatagen/testdata/with_tests_exporter.yaml b/cmd/mdatagen/testdata/with_tests_exporter.yaml new file mode 100644 index 00000000000..e110f3d10e3 --- /dev/null +++ b/cmd/mdatagen/testdata/with_tests_exporter.yaml @@ -0,0 +1,9 @@ +type: metric + +status: + class: exporter + stability: + beta: [traces, logs, metrics] + +tests: + config: diff --git a/cmd/mdatagen/testdata/with_tests_extension.yaml b/cmd/mdatagen/testdata/with_tests_extension.yaml new file mode 100644 index 00000000000..08eb4d5cf29 --- /dev/null +++ b/cmd/mdatagen/testdata/with_tests_extension.yaml @@ -0,0 +1,9 @@ +type: metric + +status: + class: extension + stability: + beta: [extension] + +tests: + config: diff --git a/cmd/mdatagen/testdata/with_tests_processor.yaml b/cmd/mdatagen/testdata/with_tests_processor.yaml new file mode 100644 index 00000000000..fa6a2238f2c --- /dev/null +++ b/cmd/mdatagen/testdata/with_tests_processor.yaml @@ -0,0 +1,9 @@ +type: metric + +status: + class: processor + stability: + beta: [traces, logs, metrics] + +tests: + config: diff --git a/cmd/mdatagen/testdata/with_tests_receiver.yaml b/cmd/mdatagen/testdata/with_tests_receiver.yaml new file mode 100644 index 00000000000..e55c6190728 --- /dev/null +++ b/cmd/mdatagen/testdata/with_tests_receiver.yaml @@ -0,0 +1,9 @@ +type: metric + +status: + class: receiver + stability: + beta: [traces, logs, metrics] + +tests: + config: diff --git a/cmd/mdatagen/third_party/golint/LICENSE b/cmd/mdatagen/third_party/golint/LICENSE new file mode 100644 index 00000000000..65d761bc9f2 --- /dev/null +++ b/cmd/mdatagen/third_party/golint/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2013 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 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. diff --git a/cmd/mdatagen/third_party/golint/golint.go b/cmd/mdatagen/third_party/golint/golint.go new file mode 100644 index 00000000000..f4898aaebd5 --- /dev/null +++ b/cmd/mdatagen/third_party/golint/golint.go @@ -0,0 +1,51 @@ +// Copyright (c) 2013 The Go Authors. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd. + +package golint + +// See https://github.com/golang/lint/blob/d0100b6bd8b389f0385611eb39152c4d7c3a7905/lint.go#L771 + +// Acronyms is a list of known acronyms that should not be formatted when linting. +var Acronyms = map[string]bool{ + "ACL": true, + "API": true, + "ASCII": true, + "CPU": true, + "CSS": true, + "DNS": true, + "EOF": true, + "GUID": true, + "HTML": true, + "HTTP": true, + "HTTPS": true, + "ID": true, + "IP": true, + "JSON": true, + "LHS": true, + "QPS": true, + "RAM": true, + "RHS": true, + "RPC": true, + "SLA": true, + "SMTP": true, + "SQL": true, + "SSH": true, + "TCP": true, + "TLS": true, + "TTL": true, + "UDP": true, + "UI": true, + "UID": true, + "UUID": true, + "URI": true, + "URL": true, + "UTF8": true, + "VM": true, + "XML": true, + "XMPP": true, + "XSRF": true, + "XSS": true, +} diff --git a/cmd/mdatagen/validate.go b/cmd/mdatagen/validate.go new file mode 100644 index 00000000000..bc56375baf9 --- /dev/null +++ b/cmd/mdatagen/validate.go @@ -0,0 +1,205 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package main + +import ( + "errors" + "fmt" + "regexp" + + "go.uber.org/multierr" + + "go.opentelemetry.io/collector/pdata/pcommon" +) + +func (md *metadata) Validate() error { + var errs error + if err := md.validateType(); err != nil { + errs = multierr.Append(errs, err) + } + if err := md.validateStatus(); err != nil { + errs = multierr.Append(errs, err) + } + if err := md.validateResourceAttributes(); err != nil { + errs = multierr.Append(errs, err) + } + if err := md.validateMetrics(); err != nil { + errs = multierr.Append(errs, err) + } + return errs +} + +// typeRegexp is used to validate the type of a component. +// A type must start with an ASCII alphabetic character and +// can only contain ASCII alphanumeric characters and '_'. +// This must be kept in sync with the regex in component/config.go. +var typeRegexp = regexp.MustCompile(`^[a-zA-Z][0-9a-zA-Z_]*$`) + +func (md *metadata) validateType() error { + if md.Type == "" { + return errors.New("missing type") + } + + if !typeRegexp.MatchString(md.Type) { + return fmt.Errorf("invalid character(s) in type %q", md.Type) + } + return nil +} + +func (md *metadata) validateStatus() error { + if md.Parent != "" && md.Status == nil { + // status is not required for subcomponents. + return nil + } + + var errs error + if md.Status == nil { + return errors.New("missing status") + } + if err := md.Status.validateClass(); err != nil { + errs = multierr.Append(errs, err) + } + if md.Parent == "" { + if err := md.Status.validateStability(); err != nil { + errs = multierr.Append(errs, err) + } + } + return errs +} + +func (s *Status) validateClass() error { + if s.Class == "" { + return errors.New("missing class") + } + if s.Class != "receiver" && s.Class != "processor" && s.Class != "exporter" && s.Class != "connector" && s.Class != "extension" && s.Class != "cmd" && s.Class != "pkg" { + return fmt.Errorf("invalid class: %v", s.Class) + } + return nil +} + +func (s *Status) validateStability() error { + var errs error + if len(s.Stability) == 0 { + return errors.New("missing stability") + } + for stability, component := range s.Stability { + if stability != "development" && stability != "alpha" && stability != "beta" && stability != "stable" && stability != "deprecated" && stability != "unmaintained" { + errs = multierr.Append(errs, fmt.Errorf("invalid stability: %v", stability)) + } + if component == nil { + errs = multierr.Append(errs, fmt.Errorf("missing component for stability: %v", stability)) + } + for _, c := range component { + if c != "metrics" && + c != "traces" && + c != "logs" && + c != "traces_to_traces" && + c != "traces_to_metrics" && + c != "traces_to_logs" && + c != "metrics_to_traces" && + c != "metrics_to_metrics" && + c != "metrics_to_logs" && + c != "logs_to_traces" && + c != "logs_to_metrics" && + c != "logs_to_logs" && + c != "extension" { + errs = multierr.Append(errs, fmt.Errorf("invalid component: %v", c)) + } + } + } + return errs +} + +func (md *metadata) validateResourceAttributes() error { + var errs error + for name, attr := range md.ResourceAttributes { + if attr.Description == "" { + errs = multierr.Append(errs, fmt.Errorf("empty description for resource attribute: %v", name)) + } + empty := ValueType{ValueType: pcommon.ValueTypeEmpty} + if attr.Type == empty { + errs = multierr.Append(errs, fmt.Errorf("empty type for resource attribute: %v", name)) + } + } + return errs +} + +func (md *metadata) validateMetrics() error { + var errs error + usedAttrs := map[attributeName]bool{} + for mn, m := range md.Metrics { + if m.Sum == nil && m.Gauge == nil { + errs = multierr.Append(errs, fmt.Errorf("metric %v doesn't have a metric type key, "+ + "one of the following has to be specified: sum, gauge", mn)) + continue + } + if m.Sum != nil && m.Gauge != nil { + errs = multierr.Append(errs, fmt.Errorf("metric %v has more than one metric type keys, "+ + "only one of the following has to be specified: sum, gauge", mn)) + continue + } + if err := m.validate(); err != nil { + errs = multierr.Append(errs, fmt.Errorf(`metric "%v": %w`, mn, err)) + continue + } + unknownAttrs := make([]attributeName, 0, len(m.Attributes)) + for _, attr := range m.Attributes { + if _, ok := md.Attributes[attr]; ok { + usedAttrs[attr] = true + } else { + unknownAttrs = append(unknownAttrs, attr) + } + } + if len(unknownAttrs) > 0 { + errs = multierr.Append(errs, fmt.Errorf(`metric "%v" refers to undefined attributes: %v`, mn, unknownAttrs)) + } + } + errs = multierr.Append(errs, md.validateAttributes(usedAttrs)) + return errs +} + +func (m *metric) validate() error { + var errs error + if m.Description == "" { + errs = multierr.Append(errs, errors.New(`missing metric description`)) + } + if m.Unit == nil { + errs = multierr.Append(errs, errors.New(`missing metric unit`)) + } + if m.Sum != nil { + errs = multierr.Append(errs, m.Sum.Validate()) + } + if m.Gauge != nil { + errs = multierr.Append(errs, m.Gauge.Validate()) + } + return errs +} + +func (mit MetricInputType) Validate() error { + if mit.InputType != "" && mit.InputType != "string" { + return fmt.Errorf("invalid `input_type` value \"%v\", must be \"\" or \"string\"", mit.InputType) + } + return nil +} + +func (md *metadata) validateAttributes(usedAttrs map[attributeName]bool) error { + var errs error + unusedAttrs := make([]attributeName, 0, len(md.Attributes)) + for attrName, attr := range md.Attributes { + if attr.Description == "" { + errs = multierr.Append(errs, fmt.Errorf(`missing attribute description for: %v`, attrName)) + } + empty := ValueType{ValueType: pcommon.ValueTypeEmpty} + if attr.Type == empty { + errs = multierr.Append(errs, fmt.Errorf("empty type for attribute: %v", attrName)) + } + if !usedAttrs[attrName] { + unusedAttrs = append(unusedAttrs, attrName) + } + } + if len(unusedAttrs) > 0 { + errs = multierr.Append(errs, fmt.Errorf("unused attributes: %v", unusedAttrs)) + } + return errs +} diff --git a/cmd/mdatagen/validate_test.go b/cmd/mdatagen/validate_test.go new file mode 100644 index 00000000000..4c2ddea5741 --- /dev/null +++ b/cmd/mdatagen/validate_test.go @@ -0,0 +1,153 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package main + +import ( + "fmt" + "io/fs" + "path/filepath" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestValidate(t *testing.T) { + tests := []struct { + name string + wantErr string + }{ + { + name: "testdata/no_type.yaml", + wantErr: "missing type", + }, + { + name: "testdata/no_status.yaml", + wantErr: "missing status", + }, + { + name: "testdata/no_class.yaml", + wantErr: "missing class", + }, + { + name: "testdata/invalid_class.yaml", + wantErr: "invalid class: incorrectclass", + }, + { + name: "testdata/no_stability.yaml", + wantErr: "missing stability", + }, + { + name: "testdata/invalid_stability.yaml", + wantErr: "invalid stability: incorrectstability", + }, + { + name: "testdata/no_stability_component.yaml", + wantErr: "missing component for stability: beta", + }, + { + name: "testdata/invalid_stability_component.yaml", + wantErr: "invalid component: incorrectcomponent", + }, + { + name: "testdata/no_description_rattr.yaml", + wantErr: "empty description for resource attribute: string.resource.attr", + }, + { + name: "testdata/no_type_rattr.yaml", + wantErr: "empty type for resource attribute: string.resource.attr", + }, + { + name: "testdata/no_metric_description.yaml", + wantErr: "metric \"default.metric\": missing metric description", + }, + { + name: "testdata/no_metric_unit.yaml", + wantErr: "metric \"default.metric\": missing metric unit", + }, + { + name: "testdata/no_metric_type.yaml", + wantErr: "metric system.cpu.time doesn't have a metric type key, " + + "one of the following has to be specified: sum, gauge", + }, + { + name: "testdata/two_metric_types.yaml", + wantErr: "metric system.cpu.time has more than one metric type keys, " + + "only one of the following has to be specified: sum, gauge", + }, + { + name: "testdata/invalid_input_type.yaml", + wantErr: "metric \"system.cpu.time\": invalid `input_type` value \"double\", must be \"\" or \"string\"", + }, + { + name: "testdata/unknown_metric_attribute.yaml", + wantErr: "metric \"system.cpu.time\" refers to undefined attributes: [missing]", + }, + { + name: "testdata/unused_attribute.yaml", + wantErr: "unused attributes: [unused_attr]", + }, + { + name: "testdata/no_description_attr.yaml", + wantErr: "missing attribute description for: string_attr", + }, + { + name: "testdata/no_type_attr.yaml", + wantErr: "empty type for attribute: used_attr", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + _, err := loadMetadata(tt.name) + require.Error(t, err) + require.EqualError(t, err, tt.wantErr) + }) + } +} + +func TestValidateMetricDuplicates(t *testing.T) { + allowedMetrics := map[string][]string{ + "container.cpu.utilization": {"docker_stats", "kubeletstats"}, + "container.memory.rss": {"docker_stats", "kubeletstats"}, + "container.uptime": {"docker_stats", "kubeletstats"}, + } + allMetrics := map[string][]string{} + err := filepath.Walk("../../receiver", func(path string, info fs.FileInfo, _ error) error { + if info.Name() == "metadata.yaml" { + md, err := loadMetadata(path) + require.NoError(t, err) + if len(md.Metrics) > 0 { + for metricName := range md.Metrics { + allMetrics[md.Type] = append(allMetrics[md.Type], string(metricName)) + } + } + } + return nil + }) + require.NoError(t, err) + + seen := make(map[string]string) + for receiver, metrics := range allMetrics { + for _, metricName := range metrics { + if val, exists := seen[metricName]; exists { + receivers, allowed := allowedMetrics[metricName] + assert.True( + t, + allowed && contains(receiver, receivers) && contains(val, receivers), + fmt.Sprintf("Duplicate metric %v in receivers %v and %v. Please validate that this is intentional by adding the metric name and receiver types in the allowedMetrics map in this test\n", metricName, receiver, val), + ) + } + seen[metricName] = receiver + } + } +} + +func contains(r string, rs []string) bool { + for _, s := range rs { + if s == r { + return true + } + } + return false +} diff --git a/cmd/otelcorecol/builder-config.yaml b/cmd/otelcorecol/builder-config.yaml index ea0005bf285..d528d09964d 100644 --- a/cmd/otelcorecol/builder-config.yaml +++ b/cmd/otelcorecol/builder-config.yaml @@ -2,24 +2,25 @@ dist: module: go.opentelemetry.io/collector/cmd/otelcorecol name: otelcorecol description: Local OpenTelemetry Collector binary, testing only. - version: 0.85.0-dev - otelcol_version: 0.85.0 + version: 0.96.0-dev + otelcol_version: 0.96.0 receivers: - - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.85.0 + - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.96.0 exporters: - - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.85.0 - - gomod: go.opentelemetry.io/collector/exporter/loggingexporter v0.85.0 - - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.85.0 - - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.85.0 + - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.96.0 + - gomod: go.opentelemetry.io/collector/exporter/loggingexporter v0.96.0 + - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.96.0 + - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.96.0 extensions: - - gomod: go.opentelemetry.io/collector/extension/ballastextension v0.85.0 - - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.85.0 + - gomod: go.opentelemetry.io/collector/extension/ballastextension v0.96.0 + - gomod: go.opentelemetry.io/collector/extension/memorylimiterextension v0.96.0 + - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.96.0 processors: - - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.85.0 - - gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.85.0 + - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.96.0 + - gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.96.0 connectors: - - gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.85.0 + - gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.96.0 replaces: - go.opentelemetry.io/collector => ../../ @@ -31,10 +32,17 @@ replaces: - go.opentelemetry.io/collector/config/confighttp => ../../config/confighttp - go.opentelemetry.io/collector/config/confignet => ../../config/confignet - go.opentelemetry.io/collector/config/configopaque => ../../config/configopaque + - go.opentelemetry.io/collector/config/configretry => ../../config/configretry - go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry - go.opentelemetry.io/collector/config/configtls => ../../config/configtls - go.opentelemetry.io/collector/config/internal => ../../config/internal - go.opentelemetry.io/collector/confmap => ../../confmap + - go.opentelemetry.io/collector/confmap/converter/expandconverter => ../../confmap/converter/expandconverter + - go.opentelemetry.io/collector/confmap/provider/envprovider => ../../confmap/provider/envprovider + - go.opentelemetry.io/collector/confmap/provider/fileprovider => ../../confmap/provider/fileprovider + - go.opentelemetry.io/collector/confmap/provider/httpprovider => ../../confmap/provider/httpprovider + - go.opentelemetry.io/collector/confmap/provider/httpsprovider => ../../confmap/provider/httpsprovider + - go.opentelemetry.io/collector/confmap/provider/yamlprovider => ../../confmap/provider/yamlprovider - go.opentelemetry.io/collector/consumer => ../../consumer - go.opentelemetry.io/collector/connector => ../../connector - go.opentelemetry.io/collector/connector/forwardconnector => ../../connector/forwardconnector @@ -46,6 +54,7 @@ replaces: - go.opentelemetry.io/collector/extension => ../../extension - go.opentelemetry.io/collector/extension/auth => ../../extension/auth - go.opentelemetry.io/collector/extension/ballastextension => ../../extension/ballastextension + - go.opentelemetry.io/collector/extension/memorylimiterextension => ../../extension/memorylimiterextension - go.opentelemetry.io/collector/extension/zpagesextension => ../../extension/zpagesextension - go.opentelemetry.io/collector/featuregate => ../../featuregate - go.opentelemetry.io/collector/pdata => ../../pdata diff --git a/cmd/otelcorecol/components.go b/cmd/otelcorecol/components.go index 170c7b55b5b..786743099b9 100644 --- a/cmd/otelcorecol/components.go +++ b/cmd/otelcorecol/components.go @@ -12,6 +12,7 @@ import ( otlphttpexporter "go.opentelemetry.io/collector/exporter/otlphttpexporter" "go.opentelemetry.io/collector/extension" ballastextension "go.opentelemetry.io/collector/extension/ballastextension" + memorylimiterextension "go.opentelemetry.io/collector/extension/memorylimiterextension" zpagesextension "go.opentelemetry.io/collector/extension/zpagesextension" "go.opentelemetry.io/collector/otelcol" "go.opentelemetry.io/collector/processor" @@ -27,6 +28,7 @@ func components() (otelcol.Factories, error) { factories.Extensions, err = extension.MakeFactoryMap( ballastextension.NewFactory(), + memorylimiterextension.NewFactory(), zpagesextension.NewFactory(), ) if err != nil { diff --git a/cmd/otelcorecol/go.mod b/cmd/otelcorecol/go.mod index 591510f158f..a9a702bd1b5 100644 --- a/cmd/otelcorecol/go.mod +++ b/cmd/otelcorecol/go.mod @@ -2,126 +2,132 @@ module go.opentelemetry.io/collector/cmd/otelcorecol -go 1.20 +go 1.21 require ( github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.85.0 - go.opentelemetry.io/collector/connector v0.85.0 - go.opentelemetry.io/collector/connector/forwardconnector v0.85.0 - go.opentelemetry.io/collector/exporter v0.85.0 - go.opentelemetry.io/collector/exporter/debugexporter v0.85.0 - go.opentelemetry.io/collector/exporter/loggingexporter v0.85.0 - go.opentelemetry.io/collector/exporter/otlpexporter v0.85.0 - go.opentelemetry.io/collector/exporter/otlphttpexporter v0.85.0 - go.opentelemetry.io/collector/extension v0.85.0 - go.opentelemetry.io/collector/extension/ballastextension v0.85.0 - go.opentelemetry.io/collector/extension/zpagesextension v0.85.0 - go.opentelemetry.io/collector/otelcol v0.0.0-00010101000000-000000000000 - go.opentelemetry.io/collector/processor v0.85.0 - go.opentelemetry.io/collector/processor/batchprocessor v0.85.0 - go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.85.0 - go.opentelemetry.io/collector/receiver v0.85.0 - go.opentelemetry.io/collector/receiver/otlpreceiver v0.85.0 - golang.org/x/sys v0.12.0 + go.opentelemetry.io/collector/component v0.96.0 + go.opentelemetry.io/collector/connector v0.96.0 + go.opentelemetry.io/collector/connector/forwardconnector v0.96.0 + go.opentelemetry.io/collector/exporter v0.96.0 + go.opentelemetry.io/collector/exporter/debugexporter v0.96.0 + go.opentelemetry.io/collector/exporter/loggingexporter v0.96.0 + go.opentelemetry.io/collector/exporter/otlpexporter v0.96.0 + go.opentelemetry.io/collector/exporter/otlphttpexporter v0.96.0 + go.opentelemetry.io/collector/extension v0.96.0 + go.opentelemetry.io/collector/extension/ballastextension v0.96.0 + go.opentelemetry.io/collector/extension/memorylimiterextension v0.96.0 + go.opentelemetry.io/collector/extension/zpagesextension v0.96.0 + go.opentelemetry.io/collector/otelcol v0.96.0 + go.opentelemetry.io/collector/processor v0.96.0 + go.opentelemetry.io/collector/processor/batchprocessor v0.96.0 + go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.96.0 + go.opentelemetry.io/collector/receiver v0.96.0 + go.opentelemetry.io/collector/receiver/otlpreceiver v0.96.0 + go.uber.org/goleak v1.3.0 + golang.org/x/sys v0.17.0 ) require ( - contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect + cloud.google.com/go/compute v1.24.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/felixge/httpsnoop v1.0.3 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/google/uuid v1.3.1 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect + github.com/hashicorp/go-version v1.6.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.0 // indirect + github.com/klauspost/compress v1.17.7 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.0.1 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/mostynb/go-grpc-compression v1.2.1 // indirect + github.com/mostynb/go-grpc-compression v1.2.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/prometheus/client_golang v1.16.0 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect - github.com/prometheus/statsd_exporter v0.22.7 // indirect - github.com/rs/cors v1.10.0 // indirect - github.com/shirou/gopsutil/v3 v3.23.8 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/rs/cors v1.10.1 // indirect + github.com/shirou/gopsutil/v3 v3.24.1 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect - github.com/spf13/cobra v1.7.0 // indirect + github.com/spf13/cobra v1.8.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.85.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.85.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.85.0 // indirect - go.opentelemetry.io/collector/config/configgrpc v0.85.0 // indirect - go.opentelemetry.io/collector/config/confighttp v0.85.0 // indirect - go.opentelemetry.io/collector/config/confignet v0.85.0 // indirect - go.opentelemetry.io/collector/config/configopaque v0.85.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.85.0 // indirect - go.opentelemetry.io/collector/config/configtls v0.85.0 // indirect - go.opentelemetry.io/collector/config/internal v0.85.0 // indirect - go.opentelemetry.io/collector/confmap v0.85.0 // indirect - go.opentelemetry.io/collector/consumer v0.85.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.85.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0014 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0014 // indirect - go.opentelemetry.io/collector/semconv v0.85.0 // indirect - go.opentelemetry.io/collector/service v0.0.0-20230915215502-07938f20fcc7 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.44.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0 // indirect - go.opentelemetry.io/contrib/propagators/b3 v1.19.0 // indirect - go.opentelemetry.io/contrib/zpages v0.44.0 // indirect - go.opentelemetry.io/otel v1.18.0 // indirect - go.opentelemetry.io/otel/bridge/opencensus v0.41.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.41.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.41.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.41.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.18.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.18.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.18.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.41.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.41.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.18.0 // indirect - go.opentelemetry.io/otel/metric v1.18.0 // indirect - go.opentelemetry.io/otel/sdk v1.18.0 // indirect - go.opentelemetry.io/otel/sdk/metric v0.41.0 // indirect - go.opentelemetry.io/otel/trace v1.18.0 // indirect - go.opentelemetry.io/proto/otlp v1.0.0 // indirect + go.opentelemetry.io/collector v0.96.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.96.0 // indirect + go.opentelemetry.io/collector/config/configcompression v0.96.0 // indirect + go.opentelemetry.io/collector/config/configgrpc v0.96.0 // indirect + go.opentelemetry.io/collector/config/confighttp v0.96.0 // indirect + go.opentelemetry.io/collector/config/confignet v0.96.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.3.0 // indirect + go.opentelemetry.io/collector/config/configretry v0.96.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect + go.opentelemetry.io/collector/config/configtls v0.96.0 // indirect + go.opentelemetry.io/collector/config/internal v0.96.0 // indirect + go.opentelemetry.io/collector/confmap v0.96.0 // indirect + go.opentelemetry.io/collector/confmap/converter/expandconverter v0.96.0 // indirect + go.opentelemetry.io/collector/confmap/provider/envprovider v0.96.0 // indirect + go.opentelemetry.io/collector/confmap/provider/fileprovider v0.96.0 // indirect + go.opentelemetry.io/collector/confmap/provider/httpprovider v0.96.0 // indirect + go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.96.0 // indirect + go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.96.0 // indirect + go.opentelemetry.io/collector/consumer v0.96.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.96.0 // indirect + go.opentelemetry.io/collector/featuregate v1.3.0 // indirect + go.opentelemetry.io/collector/pdata v1.3.0 // indirect + go.opentelemetry.io/collector/semconv v0.96.0 // indirect + go.opentelemetry.io/collector/service v0.96.0 // indirect + go.opentelemetry.io/contrib/config v0.4.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.24.0 // indirect + go.opentelemetry.io/contrib/zpages v0.49.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/bridge/opencensus v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect + go.opentelemetry.io/proto/otlp v1.1.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/text v0.13.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/oauth2 v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect gonum.org/v1/gonum v0.14.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/grpc v1.58.1 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect + google.golang.org/grpc v1.62.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -143,6 +149,8 @@ replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet replace go.opentelemetry.io/collector/config/configopaque => ../../config/configopaque +replace go.opentelemetry.io/collector/config/configretry => ../../config/configretry + replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry replace go.opentelemetry.io/collector/config/configtls => ../../config/configtls @@ -151,6 +159,18 @@ replace go.opentelemetry.io/collector/config/internal => ../../config/internal replace go.opentelemetry.io/collector/confmap => ../../confmap +replace go.opentelemetry.io/collector/confmap/converter/expandconverter => ../../confmap/converter/expandconverter + +replace go.opentelemetry.io/collector/confmap/provider/envprovider => ../../confmap/provider/envprovider + +replace go.opentelemetry.io/collector/confmap/provider/fileprovider => ../../confmap/provider/fileprovider + +replace go.opentelemetry.io/collector/confmap/provider/httpprovider => ../../confmap/provider/httpprovider + +replace go.opentelemetry.io/collector/confmap/provider/httpsprovider => ../../confmap/provider/httpsprovider + +replace go.opentelemetry.io/collector/confmap/provider/yamlprovider => ../../confmap/provider/yamlprovider + replace go.opentelemetry.io/collector/consumer => ../../consumer replace go.opentelemetry.io/collector/connector => ../../connector @@ -173,6 +193,8 @@ replace go.opentelemetry.io/collector/extension/auth => ../../extension/auth replace go.opentelemetry.io/collector/extension/ballastextension => ../../extension/ballastextension +replace go.opentelemetry.io/collector/extension/memorylimiterextension => ../../extension/memorylimiterextension + replace go.opentelemetry.io/collector/extension/zpagesextension => ../../extension/zpagesextension replace go.opentelemetry.io/collector/featuregate => ../../featuregate @@ -192,6 +214,3 @@ replace go.opentelemetry.io/collector/processor/memorylimiterprocessor => ../../ replace go.opentelemetry.io/collector/semconv => ../../semconv replace go.opentelemetry.io/collector/service => ../../service - -// ambiguous import: found package cloud.google.com/go/compute/metadata in multiple modules -replace cloud.google.com/go => cloud.google.com/go v0.110.2 diff --git a/cmd/otelcorecol/go.sum b/cmd/otelcorecol/go.sum index c62b1d5b3bb..b8a1209e827 100644 --- a/cmd/otelcorecol/go.sum +++ b/cmd/otelcorecol/go.sum @@ -1,1407 +1,287 @@ -cloud.google.com/go v0.110.2 h1:sdFPBr6xG9/wkBbfhmUz/JmZC7X6LavQgcrVINrKiVA= -cloud.google.com/go v0.110.2/go.mod h1:k04UEeEtb6ZBRTv3dZz4CeJC3jKGxyhl0sAiVVquxiw= -cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= -cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= -cloud.google.com/go/accessapproval v1.6.0/go.mod h1:R0EiYnwV5fsRFiKZkPHr6mwyk2wxUJ30nL4j2pcFY2E= -cloud.google.com/go/accesscontextmanager v1.3.0/go.mod h1:TgCBehyr5gNMz7ZaH9xubp+CE8dkrszb4oK9CWyvD4o= -cloud.google.com/go/accesscontextmanager v1.4.0/go.mod h1:/Kjh7BBu/Gh83sv+K60vN9QE5NJcd80sU33vIe2IFPE= -cloud.google.com/go/accesscontextmanager v1.6.0/go.mod h1:8XCvZWfYw3K/ji0iVnp+6pu7huxoQTLmxAbVjbloTtM= -cloud.google.com/go/accesscontextmanager v1.7.0/go.mod h1:CEGLewx8dwa33aDAZQujl7Dx+uYhS0eay198wB/VumQ= -cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= -cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= -cloud.google.com/go/aiplatform v1.27.0/go.mod h1:Bvxqtl40l0WImSb04d0hXFU7gDOiq9jQmorivIiWcKg= -cloud.google.com/go/aiplatform v1.35.0/go.mod h1:7MFT/vCaOyZT/4IIFfxH4ErVg/4ku6lKv3w0+tFTgXQ= -cloud.google.com/go/aiplatform v1.36.1/go.mod h1:WTm12vJRPARNvJ+v6P52RDHCNe4AhvjcIZ/9/RRHy/k= -cloud.google.com/go/aiplatform v1.37.0/go.mod h1:IU2Cv29Lv9oCn/9LkFiiuKfwrRTq+QQMbW+hPCxJGZw= -cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= -cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= -cloud.google.com/go/analytics v0.17.0/go.mod h1:WXFa3WSym4IZ+JiKmavYdJwGG/CvpqiqczmL59bTD9M= -cloud.google.com/go/analytics v0.18.0/go.mod h1:ZkeHGQlcIPkw0R/GW+boWHhCOR43xz9RN/jn7WcqfIE= -cloud.google.com/go/analytics v0.19.0/go.mod h1:k8liqf5/HCnOUkbawNtrWWc+UAzyDlW89doe8TtoDsE= -cloud.google.com/go/apigateway v1.3.0/go.mod h1:89Z8Bhpmxu6AmUxuVRg/ECRGReEdiP3vQtk4Z1J9rJk= -cloud.google.com/go/apigateway v1.4.0/go.mod h1:pHVY9MKGaH9PQ3pJ4YLzoj6U5FUDeDFBllIz7WmzJoc= -cloud.google.com/go/apigateway v1.5.0/go.mod h1:GpnZR3Q4rR7LVu5951qfXPJCHquZt02jf7xQx7kpqN8= -cloud.google.com/go/apigeeconnect v1.3.0/go.mod h1:G/AwXFAKo0gIXkPTVfZDd2qA1TxBXJ3MgMRBQkIi9jc= -cloud.google.com/go/apigeeconnect v1.4.0/go.mod h1:kV4NwOKqjvt2JYR0AoIWo2QGfoRtn/pkS3QlHp0Ni04= -cloud.google.com/go/apigeeconnect v1.5.0/go.mod h1:KFaCqvBRU6idyhSNyn3vlHXc8VMDJdRmwDF6JyFRqZ8= -cloud.google.com/go/apigeeregistry v0.4.0/go.mod h1:EUG4PGcsZvxOXAdyEghIdXwAEi/4MEaoqLMLDMIwKXY= -cloud.google.com/go/apigeeregistry v0.5.0/go.mod h1:YR5+s0BVNZfVOUkMa5pAR2xGd0A473vA5M7j247o1wM= -cloud.google.com/go/apigeeregistry v0.6.0/go.mod h1:BFNzW7yQVLZ3yj0TKcwzb8n25CFBri51GVGOEUcgQsc= -cloud.google.com/go/apikeys v0.4.0/go.mod h1:XATS/yqZbaBK0HOssf+ALHp8jAlNHUgyfprvNcBIszU= -cloud.google.com/go/apikeys v0.5.0/go.mod h1:5aQfwY4D+ewMMWScd3hm2en3hCj+BROlyrt3ytS7KLI= -cloud.google.com/go/apikeys v0.6.0/go.mod h1:kbpXu5upyiAlGkKrJgQl8A0rKNNJ7dQ377pdroRSSi8= -cloud.google.com/go/appengine v1.4.0/go.mod h1:CS2NhuBuDXM9f+qscZ6V86m1MIIqPj3WC/UoEuR1Sno= -cloud.google.com/go/appengine v1.5.0/go.mod h1:TfasSozdkFI0zeoxW3PTBLiNqRmzraodCWatWI9Dmak= -cloud.google.com/go/appengine v1.6.0/go.mod h1:hg6i0J/BD2cKmDJbaFSYHFyZkgBEfQrDg/X0V5fJn84= -cloud.google.com/go/appengine v1.7.0/go.mod h1:eZqpbHFCqRGa2aCdope7eC0SWLV1j0neb/QnMJVWx6A= -cloud.google.com/go/appengine v1.7.1/go.mod h1:IHLToyb/3fKutRysUlFO0BPt5j7RiQ45nrzEJmKTo6E= -cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= -cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= -cloud.google.com/go/area120 v0.7.0/go.mod h1:a3+8EUD1SX5RUcCs3MY5YasiO1z6yLiNLRiFrykbynY= -cloud.google.com/go/area120 v0.7.1/go.mod h1:j84i4E1RboTWjKtZVWXPqvK5VHQFJRF2c1Nm69pWm9k= -cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= -cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= -cloud.google.com/go/artifactregistry v1.8.0/go.mod h1:w3GQXkJX8hiKN0v+at4b0qotwijQbYUqF2GWkZzAhC0= -cloud.google.com/go/artifactregistry v1.9.0/go.mod h1:2K2RqvA2CYvAeARHRkLDhMDJ3OXy26h3XW+3/Jh2uYc= -cloud.google.com/go/artifactregistry v1.11.1/go.mod h1:lLYghw+Itq9SONbCa1YWBoWs1nOucMH0pwXN1rOBZFI= -cloud.google.com/go/artifactregistry v1.11.2/go.mod h1:nLZns771ZGAwVLzTX/7Al6R9ehma4WUEhZGWV6CeQNQ= -cloud.google.com/go/artifactregistry v1.12.0/go.mod h1:o6P3MIvtzTOnmvGagO9v/rOjjA0HmhJ+/6KAXrmYDCI= -cloud.google.com/go/artifactregistry v1.13.0/go.mod h1:uy/LNfoOIivepGhooAUpL1i30Hgee3Cu0l4VTWHUC08= -cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= -cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= -cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= -cloud.google.com/go/asset v1.9.0/go.mod h1:83MOE6jEJBMqFKadM9NLRcs80Gdw76qGuHn8m3h8oHQ= -cloud.google.com/go/asset v1.10.0/go.mod h1:pLz7uokL80qKhzKr4xXGvBQXnzHn5evJAEAtZiIb0wY= -cloud.google.com/go/asset v1.11.1/go.mod h1:fSwLhbRvC9p9CXQHJ3BgFeQNM4c9x10lqlrdEUYXlJo= -cloud.google.com/go/asset v1.12.0/go.mod h1:h9/sFOa4eDIyKmH6QMpm4eUK3pDojWnUhTgJlk762Hg= -cloud.google.com/go/asset v1.13.0/go.mod h1:WQAMyYek/b7NBpYq/K4KJWcRqzoalEsxz/t/dTk4THw= -cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= -cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= -cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= -cloud.google.com/go/assuredworkloads v1.8.0/go.mod h1:AsX2cqyNCOvEQC8RMPnoc0yEarXQk6WEKkxYfL6kGIo= -cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0= -cloud.google.com/go/assuredworkloads v1.10.0/go.mod h1:kwdUQuXcedVdsIaKgKTp9t0UJkE5+PAVNhdQm4ZVq2E= -cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= -cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= -cloud.google.com/go/automl v1.7.0/go.mod h1:RL9MYCCsJEOmt0Wf3z9uzG0a7adTT1fe+aObgSpkCt8= -cloud.google.com/go/automl v1.8.0/go.mod h1:xWx7G/aPEe/NP+qzYXktoBSDfjO+vnKMGgsApGJJquM= -cloud.google.com/go/automl v1.12.0/go.mod h1:tWDcHDp86aMIuHmyvjuKeeHEGq76lD7ZqfGLN6B0NuU= -cloud.google.com/go/baremetalsolution v0.3.0/go.mod h1:XOrocE+pvK1xFfleEnShBlNAXf+j5blPPxrhjKgnIFc= -cloud.google.com/go/baremetalsolution v0.4.0/go.mod h1:BymplhAadOO/eBa7KewQ0Ppg4A4Wplbn+PsFKRLo0uI= -cloud.google.com/go/baremetalsolution v0.5.0/go.mod h1:dXGxEkmR9BMwxhzBhV0AioD0ULBmuLZI8CdwalUxuss= -cloud.google.com/go/batch v0.3.0/go.mod h1:TR18ZoAekj1GuirsUsR1ZTKN3FC/4UDnScjT8NXImFE= -cloud.google.com/go/batch v0.4.0/go.mod h1:WZkHnP43R/QCGQsZ+0JyG4i79ranE2u8xvjq/9+STPE= -cloud.google.com/go/batch v0.7.0/go.mod h1:vLZN95s6teRUqRQ4s3RLDsH8PvboqBK+rn1oevL159g= -cloud.google.com/go/beyondcorp v0.2.0/go.mod h1:TB7Bd+EEtcw9PCPQhCJtJGjk/7TC6ckmnSFS+xwTfm4= -cloud.google.com/go/beyondcorp v0.3.0/go.mod h1:E5U5lcrcXMsCuoDNyGrpyTm/hn7ne941Jz2vmksAxW8= -cloud.google.com/go/beyondcorp v0.4.0/go.mod h1:3ApA0mbhHx6YImmuubf5pyW8srKnCEPON32/5hj+RmM= -cloud.google.com/go/beyondcorp v0.5.0/go.mod h1:uFqj9X+dSfrheVp7ssLTaRHd2EHqSL4QZmH4e8WXGGU= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= -cloud.google.com/go/bigquery v1.43.0/go.mod h1:ZMQcXHsl+xmU1z36G2jNGZmKp9zNY5BUua5wDgmNCfw= -cloud.google.com/go/bigquery v1.44.0/go.mod h1:0Y33VqXTEsbamHJvJHdFmtqHvMIY28aK1+dFsvaChGc= -cloud.google.com/go/bigquery v1.47.0/go.mod h1:sA9XOgy0A8vQK9+MWhEQTY6Tix87M/ZurWFIxmF9I/E= -cloud.google.com/go/bigquery v1.48.0/go.mod h1:QAwSz+ipNgfL5jxiaK7weyOhzdoAy1zFm0Nf1fysJac= -cloud.google.com/go/bigquery v1.49.0/go.mod h1:Sv8hMmTFFYBlt/ftw2uN6dFdQPzBlREY9yBh7Oy7/4Q= -cloud.google.com/go/bigquery v1.50.0/go.mod h1:YrleYEh2pSEbgTBZYMJ5SuSr0ML3ypjRB1zgf7pvQLU= -cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= -cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= -cloud.google.com/go/billing v1.6.0/go.mod h1:WoXzguj+BeHXPbKfNWkqVtDdzORazmCjraY+vrxcyvI= -cloud.google.com/go/billing v1.7.0/go.mod h1:q457N3Hbj9lYwwRbnlD7vUpyjq6u5U1RAOArInEiD5Y= -cloud.google.com/go/billing v1.12.0/go.mod h1:yKrZio/eu+okO/2McZEbch17O5CB5NpZhhXG6Z766ss= -cloud.google.com/go/billing v1.13.0/go.mod h1:7kB2W9Xf98hP9Sr12KfECgfGclsH3CQR0R08tnRlRbc= -cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= -cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= -cloud.google.com/go/binaryauthorization v1.3.0/go.mod h1:lRZbKgjDIIQvzYQS1p99A7/U1JqvqeZg0wiI5tp6tg0= -cloud.google.com/go/binaryauthorization v1.4.0/go.mod h1:tsSPQrBd77VLplV70GUhBf/Zm3FsKmgSqgm4UmiDItk= -cloud.google.com/go/binaryauthorization v1.5.0/go.mod h1:OSe4OU1nN/VswXKRBmciKpo9LulY41gch5c68htf3/Q= -cloud.google.com/go/certificatemanager v1.3.0/go.mod h1:n6twGDvcUBFu9uBgt4eYvvf3sQ6My8jADcOVwHmzadg= -cloud.google.com/go/certificatemanager v1.4.0/go.mod h1:vowpercVFyqs8ABSmrdV+GiFf2H/ch3KyudYQEMM590= -cloud.google.com/go/certificatemanager v1.6.0/go.mod h1:3Hh64rCKjRAX8dXgRAyOcY5vQ/fE1sh8o+Mdd6KPgY8= -cloud.google.com/go/channel v1.8.0/go.mod h1:W5SwCXDJsq/rg3tn3oG0LOxpAo6IMxNa09ngphpSlnk= -cloud.google.com/go/channel v1.9.0/go.mod h1:jcu05W0my9Vx4mt3/rEHpfxc9eKi9XwsdDL8yBMbKUk= -cloud.google.com/go/channel v1.11.0/go.mod h1:IdtI0uWGqhEeatSB62VOoJ8FSUhJ9/+iGkJVqp74CGE= -cloud.google.com/go/channel v1.12.0/go.mod h1:VkxCGKASi4Cq7TbXxlaBezonAYpp1GCnKMY6tnMQnLU= -cloud.google.com/go/cloudbuild v1.3.0/go.mod h1:WequR4ULxlqvMsjDEEEFnOG5ZSRSgWOywXYDb1vPE6U= -cloud.google.com/go/cloudbuild v1.4.0/go.mod h1:5Qwa40LHiOXmz3386FrjrYM93rM/hdRr7b53sySrTqA= -cloud.google.com/go/cloudbuild v1.6.0/go.mod h1:UIbc/w9QCbH12xX+ezUsgblrWv+Cv4Tw83GiSMHOn9M= -cloud.google.com/go/cloudbuild v1.7.0/go.mod h1:zb5tWh2XI6lR9zQmsm1VRA+7OCuve5d8S+zJUul8KTg= -cloud.google.com/go/cloudbuild v1.9.0/go.mod h1:qK1d7s4QlO0VwfYn5YuClDGg2hfmLZEb4wQGAbIgL1s= -cloud.google.com/go/clouddms v1.3.0/go.mod h1:oK6XsCDdW4Ib3jCCBugx+gVjevp2TMXFtgxvPSee3OM= -cloud.google.com/go/clouddms v1.4.0/go.mod h1:Eh7sUGCC+aKry14O1NRljhjyrr0NFC0G2cjwX0cByRk= -cloud.google.com/go/clouddms v1.5.0/go.mod h1:QSxQnhikCLUw13iAbffF2CZxAER3xDGNHjsTAkQJcQA= -cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= -cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= -cloud.google.com/go/cloudtasks v1.7.0/go.mod h1:ImsfdYWwlWNJbdgPIIGJWC+gemEGTBK/SunNQQNCAb4= -cloud.google.com/go/cloudtasks v1.8.0/go.mod h1:gQXUIwCSOI4yPVK7DgTVFiiP0ZW/eQkydWzwVMdHxrI= -cloud.google.com/go/cloudtasks v1.9.0/go.mod h1:w+EyLsVkLWHcOaqNEyvcKAsWp9p29dL6uL9Nst1cI7Y= -cloud.google.com/go/cloudtasks v1.10.0/go.mod h1:NDSoTLkZ3+vExFEWu2UJV1arUyzVDAiZtdWcsUyNwBs= -cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= -cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= -cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= -cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= -cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= -cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= -cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.12.0/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= -cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= -cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE= -cloud.google.com/go/compute v1.14.0/go.mod h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvjxega5vAdo= -cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63rR+SXhcpA= -cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= -cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/q8Bs93scU= -cloud.google.com/go/compute v1.21.0 h1:JNBsyXVoOoNJtTQcnEY5uYpZIbeCTYIeDe0Xh1bySMk= -cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= -cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= -cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= +cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg= +cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 h1:aRVqY1p2IJaBGStWMsQMpkAa83cPkCDLl80eOj0Rbz4= -cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbTuPSj0fYJcPls9TFlPNnHHY= -cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck= -cloud.google.com/go/contactcenterinsights v1.6.0/go.mod h1:IIDlT6CLcDoyv79kDv8iWxMSTZhLxSCofVV5W6YFM/w= -cloud.google.com/go/container v1.6.0/go.mod h1:Xazp7GjJSeUYo688S+6J5V+n/t+G5sKBTFkKNudGRxg= -cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3amoYfxVkLo= -cloud.google.com/go/container v1.13.1/go.mod h1:6wgbMPeQRw9rSnKBCAJXnds3Pzj03C4JHamr8asWKy4= -cloud.google.com/go/container v1.14.0/go.mod h1:3AoJMPhHfLDxLvrlVWaK57IXzaPnLaZq63WX59aQBfM= -cloud.google.com/go/container v1.15.0/go.mod h1:ft+9S0WGjAyjDggg5S06DXj+fHJICWg8L7isCQe9pQA= -cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= -cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= -cloud.google.com/go/containeranalysis v0.7.0/go.mod h1:9aUL+/vZ55P2CXfuZjS4UjQ9AgXoSw8Ts6lemfmxBxI= -cloud.google.com/go/containeranalysis v0.9.0/go.mod h1:orbOANbwk5Ejoom+s+DUCTTJ7IBdBQJDcSylAx/on9s= -cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= -cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= -cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= -cloud.google.com/go/datacatalog v1.7.0/go.mod h1:9mEl4AuDYWw81UGc41HonIHH7/sn52H0/tc8f8ZbZIE= -cloud.google.com/go/datacatalog v1.8.0/go.mod h1:KYuoVOv9BM8EYz/4eMFxrr4DUKhGIOXxZoKYF5wdISM= -cloud.google.com/go/datacatalog v1.8.1/go.mod h1:RJ58z4rMp3gvETA465Vg+ag8BGgBdnRPEMMSTr5Uv+M= -cloud.google.com/go/datacatalog v1.12.0/go.mod h1:CWae8rFkfp6LzLumKOnmVh4+Zle4A3NXLzVJ1d1mRm0= -cloud.google.com/go/datacatalog v1.13.0/go.mod h1:E4Rj9a5ZtAxcQJlEBTLgMTphfP11/lNaAshpoBgemX8= -cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= -cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= -cloud.google.com/go/dataflow v0.8.0/go.mod h1:Rcf5YgTKPtQyYz8bLYhFoIV/vP39eL7fWNcSOyFfLJE= -cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= -cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= -cloud.google.com/go/dataform v0.5.0/go.mod h1:GFUYRe8IBa2hcomWplodVmUx/iTL0FrsauObOM3Ipr0= -cloud.google.com/go/dataform v0.6.0/go.mod h1:QPflImQy33e29VuapFdf19oPbE4aYTJxr31OAPV+ulA= -cloud.google.com/go/dataform v0.7.0/go.mod h1:7NulqnVozfHvWUBpMDfKMUESr+85aJsC/2O0o3jWPDE= -cloud.google.com/go/datafusion v1.4.0/go.mod h1:1Zb6VN+W6ALo85cXnM1IKiPw+yQMKMhB9TsTSRDo/38= -cloud.google.com/go/datafusion v1.5.0/go.mod h1:Kz+l1FGHB0J+4XF2fud96WMmRiq/wj8N9u007vyXZ2w= -cloud.google.com/go/datafusion v1.6.0/go.mod h1:WBsMF8F1RhSXvVM8rCV3AeyWVxcC2xY6vith3iw3S+8= -cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= -cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= -cloud.google.com/go/datalabeling v0.7.0/go.mod h1:WPQb1y08RJbmpM3ww0CSUAGweL0SxByuW2E+FU+wXcM= -cloud.google.com/go/dataplex v1.3.0/go.mod h1:hQuRtDg+fCiFgC8j0zV222HvzFQdRd+SVX8gdmFcZzA= -cloud.google.com/go/dataplex v1.4.0/go.mod h1:X51GfLXEMVJ6UN47ESVqvlsRplbLhcsAt0kZCCKsU0A= -cloud.google.com/go/dataplex v1.5.2/go.mod h1:cVMgQHsmfRoI5KFYq4JtIBEUbYwc3c7tXmIDhRmNNVQ= -cloud.google.com/go/dataplex v1.6.0/go.mod h1:bMsomC/aEJOSpHXdFKFGQ1b0TDPIeL28nJObeO1ppRs= -cloud.google.com/go/dataproc v1.7.0/go.mod h1:CKAlMjII9H90RXaMpSxQ8EU6dQx6iAYNPcYPOkSbi8s= -cloud.google.com/go/dataproc v1.8.0/go.mod h1:5OW+zNAH0pMpw14JVrPONsxMQYMBqJuzORhIBfBn9uI= -cloud.google.com/go/dataproc v1.12.0/go.mod h1:zrF3aX0uV3ikkMz6z4uBbIKyhRITnxvr4i3IjKsKrw4= -cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= -cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= -cloud.google.com/go/dataqna v0.7.0/go.mod h1:Lx9OcIIeqCrw1a6KdO3/5KMP1wAmTc0slZWwP12Qq3c= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.10.0/go.mod h1:PC5UzAmDEkAmkfaknstTYbNpgE49HAgW2J1gcgUfmdM= -cloud.google.com/go/datastore v1.11.0/go.mod h1:TvGxBIHCS50u8jzG+AW/ppf87v1of8nwzFNgEZU1D3c= -cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= -cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= -cloud.google.com/go/datastream v1.4.0/go.mod h1:h9dpzScPhDTs5noEMQVWP8Wx8AFBRyS0s8KWPx/9r0g= -cloud.google.com/go/datastream v1.5.0/go.mod h1:6TZMMNPwjUqZHBKPQ1wwXpb0d5VDVPl2/XoS5yi88q4= -cloud.google.com/go/datastream v1.6.0/go.mod h1:6LQSuswqLa7S4rPAOZFVjHIG3wJIjZcZrw8JDEDJuIs= -cloud.google.com/go/datastream v1.7.0/go.mod h1:uxVRMm2elUSPuh65IbZpzJNMbuzkcvu5CjMqVIUHrww= -cloud.google.com/go/deploy v1.4.0/go.mod h1:5Xghikd4VrmMLNaF6FiRFDlHb59VM59YoDQnOUdsH/c= -cloud.google.com/go/deploy v1.5.0/go.mod h1:ffgdD0B89tToyW/U/D2eL0jN2+IEV/3EMuXHA0l4r+s= -cloud.google.com/go/deploy v1.6.0/go.mod h1:f9PTHehG/DjCom3QH0cntOVRm93uGBDt2vKzAPwpXQI= -cloud.google.com/go/deploy v1.8.0/go.mod h1:z3myEJnA/2wnB4sgjqdMfgxCA0EqC3RBTNcVPs93mtQ= -cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= -cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= -cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= -cloud.google.com/go/dialogflow v1.18.0/go.mod h1:trO7Zu5YdyEuR+BhSNOqJezyFQ3aUzz0njv7sMx/iek= -cloud.google.com/go/dialogflow v1.19.0/go.mod h1:JVmlG1TwykZDtxtTXujec4tQ+D8SBFMoosgy+6Gn0s0= -cloud.google.com/go/dialogflow v1.29.0/go.mod h1:b+2bzMe+k1s9V+F2jbJwpHPzrnIyHihAdRFMtn2WXuM= -cloud.google.com/go/dialogflow v1.31.0/go.mod h1:cuoUccuL1Z+HADhyIA7dci3N5zUssgpBJmCzI6fNRB4= -cloud.google.com/go/dialogflow v1.32.0/go.mod h1:jG9TRJl8CKrDhMEcvfcfFkkpp8ZhgPz3sBGmAUYJ2qE= -cloud.google.com/go/dlp v1.6.0/go.mod h1:9eyB2xIhpU0sVwUixfBubDoRwP+GjeUoxxeueZmqvmM= -cloud.google.com/go/dlp v1.7.0/go.mod h1:68ak9vCiMBjbasxeVD17hVPxDEck+ExiHavX8kiHG+Q= -cloud.google.com/go/dlp v1.9.0/go.mod h1:qdgmqgTyReTz5/YNSSuueR8pl7hO0o9bQ39ZhtgkWp4= -cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= -cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= -cloud.google.com/go/documentai v1.9.0/go.mod h1:FS5485S8R00U10GhgBC0aNGrJxBP8ZVpEeJ7PQDZd6k= -cloud.google.com/go/documentai v1.10.0/go.mod h1:vod47hKQIPeCfN2QS/jULIvQTugbmdc0ZvxxfQY1bg4= -cloud.google.com/go/documentai v1.16.0/go.mod h1:o0o0DLTEZ+YnJZ+J4wNfTxmDVyrkzFvttBXXtYRMHkM= -cloud.google.com/go/documentai v1.18.0/go.mod h1:F6CK6iUH8J81FehpskRmhLq/3VlwQvb7TvwOceQ2tbs= -cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= -cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= -cloud.google.com/go/domains v0.8.0/go.mod h1:M9i3MMDzGFXsydri9/vW+EWz9sWb4I6WyHqdlAk0idE= -cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= -cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= -cloud.google.com/go/edgecontainer v0.3.0/go.mod h1:FLDpP4nykgwwIfcLt6zInhprzw0lEi2P1fjO6Ie0qbc= -cloud.google.com/go/edgecontainer v1.0.0/go.mod h1:cttArqZpBB2q58W/upSG++ooo6EsblxDIolxa3jSjbY= -cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= -cloud.google.com/go/essentialcontacts v1.3.0/go.mod h1:r+OnHa5jfj90qIfZDO/VztSFqbQan7HV75p8sA+mdGI= -cloud.google.com/go/essentialcontacts v1.4.0/go.mod h1:8tRldvHYsmnBCHdFpvU+GL75oWiBKl80BiqlFh9tp+8= -cloud.google.com/go/essentialcontacts v1.5.0/go.mod h1:ay29Z4zODTuwliK7SnX8E86aUF2CTzdNtvv42niCX0M= -cloud.google.com/go/eventarc v1.7.0/go.mod h1:6ctpF3zTnaQCxUjHUdcfgcA1A2T309+omHZth7gDfmc= -cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEup4kvF+4gw= -cloud.google.com/go/eventarc v1.10.0/go.mod h1:u3R35tmZ9HvswGRBnF48IlYgYeBcPUCjkr4BTdem2Kw= -cloud.google.com/go/eventarc v1.11.0/go.mod h1:PyUjsUKPWoRBCHeOxZd/lbOOjahV41icXyUY5kSTvVY= -cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCVEBXNY9z0+w= -cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI= -cloud.google.com/go/filestore v1.5.0/go.mod h1:FqBXDWBp4YLHqRnVGveOkHDf8svj9r5+mUDLupOWEDs= -cloud.google.com/go/filestore v1.6.0/go.mod h1:di5unNuss/qfZTw2U9nhFqo8/ZDSc466dre85Kydllg= -cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= -cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= -cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= -cloud.google.com/go/functions v1.8.0/go.mod h1:RTZ4/HsQjIqIYP9a9YPbU+QFoQsAlYgrwOXJWHn1POY= -cloud.google.com/go/functions v1.9.0/go.mod h1:Y+Dz8yGguzO3PpIjhLTbnqV1CWmgQ5UwtlpzoyquQ08= -cloud.google.com/go/functions v1.10.0/go.mod h1:0D3hEOe3DbEvCXtYOZHQZmD+SzYsi1YbI7dGvHfldXw= -cloud.google.com/go/functions v1.12.0/go.mod h1:AXWGrF3e2C/5ehvwYo/GH6O5s09tOPksiKhz+hH8WkA= -cloud.google.com/go/functions v1.13.0/go.mod h1:EU4O007sQm6Ef/PwRsI8N2umygGqPBS/IZQKBQBcJ3c= -cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= -cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= -cloud.google.com/go/gaming v1.7.0/go.mod h1:LrB8U7MHdGgFG851iHAfqUdLcKBdQ55hzXy9xBJz0+w= -cloud.google.com/go/gaming v1.8.0/go.mod h1:xAqjS8b7jAVW0KFYeRUxngo9My3f33kFmua++Pi+ggM= -cloud.google.com/go/gaming v1.9.0/go.mod h1:Fc7kEmCObylSWLO334NcO+O9QMDyz+TKC4v1D7X+Bc0= -cloud.google.com/go/gkebackup v0.2.0/go.mod h1:XKvv/4LfG829/B8B7xRkk8zRrOEbKtEam6yNfuQNH60= -cloud.google.com/go/gkebackup v0.3.0/go.mod h1:n/E671i1aOQvUxT541aTkCwExO/bTer2HDlj4TsBRAo= -cloud.google.com/go/gkebackup v0.4.0/go.mod h1:byAyBGUwYGEEww7xsbnUTBHIYcOPy/PgUWUtOeRm9Vg= -cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= -cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= -cloud.google.com/go/gkeconnect v0.7.0/go.mod h1:SNfmVqPkaEi3bF/B3CNZOAYPYdg7sU+obZ+QTky2Myw= -cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= -cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= -cloud.google.com/go/gkehub v0.11.0/go.mod h1:JOWHlmN+GHyIbuWQPl47/C2RFhnFKH38jH9Ascu3n0E= -cloud.google.com/go/gkehub v0.12.0/go.mod h1:djiIwwzTTBrF5NaXCGv3mf7klpEMcST17VBTVVDcuaw= -cloud.google.com/go/gkemulticloud v0.3.0/go.mod h1:7orzy7O0S+5kq95e4Hpn7RysVA7dPs8W/GgfUtsPbrA= -cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZTyIgLKSalC7tuI= -cloud.google.com/go/gkemulticloud v0.5.0/go.mod h1:W0JDkiyi3Tqh0TJr//y19wyb1yf8llHVto2Htf2Ja3Y= -cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= -cloud.google.com/go/gsuiteaddons v1.3.0/go.mod h1:EUNK/J1lZEZO8yPtykKxLXI6JSVN2rg9bN8SXOa0bgM= -cloud.google.com/go/gsuiteaddons v1.4.0/go.mod h1:rZK5I8hht7u7HxFQcFei0+AtfS9uSushomRlg+3ua1o= -cloud.google.com/go/gsuiteaddons v1.5.0/go.mod h1:TFCClYLd64Eaa12sFVmUyG62tk4mdIsI7pAnSXRkcFo= -cloud.google.com/go/iam v0.1.0/go.mod h1:vcUNEa0pEm0qRVpmWepWaFMIAI8/hjB9mO8rNCJtF6c= -cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= -cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= -cloud.google.com/go/iam v0.7.0/go.mod h1:H5Br8wRaDGNc8XP3keLc4unfUUZeyH3Sfl9XpQEYOeg= -cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGESjkE= -cloud.google.com/go/iam v0.11.0/go.mod h1:9PiLDanza5D+oWFZiH1uG+RnRCfEGKoyl6yo4cgWZGY= -cloud.google.com/go/iam v0.12.0/go.mod h1:knyHGviacl11zrtZUoDuYpDgLjvr28sLQaG0YB2GYAY= -cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= -cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= -cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= -cloud.google.com/go/iap v1.6.0/go.mod h1:NSuvI9C/j7UdjGjIde7t7HBz+QTwBcapPE07+sSRcLk= -cloud.google.com/go/iap v1.7.0/go.mod h1:beqQx56T9O1G1yNPph+spKpNibDlYIiIixiqsQXxLIo= -cloud.google.com/go/iap v1.7.1/go.mod h1:WapEwPc7ZxGt2jFGB/C/bm+hP0Y6NXzOYGjpPnmMS74= -cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+KubM= -cloud.google.com/go/ids v1.2.0/go.mod h1:5WXvp4n25S0rA/mQWAg1YEEBBq6/s+7ml1RDCW1IrcY= -cloud.google.com/go/ids v1.3.0/go.mod h1:JBdTYwANikFKaDP6LtW5JAi4gubs57SVNQjemdt6xV4= -cloud.google.com/go/iot v1.3.0/go.mod h1:r7RGh2B61+B8oz0AGE+J72AhA0G7tdXItODWsaA2oLs= -cloud.google.com/go/iot v1.4.0/go.mod h1:dIDxPOn0UvNDUMD8Ger7FIaTuvMkj+aGk94RPP0iV+g= -cloud.google.com/go/iot v1.5.0/go.mod h1:mpz5259PDl3XJthEmh9+ap0affn/MqNSP4My77Qql9o= -cloud.google.com/go/iot v1.6.0/go.mod h1:IqdAsmE2cTYYNO1Fvjfzo9po179rAtJeVGUvkLN3rLE= -cloud.google.com/go/kms v1.4.0/go.mod h1:fajBHndQ+6ubNw6Ss2sSd+SWvjL26RNo/dr7uxsnnOA= -cloud.google.com/go/kms v1.5.0/go.mod h1:QJS2YY0eJGBg3mnDfuaCyLauWwBJiHRboYxJ++1xJNg= -cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0= -cloud.google.com/go/kms v1.8.0/go.mod h1:4xFEhYFqvW+4VMELtZyxomGSYtSQKzM178ylFW4jMAg= -cloud.google.com/go/kms v1.9.0/go.mod h1:qb1tPTgfF9RQP8e1wq4cLFErVuTJv7UsSC915J8dh3w= -cloud.google.com/go/kms v1.10.0/go.mod h1:ng3KTUtQQU9bPX3+QGLsflZIHlkbn8amFAMY63m8d24= -cloud.google.com/go/kms v1.10.1/go.mod h1:rIWk/TryCkR59GMC3YtHtXeLzd634lBbKenvyySAyYI= -cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= -cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= -cloud.google.com/go/language v1.7.0/go.mod h1:DJ6dYN/W+SQOjF8e1hLQXMF21AkH2w9wiPzPCJa2MIE= -cloud.google.com/go/language v1.8.0/go.mod h1:qYPVHf7SPoNNiCL2Dr0FfEFNil1qi3pQEyygwpgVKB8= -cloud.google.com/go/language v1.9.0/go.mod h1:Ns15WooPM5Ad/5no/0n81yUetis74g3zrbeJBE+ptUY= -cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= -cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= -cloud.google.com/go/lifesciences v0.8.0/go.mod h1:lFxiEOMqII6XggGbOnKiyZ7IBwoIqA84ClvoezaA/bo= -cloud.google.com/go/logging v1.6.1/go.mod h1:5ZO0mHHbvm8gEmeEUHrmDlTDSu5imF6MUP9OfilNXBw= -cloud.google.com/go/logging v1.7.0/go.mod h1:3xjP2CjkM3ZkO73aj4ASA5wRPGGCRrPIAeNqVNkzY8M= -cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= -cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= -cloud.google.com/go/longrunning v0.4.1/go.mod h1:4iWDqhBZ70CvZ6BfETbvam3T8FMvLK+eFj0E6AaRQTo= -cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= -cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= -cloud.google.com/go/managedidentities v1.5.0/go.mod h1:+dWcZ0JlUmpuxpIDfyP5pP5y0bLdRwOS4Lp7gMni/LA= -cloud.google.com/go/maps v0.1.0/go.mod h1:BQM97WGyfw9FWEmQMpZ5T6cpovXXSd1cGmFma94eubI= -cloud.google.com/go/maps v0.6.0/go.mod h1:o6DAMMfb+aINHz/p/jbcY+mYeXBoZoxTfdSQ8VAJaCw= -cloud.google.com/go/maps v0.7.0/go.mod h1:3GnvVl3cqeSvgMcpRlQidXsPYuDGQ8naBis7MVzpXsY= -cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= -cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= -cloud.google.com/go/mediatranslation v0.7.0/go.mod h1:LCnB/gZr90ONOIQLgSXagp8XUW1ODs2UmUMvcgMfI2I= -cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= -cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= -cloud.google.com/go/memcache v1.6.0/go.mod h1:XS5xB0eQZdHtTuTF9Hf8eJkKtR3pVRCcvJwtm68T3rA= -cloud.google.com/go/memcache v1.7.0/go.mod h1:ywMKfjWhNtkQTxrWxCkCFkoPjLHPW6A7WOTVI8xy3LY= -cloud.google.com/go/memcache v1.9.0/go.mod h1:8oEyzXCu+zo9RzlEaEjHl4KkgjlNDaXbCQeQWlzNFJM= -cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= -cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= -cloud.google.com/go/metastore v1.7.0/go.mod h1:s45D0B4IlsINu87/AsWiEVYbLaIMeUSoxlKKDqBGFS8= -cloud.google.com/go/metastore v1.8.0/go.mod h1:zHiMc4ZUpBiM7twCIFQmJ9JMEkDSyZS9U12uf7wHqSI= -cloud.google.com/go/metastore v1.10.0/go.mod h1:fPEnH3g4JJAk+gMRnrAnoqyv2lpUCqJPWOodSaf45Eo= -cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhIsnmlA53dvEk= -cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4= -cloud.google.com/go/monitoring v1.12.0/go.mod h1:yx8Jj2fZNEkL/GYZyTLS4ZtZEZN8WtDEiEqG4kLK50w= -cloud.google.com/go/monitoring v1.13.0/go.mod h1:k2yMBAB1H9JT/QETjNkgdCGD9bPF712XiLTVr+cBrpw= -cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= -cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= -cloud.google.com/go/networkconnectivity v1.6.0/go.mod h1:OJOoEXW+0LAxHh89nXd64uGG+FbQoeH8DtxCHVOMlaM= -cloud.google.com/go/networkconnectivity v1.7.0/go.mod h1:RMuSbkdbPwNMQjB5HBWD5MpTBnNm39iAVpC3TmsExt8= -cloud.google.com/go/networkconnectivity v1.10.0/go.mod h1:UP4O4sWXJG13AqrTdQCD9TnLGEbtNRqjuaaA7bNjF5E= -cloud.google.com/go/networkconnectivity v1.11.0/go.mod h1:iWmDD4QF16VCDLXUqvyspJjIEtBR/4zq5hwnY2X3scM= -cloud.google.com/go/networkmanagement v1.4.0/go.mod h1:Q9mdLLRn60AsOrPc8rs8iNV6OHXaGcDdsIQe1ohekq8= -cloud.google.com/go/networkmanagement v1.5.0/go.mod h1:ZnOeZ/evzUdUsnvRt792H0uYEnHQEMaz+REhhzJRcf4= -cloud.google.com/go/networkmanagement v1.6.0/go.mod h1:5pKPqyXjB/sgtvB5xqOemumoQNB7y95Q7S+4rjSOPYY= -cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= -cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= -cloud.google.com/go/networksecurity v0.7.0/go.mod h1:mAnzoxx/8TBSyXEeESMy9OOYwo1v+gZ5eMRnsT5bC8k= -cloud.google.com/go/networksecurity v0.8.0/go.mod h1:B78DkqsxFG5zRSVuwYFRZ9Xz8IcQ5iECsNrPn74hKHU= -cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= -cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= -cloud.google.com/go/notebooks v1.4.0/go.mod h1:4QPMngcwmgb6uw7Po99B2xv5ufVoIQ7nOGDyL4P8AgA= -cloud.google.com/go/notebooks v1.5.0/go.mod h1:q8mwhnP9aR8Hpfnrc5iN5IBhrXUy8S2vuYs+kBJ/gu0= -cloud.google.com/go/notebooks v1.7.0/go.mod h1:PVlaDGfJgj1fl1S3dUwhFMXFgfYGhYQt2164xOMONmE= -cloud.google.com/go/notebooks v1.8.0/go.mod h1:Lq6dYKOYOWUCTvw5t2q1gp1lAp0zxAxRycayS0iJcqQ= -cloud.google.com/go/optimization v1.1.0/go.mod h1:5po+wfvX5AQlPznyVEZjGJTMr4+CAkJf2XSTQOOl9l4= -cloud.google.com/go/optimization v1.2.0/go.mod h1:Lr7SOHdRDENsh+WXVmQhQTrzdu9ybg0NecjHidBq6xs= -cloud.google.com/go/optimization v1.3.1/go.mod h1:IvUSefKiwd1a5p0RgHDbWCIbDFgKuEdB+fPPuP0IDLI= -cloud.google.com/go/orchestration v1.3.0/go.mod h1:Sj5tq/JpWiB//X/q3Ngwdl5K7B7Y0KZ7bfv0wL6fqVA= -cloud.google.com/go/orchestration v1.4.0/go.mod h1:6W5NLFWs2TlniBphAViZEVhrXRSMgUGDfW7vrWKvsBk= -cloud.google.com/go/orchestration v1.6.0/go.mod h1:M62Bevp7pkxStDfFfTuCOaXgaaqRAga1yKyoMtEoWPQ= -cloud.google.com/go/orgpolicy v1.4.0/go.mod h1:xrSLIV4RePWmP9P3tBl8S93lTmlAxjm06NSm2UTmKvE= -cloud.google.com/go/orgpolicy v1.5.0/go.mod h1:hZEc5q3wzwXJaKrsx5+Ewg0u1LxJ51nNFlext7Tanwc= -cloud.google.com/go/orgpolicy v1.10.0/go.mod h1:w1fo8b7rRqlXlIJbVhOMPrwVljyuW5mqssvBtU18ONc= -cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= -cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= -cloud.google.com/go/osconfig v1.9.0/go.mod h1:Yx+IeIZJ3bdWmzbQU4fxNl8xsZ4amB+dygAwFPlvnNo= -cloud.google.com/go/osconfig v1.10.0/go.mod h1:uMhCzqC5I8zfD9zDEAfvgVhDS8oIjySWh+l4WK6GnWw= -cloud.google.com/go/osconfig v1.11.0/go.mod h1:aDICxrur2ogRd9zY5ytBLV89KEgT2MKB2L/n6x1ooPw= -cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= -cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= -cloud.google.com/go/oslogin v1.6.0/go.mod h1:zOJ1O3+dTU8WPlGEkFSh7qeHPPSoxrcMbbK1Nm2iX70= -cloud.google.com/go/oslogin v1.7.0/go.mod h1:e04SN0xO1UNJ1M5GP0vzVBFicIe4O53FOfcixIqTyXo= -cloud.google.com/go/oslogin v1.9.0/go.mod h1:HNavntnH8nzrn8JCTT5fj18FuJLFJc4NaZJtBnQtKFs= -cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= -cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= -cloud.google.com/go/phishingprotection v0.7.0/go.mod h1:8qJI4QKHoda/sb/7/YmMQ2omRLSLYSu9bU0EKCNI+Lk= -cloud.google.com/go/policytroubleshooter v1.3.0/go.mod h1:qy0+VwANja+kKrjlQuOzmlvscn4RNsAc0e15GGqfMxg= -cloud.google.com/go/policytroubleshooter v1.4.0/go.mod h1:DZT4BcRw3QoO8ota9xw/LKtPa8lKeCByYeKTIf/vxdE= -cloud.google.com/go/policytroubleshooter v1.5.0/go.mod h1:Rz1WfV+1oIpPdN2VvvuboLVRsB1Hclg3CKQ53j9l8vw= -cloud.google.com/go/policytroubleshooter v1.6.0/go.mod h1:zYqaPTsmfvpjm5ULxAyD/lINQxJ0DDsnWOP/GZ7xzBc= -cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= -cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= -cloud.google.com/go/privatecatalog v0.7.0/go.mod h1:2s5ssIFO69F5csTXcwBP7NPFTZvps26xGzvQ2PQaBYg= -cloud.google.com/go/privatecatalog v0.8.0/go.mod h1:nQ6pfaegeDAq/Q5lrfCQzQLhubPiZhSaNhIgfJlnIXs= -cloud.google.com/go/pubsub v1.26.0/go.mod h1:QgBH3U/jdJy/ftjPhTkyXNj543Tin1pRYcdcPRnFIRI= -cloud.google.com/go/pubsub v1.27.1/go.mod h1:hQN39ymbV9geqBnfQq6Xf63yNhUAhv9CZhzp5O6qsW0= -cloud.google.com/go/pubsub v1.28.0/go.mod h1:vuXFpwaVoIPQMGXqRyUQigu/AX1S3IWugR9xznmcXX8= -cloud.google.com/go/pubsub v1.30.0/go.mod h1:qWi1OPS0B+b5L+Sg6Gmc9zD1Y+HaM0MdUr7LsupY1P4= -cloud.google.com/go/pubsublite v1.5.0/go.mod h1:xapqNQ1CuLfGi23Yda/9l4bBCKz/wC3KIJ5gKcxveZg= -cloud.google.com/go/pubsublite v1.6.0/go.mod h1:1eFCS0U11xlOuMFV/0iBqw3zP12kddMeCbj/F3FSj9k= -cloud.google.com/go/pubsublite v1.7.0/go.mod h1:8hVMwRXfDfvGm3fahVbtDbiLePT3gpoiJYJY+vxWxVM= -cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= -cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o= -cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk= -cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo= -cloud.google.com/go/recaptchaenterprise/v2 v2.4.0/go.mod h1:Am3LHfOuBstrLrNCBrlI5sbwx9LBg3te2N6hGvHn2mE= -cloud.google.com/go/recaptchaenterprise/v2 v2.5.0/go.mod h1:O8LzcHXN3rz0j+LBC91jrwI3R+1ZSZEWrfL7XHgNo9U= -cloud.google.com/go/recaptchaenterprise/v2 v2.6.0/go.mod h1:RPauz9jeLtB3JVzg6nCbe12qNoaa8pXc4d/YukAmcnA= -cloud.google.com/go/recaptchaenterprise/v2 v2.7.0/go.mod h1:19wVj/fs5RtYtynAPJdDTb69oW0vNHYDBTbB4NvMD9c= -cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= -cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= -cloud.google.com/go/recommendationengine v0.7.0/go.mod h1:1reUcE3GIu6MeBz/h5xZJqNLuuVjNg1lmWMPyjatzac= -cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= -cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= -cloud.google.com/go/recommender v1.7.0/go.mod h1:XLHs/W+T8olwlGOgfQenXBTbIseGclClff6lhFVe9Bs= -cloud.google.com/go/recommender v1.8.0/go.mod h1:PkjXrTT05BFKwxaUxQmtIlrtj0kph108r02ZZQ5FE70= -cloud.google.com/go/recommender v1.9.0/go.mod h1:PnSsnZY7q+VL1uax2JWkt/UegHssxjUVVCrX52CuEmQ= -cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= -cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= -cloud.google.com/go/redis v1.9.0/go.mod h1:HMYQuajvb2D0LvMgZmLDZW8V5aOC/WxstZHiy4g8OiA= -cloud.google.com/go/redis v1.10.0/go.mod h1:ThJf3mMBQtW18JzGgh41/Wld6vnDDc/F/F35UolRZPM= -cloud.google.com/go/redis v1.11.0/go.mod h1:/X6eicana+BWcUda5PpwZC48o37SiFVTFSs0fWAJ7uQ= -cloud.google.com/go/resourcemanager v1.3.0/go.mod h1:bAtrTjZQFJkiWTPDb1WBjzvc6/kifjj4QBYuKCCoqKA= -cloud.google.com/go/resourcemanager v1.4.0/go.mod h1:MwxuzkumyTX7/a3n37gmsT3py7LIXwrShilPh3P1tR0= -cloud.google.com/go/resourcemanager v1.5.0/go.mod h1:eQoXNAiAvCf5PXxWxXjhKQoTMaUSNrEfg+6qdf/wots= -cloud.google.com/go/resourcemanager v1.6.0/go.mod h1:YcpXGRs8fDzcUl1Xw8uOVmI8JEadvhRIkoXXUNVYcVo= -cloud.google.com/go/resourcemanager v1.7.0/go.mod h1:HlD3m6+bwhzj9XCouqmeiGuni95NTrExfhoSrkC/3EI= -cloud.google.com/go/resourcesettings v1.3.0/go.mod h1:lzew8VfESA5DQ8gdlHwMrqZs1S9V87v3oCnKCWoOuQU= -cloud.google.com/go/resourcesettings v1.4.0/go.mod h1:ldiH9IJpcrlC3VSuCGvjR5of/ezRrOxFtpJoJo5SmXg= -cloud.google.com/go/resourcesettings v1.5.0/go.mod h1:+xJF7QSG6undsQDfsCJyqWXyBwUoJLhetkRMDRnIoXA= -cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= -cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= -cloud.google.com/go/retail v1.10.0/go.mod h1:2gDk9HsL4HMS4oZwz6daui2/jmKvqShXKQuB2RZ+cCc= -cloud.google.com/go/retail v1.11.0/go.mod h1:MBLk1NaWPmh6iVFSz9MeKG/Psyd7TAgm6y/9L2B4x9Y= -cloud.google.com/go/retail v1.12.0/go.mod h1:UMkelN/0Z8XvKymXFbD4EhFJlYKRx1FGhQkVPU5kF14= -cloud.google.com/go/run v0.2.0/go.mod h1:CNtKsTA1sDcnqqIFR3Pb5Tq0usWxJJvsWOCPldRU3Do= -cloud.google.com/go/run v0.3.0/go.mod h1:TuyY1+taHxTjrD0ZFk2iAR+xyOXEA0ztb7U3UNA0zBo= -cloud.google.com/go/run v0.8.0/go.mod h1:VniEnuBwqjigv0A7ONfQUaEItaiCRVujlMqerPPiktM= -cloud.google.com/go/run v0.9.0/go.mod h1:Wwu+/vvg8Y+JUApMwEDfVfhetv30hCG4ZwDR/IXl2Qg= -cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= -cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= -cloud.google.com/go/scheduler v1.6.0/go.mod h1:SgeKVM7MIwPn3BqtcBntpLyrIJftQISRrYB5ZtT+KOk= -cloud.google.com/go/scheduler v1.7.0/go.mod h1:jyCiBqWW956uBjjPMMuX09n3x37mtyPJegEWKxRsn44= -cloud.google.com/go/scheduler v1.8.0/go.mod h1:TCET+Y5Gp1YgHT8py4nlg2Sew8nUHMqcpousDgXJVQc= -cloud.google.com/go/scheduler v1.9.0/go.mod h1:yexg5t+KSmqu+njTIh3b7oYPheFtBWGcbVUYF1GGMIc= -cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= -cloud.google.com/go/secretmanager v1.8.0/go.mod h1:hnVgi/bN5MYHd3Gt0SPuTPPp5ENina1/LxM+2W9U9J4= -cloud.google.com/go/secretmanager v1.9.0/go.mod h1:b71qH2l1yHmWQHt9LC80akm86mX8AL6X1MA01dW8ht4= -cloud.google.com/go/secretmanager v1.10.0/go.mod h1:MfnrdvKMPNra9aZtQFvBcvRU54hbPD8/HayQdlUgJpU= -cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= -cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= -cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= -cloud.google.com/go/security v1.9.0/go.mod h1:6Ta1bO8LXI89nZnmnsZGp9lVoVWXqsVbIq/t9dzI+2Q= -cloud.google.com/go/security v1.10.0/go.mod h1:QtOMZByJVlibUT2h9afNDWRZ1G96gVywH8T5GUSb9IA= -cloud.google.com/go/security v1.12.0/go.mod h1:rV6EhrpbNHrrxqlvW0BWAIawFWq3X90SduMJdFwtLB8= -cloud.google.com/go/security v1.13.0/go.mod h1:Q1Nvxl1PAgmeW0y3HTt54JYIvUdtcpYKVfIB8AOMZ+0= -cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= -cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= -cloud.google.com/go/securitycenter v1.15.0/go.mod h1:PeKJ0t8MoFmmXLXWm41JidyzI3PJjd8sXWaVqg43WWk= -cloud.google.com/go/securitycenter v1.16.0/go.mod h1:Q9GMaLQFUD+5ZTabrbujNWLtSLZIZF7SAR0wWECrjdk= -cloud.google.com/go/securitycenter v1.18.1/go.mod h1:0/25gAzCM/9OL9vVx4ChPeM/+DlfGQJDwBy/UC8AKK0= -cloud.google.com/go/securitycenter v1.19.0/go.mod h1:LVLmSg8ZkkyaNy4u7HCIshAngSQ8EcIRREP3xBnyfag= -cloud.google.com/go/servicecontrol v1.4.0/go.mod h1:o0hUSJ1TXJAmi/7fLJAedOovnujSEvjKCAFNXPQ1RaU= -cloud.google.com/go/servicecontrol v1.5.0/go.mod h1:qM0CnXHhyqKVuiZnGKrIurvVImCs8gmqWsDoqe9sU1s= -cloud.google.com/go/servicecontrol v1.10.0/go.mod h1:pQvyvSRh7YzUF2efw7H87V92mxU8FnFDawMClGCNuAA= -cloud.google.com/go/servicecontrol v1.11.0/go.mod h1:kFmTzYzTUIuZs0ycVqRHNaNhgR+UMUpw9n02l/pY+mc= -cloud.google.com/go/servicecontrol v1.11.1/go.mod h1:aSnNNlwEFBY+PWGQ2DoM0JJ/QUXqV5/ZD9DOLB7SnUk= -cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs= -cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg= -cloud.google.com/go/servicedirectory v1.6.0/go.mod h1:pUlbnWsLH9c13yGkxCmfumWEPjsRs1RlmJ4pqiNjVL4= -cloud.google.com/go/servicedirectory v1.7.0/go.mod h1:5p/U5oyvgYGYejufvxhgwjL8UVXjkuw7q5XcG10wx1U= -cloud.google.com/go/servicedirectory v1.8.0/go.mod h1:srXodfhY1GFIPvltunswqXpVxFPpZjf8nkKQT7XcXaY= -cloud.google.com/go/servicedirectory v1.9.0/go.mod h1:29je5JjiygNYlmsGz8k6o+OZ8vd4f//bQLtvzkPPT/s= -cloud.google.com/go/servicemanagement v1.4.0/go.mod h1:d8t8MDbezI7Z2R1O/wu8oTggo3BI2GKYbdG4y/SJTco= -cloud.google.com/go/servicemanagement v1.5.0/go.mod h1:XGaCRe57kfqu4+lRxaFEAuqmjzF0r+gWHjWqKqBvKFo= -cloud.google.com/go/servicemanagement v1.6.0/go.mod h1:aWns7EeeCOtGEX4OvZUWCCJONRZeFKiptqKf1D0l/Jc= -cloud.google.com/go/servicemanagement v1.8.0/go.mod h1:MSS2TDlIEQD/fzsSGfCdJItQveu9NXnUniTrq/L8LK4= -cloud.google.com/go/serviceusage v1.3.0/go.mod h1:Hya1cozXM4SeSKTAgGXgj97GlqUvF5JaoXacR1JTP/E= -cloud.google.com/go/serviceusage v1.4.0/go.mod h1:SB4yxXSaYVuUBYUml6qklyONXNLt83U0Rb+CXyhjEeU= -cloud.google.com/go/serviceusage v1.5.0/go.mod h1:w8U1JvqUqwJNPEOTQjrMHkw3IaIFLoLsPLvsE3xueec= -cloud.google.com/go/serviceusage v1.6.0/go.mod h1:R5wwQcbOWsyuOfbP9tGdAnCAc6B9DRwPG1xtWMDeuPA= -cloud.google.com/go/shell v1.3.0/go.mod h1:VZ9HmRjZBsjLGXusm7K5Q5lzzByZmJHf1d0IWHEN5X4= -cloud.google.com/go/shell v1.4.0/go.mod h1:HDxPzZf3GkDdhExzD/gs8Grqk+dmYcEjGShZgYa9URw= -cloud.google.com/go/shell v1.6.0/go.mod h1:oHO8QACS90luWgxP3N9iZVuEiSF84zNyLytb+qE2f9A= -cloud.google.com/go/spanner v1.41.0/go.mod h1:MLYDBJR/dY4Wt7ZaMIQ7rXOTLjYrmxLE/5ve9vFfWos= -cloud.google.com/go/spanner v1.44.0/go.mod h1:G8XIgYdOK+Fbcpbs7p2fiprDw4CaZX63whnSMLVBxjk= -cloud.google.com/go/spanner v1.45.0/go.mod h1:FIws5LowYz8YAE1J8fOS7DJup8ff7xJeetWEo5REA2M= -cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= -cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= -cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= -cloud.google.com/go/speech v1.9.0/go.mod h1:xQ0jTcmnRFFM2RfX/U+rk6FQNUF6DQlydUSyoooSpco= -cloud.google.com/go/speech v1.14.1/go.mod h1:gEosVRPJ9waG7zqqnsHpYTOoAS4KouMRLDFMekpJ0J0= -cloud.google.com/go/speech v1.15.0/go.mod h1:y6oH7GhqCaZANH7+Oe0BhgIogsNInLlz542tg3VqeYI= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= -cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5ogcBBKhU86Y= -cloud.google.com/go/storage v1.29.0/go.mod h1:4puEjyTKnku6gfKoTfNOU/W+a9JyuVNxjpS5GBrB8h4= -cloud.google.com/go/storagetransfer v1.5.0/go.mod h1:dxNzUopWy7RQevYFHewchb29POFv3/AaBgnhqzqiK0w= -cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS7Gh6pSKrM8dJyg6I= -cloud.google.com/go/storagetransfer v1.7.0/go.mod h1:8Giuj1QNb1kfLAiWM1bN6dHzfdlDAVC9rv9abHot2W4= -cloud.google.com/go/storagetransfer v1.8.0/go.mod h1:JpegsHHU1eXg7lMHkvf+KE5XDJ7EQu0GwNJbbVGanEw= -cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= -cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= -cloud.google.com/go/talent v1.3.0/go.mod h1:CmcxwJ/PKfRgd1pBjQgU6W3YBwiewmUzQYH5HHmSCmM= -cloud.google.com/go/talent v1.4.0/go.mod h1:ezFtAgVuRf8jRsvyE6EwmbTK5LKciD4KVnHuDEFmOOA= -cloud.google.com/go/talent v1.5.0/go.mod h1:G+ODMj9bsasAEJkQSzO2uHQWXHHXUomArjWQQYkqK6c= -cloud.google.com/go/texttospeech v1.4.0/go.mod h1:FX8HQHA6sEpJ7rCMSfXuzBcysDAuWusNNNvN9FELDd8= -cloud.google.com/go/texttospeech v1.5.0/go.mod h1:oKPLhR4n4ZdQqWKURdwxMy0uiTS1xU161C8W57Wkea4= -cloud.google.com/go/texttospeech v1.6.0/go.mod h1:YmwmFT8pj1aBblQOI3TfKmwibnsfvhIBzPXcW4EBovc= -cloud.google.com/go/tpu v1.3.0/go.mod h1:aJIManG0o20tfDQlRIej44FcwGGl/cD0oiRyMKG19IQ= -cloud.google.com/go/tpu v1.4.0/go.mod h1:mjZaX8p0VBgllCzF6wcU2ovUXN9TONFLd7iz227X2Xg= -cloud.google.com/go/tpu v1.5.0/go.mod h1:8zVo1rYDFuW2l4yZVY0R0fb/v44xLh3llq7RuV61fPM= -cloud.google.com/go/trace v1.3.0/go.mod h1:FFUE83d9Ca57C+K8rDl/Ih8LwOzWIV1krKgxg6N0G28= -cloud.google.com/go/trace v1.4.0/go.mod h1:UG0v8UBqzusp+z63o7FK74SdFE+AXpCLdFb1rshXG+Y= -cloud.google.com/go/trace v1.8.0/go.mod h1:zH7vcsbAhklH8hWFig58HvxcxyQbaIqMarMg9hn5ECA= -cloud.google.com/go/trace v1.9.0/go.mod h1:lOQqpE5IaWY0Ixg7/r2SjixMuc6lfTFeO4QGM4dQWOk= -cloud.google.com/go/translate v1.3.0/go.mod h1:gzMUwRjvOqj5i69y/LYLd8RrNQk+hOmIXTi9+nb3Djs= -cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg= -cloud.google.com/go/translate v1.5.0/go.mod h1:29YDSYveqqpA1CQFD7NQuP49xymq17RXNaUDdc0mNu0= -cloud.google.com/go/translate v1.6.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= -cloud.google.com/go/translate v1.7.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= -cloud.google.com/go/video v1.8.0/go.mod h1:sTzKFc0bUSByE8Yoh8X0mn8bMymItVGPfTuUBUyRgxk= -cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw= -cloud.google.com/go/video v1.12.0/go.mod h1:MLQew95eTuaNDEGriQdcYn0dTwf9oWiA4uYebxM5kdg= -cloud.google.com/go/video v1.13.0/go.mod h1:ulzkYlYgCp15N2AokzKjy7MQ9ejuynOJdf1tR5lGthk= -cloud.google.com/go/video v1.14.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= -cloud.google.com/go/video v1.15.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= -cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= -cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= -cloud.google.com/go/videointelligence v1.8.0/go.mod h1:dIcCn4gVDdS7yte/w+koiXn5dWVplOZkE+xwG9FgK+M= -cloud.google.com/go/videointelligence v1.9.0/go.mod h1:29lVRMPDYHikk3v8EdPSaL8Ku+eMzDljjuvRs105XoU= -cloud.google.com/go/videointelligence v1.10.0/go.mod h1:LHZngX1liVtUhZvi2uNS0VQuOzNi2TkY1OakiuoUOjU= -cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= -cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= -cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= -cloud.google.com/go/vision/v2 v2.4.0/go.mod h1:VtI579ll9RpVTrdKdkMzckdnwMyX2JILb+MhPqRbPsY= -cloud.google.com/go/vision/v2 v2.5.0/go.mod h1:MmaezXOOE+IWa+cS7OhRRLK2cNv1ZL98zhqFFZaaH2E= -cloud.google.com/go/vision/v2 v2.6.0/go.mod h1:158Hes0MvOS9Z/bDMSFpjwsUrZ5fPrdwuyyvKSGAGMY= -cloud.google.com/go/vision/v2 v2.7.0/go.mod h1:H89VysHy21avemp6xcf9b9JvZHVehWbET0uT/bcuY/0= -cloud.google.com/go/vmmigration v1.2.0/go.mod h1:IRf0o7myyWFSmVR1ItrBSFLFD/rJkfDCUTO4vLlJvsE= -cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g= -cloud.google.com/go/vmmigration v1.5.0/go.mod h1:E4YQ8q7/4W9gobHjQg4JJSgXXSgY21nA5r8swQV+Xxc= -cloud.google.com/go/vmmigration v1.6.0/go.mod h1:bopQ/g4z+8qXzichC7GW1w2MjbErL54rk3/C843CjfY= -cloud.google.com/go/vmwareengine v0.1.0/go.mod h1:RsdNEf/8UDvKllXhMz5J40XxDrNJNN4sagiox+OI208= -cloud.google.com/go/vmwareengine v0.2.2/go.mod h1:sKdctNJxb3KLZkE/6Oui94iw/xs9PRNC2wnNLXsHvH8= -cloud.google.com/go/vmwareengine v0.3.0/go.mod h1:wvoyMvNWdIzxMYSpH/R7y2h5h3WFkx6d+1TIsP39WGY= -cloud.google.com/go/vpcaccess v1.4.0/go.mod h1:aQHVbTWDYUR1EbTApSVvMq1EnT57ppDmQzZ3imqIk4w= -cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8= -cloud.google.com/go/vpcaccess v1.6.0/go.mod h1:wX2ILaNhe7TlVa4vC5xce1bCnqE3AeH27RV31lnmZes= -cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= -cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= -cloud.google.com/go/webrisk v1.6.0/go.mod h1:65sW9V9rOosnc9ZY7A7jsy1zoHS5W9IAXv6dGqhMQMc= -cloud.google.com/go/webrisk v1.7.0/go.mod h1:mVMHgEYH0r337nmt1JyLthzMr6YxwN1aAIEc2fTcq7A= -cloud.google.com/go/webrisk v1.8.0/go.mod h1:oJPDuamzHXgUc+b8SiHRcVInZQuybnvEW72PqTc7sSg= -cloud.google.com/go/websecurityscanner v1.3.0/go.mod h1:uImdKm2wyeXQevQJXeh8Uun/Ym1VqworNDlBXQevGMo= -cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S8CzdTkAS77oDsiSqYWQ= -cloud.google.com/go/websecurityscanner v1.5.0/go.mod h1:Y6xdCPy81yi0SQnDY1xdNTNpfY1oAgXUlcfN3B3eSng= -cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= -cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M= -cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= -cloud.google.com/go/workflows v1.10.0/go.mod h1:fZ8LmRmZQWacon9UCX1r/g/DfAXx5VcPALq2CxzdePw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= -git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= +cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68/go.mod h1:1a3eRNYX12fs5UABBIXS8HXVvQbX9hRB/RkEBPORpe8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY= -github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk= -github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0= -github.com/apache/arrow/go/v11 v11.0.0/go.mod h1:Eg5OsL5H+e299f7u5ssuXsuHQVEGC4xei5aX110hRiI= -github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= -github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230310173818-32f1caf87195/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= 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= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= -github.com/envoyproxy/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJJM//w9BV6Fxbg2LuVd34= -github.com/envoyproxy/go-control-plane v0.11.0/go.mod h1:VnHyVMpzcLvCFt9yUz1UnCwHLhwx1WguiVDV7pTG/tI= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= -github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= -github.com/envoyproxy/protoc-gen-validate v0.10.0/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= -github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= -github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= -github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= -github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= -github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= -github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= -github.com/go-fonts/liberation v0.2.0/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= -github.com/go-fonts/stix v0.1.0/go.mod h1:w/c1f0ldAUlJmLBvlbkvVXLAD+tAMqobIIQpmnUIzUY= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2CSIqUrmQPqA0gdRIlnLEY0gK5JGjh37zN5U= -github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81/go.mod h1:SX0U8uGpxhq9o2S/CELCSUxEWWAuoCUcVCQWv7G2OCk= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= -github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/s2a-go v0.1.0/go.mod h1:OJpEgntRZo8ugHpF9hkoLJbS5dSI20XZeXJ9JVywLlM= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= -github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= -github.com/googleapis/enterprise-certificate-proxy v0.2.1/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= -github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= -github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= -github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= -github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= -github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= -github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= -github.com/googleapis/gax-go/v2 v2.8.0/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= -github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +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/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= -github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= -github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= -github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= +github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= -github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +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/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= -github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= -github.com/lyft/protoc-gen-star/v2 v2.0.1/go.mod h1:RcCdONR2ScXaYnQC5tUzxzlpA3WVYF7/opLeUgcQs/o= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= -github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mostynb/go-grpc-compression v1.2.1 h1:16tdYxBZSD8p9AUmvw4F7Nyc2T4/eE7XsIXrgxSEcJI= -github.com/mostynb/go-grpc-compression v1.2.1/go.mod h1:oidYvYyefMmhcuvU8fLJ8FfZyTyVzJ6SkmD5fIKgRe8= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= -github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= -github.com/phpdave11/gofpdi v1.0.13/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= -github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= +github.com/mostynb/go-grpc-compression v1.2.2 h1:XaDbnRvt2+1vgr0b/l0qh4mJAfIxE0bKXtz2Znl3GGI= +github.com/mostynb/go-grpc-compression v1.2.2/go.mod h1:GOCr2KBxXcblCuczg3YdLQlcin1/NfyDA348ckuCH6w= 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/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= -github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= -github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rs/cors v1.10.0 h1:62NOS1h+r8p1mW6FM0FSB0exioXLhd/sh15KpjWBZ+8= -github.com/rs/cors v1.10.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= +github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= -github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= -github.com/shirou/gopsutil/v3 v3.23.8 h1:xnATPiybo6GgdRoC4YoGnxXZFRc3dqQTGi73oLvvBrE= -github.com/shirou/gopsutil/v3 v3.23.8/go.mod h1:7hmCaBn+2ZwaZOr6jmPBZDfawwMGuo1id3C6aM8EDqQ= +github.com/shirou/gopsutil/v3 v3.24.1 h1:R3t6ondCEvmARp3wxODhXMTLC/klMa87h2PHUw5m7QI= +github.com/shirou/gopsutil/v3 v3.24.1/go.mod h1:UU7a2MSBQa+kW1uuDq8DeEBS8kmrnQwsv2b5O513rwU= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 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/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= -github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.44.0 h1:b8xjZxHbLrXAum4SxJd1Rlm7Y/fKaB+6ACI7/e5EfSA= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.44.0/go.mod h1:1ei0a32xOGkFoySu7y1DAHfcuIhC0pNZpvY2huXuMy4= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0 h1:KfYpVmrjI7JuToy5k8XV3nkapjWx48k4E4JOtVstzQI= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0/go.mod h1:SeQhzAEccGVZVEy7aH87Nh0km+utSpo1pTv6eMMop48= -go.opentelemetry.io/contrib/propagators/b3 v1.19.0 h1:ulz44cpm6V5oAeg5Aw9HyqGFMS6XM7untlMEhD7YzzA= -go.opentelemetry.io/contrib/propagators/b3 v1.19.0/go.mod h1:OzCmE2IVS+asTI+odXQstRGVfXQ4bXv9nMBRK0nNyqQ= -go.opentelemetry.io/contrib/zpages v0.44.0 h1:9J/cxTTWhM6kzgdaBt6NiXS2HUreXn/eW2M+vzHgDAQ= -go.opentelemetry.io/contrib/zpages v0.44.0/go.mod h1:G3eNCGhodjn2wIdM+i6GneZb1Cqg6dNRBlm1cpNEElg= -go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= -go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/bridge/opencensus v0.41.0 h1:VBpeaTbrvLFHvRtsyCJXjsTaicBNrAFdmctiN1k6WNI= -go.opentelemetry.io/otel/bridge/opencensus v0.41.0/go.mod h1:yCQB5IKRhgjlbTLc91+ixcZc2/8BncGGJ+CS3dZJwtY= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.41.0 h1:k0k7hFNDd8K4iOMJXj7s8sHaC4mhTlAeppRmZXLgZ6k= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.41.0/go.mod h1:hG4Fj/y8TR/tlEDREo8tWstl9fO9gcFkn4xrx0Io8xU= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.41.0 h1:HgbDTD8pioFdY3NRc/YCvsWjqQPtweGyXxa32LgnTOw= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.41.0/go.mod h1:tmvt/yK5Es5d6lHYWerLSOna8lCEfrBVX/a9M0ggqss= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.41.0 h1:iV3BOgW4fry1Riw9dwypigqlIYWXvSRVT2RJmblzo40= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.41.0/go.mod h1:7PGzqlKrxIRmbj5tlNW0nTkYZ5fHXDgk6Fy8/KjR0CI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.18.0 h1:IAtl+7gua134xcV3NieDhJHjjOVeJhXAnYf/0hswjUY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.18.0/go.mod h1:w+pXobnBzh95MNIkeIuAKcHe/Uu/CX2PKIvBP6ipKRA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.18.0 h1:yE32ay7mJG2leczfREEhoW3VfSZIvHaB+gvVo1o8DQ8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.18.0/go.mod h1:G17FHPDLt74bCI7tJ4CMitEk4BXTYG4FW6XUpkPBXa4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.18.0 h1:6pu8ttx76BxHf+xz/H77AUZkPF3cwWzXqAUsXhVKI18= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.18.0/go.mod h1:IOmXxPrxoxFMXdNy7lfDmE8MzE61YPcurbUm0SMjerI= -go.opentelemetry.io/otel/exporters/prometheus v0.41.0 h1:A3/bhjP5SmELy8dcpK+uttHeh9Qrh+YnS16/VzrztRQ= -go.opentelemetry.io/otel/exporters/prometheus v0.41.0/go.mod h1:mKuXEMi9suyyNJQ99SZCO0mpWGFe0MIALtjd3r6uo7Q= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.41.0 h1:XzjGkawtAXs20Y+s6k1GNDMBsMDOV28TOT8cxmE42qM= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.41.0/go.mod h1:HAomEgjcKZk3VJ+HHdHLnhZXeGqdzPxxNTdKYRopUXY= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.18.0 h1:hSWWvDjXHVLq9DkmB+77fl8v7+t+yYiS+eNkiplDK54= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.18.0/go.mod h1:zG7KQql1WjZCaUJd+L/ReSYx4bjbYJxg5ws9ws+mYes= -go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= -go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= -go.opentelemetry.io/otel/sdk v1.18.0 h1:e3bAB0wB3MljH38sHzpV/qWrOTCFrdZF2ct9F8rBkcY= -go.opentelemetry.io/otel/sdk v1.18.0/go.mod h1:1RCygWV7plY2KmdskZEDDBs4tJeHG92MdHZIluiYs/M= -go.opentelemetry.io/otel/sdk/metric v0.41.0 h1:c3sAt9/pQ5fSIUfl0gPtClV3HhE18DCVzByD33R/zsk= -go.opentelemetry.io/otel/sdk/metric v0.41.0/go.mod h1:PmOmSt+iOklKtIg5O4Vz9H/ttcRFSNTgii+E1KGyn1w= -go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= -go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= -go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= +go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0 h1:P+/g8GpuJGYbOp2tAdKrIPUX9JO02q8Q0YNlHolpibA= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0/go.mod h1:tIKj3DbO8N9Y2xo52og3irLsPI4GW02DSMtrVgNMgxg= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/contrib/propagators/b3 v1.24.0 h1:n4xwCdTx3pZqZs2CjS/CUZAs03y3dZcGhC/FepKtEUY= +go.opentelemetry.io/contrib/propagators/b3 v1.24.0/go.mod h1:k5wRxKRU2uXx2F8uNJ4TaonuEO/V7/5xoz7kdsDACT8= +go.opentelemetry.io/contrib/zpages v0.49.0 h1:Wk217PkNBxcKWnIQpwtbZZE286K4ZY9uajnM5woSeLU= +go.opentelemetry.io/contrib/zpages v0.49.0/go.mod h1:6alLi5mmkZWbAtZMRPd1ffIgkTcsU9OTHQF2NbSOhrQ= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/bridge/opencensus v1.24.0 h1:Vlhy5ee5k5R0zASpH+9AgHiJH7xnKACI3XopO1tUZfY= +go.opentelemetry.io/otel/bridge/opencensus v1.24.0/go.mod h1:jRjVXV/X38jyrnHtvMGN8+9cejZB21JvXAAvooF2s+Q= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.24.0 h1:f2jriWfOdldanBwS9jNBdeOKAQN7b4ugAMaNu1/1k9g= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.24.0/go.mod h1:B+bcQI1yTY+N0vqMpoZbEN7+XU4tNM0DmUiOwebFJWI= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.24.0 h1:mM8nKi6/iFQ0iqst80wDHU2ge198Ye/TfN0WBS5U24Y= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.24.0/go.mod h1:0PrIIzDteLSmNyxqcGYRL4mDIo8OTuBAOI/Bn1URxac= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 h1:Mw5xcxMwlqoJd97vwPxA8isEaIoxsta9/Q51+TTJLGE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0/go.mod h1:CQNu9bj7o7mC6U7+CA/schKEYakYXWr79ucDHTMGhCM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.24.0 h1:JYE2HM7pZbOt5Jhk8ndWZTUWYOVift2cHjXVMkPdmdc= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.24.0/go.mod h1:yMb/8c6hVsnma0RpsBMNo0fEiQKeclawtgaIaOp2MLY= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 h1:s0PHtIkN+3xrbDOpt2M8OTG92cWqUESvzh2MxiR5xY8= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0/go.mod h1:hZlFbDbRt++MMPCCfSJfmhkGIWnX1h3XjkfxZUjLrIA= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3/go.mod h1:NOZ3BPKG0ec/BKJQgnvsSFpcKLM5xXVWnvZS97DWHgE= -golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= -golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20200618115811-c13761719519/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20210216034530-4410531fe030/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20210607152325-775e3b0c77b9/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/image v0.0.0-20220302094943-723b81ca9867/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= -golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= -golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= -golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= -golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= +golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= +golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210304124612-50617c2ba197/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/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-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.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= -golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= -golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= -golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= -gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0= -gonum.org/v1/gonum v0.11.0/go.mod h1:fSG4YDCxxUZQJ7rKsQrj0gMOg00Il0Z96/qMA4bVQhA= gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= gonum.org/v1/gonum v0.14.0/go.mod h1:AoWeoz0becf9QMWtE8iWXNXc27fK4fNeHNf/oMejGfU= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= -gonum.org/v1/plot v0.9.0/go.mod h1:3Pcqqmp6RHvJI72kgb8fThyUnav364FOsdDo2aGW5lY= -gonum.org/v1/plot v0.10.1/go.mod h1:VZW5OlhkL1mysU9vaqNHnsy86inf6Ot+jB3r+BczCEo= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= -google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= -google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= -google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= -google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= -google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= -google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= -google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= -google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= -google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= -google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.99.0/go.mod h1:1YOf74vkVndF7pG6hIHuINsM7eWwpVTAfNMNiL91A08= -google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= -google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= -google.golang.org/api v0.106.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= -google.golang.org/api v0.107.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= -google.golang.org/api v0.108.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= -google.golang.org/api v0.110.0/go.mod h1:7FC4Vvx1Mooxh8C5HWjzZHcavuS2f6pmJpZx60ca7iI= -google.golang.org/api v0.111.0/go.mod h1:qtFHvU9mhgTJegR31csQ+rwxyUTHOKFqCKWp1J0fdw0= -google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg= -google.golang.org/api v0.118.0/go.mod h1:76TtD3vkgmZ66zZzp72bUUklpmQmKlhh6sYtIjYK+5E= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= -google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= -google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= -google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= -google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= -google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= -google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= -google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= -google.golang.org/genproto v0.0.0-20221024153911-1573dae28c9c/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= -google.golang.org/genproto v0.0.0-20221109142239-94d6d90a7d66/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221117204609-8f9c96812029/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221201204527-e3fa12d562f3/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd/go.mod h1:cTsE614GARnxrLsqKREzmNYJACSWWpAWdNMwnD7c2BE= -google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230112194545-e10362b5ecf9/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230113154510-dbe35b8444a5/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230123190316-2c411cf9d197/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230125152338-dcaf20b6aeaa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230127162408-596548ed4efa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230216225411-c8e22ba71e44/go.mod h1:8B0gmkoRebU8ukX6HP+4wrVQUY1+6PkQ44BSyIlflHA= -google.golang.org/genproto v0.0.0-20230222225845-10f96fb3dbec/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= -google.golang.org/genproto v0.0.0-20230223222841-637eb2293923/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= -google.golang.org/genproto v0.0.0-20230303212802-e74f57abe488/go.mod h1:TvhZT5f700eVlTNwND1xoEZQeWTB2RY/65kplwl/bFA= -google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= -google.golang.org/genproto v0.0.0-20230320184635-7606e756e683/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= -google.golang.org/genproto v0.0.0-20230323212658-478b75c54725/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= -google.golang.org/genproto v0.0.0-20230330154414-c0448cd141ea/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= -google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= -google.golang.org/genproto v0.0.0-20230403163135-c38d8f061ccd/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= -google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 h1:Z0hjGZePRE0ZBWotvtrwxFNrNE9CUAGtplaDK5NNI/g= -google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 h1:FmF5cCW94Ij59cfpoLiwTgodWmm60eEV0CjlsVg2fuw= -google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= +google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= +google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c h1:9g7erC9qu44ks7UK4gDNlnk4kOxZG707xKm4jVniy6o= +google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c h1:NUsgEN92SQQqzfA+YtqYNqYmB3DMMYLlIwUZAQFVFbo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= -google.golang.org/grpc v1.52.0/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= -google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= -google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= -google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= -google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1410,71 +290,16 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/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/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= -lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= -lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= -modernc.org/cc/v3 v3.36.0/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= -modernc.org/cc/v3 v3.36.2/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= -modernc.org/cc/v3 v3.36.3/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= -modernc.org/ccgo/v3 v3.0.0-20220428102840-41399a37e894/go.mod h1:eI31LL8EwEBKPpNpA4bU1/i+sKOwOrQy8D87zWUcRZc= -modernc.org/ccgo/v3 v3.0.0-20220430103911-bc99d88307be/go.mod h1:bwdAnOoaIt8Ax9YdWGjxWsdkPcZyRPHqrOvJxaKAKGw= -modernc.org/ccgo/v3 v3.16.4/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= -modernc.org/ccgo/v3 v3.16.6/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= -modernc.org/ccgo/v3 v3.16.8/go.mod h1:zNjwkizS+fIFDrDjIAgBSCLkWbJuHF+ar3QRn+Z9aws= -modernc.org/ccgo/v3 v3.16.9/go.mod h1:zNMzC9A9xeNUepy6KuZBbugn3c0Mc9TeiJO4lgvkJDo= -modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= -modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM= -modernc.org/libc v0.0.0-20220428101251-2d5f3daf273b/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= -modernc.org/libc v1.16.0/go.mod h1:N4LD6DBE9cf+Dzf9buBlzVJndKr/iJHG97vGLHYnb5A= -modernc.org/libc v1.16.1/go.mod h1:JjJE0eu4yeK7tab2n4S1w8tlWd9MxXLRzheaRnAKymU= -modernc.org/libc v1.16.17/go.mod h1:hYIV5VZczAmGZAnG15Vdngn5HSF5cSkbvfz2B7GRuVU= -modernc.org/libc v1.16.19/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= -modernc.org/libc v1.17.0/go.mod h1:XsgLldpP4aWlPlsjqKRdHPqCxCjISdHfM/yeWC5GyW0= -modernc.org/libc v1.17.1/go.mod h1:FZ23b+8LjxZs7XtFMbSzL/EhPxNbfZbErxEHc7cbD9s= -modernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/memory v1.1.1/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= -modernc.org/memory v1.2.0/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= -modernc.org/memory v1.2.1/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= -modernc.org/opt v0.1.1/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= -modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= -modernc.org/sqlite v1.18.1/go.mod h1:6ho+Gow7oX5V+OiOQ6Tr4xeqbx13UZ6t+Fw9IRUG4d4= -modernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw= -modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= -modernc.org/tcl v1.13.1/go.mod h1:XOLfOwzhkljL4itZkK6T72ckMgvj0BDsnKNdZVUOecw= -modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= -modernc.org/z v1.5.1/go.mod h1:eWFB510QWW5Th9YGZT81s+LwvaAs3Q2yr4sP0rmLkv8= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/cmd/otelcorecol/main.go b/cmd/otelcorecol/main.go index e087028fa45..2ab2d3c7249 100644 --- a/cmd/otelcorecol/main.go +++ b/cmd/otelcorecol/main.go @@ -11,18 +11,13 @@ import ( ) func main() { - factories, err := components() - if err != nil { - log.Fatalf("failed to build components: %v", err) - } - info := component.BuildInfo{ Command: "otelcorecol", Description: "Local OpenTelemetry Collector binary, testing only.", - Version: "0.85.0-dev", + Version: "0.96.0-dev", } - if err := run(otelcol.CollectorSettings{BuildInfo: info, Factories: factories}); err != nil { + if err := run(otelcol.CollectorSettings{BuildInfo: info, Factories: components}); err != nil { log.Fatal(err) } } diff --git a/cmd/otelcorecol/main_others.go b/cmd/otelcorecol/main_others.go index e80a51cd4e0..3735aecb586 100644 --- a/cmd/otelcorecol/main_others.go +++ b/cmd/otelcorecol/main_others.go @@ -1,7 +1,6 @@ // Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT. //go:build !windows -// +build !windows package main diff --git a/cmd/otelcorecol/main_windows.go b/cmd/otelcorecol/main_windows.go index ad96fd1e801..fbae5bdc97b 100644 --- a/cmd/otelcorecol/main_windows.go +++ b/cmd/otelcorecol/main_windows.go @@ -1,48 +1,29 @@ // Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT. //go:build windows -// +build windows package main import ( + "errors" "fmt" - "os" + "golang.org/x/sys/windows" "golang.org/x/sys/windows/svc" "go.opentelemetry.io/collector/otelcol" ) func run(params otelcol.CollectorSettings) error { - if useInteractiveMode, err := checkUseInteractiveMode(); err != nil { - return err - } else if useInteractiveMode { - return runInteractive(params) - } else { - return runService(params) - } -} - -func checkUseInteractiveMode() (bool, error) { - // If environment variable NO_WINDOWS_SERVICE is set with any value other - // than 0, use interactive mode instead of running as a service. This should - // be set in case running as a service is not possible or desired even - // though the current session is not detected to be interactive - if value, present := os.LookupEnv("NO_WINDOWS_SERVICE"); present && value != "0" { - return true, nil - } - - isInteractiveSession, err := svc.IsAnInteractiveSession() - if err != nil { - return false, fmt.Errorf("failed to determine if we are running in an interactive session: %w", err) - } - return isInteractiveSession, nil -} - -func runService(params otelcol.CollectorSettings) error { - // do not need to supply service name when startup is invoked through Service Control Manager directly + // No need to supply service name when startup is invoked through + // the Service Control Manager directly. if err := svc.Run("", otelcol.NewSvcHandler(params)); err != nil { + if errors.Is(err, windows.ERROR_FAILED_SERVICE_CONTROLLER_CONNECT) { + // Per https://learn.microsoft.com/en-us/windows/win32/api/winsvc/nf-winsvc-startservicectrldispatchera#return-value + // this means that the process is not running as a service, so run interactively. + return runInteractive(params) + } + return fmt.Errorf("failed to start collector server: %w", err) } diff --git a/cmd/otelcorecol/package_test.go b/cmd/otelcorecol/package_test.go new file mode 100644 index 00000000000..c5c48c671cc --- /dev/null +++ b/cmd/otelcorecol/package_test.go @@ -0,0 +1,17 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package main + +import ( + "testing" + + "go.uber.org/goleak" +) + +// The IgnoreTopFunction call prevents catching the leak generated by opencensus +// defaultWorker.Start which at this time is part of the package's init call. +// See https://github.com/open-telemetry/opentelemetry-collector/issues/9165#issuecomment-1874836336 for more context. +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) +} diff --git a/component/component.go b/component/component.go index 9a6a95d798a..32d69f7eda0 100644 --- a/component/component.go +++ b/component/component.go @@ -11,6 +11,8 @@ import ( var ( // ErrNilNextConsumer can be returned by receiver, or processor Start factory funcs that create the Component if the // expected next Consumer is nil. + // Deprecated: [v0.96.0] The next consumer is now checked as part of the creation of the pipelines. + // This error will be removed in a future release. ErrNilNextConsumer = errors.New("nil next Consumer") // ErrDataTypeIsNotSupported can be returned by receiver, exporter or processor factory funcs that create the @@ -96,6 +98,22 @@ const ( KindConnector ) +func (k Kind) String() string { + switch k { + case KindReceiver: + return "Receiver" + case KindProcessor: + return "Processor" + case KindExporter: + return "Exporter" + case KindExtension: + return "Extension" + case KindConnector: + return "Connector" + } + return "" +} + // StabilityLevel represents the stability level of the component created by the factory. // The stability level is used to determine if the component should be used in production // or not. For more details see: @@ -175,3 +193,10 @@ type CreateDefaultConfigFunc func() Config func (f CreateDefaultConfigFunc) CreateDefaultConfig() Config { return f() } + +// InstanceID uniquely identifies a component instance +type InstanceID struct { + ID ID + Kind Kind + PipelineIDs map[ID]struct{} +} diff --git a/component/component_test.go b/component/component_test.go index 4f8df15a6e6..8b694fb4303 100644 --- a/component/component_test.go +++ b/component/component_test.go @@ -9,6 +9,16 @@ import ( "github.com/stretchr/testify/assert" ) +func TestKindString(t *testing.T) { + assert.EqualValues(t, "", Kind(0).String()) + assert.EqualValues(t, "Receiver", KindReceiver.String()) + assert.EqualValues(t, "Processor", KindProcessor.String()) + assert.EqualValues(t, "Exporter", KindExporter.String()) + assert.EqualValues(t, "Extension", KindExtension.String()) + assert.EqualValues(t, "Connector", KindConnector.String()) + assert.EqualValues(t, "", Kind(100).String()) +} + func TestStabilityLevelString(t *testing.T) { assert.EqualValues(t, "Undefined", StabilityLevelUndefined.String()) assert.EqualValues(t, "Unmaintained", StabilityLevelUnmaintained.String()) diff --git a/component/componenttest/nop_host.go b/component/componenttest/nop_host.go index 4accfab0d8c..ea85ccc8bbe 100644 --- a/component/componenttest/nop_host.go +++ b/component/componenttest/nop_host.go @@ -15,9 +15,7 @@ func NewNopHost() component.Host { return &nopHost{} } -func (nh *nopHost) ReportFatalError(_ error) {} - -func (nh *nopHost) GetFactory(_ component.Kind, _ component.Type) component.Factory { +func (nh *nopHost) GetFactory(component.Kind, component.Type) component.Factory { return nil } diff --git a/component/componenttest/nop_host_test.go b/component/componenttest/nop_host_test.go index 1bcb92d1744..4aada24b1be 100644 --- a/component/componenttest/nop_host_test.go +++ b/component/componenttest/nop_host_test.go @@ -4,7 +4,6 @@ package componenttest import ( - "errors" "testing" "github.com/stretchr/testify/assert" @@ -18,8 +17,7 @@ func TestNewNopHost(t *testing.T) { require.NotNil(t, nh) require.IsType(t, &nopHost{}, nh) - nh.ReportFatalError(errors.New("TestError")) assert.Nil(t, nh.GetExporters()) // nolint: staticcheck assert.Nil(t, nh.GetExtensions()) - assert.Nil(t, nh.GetFactory(component.KindReceiver, "test")) + assert.Nil(t, nh.GetFactory(component.KindReceiver, component.MustNewType("test"))) } diff --git a/component/componenttest/nop_telemetry.go b/component/componenttest/nop_telemetry.go index 438f9ec761a..171e9daa47e 100644 --- a/component/componenttest/nop_telemetry.go +++ b/component/componenttest/nop_telemetry.go @@ -4,8 +4,8 @@ package componenttest // import "go.opentelemetry.io/collector/component/componenttest" import ( - "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" + noopmetric "go.opentelemetry.io/otel/metric/noop" + nooptrace "go.opentelemetry.io/otel/trace/noop" "go.uber.org/zap" "go.opentelemetry.io/collector/component" @@ -17,9 +17,11 @@ import ( func NewNopTelemetrySettings() component.TelemetrySettings { return component.TelemetrySettings{ Logger: zap.NewNop(), - TracerProvider: trace.NewNoopTracerProvider(), - MeterProvider: noop.NewMeterProvider(), + TracerProvider: nooptrace.NewTracerProvider(), + MeterProvider: noopmetric.NewMeterProvider(), MetricsLevel: configtelemetry.LevelNone, Resource: pcommon.NewResource(), + ReportStatus: func(*component.StatusEvent) { + }, } } diff --git a/obsreport/obsreporttest/obsreporttest.go b/component/componenttest/obsreporttest.go similarity index 57% rename from obsreport/obsreporttest/obsreporttest.go rename to component/componenttest/obsreporttest.go index 0ea42ab7734..f342879a533 100644 --- a/obsreport/obsreporttest/obsreporttest.go +++ b/component/componenttest/obsreporttest.go @@ -1,14 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package obsreporttest // import "go.opentelemetry.io/collector/obsreport/obsreporttest" +package componenttest // import "go.opentelemetry.io/collector/component/componenttest" import ( "context" - ocprom "contrib.go.opencensus.io/exporter/prometheus" "github.com/prometheus/client_golang/prometheus" - "go.opencensus.io/stats/view" + "github.com/prometheus/client_golang/prometheus/promhttp" otelprom "go.opentelemetry.io/otel/exporters/prometheus" sdkmetric "go.opentelemetry.io/otel/sdk/metric" "go.opentelemetry.io/otel/sdk/resource" @@ -17,15 +16,7 @@ import ( "go.uber.org/multierr" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/configtelemetry" - "go.opentelemetry.io/collector/exporter" - "go.opentelemetry.io/collector/exporter/exportertest" - "go.opentelemetry.io/collector/internal/obsreportconfig" - "go.opentelemetry.io/collector/processor" - "go.opentelemetry.io/collector/processor/processortest" - "go.opentelemetry.io/collector/receiver" - "go.opentelemetry.io/collector/receiver/receivertest" ) const ( @@ -43,95 +34,92 @@ const ( ) type TestTelemetry struct { - component.TelemetrySettings + ts component.TelemetrySettings id component.ID SpanRecorder *tracetest.SpanRecorder - views []*view.View - otelPrometheusChecker *prometheusChecker - meterProvider *sdkmetric.MeterProvider - ocExporter *ocprom.Exporter -} - -// ToExporterCreateSettings returns an exporter.CreateSettings with configured TelemetrySettings. -// -// Deprecated: [0.85.0] Use exportertest.NewCreateSettings instead -func (tts *TestTelemetry) ToExporterCreateSettings() exporter.CreateSettings { - return exportertest.NewCreateSettings(tts.id, tts.TelemetrySettings) -} - -// ToProcessorCreateSettings returns a processor.CreateSettings with configured TelemetrySettings. -// -// Deprecated: [0.85.0] Use processortest.NewCreateSettings instead -func (tts *TestTelemetry) ToProcessorCreateSettings() processor.CreateSettings { - return processortest.NewCreateSettings(tts.id, tts.TelemetrySettings) -} - -// ToReceiverCreateSettings returns a receiver.CreateSettings with configured TelemetrySettings. -// -// Deprecated: [0.85.0] Use receivertest.NewCreateSettings instead -func (tts *TestTelemetry) ToReceiverCreateSettings() receiver.CreateSettings { - return receivertest.NewCreateSettings(tts.id, tts.TelemetrySettings) + prometheusChecker *prometheusChecker + meterProvider *sdkmetric.MeterProvider } // CheckExporterTraces checks that for the current exported values for trace exporter metrics match given values. // When this function is called it is required to also call SetupTelemetry as first thing. func (tts *TestTelemetry) CheckExporterTraces(sentSpans, sendFailedSpans int64) error { - return tts.otelPrometheusChecker.checkExporterTraces(tts.id, sentSpans, sendFailedSpans) + return tts.prometheusChecker.checkExporterTraces(tts.id, sentSpans, sendFailedSpans) } // CheckExporterMetrics checks that for the current exported values for metrics exporter metrics match given values. // When this function is called it is required to also call SetupTelemetry as first thing. func (tts *TestTelemetry) CheckExporterMetrics(sentMetricsPoints, sendFailedMetricsPoints int64) error { - return tts.otelPrometheusChecker.checkExporterMetrics(tts.id, sentMetricsPoints, sendFailedMetricsPoints) + return tts.prometheusChecker.checkExporterMetrics(tts.id, sentMetricsPoints, sendFailedMetricsPoints) +} + +func (tts *TestTelemetry) CheckExporterEnqueueFailedMetrics(enqueueFailed int64) error { + return tts.prometheusChecker.checkExporterEnqueueFailed(tts.id, "metric_points", enqueueFailed) +} + +func (tts *TestTelemetry) CheckExporterEnqueueFailedTraces(enqueueFailed int64) error { + return tts.prometheusChecker.checkExporterEnqueueFailed(tts.id, "spans", enqueueFailed) +} + +func (tts *TestTelemetry) CheckExporterEnqueueFailedLogs(enqueueFailed int64) error { + return tts.prometheusChecker.checkExporterEnqueueFailed(tts.id, "log_records", enqueueFailed) } // CheckExporterLogs checks that for the current exported values for logs exporter metrics match given values. // When this function is called it is required to also call SetupTelemetry as first thing. func (tts *TestTelemetry) CheckExporterLogs(sentLogRecords, sendFailedLogRecords int64) error { - return tts.otelPrometheusChecker.checkExporterLogs(tts.id, sentLogRecords, sendFailedLogRecords) + return tts.prometheusChecker.checkExporterLogs(tts.id, sentLogRecords, sendFailedLogRecords) +} + +func (tts *TestTelemetry) CheckExporterMetricGauge(metric string, val int64) error { + return tts.prometheusChecker.checkExporterMetricGauge(tts.id, metric, val) } // CheckProcessorTraces checks that for the current exported values for trace exporter metrics match given values. // When this function is called it is required to also call SetupTelemetry as first thing. func (tts *TestTelemetry) CheckProcessorTraces(acceptedSpans, refusedSpans, droppedSpans int64) error { - return tts.otelPrometheusChecker.checkProcessorTraces(tts.id, acceptedSpans, refusedSpans, droppedSpans) + return tts.prometheusChecker.checkProcessorTraces(tts.id, acceptedSpans, refusedSpans, droppedSpans) } // CheckProcessorMetrics checks that for the current exported values for metrics exporter metrics match given values. // When this function is called it is required to also call SetupTelemetry as first thing. func (tts *TestTelemetry) CheckProcessorMetrics(acceptedMetricPoints, refusedMetricPoints, droppedMetricPoints int64) error { - return tts.otelPrometheusChecker.checkProcessorMetrics(tts.id, acceptedMetricPoints, refusedMetricPoints, droppedMetricPoints) + return tts.prometheusChecker.checkProcessorMetrics(tts.id, acceptedMetricPoints, refusedMetricPoints, droppedMetricPoints) } // CheckProcessorLogs checks that for the current exported values for logs exporter metrics match given values. // When this function is called it is required to also call SetupTelemetry as first thing. func (tts *TestTelemetry) CheckProcessorLogs(acceptedLogRecords, refusedLogRecords, droppedLogRecords int64) error { - return tts.otelPrometheusChecker.checkProcessorLogs(tts.id, acceptedLogRecords, refusedLogRecords, droppedLogRecords) + return tts.prometheusChecker.checkProcessorLogs(tts.id, acceptedLogRecords, refusedLogRecords, droppedLogRecords) } // CheckReceiverTraces checks that for the current exported values for trace receiver metrics match given values. // When this function is called it is required to also call SetupTelemetry as first thing. func (tts *TestTelemetry) CheckReceiverTraces(protocol string, acceptedSpans, droppedSpans int64) error { - return tts.otelPrometheusChecker.checkReceiverTraces(tts.id, protocol, acceptedSpans, droppedSpans) + return tts.prometheusChecker.checkReceiverTraces(tts.id, protocol, acceptedSpans, droppedSpans) } // CheckReceiverLogs checks that for the current exported values for logs receiver metrics match given values. // When this function is called it is required to also call SetupTelemetry as first thing. func (tts *TestTelemetry) CheckReceiverLogs(protocol string, acceptedLogRecords, droppedLogRecords int64) error { - return tts.otelPrometheusChecker.checkReceiverLogs(tts.id, protocol, acceptedLogRecords, droppedLogRecords) + return tts.prometheusChecker.checkReceiverLogs(tts.id, protocol, acceptedLogRecords, droppedLogRecords) } // CheckReceiverMetrics checks that for the current exported values for metrics receiver metrics match given values. // When this function is called it is required to also call SetupTelemetry as first thing. func (tts *TestTelemetry) CheckReceiverMetrics(protocol string, acceptedMetricPoints, droppedMetricPoints int64) error { - return tts.otelPrometheusChecker.checkReceiverMetrics(tts.id, protocol, acceptedMetricPoints, droppedMetricPoints) + return tts.prometheusChecker.checkReceiverMetrics(tts.id, protocol, acceptedMetricPoints, droppedMetricPoints) +} + +// CheckScraperMetrics checks that for the current exported values for metrics scraper metrics match given values. +// When this function is called it is required to also call SetupTelemetry as first thing. +func (tts *TestTelemetry) CheckScraperMetrics(receiver component.ID, scraper component.ID, scrapedMetricPoints, erroredMetricPoints int64) error { + return tts.prometheusChecker.checkScraperMetrics(receiver, scraper, scrapedMetricPoints, erroredMetricPoints) } // Shutdown unregisters any views and shuts down the SpanRecorder func (tts *TestTelemetry) Shutdown(ctx context.Context) error { - view.Unregister(tts.views...) - view.UnregisterExporter(tts.ocExporter) var errs error errs = multierr.Append(errs, tts.SpanRecorder.Shutdown(ctx)) if tts.meterProvider != nil { @@ -140,6 +128,11 @@ func (tts *TestTelemetry) Shutdown(ctx context.Context) error { return errs } +// TelemetrySettings returns the TestTelemetry's TelemetrySettings +func (tts *TestTelemetry) TelemetrySettings() component.TelemetrySettings { + return tts.ts +} + // SetupTelemetry does setup the testing environment to check the metrics recorded by receivers, producers or exporters. // The caller must pass the ID of the component that intends to test, so the CreateSettings and Check methods will use. // The caller should defer a call to Shutdown the returned TestTelemetry. @@ -148,27 +141,16 @@ func SetupTelemetry(id component.ID) (TestTelemetry, error) { tp := sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr)) settings := TestTelemetry{ - TelemetrySettings: componenttest.NewNopTelemetrySettings(), - id: id, - SpanRecorder: sr, + ts: NewNopTelemetrySettings(), + id: id, + SpanRecorder: sr, } - settings.TelemetrySettings.TracerProvider = tp - settings.TelemetrySettings.MetricsLevel = configtelemetry.LevelNormal - settings.views = obsreportconfig.AllViews(configtelemetry.LevelNormal) - err := view.Register(settings.views...) - if err != nil { - return settings, err - } - - promReg := prometheus.NewRegistry() + settings.ts.TracerProvider = tp + settings.ts.MetricsLevel = configtelemetry.LevelNormal - settings.ocExporter, err = ocprom.NewExporter(ocprom.Options{Registry: promReg}) - if err != nil { - return settings, err - } - view.RegisterExporter(settings.ocExporter) + promRegOtel := prometheus.NewRegistry() - exp, err := otelprom.New(otelprom.WithRegisterer(promReg), otelprom.WithoutUnits(), otelprom.WithoutScopeInfo()) + exp, err := otelprom.New(otelprom.WithRegisterer(promRegOtel), otelprom.WithoutUnits(), otelprom.WithoutScopeInfo(), otelprom.WithoutCounterSuffixes()) if err != nil { return settings, err } @@ -177,15 +159,11 @@ func SetupTelemetry(id component.ID) (TestTelemetry, error) { sdkmetric.WithResource(resource.Empty()), sdkmetric.WithReader(exp), ) - settings.TelemetrySettings.MeterProvider = settings.meterProvider + settings.ts.MeterProvider = settings.meterProvider - settings.otelPrometheusChecker = &prometheusChecker{promHandler: settings.ocExporter} + settings.prometheusChecker = &prometheusChecker{ + otelHandler: promhttp.HandlerFor(promRegOtel, promhttp.HandlerOpts{}), + } return settings, nil } - -// CheckScraperMetrics checks that for the current exported values for metrics scraper metrics match given values. -// When this function is called it is required to also call SetupTelemetry as first thing. -func CheckScraperMetrics(tts TestTelemetry, receiver component.ID, scraper component.ID, scrapedMetricPoints, erroredMetricPoints int64) error { - return tts.otelPrometheusChecker.checkScraperMetrics(receiver, scraper, scrapedMetricPoints, erroredMetricPoints) -} diff --git a/obsreport/obsreporttest/otelprometheuschecker.go b/component/componenttest/otelprometheuschecker.go similarity index 55% rename from obsreport/obsreporttest/otelprometheuschecker.go rename to component/componenttest/otelprometheuschecker.go index b5bcafb8ba8..878bfd0a37a 100644 --- a/obsreport/obsreporttest/otelprometheuschecker.go +++ b/component/componenttest/otelprometheuschecker.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package obsreporttest // import "go.opentelemetry.io/collector/obsreport/obsreporttest" +package componenttest // import "go.opentelemetry.io/collector/component/componenttest" import ( "fmt" @@ -11,7 +11,6 @@ import ( io_prometheus_client "github.com/prometheus/client_model/go" "github.com/prometheus/common/expfmt" - "go.opencensus.io/stats/view" "go.opentelemetry.io/otel/attribute" "go.uber.org/multierr" @@ -20,7 +19,7 @@ import ( // prometheusChecker is used to assert exported metrics from a prometheus handler. type prometheusChecker struct { - promHandler http.Handler + otelHandler http.Handler } func (pc *prometheusChecker) checkScraperMetrics(receiver component.ID, scraper component.ID, scrapedMetricPoints, erroredMetricPoints int64) error { @@ -30,87 +29,92 @@ func (pc *prometheusChecker) checkScraperMetrics(receiver component.ID, scraper pc.checkCounter("scraper_errored_metric_points", erroredMetricPoints, scraperAttrs)) } -func (pc *prometheusChecker) checkReceiverTraces(receiver component.ID, protocol string, acceptedSpans, droppedSpans int64) error { - receiverAttrs := attributesForReceiverMetrics(receiver, protocol) - return multierr.Combine( - pc.checkCounter("receiver_accepted_spans", acceptedSpans, receiverAttrs), - pc.checkCounter("receiver_refused_spans", droppedSpans, receiverAttrs)) +func (pc *prometheusChecker) checkReceiverTraces(receiver component.ID, protocol string, accepted, dropped int64) error { + return pc.checkReceiver(receiver, "spans", protocol, accepted, dropped) } -func (pc *prometheusChecker) checkReceiverLogs(receiver component.ID, protocol string, acceptedLogRecords, droppedLogRecords int64) error { - receiverAttrs := attributesForReceiverMetrics(receiver, protocol) - return multierr.Combine( - pc.checkCounter("receiver_accepted_log_records", acceptedLogRecords, receiverAttrs), - pc.checkCounter("receiver_refused_log_records", droppedLogRecords, receiverAttrs)) +func (pc *prometheusChecker) checkReceiverLogs(receiver component.ID, protocol string, accepted, dropped int64) error { + return pc.checkReceiver(receiver, "log_records", protocol, accepted, dropped) } -func (pc *prometheusChecker) checkReceiverMetrics(receiver component.ID, protocol string, acceptedMetricPoints, droppedMetricPoints int64) error { +func (pc *prometheusChecker) checkReceiverMetrics(receiver component.ID, protocol string, accepted, dropped int64) error { + return pc.checkReceiver(receiver, "metric_points", protocol, accepted, dropped) +} + +func (pc *prometheusChecker) checkReceiver(receiver component.ID, datatype, protocol string, acceptedMetricPoints, droppedMetricPoints int64) error { receiverAttrs := attributesForReceiverMetrics(receiver, protocol) return multierr.Combine( - pc.checkCounter("receiver_accepted_metric_points", acceptedMetricPoints, receiverAttrs), - pc.checkCounter("receiver_refused_metric_points", droppedMetricPoints, receiverAttrs)) + pc.checkCounter(fmt.Sprintf("receiver_accepted_%s", datatype), acceptedMetricPoints, receiverAttrs), + pc.checkCounter(fmt.Sprintf("receiver_refused_%s", datatype), droppedMetricPoints, receiverAttrs)) } -func (pc *prometheusChecker) checkProcessorTraces(processor component.ID, acceptedSpans, refusedSpans, droppedSpans int64) error { - processorAttrs := attributesForProcessorMetrics(processor) - return multierr.Combine( - pc.checkCounter("processor_accepted_spans", acceptedSpans, processorAttrs), - pc.checkCounter("processor_refused_spans", refusedSpans, processorAttrs), - pc.checkCounter("processor_dropped_spans", droppedSpans, processorAttrs)) +func (pc *prometheusChecker) checkProcessorTraces(processor component.ID, accepted, refused, dropped int64) error { + return pc.checkProcessor(processor, "spans", accepted, refused, dropped) } -func (pc *prometheusChecker) checkProcessorMetrics(processor component.ID, acceptedMetricPoints, refusedMetricPoints, droppedMetricPoints int64) error { - processorAttrs := attributesForProcessorMetrics(processor) - return multierr.Combine( - pc.checkCounter("processor_accepted_metric_points", acceptedMetricPoints, processorAttrs), - pc.checkCounter("processor_refused_metric_points", refusedMetricPoints, processorAttrs), - pc.checkCounter("processor_dropped_metric_points", droppedMetricPoints, processorAttrs)) +func (pc *prometheusChecker) checkProcessorMetrics(processor component.ID, accepted, refused, dropped int64) error { + return pc.checkProcessor(processor, "metric_points", accepted, refused, dropped) +} + +func (pc *prometheusChecker) checkProcessorLogs(processor component.ID, accepted, refused, dropped int64) error { + return pc.checkProcessor(processor, "log_records", accepted, refused, dropped) } -func (pc *prometheusChecker) checkProcessorLogs(processor component.ID, acceptedLogRecords, refusedLogRecords, droppedLogRecords int64) error { +func (pc *prometheusChecker) checkProcessor(processor component.ID, datatype string, accepted, refused, dropped int64) error { processorAttrs := attributesForProcessorMetrics(processor) return multierr.Combine( - pc.checkCounter("processor_accepted_log_records", acceptedLogRecords, processorAttrs), - pc.checkCounter("processor_refused_log_records", refusedLogRecords, processorAttrs), - pc.checkCounter("processor_dropped_log_records", droppedLogRecords, processorAttrs)) + pc.checkCounter(fmt.Sprintf("processor_accepted_%s", datatype), accepted, processorAttrs), + pc.checkCounter(fmt.Sprintf("processor_refused_%s", datatype), refused, processorAttrs), + pc.checkCounter(fmt.Sprintf("processor_dropped_%s", datatype), dropped, processorAttrs)) +} + +func (pc *prometheusChecker) checkExporterTraces(exporter component.ID, sent, sendFailed int64) error { + return pc.checkExporter(exporter, "spans", sent, sendFailed) +} + +func (pc *prometheusChecker) checkExporterLogs(exporter component.ID, sent, sendFailed int64) error { + return pc.checkExporter(exporter, "log_records", sent, sendFailed) } -func (pc *prometheusChecker) checkExporterTraces(exporter component.ID, sentSpans, sendFailedSpans int64) error { +func (pc *prometheusChecker) checkExporterMetrics(exporter component.ID, sent, sendFailed int64) error { + return pc.checkExporter(exporter, "metric_points", sent, sendFailed) +} + +func (pc *prometheusChecker) checkExporter(exporter component.ID, datatype string, sent, sendFailed int64) error { exporterAttrs := attributesForExporterMetrics(exporter) - if sendFailedSpans > 0 { - return multierr.Combine( - pc.checkCounter("exporter_sent_spans", sentSpans, exporterAttrs), - pc.checkCounter("exporter_send_failed_spans", sendFailedSpans, exporterAttrs)) + errs := pc.checkCounter(fmt.Sprintf("exporter_sent_%s", datatype), sent, exporterAttrs) + if sendFailed > 0 { + errs = multierr.Append(errs, + pc.checkCounter(fmt.Sprintf("exporter_send_failed_%s", datatype), sendFailed, exporterAttrs)) } - return multierr.Combine( - pc.checkCounter("exporter_sent_spans", sentSpans, exporterAttrs)) + return errs } -func (pc *prometheusChecker) checkExporterLogs(exporter component.ID, sentLogRecords, sendFailedLogRecords int64) error { - exporterAttrs := attributesForExporterMetrics(exporter) - if sendFailedLogRecords > 0 { - return multierr.Combine( - pc.checkCounter("exporter_sent_log_records", sentLogRecords, exporterAttrs), - pc.checkCounter("exporter_send_failed_log_records", sendFailedLogRecords, exporterAttrs)) +func (pc *prometheusChecker) checkExporterEnqueueFailed(exporter component.ID, datatype string, enqueueFailed int64) error { + if enqueueFailed == 0 { + return nil } - return multierr.Combine( - pc.checkCounter("exporter_sent_log_records", sentLogRecords, exporterAttrs)) + exporterAttrs := attributesForExporterMetrics(exporter) + return pc.checkCounter(fmt.Sprintf("exporter_enqueue_failed_%s", datatype), enqueueFailed, exporterAttrs) } -func (pc *prometheusChecker) checkExporterMetrics(exporter component.ID, sentMetricPoints, sendFailedMetricPoints int64) error { +func (pc *prometheusChecker) checkExporterMetricGauge(exporter component.ID, metric string, val int64) error { exporterAttrs := attributesForExporterMetrics(exporter) - if sendFailedMetricPoints > 0 { - return multierr.Combine( - pc.checkCounter("exporter_sent_metric_points", sentMetricPoints, exporterAttrs), - pc.checkCounter("exporter_send_failed_metric_points", sendFailedMetricPoints, exporterAttrs)) + + ts, err := pc.getMetric(metric, io_prometheus_client.MetricType_GAUGE, exporterAttrs) + if err != nil { + return err } - return multierr.Combine( - pc.checkCounter("exporter_sent_metric_points", sentMetricPoints, exporterAttrs)) + + expected := float64(val) + if math.Abs(ts.GetGauge().GetValue()-expected) > 0.0001 { + return fmt.Errorf("values for metric '%s' did not match, expected '%f' got '%f'", metric, expected, ts.GetGauge().GetValue()) + } + + return nil } func (pc *prometheusChecker) checkCounter(expectedMetric string, value int64, attrs []attribute.KeyValue) error { - // Forces a flush for the opencensus view data. - _, _ = view.RetrieveData(expectedMetric) ts, err := pc.getMetric(expectedMetric, io_prometheus_client.MetricType_COUNTER, attrs) if err != nil { @@ -119,7 +123,7 @@ func (pc *prometheusChecker) checkCounter(expectedMetric string, value int64, at expected := float64(value) if math.Abs(expected-ts.GetCounter().GetValue()) > 0.0001 { - return fmt.Errorf("values for metric '%s' did no match, expected '%f' got '%f'", expectedMetric, expected, ts.GetCounter().GetValue()) + return fmt.Errorf("values for metric '%s' did not match, expected '%f' got '%f'", expectedMetric, expected, ts.GetCounter().GetValue()) } return nil @@ -128,18 +132,14 @@ func (pc *prometheusChecker) checkCounter(expectedMetric string, value int64, at // getMetric returns the metric time series that matches the given name, type and set of attributes // it fetches data from the prometheus endpoint and parse them, ideally OTel Go should provide a MeterRecorder of some kind. func (pc *prometheusChecker) getMetric(expectedName string, expectedType io_prometheus_client.MetricType, expectedAttrs []attribute.KeyValue) (*io_prometheus_client.Metric, error) { - parsed, err := fetchPrometheusMetrics(pc.promHandler) + parsed, err := fetchPrometheusMetrics(pc.otelHandler) if err != nil { return nil, err } metricFamily, ok := parsed[expectedName] if !ok { - // OTel Go adds `_total` suffix for all monotonic sum. - metricFamily, ok = parsed[expectedName+"_total"] - if !ok { - return nil, fmt.Errorf("metric '%s' not found", expectedName) - } + return nil, fmt.Errorf("metric '%s' not found", expectedName) } if metricFamily.Type.String() != expectedType.String() { diff --git a/obsreport/obsreporttest/otelprometheuschecker_test.go b/component/componenttest/otelprometheuschecker_test.go similarity index 89% rename from obsreport/obsreporttest/otelprometheuschecker_test.go rename to component/componenttest/otelprometheuschecker_test.go index d059e4848d9..d7176134f54 100644 --- a/obsreport/obsreporttest/otelprometheuschecker_test.go +++ b/component/componenttest/otelprometheuschecker_test.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package obsreporttest // import "go.opentelemetry.io/collector/obsreport/obsreporttest" +package componenttest // import "go.opentelemetry.io/collector/component/componenttest" import ( "net/http" @@ -26,7 +26,7 @@ func newStubPromChecker() (prometheusChecker, error) { promResponse := strings.ReplaceAll(string(promBytes), "\r\n", "\n") return prometheusChecker{ - promHandler: http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { + otelHandler: http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { _, _ = w.Write([]byte(promResponse)) }), }, nil @@ -36,10 +36,10 @@ func TestPromChecker(t *testing.T) { pc, err := newStubPromChecker() require.NoError(t, err) - scraper := component.NewID("fakeScraper") - receiver := component.NewID("fakeReceiver") - processor := component.NewID("fakeProcessor") - exporter := component.NewID("fakeExporter") + scraper := component.MustNewID("fakeScraper") + receiver := component.MustNewID("fakeReceiver") + processor := component.MustNewID("fakeProcessor") + exporter := component.MustNewID("fakeExporter") transport := "fakeTransport" assert.NoError(t, diff --git a/component/componenttest/package_test.go b/component/componenttest/package_test.go new file mode 100644 index 00000000000..13cb89ad444 --- /dev/null +++ b/component/componenttest/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package componenttest + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/obsreport/obsreporttest/testdata/prometheus_response b/component/componenttest/testdata/prometheus_response similarity index 100% rename from obsreport/obsreporttest/testdata/prometheus_response rename to component/componenttest/testdata/prometheus_response diff --git a/component/config.go b/component/config.go index e46ead72f06..f54b3a176c2 100644 --- a/component/config.go +++ b/component/config.go @@ -4,7 +4,9 @@ package component // import "go.opentelemetry.io/collector/component" import ( + "fmt" "reflect" + "regexp" "go.uber.org/multierr" @@ -32,7 +34,7 @@ func UnmarshalConfig(conf *confmap.Conf, intoCfg Config) error { return cu.Unmarshal(conf) } - return conf.Unmarshal(intoCfg, confmap.WithErrorUnused()) + return conf.Unmarshal(intoCfg) } // ConfigValidator defines an optional interface for configurations to implement to do validation. @@ -110,6 +112,45 @@ func callValidateIfPossible(v reflect.Value) error { // Type is the component type as it is used in the config. type Type string +// String returns the string representation of the type. +func (t Type) String() string { + return string(t) +} + +// typeRegexp is used to validate the type of a component. +// A type must start with an ASCII alphabetic character and +// can only contain ASCII alphanumeric characters and '_'. +// This must be kept in sync with the regex in cmd/mdatagen/validate.go. +var typeRegexp = regexp.MustCompile(`^[a-zA-Z][0-9a-zA-Z_]*$`) + +// NewType creates a type. It returns an error if the type is invalid. +// A type must +// - have at least one character, +// - start with an ASCII alphabetic character and +// - can only contain ASCII alphanumeric characters and '_'. +func NewType(ty string) (Type, error) { + if len(ty) == 0 { + return Type(""), fmt.Errorf("id must not be empty") + } + if !typeRegexp.MatchString(ty) { + return Type(""), fmt.Errorf("invalid character(s) in type %q", ty) + } + return Type(ty), nil +} + +// MustNewType creates a type. It panics if the type is invalid. +// A type must +// - have at least one character, +// - start with an ASCII alphabetic character and +// - can only contain ASCII alphanumeric characters and '_'. +func MustNewType(strType string) Type { + ty, err := NewType(strType) + if err != nil { + panic(err) + } + return ty +} + // DataType is a special Type that represents the data types supported by the collector. We currently support // collecting metrics, traces and logs, this can expand in the future. type DataType = Type diff --git a/component/config_test.go b/component/config_test.go index b42328678ea..fcddc343d20 100644 --- a/component/config_test.go +++ b/component/config_test.go @@ -5,12 +5,16 @@ package component import ( "errors" + "fmt" "reflect" "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) +var _ fmt.Stringer = (Type)("") + type configChildStruct struct { Child errConfig ChildPtr *errConfig @@ -194,3 +198,222 @@ func TestValidateConfig(t *testing.T) { }) } } + +func TestNewType(t *testing.T) { + tests := []struct { + name string + shouldErr bool + }{ + {name: "active_directory_ds"}, + {name: "aerospike"}, + {name: "alertmanager"}, + {name: "alibabacloud_logservice"}, + {name: "apache"}, + {name: "apachespark"}, + {name: "asapclient"}, + {name: "attributes"}, + {name: "awscloudwatch"}, + {name: "awscloudwatchlogs"}, + {name: "awscloudwatchmetrics"}, + {name: "awscontainerinsightreceiver"}, + {name: "awsecscontainermetrics"}, + {name: "awsemf"}, + {name: "awsfirehose"}, + {name: "awskinesis"}, + {name: "awsproxy"}, + {name: "awss3"}, + {name: "awsxray"}, + {name: "azureblob"}, + {name: "azuredataexplorer"}, + {name: "azureeventhub"}, + {name: "azuremonitor"}, + {name: "basicauth"}, + {name: "batch"}, + {name: "bearertokenauth"}, + {name: "bigip"}, + {name: "carbon"}, + {name: "cassandra"}, + {name: "chrony"}, + {name: "clickhouse"}, + {name: "cloudflare"}, + {name: "cloudfoundry"}, + {name: "collectd"}, + {name: "configschema"}, + {name: "coralogix"}, + {name: "couchdb"}, + {name: "count"}, + {name: "cumulativetodelta"}, + {name: "datadog"}, + {name: "dataset"}, + {name: "db_storage"}, + {name: "debug"}, + {name: "deltatorate"}, + {name: "demo"}, + {name: "docker_observer"}, + {name: "docker_stats"}, + {name: "dynatrace"}, + {name: "ecs_observer"}, + {name: "ecs_task_observer"}, + {name: "elasticsearch"}, + {name: "exceptions"}, + {name: "experimental_metricsgeneration"}, + {name: "expvar"}, + {name: "f5cloud"}, + {name: "failover"}, + {name: "file"}, + {name: "filelog"}, + {name: "filestats"}, + {name: "file_storage"}, + {name: "filter"}, + {name: "flinkmetrics"}, + {name: "fluentforward"}, + {name: "forward"}, + {name: "githubgen"}, + {name: "gitprovider"}, + {name: "golden"}, + {name: "googlecloud"}, + {name: "googlecloudpubsub"}, + {name: "googlecloudspanner"}, + {name: "googlemanagedprometheus"}, + {name: "groupbyattrs"}, + {name: "groupbytrace"}, + {name: "haproxy"}, + {name: "headers_setter"}, + {name: "health_check"}, + {name: "honeycombmarker"}, + {name: "hostmetrics"}, + {name: "host_observer"}, + {name: "httpcheck"}, + {name: "http_forwarder"}, + {name: "iis"}, + {name: "influxdb"}, + {name: "instana"}, + {name: "interval"}, + {name: "jaeger"}, + {name: "jaeger_encoding"}, + {name: "jaegerremotesampling"}, + {name: "jmx"}, + {name: "journald"}, + {name: "json_log_encoding"}, + {name: "k8sattributes"}, + {name: "k8s_cluster"}, + {name: "k8s_events"}, + {name: "k8sobjects"}, + {name: "k8s_observer"}, + {name: "kafka"}, + {name: "kafkametrics"}, + {name: "kinetica"}, + {name: "kubeletstats"}, + {name: "loadbalancing"}, + {name: "logging"}, + {name: "logicmonitor"}, + {name: "logstransform"}, + {name: "logzio"}, + {name: "loki"}, + {name: "mdatagen"}, + {name: "memcached"}, + {name: "memory_ballast"}, + {name: "memory_limiter"}, + {name: "metricstransform"}, + {name: "mezmo"}, + {name: "mongodb"}, + {name: "mongodbatlas"}, + {name: "mysql"}, + {name: "namedpipe"}, + {name: "nginx"}, + {name: "nsxt"}, + {name: "oauth2client"}, + {name: "oidc"}, + {name: "opamp"}, + {name: "opampsupervisor"}, + {name: "opencensus"}, + {name: "opensearch"}, + {name: "oracledb"}, + {name: "osquery"}, + {name: "otelarrow"}, + {name: "otelcontribcol"}, + {name: "oteltestbedcol"}, + {name: "otlp"}, + {name: "otlp_encoding"}, + {name: "otlphttp"}, + {name: "otlpjsonfile"}, + {name: "ottl"}, + {name: "podman_stats"}, + {name: "postgresql"}, + {name: "pprof"}, + {name: "probabilistic_sampler"}, + {name: "prometheus"}, + {name: "prometheusremotewrite"}, + {name: "prometheus_simple"}, + {name: "pulsar"}, + {name: "purefa"}, + {name: "purefb"}, + {name: "rabbitmq"}, + {name: "receiver_creator"}, + {name: "redaction"}, + {name: "redis"}, + {name: "remotetap"}, + {name: "resource"}, + {name: "resourcedetection"}, + {name: "riak"}, + {name: "routing"}, + {name: "saphana"}, + {name: "sapm"}, + {name: "schema"}, + {name: "sentry"}, + {name: "servicegraph"}, + {name: "signalfx"}, + {name: "sigv4auth"}, + {name: "skywalking"}, + {name: "snmp"}, + {name: "snowflake"}, + {name: "solace"}, + {name: "solarwindsapmsettings"}, + {name: "span"}, + {name: "spanmetrics"}, + {name: "splunkenterprise"}, + {name: "splunk_hec"}, + {name: "sqlquery"}, + {name: "sqlserver"}, + {name: "sshcheck"}, + {name: "statsd"}, + {name: "sumologic"}, + {name: "syslog"}, + {name: "tail_sampling"}, + {name: "tcplog"}, + {name: "telemetrygen"}, + {name: "tencentcloud_logservice"}, + {name: "text_encoding"}, + {name: "transform"}, + {name: "udplog"}, + {name: "vcenter"}, + {name: "wavefront"}, + {name: "webhookevent"}, + {name: "windowseventlog"}, + {name: "windowsperfcounters"}, + {name: "zipkin"}, + {name: "zipkin_encoding"}, + {name: "zookeeper"}, + {name: "zpages"}, + + {name: "", shouldErr: true}, + {name: "contains spaces", shouldErr: true}, + {name: "contains-dashes", shouldErr: true}, + {name: "0startswithnumber", shouldErr: true}, + {name: "contains/slash", shouldErr: true}, + {name: "contains:colon", shouldErr: true}, + {name: "contains#hash", shouldErr: true}, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + ty, err := NewType(tt.name) + if tt.shouldErr { + assert.Error(t, err) + } else { + require.NoError(t, err) + assert.Equal(t, tt.name, ty.String()) + } + }) + } +} diff --git a/component/go.mod b/component/go.mod index 4276411cde8..05298e470ba 100644 --- a/component/go.mod +++ b/component/go.mod @@ -1,37 +1,48 @@ module go.opentelemetry.io/collector/component -go 1.20 +go 1.21 require ( + github.com/prometheus/client_golang v1.19.0 + github.com/prometheus/client_model v0.6.0 + github.com/prometheus/common v0.48.0 github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/config/configtelemetry v0.85.0 - go.opentelemetry.io/collector/confmap v0.85.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0014 - go.opentelemetry.io/otel/metric v1.18.0 - go.opentelemetry.io/otel/trace v1.18.0 + go.opentelemetry.io/collector/config/configtelemetry v0.96.0 + go.opentelemetry.io/collector/confmap v0.96.0 + go.opentelemetry.io/collector/pdata v1.3.0 + go.opentelemetry.io/otel v1.24.0 + go.opentelemetry.io/otel/exporters/prometheus v0.46.0 + go.opentelemetry.io/otel/metric v1.24.0 + go.opentelemetry.io/otel/sdk v1.24.0 + go.opentelemetry.io/otel/sdk/metric v1.24.0 + go.opentelemetry.io/otel/trace v1.24.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 + go.uber.org/zap v1.27.0 ) require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.0.1 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0014 // indirect - go.opentelemetry.io/otel v1.18.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/grpc v1.58.1 // indirect - google.golang.org/protobuf v1.31.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + golang.org/x/net v0.20.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -39,8 +50,6 @@ replace go.opentelemetry.io/collector/config/configtelemetry => ../config/config replace go.opentelemetry.io/collector/confmap => ../confmap -replace go.opentelemetry.io/collector/featuregate => ../featuregate - replace go.opentelemetry.io/collector/pdata => ../pdata retract ( diff --git a/component/go.sum b/component/go.sum index e5817058840..2f664245ecd 100644 --- a/component/go.sum +++ b/component/go.sum @@ -1,48 +1,74 @@ +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= -github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= -go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= -go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= -go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= -go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -52,20 +78,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -74,15 +100,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= -google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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/component/host.go b/component/host.go index ea3825d743f..4b6933baaef 100644 --- a/component/host.go +++ b/component/host.go @@ -6,14 +6,6 @@ package component // import "go.opentelemetry.io/collector/component" // Host represents the entity that is hosting a Component. It is used to allow communication // between the Component and its host (normally the service.Collector is the host). type Host interface { - // ReportFatalError is used to report to the host that the component - // encountered a fatal error (i.e.: an error that the instance can't recover - // from) after its start function had already returned. - // - // ReportFatalError should be called by the component anytime after Component.Start() ends and - // before Component.Shutdown() begins. - ReportFatalError(err error) - // GetFactory of the specified kind. Returns the factory for a component type. // This allows components to create other components. For example: // func (r MyReceiver) Start(host component.Host) error { diff --git a/component/identifiable.go b/component/identifiable.go index 331c348fe59..d2d65a5e24f 100644 --- a/component/identifiable.go +++ b/component/identifiable.go @@ -26,11 +26,23 @@ func NewID(typeVal Type) ID { return ID{typeVal: typeVal} } +// MustNewID builds a Type and returns a new ID with the given Type and empty name. +// See MustNewType to check the valid values of typeVal. +func MustNewID(typeVal string) ID { + return ID{typeVal: MustNewType(typeVal)} +} + // NewIDWithName returns a new ID with the given Type and name. func NewIDWithName(typeVal Type, nameVal string) ID { return ID{typeVal: typeVal, nameVal: nameVal} } +// MustNewIDWithName builds a Type and returns a new ID with the given Type and name. +// See MustNewType to check the valid values of typeVal. +func MustNewIDWithName(typeVal string, nameVal string) ID { + return ID{typeVal: MustNewType(typeVal), nameVal: nameVal} +} + // Type returns the type of the component. func (id ID) Type() Type { return id.typeVal @@ -51,34 +63,41 @@ func (id ID) MarshalText() (text []byte, err error) { func (id *ID) UnmarshalText(text []byte) error { idStr := string(text) items := strings.SplitN(idStr, typeAndNameSeparator, 2) + var typeStr, nameStr string if len(items) >= 1 { - id.typeVal = Type(strings.TrimSpace(items[0])) + typeStr = strings.TrimSpace(items[0]) } - if len(items) == 1 && id.typeVal == "" { + if len(items) == 1 && typeStr == "" { return errors.New("id must not be empty") } - if id.typeVal == "" { + if typeStr == "" { return fmt.Errorf("in %q id: the part before %s should not be empty", idStr, typeAndNameSeparator) } if len(items) > 1 { // "name" part is present. - id.nameVal = strings.TrimSpace(items[1]) - if id.nameVal == "" { + nameStr = strings.TrimSpace(items[1]) + if nameStr == "" { return fmt.Errorf("in %q id: the part after %s should not be empty", idStr, typeAndNameSeparator) } } + var err error + if id.typeVal, err = NewType(typeStr); err != nil { + return fmt.Errorf("in %q id: %w", idStr, err) + } + id.nameVal = nameStr + return nil } // String returns the ID string representation as "type[/name]" format. func (id ID) String() string { if id.nameVal == "" { - return string(id.typeVal) + return id.typeVal.String() } - return string(id.typeVal) + typeAndNameSeparator + id.nameVal + return id.typeVal.String() + typeAndNameSeparator + id.nameVal } diff --git a/component/identifiable_test.go b/component/identifiable_test.go index 6b55375adc3..25c449ef11c 100644 --- a/component/identifiable_test.go +++ b/component/identifiable_test.go @@ -10,13 +10,14 @@ import ( ) func TestMarshalText(t *testing.T) { - id := NewIDWithName("test", "name") + id := NewIDWithName(MustNewType("test"), "name") got, err := id.MarshalText() assert.NoError(t, err) assert.Equal(t, id.String(), string(got)) } func TestUnmarshalText(t *testing.T) { + validType := MustNewType("valid_type") var testCases = []struct { idStr string expectedErr bool @@ -24,15 +25,15 @@ func TestUnmarshalText(t *testing.T) { }{ { idStr: "valid_type", - expectedID: ID{typeVal: "valid_type", nameVal: ""}, + expectedID: ID{typeVal: validType, nameVal: ""}, }, { idStr: "valid_type/valid_name", - expectedID: ID{typeVal: "valid_type", nameVal: "valid_name"}, + expectedID: ID{typeVal: validType, nameVal: "valid_name"}, }, { idStr: " valid_type / valid_name ", - expectedID: ID{typeVal: "valid_type", nameVal: "valid_name"}, + expectedID: ID{typeVal: validType, nameVal: "valid_name"}, }, { idStr: "/valid_name", diff --git a/component/package_test.go b/component/package_test.go new file mode 100644 index 00000000000..8bf70a2eb7b --- /dev/null +++ b/component/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package component + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/component/status.go b/component/status.go new file mode 100644 index 00000000000..8cd4d802644 --- /dev/null +++ b/component/status.go @@ -0,0 +1,190 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package component // import "go.opentelemetry.io/collector/component" + +import ( + "time" +) + +type Status int32 + +// Enumeration of possible component statuses +const ( + StatusNone Status = iota + StatusStarting + StatusOK + StatusRecoverableError + StatusPermanentError + StatusFatalError + StatusStopping + StatusStopped +) + +// String returns a string representation of a Status +func (s Status) String() string { + switch s { + case StatusStarting: + return "StatusStarting" + case StatusOK: + return "StatusOK" + case StatusRecoverableError: + return "StatusRecoverableError" + case StatusPermanentError: + return "StatusPermanentError" + case StatusFatalError: + return "StatusFatalError" + case StatusStopping: + return "StatusStopping" + case StatusStopped: + return "StatusStopped" + } + return "StatusNone" +} + +// StatusEvent contains a status and timestamp, and can contain an error +type StatusEvent struct { + status Status + err error + timestamp time.Time +} + +// Status returns the Status (enum) associated with the StatusEvent +func (ev *StatusEvent) Status() Status { + return ev.status +} + +// Err returns the error associated with the StatusEvent. +func (ev *StatusEvent) Err() error { + return ev.err +} + +// Timestamp returns the timestamp associated with the StatusEvent +func (ev *StatusEvent) Timestamp() time.Time { + return ev.timestamp +} + +// NewStatusEvent creates and returns a StatusEvent with the specified status and sets the timestamp +// time.Now(). To set an error on the event for an error status use one of the dedicated +// constructors (e.g. NewRecoverableErrorEvent, NewPermanentErrorEvent, NewFatalErrorEvent) +func NewStatusEvent(status Status) *StatusEvent { + return &StatusEvent{ + status: status, + timestamp: time.Now(), + } +} + +// NewRecoverableErrorEvent creates and returns a StatusEvent with StatusRecoverableError, the +// specified error, and a timestamp set to time.Now(). +func NewRecoverableErrorEvent(err error) *StatusEvent { + ev := NewStatusEvent(StatusRecoverableError) + ev.err = err + return ev +} + +// NewPermanentErrorEvent creates and returns a StatusEvent with StatusPermanentError, the +// specified error, and a timestamp set to time.Now(). +func NewPermanentErrorEvent(err error) *StatusEvent { + ev := NewStatusEvent(StatusPermanentError) + ev.err = err + return ev +} + +// NewFatalErrorEvent creates and returns a StatusEvent with StatusFatalError, the +// specified error, and a timestamp set to time.Now(). +func NewFatalErrorEvent(err error) *StatusEvent { + ev := NewStatusEvent(StatusFatalError) + ev.err = err + return ev +} + +// AggregateStatus will derive a status for the given input using the following rules in order: +// 1. If all instances have the same status, there is nothing to aggregate, return it. +// 2. If any instance encounters a fatal error, the component is in a Fatal Error state. +// 3. If any instance is in a Permanent Error state, the component status is Permanent Error. +// 4. If any instance is Stopping, the component is in a Stopping state. +// 5. An instance is Stopped, but not all instances are Stopped, we must be in the process of Stopping the component. +// 6. If any instance is in a Recoverable Error state, the component status is Recoverable Error. +// 7. By process of elimination, the only remaining state is starting. +func AggregateStatus[K comparable](eventMap map[K]*StatusEvent) Status { + seen := make(map[Status]struct{}) + for _, ev := range eventMap { + seen[ev.Status()] = struct{}{} + } + + // All statuses are the same. Note, this will handle StatusOK and StatusStopped as these two + // cases require all components be in the same state. + if len(seen) == 1 { + for st := range seen { + return st + } + } + + // Handle mixed status cases + if _, isFatal := seen[StatusFatalError]; isFatal { + return StatusFatalError + } + + if _, isPermanent := seen[StatusPermanentError]; isPermanent { + return StatusPermanentError + } + + if _, isStopping := seen[StatusStopping]; isStopping { + return StatusStopping + } + + if _, isStopped := seen[StatusStopped]; isStopped { + return StatusStopping + } + + if _, isRecoverable := seen[StatusRecoverableError]; isRecoverable { + return StatusRecoverableError + } + + // By process of elimination, this is the last possible status; no check necessary. + return StatusStarting +} + +// StatusIsError returns true for error statuses (e.g. StatusRecoverableError, +// StatusPermanentError, or StatusFatalError) +func StatusIsError(status Status) bool { + return status == StatusRecoverableError || + status == StatusPermanentError || + status == StatusFatalError +} + +// AggregateStatusEvent returns a status event where: +// - The status is set to the aggregate status of the events in the eventMap +// - The timestamp is set to the latest timestamp of the events in the eventMap +// - For an error status, the event will have same error as the most current event of the same +// error type from the eventMap +func AggregateStatusEvent[K comparable](eventMap map[K]*StatusEvent) *StatusEvent { + var lastEvent, lastMatchingEvent *StatusEvent + aggregateStatus := AggregateStatus[K](eventMap) + + for _, ev := range eventMap { + if lastEvent == nil || lastEvent.timestamp.Before(ev.timestamp) { + lastEvent = ev + } + if aggregateStatus == ev.Status() && + (lastMatchingEvent == nil || lastMatchingEvent.timestamp.Before(ev.timestamp)) { + lastMatchingEvent = ev + } + } + + // the effective status matches an existing event + if lastEvent.Status() == aggregateStatus { + return lastEvent + } + + // the effective status requires a synthetic event + aggregateEvent := &StatusEvent{ + status: aggregateStatus, + timestamp: lastEvent.timestamp, + } + if StatusIsError(aggregateStatus) { + aggregateEvent.err = lastMatchingEvent.err + } + + return aggregateEvent +} diff --git a/component/status_test.go b/component/status_test.go new file mode 100644 index 00000000000..13755d078a5 --- /dev/null +++ b/component/status_test.go @@ -0,0 +1,330 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 +package component + +import ( + "fmt" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestNewStatusEvent(t *testing.T) { + statuses := []Status{ + StatusStarting, + StatusOK, + StatusRecoverableError, + StatusPermanentError, + StatusFatalError, + StatusStopping, + StatusStopped, + } + + for _, status := range statuses { + t.Run(fmt.Sprintf("%s without error", status), func(t *testing.T) { + ev := NewStatusEvent(status) + require.Equal(t, status, ev.Status()) + require.Nil(t, ev.Err()) + require.False(t, ev.Timestamp().IsZero()) + }) + } +} + +func TestStatusEventsWithError(t *testing.T) { + statusConstructorMap := map[Status]func(error) *StatusEvent{ + StatusRecoverableError: NewRecoverableErrorEvent, + StatusPermanentError: NewPermanentErrorEvent, + StatusFatalError: NewFatalErrorEvent, + } + + for status, newEvent := range statusConstructorMap { + t.Run(fmt.Sprintf("error status constructor for: %s", status), func(t *testing.T) { + ev := newEvent(assert.AnError) + require.Equal(t, status, ev.Status()) + require.Equal(t, assert.AnError, ev.Err()) + require.False(t, ev.Timestamp().IsZero()) + }) + } +} + +func TestAggregateStatus(t *testing.T) { + for _, tc := range []struct { + name string + statusMap map[*InstanceID]*StatusEvent + expectedStatus Status + }{ + { + name: "aggregate status with fatal is FatalError", + statusMap: map[*InstanceID]*StatusEvent{ + {}: NewStatusEvent(StatusStarting), + {}: NewStatusEvent(StatusOK), + {}: NewStatusEvent(StatusFatalError), + {}: NewStatusEvent(StatusRecoverableError), + }, + expectedStatus: StatusFatalError, + }, + { + name: "aggregate status with permanent is PermanentError", + statusMap: map[*InstanceID]*StatusEvent{ + {}: NewStatusEvent(StatusStarting), + {}: NewStatusEvent(StatusOK), + {}: NewStatusEvent(StatusPermanentError), + {}: NewStatusEvent(StatusRecoverableError), + }, + expectedStatus: StatusPermanentError, + }, + { + name: "aggregate status with stopping is Stopping", + statusMap: map[*InstanceID]*StatusEvent{ + {}: NewStatusEvent(StatusStarting), + {}: NewStatusEvent(StatusOK), + {}: NewStatusEvent(StatusRecoverableError), + {}: NewStatusEvent(StatusStopping), + }, + expectedStatus: StatusStopping, + }, + { + name: "aggregate status with stopped and non-stopped is Stopping", + statusMap: map[*InstanceID]*StatusEvent{ + {}: NewStatusEvent(StatusStarting), + {}: NewStatusEvent(StatusOK), + {}: NewStatusEvent(StatusRecoverableError), + {}: NewStatusEvent(StatusStopped), + }, + expectedStatus: StatusStopping, + }, + { + name: "aggregate status with all stopped is Stopped", + statusMap: map[*InstanceID]*StatusEvent{ + {}: NewStatusEvent(StatusStopped), + {}: NewStatusEvent(StatusStopped), + {}: NewStatusEvent(StatusStopped), + }, + expectedStatus: StatusStopped, + }, + { + name: "aggregate status with recoverable is RecoverableError", + statusMap: map[*InstanceID]*StatusEvent{ + {}: NewStatusEvent(StatusStarting), + {}: NewStatusEvent(StatusOK), + {}: NewStatusEvent(StatusRecoverableError), + }, + expectedStatus: StatusRecoverableError, + }, + { + name: "aggregate status with starting is Starting", + statusMap: map[*InstanceID]*StatusEvent{ + {}: NewStatusEvent(StatusStarting), + {}: NewStatusEvent(StatusOK), + }, + expectedStatus: StatusStarting, + }, + { + name: "aggregate status with all ok is OK", + statusMap: map[*InstanceID]*StatusEvent{ + {}: NewStatusEvent(StatusOK), + {}: NewStatusEvent(StatusOK), + {}: NewStatusEvent(StatusOK), + }, + expectedStatus: StatusOK, + }, + } { + t.Run(tc.name, func(t *testing.T) { + assert.Equal(t, tc.expectedStatus, AggregateStatus(tc.statusMap)) + }) + } +} + +func TestStatusIsError(t *testing.T) { + for _, tc := range []struct { + status Status + isError bool + }{ + { + status: StatusStarting, + isError: false, + }, + { + status: StatusOK, + isError: false, + }, + { + status: StatusRecoverableError, + isError: true, + }, + { + status: StatusPermanentError, + isError: true, + }, + { + status: StatusFatalError, + isError: true, + }, + { + status: StatusStopping, + isError: false, + }, + { + status: StatusStopped, + isError: false, + }, + } { + name := fmt.Sprintf("StatusIsError(%s) is %t", tc.status, tc.isError) + t.Run(name, func(t *testing.T) { + assert.Equal(t, tc.isError, StatusIsError(tc.status)) + }) + } +} + +func TestAggregateStatusEvent(t *testing.T) { + // maxTime is used to make sure we select the event with the latest timestamp + maxTime := time.Unix(1<<63-62135596801, 999999999) + // latest sets the timestamp for an event to maxTime + latest := func(ev *StatusEvent) *StatusEvent { + ev.timestamp = maxTime + return ev + } + + for _, tc := range []struct { + name string + statusMap map[*InstanceID]*StatusEvent + expectedStatus *StatusEvent + }{ + { + name: "FatalError - existing event", + statusMap: map[*InstanceID]*StatusEvent{ + {}: NewStatusEvent(StatusStarting), + {}: NewStatusEvent(StatusOK), + {}: latest(NewFatalErrorEvent(assert.AnError)), + {}: NewStatusEvent(StatusRecoverableError), + }, + expectedStatus: &StatusEvent{ + status: StatusFatalError, + timestamp: maxTime, + err: assert.AnError, + }, + }, + { + name: "FatalError - synthetic event", + statusMap: map[*InstanceID]*StatusEvent{ + {}: NewStatusEvent(StatusStarting), + {}: NewStatusEvent(StatusOK), + {}: NewFatalErrorEvent(assert.AnError), + {}: latest(NewStatusEvent(StatusRecoverableError)), + }, + expectedStatus: &StatusEvent{ + status: StatusFatalError, + timestamp: maxTime, + err: assert.AnError, + }, + }, + { + name: "PermanentError - existing event", + statusMap: map[*InstanceID]*StatusEvent{ + {}: NewStatusEvent(StatusStarting), + {}: NewStatusEvent(StatusOK), + {}: latest(NewPermanentErrorEvent(assert.AnError)), + {}: NewStatusEvent(StatusRecoverableError), + }, + expectedStatus: &StatusEvent{ + status: StatusPermanentError, + timestamp: maxTime, + err: assert.AnError, + }, + }, + { + name: "PermanentError - synthetic event", + statusMap: map[*InstanceID]*StatusEvent{ + {}: NewStatusEvent(StatusStarting), + {}: NewStatusEvent(StatusOK), + {}: NewPermanentErrorEvent(assert.AnError), + {}: latest(NewStatusEvent(StatusRecoverableError)), + }, + expectedStatus: &StatusEvent{ + status: StatusPermanentError, + timestamp: maxTime, + err: assert.AnError, + }, + }, + { + name: "Stopping - existing event", + statusMap: map[*InstanceID]*StatusEvent{ + {}: NewStatusEvent(StatusStarting), + {}: NewStatusEvent(StatusOK), + {}: NewStatusEvent(StatusRecoverableError), + {}: latest(NewStatusEvent(StatusStopping)), + }, + expectedStatus: &StatusEvent{ + status: StatusStopping, + timestamp: maxTime, + }, + }, + { + name: "Stopping - synthetic event", + statusMap: map[*InstanceID]*StatusEvent{ + {}: NewStatusEvent(StatusStarting), + {}: NewStatusEvent(StatusOK), + {}: NewStatusEvent(StatusRecoverableError), + {}: latest(NewStatusEvent(StatusStopped)), + }, + expectedStatus: &StatusEvent{ + status: StatusStopping, + timestamp: maxTime, + }, + }, + { + name: "Stopped - existing event", + statusMap: map[*InstanceID]*StatusEvent{ + {}: NewStatusEvent(StatusStopped), + {}: latest(NewStatusEvent(StatusStopped)), + {}: NewStatusEvent(StatusStopped), + }, + expectedStatus: &StatusEvent{ + status: StatusStopped, + timestamp: maxTime, + }, + }, + { + name: "RecoverableError - existing event", + statusMap: map[*InstanceID]*StatusEvent{ + {}: NewStatusEvent(StatusStarting), + {}: NewStatusEvent(StatusOK), + {}: latest(NewRecoverableErrorEvent(assert.AnError)), + }, + expectedStatus: &StatusEvent{ + status: StatusRecoverableError, + timestamp: maxTime, + err: assert.AnError, + }, + }, + { + name: "Starting - synthetic event", + statusMap: map[*InstanceID]*StatusEvent{ + {}: NewStatusEvent(StatusStarting), + {}: latest(NewStatusEvent(StatusOK)), + }, + expectedStatus: &StatusEvent{ + status: StatusStarting, + timestamp: maxTime, + }, + }, + { + name: "OK - existing event", + statusMap: map[*InstanceID]*StatusEvent{ + {}: NewStatusEvent(StatusOK), + {}: latest(NewStatusEvent(StatusOK)), + {}: NewStatusEvent(StatusOK), + }, + expectedStatus: &StatusEvent{ + status: StatusOK, + timestamp: maxTime, + }, + }, + } { + t.Run(tc.name, func(t *testing.T) { + assert.Equal(t, tc.expectedStatus, AggregateStatusEvent(tc.statusMap)) + }) + } +} diff --git a/component/telemetry.go b/component/telemetry.go index 9617e456319..572b4bdd916 100644 --- a/component/telemetry.go +++ b/component/telemetry.go @@ -12,6 +12,11 @@ import ( "go.opentelemetry.io/collector/pdata/pcommon" ) +// TelemetrySettings provides components with APIs to report telemetry. +// +// Note: there is a service version of this struct, servicetelemetry.TelemetrySettings, that mirrors +// this struct with the exception of ReportComponentStatus. When adding or removing anything from +// this struct consider whether or not the same should be done for the service version. type TelemetrySettings struct { // Logger that the factory can use during creation and can pass to the created // component to be used later as well. @@ -29,4 +34,9 @@ type TelemetrySettings struct { // Resource contains the resource attributes for the collector's telemetry. Resource pcommon.Resource + + // ReportStatus allows a component to report runtime changes in status. The service + // will automatically report status for a component during startup and shutdown. Components can + // use this method to report status after start and before shutdown. + ReportStatus func(*StatusEvent) } diff --git a/config/configauth/configauth_test.go b/config/configauth/configauth_test.go index 19497c2e7c5..43c84ceb497 100644 --- a/config/configauth/configauth_test.go +++ b/config/configauth/configauth_test.go @@ -13,6 +13,8 @@ import ( "go.opentelemetry.io/collector/extension/auth" ) +var mockID = component.MustNewID("mock") + func TestGetServer(t *testing.T) { testCases := []struct { desc string @@ -34,10 +36,10 @@ func TestGetServer(t *testing.T) { t.Run(tC.desc, func(t *testing.T) { // prepare cfg := &Authentication{ - AuthenticatorID: component.NewID("mock"), + AuthenticatorID: mockID, } ext := map[component.ID]component.Component{ - component.NewID("mock"): tC.authenticator, + mockID: tC.authenticator, } authenticator, err := cfg.GetServerAuthenticator(ext) @@ -56,7 +58,7 @@ func TestGetServer(t *testing.T) { func TestGetServerFails(t *testing.T) { cfg := &Authentication{ - AuthenticatorID: component.NewID("does-not-exist"), + AuthenticatorID: component.MustNewID("does_not_exist"), } authenticator, err := cfg.GetServerAuthenticator(map[component.ID]component.Component{}) @@ -85,10 +87,10 @@ func TestGetClient(t *testing.T) { t.Run(tC.desc, func(t *testing.T) { // prepare cfg := &Authentication{ - AuthenticatorID: component.NewID("mock"), + AuthenticatorID: mockID, } ext := map[component.ID]component.Component{ - component.NewID("mock"): tC.authenticator, + mockID: tC.authenticator, } authenticator, err := cfg.GetClientAuthenticator(ext) @@ -107,7 +109,7 @@ func TestGetClient(t *testing.T) { func TestGetClientFails(t *testing.T) { cfg := &Authentication{ - AuthenticatorID: component.NewID("does-not-exist"), + AuthenticatorID: component.MustNewID("does_not_exist"), } authenticator, err := cfg.GetClientAuthenticator(map[component.ID]component.Component{}) assert.ErrorIs(t, err, errAuthenticatorNotFound) diff --git a/config/configauth/go.mod b/config/configauth/go.mod index 196fdca44ea..a58c97c3449 100644 --- a/config/configauth/go.mod +++ b/config/configauth/go.mod @@ -1,47 +1,45 @@ module go.opentelemetry.io/collector/config/configauth -go 1.20 +go 1.21 require ( github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.85.0 - go.opentelemetry.io/collector/extension v0.85.0 - go.opentelemetry.io/collector/extension/auth v0.85.0 + go.opentelemetry.io/collector/component v0.96.0 + go.opentelemetry.io/collector/extension v0.96.0 + go.opentelemetry.io/collector/extension/auth v0.96.0 + go.uber.org/goleak v1.3.0 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.0.1 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.85.0 // indirect - go.opentelemetry.io/collector/confmap v0.85.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0014 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0014 // indirect - go.opentelemetry.io/otel v1.18.0 // indirect - go.opentelemetry.io/otel/metric v1.18.0 // indirect - go.opentelemetry.io/otel/trace v1.18.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect + go.opentelemetry.io/collector/confmap v0.96.0 // indirect + go.opentelemetry.io/collector/pdata v1.3.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/grpc v1.58.1 // indirect - google.golang.org/protobuf v1.31.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.20.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) replace go.opentelemetry.io/collector/pdata => ../../pdata -replace go.opentelemetry.io/collector/featuregate => ../../featuregate - replace go.opentelemetry.io/collector/confmap => ../../confmap replace go.opentelemetry.io/collector/component => ../../component diff --git a/config/configauth/go.sum b/config/configauth/go.sum index e5817058840..f0d91ce3b4d 100644 --- a/config/configauth/go.sum +++ b/config/configauth/go.sum @@ -1,48 +1,73 @@ +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= -github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= -go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= -go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= -go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= -go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -52,20 +77,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -74,15 +99,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= -google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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/config/configauth/package_test.go b/config/configauth/package_test.go new file mode 100644 index 00000000000..1364f8b58f6 --- /dev/null +++ b/config/configauth/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package configauth + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/config/configcompression/compressionType.go b/config/configcompression/compressionType.go deleted file mode 100644 index ed0a979420a..00000000000 --- a/config/configcompression/compressionType.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package configcompression // import "go.opentelemetry.io/collector/config/configcompression" - -import "fmt" - -type CompressionType string - -const ( - Gzip CompressionType = "gzip" - Zlib CompressionType = "zlib" - Deflate CompressionType = "deflate" - Snappy CompressionType = "snappy" - Zstd CompressionType = "zstd" - none CompressionType = "none" - empty CompressionType = "" -) - -func IsCompressed(compressionType CompressionType) bool { - return compressionType != empty && compressionType != none -} - -func (ct *CompressionType) UnmarshalText(in []byte) error { - switch typ := CompressionType(in); typ { - case Gzip, - Zlib, - Deflate, - Snappy, - Zstd, - none, - empty: - *ct = typ - return nil - default: - return fmt.Errorf("unsupported compression type %q", typ) - } -} diff --git a/config/configcompression/compressiontype.go b/config/configcompression/compressiontype.go new file mode 100644 index 00000000000..f2bf3850964 --- /dev/null +++ b/config/configcompression/compressiontype.go @@ -0,0 +1,41 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package configcompression // import "go.opentelemetry.io/collector/config/configcompression" + +import "fmt" + +// Type represents a compression method +type Type string + +const ( + TypeGzip Type = "gzip" + TypeZlib Type = "zlib" + TypeDeflate Type = "deflate" + TypeSnappy Type = "snappy" + TypeZstd Type = "zstd" + typeNone Type = "none" + typeEmpty Type = "" +) + +// IsCompressed returns false if CompressionType is nil, none, or empty. +// Otherwise, returns true. +func (ct *Type) IsCompressed() bool { + return *ct != typeEmpty && *ct != typeNone +} + +func (ct *Type) UnmarshalText(in []byte) error { + switch typ := Type(in); typ { + case TypeGzip, + TypeZlib, + TypeDeflate, + TypeSnappy, + TypeZstd, + typeNone, + typeEmpty: + *ct = typ + return nil + default: + return fmt.Errorf("unsupported compression type %q", typ) + } +} diff --git a/config/configcompression/compressionType_test.go b/config/configcompression/compressiontype_test.go similarity index 82% rename from config/configcompression/compressionType_test.go rename to config/configcompression/compressiontype_test.go index dcf3350861e..cf8166d5a24 100644 --- a/config/configcompression/compressionType_test.go +++ b/config/configcompression/compressiontype_test.go @@ -15,31 +15,37 @@ func TestUnmarshalText(t *testing.T) { name string compressionName []byte shouldError bool + isCompressed bool }{ { name: "ValidGzip", compressionName: []byte("gzip"), shouldError: false, + isCompressed: true, }, { name: "ValidZlib", compressionName: []byte("zlib"), shouldError: false, + isCompressed: true, }, { name: "ValidDeflate", compressionName: []byte("deflate"), shouldError: false, + isCompressed: true, }, { name: "ValidSnappy", compressionName: []byte("snappy"), shouldError: false, + isCompressed: true, }, { name: "ValidZstd", compressionName: []byte("zstd"), shouldError: false, + isCompressed: true, }, { name: "ValidEmpty", @@ -59,14 +65,16 @@ func TestUnmarshalText(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - temp := none + temp := typeNone err := temp.UnmarshalText(tt.compressionName) if tt.shouldError { assert.Error(t, err) return } require.NoError(t, err) - assert.Equal(t, temp, CompressionType(tt.compressionName)) + ct := Type(tt.compressionName) + assert.Equal(t, temp, ct) + assert.Equal(t, tt.isCompressed, ct.IsCompressed()) }) } } diff --git a/config/configcompression/go.mod b/config/configcompression/go.mod index 176a02b55b3..1ac40196d85 100644 --- a/config/configcompression/go.mod +++ b/config/configcompression/go.mod @@ -1,8 +1,11 @@ module go.opentelemetry.io/collector/config/configcompression -go 1.20 +go 1.21 -require github.com/stretchr/testify v1.8.4 +require ( + github.com/stretchr/testify v1.8.4 + go.uber.org/goleak v1.3.0 +) require ( github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/config/configcompression/go.sum b/config/configcompression/go.sum index 3ee4af40e76..b4eccab6a53 100644 --- a/config/configcompression/go.sum +++ b/config/configcompression/go.sum @@ -16,6 +16,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= 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= diff --git a/config/configcompression/package_test.go b/config/configcompression/package_test.go new file mode 100644 index 00000000000..a8be1b407c0 --- /dev/null +++ b/config/configcompression/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package configcompression + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/config/configgrpc/configgrpc.go b/config/configgrpc/configgrpc.go index f6da798f165..18526262317 100644 --- a/config/configgrpc/configgrpc.go +++ b/config/configgrpc/configgrpc.go @@ -8,7 +8,6 @@ import ( "crypto/tls" "errors" "fmt" - "net" "strings" "time" @@ -47,18 +46,18 @@ type KeepaliveClientConfig struct { PermitWithoutStream bool `mapstructure:"permit_without_stream"` } -// GRPCClientSettings defines common settings for a gRPC client configuration. -type GRPCClientSettings struct { +// ClientConfig defines common settings for a gRPC client configuration. +type ClientConfig struct { // The target to which the exporter is going to send traces or metrics, // using the gRPC protocol. The valid syntax is described at // https://github.com/grpc/grpc/blob/master/doc/naming.md. Endpoint string `mapstructure:"endpoint"` // The compression key for supported compression types within collector. - Compression configcompression.CompressionType `mapstructure:"compression"` + Compression configcompression.Type `mapstructure:"compression"` // TLSSetting struct exposes TLS client configuration. - TLSSetting configtls.TLSClientSetting `mapstructure:"tls"` + TLSSetting configtls.ClientConfig `mapstructure:"tls"` // The keepalive parameters for gRPC client. See grpc.WithKeepaliveParams. // (https://godoc.org/google.golang.org/grpc#WithKeepaliveParams). @@ -116,14 +115,14 @@ type KeepaliveEnforcementPolicy struct { PermitWithoutStream bool `mapstructure:"permit_without_stream"` } -// GRPCServerSettings defines common settings for a gRPC server configuration. -type GRPCServerSettings struct { +// ServerConfig defines common settings for a gRPC server configuration. +type ServerConfig struct { // Server net.Addr config. For transport only "tcp" and "unix" are valid options. - NetAddr confignet.NetAddr `mapstructure:",squash"` + NetAddr confignet.AddrConfig `mapstructure:",squash"` // Configures the protocol to use TLS. // The default value is nil, which will cause the protocol to not use TLS. - TLSSetting *configtls.TLSServerSetting `mapstructure:"tls"` + TLSSetting *configtls.ServerConfig `mapstructure:"tls"` // MaxRecvMsgSizeMiB sets the maximum size (in MiB) of messages accepted by the server. MaxRecvMsgSizeMiB uint64 `mapstructure:"max_recv_msg_size_mib"` @@ -151,8 +150,8 @@ type GRPCServerSettings struct { IncludeMetadata bool `mapstructure:"include_metadata"` } -// SanitizedEndpoint strips the prefix of either http:// or https:// from configgrpc.GRPCClientSettings.Endpoint. -func (gcs *GRPCClientSettings) SanitizedEndpoint() string { +// SanitizedEndpoint strips the prefix of either http:// or https:// from configgrpc.ClientConfig.Endpoint. +func (gcs *ClientConfig) SanitizedEndpoint() string { switch { case gcs.isSchemeHTTP(): return strings.TrimPrefix(gcs.Endpoint, "http://") @@ -163,11 +162,11 @@ func (gcs *GRPCClientSettings) SanitizedEndpoint() string { } } -func (gcs *GRPCClientSettings) isSchemeHTTP() bool { +func (gcs *ClientConfig) isSchemeHTTP() bool { return strings.HasPrefix(gcs.Endpoint, "http://") } -func (gcs *GRPCClientSettings) isSchemeHTTPS() bool { +func (gcs *ClientConfig) isSchemeHTTPS() bool { return strings.HasPrefix(gcs.Endpoint, "https://") } @@ -175,7 +174,7 @@ func (gcs *GRPCClientSettings) isSchemeHTTPS() bool { // a non-blocking dial (the function won't wait for connections to be // established, and connecting happens in the background). To make it a blocking // dial, use grpc.WithBlock() dial option. -func (gcs *GRPCClientSettings) ToClientConn(ctx context.Context, host component.Host, settings component.TelemetrySettings, extraOpts ...grpc.DialOption) (*grpc.ClientConn, error) { +func (gcs *ClientConfig) ToClientConn(ctx context.Context, host component.Host, settings component.TelemetrySettings, extraOpts ...grpc.DialOption) (*grpc.ClientConn, error) { opts, err := gcs.toDialOptions(host, settings) if err != nil { return nil, err @@ -184,9 +183,9 @@ func (gcs *GRPCClientSettings) ToClientConn(ctx context.Context, host component. return grpc.DialContext(ctx, gcs.SanitizedEndpoint(), opts...) } -func (gcs *GRPCClientSettings) toDialOptions(host component.Host, settings component.TelemetrySettings) ([]grpc.DialOption, error) { +func (gcs *ClientConfig) toDialOptions(host component.Host, settings component.TelemetrySettings) ([]grpc.DialOption, error) { var opts []grpc.DialOption - if configcompression.IsCompressed(gcs.Compression) { + if gcs.Compression.IsCompressed() { cp, err := getGRPCCompressionName(gcs.Compression) if err != nil { return nil, err @@ -259,8 +258,7 @@ func (gcs *GRPCClientSettings) toDialOptions(host component.Host, settings compo } // Enable OpenTelemetry observability plugin. - opts = append(opts, grpc.WithUnaryInterceptor(otelgrpc.UnaryClientInterceptor(otelOpts...))) - opts = append(opts, grpc.WithStreamInterceptor(otelgrpc.StreamClientInterceptor(otelOpts...))) + opts = append(opts, grpc.WithStatsHandler(otelgrpc.NewClientHandler(otelOpts...))) return opts, nil } @@ -269,12 +267,14 @@ func validateBalancerName(balancerName string) bool { return balancer.Get(balancerName) != nil } -// ToListener returns the net.Listener constructed from the settings. -func (gss *GRPCServerSettings) ToListener() (net.Listener, error) { - return gss.NetAddr.Listen() +// ToServer returns a grpc.Server for the configuration +// Deprecated: [0.96.0] Use ToServerContext instead. +func (gss *ServerConfig) ToServer(host component.Host, settings component.TelemetrySettings, extraOpts ...grpc.ServerOption) (*grpc.Server, error) { + return gss.ToServerContext(context.Background(), host, settings, extraOpts...) } -func (gss *GRPCServerSettings) ToServer(host component.Host, settings component.TelemetrySettings, extraOpts ...grpc.ServerOption) (*grpc.Server, error) { +// ToServerContext returns a grpc.Server for the configuration +func (gss *ServerConfig) ToServerContext(_ context.Context, host component.Host, settings component.TelemetrySettings, extraOpts ...grpc.ServerOption) (*grpc.Server, error) { opts, err := gss.toServerOption(host, settings) if err != nil { return nil, err @@ -283,7 +283,7 @@ func (gss *GRPCServerSettings) ToServer(host component.Host, settings component. return grpc.NewServer(opts...), nil } -func (gss *GRPCServerSettings) toServerOption(host component.Host, settings component.TelemetrySettings) ([]grpc.ServerOption, error) { +func (gss *ServerConfig) toServerOption(host component.Host, settings component.TelemetrySettings) ([]grpc.ServerOption, error) { switch gss.NetAddr.Transport { case "tcp", "tcp4", "tcp6", "udp", "udp4", "udp6": internal.WarnOnUnspecifiedHost(settings.Logger, gss.NetAddr.Endpoint) @@ -367,26 +367,23 @@ func (gss *GRPCServerSettings) toServerOption(host component.Host, settings comp } // Enable OpenTelemetry observability plugin. - // TODO: Pass construct settings to have access to Tracer. - uInterceptors = append(uInterceptors, otelgrpc.UnaryServerInterceptor(otelOpts...)) - sInterceptors = append(sInterceptors, otelgrpc.StreamServerInterceptor(otelOpts...)) uInterceptors = append(uInterceptors, enhanceWithClientInformation(gss.IncludeMetadata)) sInterceptors = append(sInterceptors, enhanceStreamWithClientInformation(gss.IncludeMetadata)) - opts = append(opts, grpc.ChainUnaryInterceptor(uInterceptors...), grpc.ChainStreamInterceptor(sInterceptors...)) + opts = append(opts, grpc.StatsHandler(otelgrpc.NewServerHandler(otelOpts...)), grpc.ChainUnaryInterceptor(uInterceptors...), grpc.ChainStreamInterceptor(sInterceptors...)) return opts, nil } // getGRPCCompressionName returns compression name registered in grpc. -func getGRPCCompressionName(compressionType configcompression.CompressionType) (string, error) { +func getGRPCCompressionName(compressionType configcompression.Type) (string, error) { switch compressionType { - case configcompression.Gzip: + case configcompression.TypeGzip: return gzip.Name, nil - case configcompression.Snappy: + case configcompression.TypeSnappy: return snappy.Name, nil - case configcompression.Zstd: + case configcompression.TypeZstd: return zstd.Name, nil default: return "", fmt.Errorf("unsupported compression type %q", compressionType) diff --git a/config/configgrpc/configgrpc_test.go b/config/configgrpc/configgrpc_test.go index 175848a5ebf..7d646af2b3e 100644 --- a/config/configgrpc/configgrpc_test.go +++ b/config/configgrpc/configgrpc_test.go @@ -32,14 +32,13 @@ import ( "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/extension/auth" "go.opentelemetry.io/collector/extension/auth/authtest" - "go.opentelemetry.io/collector/obsreport/obsreporttest" "go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp" ) // testBalancerBuilder facilitates testing validateBalancerName(). type testBalancerBuilder struct{} -func (testBalancerBuilder) Build(_ balancer.ClientConn, _ balancer.BuildOptions) balancer.Balancer { +func (testBalancerBuilder) Build(balancer.ClientConn, balancer.BuildOptions) balancer.Balancer { return nil } @@ -51,40 +50,47 @@ func init() { balancer.Register(testBalancerBuilder{}) } +var ( + componentID = component.MustNewID("component") + testAuthID = component.MustNewID("testauth") + mockID = component.MustNewID("mock") + doesntExistID = component.MustNewID("doesntexist") +) + func TestDefaultGrpcClientSettings(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(component.NewID("component")) + tt, err := componenttest.SetupTelemetry(componentID) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - gcs := &GRPCClientSettings{ - TLSSetting: configtls.TLSClientSetting{ + gcs := &ClientConfig{ + TLSSetting: configtls.ClientConfig{ Insecure: true, }, } - opts, err := gcs.toDialOptions(componenttest.NewNopHost(), tt.TelemetrySettings) + opts, err := gcs.toDialOptions(componenttest.NewNopHost(), tt.TelemetrySettings()) assert.NoError(t, err) - assert.Len(t, opts, 3) + assert.Len(t, opts, 2) } func TestAllGrpcClientSettings(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(component.NewID("component")) + tt, err := componenttest.SetupTelemetry(componentID) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) tests := []struct { - settings GRPCClientSettings + settings ClientConfig name string host component.Host }{ { name: "test all with gzip compression", - settings: GRPCClientSettings{ + settings: ClientConfig{ Headers: map[string]configopaque.String{ "test": "test", }, Endpoint: "localhost:1234", - Compression: configcompression.Gzip, - TLSSetting: configtls.TLSClientSetting{ + Compression: configcompression.TypeGzip, + TLSSetting: configtls.ClientConfig{ Insecure: false, }, Keepalive: &KeepaliveClientConfig{ @@ -97,23 +103,23 @@ func TestAllGrpcClientSettings(t *testing.T) { WaitForReady: true, BalancerName: "round_robin", Authority: "pseudo-authority", - Auth: &configauth.Authentication{AuthenticatorID: component.NewID("testauth")}, + Auth: &configauth.Authentication{AuthenticatorID: testAuthID}, }, host: &mockHost{ ext: map[component.ID]component.Component{ - component.NewID("testauth"): &authtest.MockClient{}, + testAuthID: &authtest.MockClient{}, }, }, }, { name: "test all with snappy compression", - settings: GRPCClientSettings{ + settings: ClientConfig{ Headers: map[string]configopaque.String{ "test": "test", }, Endpoint: "localhost:1234", - Compression: configcompression.Snappy, - TLSSetting: configtls.TLSClientSetting{ + Compression: configcompression.TypeSnappy, + TLSSetting: configtls.ClientConfig{ Insecure: false, }, Keepalive: &KeepaliveClientConfig{ @@ -126,23 +132,23 @@ func TestAllGrpcClientSettings(t *testing.T) { WaitForReady: true, BalancerName: "round_robin", Authority: "pseudo-authority", - Auth: &configauth.Authentication{AuthenticatorID: component.NewID("testauth")}, + Auth: &configauth.Authentication{AuthenticatorID: testAuthID}, }, host: &mockHost{ ext: map[component.ID]component.Component{ - component.NewID("testauth"): &authtest.MockClient{}, + testAuthID: &authtest.MockClient{}, }, }, }, { name: "test all with zstd compression", - settings: GRPCClientSettings{ + settings: ClientConfig{ Headers: map[string]configopaque.String{ "test": "test", }, Endpoint: "localhost:1234", - Compression: configcompression.Zstd, - TLSSetting: configtls.TLSClientSetting{ + Compression: configcompression.TypeZstd, + TLSSetting: configtls.ClientConfig{ Insecure: false, }, Keepalive: &KeepaliveClientConfig{ @@ -155,43 +161,43 @@ func TestAllGrpcClientSettings(t *testing.T) { WaitForReady: true, BalancerName: "configgrpc_balancer_test", Authority: "pseudo-authority", - Auth: &configauth.Authentication{AuthenticatorID: component.NewID("testauth")}, + Auth: &configauth.Authentication{AuthenticatorID: testAuthID}, }, host: &mockHost{ ext: map[component.ID]component.Component{ - component.NewID("testauth"): &authtest.MockClient{}, + testAuthID: &authtest.MockClient{}, }, }, }, } for _, test := range tests { t.Run(test.name, func(t *testing.T) { - opts, err := test.settings.toDialOptions(test.host, tt.TelemetrySettings) + opts, err := test.settings.toDialOptions(test.host, tt.TelemetrySettings()) assert.NoError(t, err) - assert.Len(t, opts, 10) + assert.Len(t, opts, 9) }) } } func TestDefaultGrpcServerSettings(t *testing.T) { - gss := &GRPCServerSettings{ - NetAddr: confignet.NetAddr{ + gss := &ServerConfig{ + NetAddr: confignet.AddrConfig{ Endpoint: "0.0.0.0:1234", }, } opts, err := gss.toServerOption(componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) assert.NoError(t, err) - assert.Len(t, opts, 2) + assert.Len(t, opts, 3) } func TestAllGrpcServerSettingsExceptAuth(t *testing.T) { - gss := &GRPCServerSettings{ - NetAddr: confignet.NetAddr{ + gss := &ServerConfig{ + NetAddr: confignet.AddrConfig{ Endpoint: "localhost:1234", Transport: "tcp", }, - TLSSetting: &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{}, + TLSSetting: &configtls.ServerConfig{ + TLSSetting: configtls.Config{}, ClientCAFile: "", }, MaxRecvMsgSizeMiB: 1, @@ -214,21 +220,40 @@ func TestAllGrpcServerSettingsExceptAuth(t *testing.T) { } opts, err := gss.toServerOption(componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) assert.NoError(t, err) - assert.Len(t, opts, 9) + assert.Len(t, opts, 10) } func TestGrpcServerAuthSettings(t *testing.T) { - gss := &GRPCServerSettings{ - NetAddr: confignet.NetAddr{ + gss := &ServerConfig{ + NetAddr: confignet.AddrConfig{ Endpoint: "0.0.0.0:1234", }, } gss.Auth = &configauth.Authentication{ - AuthenticatorID: component.NewID("mock"), + AuthenticatorID: mockID, } host := &mockHost{ ext: map[component.ID]component.Component{ - component.NewID("mock"): auth.NewServer(), + mockID: auth.NewServer(), + }, + } + srv, err := gss.ToServerContext(context.Background(), host, componenttest.NewNopTelemetrySettings()) + assert.NoError(t, err) + assert.NotNil(t, srv) +} + +func TestGrpcServerAuthSettings_Deprecated(t *testing.T) { + gss := &ServerConfig{ + NetAddr: confignet.AddrConfig{ + Endpoint: "0.0.0.0:1234", + }, + } + gss.Auth = &configauth.Authentication{ + AuthenticatorID: mockID, + } + host := &mockHost{ + ext: map[component.ID]component.Component{ + mockID: auth.NewServer(), }, } srv, err := gss.ToServer(host, componenttest.NewNopTelemetrySettings()) @@ -237,23 +262,23 @@ func TestGrpcServerAuthSettings(t *testing.T) { } func TestGRPCClientSettingsError(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(component.NewID("component")) + tt, err := componenttest.SetupTelemetry(componentID) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) tests := []struct { - settings GRPCClientSettings + settings ClientConfig err string host component.Host }{ { err: "^failed to load TLS config: failed to load CA CertPool File: failed to load cert /doesnt/exist:", - settings: GRPCClientSettings{ + settings: ClientConfig{ Headers: nil, Endpoint: "", Compression: "", - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + TLSSetting: configtls.Config{ CAFile: "/doesnt/exist", }, Insecure: false, @@ -264,12 +289,12 @@ func TestGRPCClientSettingsError(t *testing.T) { }, { err: "^failed to load TLS config: failed to load TLS cert and key: for auth via TLS, provide both certificate and key, or neither", - settings: GRPCClientSettings{ + settings: ClientConfig{ Headers: nil, Endpoint: "", Compression: "", - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + TLSSetting: configtls.Config{ CertFile: "/doesnt/exist", }, Insecure: false, @@ -280,13 +305,13 @@ func TestGRPCClientSettingsError(t *testing.T) { }, { err: "invalid balancer_name: test", - settings: GRPCClientSettings{ + settings: ClientConfig{ Headers: map[string]configopaque.String{ "test": "test", }, Endpoint: "localhost:1234", Compression: "gzip", - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: false, }, Keepalive: &KeepaliveClientConfig{ @@ -302,25 +327,25 @@ func TestGRPCClientSettingsError(t *testing.T) { }, { err: "failed to resolve authenticator \"doesntexist\": authenticator not found", - settings: GRPCClientSettings{ + settings: ClientConfig{ Endpoint: "localhost:1234", - Auth: &configauth.Authentication{AuthenticatorID: component.NewID("doesntexist")}, + Auth: &configauth.Authentication{AuthenticatorID: doesntExistID}, }, host: &mockHost{ext: map[component.ID]component.Component{}}, }, { err: "no extensions configuration available", - settings: GRPCClientSettings{ + settings: ClientConfig{ Endpoint: "localhost:1234", - Auth: &configauth.Authentication{AuthenticatorID: component.NewID("doesntexist")}, + Auth: &configauth.Authentication{AuthenticatorID: doesntExistID}, }, host: &mockHost{}, }, { err: "unsupported compression type \"zlib\"", - settings: GRPCClientSettings{ + settings: ClientConfig{ Endpoint: "localhost:1234", - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: true, }, Compression: "zlib", @@ -329,9 +354,9 @@ func TestGRPCClientSettingsError(t *testing.T) { }, { err: "unsupported compression type \"deflate\"", - settings: GRPCClientSettings{ + settings: ClientConfig{ Endpoint: "localhost:1234", - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: true, }, Compression: "deflate", @@ -340,9 +365,9 @@ func TestGRPCClientSettingsError(t *testing.T) { }, { err: "unsupported compression type \"bad\"", - settings: GRPCClientSettings{ + settings: ClientConfig{ Endpoint: "localhost:1234", - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: true, }, Compression: "bad", @@ -352,7 +377,7 @@ func TestGRPCClientSettingsError(t *testing.T) { } for _, test := range tests { t.Run(test.err, func(t *testing.T) { - _, err := test.settings.ToClientConn(context.Background(), test.host, tt.TelemetrySettings) + _, err := test.settings.ToClientConn(context.Background(), test.host, tt.TelemetrySettings()) assert.Error(t, err) assert.Regexp(t, test.err, err) }) @@ -360,31 +385,31 @@ func TestGRPCClientSettingsError(t *testing.T) { } func TestUseSecure(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(component.NewID("component")) + tt, err := componenttest.SetupTelemetry(componentID) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - gcs := &GRPCClientSettings{ + gcs := &ClientConfig{ Headers: nil, Endpoint: "", Compression: "", - TLSSetting: configtls.TLSClientSetting{}, + TLSSetting: configtls.ClientConfig{}, Keepalive: nil, } - dialOpts, err := gcs.toDialOptions(componenttest.NewNopHost(), tt.TelemetrySettings) + dialOpts, err := gcs.toDialOptions(componenttest.NewNopHost(), tt.TelemetrySettings()) assert.NoError(t, err) - assert.Len(t, dialOpts, 3) + assert.Len(t, dialOpts, 2) } func TestGRPCServerWarning(t *testing.T) { tests := []struct { name string - settings GRPCServerSettings + settings ServerConfig len int }{ { - settings: GRPCServerSettings{ - NetAddr: confignet.NetAddr{ + settings: ServerConfig{ + NetAddr: confignet.AddrConfig{ Endpoint: "0.0.0.0:1234", Transport: "tcp", }, @@ -392,8 +417,8 @@ func TestGRPCServerWarning(t *testing.T) { len: 1, }, { - settings: GRPCServerSettings{ - NetAddr: confignet.NetAddr{ + settings: ServerConfig{ + NetAddr: confignet.AddrConfig{ Endpoint: "127.0.0.1:1234", Transport: "tcp", }, @@ -401,8 +426,8 @@ func TestGRPCServerWarning(t *testing.T) { len: 0, }, { - settings: GRPCServerSettings{ - NetAddr: confignet.NetAddr{ + settings: ServerConfig{ + NetAddr: confignet.AddrConfig{ Endpoint: "0.0.0.0:1234", Transport: "unix", }, @@ -429,18 +454,18 @@ func TestGRPCServerWarning(t *testing.T) { func TestGRPCServerSettingsError(t *testing.T) { tests := []struct { - settings GRPCServerSettings + settings ServerConfig err string }{ { err: "^failed to load TLS config: failed to load CA CertPool File: failed to load cert /doesnt/exist:", - settings: GRPCServerSettings{ - NetAddr: confignet.NetAddr{ + settings: ServerConfig{ + NetAddr: confignet.AddrConfig{ Endpoint: "127.0.0.1:1234", Transport: "tcp", }, - TLSSetting: &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: &configtls.ServerConfig{ + TLSSetting: configtls.Config{ CAFile: "/doesnt/exist", }, }, @@ -448,13 +473,13 @@ func TestGRPCServerSettingsError(t *testing.T) { }, { err: "^failed to load TLS config: failed to load TLS cert and key: for auth via TLS, provide both certificate and key, or neither", - settings: GRPCServerSettings{ - NetAddr: confignet.NetAddr{ + settings: ServerConfig{ + NetAddr: confignet.AddrConfig{ Endpoint: "127.0.0.1:1234", Transport: "tcp", }, - TLSSetting: &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: &configtls.ServerConfig{ + TLSSetting: configtls.Config{ CertFile: "/doesnt/exist", }, }, @@ -462,12 +487,12 @@ func TestGRPCServerSettingsError(t *testing.T) { }, { err: "^failed to load client CA CertPool: failed to load CA /doesnt/exist:", - settings: GRPCServerSettings{ - NetAddr: confignet.NetAddr{ + settings: ServerConfig{ + NetAddr: confignet.AddrConfig{ Endpoint: "127.0.0.1:1234", Transport: "tcp", }, - TLSSetting: &configtls.TLSServerSetting{ + TLSSetting: &configtls.ServerConfig{ ClientCAFile: "/doesnt/exist", }, }, @@ -475,58 +500,52 @@ func TestGRPCServerSettingsError(t *testing.T) { } for _, test := range tests { t.Run(test.err, func(t *testing.T) { - _, err := test.settings.ToServer(componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) + _, err := test.settings.ToServerContext(context.Background(), componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) assert.Regexp(t, test.err, err) }) } } func TestGRPCServerSettings_ToListener_Error(t *testing.T) { - settings := GRPCServerSettings{ - NetAddr: confignet.NetAddr{ + settings := ServerConfig{ + NetAddr: confignet.AddrConfig{ Endpoint: "127.0.0.1:1234567", Transport: "tcp", }, - TLSSetting: &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{ - CertFile: "/doesnt/exist", - }, - }, - Keepalive: nil, } - _, err := settings.ToListener() + _, err := settings.NetAddr.Listen(context.Background()) assert.Error(t, err) } func TestHttpReception(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(component.NewID("component")) + tt, err := componenttest.SetupTelemetry(componentID) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) tests := []struct { name string - tlsServerCreds *configtls.TLSServerSetting - tlsClientCreds *configtls.TLSClientSetting + tlsServerCreds *configtls.ServerConfig + tlsClientCreds *configtls.ClientConfig hasError bool }{ { name: "noTLS", tlsServerCreds: nil, - tlsClientCreds: &configtls.TLSClientSetting{ + tlsClientCreds: &configtls.ClientConfig{ Insecure: true, }, }, { name: "TLS", - tlsServerCreds: &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{ + tlsServerCreds: &configtls.ServerConfig{ + TLSSetting: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), CertFile: filepath.Join("testdata", "server.crt"), KeyFile: filepath.Join("testdata", "server.key"), }, }, - tlsClientCreds: &configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + tlsClientCreds: &configtls.ClientConfig{ + TLSSetting: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), }, ServerName: "localhost", @@ -534,13 +553,13 @@ func TestHttpReception(t *testing.T) { }, { name: "NoServerCertificates", - tlsServerCreds: &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{ + tlsServerCreds: &configtls.ServerConfig{ + TLSSetting: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), }, }, - tlsClientCreds: &configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + tlsClientCreds: &configtls.ClientConfig{ + TLSSetting: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), }, ServerName: "localhost", @@ -549,16 +568,16 @@ func TestHttpReception(t *testing.T) { }, { name: "mTLS", - tlsServerCreds: &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{ + tlsServerCreds: &configtls.ServerConfig{ + TLSSetting: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), CertFile: filepath.Join("testdata", "server.crt"), KeyFile: filepath.Join("testdata", "server.key"), }, ClientCAFile: filepath.Join("testdata", "ca.crt"), }, - tlsClientCreds: &configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + tlsClientCreds: &configtls.ClientConfig{ + TLSSetting: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), CertFile: filepath.Join("testdata", "client.crt"), KeyFile: filepath.Join("testdata", "client.key"), @@ -568,16 +587,16 @@ func TestHttpReception(t *testing.T) { }, { name: "NoClientCertificate", - tlsServerCreds: &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{ + tlsServerCreds: &configtls.ServerConfig{ + TLSSetting: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), CertFile: filepath.Join("testdata", "server.crt"), KeyFile: filepath.Join("testdata", "server.key"), }, ClientCAFile: filepath.Join("testdata", "ca.crt"), }, - tlsClientCreds: &configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + tlsClientCreds: &configtls.ClientConfig{ + TLSSetting: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), }, ServerName: "localhost", @@ -586,16 +605,16 @@ func TestHttpReception(t *testing.T) { }, { name: "WrongClientCA", - tlsServerCreds: &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{ + tlsServerCreds: &configtls.ServerConfig{ + TLSSetting: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), CertFile: filepath.Join("testdata", "server.crt"), KeyFile: filepath.Join("testdata", "server.key"), }, ClientCAFile: filepath.Join("testdata", "server.crt"), }, - tlsClientCreds: &configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + tlsClientCreds: &configtls.ClientConfig{ + TLSSetting: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), CertFile: filepath.Join("testdata", "client.crt"), KeyFile: filepath.Join("testdata", "client.key"), @@ -609,16 +628,16 @@ func TestHttpReception(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - gss := &GRPCServerSettings{ - NetAddr: confignet.NetAddr{ + gss := &ServerConfig{ + NetAddr: confignet.AddrConfig{ Endpoint: "localhost:0", Transport: "tcp", }, TLSSetting: test.tlsServerCreds, } - ln, err := gss.ToListener() + ln, err := gss.NetAddr.Listen(context.Background()) assert.NoError(t, err) - s, err := gss.ToServer(componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) + s, err := gss.ToServerContext(context.Background(), componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) assert.NoError(t, err) ptraceotlp.RegisterGRPCServer(s, &grpcTraceServer{}) @@ -626,12 +645,13 @@ func TestHttpReception(t *testing.T) { _ = s.Serve(ln) }() - gcs := &GRPCClientSettings{ + gcs := &ClientConfig{ Endpoint: ln.Addr().String(), TLSSetting: *test.tlsClientCreds, } - grpcClientConn, errClient := gcs.ToClientConn(context.Background(), componenttest.NewNopHost(), tt.TelemetrySettings) + grpcClientConn, errClient := gcs.ToClientConn(context.Background(), componenttest.NewNopHost(), tt.TelemetrySettings()) assert.NoError(t, errClient) + defer func() { assert.NoError(t, grpcClientConn.Close()) }() c := ptraceotlp.NewGRPCClient(grpcClientConn) ctx, cancelFunc := context.WithTimeout(context.Background(), 2*time.Second) resp, errResp := c.Export(ctx, ptraceotlp.NewExportRequest(), grpc.WaitForReady(true)) @@ -651,20 +671,20 @@ func TestReceiveOnUnixDomainSocket(t *testing.T) { if runtime.GOOS == "windows" { t.Skip("skipping test on windows") } - tt, err := obsreporttest.SetupTelemetry(component.NewID("component")) + tt, err := componenttest.SetupTelemetry(componentID) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) socketName := tempSocketName(t) - gss := &GRPCServerSettings{ - NetAddr: confignet.NetAddr{ + gss := &ServerConfig{ + NetAddr: confignet.AddrConfig{ Endpoint: socketName, Transport: "unix", }, } - ln, err := gss.ToListener() + ln, err := gss.NetAddr.Listen(context.Background()) assert.NoError(t, err) - srv, err := gss.ToServer(componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) + srv, err := gss.ToServerContext(context.Background(), componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) assert.NoError(t, err) ptraceotlp.RegisterGRPCServer(srv, &grpcTraceServer{}) @@ -672,14 +692,15 @@ func TestReceiveOnUnixDomainSocket(t *testing.T) { _ = srv.Serve(ln) }() - gcs := &GRPCClientSettings{ + gcs := &ClientConfig{ Endpoint: "unix://" + ln.Addr().String(), - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: true, }, } - grpcClientConn, errClient := gcs.ToClientConn(context.Background(), componenttest.NewNopHost(), tt.TelemetrySettings) + grpcClientConn, errClient := gcs.ToClientConn(context.Background(), componenttest.NewNopHost(), tt.TelemetrySettings()) assert.NoError(t, errClient) + defer func() { assert.NoError(t, grpcClientConn.Close()) }() c := ptraceotlp.NewGRPCClient(grpcClientConn) ctx, cancelFunc := context.WithTimeout(context.Background(), 2*time.Second) resp, errResp := c.Export(ctx, ptraceotlp.NewExportRequest(), grpc.WaitForReady(true)) @@ -804,7 +825,7 @@ func TestStreamInterceptorEnhancesClient(t *testing.T) { ctx: inCtx, } - handler := func(srv any, stream grpc.ServerStream) error { + handler := func(_ any, stream grpc.ServerStream) error { outContext = stream.Context() return nil } @@ -851,19 +872,19 @@ func TestClientInfoInterceptors(t *testing.T) { // prepare the server { - gss := &GRPCServerSettings{ - NetAddr: confignet.NetAddr{ + gss := &ServerConfig{ + NetAddr: confignet.AddrConfig{ Endpoint: "localhost:0", Transport: "tcp", }, } - srv, err := gss.ToServer(componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) + srv, err := gss.ToServerContext(context.Background(), componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) require.NoError(t, err) ptraceotlp.RegisterGRPCServer(srv, mock) defer srv.Stop() - l, err = gss.ToListener() + l, err = gss.NetAddr.Listen(context.Background()) require.NoError(t, err) go func() { @@ -873,21 +894,22 @@ func TestClientInfoInterceptors(t *testing.T) { // prepare the client and execute a RPC { - gcs := &GRPCClientSettings{ + gcs := &ClientConfig{ Endpoint: l.Addr().String(), - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: true, }, } - tt, err := obsreporttest.SetupTelemetry(component.NewID("component")) + tt, err := componenttest.SetupTelemetry(componentID) require.NoError(t, err) defer func() { require.NoError(t, tt.Shutdown(context.Background())) }() - grpcClientConn, errClient := gcs.ToClientConn(context.Background(), componenttest.NewNopHost(), tt.TelemetrySettings) + grpcClientConn, errClient := gcs.ToClientConn(context.Background(), componenttest.NewNopHost(), tt.TelemetrySettings()) require.NoError(t, errClient) + defer func() { assert.NoError(t, grpcClientConn.Close()) }() cl := ptraceotlp.NewGRPCClient(grpcClientConn) ctx, cancelFunc := context.WithTimeout(context.Background(), 2*time.Second) @@ -918,7 +940,7 @@ func TestDefaultUnaryInterceptorAuthSucceeded(t *testing.T) { return ctx, nil } - handler := func(ctx context.Context, req any) (any, error) { + handler := func(ctx context.Context, _ any) (any, error) { handlerCalled = true cl := client.FromContext(ctx) assert.Equal(t, "1.2.3.4", cl.Addr.String()) @@ -944,7 +966,7 @@ func TestDefaultUnaryInterceptorAuthFailure(t *testing.T) { authCalled = true return context.Background(), expectedErr } - handler := func(ctx context.Context, req any) (any, error) { + handler := func(context.Context, any) (any, error) { assert.FailNow(t, "the handler should not have been called on auth failure!") return nil, nil } @@ -965,7 +987,7 @@ func TestDefaultUnaryInterceptorMissingMetadata(t *testing.T) { assert.FailNow(t, "the auth func should not have been called!") return context.Background(), nil } - handler := func(ctx context.Context, req any) (any, error) { + handler := func(context.Context, any) (any, error) { assert.FailNow(t, "the handler should not have been called!") return nil, nil } @@ -989,7 +1011,7 @@ func TestDefaultStreamInterceptorAuthSucceeded(t *testing.T) { }) return ctx, nil } - handler := func(srv any, stream grpc.ServerStream) error { + handler := func(_ any, stream grpc.ServerStream) error { // ensure that the client information is propagated down to the underlying stream cl := client.FromContext(stream.Context()) assert.Equal(t, "1.2.3.4", cl.Addr.String()) @@ -1018,7 +1040,7 @@ func TestDefaultStreamInterceptorAuthFailure(t *testing.T) { authCalled = true return context.Background(), expectedErr } - handler := func(srv any, stream grpc.ServerStream) error { + handler := func(any, grpc.ServerStream) error { assert.FailNow(t, "the handler should not have been called on auth failure!") return nil } @@ -1041,7 +1063,7 @@ func TestDefaultStreamInterceptorMissingMetadata(t *testing.T) { assert.FailNow(t, "the auth func should not have been called!") return context.Background(), nil } - handler := func(srv any, stream grpc.ServerStream) error { + handler := func(any, grpc.ServerStream) error { assert.FailNow(t, "the handler should not have been called!") return nil } diff --git a/config/configgrpc/go.mod b/config/configgrpc/go.mod index d0b3bfec179..224c724c8e6 100644 --- a/config/configgrpc/go.mod +++ b/config/configgrpc/go.mod @@ -1,79 +1,69 @@ module go.opentelemetry.io/collector/config/configgrpc -go 1.20 +go 1.21 require ( - github.com/mostynb/go-grpc-compression v1.2.1 + github.com/mostynb/go-grpc-compression v1.2.2 github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.85.0 - go.opentelemetry.io/collector/component v0.85.0 - go.opentelemetry.io/collector/config/configauth v0.85.0 - go.opentelemetry.io/collector/config/configcompression v0.85.0 - go.opentelemetry.io/collector/config/confignet v0.85.0 - go.opentelemetry.io/collector/config/configopaque v0.85.0 - go.opentelemetry.io/collector/config/configtls v0.85.0 - go.opentelemetry.io/collector/config/internal v0.85.0 - go.opentelemetry.io/collector/extension/auth v0.85.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0014 - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.44.0 - go.opentelemetry.io/otel v1.18.0 - go.uber.org/zap v1.26.0 - google.golang.org/grpc v1.58.1 + go.opentelemetry.io/collector v0.96.0 + go.opentelemetry.io/collector/component v0.96.0 + go.opentelemetry.io/collector/config/configauth v0.96.0 + go.opentelemetry.io/collector/config/configcompression v0.96.0 + go.opentelemetry.io/collector/config/confignet v0.96.0 + go.opentelemetry.io/collector/config/configopaque v1.3.0 + go.opentelemetry.io/collector/config/configtls v0.96.0 + go.opentelemetry.io/collector/config/internal v0.96.0 + go.opentelemetry.io/collector/extension/auth v0.96.0 + go.opentelemetry.io/collector/pdata v1.3.0 + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 + go.opentelemetry.io/otel v1.24.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 + google.golang.org/grpc v1.62.0 ) require ( cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 // indirect - contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect + github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.0 // indirect + github.com/klauspost/compress v1.17.2 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.0.1 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.16.0 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect - github.com/prometheus/statsd_exporter v0.22.7 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.85.0 // indirect - go.opentelemetry.io/collector/confmap v0.85.0 // indirect - go.opentelemetry.io/collector/consumer v0.85.0 // indirect - go.opentelemetry.io/collector/exporter v0.85.0 // indirect - go.opentelemetry.io/collector/extension v0.85.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0014 // indirect - go.opentelemetry.io/collector/processor v0.85.0 // indirect - go.opentelemetry.io/collector/receiver v0.85.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.41.0 // indirect - go.opentelemetry.io/otel/metric v1.18.0 // indirect - go.opentelemetry.io/otel/sdk v1.18.0 // indirect - go.opentelemetry.io/otel/sdk/metric v0.41.0 // indirect - go.opentelemetry.io/otel/trace v1.18.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect + go.opentelemetry.io/collector/confmap v0.96.0 // indirect + go.opentelemetry.io/collector/extension v0.96.0 // indirect + go.opentelemetry.io/collector/featuregate v1.3.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -99,24 +89,10 @@ replace go.opentelemetry.io/collector/extension/auth => ../../extension/auth replace go.opentelemetry.io/collector/confmap => ../../confmap -replace go.opentelemetry.io/collector/processor => ../../processor - -replace go.opentelemetry.io/collector/exporter => ../../exporter - -replace go.opentelemetry.io/collector/extension/zpagesextension => ../../extension/zpagesextension - -replace go.opentelemetry.io/collector/receiver => ../../receiver - -replace go.opentelemetry.io/collector/connector => ../../connector - replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/pdata => ../../pdata replace go.opentelemetry.io/collector/component => ../../component -replace go.opentelemetry.io/collector/semconv => ../../semconv - replace go.opentelemetry.io/collector/consumer => ../../consumer - -replace go.opentelemetry.io/collector/service => ../../service diff --git a/config/configgrpc/go.sum b/config/configgrpc/go.sum index 29dbc55cf07..6774b9cc3c9 100644 --- a/config/configgrpc/go.sum +++ b/config/configgrpc/go.sum @@ -1,601 +1,150 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0 h1:Dg9iHVQfrhq82rUNu9ZxUDrJLaxFUe/HlCVaLyRruq8= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.21.0 h1:JNBsyXVoOoNJtTQcnEY5uYpZIbeCTYIeDe0Xh1bySMk= +cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= +cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 h1:aRVqY1p2IJaBGStWMsQMpkAa83cPkCDLl80eOj0Rbz4= cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68/go.mod h1:1a3eRNYX12fs5UABBIXS8HXVvQbX9hRB/RkEBPORpe8= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= 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= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= -github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= +github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= -github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mostynb/go-grpc-compression v1.2.1 h1:16tdYxBZSD8p9AUmvw4F7Nyc2T4/eE7XsIXrgxSEcJI= -github.com/mostynb/go-grpc-compression v1.2.1/go.mod h1:oidYvYyefMmhcuvU8fLJ8FfZyTyVzJ6SkmD5fIKgRe8= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/mostynb/go-grpc-compression v1.2.2 h1:XaDbnRvt2+1vgr0b/l0qh4mJAfIxE0bKXtz2Znl3GGI= +github.com/mostynb/go-grpc-compression v1.2.2/go.mod h1:GOCr2KBxXcblCuczg3YdLQlcin1/NfyDA348ckuCH6w= 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/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= -github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -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/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= -go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.44.0 h1:b8xjZxHbLrXAum4SxJd1Rlm7Y/fKaB+6ACI7/e5EfSA= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.44.0/go.mod h1:1ei0a32xOGkFoySu7y1DAHfcuIhC0pNZpvY2huXuMy4= -go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= -go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/exporters/prometheus v0.41.0 h1:A3/bhjP5SmELy8dcpK+uttHeh9Qrh+YnS16/VzrztRQ= -go.opentelemetry.io/otel/exporters/prometheus v0.41.0/go.mod h1:mKuXEMi9suyyNJQ99SZCO0mpWGFe0MIALtjd3r6uo7Q= -go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= -go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= -go.opentelemetry.io/otel/sdk v1.18.0 h1:e3bAB0wB3MljH38sHzpV/qWrOTCFrdZF2ct9F8rBkcY= -go.opentelemetry.io/otel/sdk v1.18.0/go.mod h1:1RCygWV7plY2KmdskZEDDBs4tJeHG92MdHZIluiYs/M= -go.opentelemetry.io/otel/sdk/metric v0.41.0 h1:c3sAt9/pQ5fSIUfl0gPtClV3HhE18DCVzByD33R/zsk= -go.opentelemetry.io/otel/sdk/metric v0.41.0/go.mod h1:PmOmSt+iOklKtIg5O4Vz9H/ttcRFSNTgii+E1KGyn1w= -go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= -go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 h1:UNQQKPfTDe1J81ViolILjTKPr9WetKW6uei2hFgJmFs= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= +golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/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-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.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/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= -google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +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= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/config/configgrpc/package_test.go b/config/configgrpc/package_test.go new file mode 100644 index 00000000000..519657748da --- /dev/null +++ b/config/configgrpc/package_test.go @@ -0,0 +1,17 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package configgrpc + +import ( + "testing" + + "go.uber.org/goleak" +) + +// The IgnoreTopFunction call prevents catching the leak generated by opencensus +// defaultWorker.Start which at this time is part of the package's init call. +// See https://github.com/open-telemetry/opentelemetry-collector/issues/9165#issuecomment-1874836336 for more context. +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) +} diff --git a/config/confighttp/README.md b/config/confighttp/README.md index 2249f6c72db..beb28028bdb 100644 --- a/config/confighttp/README.md +++ b/config/confighttp/README.md @@ -16,7 +16,10 @@ README](../configtls/README.md). - `endpoint`: address:port - [`tls`](../configtls/README.md) -- `headers`: name/value pairs added to the HTTP request headers +- [`headers`](https://pkg.go.dev/net/http#Request): name/value pairs added to the HTTP request headers + - certain headers such as Content-Length and Connection are automatically written when needed and values in Header may be ignored. + - `Host` header is automatically derived from `endpoint` value. However, this automatic assignment can be overridden by explicitly setting the Host field in the headers field. + - if `Host` header is provided then it overrides `Host` field in [Request](https://pkg.go.dev/net/http#Request) which results as an override of `Host` header value. - [`read_buffer_size`](https://golang.org/pkg/net/http/#Transport) - [`timeout`](https://golang.org/pkg/net/http/#Client) - [`write_buffer_size`](https://golang.org/pkg/net/http/#Transport) @@ -29,6 +32,8 @@ README](../configtls/README.md). - [`idle_conn_timeout`](https://golang.org/pkg/net/http/#Transport) - [`auth`](../configauth/README.md) - [`disable_keep_alives`](https://golang.org/pkg/net/http/#Transport) +- [`http2_read_idle_timeout`](https://pkg.go.dev/golang.org/x/net/http2#Transport) +- [`http2_ping_timeout`](https://pkg.go.dev/golang.org/x/net/http2#Transport) Example: @@ -69,6 +74,7 @@ will not be enabled. header, allowing clients to cache the response to CORS preflight requests. If not set, browsers use a default of 5 seconds. - `endpoint`: Valid value syntax available [here](https://github.com/grpc/grpc/blob/master/doc/naming.md) +- `max_request_body_size`: configures the maximum allowed body size in bytes for a single request. Default: `0` (no restriction) - [`tls`](../configtls/README.md) - [`auth`](../configauth/README.md) diff --git a/config/confighttp/clientinfohandler.go b/config/confighttp/clientinfohandler.go index 25105cf51a6..464153bc2c7 100644 --- a/config/confighttp/clientinfohandler.go +++ b/config/confighttp/clientinfohandler.go @@ -11,8 +11,6 @@ import ( "go.opentelemetry.io/collector/client" ) -var _ http.Handler = (*clientInfoHandler)(nil) - // clientInfoHandler is an http.Handler that enhances the incoming request context with client.Info. type clientInfoHandler struct { next http.Handler diff --git a/config/confighttp/clientinfohandler_test.go b/config/confighttp/clientinfohandler_test.go index d8201cad149..bbd18ec52fd 100644 --- a/config/confighttp/clientinfohandler_test.go +++ b/config/confighttp/clientinfohandler_test.go @@ -5,11 +5,14 @@ package confighttp // import "go.opentelemetry.io/collector/config/confighttp" import ( "net" + "net/http" "testing" "github.com/stretchr/testify/assert" ) +var _ http.Handler = (*clientInfoHandler)(nil) + func TestParseIP(t *testing.T) { testCases := []struct { desc string diff --git a/config/confighttp/compression.go b/config/confighttp/compression.go index faa716c4414..88ecafe78da 100644 --- a/config/confighttp/compression.go +++ b/config/confighttp/compression.go @@ -13,6 +13,7 @@ import ( "io" "net/http" + "github.com/golang/snappy" "github.com/klauspost/compress/zstd" "go.opentelemetry.io/collector/config/configcompression" @@ -20,11 +21,11 @@ import ( type compressRoundTripper struct { rt http.RoundTripper - compressionType configcompression.CompressionType + compressionType configcompression.Type compressor *compressor } -func newCompressRoundTripper(rt http.RoundTripper, compressionType configcompression.CompressionType) (*compressRoundTripper, error) { +func newCompressRoundTripper(rt http.RoundTripper, compressionType configcompression.Type) (*compressRoundTripper, error) { encoder, err := newCompressor(compressionType) if err != nil { return nil, err @@ -85,7 +86,7 @@ func httpContentDecompressor(h http.Handler, eh func(w http.ResponseWriter, r *h errHandler: errHandler, base: h, decoders: map[string]func(body io.ReadCloser) (io.ReadCloser, error){ - "": func(body io.ReadCloser) (io.ReadCloser, error) { + "": func(io.ReadCloser) (io.ReadCloser, error) { // Not a compressed payload. Nothing to do. return nil, nil }, @@ -117,6 +118,18 @@ func httpContentDecompressor(h http.Handler, eh func(w http.ResponseWriter, r *h } return zr, nil }, + "snappy": func(body io.ReadCloser) (io.ReadCloser, error) { + sr := snappy.NewReader(body) + sb := new(bytes.Buffer) + _, err := io.Copy(sb, sr) + if err != nil { + return nil, err + } + if err = body.Close(); err != nil { + return nil, err + } + return io.NopCloser(sb), nil + }, }, } d.decoders["deflate"] = d.decoders["zlib"] diff --git a/config/confighttp/compression_test.go b/config/confighttp/compression_test.go index 091d9faff12..63d9ba02ab9 100644 --- a/config/confighttp/compression_test.go +++ b/config/confighttp/compression_test.go @@ -33,7 +33,7 @@ func TestHTTPClientCompression(t *testing.T) { tests := []struct { name string - encoding configcompression.CompressionType + encoding configcompression.Type reqBody []byte shouldError bool }{ @@ -51,31 +51,31 @@ func TestHTTPClientCompression(t *testing.T) { }, { name: "ValidGzip", - encoding: configcompression.Gzip, + encoding: configcompression.TypeGzip, reqBody: compressedGzipBody.Bytes(), shouldError: false, }, { name: "ValidZlib", - encoding: configcompression.Zlib, + encoding: configcompression.TypeZlib, reqBody: compressedZlibBody.Bytes(), shouldError: false, }, { name: "ValidDeflate", - encoding: configcompression.Deflate, + encoding: configcompression.TypeDeflate, reqBody: compressedDeflateBody.Bytes(), shouldError: false, }, { name: "ValidSnappy", - encoding: configcompression.Snappy, + encoding: configcompression.TypeSnappy, reqBody: compressedSnappyBody.Bytes(), shouldError: false, }, { name: "ValidZstd", - encoding: configcompression.Zstd, + encoding: configcompression.TypeZstd, reqBody: compressedZstdBody.Bytes(), shouldError: false, }, @@ -95,7 +95,7 @@ func TestHTTPClientCompression(t *testing.T) { req, err := http.NewRequest(http.MethodGet, srv.URL, reqBody) require.NoError(t, err, "failed to create request to test handler") - clientSettings := HTTPClientSettings{ + clientSettings := ClientConfig{ Endpoint: srv.URL, Compression: tt.encoding, } @@ -190,6 +190,12 @@ func TestHTTPContentDecompressionHandler(t *testing.T) { reqBody: compressZstd(t, testBody), respCode: http.StatusOK, }, + { + name: "ValidSnappy", + encoding: "snappy", + reqBody: compressSnappy(t, testBody), + respCode: http.StatusOK, + }, { name: "InvalidDeflate", encoding: "deflate", @@ -218,6 +224,13 @@ func TestHTTPContentDecompressionHandler(t *testing.T) { respCode: http.StatusBadRequest, respBody: "invalid input: magic number mismatch", }, + { + name: "InvalidSnappy", + encoding: "snappy", + reqBody: bytes.NewBuffer(testBody), + respCode: http.StatusBadRequest, + respBody: "snappy: corrupt input\n", + }, { name: "UnsupportedCompression", encoding: "nosuchcompression", @@ -274,7 +287,7 @@ func TestHTTPContentCompressionRequestWithNilBody(t *testing.T) { require.NoError(t, err, "failed to create request to test handler") client := http.Client{} - client.Transport, err = newCompressRoundTripper(http.DefaultTransport, configcompression.Gzip) + client.Transport, err = newCompressRoundTripper(http.DefaultTransport, configcompression.TypeGzip) require.NoError(t, err) res, err := client.Do(req) require.NoError(t, err) @@ -287,7 +300,7 @@ func TestHTTPContentCompressionRequestWithNilBody(t *testing.T) { type copyFailBody struct { } -func (*copyFailBody) Read(_ []byte) (n int, err error) { +func (*copyFailBody) Read([]byte) (n int, err error) { return 0, fmt.Errorf("read failed") } @@ -296,7 +309,7 @@ func (*copyFailBody) Close() error { } func TestHTTPContentCompressionCopyError(t *testing.T) { - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusOK) })) t.Cleanup(server.Close) @@ -305,7 +318,7 @@ func TestHTTPContentCompressionCopyError(t *testing.T) { require.NoError(t, err) client := http.Client{} - client.Transport, err = newCompressRoundTripper(http.DefaultTransport, configcompression.Gzip) + client.Transport, err = newCompressRoundTripper(http.DefaultTransport, configcompression.TypeGzip) require.NoError(t, err) _, err = client.Do(req) require.Error(t, err) @@ -320,7 +333,7 @@ func (*closeFailBody) Close() error { } func TestHTTPContentCompressionRequestBodyCloseError(t *testing.T) { - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusOK) })) t.Cleanup(server.Close) @@ -329,7 +342,7 @@ func TestHTTPContentCompressionRequestBodyCloseError(t *testing.T) { require.NoError(t, err) client := http.Client{} - client.Transport, err = newCompressRoundTripper(http.DefaultTransport, configcompression.Gzip) + client.Transport, err = newCompressRoundTripper(http.DefaultTransport, configcompression.TypeGzip) require.NoError(t, err) _, err = client.Do(req) require.Error(t, err) diff --git a/config/confighttp/compressor.go b/config/confighttp/compressor.go index 0ff951d4130..3e085bead0d 100644 --- a/config/confighttp/compressor.go +++ b/config/confighttp/compressor.go @@ -39,15 +39,15 @@ type compressor struct { // writerFactory defines writer field in CompressRoundTripper. // The validity of input is already checked when NewCompressRoundTripper was called in confighttp, -func newCompressor(compressionType configcompression.CompressionType) (*compressor, error) { +func newCompressor(compressionType configcompression.Type) (*compressor, error) { switch compressionType { - case configcompression.Gzip: + case configcompression.TypeGzip: return gZipPool, nil - case configcompression.Snappy: + case configcompression.TypeSnappy: return snappyPool, nil - case configcompression.Zstd: + case configcompression.TypeZstd: return zStdPool, nil - case configcompression.Zlib, configcompression.Deflate: + case configcompression.TypeZlib, configcompression.TypeDeflate: return zLibPool, nil } return nil, errors.New("unsupported compression type, ") diff --git a/config/confighttp/confighttp.go b/config/confighttp/confighttp.go index 9294b6ee78c..40ec4ba0b83 100644 --- a/config/confighttp/confighttp.go +++ b/config/confighttp/confighttp.go @@ -6,9 +6,11 @@ package confighttp // import "go.opentelemetry.io/collector/config/confighttp" import ( "crypto/tls" "errors" + "fmt" "io" "net" "net/http" + "net/url" "time" "github.com/rs/cors" @@ -27,13 +29,16 @@ import ( const headerContentEncoding = "Content-Encoding" -// HTTPClientSettings defines settings for creating an HTTP client. -type HTTPClientSettings struct { +// ClientConfig defines settings for creating an HTTP client. +type ClientConfig struct { // The target URL to send data to (e.g.: http://some.url:9411/v1/traces). Endpoint string `mapstructure:"endpoint"` + // ProxyURL setting for the collector + ProxyURL string `mapstructure:"proxy_url"` + // TLSSetting struct exposes TLS client configuration. - TLSSetting configtls.TLSClientSetting `mapstructure:"tls"` + TLSSetting configtls.ClientConfig `mapstructure:"tls"` // ReadBufferSize for HTTP client. See http.Transport.ReadBufferSize. ReadBufferSize int `mapstructure:"read_buffer_size"` @@ -56,7 +61,7 @@ type HTTPClientSettings struct { Auth *configauth.Authentication `mapstructure:"auth"` // The compression key for supported compression types within collector. - Compression configcompression.CompressionType `mapstructure:"compression"` + Compression configcompression.Type `mapstructure:"compression"` // MaxIdleConns is used to set a limit to the maximum idle HTTP connections the client can keep open. // There's an already set value, and we want to override it only if an explicit value provided @@ -82,25 +87,35 @@ type HTTPClientSettings struct { // connection for every request. Before enabling this option please consider whether changes // to idle connection settings can achieve your goal. DisableKeepAlives bool `mapstructure:"disable_keep_alives"` + + // This is needed in case you run into + // https://github.com/golang/go/issues/59690 + // https://github.com/golang/go/issues/36026 + // HTTP2ReadIdleTimeout if the connection has been idle for the configured value send a ping frame for health check + // 0s means no health check will be performed. + HTTP2ReadIdleTimeout time.Duration `mapstructure:"http2_read_idle_timeout"` + // HTTP2PingTimeout if there's no response to the ping within the configured value, the connection will be closed. + // If not set or set to 0, it defaults to 15s. + HTTP2PingTimeout time.Duration `mapstructure:"http2_ping_timeout"` } -// NewDefaultHTTPClientSettings returns HTTPClientSettings type object with +// NewDefaultClientConfig returns ClientConfig type object with // the default values of 'MaxIdleConns' and 'IdleConnTimeout'. // Other config options are not added as they are initialized with 'zero value' by GoLang as default. -// We encourage to use this function to create an object of HTTPClientSettings. -func NewDefaultHTTPClientSettings() HTTPClientSettings { +// We encourage to use this function to create an object of ClientConfig. +func NewDefaultClientConfig() ClientConfig { // The default values are taken from the values of 'DefaultTransport' of 'http' package. maxIdleConns := 100 idleConnTimeout := 90 * time.Second - return HTTPClientSettings{ + return ClientConfig{ MaxIdleConns: &maxIdleConns, IdleConnTimeout: &idleConnTimeout, } } // ToClient creates an HTTP client. -func (hcs *HTTPClientSettings) ToClient(host component.Host, settings component.TelemetrySettings) (*http.Client, error) { +func (hcs *ClientConfig) ToClient(host component.Host, settings component.TelemetrySettings) (*http.Client, error) { tlsCfg, err := hcs.TLSSetting.LoadTLSConfig() if err != nil { return nil, err @@ -132,8 +147,26 @@ func (hcs *HTTPClientSettings) ToClient(host component.Host, settings component. transport.IdleConnTimeout = *hcs.IdleConnTimeout } + // Setting the Proxy URL + if hcs.ProxyURL != "" { + proxyURL, parseErr := url.ParseRequestURI(hcs.ProxyURL) + if parseErr != nil { + return nil, parseErr + } + transport.Proxy = http.ProxyURL(proxyURL) + } + transport.DisableKeepAlives = hcs.DisableKeepAlives + if hcs.HTTP2ReadIdleTimeout > 0 { + transport2, transportErr := http2.ConfigureTransports(transport) + if transportErr != nil { + return nil, fmt.Errorf("failed to configure http2 transport: %w", transportErr) + } + transport2.ReadIdleTimeout = hcs.HTTP2ReadIdleTimeout + transport2.PingTimeout = hcs.HTTP2PingTimeout + } + clientTransport := (http.RoundTripper)(transport) // The Auth RoundTripper should always be the innermost to ensure that @@ -165,7 +198,7 @@ func (hcs *HTTPClientSettings) ToClient(host component.Host, settings component. // Compress the body using specified compression methods if non-empty string is provided. // Supporting gzip, zlib, deflate, snappy, and zstd; none is treated as uncompressed. - if configcompression.IsCompressed(hcs.Compression) { + if hcs.Compression.IsCompressed() { clientTransport, err = newCompressRoundTripper(clientTransport, hcs.Compression) if err != nil { return nil, err @@ -203,23 +236,30 @@ type headerRoundTripper struct { // RoundTrip is a custom RoundTripper that adds headers to the request. func (interceptor *headerRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { + // Set Host header if provided + hostHeader, found := interceptor.headers["Host"] + if found && hostHeader != "" { + // `Host` field should be set to override default `Host` header value which is Endpoint + req.Host = string(hostHeader) + } for k, v := range interceptor.headers { req.Header.Set(k, string(v)) } + // Send the request to next transport. return interceptor.transport.RoundTrip(req) } -// HTTPServerSettings defines settings for creating an HTTP server. -type HTTPServerSettings struct { +// ServerConfig defines settings for creating an HTTP server. +type ServerConfig struct { // Endpoint configures the listening address for the server. Endpoint string `mapstructure:"endpoint"` // TLSSetting struct exposes TLS client configuration. - TLSSetting *configtls.TLSServerSetting `mapstructure:"tls"` + TLSSetting *configtls.ServerConfig `mapstructure:"tls"` // CORS configures the server for HTTP cross-origin resource sharing (CORS). - CORS *CORSSettings `mapstructure:"cors"` + CORS *CORSConfig `mapstructure:"cors"` // Auth for this receiver Auth *configauth.Authentication `mapstructure:"auth"` @@ -240,7 +280,7 @@ type HTTPServerSettings struct { } // ToListener creates a net.Listener. -func (hss *HTTPServerSettings) ToListener() (net.Listener, error) { +func (hss *ServerConfig) ToListener() (net.Listener, error) { listener, err := net.Listen("tcp", hss.Endpoint) if err != nil { return nil, err @@ -259,14 +299,14 @@ func (hss *HTTPServerSettings) ToListener() (net.Listener, error) { } // toServerOptions has options that change the behavior of the HTTP server -// returned by HTTPServerSettings.ToServer(). +// returned by ServerConfig.ToServer(). type toServerOptions struct { errHandler func(w http.ResponseWriter, r *http.Request, errorMsg string, statusCode int) decoders map[string]func(body io.ReadCloser) (io.ReadCloser, error) } // ToServerOption is an option to change the behavior of the HTTP server -// returned by HTTPServerSettings.ToServer(). +// returned by ServerConfig.ToServer(). type ToServerOption func(opts *toServerOptions) // WithErrorHandler overrides the HTTP error handler that gets invoked @@ -289,7 +329,7 @@ func WithDecoder(key string, dec func(body io.ReadCloser) (io.ReadCloser, error) } // ToServer creates an http.Server from settings object. -func (hss *HTTPServerSettings) ToServer(host component.Host, settings component.TelemetrySettings, handler http.Handler, opts ...ToServerOption) (*http.Server, error) { +func (hss *ServerConfig) ToServer(host component.Host, settings component.TelemetrySettings, handler http.Handler, opts ...ToServerOption) (*http.Server, error) { internal.WarnOnUnspecifiedHost(settings.Logger, hss.Endpoint) serverOpts := &toServerOptions{} @@ -323,7 +363,6 @@ func (hss *HTTPServerSettings) ToServer(host component.Host, settings component. handler = rateLimitInterceptor(handler, limiter) } - // TODO: emit a warning when non-empty CorsHeaders and empty CorsOrigins. if hss.CORS != nil && len(hss.CORS.AllowedOrigins) > 0 { co := cors.Options{ AllowedOrigins: hss.CORS.AllowedOrigins, @@ -333,6 +372,9 @@ func (hss *HTTPServerSettings) ToServer(host component.Host, settings component. } handler = cors.New(co).Handler(handler) } + if hss.CORS != nil && len(hss.CORS.AllowedOrigins) == 0 && len(hss.CORS.AllowedHeaders) > 0 { + settings.Logger.Warn("The CORS configuration specifies allowed headers but no allowed origins, and is therefore ignored.") + } if hss.ResponseHeaders != nil { handler = responseHeadersHandler(handler, hss.ResponseHeaders) @@ -346,7 +388,7 @@ func (hss *HTTPServerSettings) ToServer(host component.Host, settings component. otelhttp.WithTracerProvider(settings.TracerProvider), otelhttp.WithMeterProvider(settings.MeterProvider), otelhttp.WithPropagators(otel.GetTextMapPropagator()), - otelhttp.WithSpanNameFormatter(func(operation string, r *http.Request) string { + otelhttp.WithSpanNameFormatter(func(_ string, r *http.Request) string { return r.URL.Path }), ) @@ -374,9 +416,9 @@ func responseHeadersHandler(handler http.Handler, headers map[string]configopaqu }) } -// CORSSettings configures a receiver for HTTP cross-origin resource sharing (CORS). +// CORSConfig configures a receiver for HTTP cross-origin resource sharing (CORS). // See the underlying https://github.com/rs/cors package for details. -type CORSSettings struct { +type CORSConfig struct { // AllowedOrigins sets the allowed values of the Origin header for // HTTP/JSON requests to an OTLP receiver. An origin may contain a // wildcard (*) to replace 0 or more characters (e.g., diff --git a/config/confighttp/confighttp_test.go b/config/confighttp/confighttp_test.go index 5d62a7af930..fc90f8f7caf 100644 --- a/config/confighttp/confighttp_test.go +++ b/config/confighttp/confighttp_test.go @@ -38,14 +38,21 @@ type customRoundTripper struct { var _ http.RoundTripper = (*customRoundTripper)(nil) -func (c *customRoundTripper) RoundTrip(_ *http.Request) (*http.Response, error) { +func (c *customRoundTripper) RoundTrip(*http.Request) (*http.Response, error) { return nil, nil } +var ( + testAuthID = component.MustNewID("testauth") + mockID = component.MustNewID("mock") + dummyID = component.MustNewID("dummy") + nonExistingID = component.MustNewID("nonexisting") +) + func TestAllHTTPClientSettings(t *testing.T) { host := &mockHost{ ext: map[component.ID]component.Component{ - component.NewID("testauth"): &authtest.MockClient{ResultRoundTripper: &customRoundTripper{}}, + testAuthID: &authtest.MockClient{ResultRoundTripper: &customRoundTripper{}}, }, } @@ -53,78 +60,106 @@ func TestAllHTTPClientSettings(t *testing.T) { maxIdleConnsPerHost := 40 maxConnsPerHost := 45 idleConnTimeout := 30 * time.Second + http2PingTimeout := 5 * time.Second tests := []struct { name string - settings HTTPClientSettings + settings ClientConfig shouldError bool }{ { name: "all_valid_settings", - settings: HTTPClientSettings{ + settings: ClientConfig{ Endpoint: "localhost:1234", - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: false, }, - ReadBufferSize: 1024, - WriteBufferSize: 512, - MaxIdleConns: &maxIdleConns, - MaxIdleConnsPerHost: &maxIdleConnsPerHost, - MaxConnsPerHost: &maxConnsPerHost, - IdleConnTimeout: &idleConnTimeout, - CustomRoundTripper: func(next http.RoundTripper) (http.RoundTripper, error) { return next, nil }, - Compression: "", - DisableKeepAlives: true, + ReadBufferSize: 1024, + WriteBufferSize: 512, + MaxIdleConns: &maxIdleConns, + MaxIdleConnsPerHost: &maxIdleConnsPerHost, + MaxConnsPerHost: &maxConnsPerHost, + IdleConnTimeout: &idleConnTimeout, + CustomRoundTripper: func(next http.RoundTripper) (http.RoundTripper, error) { return next, nil }, + Compression: "", + DisableKeepAlives: true, + HTTP2ReadIdleTimeout: idleConnTimeout, + HTTP2PingTimeout: http2PingTimeout, }, shouldError: false, }, { name: "all_valid_settings_with_none_compression", - settings: HTTPClientSettings{ + settings: ClientConfig{ Endpoint: "localhost:1234", - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: false, }, - ReadBufferSize: 1024, - WriteBufferSize: 512, - MaxIdleConns: &maxIdleConns, - MaxIdleConnsPerHost: &maxIdleConnsPerHost, - MaxConnsPerHost: &maxConnsPerHost, - IdleConnTimeout: &idleConnTimeout, - CustomRoundTripper: func(next http.RoundTripper) (http.RoundTripper, error) { return next, nil }, - Compression: "none", - DisableKeepAlives: true, + ReadBufferSize: 1024, + WriteBufferSize: 512, + MaxIdleConns: &maxIdleConns, + MaxIdleConnsPerHost: &maxIdleConnsPerHost, + MaxConnsPerHost: &maxConnsPerHost, + IdleConnTimeout: &idleConnTimeout, + CustomRoundTripper: func(next http.RoundTripper) (http.RoundTripper, error) { return next, nil }, + Compression: "none", + DisableKeepAlives: true, + HTTP2ReadIdleTimeout: idleConnTimeout, + HTTP2PingTimeout: http2PingTimeout, }, shouldError: false, }, { name: "all_valid_settings_with_gzip_compression", - settings: HTTPClientSettings{ + settings: ClientConfig{ + Endpoint: "localhost:1234", + TLSSetting: configtls.ClientConfig{ + Insecure: false, + }, + ReadBufferSize: 1024, + WriteBufferSize: 512, + MaxIdleConns: &maxIdleConns, + MaxIdleConnsPerHost: &maxIdleConnsPerHost, + MaxConnsPerHost: &maxConnsPerHost, + IdleConnTimeout: &idleConnTimeout, + CustomRoundTripper: func(next http.RoundTripper) (http.RoundTripper, error) { return next, nil }, + Compression: "gzip", + DisableKeepAlives: true, + HTTP2ReadIdleTimeout: idleConnTimeout, + HTTP2PingTimeout: http2PingTimeout, + }, + shouldError: false, + }, + { + name: "all_valid_settings_http2_health_check", + settings: ClientConfig{ Endpoint: "localhost:1234", - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: false, }, - ReadBufferSize: 1024, - WriteBufferSize: 512, - MaxIdleConns: &maxIdleConns, - MaxIdleConnsPerHost: &maxIdleConnsPerHost, - MaxConnsPerHost: &maxConnsPerHost, - IdleConnTimeout: &idleConnTimeout, - CustomRoundTripper: func(next http.RoundTripper) (http.RoundTripper, error) { return next, nil }, - Compression: "gzip", - DisableKeepAlives: true, + ReadBufferSize: 1024, + WriteBufferSize: 512, + MaxIdleConns: &maxIdleConns, + MaxIdleConnsPerHost: &maxIdleConnsPerHost, + MaxConnsPerHost: &maxConnsPerHost, + IdleConnTimeout: &idleConnTimeout, + CustomRoundTripper: func(next http.RoundTripper) (http.RoundTripper, error) { return next, nil }, + Compression: "gzip", + DisableKeepAlives: true, + HTTP2ReadIdleTimeout: idleConnTimeout, + HTTP2PingTimeout: http2PingTimeout, }, shouldError: false, }, { name: "error_round_tripper_returned", - settings: HTTPClientSettings{ + settings: ClientConfig{ Endpoint: "localhost:1234", - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: false, }, ReadBufferSize: 1024, WriteBufferSize: 512, - CustomRoundTripper: func(next http.RoundTripper) (http.RoundTripper, error) { return nil, errors.New("error") }, + CustomRoundTripper: func(http.RoundTripper) (http.RoundTripper, error) { return nil, errors.New("error") }, }, shouldError: true, }, @@ -159,20 +194,20 @@ func TestAllHTTPClientSettings(t *testing.T) { func TestPartialHTTPClientSettings(t *testing.T) { host := &mockHost{ ext: map[component.ID]component.Component{ - component.NewID("testauth"): &authtest.MockClient{ResultRoundTripper: &customRoundTripper{}}, + testAuthID: &authtest.MockClient{ResultRoundTripper: &customRoundTripper{}}, }, } tests := []struct { name string - settings HTTPClientSettings + settings ClientConfig shouldError bool }{ { name: "valid_partial_settings", - settings: HTTPClientSettings{ + settings: ClientConfig{ Endpoint: "localhost:1234", - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: false, }, ReadBufferSize: 1024, @@ -203,25 +238,80 @@ func TestPartialHTTPClientSettings(t *testing.T) { } func TestDefaultHTTPClientSettings(t *testing.T) { - httpClientSettings := NewDefaultHTTPClientSettings() + httpClientSettings := NewDefaultClientConfig() assert.EqualValues(t, 100, *httpClientSettings.MaxIdleConns) assert.EqualValues(t, 90*time.Second, *httpClientSettings.IdleConnTimeout) } +func TestProxyURL(t *testing.T) { + testCases := []struct { + desc string + proxyURL string + expectedURL *url.URL + err bool + }{ + { + desc: "default config", + expectedURL: nil, + }, + { + desc: "proxy is set", + proxyURL: "http://proxy.example.com:8080", + expectedURL: &url.URL{Scheme: "http", Host: "proxy.example.com:8080"}, + }, + { + desc: "proxy is invalid", + proxyURL: "://example.com", + err: true, + }, + } + for _, tC := range testCases { + t.Run(tC.desc, func(t *testing.T) { + s := NewDefaultClientConfig() + s.ProxyURL = tC.proxyURL + + tt := componenttest.NewNopTelemetrySettings() + tt.TracerProvider = nil + client, err := s.ToClient(componenttest.NewNopHost(), tt) + + if tC.err { + require.Error(t, err) + } else { + require.NoError(t, err) + } + + if err == nil { + transport := client.Transport.(*http.Transport) + require.NotNil(t, transport.Proxy) + + url, err := transport.Proxy(&http.Request{URL: &url.URL{Scheme: "http", Host: "example.com"}}) + require.NoError(t, err) + + if tC.expectedURL == nil { + assert.Nil(t, url) + } else { + require.NotNil(t, url) + assert.Equal(t, tC.expectedURL, url) + } + } + }) + } +} + func TestHTTPClientSettingsError(t *testing.T) { host := &mockHost{ ext: map[component.ID]component.Component{}, } tests := []struct { - settings HTTPClientSettings + settings ClientConfig err string }{ { err: "^failed to load TLS config: failed to load CA CertPool File: failed to load cert /doesnt/exist:", - settings: HTTPClientSettings{ + settings: ClientConfig{ Endpoint: "", - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + TLSSetting: configtls.Config{ CAFile: "/doesnt/exist", }, Insecure: false, @@ -231,10 +321,10 @@ func TestHTTPClientSettingsError(t *testing.T) { }, { err: "^failed to load TLS config: failed to load TLS cert and key: for auth via TLS, provide both certificate and key, or neither", - settings: HTTPClientSettings{ + settings: ClientConfig{ Endpoint: "", - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + TLSSetting: configtls.Config{ CertFile: "/doesnt/exist", }, Insecure: false, @@ -244,9 +334,9 @@ func TestHTTPClientSettingsError(t *testing.T) { }, { err: "failed to resolve authenticator \"dummy\": authenticator not found", - settings: HTTPClientSettings{ + settings: ClientConfig{ Endpoint: "https://localhost:1234/v1/traces", - Auth: &configauth.Authentication{AuthenticatorID: component.NewID("dummy")}, + Auth: &configauth.Authentication{AuthenticatorID: dummyID}, }, }, } @@ -262,19 +352,19 @@ func TestHTTPClientSettingWithAuthConfig(t *testing.T) { tests := []struct { name string shouldErr bool - settings HTTPClientSettings + settings ClientConfig host component.Host }{ { name: "no_auth_extension_enabled", - settings: HTTPClientSettings{ + settings: ClientConfig{ Endpoint: "localhost:1234", Auth: nil, }, shouldErr: false, host: &mockHost{ ext: map[component.ID]component.Component{ - component.NewID("mock"): &authtest.MockClient{ + mockID: &authtest.MockClient{ ResultRoundTripper: &customRoundTripper{}, }, }, @@ -282,77 +372,77 @@ func TestHTTPClientSettingWithAuthConfig(t *testing.T) { }, { name: "with_auth_configuration_and_no_extension", - settings: HTTPClientSettings{ + settings: ClientConfig{ Endpoint: "localhost:1234", - Auth: &configauth.Authentication{AuthenticatorID: component.NewID("dummy")}, + Auth: &configauth.Authentication{AuthenticatorID: dummyID}, }, shouldErr: true, host: &mockHost{ ext: map[component.ID]component.Component{ - component.NewID("mock"): &authtest.MockClient{ResultRoundTripper: &customRoundTripper{}}, + mockID: &authtest.MockClient{ResultRoundTripper: &customRoundTripper{}}, }, }, }, { name: "with_auth_configuration_and_no_extension_map", - settings: HTTPClientSettings{ + settings: ClientConfig{ Endpoint: "localhost:1234", - Auth: &configauth.Authentication{AuthenticatorID: component.NewID("dummy")}, + Auth: &configauth.Authentication{AuthenticatorID: dummyID}, }, shouldErr: true, host: componenttest.NewNopHost(), }, { name: "with_auth_configuration_has_extension", - settings: HTTPClientSettings{ + settings: ClientConfig{ Endpoint: "localhost:1234", - Auth: &configauth.Authentication{AuthenticatorID: component.NewID("mock")}, + Auth: &configauth.Authentication{AuthenticatorID: mockID}, }, shouldErr: false, host: &mockHost{ ext: map[component.ID]component.Component{ - component.NewID("mock"): &authtest.MockClient{ResultRoundTripper: &customRoundTripper{}}, + mockID: &authtest.MockClient{ResultRoundTripper: &customRoundTripper{}}, }, }, }, { name: "with_auth_configuration_has_extension_and_headers", - settings: HTTPClientSettings{ + settings: ClientConfig{ Endpoint: "localhost:1234", - Auth: &configauth.Authentication{AuthenticatorID: component.NewID("mock")}, + Auth: &configauth.Authentication{AuthenticatorID: mockID}, Headers: map[string]configopaque.String{"foo": "bar"}, }, shouldErr: false, host: &mockHost{ ext: map[component.ID]component.Component{ - component.NewID("mock"): &authtest.MockClient{ResultRoundTripper: &customRoundTripper{}}, + mockID: &authtest.MockClient{ResultRoundTripper: &customRoundTripper{}}, }, }, }, { name: "with_auth_configuration_has_extension_and_compression", - settings: HTTPClientSettings{ + settings: ClientConfig{ Endpoint: "localhost:1234", Auth: &configauth.Authentication{AuthenticatorID: component.NewID("mock")}, - Compression: configcompression.Gzip, + Compression: configcompression.TypeGzip, }, shouldErr: false, host: &mockHost{ ext: map[component.ID]component.Component{ - component.NewID("mock"): &authtest.MockClient{ResultRoundTripper: &customRoundTripper{}}, + mockID: &authtest.MockClient{ResultRoundTripper: &customRoundTripper{}}, }, }, }, { name: "with_auth_configuration_has_err_extension", - settings: HTTPClientSettings{ + settings: ClientConfig{ Endpoint: "localhost:1234", - Auth: &configauth.Authentication{AuthenticatorID: component.NewID("mock")}, + Auth: &configauth.Authentication{AuthenticatorID: mockID}, }, shouldErr: true, host: &mockHost{ ext: map[component.ID]component.Component{ - component.NewID("mock"): &authtest.MockClient{ + mockID: &authtest.MockClient{ ResultRoundTripper: &customRoundTripper{}, MustError: true}, }, }, @@ -371,7 +461,7 @@ func TestHTTPClientSettingWithAuthConfig(t *testing.T) { transport := client.Transport // Compression should wrap Auth, unwrap it - if configcompression.IsCompressed(test.settings.Compression) { + if test.settings.Compression.IsCompressed() { ct, ok := transport.(*compressRoundTripper) assert.True(t, ok) assert.Equal(t, test.settings.Compression, ct.compressionType) @@ -396,15 +486,15 @@ func TestHTTPClientSettingWithAuthConfig(t *testing.T) { func TestHTTPServerSettingsError(t *testing.T) { tests := []struct { - settings HTTPServerSettings + settings ServerConfig err string }{ { err: "^failed to load TLS config: failed to load CA CertPool File: failed to load cert /doesnt/exist:", - settings: HTTPServerSettings{ + settings: ServerConfig{ Endpoint: "localhost:0", - TLSSetting: &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: &configtls.ServerConfig{ + TLSSetting: configtls.Config{ CAFile: "/doesnt/exist", }, }, @@ -412,10 +502,10 @@ func TestHTTPServerSettingsError(t *testing.T) { }, { err: "^failed to load TLS config: failed to load TLS cert and key: for auth via TLS, provide both certificate and key, or neither", - settings: HTTPServerSettings{ + settings: ServerConfig{ Endpoint: "localhost:0", - TLSSetting: &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: &configtls.ServerConfig{ + TLSSetting: configtls.Config{ CertFile: "/doesnt/exist", }, }, @@ -423,9 +513,9 @@ func TestHTTPServerSettingsError(t *testing.T) { }, { err: "failed to load client CA CertPool: failed to load CA /doesnt/exist:", - settings: HTTPServerSettings{ + settings: ServerConfig{ Endpoint: "localhost:0", - TLSSetting: &configtls.TLSServerSetting{ + TLSSetting: &configtls.ServerConfig{ ClientCAFile: "/doesnt/exist", }, }, @@ -442,17 +532,17 @@ func TestHTTPServerSettingsError(t *testing.T) { func TestHTTPServerWarning(t *testing.T) { tests := []struct { name string - settings HTTPServerSettings + settings ServerConfig len int }{ { - settings: HTTPServerSettings{ + settings: ServerConfig{ Endpoint: "0.0.0.0:0", }, len: 1, }, { - settings: HTTPServerSettings{ + settings: ServerConfig{ Endpoint: "127.0.0.1:0", }, len: 0, @@ -467,7 +557,7 @@ func TestHTTPServerWarning(t *testing.T) { _, err := test.settings.ToServer( componenttest.NewNopHost(), set, - http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { _, errWrite := fmt.Fprint(w, "test") assert.NoError(t, errWrite) })) @@ -481,29 +571,29 @@ func TestHTTPServerWarning(t *testing.T) { func TestHttpReception(t *testing.T) { tests := []struct { name string - tlsServerCreds *configtls.TLSServerSetting - tlsClientCreds *configtls.TLSClientSetting + tlsServerCreds *configtls.ServerConfig + tlsClientCreds *configtls.ClientConfig hasError bool forceHTTP1 bool }{ { name: "noTLS", tlsServerCreds: nil, - tlsClientCreds: &configtls.TLSClientSetting{ + tlsClientCreds: &configtls.ClientConfig{ Insecure: true, }, }, { name: "TLS", - tlsServerCreds: &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{ + tlsServerCreds: &configtls.ServerConfig{ + TLSSetting: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), CertFile: filepath.Join("testdata", "server.crt"), KeyFile: filepath.Join("testdata", "server.key"), }, }, - tlsClientCreds: &configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + tlsClientCreds: &configtls.ClientConfig{ + TLSSetting: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), }, ServerName: "localhost", @@ -511,15 +601,15 @@ func TestHttpReception(t *testing.T) { }, { name: "TLS (HTTP/1.1)", - tlsServerCreds: &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{ + tlsServerCreds: &configtls.ServerConfig{ + TLSSetting: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), CertFile: filepath.Join("testdata", "server.crt"), KeyFile: filepath.Join("testdata", "server.key"), }, }, - tlsClientCreds: &configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + tlsClientCreds: &configtls.ClientConfig{ + TLSSetting: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), }, ServerName: "localhost", @@ -528,13 +618,13 @@ func TestHttpReception(t *testing.T) { }, { name: "NoServerCertificates", - tlsServerCreds: &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{ + tlsServerCreds: &configtls.ServerConfig{ + TLSSetting: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), }, }, - tlsClientCreds: &configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + tlsClientCreds: &configtls.ClientConfig{ + TLSSetting: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), }, ServerName: "localhost", @@ -543,16 +633,16 @@ func TestHttpReception(t *testing.T) { }, { name: "mTLS", - tlsServerCreds: &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{ + tlsServerCreds: &configtls.ServerConfig{ + TLSSetting: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), CertFile: filepath.Join("testdata", "server.crt"), KeyFile: filepath.Join("testdata", "server.key"), }, ClientCAFile: filepath.Join("testdata", "ca.crt"), }, - tlsClientCreds: &configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + tlsClientCreds: &configtls.ClientConfig{ + TLSSetting: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), CertFile: filepath.Join("testdata", "client.crt"), KeyFile: filepath.Join("testdata", "client.key"), @@ -562,16 +652,16 @@ func TestHttpReception(t *testing.T) { }, { name: "NoClientCertificate", - tlsServerCreds: &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{ + tlsServerCreds: &configtls.ServerConfig{ + TLSSetting: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), CertFile: filepath.Join("testdata", "server.crt"), KeyFile: filepath.Join("testdata", "server.key"), }, ClientCAFile: filepath.Join("testdata", "ca.crt"), }, - tlsClientCreds: &configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + tlsClientCreds: &configtls.ClientConfig{ + TLSSetting: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), }, ServerName: "localhost", @@ -580,16 +670,16 @@ func TestHttpReception(t *testing.T) { }, { name: "WrongClientCA", - tlsServerCreds: &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{ + tlsServerCreds: &configtls.ServerConfig{ + TLSSetting: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), CertFile: filepath.Join("testdata", "server.crt"), KeyFile: filepath.Join("testdata", "server.key"), }, ClientCAFile: filepath.Join("testdata", "server.crt"), }, - tlsClientCreds: &configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + tlsClientCreds: &configtls.ClientConfig{ + TLSSetting: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), CertFile: filepath.Join("testdata", "client.crt"), KeyFile: filepath.Join("testdata", "client.key"), @@ -603,7 +693,7 @@ func TestHttpReception(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - hss := &HTTPServerSettings{ + hss := &ServerConfig{ Endpoint: "localhost:0", TLSSetting: tt.tlsServerCreds, } @@ -613,7 +703,7 @@ func TestHttpReception(t *testing.T) { s, err := hss.ToServer( componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings(), - http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { _, errWrite := fmt.Fprint(w, "test") assert.NoError(t, errWrite) })) @@ -623,9 +713,6 @@ func TestHttpReception(t *testing.T) { _ = s.Serve(ln) }() - // Wait for the servers to start - <-time.After(10 * time.Millisecond) - prefix := "https://" expectedProto := "HTTP/2.0" if tt.tlsClientCreds.Insecure { @@ -633,7 +720,7 @@ func TestHttpReception(t *testing.T) { expectedProto = "HTTP/1.1" } - hcs := &HTTPClientSettings{ + hcs := &ClientConfig{ Endpoint: prefix + ln.Addr().String(), TLSSetting: *tt.tlsClientCreds, } @@ -666,7 +753,7 @@ func TestHttpCors(t *testing.T) { tests := []struct { name string - *CORSSettings + *CORSConfig allowedWorks bool disallowedWorks bool @@ -680,14 +767,14 @@ func TestHttpCors(t *testing.T) { }, { name: "emptyCORS", - CORSSettings: &CORSSettings{}, + CORSConfig: &CORSConfig{}, allowedWorks: false, disallowedWorks: false, extraHeaderWorks: false, }, { name: "OriginCORS", - CORSSettings: &CORSSettings{ + CORSConfig: &CORSConfig{ AllowedOrigins: []string{"allowed-*.com"}, }, allowedWorks: true, @@ -696,7 +783,7 @@ func TestHttpCors(t *testing.T) { }, { name: "CacheableCORS", - CORSSettings: &CORSSettings{ + CORSConfig: &CORSConfig{ AllowedOrigins: []string{"allowed-*.com"}, MaxAge: 360, }, @@ -706,7 +793,7 @@ func TestHttpCors(t *testing.T) { }, { name: "HeaderCORS", - CORSSettings: &CORSSettings{ + CORSConfig: &CORSConfig{ AllowedOrigins: []string{"allowed-*.com"}, AllowedHeaders: []string{"ExtraHeader"}, }, @@ -718,9 +805,9 @@ func TestHttpCors(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - hss := &HTTPServerSettings{ + hss := &ServerConfig{ Endpoint: "localhost:0", - CORS: tt.CORSSettings, + CORS: tt.CORSConfig, } ln, err := hss.ToListener() @@ -729,7 +816,7 @@ func TestHttpCors(t *testing.T) { s, err := hss.ToServer( componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings(), - http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusOK) })) require.NoError(t, err) @@ -738,25 +825,21 @@ func TestHttpCors(t *testing.T) { _ = s.Serve(ln) }() - // TODO: make starting server deterministic - // Wait for the servers to start - <-time.After(10 * time.Millisecond) - url := fmt.Sprintf("http://%s", ln.Addr().String()) expectedStatus := http.StatusNoContent - if tt.CORSSettings == nil || len(tt.AllowedOrigins) == 0 { + if tt.CORSConfig == nil || len(tt.AllowedOrigins) == 0 { expectedStatus = http.StatusOK } // Verify allowed domain gets responses that allow CORS. - verifyCorsResp(t, url, "allowed-origin.com", tt.CORSSettings, false, expectedStatus, tt.allowedWorks) + verifyCorsResp(t, url, "allowed-origin.com", tt.CORSConfig, false, expectedStatus, tt.allowedWorks) // Verify allowed domain and extra headers gets responses that allow CORS. - verifyCorsResp(t, url, "allowed-origin.com", tt.CORSSettings, true, expectedStatus, tt.extraHeaderWorks) + verifyCorsResp(t, url, "allowed-origin.com", tt.CORSConfig, true, expectedStatus, tt.extraHeaderWorks) // Verify disallowed domain gets responses that disallow CORS. - verifyCorsResp(t, url, "disallowed-origin.com", tt.CORSSettings, false, expectedStatus, tt.disallowedWorks) + verifyCorsResp(t, url, "disallowed-origin.com", tt.CORSConfig, false, expectedStatus, tt.disallowedWorks) require.NoError(t, s.Close()) }) @@ -764,36 +847,36 @@ func TestHttpCors(t *testing.T) { } func TestHttpCorsInvalidSettings(t *testing.T) { - hss := &HTTPServerSettings{ + hss := &ServerConfig{ Endpoint: "localhost:0", - CORS: &CORSSettings{AllowedHeaders: []string{"some-header"}}, + CORS: &CORSConfig{AllowedHeaders: []string{"some-header"}}, } // This effectively does not enable CORS but should also not cause an error s, err := hss.ToServer( componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings(), - http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})) + http.HandlerFunc(func(http.ResponseWriter, *http.Request) {})) require.NoError(t, err) require.NotNil(t, s) require.NoError(t, s.Close()) } func TestHttpCorsWithSettings(t *testing.T) { - hss := &HTTPServerSettings{ + hss := &ServerConfig{ Endpoint: "localhost:0", - CORS: &CORSSettings{ + CORS: &CORSConfig{ AllowedOrigins: []string{"*"}, }, Auth: &configauth.Authentication{ - AuthenticatorID: component.NewID("mock"), + AuthenticatorID: mockID, }, } host := &mockHost{ ext: map[component.ID]component.Component{ - component.NewID("mock"): auth.NewServer( - auth.WithServerAuthenticate(func(ctx context.Context, headers map[string][]string) (context.Context, error) { + mockID: auth.NewServer( + auth.WithServerAuthenticate(func(ctx context.Context, _ map[string][]string) (context.Context, error) { return ctx, errors.New("Settings failed") }), ), @@ -838,7 +921,7 @@ func TestHttpServerHeaders(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - hss := &HTTPServerSettings{ + hss := &ServerConfig{ Endpoint: "localhost:0", ResponseHeaders: tt.headers, } @@ -849,7 +932,7 @@ func TestHttpServerHeaders(t *testing.T) { s, err := hss.ToServer( componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings(), - http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusOK) })) require.NoError(t, err) @@ -858,10 +941,6 @@ func TestHttpServerHeaders(t *testing.T) { _ = s.Serve(ln) }() - // TODO: make starting server deterministic - // Wait for the servers to start - <-time.After(10 * time.Millisecond) - url := fmt.Sprintf("http://%s", ln.Addr().String()) // Verify allowed domain gets responses that allow CORS. @@ -872,7 +951,7 @@ func TestHttpServerHeaders(t *testing.T) { } } -func verifyCorsResp(t *testing.T, url string, origin string, set *CORSSettings, extraHeader bool, wantStatus int, wantAllowed bool) { +func verifyCorsResp(t *testing.T, url string, origin string, set *CORSConfig, extraHeader bool, wantStatus int, wantAllowed bool) { req, err := http.NewRequest(http.MethodOptions, url, nil) require.NoError(t, err, "Error creating trace OPTIONS request: %v", err) req.Header.Set("Origin", origin) @@ -929,8 +1008,8 @@ func verifyHeadersResp(t *testing.T, url string, expected map[string]configopaqu } } -func ExampleHTTPServerSettings() { - settings := HTTPServerSettings{ +func ExampleServerConfig() { + settings := ServerConfig{ Endpoint: "localhost:443", } s, err := settings.ToServer( @@ -972,9 +1051,9 @@ func TestHttpClientHeaders(t *testing.T) { })) defer server.Close() serverURL, _ := url.Parse(server.URL) - setting := HTTPClientSettings{ + setting := ClientConfig{ Endpoint: serverURL.String(), - TLSSetting: configtls.TLSClientSetting{}, + TLSSetting: configtls.ClientConfig{}, ReadBufferSize: 0, WriteBufferSize: 0, Timeout: 0, @@ -989,6 +1068,41 @@ func TestHttpClientHeaders(t *testing.T) { } } +func TestHttpClientHostHeader(t *testing.T) { + hostHeader := "th" + tt := struct { + name string + headers map[string]configopaque.String + }{ + name: "with_host_header", + headers: map[string]configopaque.String{ + "Host": configopaque.String(hostHeader), + }, + } + + t.Run(tt.name, func(t *testing.T) { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + assert.Equal(t, hostHeader, r.Host) + w.WriteHeader(http.StatusOK) + })) + defer server.Close() + serverURL, _ := url.Parse(server.URL) + setting := ClientConfig{ + Endpoint: serverURL.String(), + TLSSetting: configtls.TLSClientSetting{}, + ReadBufferSize: 0, + WriteBufferSize: 0, + Timeout: 0, + Headers: tt.headers, + } + client, _ := setting.ToClient(componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) + req, err := http.NewRequest(http.MethodGet, setting.Endpoint, nil) + assert.NoError(t, err) + _, err = client.Do(req) + assert.NoError(t, err) + }) +} + func TestContextWithClient(t *testing.T) { testCases := []struct { desc string @@ -1053,17 +1167,17 @@ func TestContextWithClient(t *testing.T) { func TestServerAuth(t *testing.T) { // prepare authCalled := false - hss := HTTPServerSettings{ + hss := ServerConfig{ Endpoint: "localhost:0", Auth: &configauth.Authentication{ - AuthenticatorID: component.NewID("mock"), + AuthenticatorID: mockID, }, } host := &mockHost{ ext: map[component.ID]component.Component{ - component.NewID("mock"): auth.NewServer( - auth.WithServerAuthenticate(func(ctx context.Context, headers map[string][]string) (context.Context, error) { + mockID: auth.NewServer( + auth.WithServerAuthenticate(func(ctx context.Context, _ map[string][]string) (context.Context, error) { authCalled = true return ctx, nil }), @@ -1072,7 +1186,7 @@ func TestServerAuth(t *testing.T) { } handlerCalled := false - handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + handler := http.HandlerFunc(func(http.ResponseWriter, *http.Request) { handlerCalled = true }) @@ -1088,9 +1202,9 @@ func TestServerAuth(t *testing.T) { } func TestInvalidServerAuth(t *testing.T) { - hss := HTTPServerSettings{ + hss := ServerConfig{ Auth: &configauth.Authentication{ - AuthenticatorID: component.NewID("non-existing"), + AuthenticatorID: nonExistingID, }, } @@ -1101,23 +1215,23 @@ func TestInvalidServerAuth(t *testing.T) { func TestFailedServerAuth(t *testing.T) { // prepare - hss := HTTPServerSettings{ + hss := ServerConfig{ Endpoint: "localhost:0", Auth: &configauth.Authentication{ - AuthenticatorID: component.NewID("mock"), + AuthenticatorID: mockID, }, } host := &mockHost{ ext: map[component.ID]component.Component{ - component.NewID("mock"): auth.NewServer( - auth.WithServerAuthenticate(func(ctx context.Context, headers map[string][]string) (context.Context, error) { + mockID: auth.NewServer( + auth.WithServerAuthenticate(func(ctx context.Context, _ map[string][]string) (context.Context, error) { return ctx, errors.New("Settings failed") }), ), }, } - srv, err := hss.ToServer(host, componenttest.NewNopTelemetrySettings(), http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})) + srv, err := hss.ToServer(host, componenttest.NewNopTelemetrySettings(), http.HandlerFunc(func(http.ResponseWriter, *http.Request) {})) require.NoError(t, err) // test @@ -1131,20 +1245,19 @@ func TestFailedServerAuth(t *testing.T) { func TestServerWithErrorHandler(t *testing.T) { // prepare - hss := HTTPServerSettings{ + hss := ServerConfig{ Endpoint: "localhost:0", } - eh := func(w http.ResponseWriter, r *http.Request, errorMsg string, statusCode int) { + eh := func(w http.ResponseWriter, _ *http.Request, _ string, statusCode int) { assert.Equal(t, statusCode, http.StatusBadRequest) // custom error handler changes returned status code http.Error(w, "invalid request", http.StatusInternalServerError) - } srv, err := hss.ToServer( componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings(), - http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {}), + http.HandlerFunc(func(http.ResponseWriter, *http.Request) {}), WithErrorHandler(eh), ) require.NoError(t, err) @@ -1162,7 +1275,7 @@ func TestServerWithErrorHandler(t *testing.T) { func TestServerWithDecoder(t *testing.T) { // prepare - hss := HTTPServerSettings{ + hss := ServerConfig{ Endpoint: "localhost:0", } decoder := func(body io.ReadCloser) (io.ReadCloser, error) { @@ -1172,7 +1285,7 @@ func TestServerWithDecoder(t *testing.T) { srv, err := hss.ToServer( componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings(), - http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {}), + http.HandlerFunc(func(http.ResponseWriter, *http.Request) {}), WithDecoder("something-else", decoder), ) require.NoError(t, err) @@ -1226,21 +1339,21 @@ func BenchmarkHttpRequest(b *testing.B) { }, } - tlsServerCreds := &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{ + tlsServerCreds := &configtls.ServerConfig{ + TLSSetting: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), CertFile: filepath.Join("testdata", "server.crt"), KeyFile: filepath.Join("testdata", "server.key"), }, } - tlsClientCreds := &configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + tlsClientCreds := &configtls.ClientConfig{ + TLSSetting: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), }, ServerName: "localhost", } - hss := &HTTPServerSettings{ + hss := &ServerConfig{ Endpoint: "localhost:0", TLSSetting: tlsServerCreds, } @@ -1248,7 +1361,7 @@ func BenchmarkHttpRequest(b *testing.B) { s, err := hss.ToServer( componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings(), - http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { _, errWrite := fmt.Fprint(w, "test") require.NoError(b, errWrite) })) @@ -1263,11 +1376,8 @@ func BenchmarkHttpRequest(b *testing.B) { _ = s.Close() }() - // Wait for the servers to start - <-time.After(10 * time.Millisecond) - for _, bb := range tests { - hcs := &HTTPClientSettings{ + hcs := &ClientConfig{ Endpoint: "https://" + ln.Addr().String(), TLSSetting: *tlsClientCreds, } diff --git a/config/confighttp/go.mod b/config/confighttp/go.mod index 11924deaae6..48dd57e2806 100644 --- a/config/confighttp/go.mod +++ b/config/confighttp/go.mod @@ -1,54 +1,65 @@ module go.opentelemetry.io/collector/config/confighttp -go 1.20 +go 1.21 require ( github.com/golang/snappy v0.0.4 - github.com/klauspost/compress v1.17.0 - github.com/rs/cors v1.10.0 + github.com/klauspost/compress v1.17.7 + github.com/rs/cors v1.10.1 github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.85.0 - go.opentelemetry.io/collector/component v0.85.0 - go.opentelemetry.io/collector/config/configauth v0.85.0 - go.opentelemetry.io/collector/config/configcompression v0.85.0 - go.opentelemetry.io/collector/config/configopaque v0.85.0 - go.opentelemetry.io/collector/config/configtelemetry v0.85.0 - go.opentelemetry.io/collector/config/configtls v0.85.0 - go.opentelemetry.io/collector/config/internal v0.85.0 - go.opentelemetry.io/collector/extension/auth v0.85.0 - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0 - go.opentelemetry.io/otel v1.18.0 - go.uber.org/zap v1.26.0 - golang.org/x/net v0.15.0 + go.opentelemetry.io/collector v0.96.0 + go.opentelemetry.io/collector/component v0.96.0 + go.opentelemetry.io/collector/config/configauth v0.96.0 + go.opentelemetry.io/collector/config/configcompression v0.96.0 + go.opentelemetry.io/collector/config/configopaque v1.3.0 + go.opentelemetry.io/collector/config/configtelemetry v0.96.0 + go.opentelemetry.io/collector/config/configtls v0.96.0 + go.opentelemetry.io/collector/config/internal v0.96.0 + go.opentelemetry.io/collector/extension/auth v0.96.0 + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 + go.opentelemetry.io/otel v1.24.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 + golang.org/x/net v0.21.0 ) require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/felixge/httpsnoop v1.0.3 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect + github.com/hashicorp/go-version v1.6.0 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.0.1 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/confmap v0.85.0 // indirect - go.opentelemetry.io/collector/extension v0.85.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0014 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0014 // indirect - go.opentelemetry.io/otel/metric v1.18.0 // indirect - go.opentelemetry.io/otel/trace v1.18.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/confmap v0.96.0 // indirect + go.opentelemetry.io/collector/extension v0.96.0 // indirect + go.opentelemetry.io/collector/featuregate v1.3.0 // indirect + go.opentelemetry.io/collector/pdata v1.3.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/grpc v1.58.1 // indirect - google.golang.org/protobuf v1.31.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -58,8 +69,6 @@ replace go.opentelemetry.io/collector/config/configauth => ../configauth replace go.opentelemetry.io/collector/config/configcompression => ../configcompression -replace go.opentelemetry.io/collector/config/confignet => ../confignet - replace go.opentelemetry.io/collector/config/configopaque => ../configopaque replace go.opentelemetry.io/collector/config/configtls => ../configtls @@ -74,24 +83,10 @@ replace go.opentelemetry.io/collector/extension/auth => ../../extension/auth replace go.opentelemetry.io/collector/confmap => ../../confmap -replace go.opentelemetry.io/collector/processor => ../../processor - -replace go.opentelemetry.io/collector/exporter => ../../exporter - -replace go.opentelemetry.io/collector/extension/zpagesextension => ../../extension/zpagesextension - -replace go.opentelemetry.io/collector/receiver => ../../receiver - -replace go.opentelemetry.io/collector/connector => ../../connector - replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/pdata => ../../pdata replace go.opentelemetry.io/collector/component => ../../component -replace go.opentelemetry.io/collector/semconv => ../../semconv - replace go.opentelemetry.io/collector/consumer => ../../consumer - -replace go.opentelemetry.io/collector/service => ../../service diff --git a/config/confighttp/go.sum b/config/confighttp/go.sum index 2d630dc6561..6d440490f4c 100644 --- a/config/confighttp/go.sum +++ b/config/confighttp/go.sum @@ -1,14 +1,20 @@ +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= -github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= @@ -17,50 +23,72 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= -github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= +github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= -github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rs/cors v1.10.0 h1:62NOS1h+r8p1mW6FM0FSB0exioXLhd/sh15KpjWBZ+8= -github.com/rs/cors v1.10.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= +github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0 h1:KfYpVmrjI7JuToy5k8XV3nkapjWx48k4E4JOtVstzQI= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0/go.mod h1:SeQhzAEccGVZVEy7aH87Nh0km+utSpo1pTv6eMMop48= -go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= -go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= -go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= -go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= -go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -70,21 +98,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -93,15 +120,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= -google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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/config/confighttp/package_test.go b/config/confighttp/package_test.go new file mode 100644 index 00000000000..30797439baf --- /dev/null +++ b/config/confighttp/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package confighttp + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/config/confignet/README.md b/config/confignet/README.md index 579564cbff4..cd8150e6303 100644 --- a/config/confignet/README.md +++ b/config/confignet/README.md @@ -13,6 +13,7 @@ leverage network configuration to set connection and transport information. - `transport`: Known protocols are "tcp", "tcp4" (IPv4-only), "tcp6" (IPv6-only), "udp", "udp4" (IPv4-only), "udp6" (IPv6-only), "ip", "ip4" (IPv4-only), "ip6" (IPv6-only), "unix", "unixgram" and "unixpacket". +- `dialer_timeout`: DialerTimeout is the maximum amount of time a dial will wait for a connect to complete. The default is no timeout. Note that for TCP receivers only the `endpoint` configuration setting is required. diff --git a/config/confignet/confignet.go b/config/confignet/confignet.go index 6695b6035b8..09f7ec24ff6 100644 --- a/config/confignet/confignet.go +++ b/config/confignet/confignet.go @@ -4,11 +4,20 @@ package confignet // import "go.opentelemetry.io/collector/config/confignet" import ( + "context" "net" + "time" ) -// NetAddr represents a network endpoint address. -type NetAddr struct { +// DialerConfig contains options for connecting to an address. +type DialerConfig struct { + // Timeout is the maximum amount of time a dial will wait for + // a connect to complete. The default is no timeout. + Timeout time.Duration `mapstructure:"timeout"` +} + +// AddrConfig represents a network endpoint address. +type AddrConfig struct { // Endpoint configures the address for this network connection. // For TCP and UDP networks, the address has the form "host:port". The host must be a literal IP address, // or a host name that can be resolved to IP addresses. The port must be a literal port number or a service name. @@ -19,34 +28,44 @@ type NetAddr struct { // Transport to use. Known protocols are "tcp", "tcp4" (IPv4-only), "tcp6" (IPv6-only), "udp", "udp4" (IPv4-only), // "udp6" (IPv6-only), "ip", "ip4" (IPv4-only), "ip6" (IPv6-only), "unix", "unixgram" and "unixpacket". Transport string `mapstructure:"transport"` + + // DialerConfig contains options for connecting to an address. + DialerConfig DialerConfig `mapstructure:"dialer"` } -// Dial equivalent with net.Dial for this address. -func (na *NetAddr) Dial() (net.Conn, error) { - return net.Dial(na.Transport, na.Endpoint) +// Dial equivalent with net.Dialer's DialContext for this address. +func (na *AddrConfig) Dial(ctx context.Context) (net.Conn, error) { + d := net.Dialer{Timeout: na.DialerConfig.Timeout} + return d.DialContext(ctx, na.Transport, na.Endpoint) } -// Listen equivalent with net.Listen for this address. -func (na *NetAddr) Listen() (net.Listener, error) { - return net.Listen(na.Transport, na.Endpoint) +// Listen equivalent with net.ListenConfig's Listen for this address. +func (na *AddrConfig) Listen(ctx context.Context) (net.Listener, error) { + lc := net.ListenConfig{} + return lc.Listen(ctx, na.Transport, na.Endpoint) } -// TCPAddr represents a TCP endpoint address. -type TCPAddr struct { +// TCPAddrConfig represents a TCP endpoint address. +type TCPAddrConfig struct { // Endpoint configures the address for this network connection. // The address has the form "host:port". The host must be a literal IP address, or a host name that can be // resolved to IP addresses. The port must be a literal port number or a service name. // If the host is a literal IPv6 address it must be enclosed in square brackets, as in "[2001:db8::1]:80" or // "[fe80::1%zone]:80". The zone specifies the scope of the literal IPv6 address as defined in RFC 4007. Endpoint string `mapstructure:"endpoint"` + + // DialerConfig contains options for connecting to an address. + DialerConfig DialerConfig `mapstructure:"dialer"` } -// Dial equivalent with net.Dial for this address. -func (na *TCPAddr) Dial() (net.Conn, error) { - return net.Dial("tcp", na.Endpoint) +// Dial equivalent with net.Dialer's DialContext for this address. +func (na *TCPAddrConfig) Dial(ctx context.Context) (net.Conn, error) { + d := net.Dialer{Timeout: na.DialerConfig.Timeout} + return d.DialContext(ctx, "tcp", na.Endpoint) } -// Listen equivalent with net.Listen for this address. -func (na *TCPAddr) Listen() (net.Listener, error) { - return net.Listen("tcp", na.Endpoint) +// Listen equivalent with net.ListenConfig's Listen for this address. +func (na *TCPAddrConfig) Listen(ctx context.Context) (net.Listener, error) { + lc := net.ListenConfig{} + return lc.Listen(ctx, "tcp", na.Endpoint) } diff --git a/config/confignet/confignet_test.go b/config/confignet/confignet_test.go index 7ba5e442ed5..f3481609562 100644 --- a/config/confignet/confignet_test.go +++ b/config/confignet/confignet_test.go @@ -4,18 +4,56 @@ package confignet import ( + "context" + "errors" "net" "testing" + "time" "github.com/stretchr/testify/assert" ) -func TestNetAddr(t *testing.T) { - nas := &NetAddr{ +func TestAddrConfigTimeout(t *testing.T) { + nac := &AddrConfig{ Endpoint: "localhost:0", Transport: "tcp", + DialerConfig: DialerConfig{ + Timeout: -1 * time.Second, + }, } - ln, err := nas.Listen() + _, err := nac.Dial(context.Background()) + assert.Error(t, err) + var netErr net.Error + if errors.As(err, &netErr) { + assert.True(t, netErr.Timeout()) + } else { + assert.Fail(t, "error should be a net.Error") + } +} + +func TestTCPAddrConfigTimeout(t *testing.T) { + nac := &TCPAddrConfig{ + Endpoint: "localhost:0", + DialerConfig: DialerConfig{ + Timeout: -1 * time.Second, + }, + } + _, err := nac.Dial(context.Background()) + assert.Error(t, err) + var netErr net.Error + if errors.As(err, &netErr) { + assert.True(t, netErr.Timeout()) + } else { + assert.Fail(t, "error should be a net.Error") + } +} + +func TestAddrConfig(t *testing.T) { + nas := &AddrConfig{ + Endpoint: "localhost:0", + Transport: "tcp", + } + ln, err := nas.Listen(context.Background()) assert.NoError(t, err) done := make(chan bool, 1) @@ -31,12 +69,12 @@ func TestNetAddr(t *testing.T) { done <- true }() - nac := &NetAddr{ + nac := &AddrConfig{ Endpoint: ln.Addr().String(), Transport: "tcp", } var conn net.Conn - conn, err = nac.Dial() + conn, err = nac.Dial(context.Background()) assert.NoError(t, err) _, err = conn.Write([]byte("test")) assert.NoError(t, err) @@ -45,11 +83,11 @@ func TestNetAddr(t *testing.T) { assert.NoError(t, ln.Close()) } -func TestTcpAddr(t *testing.T) { - nas := &TCPAddr{ +func TestTCPAddrConfig(t *testing.T) { + nas := &TCPAddrConfig{ Endpoint: "localhost:0", } - ln, err := nas.Listen() + ln, err := nas.Listen(context.Background()) assert.NoError(t, err) done := make(chan bool, 1) @@ -65,11 +103,11 @@ func TestTcpAddr(t *testing.T) { done <- true }() - nac := &TCPAddr{ + nac := &TCPAddrConfig{ Endpoint: ln.Addr().String(), } var conn net.Conn - conn, err = nac.Dial() + conn, err = nac.Dial(context.Background()) assert.NoError(t, err) _, err = conn.Write([]byte("test")) assert.NoError(t, err) diff --git a/config/confignet/go.mod b/config/confignet/go.mod index 1b4d3e231a1..cbd4d70267e 100644 --- a/config/confignet/go.mod +++ b/config/confignet/go.mod @@ -1,8 +1,11 @@ module go.opentelemetry.io/collector/config/confignet -go 1.20 +go 1.21 -require github.com/stretchr/testify v1.8.4 +require ( + github.com/stretchr/testify v1.8.4 + go.uber.org/goleak v1.3.0 +) require ( github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/config/confignet/go.sum b/config/confignet/go.sum index 3ee4af40e76..b4eccab6a53 100644 --- a/config/confignet/go.sum +++ b/config/confignet/go.sum @@ -16,6 +16,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= 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= diff --git a/config/confignet/package_test.go b/config/confignet/package_test.go new file mode 100644 index 00000000000..5107616e21c --- /dev/null +++ b/config/confignet/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package confignet + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/config/configopaque/doc.go b/config/configopaque/doc.go index 7153ca1eb79..dffb3eba84a 100644 --- a/config/configopaque/doc.go +++ b/config/configopaque/doc.go @@ -1,10 +1,21 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Package configopaque implements String type alias to mask sensitive information. +// Package configopaque implements a String type alias to mask sensitive information. // Use configopaque.String on the type of sensitive fields, to mask the // opaque string as `[REDACTED]`. // -// This ensure that no sensitive information is leaked when printing the +// This ensures that no sensitive information is leaked in logs or when printing the // full Collector configurations. +// +// The only way to view the value stored in a configopaque.String is to first convert +// it to a string by casting with the builtin `string` function. +// +// To achieve this, configopaque.String implements standard library interfaces +// like fmt.Stringer, encoding.TextMarshaler and others to ensure that the +// underlying value is masked when printed or serialized. +// +// If new interfaces that would leak opaque values are added to the standard library +// or become widely used in the Go ecosystem, these will eventually be implemented +// by configopaque.String as well. This is not considered a breaking change. package configopaque // import "go.opentelemetry.io/collector/config/configopaque" diff --git a/config/configopaque/go.mod b/config/configopaque/go.mod index c5242b315ae..c2c9a683f4f 100644 --- a/config/configopaque/go.mod +++ b/config/configopaque/go.mod @@ -1,16 +1,27 @@ module go.opentelemetry.io/collector/config/configopaque -go 1.20 +go 1.21 require ( github.com/stretchr/testify v1.8.4 + go.opentelemetry.io/collector/confmap v0.96.0 + go.uber.org/goleak v1.3.0 gopkg.in/yaml.v3 v3.0.1 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/knadh/koanf/maps v0.1.1 // indirect + github.com/knadh/koanf/providers/confmap v0.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect github.com/kr/pretty v0.3.1 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect + go.uber.org/multierr v1.11.0 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect ) + +replace go.opentelemetry.io/collector/confmap => ../../confmap diff --git a/config/configopaque/go.sum b/config/configopaque/go.sum index 3ee4af40e76..ea17c4438d6 100644 --- a/config/configopaque/go.sum +++ b/config/configopaque/go.sum @@ -1,6 +1,14 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= +github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= +github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= +github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -8,6 +16,10 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -16,6 +28,10 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= 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= diff --git a/config/configopaque/opaque.go b/config/configopaque/opaque.go index 3e4505d246f..b1712a212f7 100644 --- a/config/configopaque/opaque.go +++ b/config/configopaque/opaque.go @@ -4,17 +4,33 @@ package configopaque // import "go.opentelemetry.io/collector/config/configopaque" import ( - "encoding" + "fmt" ) -// String alias that is marshaled in an opaque way. +// String alias that is marshaled and printed in an opaque way. +// To recover the original value, cast it to a string. type String string const maskedString = "[REDACTED]" -var _ encoding.TextMarshaler = String("") - // MarshalText marshals the string as `[REDACTED]`. func (s String) MarshalText() ([]byte, error) { return []byte(maskedString), nil } + +// String formats the string as `[REDACTED]`. +// This is used for the %s and %q verbs. +func (s String) String() string { + return maskedString +} + +// GoString formats the string as `[REDACTED]`. +// This is used for the %#v verb. +func (s String) GoString() string { + return fmt.Sprintf("%#v", maskedString) +} + +// MarshalBinary marshals the string `[REDACTED]` as []byte. +func (s String) MarshalBinary() (text []byte, err error) { + return []byte(maskedString), nil +} diff --git a/config/configopaque/opaque_test.go b/config/configopaque/opaque_test.go index 50d2f3ea0f1..820ae995593 100644 --- a/config/configopaque/opaque_test.go +++ b/config/configopaque/opaque_test.go @@ -4,17 +4,99 @@ package configopaque // import "go.opentelemetry.io/collector/config/configopaque" import ( + "encoding" + "encoding/json" + "fmt" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/confmap" ) +var _ encoding.TextMarshaler = String("") + +var _ fmt.Stringer = String("") + +var _ fmt.GoStringer = String("") + +var _ encoding.BinaryMarshaler = String("") + func TestStringMarshalText(t *testing.T) { examples := []String{"opaque", "s", "veryveryveryveryveryveryveryveryveryverylong"} for _, example := range examples { opaque, err := example.MarshalText() require.NoError(t, err) - assert.Equal(t, "[REDACTED]", string(opaque)) + assert.Equal(t, maskedString, string(opaque)) + } +} + +type TestStruct struct { + Opaque String `json:"opaque" yaml:"opaque"` + Plain string `json:"plain" yaml:"plain"` +} + +var example = TestStruct{ + Opaque: "opaque", + Plain: "plain", +} + +func TestStringJSON(t *testing.T) { + bytes, err := json.Marshal(example) + require.NoError(t, err) + assert.Equal(t, `{"opaque":"[REDACTED]","plain":"plain"}`, string(bytes)) +} + +func TestConfMapMarshalConfigOpaque(t *testing.T) { + conf := confmap.New() + assert.NoError(t, conf.Marshal(example)) + assert.Equal(t, "[REDACTED]", conf.Get("opaque")) + assert.Equal(t, "plain", conf.Get("plain")) +} + +func TestStringFmt(t *testing.T) { + examples := []String{"opaque", "s", "veryveryveryveryveryveryveryveryveryverylong"} + verbs := []string{"%s", "%q", "%v", "%#v", "%+v", "%x"} + for _, example := range examples { + for _, verb := range verbs { + t.Run(fmt.Sprintf("%s/%s", string(example), verb), func(t *testing.T) { + assert.Equal(t, + fmt.Sprintf(verb, maskedString), + fmt.Sprintf(verb, example), + ) + }) + } + + for _, verb := range verbs { + t.Run(fmt.Sprintf("string(%s)/%s", string(example), verb), func(t *testing.T) { + // converting to a string allows to output as an unredacted string still: + var expected string + switch verb { + case "%s", "%v", "%+v": + expected = string(example) + case "%q", "%#v": + expected = "\"" + string(example) + "\"" + case "%x": + expected = fmt.Sprintf("%x", []byte(example)) + default: + t.Errorf("unexpected verb %q", verb) + } + + assert.Equal(t, + expected, + fmt.Sprintf(verb, string(example)), + ) + }) + } + } +} + +func TestStringMarshalBinary(t *testing.T) { + examples := []String{"opaque", "s", "veryveryveryveryveryveryveryveryveryverylong"} + for _, example := range examples { + opaque, err := example.MarshalBinary() + require.NoError(t, err) + assert.Equal(t, []byte("[REDACTED]"), opaque) } } diff --git a/config/configopaque/package_test.go b/config/configopaque/package_test.go new file mode 100644 index 00000000000..cf4a05faa12 --- /dev/null +++ b/config/configopaque/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package configopaque + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/config/configretry/Makefile b/config/configretry/Makefile new file mode 100644 index 00000000000..ded7a36092d --- /dev/null +++ b/config/configretry/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common diff --git a/config/configretry/backoff.go b/config/configretry/backoff.go new file mode 100644 index 00000000000..1fc3f8c5852 --- /dev/null +++ b/config/configretry/backoff.go @@ -0,0 +1,74 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package configretry // import "go.opentelemetry.io/collector/config/configretry" + +import ( + "errors" + "time" + + "github.com/cenkalti/backoff/v4" +) + +// NewDefaultBackOffConfig returns the default settings for RetryConfig. +func NewDefaultBackOffConfig() BackOffConfig { + return BackOffConfig{ + Enabled: true, + InitialInterval: 5 * time.Second, + RandomizationFactor: backoff.DefaultRandomizationFactor, + Multiplier: backoff.DefaultMultiplier, + MaxInterval: 30 * time.Second, + MaxElapsedTime: 5 * time.Minute, + } +} + +// BackOffConfig defines configuration for retrying batches in case of export failure. +// The current supported strategy is exponential backoff. +type BackOffConfig struct { + // Enabled indicates whether to not retry sending batches in case of export failure. + Enabled bool `mapstructure:"enabled"` + // InitialInterval the time to wait after the first failure before retrying. + InitialInterval time.Duration `mapstructure:"initial_interval"` + // RandomizationFactor is a random factor used to calculate next backoffs + // Randomized interval = RetryInterval * (1 ± RandomizationFactor) + RandomizationFactor float64 `mapstructure:"randomization_factor"` + // Multiplier is the value multiplied by the backoff interval bounds + Multiplier float64 `mapstructure:"multiplier"` + // MaxInterval is the upper bound on backoff interval. Once this value is reached the delay between + // consecutive retries will always be `MaxInterval`. + MaxInterval time.Duration `mapstructure:"max_interval"` + // MaxElapsedTime is the maximum amount of time (including retries) spent trying to send a request/batch. + // Once this value is reached, the data is discarded. If set to 0, the retries are never stopped. + MaxElapsedTime time.Duration `mapstructure:"max_elapsed_time"` +} + +func (bs *BackOffConfig) Validate() error { + if !bs.Enabled { + return nil + } + if bs.InitialInterval < 0 { + return errors.New("'initial_interval' must be non-negative") + } + if bs.RandomizationFactor < 0 || bs.RandomizationFactor > 1 { + return errors.New("'randomization_factor' must be within [0, 1]") + } + if bs.Multiplier < 0 { + return errors.New("'multiplier' must be non-negative") + } + if bs.MaxInterval < 0 { + return errors.New("'max_interval' must be non-negative") + } + if bs.MaxElapsedTime < 0 { + return errors.New("'max_elapsed_time' must be non-negative") + } + if bs.MaxElapsedTime > 0 { + if bs.MaxElapsedTime < bs.InitialInterval { + return errors.New("'max_elapsed_time' must not be less than 'initial_interval'") + } + if bs.MaxElapsedTime < bs.MaxInterval { + return errors.New("'max_elapsed_time' must not be less than 'max_interval'") + } + + } + return nil +} diff --git a/config/configretry/backoff_test.go b/config/configretry/backoff_test.go new file mode 100644 index 00000000000..a0adb3ceaf3 --- /dev/null +++ b/config/configretry/backoff_test.go @@ -0,0 +1,93 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package configretry + +import ( + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +func TestNewDefaultBackOffSettings(t *testing.T) { + cfg := NewDefaultBackOffConfig() + assert.NoError(t, cfg.Validate()) + assert.Equal(t, + BackOffConfig{ + Enabled: true, + InitialInterval: 5 * time.Second, + RandomizationFactor: 0.5, + Multiplier: 1.5, + MaxInterval: 30 * time.Second, + MaxElapsedTime: 5 * time.Minute, + }, cfg) +} + +func TestInvalidInitialInterval(t *testing.T) { + cfg := NewDefaultBackOffConfig() + assert.NoError(t, cfg.Validate()) + cfg.InitialInterval = -1 + assert.Error(t, cfg.Validate()) +} + +func TestInvalidRandomizationFactor(t *testing.T) { + cfg := NewDefaultBackOffConfig() + assert.NoError(t, cfg.Validate()) + cfg.RandomizationFactor = -1 + assert.Error(t, cfg.Validate()) + cfg.RandomizationFactor = 2 + assert.Error(t, cfg.Validate()) +} + +func TestInvalidMultiplier(t *testing.T) { + cfg := NewDefaultBackOffConfig() + assert.NoError(t, cfg.Validate()) + cfg.Multiplier = -1 + assert.Error(t, cfg.Validate()) +} + +func TestZeroMultiplierIsValid(t *testing.T) { + cfg := NewDefaultBackOffConfig() + assert.NoError(t, cfg.Validate()) + cfg.Multiplier = 0 + assert.NoError(t, cfg.Validate()) +} + +func TestInvalidMaxInterval(t *testing.T) { + cfg := NewDefaultBackOffConfig() + assert.NoError(t, cfg.Validate()) + cfg.MaxInterval = -1 + assert.Error(t, cfg.Validate()) +} + +func TestInvalidMaxElapsedTime(t *testing.T) { + cfg := NewDefaultBackOffConfig() + assert.NoError(t, cfg.Validate()) + cfg.MaxElapsedTime = -1 + assert.Error(t, cfg.Validate()) + cfg.MaxElapsedTime = 60 + // MaxElapsedTime is 60, InitialInterval is 5s, so it should be invalid + assert.Error(t, cfg.Validate()) + cfg.InitialInterval = 0 + // MaxElapsedTime is 60, MaxInterval is 30s, so it should be invalid + assert.Error(t, cfg.Validate()) + cfg.MaxInterval = 0 + assert.NoError(t, cfg.Validate()) + cfg.InitialInterval = 50 + // MaxElapsedTime is 0, so it should be valid + cfg.MaxElapsedTime = 0 + assert.NoError(t, cfg.Validate()) +} + +func TestDisabledWithInvalidValues(t *testing.T) { + cfg := BackOffConfig{ + Enabled: false, + InitialInterval: -1, + RandomizationFactor: -1, + Multiplier: 0, + MaxInterval: -1, + MaxElapsedTime: -1, + } + assert.NoError(t, cfg.Validate()) +} diff --git a/config/configretry/go.mod b/config/configretry/go.mod new file mode 100644 index 00000000000..aeeab554eb9 --- /dev/null +++ b/config/configretry/go.mod @@ -0,0 +1,18 @@ +module go.opentelemetry.io/collector/config/configretry + +go 1.21 + +require ( + github.com/cenkalti/backoff/v4 v4.2.1 + github.com/stretchr/testify v1.8.4 + go.uber.org/goleak v1.3.0 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/kr/pretty v0.3.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/rogpeppe/go-internal v1.10.0 // indirect + gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/config/configretry/go.sum b/config/configretry/go.sum new file mode 100644 index 00000000000..33516e2c95b --- /dev/null +++ b/config/configretry/go.sum @@ -0,0 +1,27 @@ +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +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/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +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.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +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/config/configretry/package_test.go b/config/configretry/package_test.go new file mode 100644 index 00000000000..56873ecaa43 --- /dev/null +++ b/config/configretry/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package configretry + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/config/configtelemetry/configtelemetry.go b/config/configtelemetry/configtelemetry.go index 0ec660bd77c..b8c0967c905 100644 --- a/config/configtelemetry/configtelemetry.go +++ b/config/configtelemetry/configtelemetry.go @@ -4,7 +4,6 @@ package configtelemetry // import "go.opentelemetry.io/collector/config/configtelemetry" import ( - "encoding" "errors" "fmt" "strings" @@ -30,9 +29,6 @@ const ( // that every component should generate. type Level int32 -var _ encoding.TextMarshaler = (*Level)(nil) -var _ encoding.TextUnmarshaler = (*Level)(nil) - func (l Level) String() string { switch l { case LevelNone: diff --git a/config/configtelemetry/configtelemetry_test.go b/config/configtelemetry/configtelemetry_test.go index 409a60cd6e1..27236bbe32b 100644 --- a/config/configtelemetry/configtelemetry_test.go +++ b/config/configtelemetry/configtelemetry_test.go @@ -4,11 +4,15 @@ package configtelemetry import ( + "encoding" "testing" "github.com/stretchr/testify/assert" ) +var _ encoding.TextMarshaler = (*Level)(nil) +var _ encoding.TextUnmarshaler = (*Level)(nil) + func TestUnmarshalText(t *testing.T) { tests := []struct { str []string diff --git a/config/configtelemetry/go.mod b/config/configtelemetry/go.mod index e1f8119ba7a..32161410cfd 100644 --- a/config/configtelemetry/go.mod +++ b/config/configtelemetry/go.mod @@ -1,8 +1,11 @@ module go.opentelemetry.io/collector/config/configtelemetry -go 1.20 +go 1.21 -require github.com/stretchr/testify v1.8.4 +require ( + github.com/stretchr/testify v1.8.4 + go.uber.org/goleak v1.3.0 +) require ( github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/config/configtelemetry/go.sum b/config/configtelemetry/go.sum index 3ee4af40e76..b4eccab6a53 100644 --- a/config/configtelemetry/go.sum +++ b/config/configtelemetry/go.sum @@ -16,6 +16,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= 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= diff --git a/config/configtelemetry/package_test.go b/config/configtelemetry/package_test.go new file mode 100644 index 00000000000..aa3d005b05c --- /dev/null +++ b/config/configtelemetry/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package configtelemetry + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/config/configtls/README.md b/config/configtls/README.md index f8901de94fa..aecfc284b41 100644 --- a/config/configtls/README.md +++ b/config/configtls/README.md @@ -31,6 +31,11 @@ A certificate authority may also need to be defined: system root CA. Should only be used if `insecure` is set to false. - `ca_pem`: Alternative to `ca_file`. Provide the CA cert contents as a string instead of a filepath. +You can also combine defining a certificate authority with the system certificate authorities. + +- `include_system_ca_certs_pool` (default = false): whether to load the system certificate authorities pool + alongside the certificate authority. + Additionally you can configure TLS to be enabled but skip verifying the server's certificate chain. This cannot be combined with `insecure` since `insecure` won't use TLS at all. @@ -48,6 +53,17 @@ __IMPORTANT__: TLS 1.0 and 1.1 are deprecated due to known vulnerabilities and s - `max_version` (default = "" handled by [crypto/tls](https://github.com/golang/go/blob/ed9db1d36ad6ef61095d5941ad9ee6da7ab6d05a/src/crypto/tls/common.go#L700) - currently TLS 1.3): Maximum acceptable TLS version. - options: ["1.0", "1.1", "1.2", "1.3"] +Explicit cipher suites can be set. If left blank, a safe default list is used. See https://go.dev/src/crypto/tls/cipher_suites.go for a list of supported cipher suites. +- `cipher_suites`: (default = []): List of cipher suites to use. + +Example: +``` + cipher_suites: + - TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 + - TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 + - TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 +``` + Additionally certificates may be reloaded by setting the below configuration. - `reload_interval` (optional) : ReloadInterval specifies the duration after which the certificate will be reloaded. diff --git a/config/configtls/configtls.go b/config/configtls/configtls.go index ca15f12d08b..bdd80cb56cb 100644 --- a/config/configtls/configtls.go +++ b/config/configtls/configtls.go @@ -6,6 +6,7 @@ package configtls // import "go.opentelemetry.io/collector/config/configtls" import ( "crypto/tls" "crypto/x509" + "errors" "fmt" "os" "path/filepath" @@ -22,10 +23,16 @@ const defaultMinTLSVersion = tls.VersionTLS12 // Uses the default MaxVersion from "crypto/tls" which is the maximum supported version const defaultMaxTLSVersion = 0 +var systemCertPool = x509.SystemCertPool + // TLSSetting exposes the common client and server TLS configurations. +// Deprecated: [v0.96.0] Use Config instead. +type TLSSetting = Config + +// Config exposes the common client and server TLS configurations. // Note: Since there isn't anything specific to a server connection. Components -// with server connections should use TLSSetting. -type TLSSetting struct { +// with server connections should use Config. +type Config struct { // Path to the CA cert. For a client this verifies the server certificate. // For a server this verifies client certificates. If empty uses system root CA. // (optional) @@ -34,6 +41,10 @@ type TLSSetting struct { // In memory PEM encoded cert. (optional) CAPem configopaque.String `mapstructure:"ca_pem"` + // If true, load system CA certificates pool in addition to the certificates + // configured in this struct. + IncludeSystemCACertsPool bool `mapstructure:"include_system_ca_certs_pool"` + // Path to the TLS cert to use for TLS required connections. (optional) CertFile string `mapstructure:"cert_file"` @@ -54,15 +65,25 @@ type TLSSetting struct { // If not set, refer to crypto/tls for defaults. (optional) MaxVersion string `mapstructure:"max_version"` + // CipherSuites is a list of TLS cipher suites that the TLS transport can use. + // If left blank, a safe default list is used. + // See https://go.dev/src/crypto/tls/cipher_suites.go for a list of supported cipher suites. + CipherSuites []string `mapstructure:"cipher_suites"` + // ReloadInterval specifies the duration after which the certificate will be reloaded // If not set, it will never be reloaded (optional) ReloadInterval time.Duration `mapstructure:"reload_interval"` } -// TLSClientSetting contains TLS configurations that are specific to client +// TSLClientSetting contains TLS configurations that are specific to client +// connections in addition to the common configurations. +// Deprecated: [v0.96.0] Use ClientConfig instead. +type TLSClientSetting = ClientConfig + +// ClientConfig contains TLS configurations that are specific to client // connections in addition to the common configurations. This should be used by // components configuring TLS client connections. -type TLSClientSetting struct { +type ClientConfig struct { // squash ensures fields are correctly decoded in embedded struct. TLSSetting `mapstructure:",squash"` @@ -84,9 +105,14 @@ type TLSClientSetting struct { } // TLSServerSetting contains TLS configurations that are specific to server +// connections in addition to the common configurations. +// Deprecated: [v0.96.0] Use ServerConfig instead. +type TLSServerSetting = ServerConfig + +// ServerConfig contains TLS configurations that are specific to server // connections in addition to the common configurations. This should be used by // components configuring TLS server connections. -type TLSServerSetting struct { +type ServerConfig struct { // squash ensures fields are correctly decoded in embedded struct. TLSSetting `mapstructure:",squash"` @@ -109,10 +135,10 @@ type certReloader struct { nextReload time.Time cert *tls.Certificate lock sync.RWMutex - tls TLSSetting + tls Config } -func (c TLSSetting) newCertReloader() (*certReloader, error) { +func (c Config) newCertReloader() (*certReloader, error) { cert, err := c.loadCertificate() if err != nil { return nil, err @@ -149,7 +175,7 @@ func (r *certReloader) GetCertificate() (*tls.Certificate, error) { // loadTLSConfig loads TLS certificates and returns a tls.Config. // This will set the RootCAs and Certificates of a tls.Config. -func (c TLSSetting) loadTLSConfig() (*tls.Config, error) { +func (c Config) loadTLSConfig() (*tls.Config, error) { certPool, err := c.loadCACertPool() if err != nil { return nil, err @@ -163,8 +189,8 @@ func (c TLSSetting) loadTLSConfig() (*tls.Config, error) { if err != nil { return nil, fmt.Errorf("failed to load TLS cert and key: %w", err) } - getCertificate = func(chi *tls.ClientHelloInfo) (*tls.Certificate, error) { return certReloader.GetCertificate() } - getClientCertificate = func(cri *tls.CertificateRequestInfo) (*tls.Certificate, error) { return certReloader.GetCertificate() } + getCertificate = func(*tls.ClientHelloInfo) (*tls.Certificate, error) { return certReloader.GetCertificate() } + getClientCertificate = func(*tls.CertificateRequestInfo) (*tls.Certificate, error) { return certReloader.GetCertificate() } } minTLS, err := convertVersion(c.MinVersion, defaultMinTLSVersion) @@ -175,6 +201,10 @@ func (c TLSSetting) loadTLSConfig() (*tls.Config, error) { if err != nil { return nil, fmt.Errorf("invalid TLS max_version: %w", err) } + cipherSuites, err := convertCipherSuites(c.CipherSuites) + if err != nil { + return nil, err + } return &tls.Config{ RootCAs: certPool, @@ -182,10 +212,30 @@ func (c TLSSetting) loadTLSConfig() (*tls.Config, error) { GetClientCertificate: getClientCertificate, MinVersion: minTLS, MaxVersion: maxTLS, + CipherSuites: cipherSuites, }, nil } -func (c TLSSetting) loadCACertPool() (*x509.CertPool, error) { +func convertCipherSuites(cipherSuites []string) ([]uint16, error) { + var result []uint16 + var errs []error + for _, suite := range cipherSuites { + found := false + for _, supported := range tls.CipherSuites() { + if suite == supported.Name { + result = append(result, supported.ID) + found = true + break + } + } + if !found { + errs = append(errs, fmt.Errorf("invalid TLS cipher suite: %q", suite)) + } + } + return result, errors.Join(errs...) +} + +func (c Config) loadCACertPool() (*x509.CertPool, error) { // There is no need to load the System Certs for RootCAs because // if the value is nil, it will default to checking against th System Certs. var err error @@ -211,7 +261,7 @@ func (c TLSSetting) loadCACertPool() (*x509.CertPool, error) { return certPool, nil } -func (c TLSSetting) loadCertFile(certPath string) (*x509.CertPool, error) { +func (c Config) loadCertFile(certPath string) (*x509.CertPool, error) { certPem, err := os.ReadFile(filepath.Clean(certPath)) if err != nil { return nil, fmt.Errorf("failed to load cert %s: %w", certPath, err) @@ -220,7 +270,7 @@ func (c TLSSetting) loadCertFile(certPath string) (*x509.CertPool, error) { return c.loadCertPem(certPem) } -func (c TLSSetting) loadCertPem(certPem []byte) (*x509.CertPool, error) { +func (c Config) loadCertPem(certPem []byte) (*x509.CertPool, error) { certPool := x509.NewCertPool() if !certPool.AppendCertsFromPEM(certPem) { return nil, fmt.Errorf("failed to parse cert") @@ -228,7 +278,7 @@ func (c TLSSetting) loadCertPem(certPem []byte) (*x509.CertPool, error) { return certPool, nil } -func (c TLSSetting) loadCertificate() (tls.Certificate, error) { +func (c Config) loadCertificate() (tls.Certificate, error) { switch { case c.hasCert() != c.hasKey(): return tls.Certificate{}, fmt.Errorf("for auth via TLS, provide both certificate and key, or neither") @@ -268,13 +318,21 @@ func (c TLSSetting) loadCertificate() (tls.Certificate, error) { return certificate, err } -func (c TLSSetting) loadCert(caPath string) (*x509.CertPool, error) { +func (c Config) loadCert(caPath string) (*x509.CertPool, error) { caPEM, err := os.ReadFile(filepath.Clean(caPath)) if err != nil { return nil, fmt.Errorf("failed to load CA %s: %w", caPath, err) } - certPool := x509.NewCertPool() + var certPool *x509.CertPool + if c.IncludeSystemCACertsPool { + if certPool, err = systemCertPool(); err != nil { + return nil, err + } + } + if certPool == nil { + certPool = x509.NewCertPool() + } if !certPool.AppendCertsFromPEM(caPEM) { return nil, fmt.Errorf("failed to parse CA %s", caPath) } @@ -282,7 +340,7 @@ func (c TLSSetting) loadCert(caPath string) (*x509.CertPool, error) { } // LoadTLSConfig loads the TLS configuration. -func (c TLSClientSetting) LoadTLSConfig() (*tls.Config, error) { +func (c ClientConfig) LoadTLSConfig() (*tls.Config, error) { if c.Insecure && !c.hasCA() { return nil, nil } @@ -297,7 +355,7 @@ func (c TLSClientSetting) LoadTLSConfig() (*tls.Config, error) { } // LoadTLSConfig loads the TLS configuration. -func (c TLSServerSetting) LoadTLSConfig() (*tls.Config, error) { +func (c ServerConfig) LoadTLSConfig() (*tls.Config, error) { tlsCfg, err := c.loadTLSConfig() if err != nil { return nil, fmt.Errorf("failed to load TLS config: %w", err) @@ -312,7 +370,7 @@ func (c TLSServerSetting) LoadTLSConfig() (*tls.Config, error) { if err != nil { return nil, err } - tlsCfg.GetConfigForClient = func(t *tls.ClientHelloInfo) (*tls.Config, error) { return reloader.getClientConfig(tlsCfg) } + tlsCfg.GetConfigForClient = func(*tls.ClientHelloInfo) (*tls.Config, error) { return reloader.getClientConfig(tlsCfg) } } tlsCfg.ClientCAs = reloader.certPool tlsCfg.ClientAuth = tls.RequireAndVerifyClientCert @@ -320,22 +378,22 @@ func (c TLSServerSetting) LoadTLSConfig() (*tls.Config, error) { return tlsCfg, nil } -func (c TLSServerSetting) loadClientCAFile() (*x509.CertPool, error) { +func (c ServerConfig) loadClientCAFile() (*x509.CertPool, error) { return c.loadCert(c.ClientCAFile) } -func (c TLSSetting) hasCA() bool { return c.hasCAFile() || c.hasCAPem() } -func (c TLSSetting) hasCert() bool { return c.hasCertFile() || c.hasCertPem() } -func (c TLSSetting) hasKey() bool { return c.hasKeyFile() || c.hasKeyPem() } +func (c Config) hasCA() bool { return c.hasCAFile() || c.hasCAPem() } +func (c Config) hasCert() bool { return c.hasCertFile() || c.hasCertPem() } +func (c Config) hasKey() bool { return c.hasKeyFile() || c.hasKeyPem() } -func (c TLSSetting) hasCAFile() bool { return c.CAFile != "" } -func (c TLSSetting) hasCAPem() bool { return len(c.CAPem) != 0 } +func (c Config) hasCAFile() bool { return c.CAFile != "" } +func (c Config) hasCAPem() bool { return len(c.CAPem) != 0 } -func (c TLSSetting) hasCertFile() bool { return c.CertFile != "" } -func (c TLSSetting) hasCertPem() bool { return len(c.CertPem) != 0 } +func (c Config) hasCertFile() bool { return c.CertFile != "" } +func (c Config) hasCertPem() bool { return len(c.CertPem) != 0 } -func (c TLSSetting) hasKeyFile() bool { return c.KeyFile != "" } -func (c TLSSetting) hasKeyPem() bool { return len(c.KeyPem) != 0 } +func (c Config) hasKeyFile() bool { return c.KeyFile != "" } +func (c Config) hasKeyPem() bool { return len(c.KeyPem) != 0 } func convertVersion(v string, defaultVersion uint16) (uint16, error) { // Use a default that is explicitly defined diff --git a/config/configtls/configtls_test.go b/config/configtls/configtls_test.go index db1658f1dbf..47a50f58a3e 100644 --- a/config/configtls/configtls_test.go +++ b/config/configtls/configtls_test.go @@ -6,6 +6,7 @@ package configtls import ( "crypto/tls" "crypto/x509" + "errors" "fmt" "io" "os" @@ -22,30 +23,34 @@ import ( func TestOptionsToConfig(t *testing.T) { tests := []struct { name string - options TLSSetting + options Config expectError string }{ { name: "should load system CA", - options: TLSSetting{CAFile: ""}, + options: Config{CAFile: ""}, }, { name: "should load custom CA", - options: TLSSetting{CAFile: filepath.Join("testdata", "ca-1.crt")}, + options: Config{CAFile: filepath.Join("testdata", "ca-1.crt")}, + }, + { + name: "should load system CA and custom CA", + options: TLSSetting{IncludeSystemCACertsPool: true, CAFile: filepath.Join("testdata", "ca-1.crt")}, }, { name: "should fail with invalid CA file path", - options: TLSSetting{CAFile: filepath.Join("testdata", "not/valid")}, + options: Config{CAFile: filepath.Join("testdata", "not/valid")}, expectError: "failed to load CA", }, { name: "should fail with invalid CA file content", - options: TLSSetting{CAFile: filepath.Join("testdata", "testCA-bad.txt")}, + options: Config{CAFile: filepath.Join("testdata", "testCA-bad.txt")}, expectError: "failed to parse cert", }, { name: "should load valid TLS settings", - options: TLSSetting{ + options: Config{ CAFile: filepath.Join("testdata", "ca-1.crt"), CertFile: filepath.Join("testdata", "server-1.crt"), KeyFile: filepath.Join("testdata", "server-1.key"), @@ -53,7 +58,7 @@ func TestOptionsToConfig(t *testing.T) { }, { name: "should fail with missing TLS KeyFile", - options: TLSSetting{ + options: Config{ CAFile: filepath.Join("testdata", "ca-1.crt"), CertFile: filepath.Join("testdata", "server-1.crt"), }, @@ -61,7 +66,7 @@ func TestOptionsToConfig(t *testing.T) { }, { name: "should fail with invalid TLS KeyFile", - options: TLSSetting{ + options: Config{ CAFile: filepath.Join("testdata", "ca-1.crt"), CertFile: filepath.Join("testdata", "server-1.crt"), KeyFile: filepath.Join("testdata", "not/valid"), @@ -70,7 +75,7 @@ func TestOptionsToConfig(t *testing.T) { }, { name: "should fail with missing TLS Cert", - options: TLSSetting{ + options: Config{ CAFile: filepath.Join("testdata", "ca-1.crt"), KeyFile: filepath.Join("testdata", "server-1.key"), }, @@ -78,7 +83,7 @@ func TestOptionsToConfig(t *testing.T) { }, { name: "should fail with invalid TLS Cert", - options: TLSSetting{ + options: Config{ CAFile: filepath.Join("testdata", "ca-1.crt"), CertFile: filepath.Join("testdata", "not/valid"), KeyFile: filepath.Join("testdata", "server-1.key"), @@ -87,52 +92,52 @@ func TestOptionsToConfig(t *testing.T) { }, { name: "should fail with invalid TLS CA", - options: TLSSetting{ + options: Config{ CAFile: filepath.Join("testdata", "not/valid"), }, expectError: "failed to load CA", }, { name: "should fail with invalid CA pool", - options: TLSSetting{ + options: Config{ CAFile: filepath.Join("testdata", "testCA-bad.txt"), }, expectError: "failed to parse cert", }, { name: "should pass with valid CA pool", - options: TLSSetting{ + options: Config{ CAFile: filepath.Join("testdata", "ca-1.crt"), }, }, { name: "should pass with valid min and max version", - options: TLSSetting{ + options: Config{ MinVersion: "1.1", MaxVersion: "1.2", }, }, { name: "should pass with invalid min", - options: TLSSetting{ + options: Config{ MinVersion: "1.7", }, expectError: "invalid TLS min_", }, { name: "should pass with invalid max", - options: TLSSetting{ + options: Config{ MaxVersion: "1.7", }, expectError: "invalid TLS max_", }, { name: "should load custom CA PEM", - options: TLSSetting{CAPem: readFilePanics("testdata/ca-1.crt")}, + options: Config{CAPem: readFilePanics("testdata/ca-1.crt")}, }, { name: "should load valid TLS settings with PEMs", - options: TLSSetting{ + options: Config{ CAPem: readFilePanics("testdata/ca-1.crt"), CertPem: readFilePanics("testdata/server-1.crt"), KeyPem: readFilePanics("testdata/server-1.key"), @@ -140,26 +145,26 @@ func TestOptionsToConfig(t *testing.T) { }, { name: "mix Cert file and Key PEM provided", - options: TLSSetting{ + options: Config{ CertFile: "testdata/server-1.crt", KeyPem: readFilePanics("testdata/server-1.key"), }, }, { name: "mix Cert PEM and Key File provided", - options: TLSSetting{ + options: Config{ CertPem: readFilePanics("testdata/server-1.crt"), KeyFile: "testdata/server-1.key", }, }, { name: "should fail with invalid CA PEM", - options: TLSSetting{CAPem: readFilePanics("testdata/testCA-bad.txt")}, + options: Config{CAPem: readFilePanics("testdata/testCA-bad.txt")}, expectError: "failed to parse cert", }, { name: "should fail CA file and PEM both provided", - options: TLSSetting{ + options: Config{ CAFile: "testdata/ca-1.crt", CAPem: readFilePanics("testdata/ca-1.crt"), }, @@ -167,7 +172,7 @@ func TestOptionsToConfig(t *testing.T) { }, { name: "should fail Cert file and PEM both provided", - options: TLSSetting{ + options: Config{ CertFile: "testdata/server-1.crt", CertPem: readFilePanics("testdata/server-1.crt"), KeyFile: "testdata/server-1.key", @@ -176,7 +181,7 @@ func TestOptionsToConfig(t *testing.T) { }, { name: "should fail Key file and PEM both provided", - options: TLSSetting{ + options: Config{ CertFile: "testdata/server-1.crt", KeyFile: "testdata/ca-1.crt", KeyPem: readFilePanics("testdata/server-1.key"), @@ -185,7 +190,7 @@ func TestOptionsToConfig(t *testing.T) { }, { name: "should fail to load valid TLS settings with bad Cert PEM", - options: TLSSetting{ + options: Config{ CAPem: readFilePanics("testdata/ca-1.crt"), CertPem: readFilePanics("testdata/testCA-bad.txt"), KeyPem: readFilePanics("testdata/server-1.key"), @@ -194,7 +199,7 @@ func TestOptionsToConfig(t *testing.T) { }, { name: "should fail to load valid TLS settings with bad Key PEM", - options: TLSSetting{ + options: Config{ CAPem: readFilePanics("testdata/ca-1.crt"), CertPem: readFilePanics("testdata/server-1.crt"), KeyPem: readFilePanics("testdata/testCA-bad.txt"), @@ -203,7 +208,7 @@ func TestOptionsToConfig(t *testing.T) { }, { name: "should fail with missing TLS KeyPem", - options: TLSSetting{ + options: Config{ CAPem: readFilePanics("testdata/ca-1.crt"), CertPem: readFilePanics("testdata/server-1.crt"), }, @@ -211,7 +216,7 @@ func TestOptionsToConfig(t *testing.T) { }, { name: "should fail with missing TLS Cert PEM", - options: TLSSetting{ + options: Config{ CAPem: readFilePanics("testdata/ca-1.crt"), KeyPem: readFilePanics("testdata/server-1.key"), }, @@ -243,8 +248,8 @@ func readFilePanics(filePath string) configopaque.String { } func TestLoadTLSClientConfigError(t *testing.T) { - tlsSetting := TLSClientSetting{ - TLSSetting: TLSSetting{ + tlsSetting := ClientConfig{ + TLSSetting: Config{ CertFile: "doesnt/exist", KeyFile: "doesnt/exist", }, @@ -254,19 +259,19 @@ func TestLoadTLSClientConfigError(t *testing.T) { } func TestLoadTLSClientConfig(t *testing.T) { - tlsSetting := TLSClientSetting{ + tlsSetting := ClientConfig{ Insecure: true, } tlsCfg, err := tlsSetting.LoadTLSConfig() assert.NoError(t, err) assert.Nil(t, tlsCfg) - tlsSetting = TLSClientSetting{} + tlsSetting = ClientConfig{} tlsCfg, err = tlsSetting.LoadTLSConfig() assert.NoError(t, err) assert.NotNil(t, tlsCfg) - tlsSetting = TLSClientSetting{ + tlsSetting = ClientConfig{ InsecureSkipVerify: true, } tlsCfg, err = tlsSetting.LoadTLSConfig() @@ -276,8 +281,8 @@ func TestLoadTLSClientConfig(t *testing.T) { } func TestLoadTLSServerConfigError(t *testing.T) { - tlsSetting := TLSServerSetting{ - TLSSetting: TLSSetting{ + tlsSetting := ServerConfig{ + TLSSetting: Config{ CertFile: "doesnt/exist", KeyFile: "doesnt/exist", }, @@ -285,7 +290,7 @@ func TestLoadTLSServerConfigError(t *testing.T) { _, err := tlsSetting.LoadTLSConfig() assert.Error(t, err) - tlsSetting = TLSServerSetting{ + tlsSetting = ServerConfig{ ClientCAFile: "doesnt/exist", } _, err = tlsSetting.LoadTLSConfig() @@ -293,7 +298,7 @@ func TestLoadTLSServerConfigError(t *testing.T) { } func TestLoadTLSServerConfig(t *testing.T) { - tlsSetting := TLSServerSetting{} + tlsSetting := ServerConfig{} tlsCfg, err := tlsSetting.LoadTLSConfig() assert.NoError(t, err) assert.NotNil(t, tlsCfg) @@ -305,7 +310,7 @@ func TestLoadTLSServerConfigReload(t *testing.T) { overwriteClientCA(t, tmpCaPath, "ca-1.crt") - tlsSetting := TLSServerSetting{ + tlsSetting := ServerConfig{ ClientCAFile: tmpCaPath, ReloadClientCAFile: true, } @@ -336,7 +341,7 @@ func TestLoadTLSServerConfigFailingReload(t *testing.T) { overwriteClientCA(t, tmpCaPath, "ca-1.crt") - tlsSetting := TLSServerSetting{ + tlsSetting := ServerConfig{ ClientCAFile: tmpCaPath, ReloadClientCAFile: true, } @@ -367,7 +372,7 @@ func TestLoadTLSServerConfigFailingInitialLoad(t *testing.T) { overwriteClientCA(t, tmpCaPath, "testCA-bad.txt") - tlsSetting := TLSServerSetting{ + tlsSetting := ServerConfig{ ClientCAFile: tmpCaPath, ReloadClientCAFile: true, } @@ -381,7 +386,7 @@ func TestLoadTLSServerConfigWrongPath(t *testing.T) { tmpCaPath := createTempClientCaFile(t) - tlsSetting := TLSServerSetting{ + tlsSetting := ServerConfig{ ClientCAFile: tmpCaPath + "wrong-path", ReloadClientCAFile: true, } @@ -397,7 +402,7 @@ func TestLoadTLSServerConfigFailing(t *testing.T) { overwriteClientCA(t, tmpCaPath, "ca-1.crt") - tlsSetting := TLSServerSetting{ + tlsSetting := ServerConfig{ ClientCAFile: tmpCaPath, ReloadClientCAFile: true, } @@ -443,7 +448,7 @@ func createTempClientCaFile(t *testing.T) string { } func TestEagerlyLoadCertificate(t *testing.T) { - options := TLSSetting{ + options := Config{ CertFile: filepath.Join("testdata", "client-1.crt"), KeyFile: filepath.Join("testdata", "client-1.key"), } @@ -530,7 +535,7 @@ func TestCertificateReload(t *testing.T) { assert.NoError(t, err) assert.NoError(t, fdk.Close()) - options := TLSSetting{ + options := Config{ CertFile: certFile.Name(), KeyFile: keyFile.Name(), ReloadInterval: test.reloadInterval, @@ -611,7 +616,7 @@ func TestMinMaxTLSVersions(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - setting := TLSSetting{ + setting := Config{ MinVersion: test.minVersion, MaxVersion: test.maxVersion, } @@ -627,3 +632,114 @@ func TestMinMaxTLSVersions(t *testing.T) { }) } } + +func TestCipherSuites(t *testing.T) { + tests := []struct { + name string + tlsSetting Config + wantErr string + result []uint16 + }{ + { + name: "no suites set", + tlsSetting: Config{}, + result: nil, + }, + { + name: "one cipher suite set", + tlsSetting: Config{ + CipherSuites: []string{"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA"}, + }, + result: []uint16{tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA}, + }, + { + name: "invalid cipher suite set", + tlsSetting: Config{ + CipherSuites: []string{"FOO"}, + }, + wantErr: `invalid TLS cipher suite: "FOO"`, + }, + { + name: "multiple invalid cipher suites set", + tlsSetting: Config{ + CipherSuites: []string{"FOO", "BAR"}, + }, + wantErr: `invalid TLS cipher suite: "FOO" +invalid TLS cipher suite: "BAR"`, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + config, err := test.tlsSetting.loadTLSConfig() + if test.wantErr != "" { + assert.EqualError(t, err, test.wantErr) + } else { + assert.NoError(t, err) + assert.Equal(t, test.result, config.CipherSuites) + } + }) + } +} + +func TestSystemCertPool(t *testing.T) { + anError := errors.New("my error") + tests := []struct { + name string + tlsSetting TLSSetting + wantErr error + systemCertFn func() (*x509.CertPool, error) + }{ + { + name: "not using system cert pool", + tlsSetting: TLSSetting{ + IncludeSystemCACertsPool: false, + }, + wantErr: nil, + systemCertFn: x509.SystemCertPool, + }, + { + name: "using system cert pool", + tlsSetting: TLSSetting{ + IncludeSystemCACertsPool: true, + }, + wantErr: nil, + systemCertFn: x509.SystemCertPool, + }, + { + name: "error loading system cert pool", + tlsSetting: TLSSetting{ + IncludeSystemCACertsPool: true, + }, + wantErr: anError, + systemCertFn: func() (*x509.CertPool, error) { + return nil, anError + }, + }, + { + name: "nil system cert pool", + tlsSetting: TLSSetting{ + IncludeSystemCACertsPool: true, + }, + wantErr: nil, + systemCertFn: func() (*x509.CertPool, error) { + return nil, nil + }, + }, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + oldSystemCertPool := systemCertPool + systemCertPool = test.systemCertFn + defer func() { + systemCertPool = oldSystemCertPool + }() + certPool, err := test.tlsSetting.loadCert(filepath.Join("testdata", "ca-1.crt")) + if test.wantErr != nil { + assert.Equal(t, test.wantErr, err) + } else { + assert.NotNil(t, certPool) + } + }) + } +} diff --git a/config/configtls/go.mod b/config/configtls/go.mod index e5878446df0..865c82a969e 100644 --- a/config/configtls/go.mod +++ b/config/configtls/go.mod @@ -1,19 +1,21 @@ module go.opentelemetry.io/collector/config/configtls -go 1.20 +go 1.21 require ( - github.com/fsnotify/fsnotify v1.6.0 + github.com/fsnotify/fsnotify v1.7.0 github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/config/configopaque v0.85.0 + go.opentelemetry.io/collector/config/configopaque v1.3.0 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/sys v0.12.0 // indirect + golang.org/x/sys v0.14.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) replace go.opentelemetry.io/collector/config/configopaque => ../configopaque + +replace go.opentelemetry.io/collector/confmap => ../../confmap diff --git a/config/configtls/go.sum b/config/configtls/go.sum index 45e413628af..352be822f6e 100644 --- a/config/configtls/go.sum +++ b/config/configtls/go.sum @@ -1,20 +1,38 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 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/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= +github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= +github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= +github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= 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.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 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/config/internal/go.mod b/config/internal/go.mod index 647749fb92f..7d5daac8dab 100644 --- a/config/internal/go.mod +++ b/config/internal/go.mod @@ -1,18 +1,33 @@ module go.opentelemetry.io/collector/config/internal -go 1.20 +go 1.21 require ( github.com/stretchr/testify v1.8.4 - go.uber.org/zap v1.26.0 + go.opentelemetry.io/collector v0.96.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/kr/pretty v0.3.1 // indirect + github.com/hashicorp/go-version v1.6.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect + go.opentelemetry.io/collector/featuregate v1.3.0 // indirect go.uber.org/multierr v1.11.0 // indirect - gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) + +replace go.opentelemetry.io/collector => ../../ + +replace go.opentelemetry.io/collector/featuregate => ../../featuregate + +replace go.opentelemetry.io/collector/confmap => ../../confmap + +replace go.opentelemetry.io/collector/config/configtelemetry => ../configtelemetry + +replace go.opentelemetry.io/collector/pdata => ../../pdata + +replace go.opentelemetry.io/collector/consumer => ../../consumer + +replace go.opentelemetry.io/collector/component => ../../component diff --git a/config/internal/go.sum b/config/internal/go.sum index 4c930736df1..d7bcd0e2f73 100644 --- a/config/internal/go.sum +++ b/config/internal/go.sum @@ -1,26 +1,23 @@ -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 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/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= 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.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= diff --git a/config/internal/package_test.go b/config/internal/package_test.go new file mode 100644 index 00000000000..4486cdb28aa --- /dev/null +++ b/config/internal/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package internal + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/config/internal/warning.go b/config/internal/warning.go index f403967da2f..28d55bfd4dc 100644 --- a/config/internal/warning.go +++ b/config/internal/warning.go @@ -9,6 +9,8 @@ import ( "strings" "go.uber.org/zap" + + "go.opentelemetry.io/collector/internal/localhostgate" ) func shouldWarn(endpoint string) bool { @@ -38,11 +40,12 @@ func shouldWarn(endpoint string) bool { func WarnOnUnspecifiedHost(logger *zap.Logger, endpoint string) { if shouldWarn(endpoint) { logger.Warn( - "Using the 0.0.0.0 address exposes this server to every network interface, which may facilitate Denial of Service attacks", + "Using the 0.0.0.0 address exposes this server to every network interface, which may facilitate Denial of Service attacks. Enable the feature gate to change the default and remove this warning.", zap.String( "documentation", "https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks", ), + zap.String("feature gate ID", localhostgate.UseLocalHostAsDefaultHostID), ) } } diff --git a/confmap/confmap.go b/confmap/confmap.go index 254f0813433..213e4a332d9 100644 --- a/confmap/confmap.go +++ b/confmap/confmap.go @@ -8,10 +8,10 @@ import ( "fmt" "reflect" + "github.com/go-viper/mapstructure/v2" "github.com/knadh/koanf/maps" "github.com/knadh/koanf/providers/confmap" "github.com/knadh/koanf/v2" - "github.com/mitchellh/mapstructure" encoder "go.opentelemetry.io/collector/confmap/internal/mapstructure" ) @@ -51,15 +51,15 @@ type UnmarshalOption interface { } type unmarshalOption struct { - errorUnused bool + ignoreUnused bool } -// WithErrorUnused sets an option to error when there are existing -// keys in the original Conf that were unused in the decoding process +// WithIgnoreUnused sets an option to ignore errors if existing +// keys in the original Conf were unused in the decoding process // (extra keys). -func WithErrorUnused() UnmarshalOption { +func WithIgnoreUnused() UnmarshalOption { return unmarshalOptionFunc(func(uo *unmarshalOption) { - uo.errorUnused = true + uo.ignoreUnused = true }) } @@ -76,7 +76,7 @@ func (l *Conf) Unmarshal(result any, opts ...UnmarshalOption) error { for _, opt := range opts { opt.apply(&set) } - return decodeConfig(l, result, set.errorUnused) + return decodeConfig(l, result, !set.ignoreUnused) } type marshalOption struct{} diff --git a/confmap/confmap_test.go b/confmap/confmap_test.go index 211eca429aa..6680a1bc517 100644 --- a/confmap/confmap_test.go +++ b/confmap/confmap_test.go @@ -143,13 +143,14 @@ func TestExpandNilStructPointersHookFuncDefaultNotNilConfigNil(t *testing.T) { assert.Equal(t, &Struct{}, cfg.MapStruct["struct"]) } -func TestUnmarshalWithErrorUnused(t *testing.T) { +func TestUnmarshalWithIgnoreUnused(t *testing.T) { stringMap := map[string]any{ "boolean": true, "string": "this is a string", } conf := NewFromStringMap(stringMap) - assert.Error(t, conf.Unmarshal(&TestIDConfig{}, WithErrorUnused())) + assert.Error(t, conf.Unmarshal(&TestIDConfig{})) + assert.NoError(t, conf.Unmarshal(&TestIDConfig{}, WithIgnoreUnused())) } type TestConfig struct { @@ -393,7 +394,7 @@ type errConfig struct { Foo string `mapstructure:"foo"` } -func (tc *errConfig) Unmarshal(_ *Conf) error { +func (tc *errConfig) Unmarshal(*Conf) error { return errors.New("never works") } diff --git a/confmap/confmaptest/configtest_test.go b/confmap/confmaptest/configtest_test.go index 4a885d9655f..151a1c9275a 100644 --- a/confmap/confmaptest/configtest_test.go +++ b/confmap/confmaptest/configtest_test.go @@ -54,6 +54,6 @@ func (s schemeProvider) Scheme() string { return s.scheme } -func (s schemeProvider) Shutdown(_ context.Context) error { +func (s schemeProvider) Shutdown(context.Context) error { return nil } diff --git a/confmap/confmaptest/package_test.go b/confmap/confmaptest/package_test.go new file mode 100644 index 00000000000..77bb79e7696 --- /dev/null +++ b/confmap/confmaptest/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package confmaptest + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/confmap/converter.go b/confmap/converter.go index 233d86f5d79..17316d10304 100644 --- a/confmap/converter.go +++ b/confmap/converter.go @@ -7,6 +7,10 @@ import ( "context" ) +// ConverterSettings are the settings to initialize a Converter. +// Any Converter should take this as a parameter in its constructor. +type ConverterSettings struct{} + // Converter is a converter interface for the confmap.Conf that allows distributions // (in the future components as well) to build backwards compatible config converters. type Converter interface { diff --git a/confmap/converter/expandconverter/Makefile b/confmap/converter/expandconverter/Makefile new file mode 100644 index 00000000000..bdd863a203b --- /dev/null +++ b/confmap/converter/expandconverter/Makefile @@ -0,0 +1 @@ +include ../../../Makefile.Common diff --git a/confmap/converter/expandconverter/expand.go b/confmap/converter/expandconverter/expand.go index d2cd5e963e8..dc3a89812c4 100644 --- a/confmap/converter/expandconverter/expand.go +++ b/confmap/converter/expandconverter/expand.go @@ -15,7 +15,7 @@ type converter struct{} // New returns a confmap.Converter, that expands all environment variables for a given confmap.Conf. // // Notice: This API is experimental. -func New() confmap.Converter { +func New(confmap.ConverterSettings) confmap.Converter { return converter{} } diff --git a/confmap/converter/expandconverter/expand_test.go b/confmap/converter/expandconverter/expand_test.go index 7b4a9553a3d..731dd52e9b6 100644 --- a/confmap/converter/expandconverter/expand_test.go +++ b/confmap/converter/expandconverter/expand_test.go @@ -45,7 +45,7 @@ func TestNewExpandConverter(t *testing.T) { require.NoError(t, err, "Unable to get config") // Test that expanded configs are the same with the simple config with no env vars. - require.NoError(t, New().Convert(context.Background(), conf)) + require.NoError(t, New(confmap.ConverterSettings{}).Convert(context.Background(), conf)) assert.Equal(t, expectedCfgMap.ToStringMap(), conf.ToStringMap()) }) } @@ -64,7 +64,7 @@ func TestNewExpandConverter_EscapedMaps(t *testing.T) { "recv": "$MAP_VALUE", }}, ) - require.NoError(t, New().Convert(context.Background(), conf)) + require.NoError(t, New(confmap.ConverterSettings{}).Convert(context.Background(), conf)) expectedMap := map[string]any{ "test_string_map": map[string]any{ @@ -101,7 +101,7 @@ func TestNewExpandConverter_EscapedEnvVars(t *testing.T) { // escaped $ alone "recv.7": "$", }} - require.NoError(t, New().Convert(context.Background(), conf)) + require.NoError(t, New(confmap.ConverterSettings{}).Convert(context.Background(), conf)) assert.Equal(t, expectedMap, conf.ToStringMap()) } @@ -154,7 +154,7 @@ func TestNewExpandConverterHostPort(t *testing.T) { for _, tt := range testCases { t.Run(tt.name, func(t *testing.T) { conf := confmap.NewFromStringMap(tt.input) - require.NoError(t, New().Convert(context.Background(), conf)) + require.NoError(t, New(confmap.ConverterSettings{}).Convert(context.Background(), conf)) assert.Equal(t, tt.expected, conf.ToStringMap()) }) } diff --git a/confmap/converter/expandconverter/go.mod b/confmap/converter/expandconverter/go.mod new file mode 100644 index 00000000000..81efa808243 --- /dev/null +++ b/confmap/converter/expandconverter/go.mod @@ -0,0 +1,24 @@ +module go.opentelemetry.io/collector/confmap/converter/expandconverter + +go 1.21 + +require ( + github.com/stretchr/testify v1.8.4 + go.opentelemetry.io/collector/confmap v0.96.0 + go.uber.org/goleak v1.3.0 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/knadh/koanf/maps v0.1.1 // indirect + github.com/knadh/koanf/providers/confmap v0.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + +replace go.opentelemetry.io/collector/confmap => ../../ diff --git a/confmap/converter/expandconverter/go.sum b/confmap/converter/expandconverter/go.sum new file mode 100644 index 00000000000..69f4a4f6724 --- /dev/null +++ b/confmap/converter/expandconverter/go.sum @@ -0,0 +1,31 @@ +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= +github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= +github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= +github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +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.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/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= diff --git a/confmap/converter/expandconverter/package_test.go b/confmap/converter/expandconverter/package_test.go new file mode 100644 index 00000000000..39c682a02e2 --- /dev/null +++ b/confmap/converter/expandconverter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package expandconverter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/confmap/go.mod b/confmap/go.mod index 9d93476f6bf..869cdedbe72 100644 --- a/confmap/go.mod +++ b/confmap/go.mod @@ -1,14 +1,14 @@ module go.opentelemetry.io/collector/confmap -go 1.20 +go 1.21 require ( + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 github.com/knadh/koanf/maps v0.1.1 github.com/knadh/koanf/providers/confmap v0.1.0 - github.com/knadh/koanf/v2 v2.0.1 - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 + github.com/knadh/koanf/v2 v2.1.0 github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0014 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 gopkg.in/yaml.v3 v3.0.1 ) @@ -21,8 +21,6 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect ) -replace go.opentelemetry.io/collector/featuregate => ../featuregate - retract ( v0.76.0 // Depends on retracted pdata v1.0.0-rc10 module, use v0.76.1 v0.69.0 // Release failed, use v0.69.1 diff --git a/confmap/go.sum b/confmap/go.sum index 02cbe57eb22..386dd5d4525 100644 --- a/confmap/go.sum +++ b/confmap/go.sum @@ -1,29 +1,32 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= -github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= 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.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= 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-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/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= diff --git a/confmap/internal/mapstructure/encoder.go b/confmap/internal/mapstructure/encoder.go index feb5eefa76b..408560e2262 100644 --- a/confmap/internal/mapstructure/encoder.go +++ b/confmap/internal/mapstructure/encoder.go @@ -10,7 +10,7 @@ import ( "reflect" "strings" - "github.com/mitchellh/mapstructure" + "github.com/go-viper/mapstructure/v2" ) const ( diff --git a/confmap/internal/mapstructure/encoder_test.go b/confmap/internal/mapstructure/encoder_test.go index b557c91735a..fac12e8a6df 100644 --- a/confmap/internal/mapstructure/encoder_test.go +++ b/confmap/internal/mapstructure/encoder_test.go @@ -10,7 +10,7 @@ import ( "strings" "testing" - "github.com/mitchellh/mapstructure" + "github.com/go-viper/mapstructure/v2" "github.com/stretchr/testify/require" ) diff --git a/confmap/internal/mapstructure/package_test.go b/confmap/internal/mapstructure/package_test.go new file mode 100644 index 00000000000..626ac10579c --- /dev/null +++ b/confmap/internal/mapstructure/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package mapstructure + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/confmap/package_test.go b/confmap/package_test.go new file mode 100644 index 00000000000..ad90b748909 --- /dev/null +++ b/confmap/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package confmap + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/confmap/provider.go b/confmap/provider.go index 93735b83f4d..91c2a60065a 100644 --- a/confmap/provider.go +++ b/confmap/provider.go @@ -8,6 +8,10 @@ import ( "fmt" ) +// ProviderSettings are the settings to initialize a Provider. +// Any Provider should take this as a parameter in its constructor. +type ProviderSettings struct{} + // Provider is an interface that helps to retrieve a config map and watch for any // changes to the config map. Implementations may load the config from a file, // a database or any other source. diff --git a/confmap/provider/envprovider/Makefile b/confmap/provider/envprovider/Makefile new file mode 100644 index 00000000000..bdd863a203b --- /dev/null +++ b/confmap/provider/envprovider/Makefile @@ -0,0 +1 @@ +include ../../../Makefile.Common diff --git a/confmap/provider/envprovider/go.mod b/confmap/provider/envprovider/go.mod new file mode 100644 index 00000000000..86036ea552f --- /dev/null +++ b/confmap/provider/envprovider/go.mod @@ -0,0 +1,24 @@ +module go.opentelemetry.io/collector/confmap/provider/envprovider + +go 1.21 + +require ( + github.com/stretchr/testify v1.8.4 + go.opentelemetry.io/collector/confmap v0.96.0 + go.uber.org/goleak v1.3.0 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/knadh/koanf/maps v0.1.1 // indirect + github.com/knadh/koanf/providers/confmap v0.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + +replace go.opentelemetry.io/collector/confmap => ../../ diff --git a/confmap/provider/envprovider/go.sum b/confmap/provider/envprovider/go.sum new file mode 100644 index 00000000000..69f4a4f6724 --- /dev/null +++ b/confmap/provider/envprovider/go.sum @@ -0,0 +1,31 @@ +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= +github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= +github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= +github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +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.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/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= diff --git a/confmap/provider/envprovider/package_test.go b/confmap/provider/envprovider/package_test.go new file mode 100644 index 00000000000..1465f46f8af --- /dev/null +++ b/confmap/provider/envprovider/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package envprovider + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/confmap/provider/envprovider/provider.go b/confmap/provider/envprovider/provider.go index d548a4594aa..61e8df8fbbf 100644 --- a/confmap/provider/envprovider/provider.go +++ b/confmap/provider/envprovider/provider.go @@ -17,12 +17,21 @@ const schemeName = "env" type provider struct{} +// NewWithSettings returns a new confmap.Provider that reads the configuration from the given environment variable. +// +// This Provider supports "env" scheme, and can be called with a selector: +// `env:NAME_OF_ENVIRONMENT_VARIABLE` +func NewWithSettings(confmap.ProviderSettings) confmap.Provider { + return &provider{} +} + // New returns a new confmap.Provider that reads the configuration from the given environment variable. // // This Provider supports "env" scheme, and can be called with a selector: // `env:NAME_OF_ENVIRONMENT_VARIABLE` +// Deprecated: [v0.94.0] Use NewWithSettings instead. func New() confmap.Provider { - return &provider{} + return NewWithSettings(confmap.ProviderSettings{}) } func (emp *provider) Retrieve(_ context.Context, uri string, _ confmap.WatcherFunc) (*confmap.Retrieved, error) { diff --git a/confmap/provider/fileprovider/Makefile b/confmap/provider/fileprovider/Makefile new file mode 100644 index 00000000000..bdd863a203b --- /dev/null +++ b/confmap/provider/fileprovider/Makefile @@ -0,0 +1 @@ +include ../../../Makefile.Common diff --git a/confmap/provider/fileprovider/go.mod b/confmap/provider/fileprovider/go.mod new file mode 100644 index 00000000000..bc546c4634b --- /dev/null +++ b/confmap/provider/fileprovider/go.mod @@ -0,0 +1,24 @@ +module go.opentelemetry.io/collector/confmap/provider/fileprovider + +go 1.21 + +require ( + github.com/stretchr/testify v1.8.4 + go.opentelemetry.io/collector/confmap v0.96.0 + go.uber.org/goleak v1.3.0 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/knadh/koanf/maps v0.1.1 // indirect + github.com/knadh/koanf/providers/confmap v0.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + +replace go.opentelemetry.io/collector/confmap => ../../ diff --git a/confmap/provider/fileprovider/go.sum b/confmap/provider/fileprovider/go.sum new file mode 100644 index 00000000000..69f4a4f6724 --- /dev/null +++ b/confmap/provider/fileprovider/go.sum @@ -0,0 +1,31 @@ +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= +github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= +github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= +github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +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.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/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= diff --git a/confmap/provider/fileprovider/package_test.go b/confmap/provider/fileprovider/package_test.go new file mode 100644 index 00000000000..e94f125d2e3 --- /dev/null +++ b/confmap/provider/fileprovider/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package fileprovider + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/confmap/provider/fileprovider/provider.go b/confmap/provider/fileprovider/provider.go index 4d5377e6603..a4da3af387f 100644 --- a/confmap/provider/fileprovider/provider.go +++ b/confmap/provider/fileprovider/provider.go @@ -33,10 +33,30 @@ type provider struct{} // `file:/path/to/file` - absolute path (unix, windows) // `file:c:/path/to/file` - absolute path including drive-letter (windows) // `file:c:\path\to\file` - absolute path including drive-letter (windows) -func New() confmap.Provider { +func NewWithSettings(confmap.ProviderSettings) confmap.Provider { return &provider{} } +// New returns a new confmap.Provider that reads the configuration from a file. +// +// This Provider supports "file" scheme, and can be called with a "uri" that follows: +// +// file-uri = "file:" local-path +// local-path = [ drive-letter ] file-path +// drive-letter = ALPHA ":" +// +// The "file-path" can be relative or absolute, and it can be any OS supported format. +// +// Examples: +// `file:path/to/file` - relative path (unix, windows) +// `file:/path/to/file` - absolute path (unix, windows) +// `file:c:/path/to/file` - absolute path including drive-letter (windows) +// `file:c:\path\to\file` - absolute path including drive-letter (windows) +// Deprecated: [v0.94.0] Use NewWithSettings instead. +func New() confmap.Provider { + return NewWithSettings(confmap.ProviderSettings{}) +} + func (fmp *provider) Retrieve(_ context.Context, uri string, _ confmap.WatcherFunc) (*confmap.Retrieved, error) { if !strings.HasPrefix(uri, schemeName+":") { return nil, fmt.Errorf("%q uri is not supported by %q provider", uri, schemeName) diff --git a/confmap/provider/httpprovider/Makefile b/confmap/provider/httpprovider/Makefile new file mode 100644 index 00000000000..bdd863a203b --- /dev/null +++ b/confmap/provider/httpprovider/Makefile @@ -0,0 +1 @@ +include ../../../Makefile.Common diff --git a/confmap/provider/httpprovider/go.mod b/confmap/provider/httpprovider/go.mod new file mode 100644 index 00000000000..130befa5dea --- /dev/null +++ b/confmap/provider/httpprovider/go.mod @@ -0,0 +1,24 @@ +module go.opentelemetry.io/collector/confmap/provider/httpprovider + +go 1.21 + +require ( + github.com/stretchr/testify v1.8.4 + go.opentelemetry.io/collector/confmap v0.96.0 + go.uber.org/goleak v1.3.0 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/knadh/koanf/maps v0.1.1 // indirect + github.com/knadh/koanf/providers/confmap v0.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + +replace go.opentelemetry.io/collector/confmap => ../../ diff --git a/confmap/provider/httpprovider/go.sum b/confmap/provider/httpprovider/go.sum new file mode 100644 index 00000000000..69f4a4f6724 --- /dev/null +++ b/confmap/provider/httpprovider/go.sum @@ -0,0 +1,31 @@ +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= +github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= +github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= +github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +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.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/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= diff --git a/confmap/provider/httpprovider/package_test.go b/confmap/provider/httpprovider/package_test.go new file mode 100644 index 00000000000..0faa72a1207 --- /dev/null +++ b/confmap/provider/httpprovider/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package httpprovider + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/confmap/provider/httpprovider/provider.go b/confmap/provider/httpprovider/provider.go index 458f7d5edbe..966faa510fb 100644 --- a/confmap/provider/httpprovider/provider.go +++ b/confmap/provider/httpprovider/provider.go @@ -8,11 +8,21 @@ import ( "go.opentelemetry.io/collector/confmap/provider/internal/configurablehttpprovider" ) +// NewWithSettings returns a new confmap.Provider that reads the configuration from a http server. +// +// This Provider supports "http" scheme. +// +// One example for HTTP URI is: http://localhost:3333/getConfig +func NewWithSettings(set confmap.ProviderSettings) confmap.Provider { + return configurablehttpprovider.New(configurablehttpprovider.HTTPScheme, set) +} + // New returns a new confmap.Provider that reads the configuration from a http server. // // This Provider supports "http" scheme. // // One example for HTTP URI is: http://localhost:3333/getConfig +// Deprecated: [v0.94.0] Use NewWithSettings instead. func New() confmap.Provider { - return configurablehttpprovider.New(configurablehttpprovider.HTTPScheme) + return NewWithSettings(confmap.ProviderSettings{}) } diff --git a/confmap/provider/httpsprovider/Makefile b/confmap/provider/httpsprovider/Makefile new file mode 100644 index 00000000000..bdd863a203b --- /dev/null +++ b/confmap/provider/httpsprovider/Makefile @@ -0,0 +1 @@ +include ../../../Makefile.Common diff --git a/confmap/provider/httpsprovider/go.mod b/confmap/provider/httpsprovider/go.mod new file mode 100644 index 00000000000..5bb4b5ae1d4 --- /dev/null +++ b/confmap/provider/httpsprovider/go.mod @@ -0,0 +1,24 @@ +module go.opentelemetry.io/collector/confmap/provider/httpsprovider + +go 1.21 + +require ( + github.com/stretchr/testify v1.8.4 + go.opentelemetry.io/collector/confmap v0.96.0 + go.uber.org/goleak v1.3.0 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/knadh/koanf/maps v0.1.1 // indirect + github.com/knadh/koanf/providers/confmap v0.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + +replace go.opentelemetry.io/collector/confmap => ../../ diff --git a/confmap/provider/httpsprovider/go.sum b/confmap/provider/httpsprovider/go.sum new file mode 100644 index 00000000000..69f4a4f6724 --- /dev/null +++ b/confmap/provider/httpsprovider/go.sum @@ -0,0 +1,31 @@ +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= +github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= +github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= +github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +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.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/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= diff --git a/confmap/provider/httpsprovider/package_test.go b/confmap/provider/httpsprovider/package_test.go new file mode 100644 index 00000000000..7ed3dc83e10 --- /dev/null +++ b/confmap/provider/httpsprovider/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package httpsprovider + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/confmap/provider/httpsprovider/provider.go b/confmap/provider/httpsprovider/provider.go index 1afe0b54e35..6db2cc9b151 100644 --- a/confmap/provider/httpsprovider/provider.go +++ b/confmap/provider/httpsprovider/provider.go @@ -14,6 +14,17 @@ import ( // // To add extra CA certificates you need to install certificates in the system pool. This procedure is operating system // dependent. E.g.: on Linux please refer to the `update-ca-trust` command. +func NewWithSettings(set confmap.ProviderSettings) confmap.Provider { + return configurablehttpprovider.New(configurablehttpprovider.HTTPSScheme, set) +} + +// New returns a new confmap.Provider that reads the configuration from a https server. +// +// This Provider supports "https" scheme. One example of an HTTPS URI is: https://localhost:3333/getConfig +// +// To add extra CA certificates you need to install certificates in the system pool. This procedure is operating system +// dependent. E.g.: on Linux please refer to the `update-ca-trust` command. +// Deprecated: [v0.94.0] Use NewWithSettings instead. func New() confmap.Provider { - return configurablehttpprovider.New(configurablehttpprovider.HTTPSScheme) + return NewWithSettings(confmap.ProviderSettings{}) } diff --git a/confmap/provider/internal/configurablehttpprovider/package_test.go b/confmap/provider/internal/configurablehttpprovider/package_test.go new file mode 100644 index 00000000000..31c287dae4d --- /dev/null +++ b/confmap/provider/internal/configurablehttpprovider/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package configurablehttpprovider + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/confmap/provider/internal/configurablehttpprovider/provider.go b/confmap/provider/internal/configurablehttpprovider/provider.go index d4e3efcc6e1..c683d3d9a4e 100644 --- a/confmap/provider/internal/configurablehttpprovider/provider.go +++ b/confmap/provider/internal/configurablehttpprovider/provider.go @@ -38,7 +38,7 @@ type provider struct { // One example for http-uri: http://localhost:3333/getConfig // One example for https-uri: https://localhost:3333/getConfig // This is used by the http and https external implementations. -func New(scheme SchemeType) confmap.Provider { +func New(scheme SchemeType, _ confmap.ProviderSettings) confmap.Provider { return &provider{scheme: scheme} } diff --git a/confmap/provider/internal/configurablehttpprovider/provider_test.go b/confmap/provider/internal/configurablehttpprovider/provider_test.go index 7a3c5a5034f..ad4659879c4 100644 --- a/confmap/provider/internal/configurablehttpprovider/provider_test.go +++ b/confmap/provider/internal/configurablehttpprovider/provider_test.go @@ -23,11 +23,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/confmaptest" ) -func newConfigurableHTTPProvider(scheme SchemeType) *provider { - return New(scheme).(*provider) +func newConfigurableHTTPProvider(scheme SchemeType, set confmap.ProviderSettings) *provider { + return New(scheme, set).(*provider) } func answerGet(w http.ResponseWriter, _ *http.Request) { @@ -122,7 +123,7 @@ func generateCertificate(hostname string) (cert string, key string, err error) { } func TestFunctionalityDownloadFileHTTP(t *testing.T) { - fp := newConfigurableHTTPProvider(HTTPScheme) + fp := newConfigurableHTTPProvider(HTTPScheme, confmap.ProviderSettings{}) ts := httptest.NewServer(http.HandlerFunc(answerGet)) defer ts.Close() _, err := fp.Retrieve(context.Background(), ts.URL, nil) @@ -210,7 +211,7 @@ func TestFunctionalityDownloadFileHTTPS(t *testing.T) { for _, tt := range tests { t.Run(tt.testName, func(t *testing.T) { - fp := newConfigurableHTTPProvider(HTTPSScheme) + fp := newConfigurableHTTPProvider(HTTPSScheme, confmap.ProviderSettings{}) // Parse url of the test server to get the port number. tsURL, err := url.Parse(ts.URL) require.NoError(t, err) @@ -229,20 +230,20 @@ func TestFunctionalityDownloadFileHTTPS(t *testing.T) { } func TestUnsupportedScheme(t *testing.T) { - fp := New(HTTPScheme) + fp := New(HTTPScheme, confmap.ProviderSettings{}) _, err := fp.Retrieve(context.Background(), "https://...", nil) assert.Error(t, err) assert.NoError(t, fp.Shutdown(context.Background())) - fp = New(HTTPSScheme) + fp = New(HTTPSScheme, confmap.ProviderSettings{}) _, err = fp.Retrieve(context.Background(), "http://...", nil) assert.Error(t, err) assert.NoError(t, fp.Shutdown(context.Background())) } func TestEmptyURI(t *testing.T) { - fp := New(HTTPScheme) - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + fp := New(HTTPScheme, confmap.ProviderSettings{}) + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusBadRequest) })) defer ts.Close() @@ -252,8 +253,8 @@ func TestEmptyURI(t *testing.T) { } func TestRetrieveFromShutdownServer(t *testing.T) { - fp := New(HTTPScheme) - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})) + fp := New(HTTPScheme, confmap.ProviderSettings{}) + ts := httptest.NewServer(http.HandlerFunc(func(http.ResponseWriter, *http.Request) {})) ts.Close() _, err := fp.Retrieve(context.Background(), ts.URL, nil) assert.Error(t, err) @@ -261,8 +262,8 @@ func TestRetrieveFromShutdownServer(t *testing.T) { } func TestNonExistent(t *testing.T) { - fp := New(HTTPScheme) - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + fp := New(HTTPScheme, confmap.ProviderSettings{}) + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusNotFound) })) defer ts.Close() @@ -272,8 +273,8 @@ func TestNonExistent(t *testing.T) { } func TestInvalidYAML(t *testing.T) { - fp := New(HTTPScheme) - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + fp := New(HTTPScheme, confmap.ProviderSettings{}) + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusOK) _, err := w.Write([]byte("wrong : [")) if err != nil { @@ -287,17 +288,17 @@ func TestInvalidYAML(t *testing.T) { } func TestScheme(t *testing.T) { - fp := New(HTTPScheme) + fp := New(HTTPScheme, confmap.ProviderSettings{}) assert.Equal(t, "http", fp.Scheme()) require.NoError(t, fp.Shutdown(context.Background())) } func TestValidateProviderScheme(t *testing.T) { - assert.NoError(t, confmaptest.ValidateProviderScheme(New(HTTPScheme))) + assert.NoError(t, confmaptest.ValidateProviderScheme(New(HTTPScheme, confmap.ProviderSettings{}))) } func TestInvalidTransport(t *testing.T) { - fp := New("foo") + fp := New("foo", confmap.ProviderSettings{}) _, err := fp.Retrieve(context.Background(), "foo://..", nil) assert.Error(t, err) diff --git a/confmap/provider/internal/configurablehttpprovider/testdata/otel-config.yaml b/confmap/provider/internal/configurablehttpprovider/testdata/otel-config.yaml index 8505ef55936..ac27ba4c851 100644 --- a/confmap/provider/internal/configurablehttpprovider/testdata/otel-config.yaml +++ b/confmap/provider/internal/configurablehttpprovider/testdata/otel-config.yaml @@ -1,6 +1,4 @@ extensions: - memory_ballast: - size_mib: 512 zpages: endpoint: 0.0.0.0:55679 @@ -13,7 +11,7 @@ receivers: processors: batch: memory_limiter: - # 75% of maximum memory up to 4G + # 75% of maximum memory up to 2G limit_mib: 1536 # 25% of limit up to 2G spike_limit_mib: 512 @@ -34,4 +32,4 @@ service: processors: [memory_limiter, batch] exporters: [debug] - extensions: [memory_ballast, zpages] + extensions: [zpages] diff --git a/confmap/provider/internal/package_test.go b/confmap/provider/internal/package_test.go new file mode 100644 index 00000000000..4486cdb28aa --- /dev/null +++ b/confmap/provider/internal/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package internal + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/confmap/provider/yamlprovider/Makefile b/confmap/provider/yamlprovider/Makefile new file mode 100644 index 00000000000..bdd863a203b --- /dev/null +++ b/confmap/provider/yamlprovider/Makefile @@ -0,0 +1 @@ +include ../../../Makefile.Common diff --git a/confmap/provider/yamlprovider/go.mod b/confmap/provider/yamlprovider/go.mod new file mode 100644 index 00000000000..482eaa6531c --- /dev/null +++ b/confmap/provider/yamlprovider/go.mod @@ -0,0 +1,24 @@ +module go.opentelemetry.io/collector/confmap/provider/yamlprovider + +go 1.21 + +require ( + github.com/stretchr/testify v1.8.4 + go.opentelemetry.io/collector/confmap v0.96.0 + go.uber.org/goleak v1.3.0 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/knadh/koanf/maps v0.1.1 // indirect + github.com/knadh/koanf/providers/confmap v0.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + +replace go.opentelemetry.io/collector/confmap => ../../ diff --git a/confmap/provider/yamlprovider/go.sum b/confmap/provider/yamlprovider/go.sum new file mode 100644 index 00000000000..69f4a4f6724 --- /dev/null +++ b/confmap/provider/yamlprovider/go.sum @@ -0,0 +1,31 @@ +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= +github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= +github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= +github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +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.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/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= diff --git a/confmap/provider/yamlprovider/package_test.go b/confmap/provider/yamlprovider/package_test.go new file mode 100644 index 00000000000..50b62480e04 --- /dev/null +++ b/confmap/provider/yamlprovider/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package yamlprovider + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/confmap/provider/yamlprovider/provider.go b/confmap/provider/yamlprovider/provider.go index 8573318ea55..45fca8a1fc4 100644 --- a/confmap/provider/yamlprovider/provider.go +++ b/confmap/provider/yamlprovider/provider.go @@ -16,6 +16,19 @@ const schemeName = "yaml" type provider struct{} +// NewWithSettings returns a new confmap.Provider that allows to provide yaml bytes. +// +// This Provider supports "yaml" scheme, and can be called with a "uri" that follows: +// +// bytes-uri = "yaml:" yaml-bytes +// +// Examples: +// `yaml:processors::batch::timeout: 2s` +// `yaml:processors::batch/foo::timeout: 3s` +func NewWithSettings(confmap.ProviderSettings) confmap.Provider { + return &provider{} +} + // New returns a new confmap.Provider that allows to provide yaml bytes. // // This Provider supports "yaml" scheme, and can be called with a "uri" that follows: @@ -25,8 +38,9 @@ type provider struct{} // Examples: // `yaml:processors::batch::timeout: 2s` // `yaml:processors::batch/foo::timeout: 3s` +// Deprecated: [v0.94.0] Use NewWithSettings instead. func New() confmap.Provider { - return &provider{} + return NewWithSettings(confmap.ProviderSettings{}) } func (s *provider) Retrieve(_ context.Context, uri string, _ confmap.WatcherFunc) (*confmap.Retrieved, error) { diff --git a/confmap/resolver.go b/confmap/resolver.go index 91bf848d478..f056d18d1ec 100644 --- a/confmap/resolver.go +++ b/confmap/resolver.go @@ -11,20 +11,12 @@ import ( "strings" "go.uber.org/multierr" - - "go.opentelemetry.io/collector/featuregate" ) // follows drive-letter specification: // https://datatracker.ietf.org/doc/html/draft-kerwin-file-scheme-07.html#section-2.2 var driverLetterRegexp = regexp.MustCompile("^[A-z]:") -var _ = featuregate.GlobalRegistry().MustRegister( - "confmap.expandEnabled", - featuregate.StageStable, - featuregate.WithRegisterToVersion("v0.75.0"), - featuregate.WithRegisterDescription("controls whether expanding embedded external config providers URIs")) - // Resolver resolves a configuration as a Conf. type Resolver struct { uris []location diff --git a/confmap/resolver_test.go b/confmap/resolver_test.go index 08e2088dad2..aa1442d161a 100644 --- a/confmap/resolver_test.go +++ b/confmap/resolver_test.go @@ -155,7 +155,7 @@ func TestResolverErrors(t *testing.T) { locations: []string{"mock:", "err:"}, providers: []Provider{ &mockProvider{}, - &mockProvider{scheme: "err", retM: map[string]any{}, closeFunc: func(ctx context.Context) error { return errors.New("close_err") }}, + &mockProvider{scheme: "err", retM: map[string]any{}, closeFunc: func(context.Context) error { return errors.New("close_err") }}, }, expectCloseErr: true, }, @@ -270,7 +270,7 @@ func TestResolver(t *testing.T) { numCalls := atomic.Int32{} resolver, err := NewResolver(ResolverSettings{ URIs: []string{"mock:"}, - Providers: makeMapProvidersMap(&mockProvider{retM: map[string]any{}, closeFunc: func(ctx context.Context) error { + Providers: makeMapProvidersMap(&mockProvider{retM: map[string]any{}, closeFunc: func(context.Context) error { numCalls.Add(1) return nil }}), diff --git a/connector/connector.go b/connector/connector.go index 3a85add44a6..94927092117 100644 --- a/connector/connector.go +++ b/connector/connector.go @@ -5,6 +5,7 @@ package connector // import "go.opentelemetry.io/collector/connector" import ( "context" + "errors" "fmt" "go.uber.org/zap" @@ -13,6 +14,10 @@ import ( "go.opentelemetry.io/collector/consumer" ) +var ( + errNilNextConsumer = errors.New("nil next Consumer") +) + // A Traces connector acts as an exporter from a traces pipeline and a receiver // to one or more traces, metrics, or logs pipelines. // Traces feeds a consumer.Traces, consumer.Metrics, or consumer.Logs with data. @@ -30,13 +35,6 @@ type Traces interface { consumer.Traces } -// TracesRouter feeds the first consumer.Traces in each of the specified pipelines. -// The router will create a fanout consumer for the set of pipelines and return a uuid -type TracesRouter interface { - Consumer(...component.ID) (consumer.Traces, error) - PipelineIDs() []component.ID -} - // A Metrics connector acts as an exporter from a metrics pipeline and a receiver // to one or more traces, metrics, or logs pipelines. // Metrics feeds a consumer.Traces, consumer.Metrics, or consumer.Logs with data. @@ -53,15 +51,9 @@ type Metrics interface { consumer.Metrics } -// MetricsRouter feeds the first consumer.Metrics in each of the specified pipelines. -type MetricsRouter interface { - Consumer(...component.ID) (consumer.Metrics, error) - PipelineIDs() []component.ID -} - // A Logs connector acts as an exporter from a logs pipeline and a receiver // to one or more traces, metrics, or logs pipelines. -// Logs feeds a consumer.Logs, consumer.Metrics, or consumer.Logs with data. +// Logs feeds a consumer.Traces, consumer.Metrics, or consumer.Logs with data. // // Examples: // - Structured logs containing span information could be consumed and emitted as traces. @@ -74,12 +66,6 @@ type Logs interface { consumer.Logs } -// LogsRouter feeds the first consumer.Logs in each of the specified pipelines. -type LogsRouter interface { - Consumer(...component.ID) (consumer.Logs, error) - PipelineIDs() []component.ID -} - // CreateSettings configures Connector creators. type CreateSettings struct { // ID returns the ID of the component that will be created. @@ -475,6 +461,9 @@ func NewBuilder(cfgs map[component.ID]component.Config, factories map[component. // CreateTracesToTraces creates a Traces connector based on the settings and config. func (b *Builder) CreateTracesToTraces(ctx context.Context, set CreateSettings, next consumer.Traces) (Traces, error) { + if next == nil { + return nil, errNilNextConsumer + } cfg, existsCfg := b.cfgs[set.ID] if !existsCfg { return nil, fmt.Errorf("connector %q is not configured", set.ID) @@ -491,6 +480,9 @@ func (b *Builder) CreateTracesToTraces(ctx context.Context, set CreateSettings, // CreateTracesToMetrics creates a Traces connector based on the settings and config. func (b *Builder) CreateTracesToMetrics(ctx context.Context, set CreateSettings, next consumer.Metrics) (Traces, error) { + if next == nil { + return nil, errNilNextConsumer + } cfg, existsCfg := b.cfgs[set.ID] if !existsCfg { return nil, fmt.Errorf("connector %q is not configured", set.ID) @@ -507,6 +499,9 @@ func (b *Builder) CreateTracesToMetrics(ctx context.Context, set CreateSettings, // CreateTracesToLogs creates a Traces connector based on the settings and config. func (b *Builder) CreateTracesToLogs(ctx context.Context, set CreateSettings, next consumer.Logs) (Traces, error) { + if next == nil { + return nil, errNilNextConsumer + } cfg, existsCfg := b.cfgs[set.ID] if !existsCfg { return nil, fmt.Errorf("connector %q is not configured", set.ID) @@ -523,6 +518,9 @@ func (b *Builder) CreateTracesToLogs(ctx context.Context, set CreateSettings, ne // CreateMetricsToTraces creates a Metrics connector based on the settings and config. func (b *Builder) CreateMetricsToTraces(ctx context.Context, set CreateSettings, next consumer.Traces) (Metrics, error) { + if next == nil { + return nil, errNilNextConsumer + } cfg, existsCfg := b.cfgs[set.ID] if !existsCfg { return nil, fmt.Errorf("connector %q is not configured", set.ID) @@ -539,6 +537,9 @@ func (b *Builder) CreateMetricsToTraces(ctx context.Context, set CreateSettings, // CreateMetricsToMetrics creates a Metrics connector based on the settings and config. func (b *Builder) CreateMetricsToMetrics(ctx context.Context, set CreateSettings, next consumer.Metrics) (Metrics, error) { + if next == nil { + return nil, errNilNextConsumer + } cfg, existsCfg := b.cfgs[set.ID] if !existsCfg { return nil, fmt.Errorf("connector %q is not configured", set.ID) @@ -555,6 +556,9 @@ func (b *Builder) CreateMetricsToMetrics(ctx context.Context, set CreateSettings // CreateMetricsToLogs creates a Metrics connector based on the settings and config. func (b *Builder) CreateMetricsToLogs(ctx context.Context, set CreateSettings, next consumer.Logs) (Metrics, error) { + if next == nil { + return nil, errNilNextConsumer + } cfg, existsCfg := b.cfgs[set.ID] if !existsCfg { return nil, fmt.Errorf("connector %q is not configured", set.ID) @@ -571,6 +575,9 @@ func (b *Builder) CreateMetricsToLogs(ctx context.Context, set CreateSettings, n // CreateLogsToTraces creates a Logs connector based on the settings and config. func (b *Builder) CreateLogsToTraces(ctx context.Context, set CreateSettings, next consumer.Traces) (Logs, error) { + if next == nil { + return nil, errNilNextConsumer + } cfg, existsCfg := b.cfgs[set.ID] if !existsCfg { return nil, fmt.Errorf("connector %q is not configured", set.ID) @@ -587,6 +594,9 @@ func (b *Builder) CreateLogsToTraces(ctx context.Context, set CreateSettings, ne // CreateLogsToMetrics creates a Logs connector based on the settings and config. func (b *Builder) CreateLogsToMetrics(ctx context.Context, set CreateSettings, next consumer.Metrics) (Logs, error) { + if next == nil { + return nil, errNilNextConsumer + } cfg, existsCfg := b.cfgs[set.ID] if !existsCfg { return nil, fmt.Errorf("connector %q is not configured", set.ID) @@ -603,6 +613,9 @@ func (b *Builder) CreateLogsToMetrics(ctx context.Context, set CreateSettings, n // CreateLogsToLogs creates a Logs connector based on the settings and config. func (b *Builder) CreateLogsToLogs(ctx context.Context, set CreateSettings, next consumer.Logs) (Logs, error) { + if next == nil { + return nil, errNilNextConsumer + } cfg, existsCfg := b.cfgs[set.ID] if !existsCfg { return nil, fmt.Errorf("connector %q is not configured", set.ID) diff --git a/connector/connector_test.go b/connector/connector_test.go index a2dc1305dfb..7384b50621d 100644 --- a/connector/connector_test.go +++ b/connector/connector_test.go @@ -17,128 +17,123 @@ import ( "go.opentelemetry.io/collector/consumer/consumertest" ) +var ( + testType = component.MustNewType("test") + testID = component.MustNewIDWithName("type", "name") +) + func TestNewFactoryNoOptions(t *testing.T) { - const typeStr = "test" defaultCfg := struct{}{} - factory := NewFactory(typeStr, func() component.Config { return &defaultCfg }) - assert.EqualValues(t, typeStr, factory.Type()) + factory := NewFactory(testType, func() component.Config { return &defaultCfg }) + assert.EqualValues(t, testType, factory.Type()) assert.EqualValues(t, &defaultCfg, factory.CreateDefaultConfig()) - testID := component.NewIDWithName("type", "name") - - _, err := factory.CreateTracesToTraces(context.Background(), CreateSettings{ID: testID}, &defaultCfg, nil) + _, err := factory.CreateTracesToTraces(context.Background(), CreateSettings{ID: testID}, &defaultCfg, consumertest.NewNop()) assert.Equal(t, err, errDataTypes(testID, component.DataTypeTraces, component.DataTypeTraces)) - _, err = factory.CreateTracesToMetrics(context.Background(), CreateSettings{ID: testID}, &defaultCfg, nil) + _, err = factory.CreateTracesToMetrics(context.Background(), CreateSettings{ID: testID}, &defaultCfg, consumertest.NewNop()) assert.Equal(t, err, errDataTypes(testID, component.DataTypeTraces, component.DataTypeMetrics)) - _, err = factory.CreateTracesToLogs(context.Background(), CreateSettings{ID: testID}, &defaultCfg, nil) + _, err = factory.CreateTracesToLogs(context.Background(), CreateSettings{ID: testID}, &defaultCfg, consumertest.NewNop()) assert.Equal(t, err, errDataTypes(testID, component.DataTypeTraces, component.DataTypeLogs)) - _, err = factory.CreateMetricsToTraces(context.Background(), CreateSettings{ID: testID}, &defaultCfg, nil) + _, err = factory.CreateMetricsToTraces(context.Background(), CreateSettings{ID: testID}, &defaultCfg, consumertest.NewNop()) assert.Equal(t, err, errDataTypes(testID, component.DataTypeMetrics, component.DataTypeTraces)) - _, err = factory.CreateMetricsToMetrics(context.Background(), CreateSettings{ID: testID}, &defaultCfg, nil) + _, err = factory.CreateMetricsToMetrics(context.Background(), CreateSettings{ID: testID}, &defaultCfg, consumertest.NewNop()) assert.Equal(t, err, errDataTypes(testID, component.DataTypeMetrics, component.DataTypeMetrics)) - _, err = factory.CreateMetricsToLogs(context.Background(), CreateSettings{ID: testID}, &defaultCfg, nil) + _, err = factory.CreateMetricsToLogs(context.Background(), CreateSettings{ID: testID}, &defaultCfg, consumertest.NewNop()) assert.Equal(t, err, errDataTypes(testID, component.DataTypeMetrics, component.DataTypeLogs)) - _, err = factory.CreateLogsToTraces(context.Background(), CreateSettings{ID: testID}, &defaultCfg, nil) + _, err = factory.CreateLogsToTraces(context.Background(), CreateSettings{ID: testID}, &defaultCfg, consumertest.NewNop()) assert.Equal(t, err, errDataTypes(testID, component.DataTypeLogs, component.DataTypeTraces)) - _, err = factory.CreateLogsToMetrics(context.Background(), CreateSettings{ID: testID}, &defaultCfg, nil) + _, err = factory.CreateLogsToMetrics(context.Background(), CreateSettings{ID: testID}, &defaultCfg, consumertest.NewNop()) assert.Equal(t, err, errDataTypes(testID, component.DataTypeLogs, component.DataTypeMetrics)) - _, err = factory.CreateLogsToLogs(context.Background(), CreateSettings{ID: testID}, &defaultCfg, nil) + _, err = factory.CreateLogsToLogs(context.Background(), CreateSettings{ID: testID}, &defaultCfg, consumertest.NewNop()) assert.Equal(t, err, errDataTypes(testID, component.DataTypeLogs, component.DataTypeLogs)) } func TestNewFactoryWithSameTypes(t *testing.T) { - const typeStr = "test" defaultCfg := struct{}{} - factory := NewFactory(typeStr, func() component.Config { return &defaultCfg }, + factory := NewFactory(testType, func() component.Config { return &defaultCfg }, WithTracesToTraces(createTracesToTraces, component.StabilityLevelAlpha), WithMetricsToMetrics(createMetricsToMetrics, component.StabilityLevelBeta), WithLogsToLogs(createLogsToLogs, component.StabilityLevelUnmaintained)) - assert.EqualValues(t, typeStr, factory.Type()) + assert.EqualValues(t, testType, factory.Type()) assert.EqualValues(t, &defaultCfg, factory.CreateDefaultConfig()) - testID := component.NewIDWithName("type", "name") - assert.Equal(t, component.StabilityLevelAlpha, factory.TracesToTracesStability()) - _, err := factory.CreateTracesToTraces(context.Background(), CreateSettings{ID: testID}, &defaultCfg, nil) + _, err := factory.CreateTracesToTraces(context.Background(), CreateSettings{ID: testID}, &defaultCfg, consumertest.NewNop()) assert.NoError(t, err) assert.Equal(t, component.StabilityLevelBeta, factory.MetricsToMetricsStability()) - _, err = factory.CreateMetricsToMetrics(context.Background(), CreateSettings{ID: testID}, &defaultCfg, nil) + _, err = factory.CreateMetricsToMetrics(context.Background(), CreateSettings{ID: testID}, &defaultCfg, consumertest.NewNop()) assert.NoError(t, err) assert.Equal(t, component.StabilityLevelUnmaintained, factory.LogsToLogsStability()) - _, err = factory.CreateLogsToLogs(context.Background(), CreateSettings{ID: testID}, &defaultCfg, nil) + _, err = factory.CreateLogsToLogs(context.Background(), CreateSettings{ID: testID}, &defaultCfg, consumertest.NewNop()) assert.NoError(t, err) - _, err = factory.CreateTracesToMetrics(context.Background(), CreateSettings{ID: testID}, &defaultCfg, nil) + _, err = factory.CreateTracesToMetrics(context.Background(), CreateSettings{ID: testID}, &defaultCfg, consumertest.NewNop()) assert.Equal(t, err, errDataTypes(testID, component.DataTypeTraces, component.DataTypeMetrics)) - _, err = factory.CreateTracesToLogs(context.Background(), CreateSettings{ID: testID}, &defaultCfg, nil) + _, err = factory.CreateTracesToLogs(context.Background(), CreateSettings{ID: testID}, &defaultCfg, consumertest.NewNop()) assert.Equal(t, err, errDataTypes(testID, component.DataTypeTraces, component.DataTypeLogs)) - _, err = factory.CreateMetricsToTraces(context.Background(), CreateSettings{ID: testID}, &defaultCfg, nil) + _, err = factory.CreateMetricsToTraces(context.Background(), CreateSettings{ID: testID}, &defaultCfg, consumertest.NewNop()) assert.Equal(t, err, errDataTypes(testID, component.DataTypeMetrics, component.DataTypeTraces)) - _, err = factory.CreateMetricsToLogs(context.Background(), CreateSettings{ID: testID}, &defaultCfg, nil) + _, err = factory.CreateMetricsToLogs(context.Background(), CreateSettings{ID: testID}, &defaultCfg, consumertest.NewNop()) assert.Equal(t, err, errDataTypes(testID, component.DataTypeMetrics, component.DataTypeLogs)) - _, err = factory.CreateLogsToTraces(context.Background(), CreateSettings{ID: testID}, &defaultCfg, nil) + _, err = factory.CreateLogsToTraces(context.Background(), CreateSettings{ID: testID}, &defaultCfg, consumertest.NewNop()) assert.Equal(t, err, errDataTypes(testID, component.DataTypeLogs, component.DataTypeTraces)) - _, err = factory.CreateLogsToMetrics(context.Background(), CreateSettings{ID: testID}, &defaultCfg, nil) + _, err = factory.CreateLogsToMetrics(context.Background(), CreateSettings{ID: testID}, &defaultCfg, consumertest.NewNop()) assert.Equal(t, err, errDataTypes(testID, component.DataTypeLogs, component.DataTypeMetrics)) } func TestNewFactoryWithTranslateTypes(t *testing.T) { - const typeStr = "test" defaultCfg := struct{}{} - factory := NewFactory(typeStr, func() component.Config { return &defaultCfg }, + factory := NewFactory(testType, func() component.Config { return &defaultCfg }, WithTracesToMetrics(createTracesToMetrics, component.StabilityLevelDevelopment), WithTracesToLogs(createTracesToLogs, component.StabilityLevelAlpha), WithMetricsToTraces(createMetricsToTraces, component.StabilityLevelBeta), WithMetricsToLogs(createMetricsToLogs, component.StabilityLevelStable), WithLogsToTraces(createLogsToTraces, component.StabilityLevelDeprecated), WithLogsToMetrics(createLogsToMetrics, component.StabilityLevelUnmaintained)) - assert.EqualValues(t, typeStr, factory.Type()) + assert.EqualValues(t, testType, factory.Type()) assert.EqualValues(t, &defaultCfg, factory.CreateDefaultConfig()) - testID := component.NewIDWithName("type", "name") - - _, err := factory.CreateTracesToTraces(context.Background(), CreateSettings{ID: testID}, &defaultCfg, nil) + _, err := factory.CreateTracesToTraces(context.Background(), CreateSettings{ID: testID}, &defaultCfg, consumertest.NewNop()) assert.Equal(t, err, errDataTypes(testID, component.DataTypeTraces, component.DataTypeTraces)) - _, err = factory.CreateMetricsToMetrics(context.Background(), CreateSettings{ID: testID}, &defaultCfg, nil) + _, err = factory.CreateMetricsToMetrics(context.Background(), CreateSettings{ID: testID}, &defaultCfg, consumertest.NewNop()) assert.Equal(t, err, errDataTypes(testID, component.DataTypeMetrics, component.DataTypeMetrics)) - _, err = factory.CreateLogsToLogs(context.Background(), CreateSettings{ID: testID}, &defaultCfg, nil) + _, err = factory.CreateLogsToLogs(context.Background(), CreateSettings{ID: testID}, &defaultCfg, consumertest.NewNop()) assert.Equal(t, err, errDataTypes(testID, component.DataTypeLogs, component.DataTypeLogs)) assert.Equal(t, component.StabilityLevelDevelopment, factory.TracesToMetricsStability()) - _, err = factory.CreateTracesToMetrics(context.Background(), CreateSettings{ID: testID}, &defaultCfg, nil) + _, err = factory.CreateTracesToMetrics(context.Background(), CreateSettings{ID: testID}, &defaultCfg, consumertest.NewNop()) assert.NoError(t, err) assert.Equal(t, component.StabilityLevelAlpha, factory.TracesToLogsStability()) - _, err = factory.CreateTracesToLogs(context.Background(), CreateSettings{ID: testID}, &defaultCfg, nil) + _, err = factory.CreateTracesToLogs(context.Background(), CreateSettings{ID: testID}, &defaultCfg, consumertest.NewNop()) assert.NoError(t, err) assert.Equal(t, component.StabilityLevelBeta, factory.MetricsToTracesStability()) - _, err = factory.CreateMetricsToTraces(context.Background(), CreateSettings{ID: testID}, &defaultCfg, nil) + _, err = factory.CreateMetricsToTraces(context.Background(), CreateSettings{ID: testID}, &defaultCfg, consumertest.NewNop()) assert.NoError(t, err) assert.Equal(t, component.StabilityLevelStable, factory.MetricsToLogsStability()) - _, err = factory.CreateMetricsToLogs(context.Background(), CreateSettings{ID: testID}, &defaultCfg, nil) + _, err = factory.CreateMetricsToLogs(context.Background(), CreateSettings{ID: testID}, &defaultCfg, consumertest.NewNop()) assert.NoError(t, err) assert.Equal(t, component.StabilityLevelDeprecated, factory.LogsToTracesStability()) - _, err = factory.CreateLogsToTraces(context.Background(), CreateSettings{ID: testID}, &defaultCfg, nil) + _, err = factory.CreateLogsToTraces(context.Background(), CreateSettings{ID: testID}, &defaultCfg, consumertest.NewNop()) assert.NoError(t, err) assert.Equal(t, component.StabilityLevelUnmaintained, factory.LogsToMetricsStability()) - _, err = factory.CreateLogsToMetrics(context.Background(), CreateSettings{ID: testID}, &defaultCfg, nil) + _, err = factory.CreateLogsToMetrics(context.Background(), CreateSettings{ID: testID}, &defaultCfg, consumertest.NewNop()) assert.NoError(t, err) } func TestNewFactoryWithAllTypes(t *testing.T) { - const typeStr = "test" defaultCfg := struct{}{} - factory := NewFactory(typeStr, func() component.Config { return &defaultCfg }, + factory := NewFactory(testType, func() component.Config { return &defaultCfg }, WithTracesToTraces(createTracesToTraces, component.StabilityLevelAlpha), WithTracesToMetrics(createTracesToMetrics, component.StabilityLevelDevelopment), WithTracesToLogs(createTracesToLogs, component.StabilityLevelAlpha), @@ -148,37 +143,37 @@ func TestNewFactoryWithAllTypes(t *testing.T) { WithLogsToTraces(createLogsToTraces, component.StabilityLevelDeprecated), WithLogsToMetrics(createLogsToMetrics, component.StabilityLevelUnmaintained), WithLogsToLogs(createLogsToLogs, component.StabilityLevelUnmaintained)) - assert.EqualValues(t, typeStr, factory.Type()) + assert.EqualValues(t, testType, factory.Type()) assert.EqualValues(t, &defaultCfg, factory.CreateDefaultConfig()) assert.Equal(t, component.StabilityLevelAlpha, factory.TracesToTracesStability()) - _, err := factory.CreateTracesToTraces(context.Background(), CreateSettings{}, &defaultCfg, nil) + _, err := factory.CreateTracesToTraces(context.Background(), CreateSettings{}, &defaultCfg, consumertest.NewNop()) assert.NoError(t, err) assert.Equal(t, component.StabilityLevelDevelopment, factory.TracesToMetricsStability()) - _, err = factory.CreateTracesToMetrics(context.Background(), CreateSettings{}, &defaultCfg, nil) + _, err = factory.CreateTracesToMetrics(context.Background(), CreateSettings{}, &defaultCfg, consumertest.NewNop()) assert.NoError(t, err) assert.Equal(t, component.StabilityLevelAlpha, factory.TracesToLogsStability()) - _, err = factory.CreateTracesToLogs(context.Background(), CreateSettings{}, &defaultCfg, nil) + _, err = factory.CreateTracesToLogs(context.Background(), CreateSettings{}, &defaultCfg, consumertest.NewNop()) assert.NoError(t, err) assert.Equal(t, component.StabilityLevelBeta, factory.MetricsToTracesStability()) - _, err = factory.CreateMetricsToTraces(context.Background(), CreateSettings{}, &defaultCfg, nil) + _, err = factory.CreateMetricsToTraces(context.Background(), CreateSettings{}, &defaultCfg, consumertest.NewNop()) assert.NoError(t, err) assert.Equal(t, component.StabilityLevelBeta, factory.MetricsToMetricsStability()) - _, err = factory.CreateMetricsToMetrics(context.Background(), CreateSettings{}, &defaultCfg, nil) + _, err = factory.CreateMetricsToMetrics(context.Background(), CreateSettings{}, &defaultCfg, consumertest.NewNop()) assert.NoError(t, err) assert.Equal(t, component.StabilityLevelStable, factory.MetricsToLogsStability()) - _, err = factory.CreateMetricsToLogs(context.Background(), CreateSettings{}, &defaultCfg, nil) + _, err = factory.CreateMetricsToLogs(context.Background(), CreateSettings{}, &defaultCfg, consumertest.NewNop()) assert.NoError(t, err) assert.Equal(t, component.StabilityLevelDeprecated, factory.LogsToTracesStability()) - _, err = factory.CreateLogsToTraces(context.Background(), CreateSettings{}, &defaultCfg, nil) + _, err = factory.CreateLogsToTraces(context.Background(), CreateSettings{}, &defaultCfg, consumertest.NewNop()) assert.NoError(t, err) assert.Equal(t, component.StabilityLevelUnmaintained, factory.LogsToMetricsStability()) - _, err = factory.CreateLogsToMetrics(context.Background(), CreateSettings{}, &defaultCfg, nil) + _, err = factory.CreateLogsToMetrics(context.Background(), CreateSettings{}, &defaultCfg, consumertest.NewNop()) assert.NoError(t, err) assert.Equal(t, component.StabilityLevelUnmaintained, factory.LogsToLogsStability()) - _, err = factory.CreateLogsToLogs(context.Background(), CreateSettings{}, &defaultCfg, nil) + _, err = factory.CreateLogsToLogs(context.Background(), CreateSettings{}, &defaultCfg, consumertest.NewNop()) assert.NoError(t, err) } @@ -189,8 +184,8 @@ func TestMakeFactoryMap(t *testing.T) { out map[component.Type]Factory } - p1 := NewFactory("p1", nil) - p2 := NewFactory("p2", nil) + p1 := NewFactory(component.MustNewType("p1"), nil) + p2 := NewFactory(component.MustNewType("p2"), nil) testCases := []testCase{ { name: "different names", @@ -202,7 +197,7 @@ func TestMakeFactoryMap(t *testing.T) { }, { name: "same name", - in: []Factory{p1, p2, NewFactory("p1", nil)}, + in: []Factory{p1, p2, NewFactory(component.MustNewType("p1"), nil)}, }, } @@ -223,9 +218,9 @@ func TestMakeFactoryMap(t *testing.T) { func TestBuilder(t *testing.T) { defaultCfg := struct{}{} factories, err := MakeFactoryMap([]Factory{ - NewFactory("err", nil), + NewFactory(component.MustNewType("err"), nil), NewFactory( - "all", + component.MustNewType("all"), func() component.Config { return &defaultCfg }, WithTracesToTraces(createTracesToTraces, component.StabilityLevelDevelopment), WithTracesToMetrics(createTracesToMetrics, component.StabilityLevelDevelopment), @@ -241,37 +236,62 @@ func TestBuilder(t *testing.T) { require.NoError(t, err) testCases := []struct { - name string - id component.ID - err func(component.DataType, component.DataType) string + name string + id component.ID + err func(component.DataType, component.DataType) string + nextTraces consumer.Traces + nextLogs consumer.Logs + nextMetrics consumer.Metrics }{ { name: "unknown", - id: component.NewID("unknown"), - err: func(_, _ component.DataType) string { + id: component.MustNewID("unknown"), + err: func(component.DataType, component.DataType) string { return "connector factory not available for: \"unknown\"" }, + nextTraces: consumertest.NewNop(), + nextLogs: consumertest.NewNop(), + nextMetrics: consumertest.NewNop(), }, { name: "err", - id: component.NewID("err"), + id: component.MustNewID("err"), err: func(expType, rcvType component.DataType) string { return fmt.Sprintf("connector \"err\" cannot connect from %s to %s: telemetry type is not supported", expType, rcvType) }, + nextTraces: consumertest.NewNop(), + nextLogs: consumertest.NewNop(), + nextMetrics: consumertest.NewNop(), }, { name: "all", - id: component.NewID("all"), - err: func(_, _ component.DataType) string { + id: component.MustNewID("all"), + err: func(component.DataType, component.DataType) string { return "" }, + nextTraces: consumertest.NewNop(), + nextLogs: consumertest.NewNop(), + nextMetrics: consumertest.NewNop(), }, { name: "all/named", - id: component.NewIDWithName("all", "named"), - err: func(_, _ component.DataType) string { + id: component.MustNewIDWithName("all", "named"), + err: func(component.DataType, component.DataType) string { return "" }, + nextTraces: consumertest.NewNop(), + nextLogs: consumertest.NewNop(), + nextMetrics: consumertest.NewNop(), + }, + { + name: "no next consumer", + id: component.MustNewID("unknown"), + err: func(_, _ component.DataType) string { + return "nil next Consumer" + }, + nextTraces: nil, + nextLogs: nil, + nextMetrics: nil, }, } @@ -280,7 +300,7 @@ func TestBuilder(t *testing.T) { cfgs := map[component.ID]component.Config{tt.id: defaultCfg} b := NewBuilder(cfgs, factories) - t2t, err := b.CreateTracesToTraces(context.Background(), createSettings(tt.id), nil) + t2t, err := b.CreateTracesToTraces(context.Background(), createSettings(tt.id), tt.nextTraces) if expectedErr := tt.err(component.DataTypeTraces, component.DataTypeTraces); expectedErr != "" { assert.EqualError(t, err, expectedErr) assert.Nil(t, t2t) @@ -288,7 +308,7 @@ func TestBuilder(t *testing.T) { assert.NoError(t, err) assert.Equal(t, nopInstance, t2t) } - t2m, err := b.CreateTracesToMetrics(context.Background(), createSettings(tt.id), nil) + t2m, err := b.CreateTracesToMetrics(context.Background(), createSettings(tt.id), tt.nextMetrics) if expectedErr := tt.err(component.DataTypeTraces, component.DataTypeMetrics); expectedErr != "" { assert.EqualError(t, err, expectedErr) assert.Nil(t, t2m) @@ -296,7 +316,7 @@ func TestBuilder(t *testing.T) { assert.NoError(t, err) assert.Equal(t, nopInstance, t2m) } - t2l, err := b.CreateTracesToLogs(context.Background(), createSettings(tt.id), nil) + t2l, err := b.CreateTracesToLogs(context.Background(), createSettings(tt.id), tt.nextLogs) if expectedErr := tt.err(component.DataTypeTraces, component.DataTypeLogs); expectedErr != "" { assert.EqualError(t, err, expectedErr) assert.Nil(t, t2l) @@ -305,7 +325,7 @@ func TestBuilder(t *testing.T) { assert.Equal(t, nopInstance, t2l) } - m2t, err := b.CreateMetricsToTraces(context.Background(), createSettings(tt.id), nil) + m2t, err := b.CreateMetricsToTraces(context.Background(), createSettings(tt.id), tt.nextTraces) if expectedErr := tt.err(component.DataTypeMetrics, component.DataTypeTraces); expectedErr != "" { assert.EqualError(t, err, expectedErr) assert.Nil(t, m2t) @@ -314,7 +334,7 @@ func TestBuilder(t *testing.T) { assert.Equal(t, nopInstance, m2t) } - m2m, err := b.CreateMetricsToMetrics(context.Background(), createSettings(tt.id), nil) + m2m, err := b.CreateMetricsToMetrics(context.Background(), createSettings(tt.id), tt.nextMetrics) if expectedErr := tt.err(component.DataTypeMetrics, component.DataTypeMetrics); expectedErr != "" { assert.EqualError(t, err, expectedErr) assert.Nil(t, m2m) @@ -323,7 +343,7 @@ func TestBuilder(t *testing.T) { assert.Equal(t, nopInstance, m2m) } - m2l, err := b.CreateMetricsToLogs(context.Background(), createSettings(tt.id), nil) + m2l, err := b.CreateMetricsToLogs(context.Background(), createSettings(tt.id), tt.nextLogs) if expectedErr := tt.err(component.DataTypeMetrics, component.DataTypeLogs); expectedErr != "" { assert.EqualError(t, err, expectedErr) assert.Nil(t, m2l) @@ -332,7 +352,7 @@ func TestBuilder(t *testing.T) { assert.Equal(t, nopInstance, m2l) } - l2t, err := b.CreateLogsToTraces(context.Background(), createSettings(tt.id), nil) + l2t, err := b.CreateLogsToTraces(context.Background(), createSettings(tt.id), tt.nextTraces) if expectedErr := tt.err(component.DataTypeLogs, component.DataTypeTraces); expectedErr != "" { assert.EqualError(t, err, expectedErr) assert.Nil(t, l2t) @@ -341,7 +361,7 @@ func TestBuilder(t *testing.T) { assert.Equal(t, nopInstance, l2t) } - l2m, err := b.CreateLogsToMetrics(context.Background(), createSettings(tt.id), nil) + l2m, err := b.CreateLogsToMetrics(context.Background(), createSettings(tt.id), tt.nextMetrics) if expectedErr := tt.err(component.DataTypeLogs, component.DataTypeMetrics); expectedErr != "" { assert.EqualError(t, err, expectedErr) assert.Nil(t, l2m) @@ -350,7 +370,7 @@ func TestBuilder(t *testing.T) { assert.Equal(t, nopInstance, l2m) } - l2l, err := b.CreateLogsToLogs(context.Background(), createSettings(tt.id), nil) + l2l, err := b.CreateLogsToLogs(context.Background(), createSettings(tt.id), tt.nextLogs) if expectedErr := tt.err(component.DataTypeLogs, component.DataTypeLogs); expectedErr != "" { assert.EqualError(t, err, expectedErr) assert.Nil(t, l2l) @@ -366,7 +386,7 @@ func TestBuilderMissingConfig(t *testing.T) { defaultCfg := struct{}{} factories, err := MakeFactoryMap([]Factory{ NewFactory( - "all", + component.MustNewType("all"), func() component.Config { return &defaultCfg }, WithTracesToTraces(createTracesToTraces, component.StabilityLevelDevelopment), WithTracesToMetrics(createTracesToMetrics, component.StabilityLevelDevelopment), @@ -383,57 +403,57 @@ func TestBuilderMissingConfig(t *testing.T) { require.NoError(t, err) bErr := NewBuilder(map[component.ID]component.Config{}, factories) - missingID := component.NewIDWithName("all", "missing") + missingID := component.MustNewIDWithName("all", "missing") - t2t, err := bErr.CreateTracesToTraces(context.Background(), createSettings(missingID), nil) + t2t, err := bErr.CreateTracesToTraces(context.Background(), createSettings(missingID), consumertest.NewNop()) assert.EqualError(t, err, "connector \"all/missing\" is not configured") assert.Nil(t, t2t) - t2m, err := bErr.CreateTracesToMetrics(context.Background(), createSettings(missingID), nil) + t2m, err := bErr.CreateTracesToMetrics(context.Background(), createSettings(missingID), consumertest.NewNop()) assert.EqualError(t, err, "connector \"all/missing\" is not configured") assert.Nil(t, t2m) - t2l, err := bErr.CreateTracesToLogs(context.Background(), createSettings(missingID), nil) + t2l, err := bErr.CreateTracesToLogs(context.Background(), createSettings(missingID), consumertest.NewNop()) assert.EqualError(t, err, "connector \"all/missing\" is not configured") assert.Nil(t, t2l) - m2t, err := bErr.CreateMetricsToTraces(context.Background(), createSettings(missingID), nil) + m2t, err := bErr.CreateMetricsToTraces(context.Background(), createSettings(missingID), consumertest.NewNop()) assert.EqualError(t, err, "connector \"all/missing\" is not configured") assert.Nil(t, m2t) - m2m, err := bErr.CreateMetricsToMetrics(context.Background(), createSettings(missingID), nil) + m2m, err := bErr.CreateMetricsToMetrics(context.Background(), createSettings(missingID), consumertest.NewNop()) assert.EqualError(t, err, "connector \"all/missing\" is not configured") assert.Nil(t, m2m) - m2l, err := bErr.CreateMetricsToLogs(context.Background(), createSettings(missingID), nil) + m2l, err := bErr.CreateMetricsToLogs(context.Background(), createSettings(missingID), consumertest.NewNop()) assert.EqualError(t, err, "connector \"all/missing\" is not configured") assert.Nil(t, m2l) - l2t, err := bErr.CreateLogsToTraces(context.Background(), createSettings(missingID), nil) + l2t, err := bErr.CreateLogsToTraces(context.Background(), createSettings(missingID), consumertest.NewNop()) assert.EqualError(t, err, "connector \"all/missing\" is not configured") assert.Nil(t, l2t) - l2m, err := bErr.CreateLogsToMetrics(context.Background(), createSettings(missingID), nil) + l2m, err := bErr.CreateLogsToMetrics(context.Background(), createSettings(missingID), consumertest.NewNop()) assert.EqualError(t, err, "connector \"all/missing\" is not configured") assert.Nil(t, l2m) - l2l, err := bErr.CreateLogsToLogs(context.Background(), createSettings(missingID), nil) + l2l, err := bErr.CreateLogsToLogs(context.Background(), createSettings(missingID), consumertest.NewNop()) assert.EqualError(t, err, "connector \"all/missing\" is not configured") assert.Nil(t, l2l) } func TestBuilderGetters(t *testing.T) { - factories, err := MakeFactoryMap([]Factory{NewFactory("foo", nil)}...) + factories, err := MakeFactoryMap([]Factory{NewFactory(component.MustNewType("foo"), nil)}...) require.NoError(t, err) - cfgs := map[component.ID]component.Config{component.NewID("foo"): struct{}{}} + cfgs := map[component.ID]component.Config{component.MustNewID("foo"): struct{}{}} b := NewBuilder(cfgs, factories) - assert.True(t, b.IsConfigured(component.NewID("foo"))) - assert.False(t, b.IsConfigured(component.NewID("bar"))) + assert.True(t, b.IsConfigured(component.MustNewID("foo"))) + assert.False(t, b.IsConfigured(component.MustNewID("bar"))) - assert.NotNil(t, b.Factory(component.NewID("foo").Type())) - assert.Nil(t, b.Factory(component.NewID("bar").Type())) + assert.NotNil(t, b.Factory(component.MustNewID("foo").Type())) + assert.Nil(t, b.Factory(component.MustNewID("bar").Type())) } var nopInstance = &nopConnector{ diff --git a/connector/connectortest/connector.go b/connector/connectortest/connector.go index 137a353423c..d30fb65b6a5 100644 --- a/connector/connectortest/connector.go +++ b/connector/connectortest/connector.go @@ -13,11 +13,12 @@ import ( "go.opentelemetry.io/collector/consumer/consumertest" ) -const typeStr = "nop" +var nopType = component.MustNewType("nop") // NewNopCreateSettings returns a new nop settings for Create* functions. func NewNopCreateSettings() connector.CreateSettings { return connector.CreateSettings{ + ID: component.NewID(nopType), TelemetrySettings: componenttest.NewNopTelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo(), } @@ -28,7 +29,7 @@ type nopConfig struct{} // NewNopFactory returns a connector.Factory that constructs nop processors. func NewNopFactory() connector.Factory { return connector.NewFactory( - "nop", + nopType, func() component.Config { return &nopConfig{} }, @@ -93,8 +94,8 @@ func NewNopBuilder() *connector.Builder { // Use a different ID than receivertest and exportertest to avoid ambiguous // configuration scenarios. Ambiguous IDs are detected in the 'otelcol' package, // but lower level packages such as 'service' assume that IDs are disambiguated. - connID := component.NewIDWithName(typeStr, "conn") + connID := component.NewIDWithName(nopType, "conn") return connector.NewBuilder( map[component.ID]component.Config{connID: nopFactory.CreateDefaultConfig()}, - map[component.Type]connector.Factory{typeStr: nopFactory}) + map[component.Type]connector.Factory{nopType: nopFactory}) } diff --git a/connector/connectortest/connector_test.go b/connector/connectortest/connector_test.go index d8db553d9a1..4a2894f8544 100644 --- a/connector/connectortest/connector_test.go +++ b/connector/connectortest/connector_test.go @@ -21,7 +21,7 @@ import ( func TestNewNopConnectorFactory(t *testing.T) { factory := NewNopFactory() require.NotNil(t, factory) - assert.Equal(t, component.Type("nop"), factory.Type()) + assert.Equal(t, component.MustNewType("nop"), factory.Type()) cfg := factory.CreateDefaultConfig() assert.Equal(t, &nopConfig{}, cfg) @@ -87,7 +87,7 @@ func TestNewNopBuilder(t *testing.T) { factory := NewNopFactory() cfg := factory.CreateDefaultConfig() set := NewNopCreateSettings() - set.ID = component.NewIDWithName(typeStr, "conn") + set.ID = component.NewIDWithName(nopType, "conn") tracesToTraces, err := factory.CreateTracesToTraces(context.Background(), set, cfg, consumertest.NewNop()) require.NoError(t, err) diff --git a/connector/connectortest/package_test.go b/connector/connectortest/package_test.go new file mode 100644 index 00000000000..3d343e0071a --- /dev/null +++ b/connector/connectortest/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package connectortest + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/connector/connectortest/router.go b/connector/connectortest/router.go deleted file mode 100644 index 390e9502c59..00000000000 --- a/connector/connectortest/router.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package connectortest // import "go.opentelemetry.io/collector/connector/connectortest" - -import ( - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/connector" - "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/fanoutconsumer" -) - -type TracesRouterOption struct { - id component.ID - cons consumer.Traces -} - -// WithNopTraces creates a nop consumer for a connector.TracesRouter -func WithNopTraces(id component.ID) TracesRouterOption { - return TracesRouterOption{id: id, cons: consumertest.NewNop()} -} - -// WithTracesSink adds a consumer to a connector.TracesRouter -func WithTracesSink(id component.ID, sink *consumertest.TracesSink) TracesRouterOption { - return TracesRouterOption{id: id, cons: sink} -} - -// NewTracesRouter returns a connector.TracesRouter with sinks based on the options provided -func NewTracesRouter(opts ...TracesRouterOption) connector.TracesRouter { - consumers := make(map[component.ID]consumer.Traces) - for _, opt := range opts { - consumers[opt.id] = opt.cons - } - return fanoutconsumer.NewTracesRouter(consumers).(connector.TracesRouter) -} - -type MetricsRouterOption struct { - id component.ID - cons consumer.Metrics -} - -// WithNopMetrics creates a nop consumer for a connector.MetricsRouter -func WithNopMetrics(id component.ID) MetricsRouterOption { - return MetricsRouterOption{id: id, cons: consumertest.NewNop()} -} - -// WithMetricsSink adds a consumer to a connector.MetricsRouter -func WithMetricsSink(id component.ID, sink *consumertest.MetricsSink) MetricsRouterOption { - return MetricsRouterOption{id: id, cons: sink} -} - -// NewMetricsRouter returns a connector.MetricsRouter with sinks based on the options provided -func NewMetricsRouter(opts ...MetricsRouterOption) connector.MetricsRouter { - consumers := make(map[component.ID]consumer.Metrics) - for _, opt := range opts { - consumers[opt.id] = opt.cons - } - return fanoutconsumer.NewMetricsRouter(consumers).(connector.MetricsRouter) -} - -type LogsRouterOption struct { - id component.ID - cons consumer.Logs -} - -// WithNopLogs creates a nop consumer for a connector.LogsRouter -func WithNopLogs(id component.ID) LogsRouterOption { - return LogsRouterOption{id: id, cons: consumertest.NewNop()} -} - -// WithLogsSink adds a consumer to a connector.LogsRouter -func WithLogsSink(id component.ID, sink *consumertest.LogsSink) LogsRouterOption { - return LogsRouterOption{id: id, cons: sink} -} - -// NewLogsRouter returns a connector.LogsRouter with sinks based on the options provided -func NewLogsRouter(opts ...LogsRouterOption) connector.LogsRouter { - consumers := make(map[component.ID]consumer.Logs) - for _, opt := range opts { - consumers[opt.id] = opt.cons - } - return fanoutconsumer.NewLogsRouter(consumers).(connector.LogsRouter) -} diff --git a/connector/connectortest/router_test.go b/connector/connectortest/router_test.go deleted file mode 100644 index ba7cd30fc40..00000000000 --- a/connector/connectortest/router_test.go +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package connectortest - -import ( - "context" - "testing" - - "github.com/stretchr/testify/require" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" -) - -func TestTracesRouterWithNop(t *testing.T) { - tr := NewTracesRouter( - WithNopTraces(component.NewIDWithName(component.DataTypeTraces, "0")), - WithNopTraces(component.NewIDWithName(component.DataTypeTraces, "1")), - ) - - td := testdata.GenerateTraces(1) - err := tr.(consumer.Traces).ConsumeTraces(context.Background(), td) - - require.NoError(t, err) -} - -func TestTracesRouterWithSink(t *testing.T) { - var sink0, sink1 consumertest.TracesSink - - tr := NewTracesRouter( - WithTracesSink(component.NewIDWithName(component.DataTypeTraces, "0"), &sink0), - WithTracesSink(component.NewIDWithName(component.DataTypeTraces, "1"), &sink1), - ) - - require.Equal(t, 0, sink0.SpanCount()) - require.Equal(t, 0, sink1.SpanCount()) - - td := testdata.GenerateTraces(1) - err := tr.(consumer.Traces).ConsumeTraces(context.Background(), td) - - require.NoError(t, err) - require.Equal(t, 1, sink0.SpanCount()) - require.Equal(t, 1, sink1.SpanCount()) -} - -func TestMetricsRouterWithNop(t *testing.T) { - mr := NewMetricsRouter( - WithNopMetrics(component.NewIDWithName(component.DataTypeMetrics, "0")), - WithNopMetrics(component.NewIDWithName(component.DataTypeMetrics, "1")), - ) - - md := testdata.GenerateMetrics(1) - err := mr.(consumer.Metrics).ConsumeMetrics(context.Background(), md) - - require.NoError(t, err) -} - -func TestMetricsRouterWithSink(t *testing.T) { - var sink0, sink1 consumertest.MetricsSink - - mr := NewMetricsRouter( - WithMetricsSink(component.NewIDWithName(component.DataTypeMetrics, "0"), &sink0), - WithMetricsSink(component.NewIDWithName(component.DataTypeMetrics, "1"), &sink1), - ) - - require.Len(t, sink0.AllMetrics(), 0) - require.Len(t, sink1.AllMetrics(), 0) - - md := testdata.GenerateMetrics(1) - err := mr.(consumer.Metrics).ConsumeMetrics(context.Background(), md) - - require.NoError(t, err) - require.Len(t, sink0.AllMetrics(), 1) - require.Len(t, sink1.AllMetrics(), 1) -} - -func TestLogsRouterWithNop(t *testing.T) { - lr := NewLogsRouter( - WithNopLogs(component.NewIDWithName(component.DataTypeLogs, "0")), - WithNopLogs(component.NewIDWithName(component.DataTypeLogs, "1")), - ) - - ld := testdata.GenerateLogs(1) - err := lr.(consumer.Logs).ConsumeLogs(context.Background(), ld) - - require.NoError(t, err) -} - -func TestLogsRouterWithSink(t *testing.T) { - var sink0, sink1 consumertest.LogsSink - - lr := NewLogsRouter( - WithLogsSink(component.NewIDWithName(component.DataTypeLogs, "0"), &sink0), - WithLogsSink(component.NewIDWithName(component.DataTypeLogs, "1"), &sink1), - ) - - require.Equal(t, 0, sink0.LogRecordCount()) - require.Equal(t, 0, sink1.LogRecordCount()) - - ld := testdata.GenerateLogs(1) - err := lr.(consumer.Logs).ConsumeLogs(context.Background(), ld) - - require.NoError(t, err) - require.Equal(t, 1, sink0.LogRecordCount()) - require.Equal(t, 1, sink1.LogRecordCount()) -} diff --git a/connector/forwardconnector/README.md b/connector/forwardconnector/README.md index ffe666e76e6..fad3289c1e2 100644 --- a/connector/forwardconnector/README.md +++ b/connector/forwardconnector/README.md @@ -1,20 +1,29 @@ # Forward Connector -| Status | | -|------------------------- |---------------------------------------------------------- | -| Stability | [beta] | -| Supported pipeline types | See [Supported Pipeline Types](#supported-pipeline-types) | -| Distributions | [core, contrib] | + +| Status | | +| ------------- |-----------| +| Distributions | [core], [contrib] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aconnector%2Fforward%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aconnector%2Fforward) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aconnector%2Fforward%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aconnector%2Fforward) | -The `forward` connector can merge or fork pipelines of the same type. +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib ## Supported Pipeline Types -| [Exporter Pipeline Type] | [Receiver Pipeline Type] | -| ------------------------ | ------------------------ | -| traces | traces | -| metrics | metrics | -| logs | logs | +| [Exporter Pipeline Type] | [Receiver Pipeline Type] | [Stability Level] | +| ------------------------ | ------------------------ | ----------------- | +| traces | traces | [beta] | +| metrics | metrics | [beta] | +| logs | logs | [beta] | + +[Exporter Pipeline Type]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/connector/README.md#exporter-pipeline-type +[Receiver Pipeline Type]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/connector/README.md#receiver-pipeline-type +[Stability Level]: https://github.com/open-telemetry/opentelemetry-collector#stability-levels + + +The `forward` connector can merge or fork pipelines of the same type. ## Configuration @@ -122,9 +131,4 @@ service: # exporters: [logging] ``` -[beta]:https://github.com/open-telemetry/opentelemetry-collector#beta -[core]:https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol -[contrib]:https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[Connectors README]:https://github.com/open-telemetry/opentelemetry-collector/blob/main/connector/README.md -[Exporter Pipeline Type]:https://github.com/open-telemetry/opentelemetry-collector/blob/main/connector/README.md#exporter-pipeline-type -[Receiver Pipeline Type]:https://github.com/open-telemetry/opentelemetry-collector/blob/main/connector/README.md#receiver-pipeline-type +[Connectors README]:../README.md diff --git a/connector/forwardconnector/doc.go b/connector/forwardconnector/doc.go index 656e06d94bd..04c6ee06bdc 100644 --- a/connector/forwardconnector/doc.go +++ b/connector/forwardconnector/doc.go @@ -1,5 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +//go:generate mdatagen metadata.yaml + // Package forwardconnector passes signals from one pipeline to another. package forwardconnector // import "go.opentelemetry.io/collector/connector/forwardconnector" diff --git a/connector/forwardconnector/forward.go b/connector/forwardconnector/forward.go index 21ef6a15a94..a34cd15bd09 100644 --- a/connector/forwardconnector/forward.go +++ b/connector/forwardconnector/forward.go @@ -8,27 +8,26 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/connector/forwardconnector/internal/metadata" "go.opentelemetry.io/collector/consumer" ) -const ( - typeStr = "forward" -) - // NewFactory returns a connector.Factory. func NewFactory() connector.Factory { return connector.NewFactory( - typeStr, + metadata.Type, createDefaultConfig, - connector.WithTracesToTraces(createTracesToTraces, component.StabilityLevelBeta), - connector.WithMetricsToMetrics(createMetricsToMetrics, component.StabilityLevelBeta), - connector.WithLogsToLogs(createLogsToLogs, component.StabilityLevelBeta), + connector.WithTracesToTraces(createTracesToTraces, metadata.TracesToTracesStability), + connector.WithMetricsToMetrics(createMetricsToMetrics, metadata.MetricsToMetricsStability), + connector.WithLogsToLogs(createLogsToLogs, metadata.LogsToLogsStability), ) } +type Config struct{} + // createDefaultConfig creates the default configuration. func createDefaultConfig() component.Config { - return &struct{}{} + return &Config{} } // createTracesToTraces creates a trace receiver based on provided config. diff --git a/connector/forwardconnector/forward_test.go b/connector/forwardconnector/forward_test.go index 3783a1f59a0..3ce18c4f530 100644 --- a/connector/forwardconnector/forward_test.go +++ b/connector/forwardconnector/forward_test.go @@ -19,7 +19,7 @@ import ( func TestForward(t *testing.T) { f := NewFactory() cfg := f.CreateDefaultConfig() - assert.Equal(t, &struct{}{}, cfg) + assert.Equal(t, &Config{}, cfg) ctx := context.Background() set := connectortest.NewNopCreateSettings() diff --git a/connector/forwardconnector/go.mod b/connector/forwardconnector/go.mod index 08087bfc876..656652fbfe1 100644 --- a/connector/forwardconnector/go.mod +++ b/connector/forwardconnector/go.mod @@ -1,44 +1,55 @@ module go.opentelemetry.io/collector/connector/forwardconnector -go 1.20 +go 1.21 require ( github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.85.0 - go.opentelemetry.io/collector/connector v0.85.0 - go.opentelemetry.io/collector/consumer v0.85.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0014 + go.opentelemetry.io/collector/component v0.96.0 + go.opentelemetry.io/collector/connector v0.96.0 + go.opentelemetry.io/collector/consumer v0.96.0 + go.opentelemetry.io/collector/pdata v1.3.0 + go.opentelemetry.io/otel/metric v1.24.0 + go.opentelemetry.io/otel/trace v1.24.0 + go.uber.org/goleak v1.3.0 ) require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.0.1 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector v0.85.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.85.0 // indirect - go.opentelemetry.io/collector/confmap v0.85.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0014 // indirect - go.opentelemetry.io/otel v1.18.0 // indirect - go.opentelemetry.io/otel/metric v1.18.0 // indirect - go.opentelemetry.io/otel/trace v1.18.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.96.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect + go.opentelemetry.io/collector/confmap v0.96.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/grpc v1.58.1 // indirect - google.golang.org/protobuf v1.31.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -48,20 +59,8 @@ replace go.opentelemetry.io/collector/component => ../../component replace go.opentelemetry.io/collector/connector => ../ -replace go.opentelemetry.io/collector/exporter => ../../exporter - -replace go.opentelemetry.io/collector/extension => ../../extension - replace go.opentelemetry.io/collector/pdata => ../../pdata -replace go.opentelemetry.io/collector/processor => ../../processor - -replace go.opentelemetry.io/collector/receiver => ../../receiver - -replace go.opentelemetry.io/collector/semconv => ../../semconv - -replace go.opentelemetry.io/collector/extension/zpagesextension => ../../extension/zpagesextension - replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/consumer => ../../consumer @@ -73,8 +72,4 @@ retract ( v0.69.0 // Release failed, use v0.69.1 ) -replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet - replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry - -replace go.opentelemetry.io/collector/service => ../../service diff --git a/connector/forwardconnector/go.sum b/connector/forwardconnector/go.sum index 4b853ef5c40..06616cda85d 100644 --- a/connector/forwardconnector/go.sum +++ b/connector/forwardconnector/go.sum @@ -1,15 +1,25 @@ +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= @@ -19,14 +29,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= -github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -36,24 +46,40 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= -go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= -go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= -go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= -go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -63,20 +89,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -85,15 +111,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= -google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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/connector/forwardconnector/internal/metadata/generated_status.go b/connector/forwardconnector/internal/metadata/generated_status.go new file mode 100644 index 00000000000..201502cd3e2 --- /dev/null +++ b/connector/forwardconnector/internal/metadata/generated_status.go @@ -0,0 +1,29 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" +) + +var ( + Type = component.MustNewType("forward") + scopeName = "go.opentelemetry.io/collector/connector/forwardconnector" +) + +const ( + TracesToTracesStability = component.StabilityLevelBeta + MetricsToMetricsStability = component.StabilityLevelBeta + LogsToLogsStability = component.StabilityLevelBeta +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter(scopeName) +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer(scopeName) +} diff --git a/connector/forwardconnector/metadata.yaml b/connector/forwardconnector/metadata.yaml new file mode 100644 index 00000000000..41fc2707019 --- /dev/null +++ b/connector/forwardconnector/metadata.yaml @@ -0,0 +1,7 @@ +type: forward + +status: + class: connector + stability: + beta: [traces_to_traces, metrics_to_metrics, logs_to_logs] + distributions: [core, contrib] diff --git a/connector/forwardconnector/package_test.go b/connector/forwardconnector/package_test.go new file mode 100644 index 00000000000..54cc0fd73ce --- /dev/null +++ b/connector/forwardconnector/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package forwardconnector + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/connector/go.mod b/connector/go.mod index 7d24c5e397b..3e1b6496f98 100644 --- a/connector/go.mod +++ b/connector/go.mod @@ -1,43 +1,54 @@ module go.opentelemetry.io/collector/connector -go 1.20 +go 1.21 require ( github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.85.0 - go.opentelemetry.io/collector/component v0.85.0 - go.opentelemetry.io/collector/consumer v0.85.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0014 - go.uber.org/zap v1.26.0 + go.opentelemetry.io/collector v0.96.0 + go.opentelemetry.io/collector/component v0.96.0 + go.opentelemetry.io/collector/consumer v0.96.0 + go.opentelemetry.io/collector/pdata v1.3.0 + go.uber.org/goleak v1.3.0 + go.uber.org/multierr v1.11.0 + go.uber.org/zap v1.27.0 ) require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.0.1 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.85.0 // indirect - go.opentelemetry.io/collector/confmap v0.85.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0014 // indirect - go.opentelemetry.io/otel v1.18.0 // indirect - go.opentelemetry.io/otel/metric v1.18.0 // indirect - go.opentelemetry.io/otel/trace v1.18.0 // indirect - go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/grpc v1.58.1 // indirect - google.golang.org/protobuf v1.31.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect + go.opentelemetry.io/collector/confmap v0.96.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -51,22 +62,6 @@ replace go.opentelemetry.io/collector/confmap => ../confmap replace go.opentelemetry.io/collector/consumer => ../consumer -replace go.opentelemetry.io/collector/extension => ../extension - -replace go.opentelemetry.io/collector/extension/zpagesextension => ../extension/zpagesextension - replace go.opentelemetry.io/collector/featuregate => ../featuregate replace go.opentelemetry.io/collector/pdata => ../pdata - -replace go.opentelemetry.io/collector/processor => ../processor - -replace go.opentelemetry.io/collector/receiver => ../receiver - -replace go.opentelemetry.io/collector/semconv => ../semconv - -replace go.opentelemetry.io/collector/exporter => ../exporter - -replace go.opentelemetry.io/collector/config/confignet => ../config/confignet - -replace go.opentelemetry.io/collector/service => ../service diff --git a/connector/go.sum b/connector/go.sum index 4b853ef5c40..06616cda85d 100644 --- a/connector/go.sum +++ b/connector/go.sum @@ -1,15 +1,25 @@ +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= @@ -19,14 +29,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= -github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -36,24 +46,40 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= -go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= -go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= -go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= -go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -63,20 +89,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -85,15 +111,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= -google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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/connector/logs_router.go b/connector/logs_router.go new file mode 100644 index 00000000000..e5594327ffc --- /dev/null +++ b/connector/logs_router.go @@ -0,0 +1,75 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package connector // import "go.opentelemetry.io/collector/connector" + +import ( + "fmt" + + "go.uber.org/multierr" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/internal/fanoutconsumer" +) + +// Deprecated: [v0.92.0] use LogsRouterAndConsumer +type LogsRouter interface { + Consumer(...component.ID) (consumer.Logs, error) + PipelineIDs() []component.ID +} + +// LogsRouterAndConsumer feeds the first consumer.Logs in each of the specified pipelines. +type LogsRouterAndConsumer interface { + consumer.Logs + Consumer(...component.ID) (consumer.Logs, error) + PipelineIDs() []component.ID + privateFunc() +} + +type logsRouter struct { + consumer.Logs + consumers map[component.ID]consumer.Logs +} + +func NewLogsRouter(cm map[component.ID]consumer.Logs) LogsRouterAndConsumer { + consumers := make([]consumer.Logs, 0, len(cm)) + for _, consumer := range cm { + consumers = append(consumers, consumer) + } + return &logsRouter{ + Logs: fanoutconsumer.NewLogs(consumers), + consumers: cm, + } +} + +func (r *logsRouter) PipelineIDs() []component.ID { + ids := make([]component.ID, 0, len(r.consumers)) + for id := range r.consumers { + ids = append(ids, id) + } + return ids +} + +func (r *logsRouter) Consumer(pipelineIDs ...component.ID) (consumer.Logs, error) { + if len(pipelineIDs) == 0 { + return nil, fmt.Errorf("missing consumers") + } + consumers := make([]consumer.Logs, 0, len(pipelineIDs)) + var errors error + for _, pipelineID := range pipelineIDs { + c, ok := r.consumers[pipelineID] + if ok { + consumers = append(consumers, c) + } else { + errors = multierr.Append(errors, fmt.Errorf("missing consumer: %q", pipelineID)) + } + } + if errors != nil { + // TODO potentially this could return a NewLogs with the valid consumers + return nil, errors + } + return fanoutconsumer.NewLogs(consumers), nil +} + +func (r *logsRouter) privateFunc() {} diff --git a/connector/logs_router_test.go b/connector/logs_router_test.go new file mode 100644 index 00000000000..accce0a03cd --- /dev/null +++ b/connector/logs_router_test.go @@ -0,0 +1,156 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package connector + +import ( + "context" + "fmt" + "strconv" + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/internal/testdata" + "go.opentelemetry.io/collector/pdata/plog" +) + +type mutatingLogsSink struct { + *consumertest.LogsSink +} + +func (mts *mutatingLogsSink) Capabilities() consumer.Capabilities { + return consumer.Capabilities{MutatesData: true} +} + +func TestLogsRouterMultiplexing(t *testing.T) { + var max = 20 + for numIDs := 1; numIDs < max; numIDs++ { + for numCons := 1; numCons < max; numCons++ { + for numLogs := 1; numLogs < max; numLogs++ { + t.Run( + fmt.Sprintf("%d-ids/%d-cons/%d-logs", numIDs, numCons, numLogs), + fuzzLogs(numIDs, numCons, numLogs), + ) + } + } + } +} + +func fuzzLogs(numIDs, numCons, numLogs int) func(*testing.T) { + return func(t *testing.T) { + allIDs := make([]component.ID, 0, numCons) + allCons := make([]consumer.Logs, 0, numCons) + allConsMap := make(map[component.ID]consumer.Logs) + + // If any consumer is mutating, the router must report mutating + for i := 0; i < numCons; i++ { + allIDs = append(allIDs, component.MustNewIDWithName("sink", strconv.Itoa(numCons))) + // Random chance for each consumer to be mutating + if (numCons+numLogs+i)%4 == 0 { + allCons = append(allCons, &mutatingLogsSink{LogsSink: new(consumertest.LogsSink)}) + } else { + allCons = append(allCons, new(consumertest.LogsSink)) + } + allConsMap[allIDs[i]] = allCons[i] + } + + r := NewLogsRouter(allConsMap) + ld := testdata.GenerateLogs(1) + + // Keep track of how many logs each consumer should receive. + // This will be validated after every call to RouteLogs. + expected := make(map[component.ID]int, numCons) + + for i := 0; i < numLogs; i++ { + // Build a random set of ids (no duplicates) + randCons := make(map[component.ID]bool, numIDs) + for j := 0; j < numIDs; j++ { + // This number should be pretty random and less than numCons + conNum := (numCons + numIDs + i + j) % numCons + randCons[allIDs[conNum]] = true + } + + // Convert to slice, update expectations + conIDs := make([]component.ID, 0, len(randCons)) + for id := range randCons { + conIDs = append(conIDs, id) + expected[id]++ + } + + // Route to list of consumers + fanout, err := r.Consumer(conIDs...) + assert.NoError(t, err) + assert.NoError(t, fanout.ConsumeLogs(context.Background(), ld)) + + // Validate expectations for all consumers + for id := range expected { + logs := []plog.Logs{} + switch con := allConsMap[id].(type) { + case *consumertest.LogsSink: + logs = con.AllLogs() + case *mutatingLogsSink: + logs = con.AllLogs() + } + assert.Len(t, logs, expected[id]) + for n := 0; n < len(logs); n++ { + assert.EqualValues(t, ld, logs[n]) + } + } + } + } +} + +func TestLogsRouterConsumers(t *testing.T) { + ctx := context.Background() + ld := testdata.GenerateLogs(1) + + fooID := component.MustNewID("foo") + barID := component.MustNewID("bar") + + foo := new(consumertest.LogsSink) + bar := new(consumertest.LogsSink) + r := NewLogsRouter(map[component.ID]consumer.Logs{fooID: foo, barID: bar}) + + rcs := r.PipelineIDs() + assert.Len(t, rcs, 2) + assert.ElementsMatch(t, []component.ID{fooID, barID}, rcs) + + assert.Len(t, foo.AllLogs(), 0) + assert.Len(t, bar.AllLogs(), 0) + + both, err := r.Consumer(fooID, barID) + assert.NotNil(t, both) + assert.NoError(t, err) + + assert.NoError(t, both.ConsumeLogs(ctx, ld)) + assert.Len(t, foo.AllLogs(), 1) + assert.Len(t, bar.AllLogs(), 1) + + fooOnly, err := r.Consumer(fooID) + assert.NotNil(t, fooOnly) + assert.NoError(t, err) + + assert.NoError(t, fooOnly.ConsumeLogs(ctx, ld)) + assert.Len(t, foo.AllLogs(), 2) + assert.Len(t, bar.AllLogs(), 1) + + barOnly, err := r.Consumer(barID) + assert.NotNil(t, barOnly) + assert.NoError(t, err) + + assert.NoError(t, barOnly.ConsumeLogs(ctx, ld)) + assert.Len(t, foo.AllLogs(), 2) + assert.Len(t, bar.AllLogs(), 2) + + none, err := r.Consumer() + assert.Nil(t, none) + assert.Error(t, err) + + fake, err := r.Consumer(component.MustNewID("fake")) + assert.Nil(t, fake) + assert.Error(t, err) +} diff --git a/connector/metrics_router.go b/connector/metrics_router.go new file mode 100644 index 00000000000..8e2b8e900a1 --- /dev/null +++ b/connector/metrics_router.go @@ -0,0 +1,75 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package connector // import "go.opentelemetry.io/collector/connector" + +import ( + "fmt" + + "go.uber.org/multierr" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/internal/fanoutconsumer" +) + +// Deprecated: [v0.92.0] use MetricsRouterAndConsumer. +type MetricsRouter interface { + Consumer(...component.ID) (consumer.Metrics, error) + PipelineIDs() []component.ID +} + +// MetricsRouterAndConsumer feeds the first consumer.Metrics in each of the specified pipelines. +type MetricsRouterAndConsumer interface { + consumer.Metrics + Consumer(...component.ID) (consumer.Metrics, error) + PipelineIDs() []component.ID + privateFunc() +} + +type metricsRouter struct { + consumer.Metrics + consumers map[component.ID]consumer.Metrics +} + +func NewMetricsRouter(cm map[component.ID]consumer.Metrics) MetricsRouterAndConsumer { + consumers := make([]consumer.Metrics, 0, len(cm)) + for _, cons := range cm { + consumers = append(consumers, cons) + } + return &metricsRouter{ + Metrics: fanoutconsumer.NewMetrics(consumers), + consumers: cm, + } +} + +func (r *metricsRouter) PipelineIDs() []component.ID { + ids := make([]component.ID, 0, len(r.consumers)) + for id := range r.consumers { + ids = append(ids, id) + } + return ids +} + +func (r *metricsRouter) Consumer(pipelineIDs ...component.ID) (consumer.Metrics, error) { + if len(pipelineIDs) == 0 { + return nil, fmt.Errorf("missing consumers") + } + consumers := make([]consumer.Metrics, 0, len(pipelineIDs)) + var errors error + for _, pipelineID := range pipelineIDs { + c, ok := r.consumers[pipelineID] + if ok { + consumers = append(consumers, c) + } else { + errors = multierr.Append(errors, fmt.Errorf("missing consumer: %q", pipelineID)) + } + } + if errors != nil { + // TODO potentially this could return a NewMetrics with the valid consumers + return nil, errors + } + return fanoutconsumer.NewMetrics(consumers), nil +} + +func (r *metricsRouter) privateFunc() {} diff --git a/connector/metrics_router_test.go b/connector/metrics_router_test.go new file mode 100644 index 00000000000..62dd54c11e0 --- /dev/null +++ b/connector/metrics_router_test.go @@ -0,0 +1,156 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package connector + +import ( + "context" + "fmt" + "strconv" + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/internal/testdata" + "go.opentelemetry.io/collector/pdata/pmetric" +) + +type mutatingMetricsSink struct { + *consumertest.MetricsSink +} + +func (mts *mutatingMetricsSink) Capabilities() consumer.Capabilities { + return consumer.Capabilities{MutatesData: true} +} + +func TestMetricsRouterMultiplexing(t *testing.T) { + var max = 20 + for numIDs := 1; numIDs < max; numIDs++ { + for numCons := 1; numCons < max; numCons++ { + for numMetrics := 1; numMetrics < max; numMetrics++ { + t.Run( + fmt.Sprintf("%d-ids/%d-cons/%d-logs", numIDs, numCons, numMetrics), + fuzzMetrics(numIDs, numCons, numMetrics), + ) + } + } + } +} + +func fuzzMetrics(numIDs, numCons, numMetrics int) func(*testing.T) { + return func(t *testing.T) { + allIDs := make([]component.ID, 0, numCons) + allCons := make([]consumer.Metrics, 0, numCons) + allConsMap := make(map[component.ID]consumer.Metrics) + + // If any consumer is mutating, the router must report mutating + for i := 0; i < numCons; i++ { + allIDs = append(allIDs, component.MustNewIDWithName("sink", strconv.Itoa(numCons))) + // Random chance for each consumer to be mutating + if (numCons+numMetrics+i)%4 == 0 { + allCons = append(allCons, &mutatingMetricsSink{MetricsSink: new(consumertest.MetricsSink)}) + } else { + allCons = append(allCons, new(consumertest.MetricsSink)) + } + allConsMap[allIDs[i]] = allCons[i] + } + + r := NewMetricsRouter(allConsMap) + md := testdata.GenerateMetrics(1) + + // Keep track of how many logs each consumer should receive. + // This will be validated after every call to RouteMetrics. + expected := make(map[component.ID]int, numCons) + + for i := 0; i < numMetrics; i++ { + // Build a random set of ids (no duplicates) + randCons := make(map[component.ID]bool, numIDs) + for j := 0; j < numIDs; j++ { + // This number should be pretty random and less than numCons + conNum := (numCons + numIDs + i + j) % numCons + randCons[allIDs[conNum]] = true + } + + // Convert to slice, update expectations + conIDs := make([]component.ID, 0, len(randCons)) + for id := range randCons { + conIDs = append(conIDs, id) + expected[id]++ + } + + // Route to list of consumers + fanout, err := r.Consumer(conIDs...) + assert.NoError(t, err) + assert.NoError(t, fanout.ConsumeMetrics(context.Background(), md)) + + // Validate expectations for all consumers + for id := range expected { + metrics := []pmetric.Metrics{} + switch con := allConsMap[id].(type) { + case *consumertest.MetricsSink: + metrics = con.AllMetrics() + case *mutatingMetricsSink: + metrics = con.AllMetrics() + } + assert.Len(t, metrics, expected[id]) + for n := 0; n < len(metrics); n++ { + assert.EqualValues(t, md, metrics[n]) + } + } + } + } +} + +func TestMetricsRouterConsumers(t *testing.T) { + ctx := context.Background() + md := testdata.GenerateMetrics(1) + + fooID := component.MustNewID("foo") + barID := component.MustNewID("bar") + + foo := new(consumertest.MetricsSink) + bar := new(consumertest.MetricsSink) + r := NewMetricsRouter(map[component.ID]consumer.Metrics{fooID: foo, barID: bar}) + + rcs := r.PipelineIDs() + assert.Len(t, rcs, 2) + assert.ElementsMatch(t, []component.ID{fooID, barID}, rcs) + + assert.Len(t, foo.AllMetrics(), 0) + assert.Len(t, bar.AllMetrics(), 0) + + both, err := r.Consumer(fooID, barID) + assert.NotNil(t, both) + assert.NoError(t, err) + + assert.NoError(t, both.ConsumeMetrics(ctx, md)) + assert.Len(t, foo.AllMetrics(), 1) + assert.Len(t, bar.AllMetrics(), 1) + + fooOnly, err := r.Consumer(fooID) + assert.NotNil(t, fooOnly) + assert.NoError(t, err) + + assert.NoError(t, fooOnly.ConsumeMetrics(ctx, md)) + assert.Len(t, foo.AllMetrics(), 2) + assert.Len(t, bar.AllMetrics(), 1) + + barOnly, err := r.Consumer(barID) + assert.NotNil(t, barOnly) + assert.NoError(t, err) + + assert.NoError(t, barOnly.ConsumeMetrics(ctx, md)) + assert.Len(t, foo.AllMetrics(), 2) + assert.Len(t, bar.AllMetrics(), 2) + + none, err := r.Consumer() + assert.Nil(t, none) + assert.Error(t, err) + + fake, err := r.Consumer(component.MustNewID("fake")) + assert.Nil(t, fake) + assert.Error(t, err) +} diff --git a/connector/package_test.go b/connector/package_test.go new file mode 100644 index 00000000000..01379e8ae20 --- /dev/null +++ b/connector/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package connector + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/connector/traces_router.go b/connector/traces_router.go new file mode 100644 index 00000000000..97c31d7920c --- /dev/null +++ b/connector/traces_router.go @@ -0,0 +1,75 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package connector // import "go.opentelemetry.io/collector/connector" + +import ( + "fmt" + + "go.uber.org/multierr" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/internal/fanoutconsumer" +) + +// Deprecated: [v0.92.0] use TracesRouterAndConsumer +type TracesRouter interface { + Consumer(...component.ID) (consumer.Traces, error) + PipelineIDs() []component.ID +} + +// TracesRouterAndConsumer feeds the first consumer.Traces in each of the specified pipelines. +type TracesRouterAndConsumer interface { + consumer.Traces + Consumer(...component.ID) (consumer.Traces, error) + PipelineIDs() []component.ID + privateFunc() +} + +type tracesRouter struct { + consumer.Traces + consumers map[component.ID]consumer.Traces +} + +func NewTracesRouter(cm map[component.ID]consumer.Traces) TracesRouterAndConsumer { + consumers := make([]consumer.Traces, 0, len(cm)) + for _, c := range cm { + consumers = append(consumers, c) + } + return &tracesRouter{ + Traces: fanoutconsumer.NewTraces(consumers), + consumers: cm, + } +} + +func (r *tracesRouter) PipelineIDs() []component.ID { + ids := make([]component.ID, 0, len(r.consumers)) + for id := range r.consumers { + ids = append(ids, id) + } + return ids +} + +func (r *tracesRouter) Consumer(pipelineIDs ...component.ID) (consumer.Traces, error) { + if len(pipelineIDs) == 0 { + return nil, fmt.Errorf("missing consumers") + } + consumers := make([]consumer.Traces, 0, len(pipelineIDs)) + var errors error + for _, pipelineID := range pipelineIDs { + c, ok := r.consumers[pipelineID] + if ok { + consumers = append(consumers, c) + } else { + errors = multierr.Append(errors, fmt.Errorf("missing consumer: %q", pipelineID)) + } + } + if errors != nil { + // TODO potentially this could return a NewTraces with the valid consumers + return nil, errors + } + return fanoutconsumer.NewTraces(consumers), nil +} + +func (r *tracesRouter) privateFunc() {} diff --git a/connector/traces_router_test.go b/connector/traces_router_test.go new file mode 100644 index 00000000000..33a2124ed3e --- /dev/null +++ b/connector/traces_router_test.go @@ -0,0 +1,156 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package connector + +import ( + "context" + "fmt" + "strconv" + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/internal/testdata" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +type mutatingTracesSink struct { + *consumertest.TracesSink +} + +func (mts *mutatingTracesSink) Capabilities() consumer.Capabilities { + return consumer.Capabilities{MutatesData: true} +} + +func TestTracesRouterMultiplexing(t *testing.T) { + var max = 20 + for numIDs := 1; numIDs < max; numIDs++ { + for numCons := 1; numCons < max; numCons++ { + for numTraces := 1; numTraces < max; numTraces++ { + t.Run( + fmt.Sprintf("%d-ids/%d-cons/%d-logs", numIDs, numCons, numTraces), + fuzzTraces(numIDs, numCons, numTraces), + ) + } + } + } +} + +func fuzzTraces(numIDs, numCons, numTraces int) func(*testing.T) { + return func(t *testing.T) { + allIDs := make([]component.ID, 0, numCons) + allCons := make([]consumer.Traces, 0, numCons) + allConsMap := make(map[component.ID]consumer.Traces) + + // If any consumer is mutating, the router must report mutating + for i := 0; i < numCons; i++ { + allIDs = append(allIDs, component.MustNewIDWithName("sink", strconv.Itoa(numCons))) + // Random chance for each consumer to be mutating + if (numCons+numTraces+i)%4 == 0 { + allCons = append(allCons, &mutatingTracesSink{TracesSink: new(consumertest.TracesSink)}) + } else { + allCons = append(allCons, new(consumertest.TracesSink)) + } + allConsMap[allIDs[i]] = allCons[i] + } + + r := NewTracesRouter(allConsMap) + td := testdata.GenerateTraces(1) + + // Keep track of how many logs each consumer should receive. + // This will be validated after every call to RouteTraces. + expected := make(map[component.ID]int, numCons) + + for i := 0; i < numTraces; i++ { + // Build a random set of ids (no duplicates) + randCons := make(map[component.ID]bool, numIDs) + for j := 0; j < numIDs; j++ { + // This number should be pretty random and less than numCons + conNum := (numCons + numIDs + i + j) % numCons + randCons[allIDs[conNum]] = true + } + + // Convert to slice, update expectations + conIDs := make([]component.ID, 0, len(randCons)) + for id := range randCons { + conIDs = append(conIDs, id) + expected[id]++ + } + + // Route to list of consumers + fanout, err := r.Consumer(conIDs...) + assert.NoError(t, err) + assert.NoError(t, fanout.ConsumeTraces(context.Background(), td)) + + // Validate expectations for all consumers + for id := range expected { + traces := []ptrace.Traces{} + switch con := allConsMap[id].(type) { + case *consumertest.TracesSink: + traces = con.AllTraces() + case *mutatingTracesSink: + traces = con.AllTraces() + } + assert.Len(t, traces, expected[id]) + for n := 0; n < len(traces); n++ { + assert.EqualValues(t, td, traces[n]) + } + } + } + } +} + +func TestTracesRouterConsumer(t *testing.T) { + ctx := context.Background() + td := testdata.GenerateTraces(1) + + fooID := component.MustNewID("foo") + barID := component.MustNewID("bar") + + foo := new(consumertest.TracesSink) + bar := new(consumertest.TracesSink) + r := NewTracesRouter(map[component.ID]consumer.Traces{fooID: foo, barID: bar}) + + rcs := r.PipelineIDs() + assert.Len(t, rcs, 2) + assert.ElementsMatch(t, []component.ID{fooID, barID}, rcs) + + assert.Len(t, foo.AllTraces(), 0) + assert.Len(t, bar.AllTraces(), 0) + + both, err := r.Consumer(fooID, barID) + assert.NotNil(t, both) + assert.NoError(t, err) + + assert.NoError(t, both.ConsumeTraces(ctx, td)) + assert.Len(t, foo.AllTraces(), 1) + assert.Len(t, bar.AllTraces(), 1) + + fooOnly, err := r.Consumer(fooID) + assert.NotNil(t, fooOnly) + assert.NoError(t, err) + + assert.NoError(t, fooOnly.ConsumeTraces(ctx, td)) + assert.Len(t, foo.AllTraces(), 2) + assert.Len(t, bar.AllTraces(), 1) + + barOnly, err := r.Consumer(barID) + assert.NotNil(t, barOnly) + assert.NoError(t, err) + + assert.NoError(t, barOnly.ConsumeTraces(ctx, td)) + assert.Len(t, foo.AllTraces(), 2) + assert.Len(t, bar.AllTraces(), 2) + + none, err := r.Consumer() + assert.Nil(t, none) + assert.Error(t, err) + + fake, err := r.Consumer(component.MustNewID("fake")) + assert.Nil(t, fake) + assert.Error(t, err) +} diff --git a/consumer/consumer.go b/consumer/consumer.go index 37a9baba4f5..503750ad7cb 100644 --- a/consumer/consumer.go +++ b/consumer/consumer.go @@ -10,7 +10,7 @@ import ( // Capabilities describes the capabilities of a Processor. type Capabilities struct { // MutatesData is set to true if Consume* function of the - // processor modifies the input TraceData or MetricsData argument. + // processor modifies the input Traces, Logs or Metrics argument. // Processors which modify the input data MUST set this flag to true. If the processor // does not modify the data it MUST set this flag to false. If the processor creates // a copy of the data before modifying then this flag can be safely set to false. @@ -38,7 +38,7 @@ func WithCapabilities(capabilities Capabilities) Option { } } -// Capabilities implementation of the base +// Capabilities returns the capabilities of the component func (bs baseImpl) Capabilities() Capabilities { return bs.capabilities } diff --git a/consumer/consumererror/package_test.go b/consumer/consumererror/package_test.go new file mode 100644 index 00000000000..3e9fdb39d01 --- /dev/null +++ b/consumer/consumererror/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package consumererror + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/consumer/consumertest/err.go b/consumer/consumertest/err.go index 279cf4baf29..d147453aaf7 100644 --- a/consumer/consumertest/err.go +++ b/consumer/consumertest/err.go @@ -13,8 +13,8 @@ import ( // NewErr returns a Consumer that just drops all received data and returns the specified error to Consume* callers. func NewErr(err error) Consumer { return &baseConsumer{ - ConsumeTracesFunc: func(ctx context.Context, td ptrace.Traces) error { return err }, - ConsumeMetricsFunc: func(ctx context.Context, md pmetric.Metrics) error { return err }, - ConsumeLogsFunc: func(ctx context.Context, ld plog.Logs) error { return err }, + ConsumeTracesFunc: func(context.Context, ptrace.Traces) error { return err }, + ConsumeMetricsFunc: func(context.Context, pmetric.Metrics) error { return err }, + ConsumeLogsFunc: func(context.Context, plog.Logs) error { return err }, } } diff --git a/consumer/consumertest/nop.go b/consumer/consumertest/nop.go index 157d0e4b3b2..fbb01e3bb98 100644 --- a/consumer/consumertest/nop.go +++ b/consumer/consumertest/nop.go @@ -14,8 +14,8 @@ import ( // NewNop returns a Consumer that just drops all received data and returns no error. func NewNop() Consumer { return &baseConsumer{ - ConsumeTracesFunc: func(ctx context.Context, td ptrace.Traces) error { return nil }, - ConsumeMetricsFunc: func(ctx context.Context, md pmetric.Metrics) error { return nil }, - ConsumeLogsFunc: func(ctx context.Context, ld plog.Logs) error { return nil }, + ConsumeTracesFunc: func(context.Context, ptrace.Traces) error { return nil }, + ConsumeMetricsFunc: func(context.Context, pmetric.Metrics) error { return nil }, + ConsumeLogsFunc: func(context.Context, plog.Logs) error { return nil }, } } diff --git a/consumer/consumertest/package_test.go b/consumer/consumertest/package_test.go new file mode 100644 index 00000000000..955ff17fa52 --- /dev/null +++ b/consumer/consumertest/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package consumertest + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/consumer/doc.go b/consumer/doc.go index 9f5bac07b88..b2ea0535b79 100644 --- a/consumer/doc.go +++ b/consumer/doc.go @@ -1,5 +1,5 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Package consumer contains interfaces that receive and process consumerdata. +// Package consumer contains interfaces that receive and process data. package consumer // import "go.opentelemetry.io/collector/consumer" diff --git a/consumer/go.mod b/consumer/go.mod index 72cb49e1d3b..a0d4cd6f95f 100644 --- a/consumer/go.mod +++ b/consumer/go.mod @@ -1,11 +1,12 @@ module go.opentelemetry.io/collector/consumer -go 1.20 +go 1.21 require ( github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.85.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0014 + go.opentelemetry.io/collector v0.96.0 + go.opentelemetry.io/collector/pdata v1.3.0 + go.uber.org/goleak v1.3.0 ) require ( @@ -18,12 +19,12 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/grpc v1.58.1 // indirect - google.golang.org/protobuf v1.31.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -33,31 +34,13 @@ replace go.opentelemetry.io/collector/component => ../component replace go.opentelemetry.io/collector/confmap => ../confmap -replace go.opentelemetry.io/collector/exporter => ../exporter - -replace go.opentelemetry.io/collector/extension => ../extension - -replace go.opentelemetry.io/collector/extension/zpagesextension => ../extension/zpagesextension - replace go.opentelemetry.io/collector/featuregate => ../featuregate replace go.opentelemetry.io/collector/pdata => ../pdata -replace go.opentelemetry.io/collector/processor => ../processor - -replace go.opentelemetry.io/collector/receiver => ../receiver - -replace go.opentelemetry.io/collector/semconv => ../semconv - retract ( v0.76.0 // Depends on retracted pdata v1.0.0-rc10 module, use v0.76.1 v0.69.0 // Release failed, use v0.69.1 ) -replace go.opentelemetry.io/collector/connector => ../connector - -replace go.opentelemetry.io/collector/config/confignet => ../config/confignet - replace go.opentelemetry.io/collector/config/configtelemetry => ../config/configtelemetry - -replace go.opentelemetry.io/collector/service => ../service diff --git a/consumer/go.sum b/consumer/go.sum index 9e7a7130b9f..834ba473908 100644 --- a/consumer/go.sum +++ b/consumer/go.sum @@ -8,13 +8,15 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= 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/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -25,12 +27,15 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY 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.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -42,20 +47,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -64,15 +69,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= -google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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/consumer/metrics.go b/consumer/metrics.go index d0bd6559c94..50df60f02d0 100644 --- a/consumer/metrics.go +++ b/consumer/metrics.go @@ -9,7 +9,7 @@ import ( "go.opentelemetry.io/collector/pdata/pmetric" ) -// Metrics is the new metrics consumer interface that receives pmetric.Metrics, processes it +// Metrics is an interface that receives pmetric.Metrics, processes it // as needed, and sends it to the next processing node if any or to the destination. type Metrics interface { baseConsumer @@ -18,11 +18,11 @@ type Metrics interface { } // ConsumeMetricsFunc is a helper function that is similar to ConsumeMetrics. -type ConsumeMetricsFunc func(ctx context.Context, ld pmetric.Metrics) error +type ConsumeMetricsFunc func(ctx context.Context, md pmetric.Metrics) error -// ConsumeMetrics calls f(ctx, ld). -func (f ConsumeMetricsFunc) ConsumeMetrics(ctx context.Context, ld pmetric.Metrics) error { - return f(ctx, ld) +// ConsumeMetrics calls f(ctx, md). +func (f ConsumeMetricsFunc) ConsumeMetrics(ctx context.Context, md pmetric.Metrics) error { + return f(ctx, md) } type baseMetrics struct { diff --git a/consumer/package_test.go b/consumer/package_test.go new file mode 100644 index 00000000000..f5e88f8cc07 --- /dev/null +++ b/consumer/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package consumer + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/consumer/traces.go b/consumer/traces.go index 7a0e8e6aa9e..56cebd53b37 100644 --- a/consumer/traces.go +++ b/consumer/traces.go @@ -18,11 +18,11 @@ type Traces interface { } // ConsumeTracesFunc is a helper function that is similar to ConsumeTraces. -type ConsumeTracesFunc func(ctx context.Context, ld ptrace.Traces) error +type ConsumeTracesFunc func(ctx context.Context, td ptrace.Traces) error -// ConsumeTraces calls f(ctx, ld). -func (f ConsumeTracesFunc) ConsumeTraces(ctx context.Context, ld ptrace.Traces) error { - return f(ctx, ld) +// ConsumeTraces calls f(ctx, td). +func (f ConsumeTracesFunc) ConsumeTraces(ctx context.Context, td ptrace.Traces) error { + return f(ctx, td) } type baseTraces struct { diff --git a/docs/design.md b/docs/design.md index 17cf2f6b853..51ed65bbbe5 100644 --- a/docs/design.md +++ b/docs/design.md @@ -120,7 +120,7 @@ In the above example `jaeger` exporter will get data from pipeline `traces` and A pipeline can contain sequentially connected processors. The first processor gets the data from one or more receivers that are configured for the pipeline, the last processor sends the data to one or more exporters that are configured for the pipeline. All processors between the first and last receive the data strictly only from one preceding processor and send data strictly only to the succeeding processor. -Processors can transform the data before forwarding it (i.e. add or remove attributes from spans), they can drop the data simply by deciding not to forward it (this is for example how the `probabilisticsampler` processor works), they can also generate new data. This is how a `spanmetrics` processor can produce metrics for spans processed by the pipeline. +Processors can transform the data before forwarding it (i.e. add or remove attributes from spans), they can drop the data simply by deciding not to forward it (this is for example how the `probabilisticsampler` processor works), they can also generate new data. The same name of the processor can be referenced in the `processors` key of multiple pipelines. In this case the same configuration will be used for each of these processors however each pipeline will always get its own instance of the processor. Each of these processors will have its own state, the processors are never shared between pipelines. For example if `batch` processor is used in several pipelines each pipeline will have its own batch processor (although each batch processor will be configured exactly the same way if they reference the same key in the configuration). As an example, given the following configuration: diff --git a/docs/images/design-service-lifecycle.png b/docs/images/design-service-lifecycle.png deleted file mode 100644 index ad55af383f0ff14fc71f1d87f1a07a002c684a0e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21842 zcmZs?2Q-{P7cji~M$2j;2&*O{Sc_E>EY>P(^`3~%E>>GTh?WG2sL@;WC{ZFxh!(wf z(LxZSMT_44&HKLJIsf_2caD8#=FZH$Gk5O2Gjs2V(AHF;p=6~5001;|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V^YYpzH;s=f*^jJz|>deFJmsK_0U8M+!+*{yJgtm!=}Zr1H*N22Ad9ydYz8TsfZP* zvf~pixt?9JwC7npnCEF$&u_an5+>45p{Cr;Re{hYnD=6G8ZHsIgAGn{yPB3B8rQZ^ zf)l^sFp1XyQ1*d3fsx+6clsdI{;_tb{XyRL;UCbSoOhK0n3pRwRw}^onu%Vyu5--) E0M}11Gynhq diff --git a/docs/monitoring.md b/docs/monitoring.md index 3b73d8f85b1..d50782db712 100644 --- a/docs/monitoring.md +++ b/docs/monitoring.md @@ -16,7 +16,7 @@ desired reliability level. ### Low on CPU Resources This depends on the CPU metrics available on the deployment, eg.: -`kube_pod_container_resource_limits_cpu_cores` for Kubernetes. Let's call it +`kube_pod_container_resource_limits{resource="cpu", unit="core"}` for Kubernetes. Let's call it `available_cores` below. The idea here is to have an upper bound of the number of available cores, and the maximum expected ingestion rate considered safe, let's call it `safe_rate`, per core. This should trigger increase of resources/ diff --git a/docs/observability.md b/docs/observability.md index bf33f082e5f..78933983217 100644 --- a/docs/observability.md +++ b/docs/observability.md @@ -76,9 +76,52 @@ For begin/stop events we need to define an appropriate hysteresis to avoid gener The service should collect host resource metrics in addition to service's own process metrics. This may help to understand that the problem that we observe in the service is induced by a different process on the same host. -## How We Expose Metrics/Traces - -Collector configuration must allow specifying the target for own metrics/traces (which can be different from the target of collected data). The metrics and traces must be clearly tagged to indicate that they are service’s own metrics (to avoid conflating with collected data in the backend). +## How We Expose Telemetry + +By default, the Collector exposes service telemetry in two ways currently: + +- internal metrics are exposed via a Prometheus interface which defaults to port `8888` +- logs are emitted to stdout + +Traces are not exposed by default. There is an effort underway to [change this][issue7532]. The work includes supporting +configuration of the OpenTelemetry SDK used to produce the Collector's internal telemetry. This feature is +currently behind two feature gates: + +```bash + --feature-gates=telemetry.useOtelWithSDKConfigurationForInternalTelemetry +``` + +The gate `useOtelWithSDKConfigurationForInternalTelemetry` enables the Collector to parse configuration +that aligns with the [OpenTelemetry Configuration] schema. The support for this schema is still +experimental, but it does allow telemetry to be exported via OTLP. + +The following configuration can be used in combination with the feature gates aforementioned +to emit internal metrics and traces from the Collector to an OTLP backend: + +```yaml +service: + telemetry: + metrics: + readers: + - periodic: + interval: 5000 + exporter: + otlp: + protocol: grpc/protobuf + endpoint: https://backend:4317 + traces: + processors: + - batch: + exporter: + otlp: + protocol: grpc/protobuf + endpoint: https://backend2:4317 +``` + +See the configuration's [example][kitchen-sink] for additional configuration options. + +Note that this configuration does not support emitting logs as there is no support for [logs] in +OpenTelemetry Go SDK at this time. ### Impact @@ -89,3 +132,9 @@ We need to be able to assess the impact of these observability improvements on t Some of the metrics/traces can be high volume and may not be desirable to always observe. We should consider adding an observability verboseness “level” that allows configuring the Collector to send more or less observability data (or even finer granularity to allow turning on/off specific metrics). The default level of observability must be defined in a way that has insignificant performance impact on the service. + +[issue7532]: https://github.com/open-telemetry/opentelemetry-collector/issues/7532 +[issue7454]: https://github.com/open-telemetry/opentelemetry-collector/issues/7454 +[logs]: https://github.com/open-telemetry/opentelemetry-go/issues/3827 +[OpenTelemetry Configuration]: https://github.com/open-telemetry/opentelemetry-configuration +[kitchen-sink]: https://github.com/open-telemetry/opentelemetry-configuration/blob/main/examples/kitchen-sink.yaml diff --git a/docs/performance.md b/docs/performance.md deleted file mode 100644 index 8854ae1e00f..00000000000 --- a/docs/performance.md +++ /dev/null @@ -1,72 +0,0 @@ -# OpenTelemetry Collector Performance - -The performance numbers that follow were generated using version 0.1.3 of the -OpenTelemetry Collector, are applicable primarily to the OpenTelemetry Collector and -are measured only for traces. In the future, more configurations will be tested. - -Note with the OpenTelemetry Agent you can expect as good if not better performance -with lower resource utilization. This is because the OpenTelemetry Agent does not -today support features such as batching or retries and will not support -tail_sampling. - -It is important to note that the performance of the OpenTelemetry Collector depends -on a variety of factors including: - -* The receiving format: OpenTelemetry (55678), Jaeger thrift (14268) or Zipkin v2 JSON (9411) -* The size of the spans (tests are based on number of attributes): 20 -* Whether tail_sampling is enabled or not -* CPU / Memory allocation -* Operating System: Linux - -## Testing - -Testing was completed on Linux using the [Synthetic Load Generator -utility](https://github.com/Omnition/synthetic-load-generator) running for a -minimum of one hour (i.e. sustained rate). You can reproduce these results in -your own environment using the parameters described in this document. It is -important to note that this utility has a few configurable parameters which can -impact the results of the tests. The parameters used are defined below. - -* FlushInterval(ms) [default: 1000] -* MaxQueueSize [default: 100] -* SubmissionRate(spans/sec): 100,000 - -## Results without tail-based sampling - -| Span
Format | CPU
(2+ GHz) | RAM
(GB) | Sustained
Rate | Recommended
Maximum | -| :---: | :---: | :---: | :---: | :---: | -| OpenTelemetry | 1 | 2 | ~12K | 10K | -| OpenTelemetry | 2 | 4 | ~24K | 20K | -| Jaeger Thrift | 1 | 2 | ~14K | 12K | -| Jaeger Thrift | 2 | 4 | ~27.5K | 24K | -| Zipkin v2 JSON | 1 | 2 | ~10.5K | 9K | -| Zipkin v2 JSON | 2 | 4 | ~22K | 18K | - -If you are NOT using tail-based sampling and you need higher rates then you can -either: - -* Divide traffic to different collector (e.g. by region) -* Scale-up by adding more resources (CPU/RAM) -* Scale-out by putting one or more collectors behind a load balancer or k8s -service - -## Results with tail-based sampling - -> Note: Additional memory is required for tail-based sampling - -| Span
Format | CPU
(2+ GHz) | RAM
(GB) | Sustained
Rate | Recommended
Maximum | -| :---: | :---: | :---: | :---: | :---: | -| OpenTelemetry | 1 | 2 | ~9K | 8K | -| OpenTelemetry | 2 | 4 | ~18K | 16K | -| Jaeger Thrift | 1 | 6 | ~11.5K | 10K | -| Jaeger Thrift | 2 | 8 | ~23K | 20K | -| Zipkin v2 JSON | 1 | 6 | ~8.5K | 7K | -| Zipkin v2 JSON | 2 | 8 | ~16K | 14K | - -If you are using tail-based sampling and you need higher rates then you can -either: - -* Scale-up by adding more resources (CPU/RAM) -* Scale-out by putting one or more collectors behind a load balancer or k8s -service, but the load balancer must support traceID-based routing (i.e. all -spans for a given traceID need to be received by the same collector instance) diff --git a/docs/platform-support.md b/docs/platform-support.md new file mode 100644 index 00000000000..7112bea89b5 --- /dev/null +++ b/docs/platform-support.md @@ -0,0 +1,72 @@ +# Platform Support + +The OpenTelemetry Collector will be supported following a tiered platform support model to balance between the aim to support as many platforms as possible and to guarantee stability for the most important platforms. A platform is described by the pair of operating system and processor architecture family as they are defined by the Go programming language as [known operating systems and architectures for use with the GOOS and GOARCH values](https://go.dev/src/go/build/syslist.go). + +For a supported platform, the OpenTelemetry Collector is supported when the [minimum requirements](https://github.com/golang/go/wiki/MinimumRequirements) of the Go release used by the collector are met for the operating system and architecture. Each supported platform requires the naming of designated owners. The platform support for the OpenTelemetry Collector is broken into three tiers with different levels of support for each tier and aligns with the current test strategy. + +For platforms not listed as supported by any of the tiers, support cannot be assumed to be provided. While the project may accept specific changes related to these platforms, there will be no official builds, support of issues and development of enhancements or bug fixes for these platforms. Future development of project for supported platforms may break the functionality of unsupported platforms. + +## Current Test Strategy + +The current verification process of the OpenTelemetry Collector includes unit and performance tests for core and additional end-to-end and integration tests for contrib. In the end-to-end tests, receivers, processors, and exporters etc. are tested in a testbed, while the integration tests rely on actual instances and available container images. Additional stability tests are in preparation for the future as well. All verification tests are run on the linux/amd64 as the primary platform today. In addition, unit tests are run for the _contrib_ collector on windows/amd64. The tests use as execution environments the latest Ubuntu and Windows Server versions [supported as Github runners](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources). + +The cross compile supports the following targets: +- darwin/amd64 and darwin/arm64 +- linux/amd64, linux/arm64, linux/386, linux/arm and linux/ppc64le +- windows/amd64, windows/386. + +Except of the mentioned tests for linux/amd64 and windows/amd64, no other platforms are tested by the CI/CD tooling. + +Container images of the _core_ and _contrib_ collector are built and published to Docker Hub and ghcr.io for the platforms specified in the [goreleaser configuration](https://github.com/open-telemetry/opentelemetry-collector-releases/blob/bf8002ec6d2109cdb4184fc6eb6f8bda59ea96a2/.goreleaser.yaml#L137). End-to-end tests of the _contrib_ container images are run on the latest Ubuntu Linux supported by GitHub runners and for the four most recent Kubernetes versions. + +## Tiered platform support model + +The platform support for the OpenTelemetry Collector is broken into three tiers with different levels of support for each tier. + +### Platform Support - Summary + +The following tables summarized the platform tiers of support by the verification tests performed for them and by the specification if dummy implementations are allowed for selected features, the availability of precompiled binaries incl. container images and if bugfix releases are provided for previous releases in case of critical defects. + +| Tier | Unit tests | Performance tests | End-to-end tests | Integrations tests | Dummy implementations | Precompiled binaries | Bugfix releases | +|------|------------|-------------------|------------------|--------------------|-----------------------|----------------------|-----------------| +| 1 | yes | yes | yes | yes | no | yes | yes | +| 2 | yes | optional | optional | optional | yes | yes | no | +| 3 | no | no | no | no | yes | yes | no | + +### Tier 1 – Primary Support + +The Tier 1 supported platforms are _guaranteed to work_. Precompiled binaries are built on the platform, fully supported for all collector add-ons (receivers, processor, exporters etc.), and continuously tested as part of the development processes to ensure any proposed change will function correctly. Build and test infrastructure is provided by the project. All tests are executed on the platform as part of automated continuous integration (CI) for each pull request and the [release cycle](https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/release.md#release-schedule). Any build or test failure block the release of the collector distribution for all platforms. Defects are addressed with priority and depending on severity fixed for previous release(s) in a bug fix release. + +Tier 1 platforms are currently: +| Platform | Owner(s) | +|-------------|-------------------------------------------------------------------------------------------------------------| +| linux/amd64 | [OpenTelemetry Collector approvers](https://github.com/open-telemetry/opentelemetry-collector#contributing) | + +### Tier 2 – Secondary Support + +Tier 2 platforms are _guaranteed to work with specified limitations_. Precompiled binaries are built and tested on the platform as part of the release cycle. Build and test infrastructure is provided by the platform maintainers. All tests are executed on the platform as far as they are applicable, and all prerequisites are fulfilled. Not executed tests and not tested collector add-ons (receivers, processors, exporters, etc.) are published on release of the collector distribution. Any build or test failure delays the release of the binaries for the respective platform but not the collector distribution for all other platforms. Defects are addressed but not with the priority as for Tier 1 and, if specific to the platform, require the support of the platform maintainers. + +Tier 2 platforms are currently: +| Platform | Owner(s) | +|---------------|-------------------------------------------------------------------------------------------------------------| +| windows/amd64 | [OpenTelemetry Collector approvers](https://github.com/open-telemetry/opentelemetry-collector#contributing) | + +### Tier 3 - Community Support + +Tier 3 platforms are _guaranteed to build_. Precompiled binaries are made available as part of the release process and as result of a cross compile build on Linux amd64 but the binaries are not tested at all. Any build failure delays the release of the binaries for the respective platform but not the collector distribution for all other platforms. Defects are addressed based on community contributions. Core developers might provide guidance or code reviews, but direct fixes may be limited. + +Tier 3 platforms are currently: +| Platform | Owner(s) | +|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------| +| darwin/amd64 | [@h0cheung](https://github.com/h0cheung) | +| darwin/arm64 | [@MovieStoreGuy](https://github.com/MovieStoreGuy) | +| linux/arm64 | [@atoulme](https://github.com/atoulme) | +| linux/386 | [@astencel-sumo](https://github.com/astencel-sumo) | +| linux/arm | [@Wal8800](https://github.com/Wal8800), [@atoulme](https://github.com/atoulme) | +| linux/ppc64le | [@IBM-Currency-Helper](https://github.com/IBM-Currency-Helper), [@adilhusain-s](https://github.com/adilhusain-s), [@seth-priya](https://github.com/seth-priya) | +| linux/s390x | [@bwalk-at-ibm](https://github.com/bwalk-at-ibm), [@rrschulze](https://github.com/rrschulze) | +| windows/386 | [@pjanotti](https://github.com/pjanotti) | + +The proposed additional platform aix/ppc64 ([#19195](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/19195)) will be included into Tier 3 once it's added to the OpenTelemetry Collector as platform. + + diff --git a/docs/processing.md b/docs/processing.md index 63e5e21b705..331fa16c617 100644 --- a/docs/processing.md +++ b/docs/processing.md @@ -57,7 +57,7 @@ expectations. - Create new metrics based on information in spans, for example to create a duration metric that is not implemented in the SDK yet - Apply arithmetic between multiple incoming metrics to produce an output one, for example divide an `amount` and a `capacity` to create a `utilization` metric -The processors implementing this use case are `metricsgenerationprocessor`, `spanmetricsprocessor`. +The components implementing this use case are `metricsgenerationprocessor` and the former `spanmetricsprocessor` (now `spanmetricsconnector`). ### Grouping diff --git a/docs/release.md b/docs/release.md index 03f0a5a51fd..737279bf10f 100644 --- a/docs/release.md +++ b/docs/release.md @@ -27,12 +27,13 @@ It is possible that a core approver isn't a contrib approver. In that case, the 1. Update Contrib to use the latest in development version of Core. Run `make update-otel` in Contrib root directory and if it results in any changes submit a draft PR to Contrib. Ensure the CI passes before proceeding. This is to ensure that the latest core does not break contrib in any way. We’ll update it once more to the final release number later. -2. Determine the version number that will be assigned to the release. During the beta phase, we increment the minor version number and set the patch number to 0. In this document, we are using `v0.85.0` as the version to be released, following `v0.84.0`. - Check if stable modules have any changes since the last release by running `make check-changes PREVIOUS_VERSION=v1.0.0-rcv0014 MODSET=stable`. If there are no changes, there is no need to release new version for stable modules. +2. Determine the version number that will be assigned to the release. Usually, we increment the minor version number and set the patch number to 0. In this document, we are using `v0.85.0` as the version to be released, following `v0.84.0`. + Check if stable modules have any changes since the last release by running `make check-changes PREVIOUS_VERSION=v1.0.0 MODSET=stable`. If there are no changes, there is no need to release new version for stable modules. + If there are changes found but .chloggen directory doesn't have any corresponding entries, add missing changelog entries. If the changes are insignificant, consider not releasing a new version for stable modules. -3. Manually run the action [Automation - Prepare Release](https://github.com/open-telemetry/opentelemetry-collector/actions/workflows/prepare-release.yml). This action will create an issue to track the progress of the release and a pull request to update the changelog and version numbers in the repo. **While this PR is open all merging in Core should be haulted**. +3. Manually run the action [Automation - Prepare Release](https://github.com/open-telemetry/opentelemetry-collector/actions/workflows/prepare-release.yml). This action will create an issue to track the progress of the release and a pull request to update the changelog and version numbers in the repo. **While this PR is open all merging in Core should be halted**. - When prompted, enter the version numbers determined in Step 2, but do not include a leading `v`. - - If not intending to release stable modeles, do not specify a version for `Release candidate version stable`. + - If not intending to release stable modules, do not specify a version for `Release candidate version stable`. - If the PR needs updated in any way you can make the changes in a fork and PR those changes into the `prepare-release-prs/x` branch. You do not need to wait for the CI to pass in this prep-to-prep PR. - 🛑 **Do not move forward until this PR is merged.** 🛑 @@ -48,8 +49,8 @@ It is possible that a core approver isn't a contrib approver. In that case, the 7. A new `v0.85.0` release should be automatically created on Github by now. Edit it and use the contents from the CHANGELOG.md and CHANGELOG-API.md as the release's description. -8. If you created a draft PR to Contrib in step 3, update the PR to use the newly released Core version and set it to Ready for Review. - - Run `make update-otel OTEL_VERSION=v0.85.0 OTEL_RC_VERSION=v1.0.0-rcv0014` +8. Update the draft PR to Contrib created in step 1 to use the newly released Core version and set it to Ready for Review. + - Run `make update-otel OTEL_VERSION=v0.85.0 OTEL_STABLE_VERSION=v1.1.0` - Manually update `cmd/otelcontribcol/builder-config.yaml` - Manually update `cmd/oteltestbedcol/builder-config.yaml` - Run `make genotelcontribcol` @@ -58,7 +59,7 @@ It is possible that a core approver isn't a contrib approver. In that case, the ## Releasing opentelemetry-collector-contrib -1. Manually run the action [Automation - Prepare Release](https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/workflows/prepare-release.yml). When prompted, enter the version numbers determined in Step 1, but do not include a leading `v`. This action will a pull request to update the changelog and version numbers in the repo. **While this PR is open all merging in Contrib should be haulted**. +1. Manually run the action [Automation - Prepare Release](https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/workflows/prepare-release.yml). When prompted, enter the version numbers determined in Step 1, but do not include a leading `v`. This action will create a pull request to update the changelog and version numbers in the repo. **While this PR is open all merging in Contrib should be halted**. - If the PR needs updated in any way you can make the changes in a fork and PR those changes into the `prepare-release-prs/x` branch. You do not need to wait for the CI to pass in this prep-to-prep PR. - 🛑 **Do not move forward until this PR is merged.** 🛑 @@ -116,7 +117,7 @@ When considering making a bugfix release on the `v0.N.x` release cycle, the bug - Reverting a feature gate. - Changing the configuration to an easy to find value. 2. The bug happens in common setups. To gauge this, maintainers can consider the following: - - The bug is not specific to an uncommon platform + - If the bug is specific to a certain platform, and if that platform is in [Tier 1](../docs/platform-support.md#tiered-platform-support-model). - The bug happens with the default configuration or with a commonly used one (e.g. has been reported by multiple people) 3. The bug is sufficiently severe. For example (non-exhaustive list): - The bug makes the Collector crash reliably @@ -132,23 +133,34 @@ The OpenTelemetry Collector maintainers will ultimately have the responsibility The following documents the procedure to release a bugfix -1. Create a pull request against the `release/` (e.g. `release/v0.45.x`) branch to apply the fix. -2. Create a pull request to update version number against the `release/` branch. +1. Create a pull request against the `release/` (e.g. `release/v0.90.x`) branch to apply the fix. +2. Make sure you are on `release/`. Prepare release commits with `prepare-release` make target, e.g. `make prepare-release PREVIOUS_VERSION=0.90.0 RELEASE_CANDIDATE=0.90.1 MODSET=beta`, and create a pull request against the `release/` branch. 3. Once those changes have been merged, create a pull request to the `main` branch from the `release/` branch. -4. Enable the **Merge pull request** setting in the repository's **Settings** tab. -5. Tag all the modules with the new release version by running the `make add-tag` command (e.g. `make add-tag TAG=v0.85.0`). Push them to `open-telemetry/opentelemetry-collector` with `make push-tag TAG=v0.85.0`. Wait for the new tag build to pass successfully. -6. **IMPORTANT**: The pull request to bring the changes from the release branch *MUST* be merged using the **Merge pull request** method, and *NOT* squashed using “**Squash and merge**”. This is important as it allows us to ensure the commit SHA from the release branch is also on the main branch. **Not following this step will cause much go dependency sadness.** -7. Once the branch has been merged, it will be auto-deleted. Restore the release branch via GitHub. -8. Once the patch is release, disable the **Merge pull request** setting. +4. If you see merge conflicts when creating the pull request, do the following: + 1. Create a new branch from `origin:main`. + 2. Merge the `release/` branch into the new branch. + 3. Resolve the conflicts. + 4. Create another pull request to the `main` branch from the new branch to replace the pull request from the `release/` branch. +5. Enable the **Merge pull request** setting in the repository's **Settings** tab. +6. Make sure you are on `release/`. Push the new release version tags for a target module set by running `make push-tags MODSET=`. Wait for the new tag build to pass successfully. +7. **IMPORTANT**: The pull request to bring the changes from the release branch *MUST* be merged using the **Merge pull request** method, and *NOT* squashed using “**Squash and merge**”. This is important as it allows us to ensure the commit SHA from the release branch is also on the main branch. **Not following this step will cause much go dependency sadness.** +8. If the pull request was created from the `release/` branch, it will be auto-deleted. Restore the release branch via GitHub. +9. Once the patch is released, disable the **Merge pull request** setting. + +## 1.0 release + +Stable modules adhere to our [versioning document guarantees](../VERSIONING.md), so we need to be careful before releasing. Before adding a module to the stable module set and making a first 1.x release, please [open a new stabilization issue](https://github.com/open-telemetry/opentelemetry-collector/issues/new/choose) and follow the instructions in the issue template. + +Once a module is ready to be released under the `1.x` version scheme, file a PR to move the module to the `stable` module set and remove it from the `beta` module set. Note that we do not make `v1.x.y-rc.z` style releases for new stable modules; we instead treat the last two beta minor releases as release candidates and the module moves directly from the `0.x` to the `1.x` release series. ## Release schedule | Date | Version | Release manager | |------------|---------|-----------------| -| 2023-09-25 | v0.86.0 | @bogdandrutu | -| 2023-10-09 | v0.87.0 | @Aneurysm9 | -| 2023-10-23 | v0.88.0 | @mx-psi | -| 2023-11-06 | v0.89.0 | @jpkrohling | -| 2023-11-20 | v0.90.0 | @djaglowski | -| 2023-12-04 | v0.91.0 | @dmitryax | -| 2023-12-18 | v0.92.0 | @codeboten | \ No newline at end of file +| 2024-02-19 | v0.95.0 | @jpkrohling | +| 2024-03-04 | v0.96.0 | @mx-psi | +| 2024-03-18 | v0.97.0 | @djaglowski | +| 2024-04-01 | v0.98.0 | @dmitryax | +| 2024-04-15 | v0.99.0 | @codeboten | +| 2024-04-29 | v0.100.0 | @bogdandrutu | +| 2024-05-13 | v0.101.0 | @Aneurysm9 | diff --git a/docs/roadmap.md b/docs/roadmap.md deleted file mode 100644 index e76cb8b92ab..00000000000 --- a/docs/roadmap.md +++ /dev/null @@ -1,29 +0,0 @@ -# Long-term Roadmap - -This long-term roadmap (draft) is a vision document that reflects our -current desires. It is not a commitment to implement everything listed in this roadmap. -The primary purpose of this document is to ensure that all contributors work in alignment. -As our vision changes over time, maintainers reserve the right to add, modify, and _remove_ -items from this roadmap. - -Description|Status|Links| ------------|------|-----| -**Testing**| -Metrics correctness tests|Done|[#652](https://github.com/open-telemetry/opentelemetry-collector/issues/652) -| | -**New Formats**| -Complete OTLP/HTTP support|Done|[#882](https://github.com/open-telemetry/opentelemetry-collector/issues/882) -Add logs support for all primary core processors (attributes, batch, k8sattributes, etc)| Done | -| | -**5 Min to Value**| -Distribution packages for most common targets (e.g. Docker, RPM, Windows, etc)| Done | https://github.com/open-telemetry/opentelemetry-collector-releases/releases | -Detection and collection of environment metrics and tags on AWS| Beta| https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourcedetectionprocessor | -Detection and collection of k8s telemetry| Beta | https://pkg.go.dev/github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor | -Host metric collection|Beta| https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/hostmetricsreceiver | -Support more application-specific metric collection (e.g. Kafka, Hadoop, etc) | In Progress | https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver| -| | -**Other Features**| -Graceful shutdown (pipeline draining)|Done|[#483](https://github.com/open-telemetry/opentelemetry-collector/issues/483) -Deprecate queue retry processor and enable queuing per exporter by default|Done|[#1721](https://github.com/open-telemetry/opentelemetry-collector/issues/1721) - -At this time, much of the effort from the OpenTelemetry Collector SIG is focused on achieving GA status across various packages. See additional details in the [GA roadmap](ga-roadmap.md) document. diff --git a/docs/scraping-receivers.md b/docs/scraping-receivers.md index e9fa31f44a2..91e0bd9f292 100644 --- a/docs/scraping-receivers.md +++ b/docs/scraping-receivers.md @@ -24,7 +24,7 @@ defines stability guarantees and provides guidelines for metric updates. Each built-in scraping metrics receiver has a `metadata.yaml` file that MUST define all the metrics emitted by the receiver. The file is being used to generate an API for metrics recording, user settings to customize the emitted metrics and user documentation. The file schema is defined in -https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/cmd/mdatagen/metric-metadata.yaml. +https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/cmd/mdatagen/metadata-schema.yaml Defining a metric in `metadata.yaml` DOES NOT guarantee that the metric will always be produced by the receiver. In some cases it may be impossible to fetch particular metrics from a system in a particular state. diff --git a/docs/security-best-practices.md b/docs/security-best-practices.md index 4101e561177..6ca44ba0b64 100644 --- a/docs/security-best-practices.md +++ b/docs/security-best-practices.md @@ -148,6 +148,8 @@ receivers: Generally, `localhost`-like addresses should be preferred over the 0.0.0.0 address. For more information, see [CWE-1327](https://cwe.mitre.org/data/definitions/1327.html). +To change the default endpoint to be `localhost`-bound in all components, enable the `component.UseLocalHostAsDefaultHost` feature gate. This feature gate will be enabled by default in the Collector in a future release. + ## Processors Processors sit between receivers and exporters. They are responsible for @@ -169,7 +171,7 @@ scrub sensitive data before exporting. In addition, processors offer safeguards around resource utilization. The `batch` and especially `memory_limiter` processor help ensure that the -Collector is resource efficient and does not out of memory when overloaded. At +Collector is resource efficient and does not run out of memory when overloaded. At least these two processors SHOULD be enabled on every defined pipeline. > For more information on recommended processors and order, see diff --git a/docs/service-extensions.md b/docs/service-extensions.md deleted file mode 100644 index 6d707a6d31e..00000000000 --- a/docs/service-extensions.md +++ /dev/null @@ -1,146 +0,0 @@ -# OpenTelemetry Collector: Extensions - -Besides the pipeline elements (receivers, processors, and exporters) the Collector -uses various service extensions (e.g.: healthcheck, z-pages, etc). -This document describes the “extensions” design and how they are implemented. - -## Configuration and Interface - -The configuration follows the same pattern used for pipelines: a base -configuration type and the creation of factories to instantiate the extension -objects. - -In order to support generic service extensions an interface is defined -so the service can interact uniformly with these. At minimum service extensions -need to implement the interface that covers Start and Shutdown. - -In addition to this base interface there is support to notify extensions when -pipelines are “ready” and when they are about to be stopped, i.e.: “not ready” -to receive data. These are a necessary addition to allow implementing extensions -that indicate to LBs and external systems if the service instance is ready or -not to receive data -(e.g.: a [k8s readiness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#define-readiness-probes)). -These state changes are under the control of the service server hosting -the extensions. - -There are more complex scenarios in which there can be notifications of state -changes from the extensions to their host. These more complex cases are not -supported at this moment, but this design doesn’t prevent such extensions in the -future[^1]. - - -## Collector State and Extensions - -The diagram below shows the basic state transitions of the OpenTelemetry Collector -and how it will interact with the service extensions. - -![ServiceLifeCycle](images/design-service-lifecycle.png) - - -## Configuration - -The config package will be extended to load the service extensions when the -configuration is loaded. The settings for service extensions will live in the -same configuration file as the pipeline elements. Below is an example of how -these sections would look like in the configuration file: - -```yaml - -# Example of the extensions available with the core Collector. The list below -# includes all configurable options and their respective default value. -extensions: - health_check: - port: 13133 - pprof: - endpoint: "localhost:1777" - block_profile_fraction: 0 - mutex_profile_fraction: 0 - zpages: - endpoint: "localhost:55679" - -# The service lists extensions not directly related to data pipelines, but used -# by the service. -service: - # extensions lists the extensions added to the service. They are started - # in the order presented below and stopped in the reverse order. - extensions: [health_check, pprof, zpages] -``` - -The configuration base type does not share any common fields. - -The configuration, analogous to pipelines, allows to have multiple extensions of -the same type. Implementers of extensions need to take care to return error -if it can only execute a single instance. (Note: the configuration uses composite -key names in the form of `type[/name]` -as defined in this [this document](https://docs.google.com/document/d/1NeheFG7DmcUYo_h2vLtNRlia9x5wOJMlV4QKEK05FhQ/edit#)). - -The factory follows the same pattern established for pipeline configuration: - -```go -// Factory is a factory interface for extensions to the service. -type Factory interface { - // Type gets the type of the extension created by this factory. - Type() string - - // CreateDefaultConfig creates the default configuration for the extension. - CreateDefaultConfig() config.Extension - - // CreateExtension creates a service extension based on the given config. - CreateExtension(logger *zap.Logger, cfg config.Extension) (component.Extension, error) -} -``` - - -## Extension Interface - -The interface defined below is the minimum required for -extensions in use on the service: - -```go -// ServiceExtension is the interface for objects hosted by the OpenTelemetry Collector that -// don't participate directly on data pipelines but provide some functionality -// to the service, examples: health check endpoint, z-pages, etc. -type ServiceExtension interface { - // Start the ServiceExtension object hosted by the given host. At this point in the - // process life-cycle the receivers are not started and the host did not - // receive any data yet. - Start(host Host) error - - // Shutdown the ServiceExtension instance. This happens after the pipelines were - // shutdown. - Shutdown() error -} - -// PipelineWatcher is an extra interface for ServiceExtension hosted by the OpenTelemetry -// Collector that is to be implemented by extensions interested in changes to pipeline -// states. Typically this will be used by extensions that change their behavior if data is -// being ingested or not, e.g.: a k8s readiness probe. -type PipelineWatcher interface { - // Ready notifies the ServiceExtension that all pipelines were built and the - // receivers were started, i.e.: the service is ready to receive data - // (notice that it may already have received data when this method is called). - Ready() error - - // NotReady notifies the ServiceExtension that all receivers are about to be stopped, - // i.e.: pipeline receivers will not accept new data. - // This is sent before receivers are stopped, so the ServiceExtension can take any - // appropriate action before that happens. - NotReady() error -} - -// Host represents the entity where the extension is being hosted. -// It is used to allow communication between the extension and its host. -type Host interface { - // ReportFatalError is used to report to the host that the extension - // encountered a fatal error (i.e.: an error that the instance can't recover - // from) after its start function had already returned. - ReportFatalError(err error) -} -``` - -## Notes - -[^1]: - This can be done by adding specific interfaces to extension types that support - those and having the service checking which of the extension instances support - each interface. diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index ff51b2afb7f..df9c995c507 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -11,8 +11,6 @@ Logs can be helpful in identifying issues. Always start by checking the log output and looking for potential issues. The verbosity level defaults to `INFO` and can be adjusted. -#### Version 0.36 and above: - Set the log level in the config `service::telemetry::logs` ```yaml @@ -22,22 +20,12 @@ service: level: "debug" ``` -#### Version 0.35 and below: - -Pass `--log-level` flag to the `otelcol` process. See `--help` for more details. - -```console -$ otelcol --log-level DEBUG -``` - ### Metrics Prometheus metrics are exposed locally on port `8888` and path `/metrics`. For containerized environments it may be desirable to expose this port on a public interface instead of just locally. -#### Version 0.43.0 and above: - Set the address in the config `service::telemetry::metrics` ```yaml @@ -47,17 +35,24 @@ service: address: ":8888" ``` -#### Version 0.42.0 and below: +A Grafana dashboard for these metrics can be found +[here](https://grafana.com/grafana/dashboards/15983-opentelemetry-collector/). -Pass `--metrics-addr ` flag to the `otelcol` process. See `--help` for -more details. +You can enhance metrics telemetry level using `level` field. The following is a list of all possible values and their explanations. -```console -$ otelcol --metrics-addr 0.0.0.0:8888 -``` +- "none" indicates that no telemetry data should be collected; +- "basic" is the recommended and covers the basics of the service telemetry. +- "normal" adds some other indicators on top of basic. +- "detailed" adds dimensions and views to the previous levels. -A Grafana dashboard for these metrics can be found -[here](https://grafana.com/grafana/dashboards/15983-opentelemetry-collector/). +For example: +```yaml +service: + telemetry: + metrics: + level: detailed + address: ":8888" +``` Also note that a Collector can be configured to scrape its own metrics and send it through configured pipelines. For example: @@ -85,6 +80,22 @@ service: exporters: [debug] ``` +### Traces + +OpenTelemetry Collector has an ability to send it's own traces using OTLP exporter. You can send the traces to OTLP server running on the same OpenTelemetry Collector, so it goes through configured pipelines. For example: + +```yaml +service: + telemetry: + traces: + processors: + batch: + exporter: + otlp: + protocol: grpc/protobuf + endpoint: ${MY_POD_IP}:4317 +``` + ### zPages The @@ -247,8 +258,7 @@ The Collector may exit/restart because: - Memory pressure due to missing or misconfigured [memory_limiter](https://github.com/open-telemetry/opentelemetry-collector/blob/main/processor/memorylimiterprocessor/README.md) processor. -- [Improperly sized](https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/performance.md) - for load. +- Improperly sized for load. - Improperly configured (for example, a queue size configured higher than available memory). - Infrastructure resource limits (for example Kubernetes). @@ -257,7 +267,7 @@ The Collector may exit/restart because: Data may be dropped for a variety of reasons, but most commonly because of an: -- [Improperly sized Collector](https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/performance.md) resulting in Collector being unable to process and export the data as fast as it is received. +- Improperly sized Collector resulting in Collector being unable to process and export the data as fast as it is received. - Exporter destination unavailable or accepting the data too slowly. To mitigate drops, it is highly recommended to configure the @@ -305,7 +315,7 @@ configuration issue. This could be due to a firewall, DNS, or proxy issue. Note that the Collector does have [proxy support](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter#proxy-support). -### Startup failing in Windows Docker containers +### Startup failing in Windows Docker containers (v0.90.1 and earlier) The process may fail to start in a Windows Docker container with the following error: `The service process could not connect to the service controller`. In diff --git a/docs/vision.md b/docs/vision.md index dfe9ab01934..5b315598d0d 100644 --- a/docs/vision.md +++ b/docs/vision.md @@ -21,5 +21,3 @@ Extensible and customizable without touching the core code. Can create custom ag ## Unified Codebase One codebase for daemon (Agent) and standalone service (Collector). - -For more details on how we plan to achieve this vision please see the [Roadmap](roadmap.md). \ No newline at end of file diff --git a/examples/k8s/otel-config.yaml b/examples/k8s/otel-config.yaml index 5a26806eb13..7c73578ac3c 100644 --- a/examples/k8s/otel-config.yaml +++ b/examples/k8s/otel-config.yaml @@ -35,11 +35,8 @@ data: check_interval: 5s extensions: zpages: {} - memory_ballast: - # Memory Ballast size should be max 1/3 to 1/2 of memory. - size_mib: 165 service: - extensions: [zpages, memory_ballast] + extensions: [zpages] pipelines: traces: receivers: [otlp] @@ -68,7 +65,7 @@ spec: - command: - "/otelcol" - "--config=/conf/otel-agent-config.yaml" - image: otel/opentelemetry-collector:0.85.0 + image: otel/opentelemetry-collector:0.94.0 name: otel-agent resources: limits: @@ -87,6 +84,8 @@ spec: fieldRef: apiVersion: v1 fieldPath: status.podIP + - name: GOMEMLIMIT + value: 400MiB volumeMounts: - name: otel-agent-config-vol mountPath: /conf @@ -124,16 +123,13 @@ data: check_interval: 5s extensions: zpages: {} - memory_ballast: - # Memory Ballast size should be max 1/3 to 1/2 of memory. - size_mib: 683 exporters: otlp: endpoint: "http://someotlp.target.com:4317" # Replace with a real endpoint. tls: insecure: true service: - extensions: [zpages, memory_ballast] + extensions: [zpages] pipelines: traces/1: receivers: [otlp] @@ -187,7 +183,7 @@ spec: - command: - "/otelcol" - "--config=/conf/otel-collector-config.yaml" - image: otel/opentelemetry-collector:0.85.0 + image: otel/opentelemetry-collector:0.94.0 name: otel-collector resources: limits: @@ -199,7 +195,7 @@ spec: ports: - containerPort: 55679 # Default endpoint for ZPages. - containerPort: 4317 # Default endpoint for OpenTelemetry receiver. - - containerPort: 14250 # Default endpoint for Jaeger gRPC receiver. + - containerPort: 1.3.0 # Default endpoint for Jaeger gRPC receiver. - containerPort: 14268 # Default endpoint for Jaeger HTTP receiver. - containerPort: 9411 # Default endpoint for Zipkin receiver. - containerPort: 8888 # Default endpoint for querying metrics. @@ -209,6 +205,8 @@ spec: fieldRef: apiVersion: v1 fieldPath: status.podIP + - name: GOMEMLIMIT + value: 1600MiB volumeMounts: - name: otel-collector-config-vol mountPath: /conf diff --git a/examples/local/otel-config.yaml b/examples/local/otel-config.yaml index 7ea61683d2a..20cbf6973f5 100644 --- a/examples/local/otel-config.yaml +++ b/examples/local/otel-config.yaml @@ -1,6 +1,4 @@ extensions: - memory_ballast: - size_mib: 512 zpages: endpoint: localhost:55679 @@ -15,7 +13,7 @@ receivers: processors: batch: memory_limiter: - # 75% of maximum memory up to 4G + # 75% of maximum memory up to 2G limit_mib: 1536 # 25% of limit up to 2G spike_limit_mib: 512 @@ -36,4 +34,4 @@ service: processors: [memory_limiter, batch] exporters: [debug] - extensions: [memory_ballast, zpages] + extensions: [zpages] diff --git a/exporter/README.md b/exporter/README.md index 109731a9573..f567fd7b9ac 100644 --- a/exporter/README.md +++ b/exporter/README.md @@ -1,27 +1,14 @@ # General Information -An exporter is how data gets sent to different systems/back-ends. Generally, an -exporter translates the internal format into another defined format. +An exporter defines how the pipeline data leaves the collector. -Available trace exporters (sorted alphabetically): +This repository hosts the following exporters available in +traces, metrics and logs pipelines (sorted alphabetically): +- [Debug](debugexporter/README.md) - [OTLP gRPC](otlpexporter/README.md) - [OTLP HTTP](otlphttpexporter/README.md) -Available metric exporters (sorted alphabetically): - -- [OTLP gRPC](otlpexporter/README.md) -- [OTLP HTTP](otlphttpexporter/README.md) - -Available log exporters (sorted alphabetically): - -- [OTLP gRPC](otlpexporter/README.md) -- [OTLP HTTP](otlphttpexporter/README.md) - -Available local exporters (sorted alphabetically): - -- [Logging](loggingexporter/README.md) - The [contrib repository](https://github.com/open-telemetry/opentelemetry-collector-contrib) has more exporters available in its builds. diff --git a/exporter/debugexporter/README.md b/exporter/debugexporter/README.md index dd246772af7..618e12b1d13 100644 --- a/exporter/debugexporter/README.md +++ b/exporter/debugexporter/README.md @@ -1,20 +1,29 @@ # Debug Exporter -| Status | | -| ------------------------ |-----------------------| -| Stability | [Development] | -| Supported pipeline types | traces, metrics, logs | -| Distributions | [core], [contrib] | + +| Status | | +| ------------- |-----------| +| Stability | [development]: traces, metrics, logs | +| Distributions | [core], [contrib] | +| Warnings | [Unstable Output Format](#warnings) | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fdebug%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fdebug) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fdebug%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fdebug) | -Exports data to the console via zap.Logger. +[development]: https://github.com/open-telemetry/opentelemetry-collector#development +[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib + + +Exports data to the console (stderr) via `zap.Logger`. -Supported pipeline types: traces, metrics, logs +See also the [Troubleshooting][troubleshooting_docs] document for examples on using this exporter. + +[troubleshooting_docs]: ../../docs/troubleshooting.md ## Getting Started The following settings are optional: -- `verbosity` (default = `normal`): the verbosity of the logging export +- `verbosity` (default = `basic`): the verbosity of the logging export (detailed|normal|basic). When set to `detailed`, pipeline data is verbosely logged. - `sampling_initial` (default = `2`): number of messages initially logged each @@ -24,7 +33,7 @@ The following settings are optional: docs](https://godoc.org/go.uber.org/zap/zapcore#NewSampler) for more details. on how sampling parameters impact number of messages. -Example: +Example configuration: ```yaml exporters: @@ -34,6 +43,70 @@ exporters: sampling_thereafter: 200 ``` -[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol -[Development]: https://github.com/open-telemetry/opentelemetry-collector#in-development +## Verbosity levels + +The following subsections describe the output from the exporter depending on the configured verbosity level - `basic`, `normal` and `detailed`. +The default verbosity level is `basic`. + +### Basic verbosity + +With `verbosity: basic`, the exporter outputs a single-line summary of received data with a total count of telemetry records for every batch of received logs, metrics or traces. + +Here's an example output: + +```console +2023-11-10T22:49:03.510-0600 info TracesExporter {"kind": "exporter", "data_type": "traces", "name": "debug", "resource spans": 1, "spans": 2} +``` + +### Normal verbosity + +With `verbosity: normal`, the exporter's behavior is currently the same as with `verbosity: basic`. +See above for more details. + +### Detailed verbosity + +With `verbosity: detailed`, the exporter outputs all details of every telemetry record, typically writing multiple lines for every telemetry record. + +Here's an example output: + +```console +2023-11-10T22:49:03.510-0600 info TracesExporter {"kind": "exporter", "data_type": "traces", "name": "debug", "resource spans": 1, "spans": 2} +2023-11-10T22:49:03.510-0600 info ResourceSpans #0 +Resource SchemaURL: https://opentelemetry.io/schemas/1.4.0 +Resource attributes: + -> service.name: Str(telemetrygen) +ScopeSpans #0 +ScopeSpans SchemaURL: +InstrumentationScope telemetrygen +Span #0 + Trace ID : 3bde5d3ee82303571bba6e1136781fe4 + Parent ID : 5e9dcf9bac4acc1f + ID : 2cf3ef2899aba35c + Name : okey-dokey + Kind : Server + Start time : 2023-11-11 04:49:03.509369393 +0000 UTC + End time : 2023-11-11 04:49:03.50949377 +0000 UTC + Status code : Unset + Status message : +Attributes: + -> net.peer.ip: Str(1.2.3.4) + -> peer.service: Str(telemetrygen-client) +Span #1 + Trace ID : 3bde5d3ee82303571bba6e1136781fe4 + Parent ID : + ID : 5e9dcf9bac4acc1f + Name : lets-go + Kind : Client + Start time : 2023-11-11 04:49:03.50935117 +0000 UTC + End time : 2023-11-11 04:49:03.50949377 +0000 UTC + Status code : Unset + Status message : +Attributes: + -> net.peer.ip: Str(1.2.3.4) + -> peer.service: Str(telemetrygen-server) + {"kind": "exporter", "data_type": "traces", "name": "debug"} +``` + +## Warnings + +- Unstable Output Format: The output formats for all verbosity levels is not guaranteed and may be changed at any time without a breaking change. \ No newline at end of file diff --git a/exporter/debugexporter/doc.go b/exporter/debugexporter/doc.go index 9edb9ae096d..a079325f067 100644 --- a/exporter/debugexporter/doc.go +++ b/exporter/debugexporter/doc.go @@ -1,5 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +//go:generate mdatagen metadata.yaml + // Package debugexporter exports data to console as logs. package debugexporter // import "go.opentelemetry.io/collector/exporter/debugexporter" diff --git a/exporter/debugexporter/factory.go b/exporter/debugexporter/factory.go index 919ca32ade6..e9e75130dd6 100644 --- a/exporter/debugexporter/factory.go +++ b/exporter/debugexporter/factory.go @@ -9,12 +9,14 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/debugexporter/internal/metadata" "go.opentelemetry.io/collector/exporter/internal/common" ) +// The value of "type" key in configuration. +var componentType = component.MustNewType("debug") + const ( - // The value of "type" key in configuration. - typeStr = "debug" defaultSamplingInitial = 2 defaultSamplingThereafter = 500 ) @@ -22,17 +24,17 @@ const ( // NewFactory creates a factory for Debug exporter func NewFactory() exporter.Factory { return exporter.NewFactory( - typeStr, + componentType, createDefaultConfig, - exporter.WithTraces(createTracesExporter, component.StabilityLevelDevelopment), - exporter.WithMetrics(createMetricsExporter, component.StabilityLevelDevelopment), - exporter.WithLogs(createLogsExporter, component.StabilityLevelDevelopment), + exporter.WithTraces(createTracesExporter, metadata.TracesStability), + exporter.WithMetrics(createMetricsExporter, metadata.MetricsStability), + exporter.WithLogs(createLogsExporter, metadata.LogsStability), ) } func createDefaultConfig() component.Config { return &Config{ - Verbosity: configtelemetry.LevelNormal, + Verbosity: configtelemetry.LevelBasic, SamplingInitial: defaultSamplingInitial, SamplingThereafter: defaultSamplingThereafter, } diff --git a/exporter/debugexporter/go.mod b/exporter/debugexporter/go.mod index 546b482fb54..6f838aa9ba2 100644 --- a/exporter/debugexporter/go.mod +++ b/exporter/debugexporter/go.mod @@ -1,51 +1,59 @@ module go.opentelemetry.io/collector/exporter/debugexporter -go 1.20 +go 1.21 require ( github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.85.0 - go.opentelemetry.io/collector/config/configtelemetry v0.85.0 - go.opentelemetry.io/collector/confmap v0.85.0 - go.opentelemetry.io/collector/exporter v0.85.0 + go.opentelemetry.io/collector/component v0.96.0 + go.opentelemetry.io/collector/config/configtelemetry v0.96.0 + go.opentelemetry.io/collector/confmap v0.96.0 + go.opentelemetry.io/collector/exporter v0.96.0 + go.opentelemetry.io/otel/metric v1.24.0 + go.opentelemetry.io/otel/trace v1.24.0 + go.uber.org/goleak v1.3.0 ) require ( + github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.0.1 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.85.0 // indirect - go.opentelemetry.io/collector/consumer v0.85.0 // indirect - go.opentelemetry.io/collector/extension v0.85.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0014 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0014 // indirect - go.opentelemetry.io/otel v1.18.0 // indirect - go.opentelemetry.io/otel/metric v1.18.0 // indirect - go.opentelemetry.io/otel/sdk v1.18.0 // indirect - go.opentelemetry.io/otel/sdk/metric v0.41.0 // indirect - go.opentelemetry.io/otel/trace v1.18.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.96.0 // indirect + go.opentelemetry.io/collector/config/configretry v0.96.0 // indirect + go.opentelemetry.io/collector/consumer v0.96.0 // indirect + go.opentelemetry.io/collector/extension v0.96.0 // indirect + go.opentelemetry.io/collector/pdata v1.3.0 // indirect + go.opentelemetry.io/collector/receiver v0.96.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/grpc v1.58.1 // indirect - google.golang.org/protobuf v1.31.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -65,18 +73,8 @@ replace go.opentelemetry.io/collector/pdata => ../../pdata replace go.opentelemetry.io/collector/receiver => ../../receiver -replace go.opentelemetry.io/collector/semconv => ../../semconv - -replace go.opentelemetry.io/collector/extension/zpagesextension => ../../extension/zpagesextension - replace go.opentelemetry.io/collector/extension => ../../extension -replace go.opentelemetry.io/collector/connector => ../../connector - -replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet - -replace go.opentelemetry.io/collector/processor => ../../processor - replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry -replace go.opentelemetry.io/collector/service => ../../service +replace go.opentelemetry.io/collector/config/configretry => ../../config/configretry diff --git a/exporter/debugexporter/go.sum b/exporter/debugexporter/go.sum index 56e97816e75..dbdb92fd3bb 100644 --- a/exporter/debugexporter/go.sum +++ b/exporter/debugexporter/go.sum @@ -1,55 +1,28 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -58,15 +31,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= -github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -76,83 +48,64 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= -go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= -go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/exporters/prometheus v0.41.0 h1:A3/bhjP5SmELy8dcpK+uttHeh9Qrh+YnS16/VzrztRQ= -go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= -go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= -go.opentelemetry.io/otel/sdk v1.18.0 h1:e3bAB0wB3MljH38sHzpV/qWrOTCFrdZF2ct9F8rBkcY= -go.opentelemetry.io/otel/sdk v1.18.0/go.mod h1:1RCygWV7plY2KmdskZEDDBs4tJeHG92MdHZIluiYs/M= -go.opentelemetry.io/otel/sdk/metric v0.41.0 h1:c3sAt9/pQ5fSIUfl0gPtClV3HhE18DCVzByD33R/zsk= -go.opentelemetry.io/otel/sdk/metric v0.41.0/go.mod h1:PmOmSt+iOklKtIg5O4Vz9H/ttcRFSNTgii+E1KGyn1w= -go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= -go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -160,38 +113,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= -google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +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= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/exporter/debugexporter/internal/metadata/generated_status.go b/exporter/debugexporter/internal/metadata/generated_status.go new file mode 100644 index 00000000000..18587820654 --- /dev/null +++ b/exporter/debugexporter/internal/metadata/generated_status.go @@ -0,0 +1,29 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" +) + +var ( + Type = component.MustNewType("debug") + scopeName = "go.opentelemetry.io/collector/exporter/debugexporter" +) + +const ( + TracesStability = component.StabilityLevelDevelopment + MetricsStability = component.StabilityLevelDevelopment + LogsStability = component.StabilityLevelDevelopment +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter(scopeName) +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer(scopeName) +} diff --git a/exporter/debugexporter/metadata.yaml b/exporter/debugexporter/metadata.yaml new file mode 100644 index 00000000000..4c60b9589e8 --- /dev/null +++ b/exporter/debugexporter/metadata.yaml @@ -0,0 +1,8 @@ +type: debug + +status: + class: exporter + stability: + development: [traces, metrics, logs] + distributions: [core, contrib] + warnings: [Unstable Output Format] diff --git a/exporter/debugexporter/package_test.go b/exporter/debugexporter/package_test.go new file mode 100644 index 00000000000..320777f1ab8 --- /dev/null +++ b/exporter/debugexporter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package debugexporter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/exporter_test.go b/exporter/exporter_test.go index eafa2c03f47..108e55fb582 100644 --- a/exporter/exporter_test.go +++ b/exporter/exporter_test.go @@ -16,12 +16,12 @@ import ( ) func TestNewFactory(t *testing.T) { - const typeStr = "test" + var testType = component.MustNewType("test") defaultCfg := struct{}{} factory := NewFactory( - typeStr, + testType, func() component.Config { return &defaultCfg }) - assert.EqualValues(t, typeStr, factory.Type()) + assert.EqualValues(t, testType, factory.Type()) assert.EqualValues(t, &defaultCfg, factory.CreateDefaultConfig()) _, err := factory.CreateTracesExporter(context.Background(), CreateSettings{}, &defaultCfg) assert.Error(t, err) @@ -32,15 +32,15 @@ func TestNewFactory(t *testing.T) { } func TestNewFactoryWithOptions(t *testing.T) { - const typeStr = "test" + var testType = component.MustNewType("test") defaultCfg := struct{}{} factory := NewFactory( - typeStr, + testType, func() component.Config { return &defaultCfg }, WithTraces(createTraces, component.StabilityLevelDevelopment), WithMetrics(createMetrics, component.StabilityLevelAlpha), WithLogs(createLogs, component.StabilityLevelDeprecated)) - assert.EqualValues(t, typeStr, factory.Type()) + assert.EqualValues(t, testType, factory.Type()) assert.EqualValues(t, &defaultCfg, factory.CreateDefaultConfig()) assert.Equal(t, component.StabilityLevelDevelopment, factory.TracesExporterStability()) @@ -63,8 +63,8 @@ func TestMakeFactoryMap(t *testing.T) { out map[component.Type]Factory } - p1 := NewFactory("p1", nil) - p2 := NewFactory("p2", nil) + p1 := NewFactory(component.MustNewType("p1"), nil) + p2 := NewFactory(component.MustNewType("p2"), nil) testCases := []testCase{ { name: "different names", @@ -76,7 +76,7 @@ func TestMakeFactoryMap(t *testing.T) { }, { name: "same name", - in: []Factory{p1, p2, NewFactory("p1", nil)}, + in: []Factory{p1, p2, NewFactory(component.MustNewType("p1"), nil)}, }, } @@ -97,9 +97,9 @@ func TestMakeFactoryMap(t *testing.T) { func TestBuilder(t *testing.T) { defaultCfg := struct{}{} factories, err := MakeFactoryMap([]Factory{ - NewFactory("err", nil), + NewFactory(component.MustNewType("err"), nil), NewFactory( - "all", + component.MustNewType("all"), func() component.Config { return &defaultCfg }, WithTraces(createTraces, component.StabilityLevelDevelopment), WithMetrics(createMetrics, component.StabilityLevelAlpha), @@ -115,21 +115,21 @@ func TestBuilder(t *testing.T) { }{ { name: "unknown", - id: component.NewID("unknown"), + id: component.MustNewID("unknown"), err: "exporter factory not available for: \"unknown\"", }, { name: "err", - id: component.NewID("err"), + id: component.MustNewID("err"), err: "telemetry type is not supported", }, { name: "all", - id: component.NewID("all"), + id: component.MustNewID("all"), }, { name: "all/named", - id: component.NewIDWithName("all", "named"), + id: component.MustNewIDWithName("all", "named"), }, } @@ -172,7 +172,7 @@ func TestBuilderMissingConfig(t *testing.T) { defaultCfg := struct{}{} factories, err := MakeFactoryMap([]Factory{ NewFactory( - "all", + component.MustNewType("all"), func() component.Config { return &defaultCfg }, WithTraces(createTraces, component.StabilityLevelDevelopment), WithMetrics(createMetrics, component.StabilityLevelAlpha), @@ -183,7 +183,7 @@ func TestBuilderMissingConfig(t *testing.T) { require.NoError(t, err) bErr := NewBuilder(map[component.ID]component.Config{}, factories) - missingID := component.NewIDWithName("all", "missing") + missingID := component.MustNewIDWithName("all", "missing") te, err := bErr.CreateTraces(context.Background(), createSettings(missingID)) assert.EqualError(t, err, "exporter \"all/missing\" is not configured") @@ -199,14 +199,14 @@ func TestBuilderMissingConfig(t *testing.T) { } func TestBuilderFactory(t *testing.T) { - factories, err := MakeFactoryMap([]Factory{NewFactory("foo", nil)}...) + factories, err := MakeFactoryMap([]Factory{NewFactory(component.MustNewType("foo"), nil)}...) require.NoError(t, err) - cfgs := map[component.ID]component.Config{component.NewID("foo"): struct{}{}} + cfgs := map[component.ID]component.Config{component.MustNewID("foo"): struct{}{}} b := NewBuilder(cfgs, factories) - assert.NotNil(t, b.Factory(component.NewID("foo").Type())) - assert.Nil(t, b.Factory(component.NewID("bar").Type())) + assert.NotNil(t, b.Factory(component.MustNewID("foo").Type())) + assert.Nil(t, b.Factory(component.MustNewID("bar").Type())) } var nopInstance = &nopExporter{ diff --git a/exporter/exporterhelper/README.md b/exporter/exporterhelper/README.md index ccbb7ac0096..06ce55ae626 100644 --- a/exporter/exporterhelper/README.md +++ b/exporter/exporterhelper/README.md @@ -12,7 +12,7 @@ The following configuration options can be modified: - `enabled` (default = true) - `initial_interval` (default = 5s): Time to wait after the first failure before retrying; ignored if `enabled` is `false` - `max_interval` (default = 30s): Is the upper bound on backoff; ignored if `enabled` is `false` - - `max_elapsed_time` (default = 300s): Is the maximum amount of time spent trying to send a batch; ignored if `enabled` is `false` + - `max_elapsed_time` (default = 300s): Is the maximum amount of time spent trying to send a batch; ignored if `enabled` is `false`. If set to 0, the retries are never stopped. - `sending_queue` - `enabled` (default = true) - `num_consumers` (default = 10): Number of consumers that dequeue batches; ignored if `enabled` is `false` @@ -22,7 +22,7 @@ The following configuration options can be modified: - `requests_per_second` is the average number of requests per seconds - `requests_per_batch` is the average number of requests per batch (if [the batch processor](https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/batchprocessor) - is used, the metric `batch_send_size` can be used for estimation) + is used, the metric `send_batch_size` can be used for estimation) - `timeout` (default = 5s): Time to wait per individual attempt to send data to a backend The `initial_interval`, `max_interval`, `max_elapsed_time`, and `timeout` options accept @@ -38,7 +38,8 @@ valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". To use the persistent queue, the following setting needs to be set: - `sending_queue` - - `storage` (default = none): When set, enables persistence and uses the component specified as a storage extension for the persistent queue + - `storage` (default = none): When set, enables persistence and uses the component specified as a storage extension for the persistent queue. + There is no in-memory queue when set. The maximum number of batches stored to disk can be controlled using `sending_queue.queue_size` parameter (which, similarly as for in-memory buffering, defaults to 1000 batches). diff --git a/exporter/exporterhelper/common.go b/exporter/exporterhelper/common.go index 127bd66ec55..509570960e8 100644 --- a/exporter/exporterhelper/common.go +++ b/exporter/exporterhelper/common.go @@ -5,70 +5,41 @@ package exporterhelper // import "go.opentelemetry.io/collector/exporter/exporte import ( "context" - "time" + "go.uber.org/multierr" "go.uber.org/zap" - "go.uber.org/zap/zapcore" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/exporter" - "go.opentelemetry.io/collector/exporter/exporterhelper/internal" + "go.opentelemetry.io/collector/exporter/exporterqueue" ) // requestSender is an abstraction of a sender for a request independent of the type of the data (traces, metrics, logs). type requestSender interface { - start(ctx context.Context, host component.Host, set exporter.CreateSettings) error - shutdown() - send(req internal.Request) error + component.Component + send(context.Context, Request) error setNextSender(nextSender requestSender) } type baseRequestSender struct { + component.StartFunc + component.ShutdownFunc nextSender requestSender } var _ requestSender = (*baseRequestSender)(nil) -func (b *baseRequestSender) start(context.Context, component.Host, exporter.CreateSettings) error { - return nil -} - -func (b *baseRequestSender) shutdown() {} - -func (b *baseRequestSender) send(req internal.Request) error { - return b.nextSender.send(req) +func (b *baseRequestSender) send(ctx context.Context, req Request) error { + return b.nextSender.send(ctx, req) } func (b *baseRequestSender) setNextSender(nextSender requestSender) { b.nextSender = nextSender } -type obsrepSenderFactory func(obsrep *obsExporter) requestSender - -// baseRequest is a base implementation for the internal.Request. -type baseRequest struct { - ctx context.Context - processingFinishedCallback func() -} - -func (req *baseRequest) Context() context.Context { - return req.ctx -} - -func (req *baseRequest) SetContext(ctx context.Context) { - req.ctx = ctx -} - -func (req *baseRequest) SetOnProcessingFinished(callback func()) { - req.processingFinishedCallback = callback -} - -func (req *baseRequest) OnProcessingFinished() { - if req.processingFinishedCallback != nil { - req.processingFinishedCallback() - } -} +type obsrepSenderFactory func(obsrep *ObsReport) requestSender // Option apply changes to baseExporter. type Option func(*baseExporter) @@ -97,11 +68,15 @@ func WithTimeout(timeoutSettings TimeoutSettings) Option { } } -// WithRetry overrides the default RetrySettings for an exporter. -// The default RetrySettings is to disable retries. -func WithRetry(retrySettings RetrySettings) Option { +// WithRetry overrides the default configretry.BackOffConfig for an exporter. +// The default configretry.BackOffConfig is to disable retries. +func WithRetry(config configretry.BackOffConfig) Option { return func(o *baseExporter) { - o.retrySender = newRetrySender(o.set.ID, retrySettings, o.sampledLogger, o.onTemporaryFailure) + if !config.Enabled { + o.exportFailureMessage += " Try enabling retry_on_failure config option to retry on retryable errors." + return + } + o.retrySender = newRetrySender(config, o.set) } } @@ -110,20 +85,47 @@ func WithRetry(retrySettings RetrySettings) Option { // This option cannot be used with the new exporter helpers New[Traces|Metrics|Logs]RequestExporter. func WithQueue(config QueueSettings) Option { return func(o *baseExporter) { - if o.requestExporter { - panic("queueing is not available for the new request exporters yet") + if o.marshaler == nil || o.unmarshaler == nil { + panic("WithQueue option is not available for the new request exporters, use WithRequestQueue instead") + } + if !config.Enabled { + o.exportFailureMessage += " Try enabling sending_queue to survive temporary failures." + return + } + qf := exporterqueue.NewPersistentQueueFactory[Request](config.StorageID, exporterqueue.PersistentQueueSettings[Request]{ + Marshaler: o.marshaler, + Unmarshaler: o.unmarshaler, + }) + q := qf(context.Background(), exporterqueue.Settings{ + DataType: o.signal, + ExporterSettings: o.set, + }, exporterqueue.Config{ + Enabled: config.Enabled, + NumConsumers: config.NumConsumers, + QueueSize: config.QueueSize, + }) + o.queueSender = newQueueSender(q, o.set, config.NumConsumers, o.exportFailureMessage) + } +} + +// WithRequestQueue enables queueing for an exporter. +// This option should be used with the new exporter helpers New[Traces|Metrics|Logs]RequestExporter. +// This API is at the early stage of development and may change without backward compatibility +// until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. +func WithRequestQueue(cfg exporterqueue.Config, queueFactory exporterqueue.Factory[Request]) Option { + return func(o *baseExporter) { + if o.marshaler != nil || o.unmarshaler != nil { + panic("WithRequestQueue option must be used with the new request exporters only, use WithQueue instead") } - var queue internal.ProducerConsumerQueue - if config.Enabled { - if config.StorageID == nil { - queue = internal.NewBoundedMemoryQueue(config.QueueSize, config.NumConsumers) - } else { - queue = internal.NewPersistentQueue(config.QueueSize, config.NumConsumers, *config.StorageID, o.marshaler, o.unmarshaler) - } + if !cfg.Enabled { + o.exportFailureMessage += " Try enabling sending_queue to survive temporary failures." + return } - qs := newQueueSender(o.set.ID, o.signal, queue, o.sampledLogger) - o.queueSender = qs - o.setOnTemporaryFailure(qs.onTemporaryFailure) + set := exporterqueue.Settings{ + DataType: o.signal, + ExporterSettings: o.set, + } + o.queueSender = newQueueSender(queueFactory(context.Background(), set, cfg), o.set, cfg.NumConsumers, o.exportFailureMessage) } } @@ -136,19 +138,36 @@ func WithCapabilities(capabilities consumer.Capabilities) Option { } } +// withMarshaler is used to set the request marshaler for the new exporter helper. +// It must be provided as the first option when creating a new exporter helper. +func withMarshaler(marshaler exporterqueue.Marshaler[Request]) Option { + return func(o *baseExporter) { + o.marshaler = marshaler + } +} + +// withUnmarshaler is used to set the request unmarshaler for the new exporter helper. +// It must be provided as the first option when creating a new exporter helper. +func withUnmarshaler(unmarshaler exporterqueue.Unmarshaler[Request]) Option { + return func(o *baseExporter) { + o.unmarshaler = unmarshaler + } +} + // baseExporter contains common fields between different exporter types. type baseExporter struct { component.StartFunc component.ShutdownFunc - requestExporter bool - marshaler internal.RequestMarshaler - unmarshaler internal.RequestUnmarshaler - signal component.DataType + marshaler exporterqueue.Marshaler[Request] + unmarshaler exporterqueue.Unmarshaler[Request] + signal component.DataType - set exporter.CreateSettings - obsrep *obsExporter - sampledLogger *zap.Logger + set exporter.CreateSettings + obsrep *ObsReport + + // Message for the user to be added with an export failure message. + exportFailureMessage string // Chain of senders that the exporter helper applies before passing the data to the actual exporter. // The data is handled by each sender in the respective order starting from the queueSender. @@ -158,35 +177,25 @@ type baseExporter struct { retrySender requestSender timeoutSender *timeoutSender // timeoutSender is always initialized. - // onTemporaryFailure is a function that is called when the retrySender is unable to send data to the next consumer. - onTemporaryFailure onRequestHandlingFinishedFunc - consumerOptions []consumer.Option } -// TODO: requestExporter, marshaler, and unmarshaler arguments can be removed when the old exporter helpers will be updated to call the new ones. -func newBaseExporter(set exporter.CreateSettings, signal component.DataType, requestExporter bool, marshaler internal.RequestMarshaler, - unmarshaler internal.RequestUnmarshaler, osf obsrepSenderFactory, options ...Option) (*baseExporter, error) { - - obsrep, err := newObsExporter(ObsReportSettings{ExporterID: set.ID, ExporterCreateSettings: set}, globalInstruments) +func newBaseExporter(set exporter.CreateSettings, signal component.DataType, osf obsrepSenderFactory, options ...Option) (*baseExporter, error) { + obsReport, err := NewObsReport(ObsReportSettings{ExporterID: set.ID, ExporterCreateSettings: set}) if err != nil { return nil, err } be := &baseExporter{ - requestExporter: requestExporter, - marshaler: marshaler, - unmarshaler: unmarshaler, - signal: signal, + signal: signal, queueSender: &baseRequestSender{}, - obsrepSender: osf(obsrep), + obsrepSender: osf(obsReport), retrySender: &baseRequestSender{}, timeoutSender: &timeoutSender{cfg: NewDefaultTimeoutSettings()}, - set: set, - obsrep: obsrep, - sampledLogger: createSampledLogger(set.Logger), + set: set, + obsrep: obsReport, } for _, op := range options { @@ -198,8 +207,13 @@ func newBaseExporter(set exporter.CreateSettings, signal component.DataType, req } // send sends the request using the first sender in the chain. -func (be *baseExporter) send(req internal.Request) error { - return be.queueSender.send(req) +func (be *baseExporter) send(ctx context.Context, req Request) error { + err := be.queueSender.send(ctx, req) + if err != nil { + be.set.Logger.Error("Exporting failed. Rejecting data."+be.exportFailureMessage, + zap.Error(err), zap.Int("rejected_items", req.ItemsCount())) + } + return err } // connectSenders connects the senders in the predefined order. @@ -216,42 +230,15 @@ func (be *baseExporter) Start(ctx context.Context, host component.Host) error { } // If no error then start the queueSender. - return be.queueSender.start(ctx, host, be.set) + return be.queueSender.Start(ctx, host) } func (be *baseExporter) Shutdown(ctx context.Context) error { - // First shutdown the retry sender, so it can push any pending requests to back the queue. - be.retrySender.shutdown() - - // Then shutdown the queue sender. - be.queueSender.shutdown() - - // Last shutdown the wrapped exporter itself. - return be.ShutdownFunc.Shutdown(ctx) -} - -func (be *baseExporter) setOnTemporaryFailure(onTemporaryFailure onRequestHandlingFinishedFunc) { - be.onTemporaryFailure = onTemporaryFailure - if rs, ok := be.retrySender.(*retrySender); ok { - rs.onTemporaryFailure = onTemporaryFailure - } -} - -func createSampledLogger(logger *zap.Logger) *zap.Logger { - if logger.Core().Enabled(zapcore.DebugLevel) { - // Debugging is enabled. Don't do any sampling. - return logger - } - - // Create a logger that samples all messages to 1 per 10 seconds initially, - // and 1/100 of messages after that. - opts := zap.WrapCore(func(core zapcore.Core) zapcore.Core { - return zapcore.NewSamplerWithOptions( - core, - 10*time.Second, - 1, - 100, - ) - }) - return logger.WithOptions(opts) + return multierr.Combine( + // First shutdown the retry sender, so the queue sender can flush the queue without retries. + be.retrySender.Shutdown(ctx), + // Then shutdown the queue sender. + be.queueSender.Shutdown(ctx), + // Last shutdown the wrapped exporter itself. + be.ShutdownFunc.Shutdown(ctx)) } diff --git a/exporter/exporterhelper/common_test.go b/exporter/exporterhelper/common_test.go index 9889754e231..e3a584b17b1 100644 --- a/exporter/exporterhelper/common_test.go +++ b/exporter/exporterhelper/common_test.go @@ -9,39 +9,35 @@ import ( "testing" "github.com/stretchr/testify/require" - "go.opencensus.io/tag" "go.opentelemetry.io/otel/codes" sdktrace "go.opentelemetry.io/otel/sdk/trace" + "go.uber.org/zap" + "go.uber.org/zap/zaptest/observer" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exporterqueue" "go.opentelemetry.io/collector/exporter/exportertest" ) var ( - defaultID = component.NewID("test") + defaultType = component.MustNewType("test") + defaultID = component.NewID(defaultType) defaultSettings = func() exporter.CreateSettings { set := exportertest.NewNopCreateSettings() set.ID = defaultID return set }() - exporterTag, _ = tag.NewKey("exporter") - defaultExporterTags = []tag.Tag{ - {Key: exporterTag, Value: "test"}, - } ) -func newNoopObsrepSender(_ *obsExporter) requestSender { +func newNoopObsrepSender(*ObsReport) requestSender { return &baseRequestSender{} } func TestBaseExporter(t *testing.T) { - be, err := newBaseExporter(defaultSettings, "", false, nil, nil, newNoopObsrepSender) - require.NoError(t, err) - require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) - require.NoError(t, be.Shutdown(context.Background())) - be, err = newBaseExporter(defaultSettings, "", true, nil, nil, newNoopObsrepSender) + be, err := newBaseExporter(defaultSettings, defaultType, newNoopObsrepSender) require.NoError(t, err) require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) require.NoError(t, be.Shutdown(context.Background())) @@ -50,9 +46,9 @@ func TestBaseExporter(t *testing.T) { func TestBaseExporterWithOptions(t *testing.T) { want := errors.New("my error") be, err := newBaseExporter( - defaultSettings, "", false, nil, nil, newNoopObsrepSender, - WithStart(func(ctx context.Context, host component.Host) error { return want }), - WithShutdown(func(ctx context.Context) error { return want }), + defaultSettings, defaultType, newNoopObsrepSender, + WithStart(func(context.Context, component.Host) error { return want }), + WithShutdown(func(context.Context) error { return want }), WithTimeout(NewDefaultTimeoutSettings()), ) require.NoError(t, err) @@ -69,13 +65,34 @@ func checkStatus(t *testing.T, sd sdktrace.ReadOnlySpan, err error) { } } -func TestQueueRetryOptionsWithRequestExporter(t *testing.T) { - bs, err := newBaseExporter(exportertest.NewNopCreateSettings(), "", true, nil, nil, newNoopObsrepSender, - WithRetry(NewDefaultRetrySettings())) +func TestQueueOptionsWithRequestExporter(t *testing.T) { + bs, err := newBaseExporter(exportertest.NewNopCreateSettings(), defaultType, newNoopObsrepSender, + WithRetry(configretry.NewDefaultBackOffConfig())) require.Nil(t, err) - require.True(t, bs.requestExporter) + require.Nil(t, bs.marshaler) + require.Nil(t, bs.unmarshaler) + require.Panics(t, func() { + _, _ = newBaseExporter(exportertest.NewNopCreateSettings(), defaultType, newNoopObsrepSender, + WithRetry(configretry.NewDefaultBackOffConfig()), WithQueue(NewDefaultQueueSettings())) + }) require.Panics(t, func() { - _, _ = newBaseExporter(exportertest.NewNopCreateSettings(), "", true, nil, nil, newNoopObsrepSender, - WithRetry(NewDefaultRetrySettings()), WithQueue(NewDefaultQueueSettings())) + _, _ = newBaseExporter(exportertest.NewNopCreateSettings(), defaultType, newNoopObsrepSender, + withMarshaler(mockRequestMarshaler), withUnmarshaler(mockRequestUnmarshaler(&mockRequest{})), + WithRetry(configretry.NewDefaultBackOffConfig()), + WithRequestQueue(exporterqueue.NewDefaultConfig(), exporterqueue.NewMemoryQueueFactory[Request]())) }) } + +func TestBaseExporterLogging(t *testing.T) { + set := exportertest.NewNopCreateSettings() + logger, observed := observer.New(zap.DebugLevel) + set.Logger = zap.New(logger) + rCfg := configretry.NewDefaultBackOffConfig() + rCfg.Enabled = false + bs, err := newBaseExporter(set, defaultType, newNoopObsrepSender, WithRetry(rCfg)) + require.Nil(t, err) + sendErr := bs.send(context.Background(), newErrorRequest()) + require.Error(t, sendErr) + + require.Len(t, observed.FilterLevelExact(zap.ErrorLevel).All(), 1) +} diff --git a/exporter/exporterhelper/constants.go b/exporter/exporterhelper/constants.go index a7cfca32aca..57829f08c04 100644 --- a/exporter/exporterhelper/constants.go +++ b/exporter/exporterhelper/constants.go @@ -18,10 +18,10 @@ var ( errNilPushMetricsData = errors.New("nil PushMetrics") // errNilPushLogsData is returned when a nil PushLogs is given. errNilPushLogsData = errors.New("nil PushLogs") - // errNilTracesConverter is returned when a nil TracesConverter is given. - errNilTracesConverter = errors.New("nil TracesConverter") - // errNilMetricsConverter is returned when a nil MetricsConverter is given. - errNilMetricsConverter = errors.New("nil MetricsConverter") - // errNilLogsConverter is returned when a nil LogsConverter is given. - errNilLogsConverter = errors.New("nil LogsConverter") + // errNilTracesConverter is returned when a nil RequestFromTracesFunc is given. + errNilTracesConverter = errors.New("nil RequestFromTracesFunc") + // errNilMetricsConverter is returned when a nil RequestFromMetricsFunc is given. + errNilMetricsConverter = errors.New("nil RequestFromMetricsFunc") + // errNilLogsConverter is returned when a nil RequestFromLogsFunc is given. + errNilLogsConverter = errors.New("nil RequestFromLogsFunc") ) diff --git a/exporter/exporterhelper/internal/bounded_memory_queue.go b/exporter/exporterhelper/internal/bounded_memory_queue.go deleted file mode 100644 index c7f8655338a..00000000000 --- a/exporter/exporterhelper/internal/bounded_memory_queue.go +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright The OpenTelemetry Authors -// Copyright (c) 2019 The Jaeger Authors. -// Copyright (c) 2017 Uber Technologies, Inc. -// SPDX-License-Identifier: Apache-2.0 - -package internal // import "go.opentelemetry.io/collector/exporter/exporterhelper/internal" - -import ( - "context" - "sync" - "sync/atomic" - - "go.opentelemetry.io/collector/component" -) - -// boundedMemoryQueue implements a producer-consumer exchange similar to a ring buffer queue, -// where the queue is bounded and if it fills up due to slow consumers, the new items written by -// the producer are dropped. -type boundedMemoryQueue struct { - stopWG sync.WaitGroup - size *atomic.Uint32 - stopped *atomic.Bool - items chan Request - capacity uint32 - numConsumers int -} - -// NewBoundedMemoryQueue constructs the new queue of specified capacity, and with an optional -// callback for dropped items (e.g. useful to emit metrics). -func NewBoundedMemoryQueue(capacity int, numConsumers int) ProducerConsumerQueue { - return &boundedMemoryQueue{ - items: make(chan Request, capacity), - stopped: &atomic.Bool{}, - size: &atomic.Uint32{}, - capacity: uint32(capacity), - numConsumers: numConsumers, - } -} - -// StartConsumers starts a given number of goroutines consuming items from the queue -// and passing them into the consumer callback. -func (q *boundedMemoryQueue) Start(_ context.Context, _ component.Host, set QueueSettings) error { - var startWG sync.WaitGroup - for i := 0; i < q.numConsumers; i++ { - q.stopWG.Add(1) - startWG.Add(1) - go func() { - startWG.Done() - defer q.stopWG.Done() - for item := range q.items { - q.size.Add(^uint32(0)) - set.Callback(item) - } - }() - } - startWG.Wait() - return nil -} - -// Produce is used by the producer to submit new item to the queue. Returns false in case of queue overflow. -func (q *boundedMemoryQueue) Produce(item Request) bool { - if q.stopped.Load() { - return false - } - - // we might have two concurrent backing queues at the moment - // their combined size is stored in q.size, and their combined capacity - // should match the capacity of the new queue - if q.size.Load() >= q.capacity { - return false - } - - q.size.Add(1) - select { - case q.items <- item: - return true - default: - // should not happen, as overflows should have been captured earlier - q.size.Add(^uint32(0)) - return false - } -} - -// Stop stops all consumers, as well as the length reporter if started, -// and releases the items channel. It blocks until all consumers have stopped. -func (q *boundedMemoryQueue) Stop() { - q.stopped.Store(true) // disable producer - close(q.items) - q.stopWG.Wait() -} - -// Size returns the current size of the queue -func (q *boundedMemoryQueue) Size() int { - return int(q.size.Load()) -} - -func (q *boundedMemoryQueue) Capacity() int { - return int(q.capacity) -} - -func (q *boundedMemoryQueue) IsPersistent() bool { - return false -} diff --git a/exporter/exporterhelper/internal/bounded_memory_queue_test.go b/exporter/exporterhelper/internal/bounded_memory_queue_test.go deleted file mode 100644 index 9fe809cf2a2..00000000000 --- a/exporter/exporterhelper/internal/bounded_memory_queue_test.go +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright The OpenTelemetry Authors -// Copyright (c) 2019 The Jaeger Authors. -// Copyright (c) 2017 Uber Technologies, Inc. -// SPDX-License-Identifier: Apache-2.0 - -package internal - -import ( - "context" - "reflect" - "sync" - "sync/atomic" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/exporter/exportertest" -) - -func newNopQueueSettings(callback func(item Request)) QueueSettings { - return QueueSettings{ - CreateSettings: exportertest.NewNopCreateSettings(), - DataType: component.DataTypeMetrics, - Callback: callback, - } -} - -type stringRequest struct { - Request - str string -} - -func newStringRequest(str string) Request { - return stringRequest{str: str} -} - -// In this test we run a queue with capacity 1 and a single consumer. -// We want to test the overflow behavior, so we block the consumer -// by holding a startLock before submitting items to the queue. -func helper(t *testing.T, startConsumers func(q ProducerConsumerQueue, consumerFn func(item Request))) { - q := NewBoundedMemoryQueue(1, 1) - - var startLock sync.Mutex - - startLock.Lock() // block consumers - consumerState := newConsumerState(t) - - startConsumers(q, func(item Request) { - consumerState.record(item.(stringRequest).str) - - // block further processing until startLock is released - startLock.Lock() - //nolint:staticcheck // SA2001 ignore this! - startLock.Unlock() - }) - - assert.True(t, q.Produce(newStringRequest("a"))) - - // at this point "a" may or may not have been received by the consumer go-routine - // so let's make sure it has been - consumerState.waitToConsumeOnce() - - // at this point the item must have been read off the queue, but the consumer is blocked - assert.Equal(t, 0, q.Size()) - consumerState.assertConsumed(map[string]bool{ - "a": true, - }) - - // produce two more items. The first one should be accepted, but not consumed. - assert.True(t, q.Produce(newStringRequest("b"))) - assert.Equal(t, 1, q.Size()) - // the second should be rejected since the queue is full - assert.False(t, q.Produce(newStringRequest("c"))) - assert.Equal(t, 1, q.Size()) - - startLock.Unlock() // unblock consumer - - consumerState.assertConsumed(map[string]bool{ - "a": true, - "b": true, - }) - - // now that consumers are unblocked, we can add more items - expected := map[string]bool{ - "a": true, - "b": true, - } - for _, item := range []string{"d", "e", "f"} { - assert.True(t, q.Produce(newStringRequest(item))) - expected[item] = true - consumerState.assertConsumed(expected) - } - - q.Stop() - assert.False(t, q.Produce(newStringRequest("x")), "cannot push to closed queue") -} - -func TestBoundedQueue(t *testing.T) { - helper(t, func(q ProducerConsumerQueue, consumerFn func(item Request)) { - assert.NoError(t, q.Start(context.Background(), componenttest.NewNopHost(), newNopQueueSettings(consumerFn))) - }) -} - -// In this test we run a queue with many items and a slow consumer. -// When the queue is stopped, the remaining items should be processed. -// Due to the way q.Stop() waits for all consumers to finish, the -// same lock strategy use above will not work, as calling Unlock -// only after Stop will mean the consumers are still locked while -// trying to perform the final consumptions. -func TestShutdownWhileNotEmpty(t *testing.T) { - q := NewBoundedMemoryQueue(10, 1) - - consumerState := newConsumerState(t) - - assert.NoError(t, q.Start(context.Background(), componenttest.NewNopHost(), newNopQueueSettings(func(item Request) { - consumerState.record(item.(stringRequest).str) - time.Sleep(1 * time.Second) - }))) - - q.Produce(newStringRequest("a")) - q.Produce(newStringRequest("b")) - q.Produce(newStringRequest("c")) - q.Produce(newStringRequest("d")) - q.Produce(newStringRequest("e")) - q.Produce(newStringRequest("f")) - q.Produce(newStringRequest("g")) - q.Produce(newStringRequest("h")) - q.Produce(newStringRequest("i")) - q.Produce(newStringRequest("j")) - - q.Stop() - - assert.False(t, q.Produce(newStringRequest("x")), "cannot push to closed queue") - consumerState.assertConsumed(map[string]bool{ - "a": true, - "b": true, - "c": true, - "d": true, - "e": true, - "f": true, - "g": true, - "h": true, - "i": true, - "j": true, - }) - assert.Equal(t, 0, q.Size()) -} - -type consumerState struct { - sync.Mutex - t *testing.T - consumed map[string]bool - consumedOnce *atomic.Bool -} - -func newConsumerState(t *testing.T) *consumerState { - return &consumerState{ - t: t, - consumed: make(map[string]bool), - consumedOnce: &atomic.Bool{}, - } -} - -func (s *consumerState) record(val string) { - s.Lock() - defer s.Unlock() - s.consumed[val] = true - s.consumedOnce.Store(true) -} - -func (s *consumerState) snapshot() map[string]bool { - s.Lock() - defer s.Unlock() - out := make(map[string]bool) - for k, v := range s.consumed { - out[k] = v - } - return out -} - -func (s *consumerState) waitToConsumeOnce() { - require.Eventually(s.t, s.consumedOnce.Load, 2*time.Second, 10*time.Millisecond, "expected to consumer once") -} - -func (s *consumerState) assertConsumed(expected map[string]bool) { - for i := 0; i < 1000; i++ { - if snapshot := s.snapshot(); !reflect.DeepEqual(snapshot, expected) { - time.Sleep(time.Millisecond) - } - } - assert.Equal(s.t, expected, s.snapshot()) -} - -func TestZeroSize(t *testing.T) { - q := NewBoundedMemoryQueue(0, 1) - - err := q.Start(context.Background(), componenttest.NewNopHost(), newNopQueueSettings(func(item Request) {})) - assert.NoError(t, err) - - assert.False(t, q.Produce(newStringRequest("a"))) // in process -} diff --git a/exporter/exporterhelper/internal/mock_storage.go b/exporter/exporterhelper/internal/mock_storage.go deleted file mode 100644 index 0c544f57238..00000000000 --- a/exporter/exporterhelper/internal/mock_storage.go +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal // import "go.opentelemetry.io/collector/exporter/exporterhelper/internal" - -import ( - "context" - "errors" - "sync" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/extension/experimental/storage" -) - -type mockStorageExtension struct { - component.StartFunc - component.ShutdownFunc - getClientError error -} - -func (m mockStorageExtension) GetClient(_ context.Context, _ component.Kind, _ component.ID, _ string) (storage.Client, error) { - if m.getClientError != nil { - return nil, m.getClientError - } - return &mockStorageClient{st: map[string][]byte{}}, nil -} - -func NewMockStorageExtension(getClientError error) storage.Extension { - return &mockStorageExtension{getClientError: getClientError} -} - -type mockStorageClient struct { - st map[string][]byte - mux sync.Mutex - closeCounter uint64 -} - -func (m *mockStorageClient) Get(_ context.Context, s string) ([]byte, error) { - m.mux.Lock() - defer m.mux.Unlock() - - val, found := m.st[s] - if !found { - return nil, nil - } - - return val, nil -} - -func (m *mockStorageClient) Set(_ context.Context, s string, bytes []byte) error { - m.mux.Lock() - defer m.mux.Unlock() - - m.st[s] = bytes - return nil -} - -func (m *mockStorageClient) Delete(_ context.Context, s string) error { - m.mux.Lock() - defer m.mux.Unlock() - - delete(m.st, s) - return nil -} - -func (m *mockStorageClient) Close(_ context.Context) error { - m.closeCounter++ - return nil -} - -func (m *mockStorageClient) Batch(_ context.Context, ops ...storage.Operation) error { - m.mux.Lock() - defer m.mux.Unlock() - - for _, op := range ops { - switch op.Type { - case storage.Get: - op.Value = m.st[op.Key] - case storage.Set: - m.st[op.Key] = op.Value - case storage.Delete: - delete(m.st, op.Key) - default: - return errors.New("wrong operation type") - } - } - - return nil -} - -func (m *mockStorageClient) getCloseCount() uint64 { - return m.closeCounter -} diff --git a/exporter/exporterhelper/internal/persistent_queue.go b/exporter/exporterhelper/internal/persistent_queue.go deleted file mode 100644 index ba1dcc67230..00000000000 --- a/exporter/exporterhelper/internal/persistent_queue.go +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal // import "go.opentelemetry.io/collector/exporter/exporterhelper/internal" - -import ( - "context" - "errors" - "fmt" - "sync" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/extension/experimental/storage" -) - -var ( - // Monkey patching for unit test - stopStorage = func(queue *persistentQueue) { - queue.storage.stop() - } - errNoStorageClient = errors.New("no storage client extension found") - errWrongExtensionType = errors.New("requested extension is not a storage extension") -) - -// persistentQueue holds the queue backed by file storage -type persistentQueue struct { - stopWG sync.WaitGroup - stopOnce sync.Once - stopChan chan struct{} - storageID component.ID - storage *persistentContiguousStorage - capacity uint64 - numConsumers int - marshaler RequestMarshaler - unmarshaler RequestUnmarshaler -} - -// buildPersistentStorageName returns a name that is constructed out of queue name and signal type. This is done -// to avoid conflicts between different signals, which require unique persistent storage name -func buildPersistentStorageName(name string, signal component.DataType) string { - return fmt.Sprintf("%s-%s", name, signal) -} - -// NewPersistentQueue creates a new queue backed by file storage; name and signal must be a unique combination that identifies the queue storage -func NewPersistentQueue(capacity int, numConsumers int, storageID component.ID, marshaler RequestMarshaler, - unmarshaler RequestUnmarshaler) ProducerConsumerQueue { - return &persistentQueue{ - capacity: uint64(capacity), - numConsumers: numConsumers, - storageID: storageID, - marshaler: marshaler, - unmarshaler: unmarshaler, - stopChan: make(chan struct{}), - } -} - -// Start starts the persistentQueue with the given number of consumers. -func (pq *persistentQueue) Start(ctx context.Context, host component.Host, set QueueSettings) error { - storageClient, err := toStorageClient(ctx, pq.storageID, host, set.ID, set.DataType) - if err != nil { - return err - } - storageName := buildPersistentStorageName(set.ID.Name(), set.DataType) - pq.storage = newPersistentContiguousStorage(ctx, storageName, storageClient, set.Logger, pq.capacity, pq.marshaler, pq.unmarshaler) - for i := 0; i < pq.numConsumers; i++ { - pq.stopWG.Add(1) - go func() { - defer pq.stopWG.Done() - for { - select { - case req := <-pq.storage.get(): - set.Callback(req) - case <-pq.stopChan: - return - } - } - }() - } - return nil -} - -// Produce adds an item to the queue and returns true if it was accepted -func (pq *persistentQueue) Produce(item Request) bool { - err := pq.storage.put(item) - return err == nil -} - -// Stop stops accepting items, shuts down the queue and closes the persistent queue -func (pq *persistentQueue) Stop() { - pq.stopOnce.Do(func() { - // stop the consumers before the storage or the successful processing result will fail to write to persistent storage - close(pq.stopChan) - pq.stopWG.Wait() - stopStorage(pq) - }) -} - -// Size returns the current depth of the queue, excluding the item already in the storage channel (if any) -func (pq *persistentQueue) Size() int { - return int(pq.storage.size()) -} - -func (pq *persistentQueue) Capacity() int { - return int(pq.capacity) -} - -func (pq *persistentQueue) IsPersistent() bool { - return true -} - -func toStorageClient(ctx context.Context, storageID component.ID, host component.Host, ownerID component.ID, signal component.DataType) (storage.Client, error) { - extension, err := getStorageExtension(host.GetExtensions(), storageID) - if err != nil { - return nil, err - } - - client, err := extension.GetClient(ctx, component.KindExporter, ownerID, string(signal)) - if err != nil { - return nil, err - } - - return client, err -} - -func getStorageExtension(extensions map[component.ID]component.Component, storageID component.ID) (storage.Extension, error) { - if ext, found := extensions[storageID]; found { - if storageExt, ok := ext.(storage.Extension); ok { - return storageExt, nil - } - return nil, errWrongExtensionType - } - return nil, errNoStorageClient -} diff --git a/exporter/exporterhelper/internal/persistent_queue_test.go b/exporter/exporterhelper/internal/persistent_queue_test.go deleted file mode 100644 index 08570e92342..00000000000 --- a/exporter/exporterhelper/internal/persistent_queue_test.go +++ /dev/null @@ -1,294 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal - -import ( - "context" - "errors" - "fmt" - "strconv" - "sync/atomic" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/extension/experimental/storage" - "go.opentelemetry.io/collector/extension/extensiontest" - "go.opentelemetry.io/collector/pdata/pcommon" - "go.opentelemetry.io/collector/pdata/ptrace" -) - -type mockHost struct { - component.Host - ext map[component.ID]component.Component -} - -func (nh *mockHost) GetExtensions() map[component.ID]component.Component { - return nh.ext -} - -// createTestQueue creates and starts a fake queue with the given capacity and number of consumers. -func createTestQueue(t *testing.T, capacity, numConsumers int, callback func(item Request)) ProducerConsumerQueue { - pq := NewPersistentQueue(capacity, numConsumers, component.ID{}, newFakeTracesRequestMarshalerFunc(), - newFakeTracesRequestUnmarshalerFunc()) - host := &mockHost{ext: map[component.ID]component.Component{ - {}: NewMockStorageExtension(nil), - }} - err := pq.Start(context.Background(), host, newNopQueueSettings(callback)) - require.NoError(t, err) - t.Cleanup(pq.Stop) - return pq -} - -func TestPersistentQueue_Capacity(t *testing.T) { - for i := 0; i < 100; i++ { - pq := NewPersistentQueue(5, 1, component.ID{}, newFakeTracesRequestMarshalerFunc(), - newFakeTracesRequestUnmarshalerFunc()) - host := &mockHost{ext: map[component.ID]component.Component{ - {}: NewMockStorageExtension(nil), - }} - err := pq.Start(context.Background(), host, newNopQueueSettings(func(req Request) {})) - require.NoError(t, err) - - // Stop consumer to imitate queue overflow - close(pq.(*persistentQueue).stopChan) - pq.(*persistentQueue).stopWG.Wait() - - assert.Equal(t, 0, pq.Size()) - - traces := newTraces(1, 10) - req := newFakeTracesRequest(traces) - - for i := 0; i < 10; i++ { - result := pq.Produce(req) - if i < 6 { - assert.True(t, result) - } else { - assert.False(t, result) - } - - // Let's make sure the loop picks the first element into the channel, - // so the capacity could be used in full - if i == 0 { - assert.Eventually(t, func() bool { - return pq.Size() == 0 - }, 5*time.Second, 10*time.Millisecond) - } - } - assert.Equal(t, 5, pq.Size()) - stopStorage(pq.(*persistentQueue)) - } -} - -func TestPersistentQueue_Close(t *testing.T) { - wq := createTestQueue(t, 1001, 100, func(item Request) {}) - traces := newTraces(1, 10) - req := newFakeTracesRequest(traces) - - for i := 0; i < 1000; i++ { - wq.Produce(req) - } - // This will close the queue very quickly, consumers might not be able to consume anything and should finish gracefully - assert.NotPanics(t, func() { - wq.Stop() - }) - // The additional stop should not panic - assert.NotPanics(t, func() { - wq.Stop() - }) -} - -// Verify storage closes after queue consumers. If not in this order, successfully consumed items won't be updated in storage -func TestPersistentQueue_Close_StorageCloseAfterConsumers(t *testing.T) { - wq := createTestQueue(t, 1001, 1, func(item Request) {}) - traces := newTraces(1, 10) - - lastRequestProcessedTime := time.Now() - req := newFakeTracesRequest(traces) - req.processingFinishedCallback = func() { - lastRequestProcessedTime = time.Now() - } - - fnBefore := stopStorage - stopStorageTime := time.Now() - stopStorage = func(queue *persistentQueue) { - stopStorageTime = time.Now() - queue.storage.stop() - } - - for i := 0; i < 1000; i++ { - wq.Produce(req) - } - assert.NotPanics(t, func() { - wq.Stop() - }) - assert.True(t, stopStorageTime.After(lastRequestProcessedTime), "storage stop time should be after last request processed time") - stopStorage = fnBefore -} - -func TestPersistentQueue_ConsumersProducers(t *testing.T) { - cases := []struct { - numMessagesProduced int - numConsumers int - }{ - { - numMessagesProduced: 1, - numConsumers: 1, - }, - { - numMessagesProduced: 100, - numConsumers: 1, - }, - { - numMessagesProduced: 100, - numConsumers: 3, - }, - { - numMessagesProduced: 1, - numConsumers: 100, - }, - { - numMessagesProduced: 100, - numConsumers: 100, - }, - } - - for _, c := range cases { - t.Run(fmt.Sprintf("#messages: %d #consumers: %d", c.numMessagesProduced, c.numConsumers), func(t *testing.T) { - traces := newTraces(1, 10) - req := newFakeTracesRequest(traces) - - numMessagesConsumed := &atomic.Int32{} - tq := createTestQueue(t, 1000, c.numConsumers, func(item Request) { - if item != nil { - numMessagesConsumed.Add(int32(1)) - } - }) - - for i := 0; i < c.numMessagesProduced; i++ { - tq.Produce(req) - } - - assert.Eventually(t, func() bool { - return c.numMessagesProduced == int(numMessagesConsumed.Load()) - }, 5*time.Second, 10*time.Millisecond) - }) - } -} - -func newTraces(numTraces int, numSpans int) ptrace.Traces { - traces := ptrace.NewTraces() - batch := traces.ResourceSpans().AppendEmpty() - batch.Resource().Attributes().PutStr("resource-attr", "some-resource") - batch.Resource().Attributes().PutInt("num-traces", int64(numTraces)) - batch.Resource().Attributes().PutInt("num-spans", int64(numSpans)) - - for i := 0; i < numTraces; i++ { - traceID := pcommon.TraceID([16]byte{1, 2, 3, byte(i)}) - ils := batch.ScopeSpans().AppendEmpty() - for j := 0; j < numSpans; j++ { - span := ils.Spans().AppendEmpty() - span.SetTraceID(traceID) - span.SetSpanID([8]byte{1, 2, 3, byte(j)}) - span.SetName("should-not-be-changed") - span.Attributes().PutInt("int-attribute", int64(j)) - span.Attributes().PutStr("str-attribute-1", "foobar") - span.Attributes().PutStr("str-attribute-2", "fdslafjasdk12312312jkl") - span.Attributes().PutStr("str-attribute-3", "AbcDefGeKKjkfdsafasdfsdasdf") - span.Attributes().PutStr("str-attribute-4", "xxxxxx") - span.Attributes().PutStr("str-attribute-5", "abcdef") - } - } - - return traces -} - -func TestToStorageClient(t *testing.T) { - getStorageClientError := errors.New("unable to create storage client") - testCases := []struct { - desc string - storage storage.Extension - numStorages int - storageIndex int - expectedError error - getClientError error - }{ - { - desc: "obtain storage extension by name", - numStorages: 2, - storageIndex: 0, - expectedError: nil, - }, - { - desc: "fail on not existing storage extension", - numStorages: 2, - storageIndex: 100, - expectedError: errNoStorageClient, - }, - { - desc: "invalid extension type", - numStorages: 2, - storageIndex: 100, - expectedError: errNoStorageClient, - }, - { - desc: "fail on error getting storage client from extension", - numStorages: 1, - storageIndex: 0, - expectedError: getStorageClientError, - getClientError: getStorageClientError, - }, - } - - for _, tC := range testCases { - t.Run(tC.desc, func(t *testing.T) { - storageID := component.NewIDWithName("file_storage", strconv.Itoa(tC.storageIndex)) - - var extensions = map[component.ID]component.Component{} - for i := 0; i < tC.numStorages; i++ { - extensions[component.NewIDWithName("file_storage", strconv.Itoa(i))] = NewMockStorageExtension(tC.getClientError) - } - host := &mockHost{ext: extensions} - ownerID := component.NewID("foo_exporter") - - // execute - client, err := toStorageClient(context.Background(), storageID, host, ownerID, component.DataTypeTraces) - - // verify - if tC.expectedError != nil { - assert.ErrorIs(t, err, tC.expectedError) - assert.Nil(t, client) - } else { - assert.NoError(t, err) - assert.NotNil(t, client) - } - }) - } -} - -func TestInvalidStorageExtensionType(t *testing.T) { - storageID := component.NewIDWithName("extension", "extension") - - // make a test extension - factory := extensiontest.NewNopFactory() - extConfig := factory.CreateDefaultConfig() - settings := extensiontest.NewNopCreateSettings() - extension, err := factory.CreateExtension(context.Background(), settings, extConfig) - assert.NoError(t, err) - var extensions = map[component.ID]component.Component{ - storageID: extension, - } - host := &mockHost{ext: extensions} - ownerID := component.NewID("foo_exporter") - - // execute - client, err := toStorageClient(context.Background(), storageID, host, ownerID, component.DataTypeTraces) - - // we should get an error about the extension type - assert.ErrorIs(t, err, errWrongExtensionType) - assert.Nil(t, client) -} diff --git a/exporter/exporterhelper/internal/persistent_storage.go b/exporter/exporterhelper/internal/persistent_storage.go deleted file mode 100644 index 49f204bbb0d..00000000000 --- a/exporter/exporterhelper/internal/persistent_storage.go +++ /dev/null @@ -1,413 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal // import "go.opentelemetry.io/collector/exporter/exporterhelper/internal" - -import ( - "context" - "errors" - "fmt" - "strconv" - "sync" - "sync/atomic" - - "go.uber.org/zap" - - "go.opentelemetry.io/collector/extension/experimental/storage" -) - -// persistentContiguousStorage provides a persistent queue implementation backed by file storage extension -// -// Write index describes the position at which next item is going to be stored. -// Read index describes which item needs to be read next. -// When Write index = Read index, no elements are in the queue. -// -// The items currently dispatched by consumers are not deleted until the processing is finished. -// Their list is stored under a separate key. -// -// ┌───────file extension-backed queue───────┐ -// │ │ -// │ ┌───┐ ┌───┐ ┌───┐ ┌───┐ ┌───┐ │ -// │ n+1 │ n │ ... │ 4 │ │ 3 │ │ 2 │ │ 1 │ │ -// │ └───┘ └───┘ └─x─┘ └─|─┘ └─x─┘ │ -// │ x | x │ -// └───────────────────────x─────|─────x─────┘ -// ▲ ▲ x | x -// │ │ x | xxxx deleted -// │ │ x | -// write read x └── currently dispatched item -// index index x -// xxxx deleted -type persistentContiguousStorage struct { - logger *zap.Logger - queueName string - client storage.Client - unmarshaler RequestUnmarshaler - marshaler RequestMarshaler - - putChan chan struct{} - stopChan chan struct{} - stopOnce sync.Once - capacity uint64 - - reqChan chan Request - - mu sync.Mutex - readIndex itemIndex - writeIndex itemIndex - currentlyDispatchedItems []itemIndex - - itemsCount *atomic.Uint64 -} - -type itemIndex uint64 - -const ( - zapKey = "key" - zapQueueNameKey = "queueName" - zapErrorCount = "errorCount" - zapNumberOfItems = "numberOfItems" - - readIndexKey = "ri" - writeIndexKey = "wi" - currentlyDispatchedItemsKey = "di" -) - -var ( - errMaxCapacityReached = errors.New("max capacity reached") - errValueNotSet = errors.New("value not set") - errKeyNotPresentInBatch = errors.New("key was not present in get batchStruct") -) - -// newPersistentContiguousStorage creates a new file-storage extension backed queue; -// queueName parameter must be a unique value that identifies the queue. -func newPersistentContiguousStorage(ctx context.Context, queueName string, client storage.Client, - logger *zap.Logger, capacity uint64, marshaler RequestMarshaler, unmarshaler RequestUnmarshaler) *persistentContiguousStorage { - pcs := &persistentContiguousStorage{ - logger: logger, - client: client, - queueName: queueName, - unmarshaler: unmarshaler, - marshaler: marshaler, - capacity: capacity, - putChan: make(chan struct{}, capacity), - reqChan: make(chan Request), - stopChan: make(chan struct{}), - itemsCount: &atomic.Uint64{}, - } - - initPersistentContiguousStorage(ctx, pcs) - notDispatchedReqs := pcs.retrieveNotDispatchedReqs(context.Background()) - - // Make sure the leftover requests are handled - pcs.enqueueNotDispatchedReqs(notDispatchedReqs) - - // Ensure the communication channel has the same size as the queue - // We might already have items here from requeueing non-dispatched requests - for len(pcs.putChan) < int(pcs.size()) { - pcs.putChan <- struct{}{} - } - - // start the loop which moves items from storage to the outbound channel - go pcs.loop() - - return pcs -} - -func initPersistentContiguousStorage(ctx context.Context, pcs *persistentContiguousStorage) { - var writeIndex itemIndex - var readIndex itemIndex - batch, err := newBatch(pcs).get(readIndexKey, writeIndexKey).execute(ctx) - - if err == nil { - readIndex, err = batch.getItemIndexResult(readIndexKey) - } - - if err == nil { - writeIndex, err = batch.getItemIndexResult(writeIndexKey) - } - - if err != nil { - if errors.Is(err, errValueNotSet) { - pcs.logger.Info("Initializing new persistent queue", zap.String(zapQueueNameKey, pcs.queueName)) - } else { - pcs.logger.Error("Failed getting read/write index, starting with new ones", - zap.String(zapQueueNameKey, pcs.queueName), - zap.Error(err)) - } - pcs.readIndex = 0 - pcs.writeIndex = 0 - } else { - pcs.readIndex = readIndex - pcs.writeIndex = writeIndex - } - - pcs.itemsCount.Store(uint64(pcs.writeIndex - pcs.readIndex)) -} - -func (pcs *persistentContiguousStorage) enqueueNotDispatchedReqs(reqs []Request) { - if len(reqs) > 0 { - errCount := 0 - for _, req := range reqs { - if req == nil || pcs.put(req) != nil { - errCount++ - } - } - if errCount > 0 { - pcs.logger.Error("Errors occurred while moving items for dispatching back to queue", - zap.String(zapQueueNameKey, pcs.queueName), - zap.Int(zapNumberOfItems, len(reqs)), zap.Int(zapErrorCount, errCount)) - - } else { - pcs.logger.Info("Moved items for dispatching back to queue", - zap.String(zapQueueNameKey, pcs.queueName), - zap.Int(zapNumberOfItems, len(reqs))) - - } - } -} - -// loop is the main loop that handles fetching items from the persistent buffer -func (pcs *persistentContiguousStorage) loop() { - for { - select { - case <-pcs.stopChan: - return - case <-pcs.putChan: - req, found := pcs.getNextItem(context.Background()) - if found { - pcs.reqChan <- req - } - } - } -} - -// get returns the request channel that all the requests will be send on -func (pcs *persistentContiguousStorage) get() <-chan Request { - return pcs.reqChan -} - -// size returns the number of currently available items, which were not picked by consumers yet -func (pcs *persistentContiguousStorage) size() uint64 { - return pcs.itemsCount.Load() -} - -func (pcs *persistentContiguousStorage) stop() { - pcs.logger.Debug("Stopping persistentContiguousStorage", zap.String(zapQueueNameKey, pcs.queueName)) - pcs.stopOnce.Do(func() { - close(pcs.stopChan) - if err := pcs.client.Close(context.Background()); err != nil { - pcs.logger.Warn("failed to close client", zap.Error(err)) - } - }) -} - -// put marshals the request and puts it into the persistent queue -func (pcs *persistentContiguousStorage) put(req Request) error { - // Nil requests are ignored - if req == nil { - return nil - } - - pcs.mu.Lock() - defer pcs.mu.Unlock() - - if pcs.size() >= pcs.capacity { - pcs.logger.Warn("Maximum queue capacity reached", zap.String(zapQueueNameKey, pcs.queueName)) - return errMaxCapacityReached - } - - itemKey := pcs.itemKey(pcs.writeIndex) - pcs.writeIndex++ - pcs.itemsCount.Store(uint64(pcs.writeIndex - pcs.readIndex)) - - ctx := context.Background() - _, err := newBatch(pcs).setItemIndex(writeIndexKey, pcs.writeIndex).setRequest(itemKey, req).execute(ctx) - - // Inform the loop that there's some data to process - pcs.putChan <- struct{}{} - - return err -} - -// getNextItem pulls the next available item from the persistent storage; if none is found, returns (nil, false) -func (pcs *persistentContiguousStorage) getNextItem(ctx context.Context) (Request, bool) { - pcs.mu.Lock() - defer pcs.mu.Unlock() - - if pcs.readIndex != pcs.writeIndex { - index := pcs.readIndex - // Increase here, so even if errors happen below, it always iterates - pcs.readIndex++ - pcs.itemsCount.Store(uint64(pcs.writeIndex - pcs.readIndex)) - - pcs.updateReadIndex(ctx) - pcs.itemDispatchingStart(ctx, index) - - var req Request - batch, err := newBatch(pcs).get(pcs.itemKey(index)).execute(ctx) - if err == nil { - req, err = batch.getRequestResult(pcs.itemKey(index)) - } - - if err != nil || req == nil { - // We need to make sure that currently dispatched items list is cleaned - if err := pcs.itemDispatchingFinish(ctx, index); err != nil { - pcs.logger.Error("Error deleting item from queue", - zap.String(zapQueueNameKey, pcs.queueName), zap.Error(err)) - } - - return nil, false - } - - // If all went well so far, cleanup will be handled by callback - req.SetOnProcessingFinished(func() { - pcs.mu.Lock() - defer pcs.mu.Unlock() - if err := pcs.itemDispatchingFinish(ctx, index); err != nil { - pcs.logger.Error("Error deleting item from queue", - zap.String(zapQueueNameKey, pcs.queueName), zap.Error(err)) - } - }) - return req, true - } - - return nil, false -} - -// retrieveNotDispatchedReqs gets the items for which sending was not finished, cleans the storage -// and moves the items back to the queue. The function returns an array which might contain nils -// if unmarshalling of the value at a given index was not possible. -func (pcs *persistentContiguousStorage) retrieveNotDispatchedReqs(ctx context.Context) []Request { - var reqs []Request - var dispatchedItems []itemIndex - - pcs.mu.Lock() - defer pcs.mu.Unlock() - - pcs.logger.Debug("Checking if there are items left for dispatch by consumers", zap.String(zapQueueNameKey, pcs.queueName)) - batch, err := newBatch(pcs).get(currentlyDispatchedItemsKey).execute(ctx) - if err == nil { - dispatchedItems, err = batch.getItemIndexArrayResult(currentlyDispatchedItemsKey) - } - if err != nil { - pcs.logger.Error("Could not fetch items left for dispatch by consumers", zap.String(zapQueueNameKey, pcs.queueName), zap.Error(err)) - return reqs - } - - if len(dispatchedItems) > 0 { - pcs.logger.Info("Fetching items left for dispatch by consumers", - zap.String(zapQueueNameKey, pcs.queueName), zap.Int(zapNumberOfItems, len(dispatchedItems))) - } else { - pcs.logger.Debug("No items left for dispatch by consumers") - } - - reqs = make([]Request, len(dispatchedItems)) - keys := make([]string, len(dispatchedItems)) - retrieveBatch := newBatch(pcs) - cleanupBatch := newBatch(pcs) - for i, it := range dispatchedItems { - keys[i] = pcs.itemKey(it) - retrieveBatch.get(keys[i]) - cleanupBatch.delete(keys[i]) - } - - _, retrieveErr := retrieveBatch.execute(ctx) - _, cleanupErr := cleanupBatch.execute(ctx) - - if retrieveErr != nil { - pcs.logger.Warn("Failed retrieving items left by consumers", zap.String(zapQueueNameKey, pcs.queueName), zap.Error(retrieveErr)) - } - - if cleanupErr != nil { - pcs.logger.Debug("Failed cleaning items left by consumers", zap.String(zapQueueNameKey, pcs.queueName), zap.Error(cleanupErr)) - } - - if retrieveErr != nil { - return reqs - } - - for i, key := range keys { - req, err := retrieveBatch.getRequestResult(key) - // If error happened or item is nil, it will be efficiently ignored - if err != nil { - pcs.logger.Warn("Failed unmarshalling item", - zap.String(zapQueueNameKey, pcs.queueName), zap.String(zapKey, key), zap.Error(err)) - } else { - if req == nil { - pcs.logger.Debug("Item value could not be retrieved", - zap.String(zapQueueNameKey, pcs.queueName), zap.String(zapKey, key), zap.Error(err)) - } else { - reqs[i] = req - } - } - } - - return reqs -} - -// itemDispatchingStart appends the item to the list of currently dispatched items -func (pcs *persistentContiguousStorage) itemDispatchingStart(ctx context.Context, index itemIndex) { - pcs.currentlyDispatchedItems = append(pcs.currentlyDispatchedItems, index) - _, err := newBatch(pcs). - setItemIndexArray(currentlyDispatchedItemsKey, pcs.currentlyDispatchedItems). - execute(ctx) - if err != nil { - pcs.logger.Debug("Failed updating currently dispatched items", - zap.String(zapQueueNameKey, pcs.queueName), zap.Error(err)) - } -} - -// itemDispatchingFinish removes the item from the list of currently dispatched items and deletes it from the persistent queue -func (pcs *persistentContiguousStorage) itemDispatchingFinish(ctx context.Context, index itemIndex) error { - var batch *batchStruct - var updatedDispatchedItems []itemIndex - for _, it := range pcs.currentlyDispatchedItems { - if it != index { - updatedDispatchedItems = append(updatedDispatchedItems, it) - } - } - pcs.currentlyDispatchedItems = updatedDispatchedItems - - batch = newBatch(pcs). - setItemIndexArray(currentlyDispatchedItemsKey, pcs.currentlyDispatchedItems). - delete(pcs.itemKey(index)) - if _, err := batch.execute(ctx); err != nil { - // got an error, try to gracefully handle it - pcs.logger.Warn("Failed updating currently dispatched items, trying to delete the item first", - zap.String(zapQueueNameKey, pcs.queueName), zap.Error(err)) - } else { - // Everything ok, exit - return nil - } - - if _, err := newBatch(pcs).delete(pcs.itemKey(index)).execute(ctx); err != nil { - // Return an error here, as this indicates an issue with the underlying storage medium - return fmt.Errorf("failed deleting item from queue, got error from storage: %w", err) - } - - batch = newBatch(pcs). - setItemIndexArray(currentlyDispatchedItemsKey, pcs.currentlyDispatchedItems) - if _, err := batch.execute(ctx); err != nil { - // even if this fails, we still have the right dispatched items in memory - // at worst, we'll have the wrong list in storage, and we'll discard the nonexistent items during startup - return fmt.Errorf("failed updating currently dispatched items, but deleted item successfully: %w", err) - } - - return nil -} - -func (pcs *persistentContiguousStorage) updateReadIndex(ctx context.Context) { - _, err := newBatch(pcs). - setItemIndex(readIndexKey, pcs.readIndex). - execute(ctx) - - if err != nil { - pcs.logger.Debug("Failed updating read index", - zap.String(zapQueueNameKey, pcs.queueName), zap.Error(err)) - } -} - -func (pcs *persistentContiguousStorage) itemKey(index itemIndex) string { - return strconv.FormatUint(uint64(index), 10) -} diff --git a/exporter/exporterhelper/internal/persistent_storage_batch.go b/exporter/exporterhelper/internal/persistent_storage_batch.go deleted file mode 100644 index a80ba93c5c3..00000000000 --- a/exporter/exporterhelper/internal/persistent_storage_batch.go +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal // import "go.opentelemetry.io/collector/exporter/exporterhelper/internal" - -import ( - "bytes" - "context" - "encoding/binary" - "errors" - - "go.uber.org/zap" - - "go.opentelemetry.io/collector/extension/experimental/storage" -) - -var errItemIndexArrInvalidDataType = errors.New("invalid data type, expected []itemIndex") - -// batchStruct provides convenience capabilities for creating and processing storage extension batches -type batchStruct struct { - logger *zap.Logger - pcs *persistentContiguousStorage - - operations []storage.Operation - getOperations map[string]storage.Operation -} - -func newBatch(pcs *persistentContiguousStorage) *batchStruct { - return &batchStruct{ - logger: pcs.logger, - pcs: pcs, - operations: []storage.Operation{}, - getOperations: map[string]storage.Operation{}, - } -} - -// execute runs the provided operations in order -func (bof *batchStruct) execute(ctx context.Context) (*batchStruct, error) { - err := bof.pcs.client.Batch(ctx, bof.operations...) - if err != nil { - return nil, err - } - - return bof, nil -} - -// set adds a Set operation to the batch -func (bof *batchStruct) set(key string, value any, marshal func(any) ([]byte, error)) *batchStruct { - valueBytes, err := marshal(value) - if err != nil { - bof.logger.Debug("Failed marshaling item, skipping it", zap.String(zapKey, key), zap.Error(err)) - } else { - bof.operations = append(bof.operations, storage.SetOperation(key, valueBytes)) - } - - return bof -} - -// get adds a Get operation to the batch. After executing, its result will be available through getResult -func (bof *batchStruct) get(keys ...string) *batchStruct { - for _, key := range keys { - op := storage.GetOperation(key) - bof.getOperations[key] = op - bof.operations = append(bof.operations, op) - } - - return bof -} - -// delete adds a Delete operation to the batch -func (bof *batchStruct) delete(keys ...string) *batchStruct { - for _, key := range keys { - bof.operations = append(bof.operations, storage.DeleteOperation(key)) - } - - return bof -} - -// getResult returns the result of a Get operation for a given key using the provided unmarshal function. -// It should be called after execute. It may return nil value -func (bof *batchStruct) getResult(key string, unmarshal func([]byte) (any, error)) (any, error) { - op := bof.getOperations[key] - if op == nil { - return nil, errKeyNotPresentInBatch - } - - if op.Value == nil { - return nil, nil - } - - return unmarshal(op.Value) -} - -// getRequestResult returns the result of a Get operation as a request -// If the value cannot be retrieved, it returns an error -func (bof *batchStruct) getRequestResult(key string) (Request, error) { - reqIf, err := bof.getResult(key, bof.bytesToRequest) - if err != nil { - return nil, err - } - if reqIf == nil { - return nil, errValueNotSet - } - - return reqIf.(Request), nil -} - -// getItemIndexResult returns the result of a Get operation as an itemIndex -// If the value cannot be retrieved, it returns an error -func (bof *batchStruct) getItemIndexResult(key string) (itemIndex, error) { - itemIndexIf, err := bof.getResult(key, bytesToItemIndex) - if err != nil { - return itemIndex(0), err - } - - if itemIndexIf == nil { - return itemIndex(0), errValueNotSet - } - - return itemIndexIf.(itemIndex), nil -} - -// getItemIndexArrayResult returns the result of a Get operation as a itemIndexArray -// It may return nil value -func (bof *batchStruct) getItemIndexArrayResult(key string) ([]itemIndex, error) { - itemIndexArrIf, err := bof.getResult(key, bytesToItemIndexArray) - if err != nil { - return nil, err - } - - if itemIndexArrIf == nil { - return nil, nil - } - - return itemIndexArrIf.([]itemIndex), nil -} - -// setRequest adds Set operation over a given request to the batch -func (bof *batchStruct) setRequest(key string, value Request) *batchStruct { - return bof.set(key, value, bof.requestToBytes) -} - -// setItemIndex adds Set operation over a given itemIndex to the batch -func (bof *batchStruct) setItemIndex(key string, value itemIndex) *batchStruct { - return bof.set(key, value, itemIndexToBytes) -} - -// setItemIndexArray adds Set operation over a given itemIndex array to the batch -func (bof *batchStruct) setItemIndexArray(key string, value []itemIndex) *batchStruct { - return bof.set(key, value, itemIndexArrayToBytes) -} - -func itemIndexToBytes(val any) ([]byte, error) { - var buf bytes.Buffer - err := binary.Write(&buf, binary.LittleEndian, val) - if err != nil { - return nil, err - } - return buf.Bytes(), err -} - -func bytesToItemIndex(b []byte) (any, error) { - var val itemIndex - err := binary.Read(bytes.NewReader(b), binary.LittleEndian, &val) - if err != nil { - return val, err - } - return val, nil -} - -func itemIndexArrayToBytes(arr any) ([]byte, error) { - var buf bytes.Buffer - size := 0 - - if arr != nil { - arrItemIndex, ok := arr.([]itemIndex) - if ok { - size = len(arrItemIndex) - } else { - return nil, errItemIndexArrInvalidDataType - } - } - - err := binary.Write(&buf, binary.LittleEndian, uint32(size)) - if err != nil { - return nil, err - } - - err = binary.Write(&buf, binary.LittleEndian, arr) - if err != nil { - return nil, err - } - return buf.Bytes(), err -} - -func bytesToItemIndexArray(b []byte) (any, error) { - var size uint32 - reader := bytes.NewReader(b) - err := binary.Read(reader, binary.LittleEndian, &size) - if err != nil { - return nil, err - } - - val := make([]itemIndex, size) - err = binary.Read(reader, binary.LittleEndian, &val) - return val, err -} - -func (bof *batchStruct) requestToBytes(req any) ([]byte, error) { - return bof.pcs.marshaler(req.(Request)) -} - -func (bof *batchStruct) bytesToRequest(b []byte) (any, error) { - return bof.pcs.unmarshaler(b) -} diff --git a/exporter/exporterhelper/internal/persistent_storage_batch_test.go b/exporter/exporterhelper/internal/persistent_storage_batch_test.go deleted file mode 100644 index 2784ca92759..00000000000 --- a/exporter/exporterhelper/internal/persistent_storage_batch_test.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestPersistentStorageBatch_Operations(t *testing.T) { - ext := NewMockStorageExtension(nil) - client := createTestClient(ext) - ps := createTestPersistentStorage(client) - - itemIndexValue := itemIndex(123) - itemIndexArrayValue := []itemIndex{itemIndex(1), itemIndex(2)} - - _, err := newBatch(ps). - setItemIndex("index", itemIndexValue). - setItemIndexArray("arr", itemIndexArrayValue). - execute(context.Background()) - require.NoError(t, err) - - batch, err := newBatch(ps). - get("index", "arr"). - execute(context.Background()) - require.NoError(t, err) - - retrievedItemIndexValue, err := batch.getItemIndexResult("index") - require.NoError(t, err) - assert.Equal(t, itemIndexValue, retrievedItemIndexValue) - - retrievedItemIndexArrayValue, err := batch.getItemIndexArrayResult("arr") - require.NoError(t, err) - assert.Equal(t, itemIndexArrayValue, retrievedItemIndexArrayValue) - - _, err = newBatch(ps).delete("index", "arr").execute(context.Background()) - require.NoError(t, err) - - batch, err = newBatch(ps). - get("index", "arr"). - execute(context.Background()) - require.NoError(t, err) - - _, err = batch.getItemIndexResult("index") - assert.Error(t, err, errValueNotSet) - - retrievedItemIndexArrayValue, err = batch.getItemIndexArrayResult("arr") - require.NoError(t, err) - assert.Nil(t, retrievedItemIndexArrayValue) -} diff --git a/exporter/exporterhelper/internal/persistent_storage_test.go b/exporter/exporterhelper/internal/persistent_storage_test.go deleted file mode 100644 index d48bbd75285..00000000000 --- a/exporter/exporterhelper/internal/persistent_storage_test.go +++ /dev/null @@ -1,714 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal - -import ( - "context" - "errors" - "fmt" - "reflect" - "sync" - "syscall" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.uber.org/zap" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/extension/experimental/storage" - "go.opentelemetry.io/collector/pdata/ptrace" -) - -func createTestClient(extension storage.Extension) storage.Client { - client, err := extension.GetClient(context.Background(), component.KindReceiver, component.ID{}, "") - if err != nil { - panic(err) - } - return client -} - -func createTestPersistentStorageWithLoggingAndCapacity(client storage.Client, logger *zap.Logger, capacity uint64) *persistentContiguousStorage { - return newPersistentContiguousStorage(context.Background(), "foo", client, logger, capacity, - newFakeTracesRequestMarshalerFunc(), newFakeTracesRequestUnmarshalerFunc()) -} - -func createTestPersistentStorage(client storage.Client) *persistentContiguousStorage { - logger := zap.NewNop() - return createTestPersistentStorageWithLoggingAndCapacity(client, logger, 1000) -} - -type fakeTracesRequest struct { - td ptrace.Traces - processingFinishedCallback func() - Request -} - -func newFakeTracesRequest(td ptrace.Traces) *fakeTracesRequest { - return &fakeTracesRequest{ - td: td, - } -} - -func (fd *fakeTracesRequest) OnProcessingFinished() { - if fd.processingFinishedCallback != nil { - fd.processingFinishedCallback() - } -} - -func (fd *fakeTracesRequest) SetOnProcessingFinished(callback func()) { - fd.processingFinishedCallback = callback -} - -func newFakeTracesRequestUnmarshalerFunc() RequestUnmarshaler { - return func(bytes []byte) (Request, error) { - unmarshaler := ptrace.ProtoUnmarshaler{} - traces, err := unmarshaler.UnmarshalTraces(bytes) - if err != nil { - return nil, err - } - return newFakeTracesRequest(traces), nil - } -} - -func newFakeTracesRequestMarshalerFunc() RequestMarshaler { - return func(req Request) ([]byte, error) { - marshaler := ptrace.ProtoMarshaler{} - return marshaler.MarshalTraces(req.(*fakeTracesRequest).td) - } -} - -func TestPersistentStorage_CorruptedData(t *testing.T) { - traces := newTraces(5, 10) - req := newFakeTracesRequest(traces) - - cases := []struct { - name string - corruptAllData bool - corruptSomeData bool - corruptCurrentlyDispatchedItemsKey bool - corruptReadIndex bool - corruptWriteIndex bool - desiredQueueSize uint64 - desiredNumberOfDispatchedItems int - }{ - { - name: "corrupted no items", - corruptAllData: false, - desiredQueueSize: 2, - desiredNumberOfDispatchedItems: 1, - }, - { - name: "corrupted all items", - corruptAllData: true, - desiredQueueSize: 0, - desiredNumberOfDispatchedItems: 0, - }, - { - name: "corrupted some items", - corruptSomeData: true, - desiredQueueSize: 1, - desiredNumberOfDispatchedItems: 1, - }, - { - name: "corrupted dispatched items key", - corruptCurrentlyDispatchedItemsKey: true, - desiredQueueSize: 1, - desiredNumberOfDispatchedItems: 1, - }, - { - name: "corrupted read index", - corruptReadIndex: true, - desiredQueueSize: 0, - desiredNumberOfDispatchedItems: 1, - }, - { - name: "corrupted write index", - corruptWriteIndex: true, - desiredQueueSize: 0, - desiredNumberOfDispatchedItems: 1, - }, - { - name: "corrupted everything", - corruptAllData: true, - corruptCurrentlyDispatchedItemsKey: true, - corruptReadIndex: true, - corruptWriteIndex: true, - desiredQueueSize: 0, - desiredNumberOfDispatchedItems: 0, - }, - } - - badBytes := []byte{0, 1, 2} - - for _, c := range cases { - t.Run(c.name, func(t *testing.T) { - ext := NewMockStorageExtension(nil) - client := createTestClient(ext) - ps := createTestPersistentStorage(client) - - ctx := context.Background() - - // Put some items, make sure they are loaded and shutdown the storage... - for i := 0; i < 3; i++ { - err := ps.put(req) - require.NoError(t, err) - } - require.Eventually(t, func() bool { - return ps.size() == 2 - }, 5*time.Second, 10*time.Millisecond) - ps.stop() - - // ... so now we can corrupt data (in several ways) - if c.corruptAllData || c.corruptSomeData { - _ = client.Set(ctx, "0", badBytes) - } - if c.corruptAllData { - _ = client.Set(ctx, "1", badBytes) - _ = client.Set(ctx, "2", badBytes) - } - - if c.corruptCurrentlyDispatchedItemsKey { - _ = client.Set(ctx, currentlyDispatchedItemsKey, badBytes) - } - - if c.corruptReadIndex { - _ = client.Set(ctx, readIndexKey, badBytes) - } - - if c.corruptWriteIndex { - _ = client.Set(ctx, writeIndexKey, badBytes) - } - - // Reload - newPs := createTestPersistentStorage(client) - - require.Eventually(t, func() bool { - newPs.mu.Lock() - defer newPs.mu.Unlock() - return newPs.size() == c.desiredQueueSize && len(newPs.currentlyDispatchedItems) == c.desiredNumberOfDispatchedItems - }, 5*time.Second, 10*time.Millisecond) - }) - } -} - -func TestPersistentStorage_CurrentlyProcessedItems(t *testing.T) { - traces := newTraces(5, 10) - req := newFakeTracesRequest(traces) - - ext := NewMockStorageExtension(nil) - client := createTestClient(ext) - ps := createTestPersistentStorage(client) - - for i := 0; i < 5; i++ { - err := ps.put(req) - require.NoError(t, err) - } - - // Item index 0 is currently in unbuffered channel - requireCurrentlyDispatchedItemsEqual(t, ps, []itemIndex{0}) - - // Now, this will take item 0 and pull item 1 into the unbuffered channel - readReq := <-ps.get() - assert.Equal(t, req.td, readReq.(*fakeTracesRequest).td) - requireCurrentlyDispatchedItemsEqual(t, ps, []itemIndex{0, 1}) - - // This takes item 1 from channel and pulls another one (item 2) into the unbuffered channel - secondReadReq := <-ps.get() - requireCurrentlyDispatchedItemsEqual(t, ps, []itemIndex{0, 1, 2}) - - // Lets mark item 1 as finished, it will remove it from the currently dispatched items list - secondReadReq.OnProcessingFinished() - requireCurrentlyDispatchedItemsEqual(t, ps, []itemIndex{0, 2}) - - // Reload the storage. Since items 0 and 2 were not finished, those should be requeued at the end. - // The queue should be essentially {3,4,0,2} out of which item "3" should be pulled right away into - // the unbuffered channel. Check how many items are there, which, after the current one is fetched should go to 3. - newPs := createTestPersistentStorage(client) - assert.Eventually(t, func() bool { - return newPs.size() == 3 - }, 5*time.Second, 10*time.Millisecond) - - requireCurrentlyDispatchedItemsEqual(t, newPs, []itemIndex{3}) - - // We should be able to pull all remaining items now - for i := 0; i < 4; i++ { - req := <-newPs.get() - req.OnProcessingFinished() - } - - // The queue should be now empty - requireCurrentlyDispatchedItemsEqual(t, newPs, nil) - assert.Eventually(t, func() bool { - return newPs.size() == 0 - }, 5*time.Second, 10*time.Millisecond) - - // The writeIndex should be now set accordingly - require.Equal(t, 7, int(newPs.writeIndex)) - - // There should be no items left in the storage - for i := 0; i < int(newPs.writeIndex); i++ { - bb, err := client.Get(context.Background(), newPs.itemKey(itemIndex(i))) - require.NoError(t, err) - require.Nil(t, bb) - } -} - -// this test attempts to check if all the invariants are kept if the queue is recreated while -// close to full and with some items dispatched -func TestPersistentStorage_StartWithNonDispatched(t *testing.T) { - var capacity uint64 = 5 // arbitrary small number - logger := zap.NewNop() - - traces := newTraces(5, 10) - req := newFakeTracesRequest(traces) - - ext := NewMockStorageExtension(nil) - client := createTestClient(ext) - ps := createTestPersistentStorageWithLoggingAndCapacity(client, logger, capacity) - - // Put in items up to capacity - for i := 0; i < int(capacity); i++ { - err := ps.put(req) - require.NoError(t, err) - } - - // get one item out, but don't mark it as processed - <-ps.get() - // put one more item in - err := ps.put(req) - require.NoError(t, err) - - require.Eventually(t, func() bool { - return ps.size() == capacity-1 - }, 5*time.Second, 10*time.Millisecond) - ps.stop() - - // Reload - newPs := createTestPersistentStorageWithLoggingAndCapacity(client, logger, capacity) - - require.Eventually(t, func() bool { - newPs.mu.Lock() - defer newPs.mu.Unlock() - return newPs.size() == capacity-1 && len(newPs.currentlyDispatchedItems) == 1 - }, 5*time.Second, 10*time.Millisecond) -} - -func TestPersistentStorage_RepeatPutCloseReadClose(t *testing.T) { - traces := newTraces(5, 10) - req := newFakeTracesRequest(traces) - - for i := 0; i < 10; i++ { - ext := NewMockStorageExtension(nil) - client := createTestClient(ext) - ps := createTestPersistentStorage(client) - require.Equal(t, uint64(0), ps.size()) - - // Put two elements - err := ps.put(req) - require.NoError(t, err) - err = ps.put(req) - require.NoError(t, err) - - err = ext.Shutdown(context.Background()) - require.NoError(t, err) - - // TODO: when replacing mock with real storage, this could actually be uncommented - // ext = NewMockStorageExtension(nil) - // ps = createTestPersistentStorage(ext) - - // The first element should be already picked by loop - require.Eventually(t, func() bool { - return ps.size() == 1 - }, 5*time.Second, 10*time.Millisecond) - - // Lets read both of the elements we put - readReq := <-ps.get() - require.Equal(t, req.td, readReq.(*fakeTracesRequest).td) - - readReq = <-ps.get() - require.Equal(t, req.td, readReq.(*fakeTracesRequest).td) - require.Equal(t, uint64(0), ps.size()) - - err = ext.Shutdown(context.Background()) - require.NoError(t, err) - } - - // No more items - ext := NewMockStorageExtension(nil) - wq := createTestQueue(t, 1000, 1, func(Request) {}) - require.Equal(t, 0, wq.Size()) - require.NoError(t, ext.Shutdown(context.Background())) -} - -func TestPersistentStorage_EmptyRequest(t *testing.T) { - ext := NewMockStorageExtension(nil) - client := createTestClient(ext) - ps := createTestPersistentStorage(client) - - require.Equal(t, uint64(0), ps.size()) - - err := ps.put(nil) - require.NoError(t, err) - - require.Equal(t, uint64(0), ps.size()) - - err = ext.Shutdown(context.Background()) - require.NoError(t, err) -} - -func BenchmarkPersistentStorage_TraceSpans(b *testing.B) { - cases := []struct { - numTraces int - numSpansPerTrace int - }{ - { - numTraces: 1, - numSpansPerTrace: 1, - }, - { - numTraces: 1, - numSpansPerTrace: 10, - }, - { - numTraces: 10, - numSpansPerTrace: 10, - }, - } - - for _, c := range cases { - b.Run(fmt.Sprintf("#traces: %d #spansPerTrace: %d", c.numTraces, c.numSpansPerTrace), func(bb *testing.B) { - ext := NewMockStorageExtension(nil) - client := createTestClient(ext) - ps := createTestPersistentStorageWithLoggingAndCapacity(client, zap.NewNop(), 10000000) - - traces := newTraces(c.numTraces, c.numSpansPerTrace) - req := newFakeTracesRequest(traces) - - bb.ResetTimer() - - for i := 0; i < bb.N; i++ { - err := ps.put(req) - require.NoError(bb, err) - } - - for i := 0; i < bb.N; i++ { - req := ps.get() - require.NotNil(bb, req) - } - require.NoError(b, ext.Shutdown(context.Background())) - }) - } -} - -func TestPersistentStorage_ItemIndexMarshaling(t *testing.T) { - cases := []struct { - arr1 []itemIndex - arr2 []itemIndex - }{ - { - arr1: []itemIndex{0, 1, 2}, - arr2: []itemIndex{0, 1, 2}, - }, - { - arr1: []itemIndex{}, - arr2: []itemIndex{}, - }, - { - arr1: nil, - arr2: []itemIndex{}, - }, - } - - for _, c := range cases { - count := 0 - if c.arr1 != nil { - count = len(c.arr1) - } - t.Run(fmt.Sprintf("#elements:%d", count), func(tt *testing.T) { - barr, err := itemIndexArrayToBytes(c.arr1) - require.NoError(t, err) - arr2, err := bytesToItemIndexArray(barr) - require.NoError(t, err) - require.Equal(t, c.arr2, arr2) - }) - } -} - -func TestPersistentStorage_StopShouldCloseClient(t *testing.T) { - ext := NewMockStorageExtension(nil) - client := createTestClient(ext) - ps := createTestPersistentStorage(client) - - ps.stop() - - castedClient, ok := client.(*mockStorageClient) - require.True(t, ok, "expected client to be mockStorageClient") - require.Equal(t, uint64(1), castedClient.getCloseCount()) -} - -func TestPersistentStorage_StorageFull(t *testing.T) { - var err error - traces := newTraces(5, 10) - req := newFakeTracesRequest(traces) - marshaled, err := newFakeTracesRequestMarshalerFunc()(req) - require.NoError(t, err) - maxSizeInBytes := len(marshaled) * 5 // arbitrary small number - freeSpaceInBytes := 1 - - client := newFakeBoundedStorageClient(maxSizeInBytes) - ps := createTestPersistentStorage(client) - - // Put enough items in to fill the underlying storage - reqCount := 0 - for { - err = ps.put(req) - if errors.Is(err, syscall.ENOSPC) { - break - } - require.NoError(t, err) - reqCount++ - } - - // Manually set the storage to only have a small amount of free space left - newMaxSize := client.GetSizeInBytes() + freeSpaceInBytes - client.SetMaxSizeInBytes(newMaxSize) - - // Try to put an item in, should fail - err = ps.put(req) - require.Error(t, err) - - // Take out all the items - for i := reqCount; i > 0; i-- { - request := <-ps.get() - request.OnProcessingFinished() - } - - // We should be able to put a new item in - // However, this will fail if deleting items fails with full storage - err = ps.put(req) - require.NoError(t, err) -} - -func TestPersistentStorage_ItemDispatchingFinish_ErrorHandling(t *testing.T) { - errDeletingItem := fmt.Errorf("error deleting item") - errUpdatingDispatched := fmt.Errorf("error updating dispatched items") - testCases := []struct { - storageErrors []error - expectedError error - description string - }{ - { - description: "no errors", - storageErrors: []error{}, - expectedError: nil, - }, - { - description: "error on first transaction, success afterwards", - storageErrors: []error{ - errUpdatingDispatched, - }, - expectedError: nil, - }, - { - description: "error on first and second transaction", - storageErrors: []error{ - errUpdatingDispatched, - errDeletingItem, - }, - expectedError: errDeletingItem, - }, - { - description: "error on first and third transaction", - storageErrors: []error{ - errUpdatingDispatched, - nil, - errUpdatingDispatched, - }, - expectedError: errUpdatingDispatched, - }, - } - - for _, testCase := range testCases { - t.Run(testCase.description, func(t *testing.T) { - testCase := testCase - client := newFakeStorageClientWithErrors(testCase.storageErrors) - ps := createTestPersistentStorage(client) - client.Reset() - - err := ps.itemDispatchingFinish(context.Background(), 0) - - require.ErrorIs(t, err, testCase.expectedError) - }) - } -} - -func requireCurrentlyDispatchedItemsEqual(t *testing.T, pcs *persistentContiguousStorage, compare []itemIndex) { - require.Eventually(t, func() bool { - pcs.mu.Lock() - defer pcs.mu.Unlock() - return reflect.DeepEqual(pcs.currentlyDispatchedItems, compare) - }, 5*time.Second, 10*time.Millisecond) -} - -func newFakeBoundedStorageClient(maxSizeInBytes int) *fakeBoundedStorageClient { - return &fakeBoundedStorageClient{ - st: map[string][]byte{}, - MaxSizeInBytes: maxSizeInBytes, - } -} - -// this storage client mimics the behavior of actual storage engines with limited storage space available -// in general, real storage engines often have a per-write-transaction storage overhead, needing to keep -// both the old and the new value stored until the transaction is committed -// this is useful for testing the persistent queue queue behavior with a full disk -type fakeBoundedStorageClient struct { - MaxSizeInBytes int - st map[string][]byte - sizeInBytes int - mux sync.Mutex -} - -func (m *fakeBoundedStorageClient) Get(ctx context.Context, key string) ([]byte, error) { - op := storage.GetOperation(key) - err := m.Batch(ctx, op) - if err != nil { - return nil, err - } - - return op.Value, nil -} - -func (m *fakeBoundedStorageClient) Set(ctx context.Context, key string, value []byte) error { - return m.Batch(ctx, storage.SetOperation(key, value)) -} - -func (m *fakeBoundedStorageClient) Delete(ctx context.Context, key string) error { - return m.Batch(ctx, storage.DeleteOperation(key)) -} - -func (m *fakeBoundedStorageClient) Close(_ context.Context) error { - return nil -} - -func (m *fakeBoundedStorageClient) Batch(_ context.Context, ops ...storage.Operation) error { - m.mux.Lock() - defer m.mux.Unlock() - - totalAdded, totalRemoved := m.getTotalSizeChange(ops) - - // the assumption here is that the new data needs to coexist with the old data on disk - // for the transaction to succeed - // this seems to be true for the file storage extension at least - if m.sizeInBytes+totalAdded > m.MaxSizeInBytes { - return fmt.Errorf("insufficient space available: %w", syscall.ENOSPC) - } - - for _, op := range ops { - switch op.Type { - case storage.Get: - op.Value = m.st[op.Key] - case storage.Set: - m.st[op.Key] = op.Value - case storage.Delete: - delete(m.st, op.Key) - default: - return errors.New("wrong operation type") - } - } - - m.sizeInBytes += (totalAdded - totalRemoved) - - return nil -} - -func (m *fakeBoundedStorageClient) SetMaxSizeInBytes(newMaxSize int) { - m.mux.Lock() - defer m.mux.Unlock() - m.MaxSizeInBytes = newMaxSize -} - -func (m *fakeBoundedStorageClient) GetSizeInBytes() int { - m.mux.Lock() - defer m.mux.Unlock() - return m.sizeInBytes -} - -func (m *fakeBoundedStorageClient) getTotalSizeChange(ops []storage.Operation) (totalAdded int, totalRemoved int) { - totalAdded, totalRemoved = 0, 0 - for _, op := range ops { - switch op.Type { - case storage.Set: - if oldValue, ok := m.st[op.Key]; ok { - totalRemoved += len(oldValue) - } else { - totalAdded += len(op.Key) - } - totalAdded += len(op.Value) - case storage.Delete: - if value, ok := m.st[op.Key]; ok { - totalRemoved += len(op.Key) - totalRemoved += len(value) - } - default: - } - } - return totalAdded, totalRemoved -} - -func newFakeStorageClientWithErrors(errors []error) *fakeStorageClientWithErrors { - return &fakeStorageClientWithErrors{ - errors: errors, - } -} - -// this storage client just returns errors from a list in order -// used for testing error handling -type fakeStorageClientWithErrors struct { - errors []error - nextErrorIndex int - mux sync.Mutex -} - -func (m *fakeStorageClientWithErrors) Get(ctx context.Context, key string) ([]byte, error) { - op := storage.GetOperation(key) - err := m.Batch(ctx, op) - if err != nil { - return nil, err - } - - return op.Value, nil -} - -func (m *fakeStorageClientWithErrors) Set(ctx context.Context, key string, value []byte) error { - return m.Batch(ctx, storage.SetOperation(key, value)) -} - -func (m *fakeStorageClientWithErrors) Delete(ctx context.Context, key string) error { - return m.Batch(ctx, storage.DeleteOperation(key)) -} - -func (m *fakeStorageClientWithErrors) Close(_ context.Context) error { - return nil -} - -func (m *fakeStorageClientWithErrors) Batch(_ context.Context, _ ...storage.Operation) error { - m.mux.Lock() - defer m.mux.Unlock() - - if m.nextErrorIndex >= len(m.errors) { - return nil - } - - err := m.errors[m.nextErrorIndex] - m.nextErrorIndex++ - return err -} - -func (m *fakeStorageClientWithErrors) Reset() { - m.mux.Lock() - defer m.mux.Unlock() - m.nextErrorIndex = 0 -} diff --git a/exporter/exporterhelper/internal/producer_consumer_queue.go b/exporter/exporterhelper/internal/producer_consumer_queue.go deleted file mode 100644 index 7b17106a564..00000000000 --- a/exporter/exporterhelper/internal/producer_consumer_queue.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright The OpenTelemetry Authors -// Copyright (c) 2019 The Jaeger Authors. -// Copyright (c) 2017 Uber Technologies, Inc. -// SPDX-License-Identifier: Apache-2.0 - -package internal // import "go.opentelemetry.io/collector/exporter/exporterhelper/internal" - -import ( - "context" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/exporter" -) - -type QueueSettings struct { - exporter.CreateSettings - DataType component.DataType - Callback func(item Request) -} - -// ProducerConsumerQueue defines a producer-consumer exchange which can be backed by e.g. the memory-based ring buffer queue -// (boundedMemoryQueue) or via a disk-based queue (persistentQueue) -type ProducerConsumerQueue interface { - // Start starts the queue with a given number of goroutines consuming items from the queue - // and passing them into the consumer callback. - Start(ctx context.Context, host component.Host, set QueueSettings) error - // Produce is used by the producer to submit new item to the queue. Returns false if the item wasn't added - // to the queue due to queue overflow. - Produce(item Request) bool - // Size returns the current Size of the queue - Size() int - // Stop stops all consumers, as well as the length reporter if started, - // and releases the items channel. It blocks until all consumers have stopped. - Stop() - // Capacity returns the capacity of the queue. - Capacity() int - // IsPersistent returns true if the queue is persistent. - // TODO: Do not expose this method if the interface moves to a public package. - IsPersistent() bool -} diff --git a/exporter/exporterhelper/internal/request.go b/exporter/exporterhelper/internal/request.go deleted file mode 100644 index 454a42782ce..00000000000 --- a/exporter/exporterhelper/internal/request.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal // import "go.opentelemetry.io/collector/exporter/exporterhelper/internal" - -import "context" - -// Request defines capabilities required for persistent storage of a request -type Request interface { - // Context returns the context.Context of the requests. - Context() context.Context - - // SetContext updates the context.Context of the requests. - SetContext(context.Context) - - Export(ctx context.Context) error - - // OnError returns a new Request may contain the items left to be sent if some items failed to process and can be retried. - // Otherwise, it should return the original Request. - OnError(error) Request - - // Count returns the count of spans/metric points or log records. - Count() int - - // OnProcessingFinished calls the optional callback function to handle cleanup after all processing is finished - OnProcessingFinished() - - // SetOnProcessingFinished allows to set an optional callback function to do the cleanup (e.g. remove the item from persistent queue) - SetOnProcessingFinished(callback func()) -} - -// RequestUnmarshaler defines a function which takes a byte slice and unmarshals it into a relevant request -type RequestUnmarshaler func([]byte) (Request, error) - -// RequestMarshaler defines a function which takes a request and marshals it into a byte slice -type RequestMarshaler func(Request) ([]byte, error) diff --git a/exporter/exporterhelper/logs.go b/exporter/exporterhelper/logs.go index b098e722921..ce70230e321 100644 --- a/exporter/exporterhelper/logs.go +++ b/exporter/exporterhelper/logs.go @@ -13,7 +13,8 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/exporter" - "go.opentelemetry.io/collector/exporter/exporterhelper/internal" + "go.opentelemetry.io/collector/exporter/exporterqueue" + "go.opentelemetry.io/collector/exporter/internal/queue" "go.opentelemetry.io/collector/pdata/plog" ) @@ -21,37 +22,35 @@ var logsMarshaler = &plog.ProtoMarshaler{} var logsUnmarshaler = &plog.ProtoUnmarshaler{} type logsRequest struct { - baseRequest ld plog.Logs pusher consumer.ConsumeLogsFunc } -func newLogsRequest(ctx context.Context, ld plog.Logs, pusher consumer.ConsumeLogsFunc) internal.Request { +func newLogsRequest(ld plog.Logs, pusher consumer.ConsumeLogsFunc) Request { return &logsRequest{ - baseRequest: baseRequest{ctx: ctx}, - ld: ld, - pusher: pusher, + ld: ld, + pusher: pusher, } } -func newLogsRequestUnmarshalerFunc(pusher consumer.ConsumeLogsFunc) internal.RequestUnmarshaler { - return func(bytes []byte) (internal.Request, error) { +func newLogsRequestUnmarshalerFunc(pusher consumer.ConsumeLogsFunc) exporterqueue.Unmarshaler[Request] { + return func(bytes []byte) (Request, error) { logs, err := logsUnmarshaler.UnmarshalLogs(bytes) if err != nil { return nil, err } - return newLogsRequest(context.Background(), logs, pusher), nil + return newLogsRequest(logs, pusher), nil } } -func logsRequestMarshaler(req internal.Request) ([]byte, error) { +func logsRequestMarshaler(req Request) ([]byte, error) { return logsMarshaler.MarshalLogs(req.(*logsRequest).ld) } -func (req *logsRequest) OnError(err error) internal.Request { +func (req *logsRequest) OnError(err error) Request { var logError consumererror.Logs if errors.As(err, &logError) { - return newLogsRequest(req.ctx, logError.Data(), req.pusher) + return newLogsRequest(logError.Data(), req.pusher) } return req } @@ -60,7 +59,7 @@ func (req *logsRequest) Export(ctx context.Context) error { return req.pusher(ctx, req.ld) } -func (req *logsRequest) Count() int { +func (req *logsRequest) ItemsCount() int { return req.ld.LogRecordCount() } @@ -71,7 +70,7 @@ type logsExporter struct { // NewLogsExporter creates an exporter.Logs that records observability metrics and wraps every request with a Span. func NewLogsExporter( - _ context.Context, + ctx context.Context, set exporter.CreateSettings, cfg component.Config, pusher consumer.ConsumeLogsFunc, @@ -80,42 +79,23 @@ func NewLogsExporter( if cfg == nil { return nil, errNilConfig } - - if set.Logger == nil { - return nil, errNilLogger - } - if pusher == nil { return nil, errNilPushLogsData } - - be, err := newBaseExporter(set, component.DataTypeLogs, false, logsRequestMarshaler, - newLogsRequestUnmarshalerFunc(pusher), newLogsExporterWithObservability, options...) - if err != nil { - return nil, err - } - - lc, err := consumer.NewLogs(func(ctx context.Context, ld plog.Logs) error { - req := newLogsRequest(ctx, ld, pusher) - serr := be.send(req) - if errors.Is(serr, errSendingQueueIsFull) { - be.obsrep.recordLogsEnqueueFailure(req.Context(), int64(req.Count())) - } - return serr - }, be.consumerOptions...) - - return &logsExporter{ - baseExporter: be, - Logs: lc, - }, err + logsOpts := []Option{withMarshaler(logsRequestMarshaler), withUnmarshaler(newLogsRequestUnmarshalerFunc(pusher))} + return NewLogsRequestExporter(ctx, set, requestFromLogs(pusher), append(logsOpts, options...)...) } -// LogsConverter provides an interface for converting plog.Logs into a request. +// RequestFromLogsFunc converts plog.Logs data into a user-defined request. // This API is at the early stage of development and may change without backward compatibility // until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. -type LogsConverter interface { - // RequestFromLogs converts plog.Logs data into a request. - RequestFromLogs(context.Context, plog.Logs) (Request, error) +type RequestFromLogsFunc func(context.Context, plog.Logs) (Request, error) + +// requestFromLogs returns a RequestFromLogsFunc that converts plog.Logs into a Request. +func requestFromLogs(pusher consumer.ConsumeLogsFunc) RequestFromLogsFunc { + return func(_ context.Context, ld plog.Logs) (Request, error) { + return newLogsRequest(ld, pusher), nil + } } // NewLogsRequestExporter creates new logs exporter based on custom LogsConverter and RequestSender. @@ -124,7 +104,7 @@ type LogsConverter interface { func NewLogsRequestExporter( _ context.Context, set exporter.CreateSettings, - converter LogsConverter, + converter RequestFromLogsFunc, options ...Option, ) (exporter.Logs, error) { if set.Logger == nil { @@ -135,23 +115,22 @@ func NewLogsRequestExporter( return nil, errNilLogsConverter } - be, err := newBaseExporter(set, component.DataTypeLogs, true, nil, nil, newLogsExporterWithObservability, options...) + be, err := newBaseExporter(set, component.DataTypeLogs, newLogsExporterWithObservability, options...) if err != nil { return nil, err } lc, err := consumer.NewLogs(func(ctx context.Context, ld plog.Logs) error { - req, cErr := converter.RequestFromLogs(ctx, ld) + req, cErr := converter(ctx, ld) if cErr != nil { set.Logger.Error("Failed to convert logs. Dropping data.", zap.Int("dropped_log_records", ld.LogRecordCount()), zap.Error(err)) return consumererror.NewPermanent(cErr) } - r := newRequest(ctx, req) - sErr := be.send(r) - if errors.Is(sErr, errSendingQueueIsFull) { - be.obsrep.recordLogsEnqueueFailure(r.Context(), int64(r.Count())) + sErr := be.send(ctx, req) + if errors.Is(sErr, queue.ErrQueueIsFull) { + be.obsrep.recordEnqueueFailure(ctx, component.DataTypeLogs, int64(req.ItemsCount())) } return sErr }, be.consumerOptions...) @@ -164,16 +143,16 @@ func NewLogsRequestExporter( type logsExporterWithObservability struct { baseRequestSender - obsrep *obsExporter + obsrep *ObsReport } -func newLogsExporterWithObservability(obsrep *obsExporter) requestSender { +func newLogsExporterWithObservability(obsrep *ObsReport) requestSender { return &logsExporterWithObservability{obsrep: obsrep} } -func (lewo *logsExporterWithObservability) send(req internal.Request) error { - req.SetContext(lewo.obsrep.StartLogsOp(req.Context())) - err := lewo.nextSender.send(req) - lewo.obsrep.EndLogsOp(req.Context(), req.Count(), err) +func (lewo *logsExporterWithObservability) send(ctx context.Context, req Request) error { + c := lewo.obsrep.StartLogsOp(ctx) + err := lewo.nextSender.send(c, req) + lewo.obsrep.EndLogsOp(c, req.ItemsCount(), err) return err } diff --git a/exporter/exporterhelper/logs_test.go b/exporter/exporterhelper/logs_test.go index 699913f85a9..e42af577b2c 100644 --- a/exporter/exporterhelper/logs_test.go +++ b/exporter/exporterhelper/logs_test.go @@ -16,18 +16,19 @@ import ( sdktrace "go.opentelemetry.io/otel/sdk/trace" "go.opentelemetry.io/otel/sdk/trace/tracetest" "go.opentelemetry.io/otel/trace" + nooptrace "go.opentelemetry.io/otel/trace/noop" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/exporter" - "go.opentelemetry.io/collector/exporter/exporterhelper/internal" "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/exporter/internal/queue" "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" "go.opentelemetry.io/collector/internal/testdata" - "go.opentelemetry.io/collector/obsreport/obsreporttest" "go.opentelemetry.io/collector/pdata/plog" ) @@ -36,18 +37,18 @@ const ( ) var ( - fakeLogsExporterName = component.NewIDWithName("fake_logs_exporter", "with_name") + fakeLogsExporterName = component.MustNewIDWithName("fake_logs_exporter", "with_name") fakeLogsExporterConfig = struct{}{} ) func TestLogsRequest(t *testing.T) { - lr := newLogsRequest(context.Background(), testdata.GenerateLogs(1), nil) + lr := newLogsRequest(testdata.GenerateLogs(1), nil) logErr := consumererror.NewLogs(errors.New("some error"), plog.NewLogs()) assert.EqualValues( t, - newLogsRequest(context.Background(), plog.NewLogs(), nil), - lr.OnError(logErr), + newLogsRequest(plog.NewLogs(), nil), + lr.(RequestErrorHandler).OnError(logErr), ) } @@ -64,7 +65,7 @@ func TestLogsExporter_NilLogger(t *testing.T) { } func TestLogsRequestExporter_NilLogger(t *testing.T) { - le, err := NewLogsRequestExporter(context.Background(), exporter.CreateSettings{}, &fakeRequestConverter{}) + le, err := NewLogsRequestExporter(context.Background(), exporter.CreateSettings{}, (&fakeRequestConverter{}).requestFromLogsFunc) require.Nil(t, le) require.Equal(t, errNilLogger, err) } @@ -95,7 +96,8 @@ func TestLogsExporter_Default(t *testing.T) { func TestLogsRequestExporter_Default(t *testing.T) { ld := plog.NewLogs() - le, err := NewLogsRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), &fakeRequestConverter{}) + le, err := NewLogsRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), + (&fakeRequestConverter{}).requestFromLogsFunc) assert.NotNil(t, le) assert.NoError(t, err) @@ -116,7 +118,8 @@ func TestLogsExporter_WithCapabilities(t *testing.T) { func TestLogsRequestExporter_WithCapabilities(t *testing.T) { capabilities := consumer.Capabilities{MutatesData: true} - le, err := NewLogsRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), &fakeRequestConverter{}, WithCapabilities(capabilities)) + le, err := NewLogsRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), + (&fakeRequestConverter{}).requestFromLogsFunc, WithCapabilities(capabilities)) require.NoError(t, err) require.NotNil(t, le) @@ -135,7 +138,8 @@ func TestLogsExporter_Default_ReturnError(t *testing.T) { func TestLogsRequestExporter_Default_ConvertError(t *testing.T) { ld := plog.NewLogs() want := errors.New("convert_error") - le, err := NewLogsRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), &fakeRequestConverter{logsError: want}) + le, err := NewLogsRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), + (&fakeRequestConverter{logsError: want}).requestFromLogsFunc) require.NoError(t, err) require.NotNil(t, le) require.Equal(t, consumererror.NewPermanent(want), le.ConsumeLogs(context.Background(), ld)) @@ -145,7 +149,7 @@ func TestLogsRequestExporter_Default_ExportError(t *testing.T) { ld := plog.NewLogs() want := errors.New("export_error") le, err := NewLogsRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), - &fakeRequestConverter{requestError: want}) + (&fakeRequestConverter{requestError: want}).requestFromLogsFunc) require.NoError(t, err) require.NotNil(t, le) require.Equal(t, want, le.ConsumeLogs(context.Background(), ld)) @@ -153,17 +157,17 @@ func TestLogsRequestExporter_Default_ExportError(t *testing.T) { func TestLogsExporter_WithPersistentQueue(t *testing.T) { qCfg := NewDefaultQueueSettings() - storageID := component.NewIDWithName("file_storage", "storage") + storageID := component.MustNewIDWithName("file_storage", "storage") qCfg.StorageID = &storageID - rCfg := NewDefaultRetrySettings() + rCfg := configretry.NewDefaultBackOffConfig() ts := consumertest.LogsSink{} set := exportertest.NewNopCreateSettings() - set.ID = component.NewIDWithName("test_logs", "with_persistent_queue") + set.ID = component.MustNewIDWithName("test_logs", "with_persistent_queue") te, err := NewLogsExporter(context.Background(), set, &fakeLogsExporterConfig, ts.ConsumeLogs, WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) host := &mockHost{ext: map[component.ID]component.Component{ - storageID: internal.NewMockStorageExtension(nil), + storageID: queue.NewMockStorageExtension(nil), }} require.NoError(t, te.Start(context.Background(), host)) t.Cleanup(func() { require.NoError(t, te.Shutdown(context.Background())) }) @@ -176,11 +180,11 @@ func TestLogsExporter_WithPersistentQueue(t *testing.T) { } func TestLogsExporter_WithRecordMetrics(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(fakeLogsExporterName) + tt, err := componenttest.SetupTelemetry(fakeLogsExporterName) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - le, err := NewLogsExporter(context.Background(), exportertest.NewCreateSettings(fakeLogsExporterName, tt.TelemetrySettings), &fakeLogsExporterConfig, newPushLogsData(nil)) + le, err := NewLogsExporter(context.Background(), exporter.CreateSettings{ID: fakeLogsExporterName, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, &fakeLogsExporterConfig, newPushLogsData(nil)) require.NoError(t, err) require.NotNil(t, le) @@ -188,11 +192,13 @@ func TestLogsExporter_WithRecordMetrics(t *testing.T) { } func TestLogsRequestExporter_WithRecordMetrics(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(fakeLogsExporterName) + tt, err := componenttest.SetupTelemetry(fakeLogsExporterName) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - le, err := NewLogsRequestExporter(context.Background(), exportertest.NewCreateSettings(fakeLogsExporterName, tt.TelemetrySettings), &fakeRequestConverter{}) + le, err := NewLogsRequestExporter(context.Background(), + exporter.CreateSettings{ID: fakeLogsExporterName, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, + (&fakeRequestConverter{}).requestFromLogsFunc) require.NoError(t, err) require.NotNil(t, le) @@ -201,11 +207,11 @@ func TestLogsRequestExporter_WithRecordMetrics(t *testing.T) { func TestLogsExporter_WithRecordMetrics_ReturnError(t *testing.T) { want := errors.New("my_error") - tt, err := obsreporttest.SetupTelemetry(fakeLogsExporterName) + tt, err := componenttest.SetupTelemetry(fakeLogsExporterName) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - le, err := NewLogsExporter(context.Background(), exportertest.NewCreateSettings(fakeLogsExporterName, tt.TelemetrySettings), &fakeLogsExporterConfig, newPushLogsData(want)) + le, err := NewLogsExporter(context.Background(), exporter.CreateSettings{ID: fakeLogsExporterName, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, &fakeLogsExporterConfig, newPushLogsData(want)) require.Nil(t, err) require.NotNil(t, le) @@ -214,12 +220,12 @@ func TestLogsExporter_WithRecordMetrics_ReturnError(t *testing.T) { func TestLogsRequestExporter_WithRecordMetrics_ExportError(t *testing.T) { want := errors.New("export_error") - tt, err := obsreporttest.SetupTelemetry(fakeLogsExporterName) + tt, err := componenttest.SetupTelemetry(fakeLogsExporterName) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - le, err := NewLogsRequestExporter(context.Background(), exportertest.NewCreateSettings(fakeLogsExporterName, tt.TelemetrySettings), - &fakeRequestConverter{requestError: want}) + le, err := NewLogsRequestExporter(context.Background(), exporter.CreateSettings{ID: fakeLogsExporterName, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, + (&fakeRequestConverter{requestError: want}).requestFromLogsFunc) require.Nil(t, err) require.NotNil(t, le) @@ -227,16 +233,16 @@ func TestLogsRequestExporter_WithRecordMetrics_ExportError(t *testing.T) { } func TestLogsExporter_WithRecordEnqueueFailedMetrics(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(fakeLogsExporterName) + tt, err := componenttest.SetupTelemetry(fakeLogsExporterName) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - rCfg := NewDefaultRetrySettings() + rCfg := configretry.NewDefaultBackOffConfig() qCfg := NewDefaultQueueSettings() qCfg.NumConsumers = 1 qCfg.QueueSize = 2 wantErr := errors.New("some-error") - te, err := NewLogsExporter(context.Background(), exportertest.NewCreateSettings(fakeLogsExporterName, tt.TelemetrySettings), &fakeLogsExporterConfig, newPushLogsData(wantErr), WithRetry(rCfg), WithQueue(qCfg)) + te, err := NewLogsExporter(context.Background(), exporter.CreateSettings{ID: fakeLogsExporterName, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, &fakeLogsExporterConfig, newPushLogsData(wantErr), WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) require.NotNil(t, te) @@ -248,7 +254,7 @@ func TestLogsExporter_WithRecordEnqueueFailedMetrics(t *testing.T) { } // 2 batched must be in queue, and 5 batches (15 log records) rejected due to queue overflow - checkExporterEnqueueFailedLogsStats(t, globalInstruments, fakeLogsExporterName, int64(15)) + require.NoError(t, tt.CheckExporterEnqueueFailedLogs(int64(15))) } func TestLogsExporter_WithSpan(t *testing.T) { @@ -256,7 +262,7 @@ func TestLogsExporter_WithSpan(t *testing.T) { sr := new(tracetest.SpanRecorder) set.TracerProvider = sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr)) otel.SetTracerProvider(set.TracerProvider) - defer otel.SetTracerProvider(trace.NewNoopTracerProvider()) + defer otel.SetTracerProvider(nooptrace.NewTracerProvider()) le, err := NewLogsExporter(context.Background(), set, &fakeLogsExporterConfig, newPushLogsData(nil)) require.Nil(t, err) @@ -269,9 +275,9 @@ func TestLogsRequestExporter_WithSpan(t *testing.T) { sr := new(tracetest.SpanRecorder) set.TracerProvider = sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr)) otel.SetTracerProvider(set.TracerProvider) - defer otel.SetTracerProvider(trace.NewNoopTracerProvider()) + defer otel.SetTracerProvider(nooptrace.NewTracerProvider()) - le, err := NewLogsRequestExporter(context.Background(), set, &fakeRequestConverter{}) + le, err := NewLogsRequestExporter(context.Background(), set, (&fakeRequestConverter{}).requestFromLogsFunc) require.Nil(t, err) require.NotNil(t, le) checkWrapSpanForLogsExporter(t, sr, set.TracerProvider.Tracer("test"), le, nil, 1) @@ -282,7 +288,7 @@ func TestLogsExporter_WithSpan_ReturnError(t *testing.T) { sr := new(tracetest.SpanRecorder) set.TracerProvider = sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr)) otel.SetTracerProvider(set.TracerProvider) - defer otel.SetTracerProvider(trace.NewNoopTracerProvider()) + defer otel.SetTracerProvider(nooptrace.NewTracerProvider()) want := errors.New("my_error") le, err := NewLogsExporter(context.Background(), set, &fakeLogsExporterConfig, newPushLogsData(want)) @@ -296,10 +302,10 @@ func TestLogsRequestExporter_WithSpan_ReturnError(t *testing.T) { sr := new(tracetest.SpanRecorder) set.TracerProvider = sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr)) otel.SetTracerProvider(set.TracerProvider) - defer otel.SetTracerProvider(trace.NewNoopTracerProvider()) + defer otel.SetTracerProvider(nooptrace.NewTracerProvider()) want := errors.New("my_error") - le, err := NewLogsRequestExporter(context.Background(), set, &fakeRequestConverter{requestError: want}) + le, err := NewLogsRequestExporter(context.Background(), set, (&fakeRequestConverter{requestError: want}).requestFromLogsFunc) require.Nil(t, err) require.NotNil(t, le) checkWrapSpanForLogsExporter(t, sr, set.TracerProvider.Tracer("test"), le, want, 1) @@ -321,7 +327,8 @@ func TestLogsRequestExporter_WithShutdown(t *testing.T) { shutdownCalled := false shutdown := func(context.Context) error { shutdownCalled = true; return nil } - le, err := NewLogsRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), &fakeRequestConverter{}, WithShutdown(shutdown)) + le, err := NewLogsRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), + (&fakeRequestConverter{}).requestFromLogsFunc, WithShutdown(shutdown)) assert.NotNil(t, le) assert.NoError(t, err) @@ -344,7 +351,8 @@ func TestLogsRequestExporter_WithShutdown_ReturnError(t *testing.T) { want := errors.New("my_error") shutdownErr := func(context.Context) error { return want } - le, err := NewLogsRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), &fakeRequestConverter{}, WithShutdown(shutdownErr)) + le, err := NewLogsRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), + (&fakeRequestConverter{}).requestFromLogsFunc, WithShutdown(shutdownErr)) assert.NotNil(t, le) assert.NoError(t, err) @@ -352,12 +360,12 @@ func TestLogsRequestExporter_WithShutdown_ReturnError(t *testing.T) { } func newPushLogsData(retError error) consumer.ConsumeLogsFunc { - return func(ctx context.Context, td plog.Logs) error { + return func(_ context.Context, _ plog.Logs) error { return retError } } -func checkRecordedMetricsForLogsExporter(t *testing.T, tt obsreporttest.TestTelemetry, le exporter.Logs, wantError error) { +func checkRecordedMetricsForLogsExporter(t *testing.T, tt componenttest.TestTelemetry, le exporter.Logs, wantError error) { ld := testdata.GenerateLogs(2) const numBatches = 7 for i := 0; i < numBatches; i++ { diff --git a/exporter/exporterhelper/metrics.go b/exporter/exporterhelper/metrics.go index e3f09f361c7..ab7d65dae65 100644 --- a/exporter/exporterhelper/metrics.go +++ b/exporter/exporterhelper/metrics.go @@ -13,7 +13,8 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/exporter" - "go.opentelemetry.io/collector/exporter/exporterhelper/internal" + "go.opentelemetry.io/collector/exporter/exporterqueue" + "go.opentelemetry.io/collector/exporter/internal/queue" "go.opentelemetry.io/collector/pdata/pmetric" ) @@ -21,37 +22,35 @@ var metricsMarshaler = &pmetric.ProtoMarshaler{} var metricsUnmarshaler = &pmetric.ProtoUnmarshaler{} type metricsRequest struct { - baseRequest md pmetric.Metrics pusher consumer.ConsumeMetricsFunc } -func newMetricsRequest(ctx context.Context, md pmetric.Metrics, pusher consumer.ConsumeMetricsFunc) internal.Request { +func newMetricsRequest(md pmetric.Metrics, pusher consumer.ConsumeMetricsFunc) Request { return &metricsRequest{ - baseRequest: baseRequest{ctx: ctx}, - md: md, - pusher: pusher, + md: md, + pusher: pusher, } } -func newMetricsRequestUnmarshalerFunc(pusher consumer.ConsumeMetricsFunc) internal.RequestUnmarshaler { - return func(bytes []byte) (internal.Request, error) { +func newMetricsRequestUnmarshalerFunc(pusher consumer.ConsumeMetricsFunc) exporterqueue.Unmarshaler[Request] { + return func(bytes []byte) (Request, error) { metrics, err := metricsUnmarshaler.UnmarshalMetrics(bytes) if err != nil { return nil, err } - return newMetricsRequest(context.Background(), metrics, pusher), nil + return newMetricsRequest(metrics, pusher), nil } } -func metricsRequestMarshaler(req internal.Request) ([]byte, error) { +func metricsRequestMarshaler(req Request) ([]byte, error) { return metricsMarshaler.MarshalMetrics(req.(*metricsRequest).md) } -func (req *metricsRequest) OnError(err error) internal.Request { +func (req *metricsRequest) OnError(err error) Request { var metricsError consumererror.Metrics if errors.As(err, &metricsError) { - return newMetricsRequest(req.ctx, metricsError.Data(), req.pusher) + return newMetricsRequest(metricsError.Data(), req.pusher) } return req } @@ -60,7 +59,7 @@ func (req *metricsRequest) Export(ctx context.Context) error { return req.pusher(ctx, req.md) } -func (req *metricsRequest) Count() int { +func (req *metricsRequest) ItemsCount() int { return req.md.DataPointCount() } @@ -71,7 +70,7 @@ type metricsExporter struct { // NewMetricsExporter creates an exporter.Metrics that records observability metrics and wraps every request with a Span. func NewMetricsExporter( - _ context.Context, + ctx context.Context, set exporter.CreateSettings, cfg component.Config, pusher consumer.ConsumeMetricsFunc, @@ -80,42 +79,23 @@ func NewMetricsExporter( if cfg == nil { return nil, errNilConfig } - - if set.Logger == nil { - return nil, errNilLogger - } - if pusher == nil { return nil, errNilPushMetricsData } - - be, err := newBaseExporter(set, component.DataTypeMetrics, false, metricsRequestMarshaler, - newMetricsRequestUnmarshalerFunc(pusher), newMetricsSenderWithObservability, options...) - if err != nil { - return nil, err - } - - mc, err := consumer.NewMetrics(func(ctx context.Context, md pmetric.Metrics) error { - req := newMetricsRequest(ctx, md, pusher) - serr := be.send(req) - if errors.Is(serr, errSendingQueueIsFull) { - be.obsrep.recordMetricsEnqueueFailure(req.Context(), int64(req.Count())) - } - return serr - }, be.consumerOptions...) - - return &metricsExporter{ - baseExporter: be, - Metrics: mc, - }, err + metricsOpts := []Option{withMarshaler(metricsRequestMarshaler), withUnmarshaler(newMetricsRequestUnmarshalerFunc(pusher))} + return NewMetricsRequestExporter(ctx, set, requestFromMetrics(pusher), append(metricsOpts, options...)...) } -// MetricsConverter provides an interface for converting pmetric.Metrics into a request. +// RequestFromMetricsFunc converts pdata.Metrics into a user-defined request. // This API is at the early stage of development and may change without backward compatibility // until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. -type MetricsConverter interface { - // RequestFromMetrics converts pdata.Metrics into a request. - RequestFromMetrics(context.Context, pmetric.Metrics) (Request, error) +type RequestFromMetricsFunc func(context.Context, pmetric.Metrics) (Request, error) + +// requestFromMetrics returns a RequestFromMetricsFunc that converts pdata.Metrics into a Request. +func requestFromMetrics(pusher consumer.ConsumeMetricsFunc) RequestFromMetricsFunc { + return func(_ context.Context, md pmetric.Metrics) (Request, error) { + return newMetricsRequest(md, pusher), nil + } } // NewMetricsRequestExporter creates a new metrics exporter based on a custom MetricsConverter and RequestSender. @@ -124,7 +104,7 @@ type MetricsConverter interface { func NewMetricsRequestExporter( _ context.Context, set exporter.CreateSettings, - converter MetricsConverter, + converter RequestFromMetricsFunc, options ...Option, ) (exporter.Metrics, error) { if set.Logger == nil { @@ -135,23 +115,22 @@ func NewMetricsRequestExporter( return nil, errNilMetricsConverter } - be, err := newBaseExporter(set, component.DataTypeMetrics, true, nil, nil, newMetricsSenderWithObservability, options...) + be, err := newBaseExporter(set, component.DataTypeMetrics, newMetricsSenderWithObservability, options...) if err != nil { return nil, err } mc, err := consumer.NewMetrics(func(ctx context.Context, md pmetric.Metrics) error { - req, cErr := converter.RequestFromMetrics(ctx, md) + req, cErr := converter(ctx, md) if cErr != nil { set.Logger.Error("Failed to convert metrics. Dropping data.", zap.Int("dropped_data_points", md.DataPointCount()), zap.Error(err)) return consumererror.NewPermanent(cErr) } - r := newRequest(ctx, req) - sErr := be.send(r) - if errors.Is(sErr, errSendingQueueIsFull) { - be.obsrep.recordMetricsEnqueueFailure(r.Context(), int64(r.Count())) + sErr := be.send(ctx, req) + if errors.Is(sErr, queue.ErrQueueIsFull) { + be.obsrep.recordEnqueueFailure(ctx, component.DataTypeMetrics, int64(req.ItemsCount())) } return sErr }, be.consumerOptions...) @@ -164,16 +143,16 @@ func NewMetricsRequestExporter( type metricsSenderWithObservability struct { baseRequestSender - obsrep *obsExporter + obsrep *ObsReport } -func newMetricsSenderWithObservability(obsrep *obsExporter) requestSender { +func newMetricsSenderWithObservability(obsrep *ObsReport) requestSender { return &metricsSenderWithObservability{obsrep: obsrep} } -func (mewo *metricsSenderWithObservability) send(req internal.Request) error { - req.SetContext(mewo.obsrep.StartMetricsOp(req.Context())) - err := mewo.nextSender.send(req) - mewo.obsrep.EndMetricsOp(req.Context(), req.Count(), err) +func (mewo *metricsSenderWithObservability) send(ctx context.Context, req Request) error { + c := mewo.obsrep.StartMetricsOp(ctx) + err := mewo.nextSender.send(c, req) + mewo.obsrep.EndMetricsOp(c, req.ItemsCount(), err) return err } diff --git a/exporter/exporterhelper/metrics_test.go b/exporter/exporterhelper/metrics_test.go index 81fab6f04ca..ddbefeb71f2 100644 --- a/exporter/exporterhelper/metrics_test.go +++ b/exporter/exporterhelper/metrics_test.go @@ -16,18 +16,19 @@ import ( sdktrace "go.opentelemetry.io/otel/sdk/trace" "go.opentelemetry.io/otel/sdk/trace/tracetest" "go.opentelemetry.io/otel/trace" + nooptrace "go.opentelemetry.io/otel/trace/noop" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/exporter" - "go.opentelemetry.io/collector/exporter/exporterhelper/internal" "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/exporter/internal/queue" "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" "go.opentelemetry.io/collector/internal/testdata" - "go.opentelemetry.io/collector/obsreport/obsreporttest" "go.opentelemetry.io/collector/pdata/pmetric" ) @@ -36,18 +37,18 @@ const ( ) var ( - fakeMetricsExporterName = component.NewIDWithName("fake_metrics_exporter", "with_name") + fakeMetricsExporterName = component.MustNewIDWithName("fake_metrics_exporter", "with_name") fakeMetricsExporterConfig = struct{}{} ) func TestMetricsRequest(t *testing.T) { - mr := newMetricsRequest(context.Background(), testdata.GenerateMetrics(1), nil) + mr := newMetricsRequest(testdata.GenerateMetrics(1), nil) metricsErr := consumererror.NewMetrics(errors.New("some error"), pmetric.NewMetrics()) assert.EqualValues( t, - newMetricsRequest(context.Background(), pmetric.NewMetrics(), nil), - mr.OnError(metricsErr), + newMetricsRequest(pmetric.NewMetrics(), nil), + mr.(RequestErrorHandler).OnError(metricsErr), ) } @@ -64,7 +65,8 @@ func TestMetricsExporter_NilLogger(t *testing.T) { } func TestMetricsRequestExporter_NilLogger(t *testing.T) { - me, err := NewMetricsRequestExporter(context.Background(), exporter.CreateSettings{}, fakeRequestConverter{}) + me, err := NewMetricsRequestExporter(context.Background(), exporter.CreateSettings{}, + (&fakeRequestConverter{}).requestFromMetricsFunc) require.Nil(t, me) require.Equal(t, errNilLogger, err) } @@ -95,7 +97,8 @@ func TestMetricsExporter_Default(t *testing.T) { func TestMetricsRequestExporter_Default(t *testing.T) { md := pmetric.NewMetrics() - me, err := NewMetricsRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), fakeRequestConverter{}) + me, err := NewMetricsRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), + (&fakeRequestConverter{}).requestFromMetricsFunc) assert.NoError(t, err) assert.NotNil(t, me) @@ -116,8 +119,8 @@ func TestMetricsExporter_WithCapabilities(t *testing.T) { func TestMetricsRequestExporter_WithCapabilities(t *testing.T) { capabilities := consumer.Capabilities{MutatesData: true} - me, err := NewMetricsRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), fakeRequestConverter{}, - WithCapabilities(capabilities)) + me, err := NewMetricsRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), + (&fakeRequestConverter{}).requestFromMetricsFunc, WithCapabilities(capabilities)) assert.NoError(t, err) assert.NotNil(t, me) @@ -136,7 +139,8 @@ func TestMetricsExporter_Default_ReturnError(t *testing.T) { func TestMetricsRequestExporter_Default_ConvertError(t *testing.T) { md := pmetric.NewMetrics() want := errors.New("convert_error") - me, err := NewMetricsRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), fakeRequestConverter{metricsError: want}) + me, err := NewMetricsRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), + (&fakeRequestConverter{metricsError: want}).requestFromMetricsFunc) require.NoError(t, err) require.NotNil(t, me) require.Equal(t, consumererror.NewPermanent(want), me.ConsumeMetrics(context.Background(), md)) @@ -146,7 +150,7 @@ func TestMetricsRequestExporter_Default_ExportError(t *testing.T) { md := pmetric.NewMetrics() want := errors.New("export_error") me, err := NewMetricsRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), - fakeRequestConverter{requestError: want}) + (&fakeRequestConverter{requestError: want}).requestFromMetricsFunc) require.NoError(t, err) require.NotNil(t, me) require.Equal(t, want, me.ConsumeMetrics(context.Background(), md)) @@ -154,17 +158,17 @@ func TestMetricsRequestExporter_Default_ExportError(t *testing.T) { func TestMetricsExporter_WithPersistentQueue(t *testing.T) { qCfg := NewDefaultQueueSettings() - storageID := component.NewIDWithName("file_storage", "storage") + storageID := component.MustNewIDWithName("file_storage", "storage") qCfg.StorageID = &storageID - rCfg := NewDefaultRetrySettings() + rCfg := configretry.NewDefaultBackOffConfig() ms := consumertest.MetricsSink{} set := exportertest.NewNopCreateSettings() - set.ID = component.NewIDWithName("test_metrics", "with_persistent_queue") + set.ID = component.MustNewIDWithName("test_metrics", "with_persistent_queue") te, err := NewMetricsExporter(context.Background(), set, &fakeTracesExporterConfig, ms.ConsumeMetrics, WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) host := &mockHost{ext: map[component.ID]component.Component{ - storageID: internal.NewMockStorageExtension(nil), + storageID: queue.NewMockStorageExtension(nil), }} require.NoError(t, te.Start(context.Background(), host)) t.Cleanup(func() { require.NoError(t, te.Shutdown(context.Background())) }) @@ -177,11 +181,11 @@ func TestMetricsExporter_WithPersistentQueue(t *testing.T) { } func TestMetricsExporter_WithRecordMetrics(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(fakeMetricsExporterName) + tt, err := componenttest.SetupTelemetry(fakeMetricsExporterName) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - me, err := NewMetricsExporter(context.Background(), exportertest.NewCreateSettings(fakeMetricsExporterName, tt.TelemetrySettings), &fakeMetricsExporterConfig, newPushMetricsData(nil)) + me, err := NewMetricsExporter(context.Background(), exporter.CreateSettings{ID: fakeMetricsExporterName, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, &fakeMetricsExporterConfig, newPushMetricsData(nil)) require.NoError(t, err) require.NotNil(t, me) @@ -189,11 +193,13 @@ func TestMetricsExporter_WithRecordMetrics(t *testing.T) { } func TestMetricsRequestExporter_WithRecordMetrics(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(fakeMetricsExporterName) + tt, err := componenttest.SetupTelemetry(fakeMetricsExporterName) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - me, err := NewMetricsRequestExporter(context.Background(), exportertest.NewCreateSettings(fakeMetricsExporterName, tt.TelemetrySettings), fakeRequestConverter{}) + me, err := NewMetricsRequestExporter(context.Background(), + exporter.CreateSettings{ID: fakeMetricsExporterName, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, + (&fakeRequestConverter{}).requestFromMetricsFunc) require.NoError(t, err) require.NotNil(t, me) @@ -202,11 +208,11 @@ func TestMetricsRequestExporter_WithRecordMetrics(t *testing.T) { func TestMetricsExporter_WithRecordMetrics_ReturnError(t *testing.T) { want := errors.New("my_error") - tt, err := obsreporttest.SetupTelemetry(fakeMetricsExporterName) + tt, err := componenttest.SetupTelemetry(fakeMetricsExporterName) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - me, err := NewMetricsExporter(context.Background(), exportertest.NewCreateSettings(fakeMetricsExporterName, tt.TelemetrySettings), &fakeMetricsExporterConfig, newPushMetricsData(want)) + me, err := NewMetricsExporter(context.Background(), exporter.CreateSettings{ID: fakeMetricsExporterName, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, &fakeMetricsExporterConfig, newPushMetricsData(want)) require.NoError(t, err) require.NotNil(t, me) @@ -215,11 +221,13 @@ func TestMetricsExporter_WithRecordMetrics_ReturnError(t *testing.T) { func TestMetricsRequestExporter_WithRecordMetrics_ExportError(t *testing.T) { want := errors.New("my_error") - tt, err := obsreporttest.SetupTelemetry(fakeMetricsExporterName) + tt, err := componenttest.SetupTelemetry(fakeMetricsExporterName) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - me, err := NewMetricsRequestExporter(context.Background(), exportertest.NewCreateSettings(fakeMetricsExporterName, tt.TelemetrySettings), fakeRequestConverter{requestError: want}) + me, err := NewMetricsRequestExporter(context.Background(), + exporter.CreateSettings{ID: fakeMetricsExporterName, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, + (&fakeRequestConverter{requestError: want}).requestFromMetricsFunc) require.NoError(t, err) require.NotNil(t, me) @@ -227,16 +235,16 @@ func TestMetricsRequestExporter_WithRecordMetrics_ExportError(t *testing.T) { } func TestMetricsExporter_WithRecordEnqueueFailedMetrics(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(fakeMetricsExporterName) + tt, err := componenttest.SetupTelemetry(fakeMetricsExporterName) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - rCfg := NewDefaultRetrySettings() + rCfg := configretry.NewDefaultBackOffConfig() qCfg := NewDefaultQueueSettings() qCfg.NumConsumers = 1 qCfg.QueueSize = 2 wantErr := errors.New("some-error") - te, err := NewMetricsExporter(context.Background(), exportertest.NewCreateSettings(fakeMetricsExporterName, tt.TelemetrySettings), &fakeMetricsExporterConfig, newPushMetricsData(wantErr), WithRetry(rCfg), WithQueue(qCfg)) + te, err := NewMetricsExporter(context.Background(), exporter.CreateSettings{ID: fakeMetricsExporterName, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, &fakeMetricsExporterConfig, newPushMetricsData(wantErr), WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) require.NotNil(t, te) @@ -248,7 +256,7 @@ func TestMetricsExporter_WithRecordEnqueueFailedMetrics(t *testing.T) { } // 2 batched must be in queue, and 10 metric points rejected due to queue overflow - checkExporterEnqueueFailedMetricsStats(t, globalInstruments, fakeMetricsExporterName, int64(10)) + require.NoError(t, tt.CheckExporterEnqueueFailedMetrics(int64(10))) } func TestMetricsExporter_WithSpan(t *testing.T) { @@ -256,7 +264,7 @@ func TestMetricsExporter_WithSpan(t *testing.T) { sr := new(tracetest.SpanRecorder) set.TracerProvider = sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr)) otel.SetTracerProvider(set.TracerProvider) - defer otel.SetTracerProvider(trace.NewNoopTracerProvider()) + defer otel.SetTracerProvider(nooptrace.NewTracerProvider()) me, err := NewMetricsExporter(context.Background(), set, &fakeMetricsExporterConfig, newPushMetricsData(nil)) require.NoError(t, err) @@ -269,9 +277,9 @@ func TestMetricsRequestExporter_WithSpan(t *testing.T) { sr := new(tracetest.SpanRecorder) set.TracerProvider = sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr)) otel.SetTracerProvider(set.TracerProvider) - defer otel.SetTracerProvider(trace.NewNoopTracerProvider()) + defer otel.SetTracerProvider(nooptrace.NewTracerProvider()) - me, err := NewMetricsRequestExporter(context.Background(), set, fakeRequestConverter{}) + me, err := NewMetricsRequestExporter(context.Background(), set, (&fakeRequestConverter{}).requestFromMetricsFunc) require.NoError(t, err) require.NotNil(t, me) checkWrapSpanForMetricsExporter(t, sr, set.TracerProvider.Tracer("test"), me, nil, 2) @@ -282,7 +290,7 @@ func TestMetricsExporter_WithSpan_ReturnError(t *testing.T) { sr := new(tracetest.SpanRecorder) set.TracerProvider = sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr)) otel.SetTracerProvider(set.TracerProvider) - defer otel.SetTracerProvider(trace.NewNoopTracerProvider()) + defer otel.SetTracerProvider(nooptrace.NewTracerProvider()) want := errors.New("my_error") me, err := NewMetricsExporter(context.Background(), set, &fakeMetricsExporterConfig, newPushMetricsData(want)) @@ -296,10 +304,10 @@ func TestMetricsRequestExporter_WithSpan_ExportError(t *testing.T) { sr := new(tracetest.SpanRecorder) set.TracerProvider = sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr)) otel.SetTracerProvider(set.TracerProvider) - defer otel.SetTracerProvider(trace.NewNoopTracerProvider()) + defer otel.SetTracerProvider(nooptrace.NewTracerProvider()) want := errors.New("my_error") - me, err := NewMetricsRequestExporter(context.Background(), set, fakeRequestConverter{requestError: want}) + me, err := NewMetricsRequestExporter(context.Background(), set, (&fakeRequestConverter{requestError: want}).requestFromMetricsFunc) require.NoError(t, err) require.NotNil(t, me) checkWrapSpanForMetricsExporter(t, sr, set.TracerProvider.Tracer("test"), me, want, 2) @@ -323,7 +331,7 @@ func TestMetricsRequestExporter_WithShutdown(t *testing.T) { shutdown := func(context.Context) error { shutdownCalled = true; return nil } me, err := NewMetricsRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), - &fakeRequestConverter{}, WithShutdown(shutdown)) + (&fakeRequestConverter{}).requestFromMetricsFunc, WithShutdown(shutdown)) assert.NotNil(t, me) assert.NoError(t, err) @@ -349,7 +357,7 @@ func TestMetricsRequestExporter_WithShutdown_ReturnError(t *testing.T) { shutdownErr := func(context.Context) error { return want } me, err := NewMetricsRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), - &fakeRequestConverter{}, WithShutdown(shutdownErr)) + (&fakeRequestConverter{}).requestFromMetricsFunc, WithShutdown(shutdownErr)) assert.NotNil(t, me) assert.NoError(t, err) @@ -358,12 +366,12 @@ func TestMetricsRequestExporter_WithShutdown_ReturnError(t *testing.T) { } func newPushMetricsData(retError error) consumer.ConsumeMetricsFunc { - return func(ctx context.Context, td pmetric.Metrics) error { + return func(_ context.Context, _ pmetric.Metrics) error { return retError } } -func checkRecordedMetricsForMetricsExporter(t *testing.T, tt obsreporttest.TestTelemetry, me exporter.Metrics, wantError error) { +func checkRecordedMetricsForMetricsExporter(t *testing.T, tt componenttest.TestTelemetry, me exporter.Metrics, wantError error) { md := testdata.GenerateMetrics(2) const numBatches = 7 for i := 0; i < numBatches; i++ { diff --git a/exporter/exporterhelper/obsexporter.go b/exporter/exporterhelper/obsexporter.go index e6bc950f708..f42c0195f49 100644 --- a/exporter/exporterhelper/obsexporter.go +++ b/exporter/exporterhelper/obsexporter.go @@ -5,14 +5,10 @@ package exporterhelper // import "go.opentelemetry.io/collector/exporter/exporte import ( "context" - "errors" - "go.opencensus.io/stats" - "go.opencensus.io/tag" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/metric" - sdkmetric "go.opentelemetry.io/otel/sdk/metric" "go.opentelemetry.io/otel/trace" "go.uber.org/multierr" "go.uber.org/zap" @@ -20,7 +16,6 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/exporter" - "go.opentelemetry.io/collector/internal/obsreportconfig" "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" ) @@ -32,18 +27,19 @@ const ( type ObsReport struct { level configtelemetry.Level spanNamePrefix string - mutators []tag.Mutator tracer trace.Tracer logger *zap.Logger - useOtelForMetrics bool - otelAttrs []attribute.KeyValue - sentSpans metric.Int64Counter - failedToSendSpans metric.Int64Counter - sentMetricPoints metric.Int64Counter - failedToSendMetricPoints metric.Int64Counter - sentLogRecords metric.Int64Counter - failedToSendLogRecords metric.Int64Counter + otelAttrs []attribute.KeyValue + sentSpans metric.Int64Counter + failedToSendSpans metric.Int64Counter + failedToEnqueueSpans metric.Int64Counter + sentMetricPoints metric.Int64Counter + failedToSendMetricPoints metric.Int64Counter + failedToEnqueueMetricPoints metric.Int64Counter + sentLogRecords metric.Int64Counter + failedToSendLogRecords metric.Int64Counter + failedToEnqueueLogRecords metric.Int64Counter } // ObsReportSettings are settings for creating an ObsReport. @@ -54,28 +50,22 @@ type ObsReportSettings struct { // NewObsReport creates a new Exporter. func NewObsReport(cfg ObsReportSettings) (*ObsReport, error) { - return newExporter(cfg, obsreportconfig.UseOtelForInternalMetricsfeatureGate.IsEnabled()) + return newExporter(cfg) } -func newExporter(cfg ObsReportSettings, useOtel bool) (*ObsReport, error) { +func newExporter(cfg ObsReportSettings) (*ObsReport, error) { exp := &ObsReport{ level: cfg.ExporterCreateSettings.TelemetrySettings.MetricsLevel, spanNamePrefix: obsmetrics.ExporterPrefix + cfg.ExporterID.String(), - mutators: []tag.Mutator{tag.Upsert(obsmetrics.TagKeyExporter, cfg.ExporterID.String(), tag.WithTTL(tag.TTLNoPropagation))}, tracer: cfg.ExporterCreateSettings.TracerProvider.Tracer(cfg.ExporterID.String()), logger: cfg.ExporterCreateSettings.Logger, - useOtelForMetrics: useOtel, otelAttrs: []attribute.KeyValue{ attribute.String(obsmetrics.ExporterKey, cfg.ExporterID.String()), }, } - // ignore instrument name error as per workaround in https://github.com/open-telemetry/opentelemetry-collector/issues/8346 - // if err := exp.createOtelMetrics(cfg); err != nil { - // return nil, err - // } - if err := exp.createOtelMetrics(cfg); err != nil && !errors.Is(err, sdkmetric.ErrInstrumentName) { + if err := exp.createOtelMetrics(cfg); err != nil { return nil, err } @@ -83,9 +73,6 @@ func newExporter(cfg ObsReportSettings, useOtel bool) (*ObsReport, error) { } func (or *ObsReport) createOtelMetrics(cfg ObsReportSettings) error { - if !or.useOtelForMetrics { - return nil - } meter := cfg.ExporterCreateSettings.MeterProvider.Meter(exporterScope) var errors, err error @@ -102,6 +89,12 @@ func (or *ObsReport) createOtelMetrics(cfg ObsReportSettings) error { metric.WithUnit("1")) errors = multierr.Append(errors, err) + or.failedToEnqueueSpans, err = meter.Int64Counter( + obsmetrics.ExporterPrefix+obsmetrics.FailedToEnqueueSpansKey, + metric.WithDescription("Number of spans failed to be added to the sending queue."), + metric.WithUnit("1")) + errors = multierr.Append(errors, err) + or.sentMetricPoints, err = meter.Int64Counter( obsmetrics.ExporterPrefix+obsmetrics.SentMetricPointsKey, metric.WithDescription("Number of metric points successfully sent to destination."), @@ -114,6 +107,12 @@ func (or *ObsReport) createOtelMetrics(cfg ObsReportSettings) error { metric.WithUnit("1")) errors = multierr.Append(errors, err) + or.failedToEnqueueMetricPoints, err = meter.Int64Counter( + obsmetrics.ExporterPrefix+obsmetrics.FailedToEnqueueMetricPointsKey, + metric.WithDescription("Number of metric points failed to be added to the sending queue."), + metric.WithUnit("1")) + errors = multierr.Append(errors, err) + or.sentLogRecords, err = meter.Int64Counter( obsmetrics.ExporterPrefix+obsmetrics.SentLogRecordsKey, metric.WithDescription("Number of log record successfully sent to destination."), @@ -126,6 +125,12 @@ func (or *ObsReport) createOtelMetrics(cfg ObsReportSettings) error { metric.WithUnit("1")) errors = multierr.Append(errors, err) + or.failedToEnqueueLogRecords, err = meter.Int64Counter( + obsmetrics.ExporterPrefix+obsmetrics.FailedToEnqueueLogRecordsKey, + metric.WithDescription("Number of log records failed to be added to the sending queue."), + metric.WithUnit("1")) + errors = multierr.Append(errors, err) + return errors } @@ -139,7 +144,7 @@ func (or *ObsReport) StartTracesOp(ctx context.Context) context.Context { // EndTracesOp completes the export operation that was started with StartTracesOp. func (or *ObsReport) EndTracesOp(ctx context.Context, numSpans int, err error) { numSent, numFailedToSend := toNumItems(numSpans, err) - or.recordMetrics(ctx, component.DataTypeTraces, numSent, numFailedToSend) + or.recordMetrics(noCancellationContext{Context: ctx}, component.DataTypeTraces, numSent, numFailedToSend) endSpan(ctx, err, numSent, numFailedToSend, obsmetrics.SentSpansKey, obsmetrics.FailedToSendSpansKey) } @@ -154,7 +159,7 @@ func (or *ObsReport) StartMetricsOp(ctx context.Context) context.Context { // StartMetricsOp. func (or *ObsReport) EndMetricsOp(ctx context.Context, numMetricPoints int, err error) { numSent, numFailedToSend := toNumItems(numMetricPoints, err) - or.recordMetrics(ctx, component.DataTypeMetrics, numSent, numFailedToSend) + or.recordMetrics(noCancellationContext{Context: ctx}, component.DataTypeMetrics, numSent, numFailedToSend) endSpan(ctx, err, numSent, numFailedToSend, obsmetrics.SentMetricPointsKey, obsmetrics.FailedToSendMetricPointsKey) } @@ -168,7 +173,7 @@ func (or *ObsReport) StartLogsOp(ctx context.Context) context.Context { // EndLogsOp completes the export operation that was started with StartLogsOp. func (or *ObsReport) EndLogsOp(ctx context.Context, numLogRecords int, err error) { numSent, numFailedToSend := toNumItems(numLogRecords, err) - or.recordMetrics(ctx, component.DataTypeLogs, numSent, numFailedToSend) + or.recordMetrics(noCancellationContext{Context: ctx}, component.DataTypeLogs, numSent, numFailedToSend) endSpan(ctx, err, numSent, numFailedToSend, obsmetrics.SentLogRecordsKey, obsmetrics.FailedToSendLogRecordsKey) } @@ -180,18 +185,10 @@ func (or *ObsReport) startOp(ctx context.Context, operationSuffix string) contex return ctx } -func (or *ObsReport) recordMetrics(ctx context.Context, dataType component.DataType, numSent, numFailed int64) { +func (or *ObsReport) recordMetrics(ctx context.Context, dataType component.DataType, sent, failed int64) { if or.level == configtelemetry.LevelNone { return } - if or.useOtelForMetrics { - or.recordWithOtel(ctx, dataType, numSent, numFailed) - } else { - or.recordWithOC(ctx, dataType, numSent, numFailed) - } -} - -func (or *ObsReport) recordWithOtel(ctx context.Context, dataType component.DataType, sent int64, failed int64) { var sentMeasure, failedMeasure metric.Int64Counter switch dataType { case component.DataTypeTraces: @@ -209,34 +206,6 @@ func (or *ObsReport) recordWithOtel(ctx context.Context, dataType component.Data failedMeasure.Add(ctx, failed, metric.WithAttributes(or.otelAttrs...)) } -func (or *ObsReport) recordWithOC(ctx context.Context, dataType component.DataType, sent int64, failed int64) { - var sentMeasure, failedMeasure *stats.Int64Measure - switch dataType { - case component.DataTypeTraces: - sentMeasure = obsmetrics.ExporterSentSpans - failedMeasure = obsmetrics.ExporterFailedToSendSpans - case component.DataTypeMetrics: - sentMeasure = obsmetrics.ExporterSentMetricPoints - failedMeasure = obsmetrics.ExporterFailedToSendMetricPoints - case component.DataTypeLogs: - sentMeasure = obsmetrics.ExporterSentLogRecords - failedMeasure = obsmetrics.ExporterFailedToSendLogRecords - } - - if failed > 0 { - _ = stats.RecordWithTags( - ctx, - or.mutators, - sentMeasure.M(sent), - failedMeasure.M(failed)) - } else { - _ = stats.RecordWithTags( - ctx, - or.mutators, - sentMeasure.M(sent)) - } -} - func endSpan(ctx context.Context, err error, numSent, numFailedToSend int64, sentItemsKey, failedToSendItemsKey string) { span := trace.SpanFromContext(ctx) // End the span according to errors. @@ -258,3 +227,17 @@ func toNumItems(numExportedItems int, err error) (int64, int64) { } return int64(numExportedItems), 0 } + +func (or *ObsReport) recordEnqueueFailure(ctx context.Context, dataType component.DataType, failed int64) { + var enqueueFailedMeasure metric.Int64Counter + switch dataType { + case component.DataTypeTraces: + enqueueFailedMeasure = or.failedToEnqueueSpans + case component.DataTypeMetrics: + enqueueFailedMeasure = or.failedToEnqueueMetricPoints + case component.DataTypeLogs: + enqueueFailedMeasure = or.failedToEnqueueLogRecords + } + + enqueueFailedMeasure.Add(ctx, failed, metric.WithAttributes(or.otelAttrs...)) +} diff --git a/exporter/exporterhelper/obsexporter_test.go b/exporter/exporterhelper/obsexporter_test.go index b1942e98306..f6f46ccbad2 100644 --- a/exporter/exporterhelper/obsexporter_test.go +++ b/exporter/exporterhelper/obsexporter_test.go @@ -14,26 +14,26 @@ import ( "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" - "go.opentelemetry.io/collector/obsreport/obsreporttest" ) var ( - exporterID = component.NewID("fakeExporter") + exporterID = component.MustNewID("fakeExporter") errFake = errors.New("errFake") ) func TestExportTraceDataOp(t *testing.T) { - testTelemetry(t, exporterID, func(t *testing.T, tt obsreporttest.TestTelemetry, useOtel bool) { - parentCtx, parentSpan := tt.TracerProvider.Tracer("test").Start(context.Background(), t.Name()) + testTelemetry(t, exporterID, func(t *testing.T, tt componenttest.TestTelemetry) { + parentCtx, parentSpan := tt.TelemetrySettings().TracerProvider.Tracer("test").Start(context.Background(), t.Name()) defer parentSpan.End() obsrep, err := newExporter(ObsReportSettings{ ExporterID: exporterID, - ExporterCreateSettings: exportertest.NewCreateSettings(exporterID, tt.TelemetrySettings), - }, useOtel) + ExporterCreateSettings: exporter.CreateSettings{ID: exporterID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, + }) require.NoError(t, err) params := []testParams{ @@ -74,14 +74,14 @@ func TestExportTraceDataOp(t *testing.T) { } func TestExportMetricsOp(t *testing.T) { - testTelemetry(t, exporterID, func(t *testing.T, tt obsreporttest.TestTelemetry, useOtel bool) { - parentCtx, parentSpan := tt.TracerProvider.Tracer("test").Start(context.Background(), t.Name()) + testTelemetry(t, exporterID, func(t *testing.T, tt componenttest.TestTelemetry) { + parentCtx, parentSpan := tt.TelemetrySettings().TracerProvider.Tracer("test").Start(context.Background(), t.Name()) defer parentSpan.End() obsrep, err := newExporter(ObsReportSettings{ ExporterID: exporterID, - ExporterCreateSettings: exportertest.NewCreateSettings(exporterID, tt.TelemetrySettings), - }, useOtel) + ExporterCreateSettings: exporter.CreateSettings{ID: exporterID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, + }) require.NoError(t, err) params := []testParams{ @@ -123,14 +123,14 @@ func TestExportMetricsOp(t *testing.T) { } func TestExportLogsOp(t *testing.T) { - testTelemetry(t, exporterID, func(t *testing.T, tt obsreporttest.TestTelemetry, useOtel bool) { - parentCtx, parentSpan := tt.TracerProvider.Tracer("test").Start(context.Background(), t.Name()) + testTelemetry(t, exporterID, func(t *testing.T, tt componenttest.TestTelemetry) { + parentCtx, parentSpan := tt.TelemetrySettings().TracerProvider.Tracer("test").Start(context.Background(), t.Name()) defer parentSpan.End() obsrep, err := newExporter(ObsReportSettings{ ExporterID: exporterID, - ExporterCreateSettings: exportertest.NewCreateSettings(exporterID, tt.TelemetrySettings), - }, useOtel) + ExporterCreateSettings: exporter.CreateSettings{ID: exporterID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, + }) require.NoError(t, err) params := []testParams{ @@ -171,25 +171,77 @@ func TestExportLogsOp(t *testing.T) { }) } -type testParams struct { - items int - err error +func TestCheckExporterTracesViews(t *testing.T) { + tt, err := componenttest.SetupTelemetry(exporterID) + require.NoError(t, err) + t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) + + obsrep, err := NewObsReport(ObsReportSettings{ + ExporterID: exporterID, + ExporterCreateSettings: exporter.CreateSettings{ID: exporterID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, + }) + require.NoError(t, err) + ctx := obsrep.StartTracesOp(context.Background()) + require.NotNil(t, ctx) + obsrep.EndTracesOp(ctx, 7, nil) + + assert.NoError(t, tt.CheckExporterTraces(7, 0)) + assert.Error(t, tt.CheckExporterTraces(7, 7)) + assert.Error(t, tt.CheckExporterTraces(0, 0)) + assert.Error(t, tt.CheckExporterTraces(0, 7)) } -func testTelemetry(t *testing.T, id component.ID, testFunc func(t *testing.T, tt obsreporttest.TestTelemetry, useOtel bool)) { - t.Run("WithOC", func(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(id) - require.NoError(t, err) - t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) +func TestCheckExporterMetricsViews(t *testing.T) { + tt, err := componenttest.SetupTelemetry(exporterID) + require.NoError(t, err) + t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - testFunc(t, tt, false) + obsrep, err := NewObsReport(ObsReportSettings{ + ExporterID: exporterID, + ExporterCreateSettings: exporter.CreateSettings{ID: exporterID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, }) + require.NoError(t, err) + ctx := obsrep.StartMetricsOp(context.Background()) + require.NotNil(t, ctx) + obsrep.EndMetricsOp(ctx, 7, nil) + + assert.NoError(t, tt.CheckExporterMetrics(7, 0)) + assert.Error(t, tt.CheckExporterMetrics(7, 7)) + assert.Error(t, tt.CheckExporterMetrics(0, 0)) + assert.Error(t, tt.CheckExporterMetrics(0, 7)) +} + +func TestCheckExporterLogsViews(t *testing.T) { + tt, err := componenttest.SetupTelemetry(exporterID) + require.NoError(t, err) + t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) + + obsrep, err := NewObsReport(ObsReportSettings{ + ExporterID: exporterID, + ExporterCreateSettings: exporter.CreateSettings{ID: exporterID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, + }) + require.NoError(t, err) + ctx := obsrep.StartLogsOp(context.Background()) + require.NotNil(t, ctx) + obsrep.EndLogsOp(ctx, 7, nil) + + assert.NoError(t, tt.CheckExporterLogs(7, 0)) + assert.Error(t, tt.CheckExporterLogs(7, 7)) + assert.Error(t, tt.CheckExporterLogs(0, 0)) + assert.Error(t, tt.CheckExporterLogs(0, 7)) +} + +type testParams struct { + items int + err error +} +func testTelemetry(t *testing.T, id component.ID, testFunc func(t *testing.T, tt componenttest.TestTelemetry)) { t.Run("WithOTel", func(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(id) + tt, err := componenttest.SetupTelemetry(id) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - testFunc(t, tt, true) + testFunc(t, tt) }) } diff --git a/exporter/exporterhelper/obsreport.go b/exporter/exporterhelper/obsreport.go deleted file mode 100644 index d0e0ae11bf3..00000000000 --- a/exporter/exporterhelper/obsreport.go +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package exporterhelper // import "go.opentelemetry.io/collector/exporter/exporterhelper" - -import ( - "context" - - "go.opencensus.io/metric" - "go.opencensus.io/metric/metricdata" - "go.opencensus.io/metric/metricproducer" - - "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" -) - -// TODO: Incorporate this functionality along with tests from obsreport_test.go -// into existing `obsreport` package once its functionally is not exposed -// as public API. For now this part is kept private. - -var ( - globalInstruments = newInstruments(metric.NewRegistry()) -) - -func init() { - metricproducer.GlobalManager().AddProducer(globalInstruments.registry) -} - -type instruments struct { - registry *metric.Registry - queueSize *metric.Int64DerivedGauge - queueCapacity *metric.Int64DerivedGauge - failedToEnqueueTraceSpans *metric.Int64Cumulative - failedToEnqueueMetricPoints *metric.Int64Cumulative - failedToEnqueueLogRecords *metric.Int64Cumulative -} - -func newInstruments(registry *metric.Registry) *instruments { - insts := &instruments{ - registry: registry, - } - insts.queueSize, _ = registry.AddInt64DerivedGauge( - obsmetrics.ExporterKey+"/queue_size", - metric.WithDescription("Current size of the retry queue (in batches)"), - metric.WithLabelKeys(obsmetrics.ExporterKey), - metric.WithUnit(metricdata.UnitDimensionless)) - - insts.queueCapacity, _ = registry.AddInt64DerivedGauge( - obsmetrics.ExporterKey+"/queue_capacity", - metric.WithDescription("Fixed capacity of the retry queue (in batches)"), - metric.WithLabelKeys(obsmetrics.ExporterKey), - metric.WithUnit(metricdata.UnitDimensionless)) - - insts.failedToEnqueueTraceSpans, _ = registry.AddInt64Cumulative( - obsmetrics.ExporterKey+"/enqueue_failed_spans", - metric.WithDescription("Number of spans failed to be added to the sending queue."), - metric.WithLabelKeys(obsmetrics.ExporterKey), - metric.WithUnit(metricdata.UnitDimensionless)) - - insts.failedToEnqueueMetricPoints, _ = registry.AddInt64Cumulative( - obsmetrics.ExporterKey+"/enqueue_failed_metric_points", - metric.WithDescription("Number of metric points failed to be added to the sending queue."), - metric.WithLabelKeys(obsmetrics.ExporterKey), - metric.WithUnit(metricdata.UnitDimensionless)) - - insts.failedToEnqueueLogRecords, _ = registry.AddInt64Cumulative( - obsmetrics.ExporterKey+"/enqueue_failed_log_records", - metric.WithDescription("Number of log records failed to be added to the sending queue."), - metric.WithLabelKeys(obsmetrics.ExporterKey), - metric.WithUnit(metricdata.UnitDimensionless)) - - return insts -} - -// obsExporter is a helper to add observability to an exporter. -type obsExporter struct { - *ObsReport - failedToEnqueueTraceSpansEntry *metric.Int64CumulativeEntry - failedToEnqueueMetricPointsEntry *metric.Int64CumulativeEntry - failedToEnqueueLogRecordsEntry *metric.Int64CumulativeEntry -} - -// newObsExporter creates a new observability exporter. -func newObsExporter(cfg ObsReportSettings, insts *instruments) (*obsExporter, error) { - labelValue := metricdata.NewLabelValue(cfg.ExporterID.String()) - failedToEnqueueTraceSpansEntry, _ := insts.failedToEnqueueTraceSpans.GetEntry(labelValue) - failedToEnqueueMetricPointsEntry, _ := insts.failedToEnqueueMetricPoints.GetEntry(labelValue) - failedToEnqueueLogRecordsEntry, _ := insts.failedToEnqueueLogRecords.GetEntry(labelValue) - - exp, err := NewObsReport(cfg) - if err != nil { - return nil, err - } - - return &obsExporter{ - ObsReport: exp, - failedToEnqueueTraceSpansEntry: failedToEnqueueTraceSpansEntry, - failedToEnqueueMetricPointsEntry: failedToEnqueueMetricPointsEntry, - failedToEnqueueLogRecordsEntry: failedToEnqueueLogRecordsEntry, - }, nil -} - -// recordTracesEnqueueFailure records number of spans that failed to be added to the sending queue. -func (eor *obsExporter) recordTracesEnqueueFailure(_ context.Context, numSpans int64) { - eor.failedToEnqueueTraceSpansEntry.Inc(numSpans) -} - -// recordMetricsEnqueueFailure records number of metric points that failed to be added to the sending queue. -func (eor *obsExporter) recordMetricsEnqueueFailure(_ context.Context, numMetricPoints int64) { - eor.failedToEnqueueMetricPointsEntry.Inc(numMetricPoints) -} - -// recordLogsEnqueueFailure records number of log records that failed to be added to the sending queue. -func (eor *obsExporter) recordLogsEnqueueFailure(_ context.Context, numLogRecords int64) { - eor.failedToEnqueueLogRecordsEntry.Inc(numLogRecords) -} diff --git a/exporter/exporterhelper/obsreport_test.go b/exporter/exporterhelper/obsreport_test.go index af2616eb7ee..e0101f112df 100644 --- a/exporter/exporterhelper/obsreport_test.go +++ b/exporter/exporterhelper/obsreport_test.go @@ -8,61 +8,33 @@ import ( "testing" "github.com/stretchr/testify/require" - "go.opencensus.io/metric" - "go.opencensus.io/tag" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/exporter/exportertest" - "go.opentelemetry.io/collector/obsreport/obsreporttest" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/exporter" ) func TestExportEnqueueFailure(t *testing.T) { - exporter := component.NewID("fakeExporter") - tt, err := obsreporttest.SetupTelemetry(exporter) + exporterID := component.MustNewID("fakeExporter") + tt, err := componenttest.SetupTelemetry(exporterID) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - insts := newInstruments(metric.NewRegistry()) - obsrep, err := newObsExporter(ObsReportSettings{ - ExporterID: exporter, - ExporterCreateSettings: exportertest.NewCreateSettings(exporter, tt.TelemetrySettings), - }, insts) + obsrep, err := NewObsReport(ObsReportSettings{ + ExporterID: exporterID, + ExporterCreateSettings: exporter.CreateSettings{ID: exporterID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, + }) require.NoError(t, err) logRecords := int64(7) - obsrep.recordLogsEnqueueFailure(context.Background(), logRecords) - checkExporterEnqueueFailedLogsStats(t, insts, exporter, logRecords) + obsrep.recordEnqueueFailure(context.Background(), component.DataTypeLogs, logRecords) + require.NoError(t, tt.CheckExporterEnqueueFailedLogs(logRecords)) spans := int64(12) - obsrep.recordTracesEnqueueFailure(context.Background(), spans) - checkExporterEnqueueFailedTracesStats(t, insts, exporter, spans) + obsrep.recordEnqueueFailure(context.Background(), component.DataTypeTraces, spans) + require.NoError(t, tt.CheckExporterEnqueueFailedTraces(spans)) metricPoints := int64(21) - obsrep.recordMetricsEnqueueFailure(context.Background(), metricPoints) - checkExporterEnqueueFailedMetricsStats(t, insts, exporter, metricPoints) -} - -// checkExporterEnqueueFailedTracesStats checks that reported number of spans failed to enqueue match given values. -// When this function is called it is required to also call SetupTelemetry as first thing. -func checkExporterEnqueueFailedTracesStats(t *testing.T, insts *instruments, exporter component.ID, spans int64) { - checkValueForProducer(t, insts.registry, tagsForExporterView(exporter), spans, "exporter/enqueue_failed_spans") -} - -// checkExporterEnqueueFailedMetricsStats checks that reported number of metric points failed to enqueue match given values. -// When this function is called it is required to also call SetupTelemetry as first thing. -func checkExporterEnqueueFailedMetricsStats(t *testing.T, insts *instruments, exporter component.ID, metricPoints int64) { - checkValueForProducer(t, insts.registry, tagsForExporterView(exporter), metricPoints, "exporter/enqueue_failed_metric_points") -} - -// checkExporterEnqueueFailedLogsStats checks that reported number of log records failed to enqueue match given values. -// When this function is called it is required to also call SetupTelemetry as first thing. -func checkExporterEnqueueFailedLogsStats(t *testing.T, insts *instruments, exporter component.ID, logRecords int64) { - checkValueForProducer(t, insts.registry, tagsForExporterView(exporter), logRecords, "exporter/enqueue_failed_log_records") -} - -// tagsForExporterView returns the tags that are needed for the exporter views. -func tagsForExporterView(exporter component.ID) []tag.Tag { - return []tag.Tag{ - {Key: exporterTag, Value: exporter.String()}, - } + obsrep.recordEnqueueFailure(context.Background(), component.DataTypeMetrics, metricPoints) + require.NoError(t, tt.CheckExporterEnqueueFailedMetrics(metricPoints)) } diff --git a/exporter/exporterhelper/package_test.go b/exporter/exporterhelper/package_test.go new file mode 100644 index 00000000000..6cf68017a7d --- /dev/null +++ b/exporter/exporterhelper/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package exporterhelper + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/exporterhelper/queue_sender.go b/exporter/exporterhelper/queue_sender.go index d3da29500fe..3092c60c98f 100644 --- a/exporter/exporterhelper/queue_sender.go +++ b/exporter/exporterhelper/queue_sender.go @@ -6,23 +6,26 @@ package exporterhelper // import "go.opentelemetry.io/collector/exporter/exporte import ( "context" "errors" - "fmt" "time" - "go.opencensus.io/metric/metricdata" "go.opentelemetry.io/otel/attribute" + otelmetric "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/trace" + "go.uber.org/multierr" "go.uber.org/zap" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/exporter" - "go.opentelemetry.io/collector/exporter/exporterhelper/internal" + "go.opentelemetry.io/collector/exporter/exporterqueue" + "go.opentelemetry.io/collector/exporter/internal/queue" "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" ) const defaultQueueSize = 1000 -var errSendingQueueIsFull = errors.New("sending_queue is full") +var ( + scopeName = "go.opentelemetry.io/collector/exporterhelper" +) // QueueSettings defines configuration for queueing batches before sending to the consumerSender. type QueueSettings struct { @@ -59,132 +62,98 @@ func (qCfg *QueueSettings) Validate() error { return errors.New("queue size must be positive") } + if qCfg.NumConsumers <= 0 { + return errors.New("number of queue consumers must be positive") + } + return nil } type queueSender struct { baseRequestSender - fullName string - id component.ID - signal component.DataType - queue internal.ProducerConsumerQueue - traceAttribute attribute.KeyValue - logger *zap.Logger - requeuingEnabled bool + fullName string + queue exporterqueue.Queue[Request] + traceAttribute attribute.KeyValue + logger *zap.Logger + meter otelmetric.Meter + consumers *queue.Consumers[Request] + + metricCapacity otelmetric.Int64ObservableGauge + metricSize otelmetric.Int64ObservableGauge } -func newQueueSender(id component.ID, signal component.DataType, queue internal.ProducerConsumerQueue, logger *zap.Logger) *queueSender { - return &queueSender{ - fullName: id.String(), - id: id, - signal: signal, - queue: queue, - traceAttribute: attribute.String(obsmetrics.ExporterKey, id.String()), - logger: logger, - // TODO: this can be further exposed as a config param rather than relying on a type of queue - requeuingEnabled: queue != nil && queue.IsPersistent(), +func newQueueSender(q exporterqueue.Queue[Request], set exporter.CreateSettings, numConsumers int, + exportFailureMessage string) *queueSender { + qs := &queueSender{ + fullName: set.ID.String(), + queue: q, + traceAttribute: attribute.String(obsmetrics.ExporterKey, set.ID.String()), + logger: set.TelemetrySettings.Logger, + meter: set.TelemetrySettings.MeterProvider.Meter(scopeName), } -} - -func (qs *queueSender) onTemporaryFailure(logger *zap.Logger, req internal.Request, err error) error { - if !qs.requeuingEnabled || qs.queue == nil { - logger.Error( - "Exporting failed. No more retries left. Dropping data.", - zap.Error(err), - zap.Int("dropped_items", req.Count()), - ) + consumeFunc := func(ctx context.Context, req Request) error { + err := qs.nextSender.send(ctx, req) + if err != nil { + set.Logger.Error("Exporting failed. Dropping data."+exportFailureMessage, + zap.Error(err), zap.Int("dropped_items", req.ItemsCount())) + } return err } - - if qs.queue.Produce(req) { - logger.Error( - "Exporting failed. Putting back to the end of the queue.", - zap.Error(err), - ) - } else { - logger.Error( - "Exporting failed. Queue did not accept requeuing request. Dropping data.", - zap.Error(err), - zap.Int("dropped_items", req.Count()), - ) - } - return err + qs.consumers = queue.NewQueueConsumers[Request](q, numConsumers, consumeFunc) + return qs } -// start is invoked during service startup. -func (qs *queueSender) start(ctx context.Context, host component.Host, set exporter.CreateSettings) error { - if qs.queue == nil { - return nil - } - - err := qs.queue.Start(ctx, host, internal.QueueSettings{ - CreateSettings: set, - DataType: qs.signal, - Callback: func(item internal.Request) { - _ = qs.nextSender.send(item) - item.OnProcessingFinished() - }, - }) - if err != nil { +// Start is invoked during service startup. +func (qs *queueSender) Start(ctx context.Context, host component.Host) error { + if err := qs.consumers.Start(ctx, host); err != nil { return err } - // Start reporting queue length metric - err = globalInstruments.queueSize.UpsertEntry(func() int64 { - return int64(qs.queue.Size()) - }, metricdata.NewLabelValue(qs.fullName)) - if err != nil { - return fmt.Errorf("failed to create retry queue size metric: %w", err) - } - err = globalInstruments.queueCapacity.UpsertEntry(func() int64 { - return int64(qs.queue.Capacity()) - }, metricdata.NewLabelValue(qs.fullName)) - if err != nil { - return fmt.Errorf("failed to create retry queue capacity metric: %w", err) - } - - return nil + var err, errs error + + attrs := otelmetric.WithAttributeSet(attribute.NewSet(attribute.String(obsmetrics.ExporterKey, qs.fullName))) + + qs.metricSize, err = qs.meter.Int64ObservableGauge( + obsmetrics.ExporterKey+"/queue_size", + otelmetric.WithDescription("Current size of the retry queue (in batches)"), + otelmetric.WithUnit("1"), + otelmetric.WithInt64Callback(func(_ context.Context, o otelmetric.Int64Observer) error { + o.Observe(int64(qs.queue.Size()), attrs) + return nil + }), + ) + errs = multierr.Append(errs, err) + + qs.metricCapacity, err = qs.meter.Int64ObservableGauge( + obsmetrics.ExporterKey+"/queue_capacity", + otelmetric.WithDescription("Fixed capacity of the retry queue (in batches)"), + otelmetric.WithUnit("1"), + otelmetric.WithInt64Callback(func(_ context.Context, o otelmetric.Int64Observer) error { + o.Observe(int64(qs.queue.Capacity()), attrs) + return nil + })) + + errs = multierr.Append(errs, err) + return errs } -// shutdown is invoked during service shutdown. -func (qs *queueSender) shutdown() { - if qs.queue != nil { - // Cleanup queue metrics reporting - _ = globalInstruments.queueSize.UpsertEntry(func() int64 { - return int64(0) - }, metricdata.NewLabelValue(qs.fullName)) - - // Stop the queued sender, this will drain the queue and will call the retry (which is stopped) that will only - // try once every request. - qs.queue.Stop() - } +// Shutdown is invoked during service shutdown. +func (qs *queueSender) Shutdown(ctx context.Context) error { + // Stop the queue and consumers, this will drain the queue and will call the retry (which is stopped) that will only + // try once every request. + return qs.consumers.Shutdown(ctx) } -// send implements the requestSender interface -func (qs *queueSender) send(req internal.Request) error { - if qs.queue == nil { - err := qs.nextSender.send(req) - if err != nil { - qs.logger.Error( - "Exporting failed. Dropping data. Try enabling sending_queue to survive temporary failures.", - zap.Int("dropped_items", req.Count()), - ) - } - return err - } - +// send implements the requestSender interface. It puts the request in the queue. +func (qs *queueSender) send(ctx context.Context, req Request) error { // Prevent cancellation and deadline to propagate to the context stored in the queue. // The grpc/http based receivers will cancel the request context after this function returns. - req.SetContext(noCancellationContext{Context: req.Context()}) - - span := trace.SpanFromContext(req.Context()) - if !qs.queue.Produce(req) { - qs.logger.Error( - "Dropping data because sending_queue is full. Try increasing queue_size.", - zap.Int("dropped_items", req.Count()), - ) - span.AddEvent("Dropped item, sending_queue is full.", trace.WithAttributes(qs.traceAttribute)) - return errSendingQueueIsFull + c := noCancellationContext{Context: ctx} + + span := trace.SpanFromContext(c) + if err := qs.queue.Offer(c, req); err != nil { + span.AddEvent("Failed to enqueue item.", trace.WithAttributes(qs.traceAttribute)) + return err } span.AddEvent("Enqueued item.", trace.WithAttributes(qs.traceAttribute)) diff --git a/exporter/exporterhelper/queue_sender_test.go b/exporter/exporterhelper/queue_sender_test.go index 2cc21f62380..a2616152ea6 100644 --- a/exporter/exporterhelper/queue_sender_test.go +++ b/exporter/exporterhelper/queue_sender_test.go @@ -6,42 +6,45 @@ package exporterhelper import ( "context" "errors" - "sync/atomic" "testing" "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/zap" + "go.uber.org/zap/zaptest/observer" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/consumer/consumererror" - "go.opentelemetry.io/collector/exporter/exporterhelper/internal" + "go.opentelemetry.io/collector/config/configretry" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exporterqueue" "go.opentelemetry.io/collector/exporter/exportertest" - "go.opentelemetry.io/collector/internal/testdata" - "go.opentelemetry.io/collector/obsreport/obsreporttest" + "go.opentelemetry.io/collector/exporter/internal/queue" ) func TestQueuedRetry_StopWhileWaiting(t *testing.T) { qCfg := NewDefaultQueueSettings() qCfg.NumConsumers = 1 - rCfg := NewDefaultRetrySettings() - be, err := newBaseExporter(defaultSettings, "", false, nil, nil, newObservabilityConsumerSender, WithRetry(rCfg), WithQueue(qCfg)) + rCfg := configretry.NewDefaultBackOffConfig() + be, err := newBaseExporter(defaultSettings, defaultType, newObservabilityConsumerSender, + withMarshaler(mockRequestMarshaler), withUnmarshaler(mockRequestUnmarshaler(&mockRequest{})), + WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) ocs := be.obsrepSender.(*observabilityConsumerSender) require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) - firstMockR := newErrorRequest(context.Background()) + firstMockR := newErrorRequest() ocs.run(func() { // This is asynchronous so it should just enqueue, no errors expected. - require.NoError(t, be.send(firstMockR)) + require.NoError(t, be.send(context.Background(), firstMockR)) }) // Enqueue another request to ensure when calling shutdown we drain the queue. - secondMockR := newMockRequest(context.Background(), 3, nil) + secondMockR := newMockRequest(3, nil) ocs.run(func() { // This is asynchronous so it should just enqueue, no errors expected. - require.NoError(t, be.send(secondMockR)) + require.NoError(t, be.send(context.Background(), secondMockR)) }) require.LessOrEqual(t, 1, be.queueSender.(*queueSender).queue.Size()) @@ -57,8 +60,10 @@ func TestQueuedRetry_StopWhileWaiting(t *testing.T) { func TestQueuedRetry_DoNotPreserveCancellation(t *testing.T) { qCfg := NewDefaultQueueSettings() qCfg.NumConsumers = 1 - rCfg := NewDefaultRetrySettings() - be, err := newBaseExporter(defaultSettings, "", false, nil, nil, newObservabilityConsumerSender, WithRetry(rCfg), WithQueue(qCfg)) + rCfg := configretry.NewDefaultBackOffConfig() + be, err := newBaseExporter(defaultSettings, defaultType, newObservabilityConsumerSender, + withMarshaler(mockRequestMarshaler), withUnmarshaler(mockRequestUnmarshaler(&mockRequest{})), + WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) ocs := be.obsrepSender.(*observabilityConsumerSender) require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) @@ -68,10 +73,10 @@ func TestQueuedRetry_DoNotPreserveCancellation(t *testing.T) { ctx, cancelFunc := context.WithCancel(context.Background()) cancelFunc() - mockR := newMockRequest(ctx, 2, nil) + mockR := newMockRequest(2, nil) ocs.run(func() { // This is asynchronous so it should just enqueue, no errors expected. - require.NoError(t, be.send(mockR)) + require.NoError(t, be.send(ctx, mockR)) }) ocs.awaitAsyncProcessing() @@ -81,72 +86,143 @@ func TestQueuedRetry_DoNotPreserveCancellation(t *testing.T) { require.Zero(t, be.queueSender.(*queueSender).queue.Size()) } -func TestQueuedRetry_DropOnFull(t *testing.T) { +func TestQueuedRetry_RejectOnFull(t *testing.T) { qCfg := NewDefaultQueueSettings() qCfg.QueueSize = 0 - be, err := newBaseExporter(defaultSettings, "", false, nil, nil, newObservabilityConsumerSender, WithQueue(qCfg)) + qCfg.NumConsumers = 0 + set := exportertest.NewNopCreateSettings() + logger, observed := observer.New(zap.ErrorLevel) + set.Logger = zap.New(logger) + be, err := newBaseExporter(set, defaultType, newNoopObsrepSender, + withMarshaler(mockRequestMarshaler), withUnmarshaler(mockRequestUnmarshaler(&mockRequest{})), + WithQueue(qCfg)) require.NoError(t, err) require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) t.Cleanup(func() { assert.NoError(t, be.Shutdown(context.Background())) }) - require.Error(t, be.send(newMockRequest(context.Background(), 2, nil))) + require.Error(t, be.send(context.Background(), newMockRequest(2, nil))) + assert.Len(t, observed.All(), 1) + assert.Equal(t, "Exporting failed. Rejecting data.", observed.All()[0].Message) + assert.Equal(t, "sending queue is full", observed.All()[0].ContextMap()["error"]) } func TestQueuedRetryHappyPath(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(defaultID) - require.NoError(t, err) - t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - - qCfg := NewDefaultQueueSettings() - rCfg := NewDefaultRetrySettings() - set := exportertest.NewCreateSettings(defaultID, tt.TelemetrySettings) - be, err := newBaseExporter(set, "", false, nil, nil, newObservabilityConsumerSender, WithRetry(rCfg), WithQueue(qCfg)) - require.NoError(t, err) - ocs := be.obsrepSender.(*observabilityConsumerSender) - require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) - t.Cleanup(func() { - assert.NoError(t, be.Shutdown(context.Background())) - }) - - wantRequests := 10 - reqs := make([]*mockRequest, 0, 10) - for i := 0; i < wantRequests; i++ { - ocs.run(func() { - req := newMockRequest(context.Background(), 2, nil) - reqs = append(reqs, req) - require.NoError(t, be.send(req)) - }) + tests := []struct { + name string + queueOptions []Option + }{ + { + name: "WithQueue", + queueOptions: []Option{ + withMarshaler(mockRequestMarshaler), + withUnmarshaler(mockRequestUnmarshaler(&mockRequest{})), + WithQueue(QueueSettings{ + Enabled: true, + QueueSize: 10, + NumConsumers: 1, + }), + WithRetry(configretry.NewDefaultBackOffConfig()), + }, + }, + { + name: "WithRequestQueue/MemoryQueueFactory", + queueOptions: []Option{ + WithRequestQueue(exporterqueue.Config{ + Enabled: true, + QueueSize: 10, + NumConsumers: 1, + }, exporterqueue.NewMemoryQueueFactory[Request]()), + WithRetry(configretry.NewDefaultBackOffConfig()), + }, + }, + { + name: "WithRequestQueue/PersistentQueueFactory", + queueOptions: []Option{ + WithRequestQueue(exporterqueue.Config{ + Enabled: true, + QueueSize: 10, + NumConsumers: 1, + }, exporterqueue.NewPersistentQueueFactory[Request](nil, exporterqueue.PersistentQueueSettings[Request]{})), + WithRetry(configretry.NewDefaultBackOffConfig()), + }, + }, + { + name: "WithRequestQueue/PersistentQueueFactory/RequestsLimit", + queueOptions: []Option{ + WithRequestQueue(exporterqueue.Config{ + Enabled: true, + QueueSize: 10, + NumConsumers: 1, + }, exporterqueue.NewPersistentQueueFactory[Request](nil, exporterqueue.PersistentQueueSettings[Request]{})), + WithRetry(configretry.NewDefaultBackOffConfig()), + }, + }, } - - // Wait until all batches received - ocs.awaitAsyncProcessing() - - require.Len(t, reqs, wantRequests) - for _, req := range reqs { - req.checkNumRequests(t, 1) + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + tel, err := componenttest.SetupTelemetry(defaultID) + require.NoError(t, err) + t.Cleanup(func() { require.NoError(t, tel.Shutdown(context.Background())) }) + + set := exporter.CreateSettings{ID: defaultID, TelemetrySettings: tel.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()} + be, err := newBaseExporter(set, defaultType, newObservabilityConsumerSender, tt.queueOptions...) + require.NoError(t, err) + ocs := be.obsrepSender.(*observabilityConsumerSender) + + wantRequests := 10 + reqs := make([]*mockRequest, 0, 10) + for i := 0; i < wantRequests; i++ { + ocs.run(func() { + req := newMockRequest(2, nil) + reqs = append(reqs, req) + require.NoError(t, be.send(context.Background(), req)) + }) + } + + // expect queue to be full + require.Error(t, be.send(context.Background(), newMockRequest(2, nil))) + + require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) + t.Cleanup(func() { + assert.NoError(t, be.Shutdown(context.Background())) + }) + + // Wait until all batches received + ocs.awaitAsyncProcessing() + + require.Len(t, reqs, wantRequests) + for _, req := range reqs { + req.checkNumRequests(t, 1) + } + + ocs.checkSendItemsCount(t, 2*wantRequests) + ocs.checkDroppedItemsCount(t, 0) + }) } - - ocs.checkSendItemsCount(t, 2*wantRequests) - ocs.checkDroppedItemsCount(t, 0) } - func TestQueuedRetry_QueueMetricsReported(t *testing.T) { + tt, err := componenttest.SetupTelemetry(defaultID) + require.NoError(t, err) + qCfg := NewDefaultQueueSettings() qCfg.NumConsumers = 0 // to make every request go straight to the queue - rCfg := NewDefaultRetrySettings() - be, err := newBaseExporter(defaultSettings, "", false, nil, nil, newObservabilityConsumerSender, WithRetry(rCfg), WithQueue(qCfg)) + rCfg := configretry.NewDefaultBackOffConfig() + set := exporter.CreateSettings{ID: defaultID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()} + be, err := newBaseExporter(set, defaultType, newObservabilityConsumerSender, + withMarshaler(mockRequestMarshaler), withUnmarshaler(mockRequestUnmarshaler(&mockRequest{})), + WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) - checkValueForGlobalManager(t, defaultExporterTags, int64(defaultQueueSize), "exporter/queue_capacity") + require.NoError(t, tt.CheckExporterMetricGauge("exporter_queue_capacity", int64(defaultQueueSize))) + for i := 0; i < 7; i++ { - require.NoError(t, be.send(newErrorRequest(context.Background()))) + require.NoError(t, be.send(context.Background(), newErrorRequest())) } - checkValueForGlobalManager(t, defaultExporterTags, int64(7), "exporter/queue_size") + require.NoError(t, tt.CheckExporterMetricGauge("exporter_queue_size", int64(7))) assert.NoError(t, be.Shutdown(context.Background())) - checkValueForGlobalManager(t, defaultExporterTags, int64(0), "exporter/queue_size") } func TestNoCancellationContext(t *testing.T) { @@ -172,98 +248,103 @@ func TestQueueSettings_Validate(t *testing.T) { qCfg.QueueSize = 0 assert.EqualError(t, qCfg.Validate(), "queue size must be positive") + qCfg = NewDefaultQueueSettings() + qCfg.NumConsumers = 0 + + assert.EqualError(t, qCfg.Validate(), "number of queue consumers must be positive") + // Confirm Validate doesn't return error with invalid config when feature is disabled qCfg.Enabled = false assert.NoError(t, qCfg.Validate()) } -// if requeueing is enabled, we eventually retry even if we failed at first -func TestQueuedRetry_RequeuingEnabled(t *testing.T) { - qCfg := NewDefaultQueueSettings() - qCfg.NumConsumers = 1 - rCfg := NewDefaultRetrySettings() - rCfg.MaxElapsedTime = time.Nanosecond // we don't want to retry at all, but requeue instead - be, err := newBaseExporter(defaultSettings, "", false, nil, nil, newObservabilityConsumerSender, WithRetry(rCfg), WithQueue(qCfg)) - require.NoError(t, err) - ocs := be.obsrepSender.(*observabilityConsumerSender) - be.queueSender.(*queueSender).requeuingEnabled = true - require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) - t.Cleanup(func() { - assert.NoError(t, be.Shutdown(context.Background())) - }) - - traceErr := consumererror.NewTraces(errors.New("some error"), testdata.GenerateTraces(1)) - mockR := newMockRequest(context.Background(), 1, traceErr) - ocs.run(func() { - // This is asynchronous so it should just enqueue, no errors expected. - require.NoError(t, be.send(mockR)) - ocs.waitGroup.Add(1) // necessary because we'll call send() again after requeueing - }) - ocs.awaitAsyncProcessing() - - // In the newMockConcurrentExporter we count requests and items even for failed requests - mockR.checkNumRequests(t, 2) - ocs.checkSendItemsCount(t, 1) - ocs.checkDroppedItemsCount(t, 1) // not actually dropped, but ocs counts each failed send here -} - -// if requeueing is enabled, but the queue is full, we get an error -func TestQueuedRetry_RequeuingEnabledQueueFull(t *testing.T) { - qCfg := NewDefaultQueueSettings() - qCfg.NumConsumers = 0 - qCfg.QueueSize = 0 - rCfg := NewDefaultRetrySettings() - rCfg.MaxElapsedTime = time.Nanosecond // we don't want to retry at all, but requeue instead - be, err := newBaseExporter(defaultSettings, "", false, nil, nil, newObservabilityConsumerSender, WithRetry(rCfg), WithQueue(qCfg)) - require.NoError(t, err) - be.queueSender.(*queueSender).requeuingEnabled = true - require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) - t.Cleanup(func() { - assert.NoError(t, be.Shutdown(context.Background())) - }) +func TestQueueRetryWithDisabledQueue(t *testing.T) { + tests := []struct { + name string + queueOptions []Option + }{ + { + name: "WithQueue", + queueOptions: []Option{ + withMarshaler(mockRequestMarshaler), + withUnmarshaler(mockRequestUnmarshaler(&mockRequest{})), + func() Option { + qs := NewDefaultQueueSettings() + qs.Enabled = false + return WithQueue(qs) + }(), + }, + }, + { + name: "WithRequestQueue", + queueOptions: []Option{ + func() Option { + qs := exporterqueue.NewDefaultConfig() + qs.Enabled = false + return WithRequestQueue(qs, exporterqueue.NewMemoryQueueFactory[Request]()) + }(), + }, + }, + } - traceErr := consumererror.NewTraces(errors.New("some error"), testdata.GenerateTraces(1)) - mockR := newMockRequest(context.Background(), 1, traceErr) + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + set := exportertest.NewNopCreateSettings() + logger, observed := observer.New(zap.ErrorLevel) + set.Logger = zap.New(logger) + be, err := newBaseExporter(set, component.DataTypeLogs, newObservabilityConsumerSender, tt.queueOptions...) + require.NoError(t, err) + require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) + ocs := be.obsrepSender.(*observabilityConsumerSender) + mockR := newMockRequest(2, errors.New("some error")) + ocs.run(func() { + require.Error(t, be.send(context.Background(), mockR)) + }) + assert.Len(t, observed.All(), 1) + assert.Equal(t, "Exporting failed. Rejecting data. Try enabling sending_queue to survive temporary failures.", observed.All()[0].Message) + ocs.awaitAsyncProcessing() + mockR.checkNumRequests(t, 1) + ocs.checkSendItemsCount(t, 0) + ocs.checkDroppedItemsCount(t, 2) + require.NoError(t, be.Shutdown(context.Background())) + }) + } - require.Error(t, be.retrySender.send(mockR), "sending_queue is full") - mockR.checkNumRequests(t, 1) } -func TestQueueRetryWithDisabledQueue(t *testing.T) { - qs := NewDefaultQueueSettings() - qs.Enabled = false - be, err := newBaseExporter(exportertest.NewNopCreateSettings(), component.DataTypeLogs, false, nil, nil, newObservabilityConsumerSender, WithQueue(qs)) - require.Nil(t, be.queueSender.(*queueSender).queue) +func TestQueueFailedRequestDropped(t *testing.T) { + set := exportertest.NewNopCreateSettings() + logger, observed := observer.New(zap.ErrorLevel) + set.Logger = zap.New(logger) + be, err := newBaseExporter(set, component.DataTypeLogs, newNoopObsrepSender, + WithRequestQueue(exporterqueue.NewDefaultConfig(), exporterqueue.NewMemoryQueueFactory[Request]())) require.NoError(t, err) require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) - ocs := be.obsrepSender.(*observabilityConsumerSender) - mockR := newMockRequest(context.Background(), 2, errors.New("some error")) - ocs.run(func() { - // This is asynchronous so it should just enqueue, no errors expected. - require.Error(t, be.send(mockR)) - }) - ocs.awaitAsyncProcessing() - mockR.checkNumRequests(t, 1) - ocs.checkSendItemsCount(t, 0) - ocs.checkDroppedItemsCount(t, 2) + mockR := newMockRequest(2, errors.New("some error")) + require.NoError(t, be.send(context.Background(), mockR)) require.NoError(t, be.Shutdown(context.Background())) + mockR.checkNumRequests(t, 1) + assert.Len(t, observed.All(), 1) + assert.Equal(t, "Exporting failed. Dropping data.", observed.All()[0].Message) } func TestQueuedRetryPersistenceEnabled(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(defaultID) + tt, err := componenttest.SetupTelemetry(defaultID) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) qCfg := NewDefaultQueueSettings() - storageID := component.NewIDWithName("file_storage", "storage") + storageID := component.MustNewIDWithName("file_storage", "storage") qCfg.StorageID = &storageID // enable persistence - rCfg := NewDefaultRetrySettings() - set := exportertest.NewCreateSettings(defaultID, tt.TelemetrySettings) - be, err := newBaseExporter(set, "", false, nil, nil, newObservabilityConsumerSender, WithRetry(rCfg), WithQueue(qCfg)) + rCfg := configretry.NewDefaultBackOffConfig() + set := exporter.CreateSettings{ID: defaultID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()} + be, err := newBaseExporter(set, defaultType, newObservabilityConsumerSender, + withMarshaler(mockRequestMarshaler), withUnmarshaler(mockRequestUnmarshaler(&mockRequest{})), + WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) var extensions = map[component.ID]component.Component{ - storageID: internal.NewMockStorageExtension(nil), + storageID: queue.NewMockStorageExtension(nil), } host := &mockHost{ext: extensions} @@ -274,20 +355,21 @@ func TestQueuedRetryPersistenceEnabled(t *testing.T) { func TestQueuedRetryPersistenceEnabledStorageError(t *testing.T) { storageError := errors.New("could not get storage client") - tt, err := obsreporttest.SetupTelemetry(defaultID) + tt, err := componenttest.SetupTelemetry(defaultID) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) qCfg := NewDefaultQueueSettings() - storageID := component.NewIDWithName("file_storage", "storage") + storageID := component.MustNewIDWithName("file_storage", "storage") qCfg.StorageID = &storageID // enable persistence - rCfg := NewDefaultRetrySettings() - set := exportertest.NewCreateSettings(defaultID, tt.TelemetrySettings) - be, err := newBaseExporter(set, "", false, mockRequestMarshaler, mockRequestUnmarshaler(&mockRequest{}), newObservabilityConsumerSender, WithRetry(rCfg), WithQueue(qCfg)) + rCfg := configretry.NewDefaultBackOffConfig() + set := exporter.CreateSettings{ID: defaultID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()} + be, err := newBaseExporter(set, defaultType, newObservabilityConsumerSender, withMarshaler(mockRequestMarshaler), + withUnmarshaler(mockRequestUnmarshaler(&mockRequest{})), WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) var extensions = map[component.ID]component.Component{ - storageID: internal.NewMockStorageExtension(storageError), + storageID: queue.NewMockStorageExtension(storageError), } host := &mockHost{ext: extensions} @@ -295,48 +377,55 @@ func TestQueuedRetryPersistenceEnabledStorageError(t *testing.T) { require.Error(t, be.Start(context.Background(), host), "could not get storage client") } -func TestQueuedRetryPersistentEnabled_shutdown_dataIsRequeued(t *testing.T) { - - produceCounter := &atomic.Uint32{} - +func TestQueuedRetryPersistentEnabled_NoDataLossOnShutdown(t *testing.T) { qCfg := NewDefaultQueueSettings() qCfg.NumConsumers = 1 - rCfg := NewDefaultRetrySettings() + storageID := component.MustNewIDWithName("file_storage", "storage") + qCfg.StorageID = &storageID // enable persistence to ensure data is re-queued on shutdown + + rCfg := configretry.NewDefaultBackOffConfig() rCfg.InitialInterval = time.Millisecond rCfg.MaxElapsedTime = 0 // retry infinitely so shutdown can be triggered - req := newMockRequest(context.Background(), 3, errors.New("some error")) - - be, err := newBaseExporter(defaultSettings, "", false, nil, nil, newNoopObsrepSender, WithRetry(rCfg), WithQueue(qCfg)) + mockReq := newErrorRequest() + be, err := newBaseExporter(defaultSettings, defaultType, newNoopObsrepSender, withMarshaler(mockRequestMarshaler), + withUnmarshaler(mockRequestUnmarshaler(mockReq)), WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) - require.NoError(t, be.Start(context.Background(), &mockHost{})) - - // wraps original queue so we can count operations - be.queueSender.(*queueSender).queue = &producerConsumerQueueWithCounter{ - ProducerConsumerQueue: be.queueSender.(*queueSender).queue, - produceCounter: produceCounter, + var extensions = map[component.ID]component.Component{ + storageID: queue.NewMockStorageExtension(nil), } - be.queueSender.(*queueSender).requeuingEnabled = true + host := &mockHost{ext: extensions} - // replace nextSender inside retrySender to always return error so it doesn't exit send loop - be.retrySender.setNextSender(&errorRequestSender{ - errToReturn: errors.New("some error"), - }) + require.NoError(t, be.Start(context.Background(), host)) // Invoke queuedRetrySender so the producer will put the item for consumer to poll - require.NoError(t, be.send(req)) + require.NoError(t, be.send(context.Background(), mockReq)) - // first wait for the item to be produced to the queue initially + // first wait for the item to be consumed from the queue assert.Eventually(t, func() bool { - return produceCounter.Load() == uint32(1) + return be.queueSender.(*queueSender).queue.Size() == 0 }, time.Second, 1*time.Millisecond) - // shuts down and ensure the item is produced in the queue again + // shuts down the exporter, unsent data should be preserved as in-flight data in the persistent queue. require.NoError(t, be.Shutdown(context.Background())) - assert.Eventually(t, func() bool { - return produceCounter.Load() == uint32(2) - }, time.Second, 1*time.Millisecond) + + // start the exporter again replacing the preserved mockRequest in the unmarshaler with a new one that doesn't fail. + replacedReq := newMockRequest(1, nil) + be, err = newBaseExporter(defaultSettings, defaultType, newNoopObsrepSender, withMarshaler(mockRequestMarshaler), + withUnmarshaler(mockRequestUnmarshaler(replacedReq)), WithRetry(rCfg), WithQueue(qCfg)) + require.NoError(t, err) + require.NoError(t, be.Start(context.Background(), host)) + t.Cleanup(func() { require.NoError(t, be.Shutdown(context.Background())) }) + + // wait for the item to be consumed from the queue + replacedReq.checkNumRequests(t, 1) +} + +func TestQueueSenderNoStartShutdown(t *testing.T) { + queue := queue.NewBoundedMemoryQueue[Request](queue.MemoryQueueSettings[Request]{}) + qs := newQueueSender(queue, exportertest.NewNopCreateSettings(), 1, "") + assert.NoError(t, qs.Shutdown(context.Background())) } type mockHost struct { diff --git a/exporter/exporterhelper/request.go b/exporter/exporterhelper/request.go index ef05aa6395d..03276f9c19e 100644 --- a/exporter/exporterhelper/request.go +++ b/exporter/exporterhelper/request.go @@ -5,8 +5,6 @@ package exporterhelper // import "go.opentelemetry.io/collector/exporter/exporte import ( "context" - - "go.opentelemetry.io/collector/exporter/exporterhelper/internal" ) // Request represents a single request that can be sent to an external endpoint. @@ -15,47 +13,38 @@ import ( type Request interface { // Export exports the request to an external endpoint. Export(ctx context.Context) error -} - -// RequestItemsCounter is an optional interface that can be implemented by Request to provide a number of items -// in the request. This is a recommended interface to implement for exporters. It is required for batching and queueing -// based on number of items. Also, it's used for reporting number of items in collector's logs, metrics and traces. -// If not implemented, collector's logs, metrics and traces will report 0 items. -// This API is at the early stage of development and may change without backward compatibility -// until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. -type RequestItemsCounter interface { // ItemsCount returns a number of basic items in the request where item is the smallest piece of data that can be // sent. For example, for OTLP exporter, this value represents the number of spans, // metric data points or log records. ItemsCount() int } -type request struct { +// RequestErrorHandler is an optional interface that can be implemented by Request to provide a way handle partial +// temporary failures. For example, if some items failed to process and can be retried, this interface allows to +// return a new Request that contains the items left to be sent. Otherwise, the original Request should be returned. +// If not implemented, the original Request will be returned assuming the error is applied to the whole Request. +// This API is at the early stage of development and may change without backward compatibility +// until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. +type RequestErrorHandler interface { Request - baseRequest + // OnError returns a new Request may contain the items left to be sent if some items failed to process and can be retried. + // Otherwise, it should return the original Request. + OnError(error) Request } -var _ internal.Request = (*request)(nil) +// RequestMarshaler is a function that can marshal a Request into bytes. +// Deprecated: [v0.94.0] Use exporterqueue.Marshaler[Request] instead. +type RequestMarshaler func(req Request) ([]byte, error) -func newRequest(ctx context.Context, req Request) *request { - return &request{ - Request: req, - baseRequest: baseRequest{ctx: ctx}, - } -} - -func (req *request) OnError(_ error) internal.Request { - // Potentially we could introduce a new RequestError type that would represent partially succeeded request. - // In that case we should consider returning them back to the pipeline converted back to pdata in case if - // sending queue is disabled. We leave it as a future improvement if decided that it's needed. - return req -} +// RequestUnmarshaler is a function that can unmarshal bytes into a Request. +// Deprecated: [v0.94.0] Use exporterqueue.Unmarshaler[Request] instead. +type RequestUnmarshaler func(data []byte) (Request, error) -// Count returns a number of items in the request. If the request does not implement RequestItemsCounter -// then 0 is returned. -func (req *request) Count() int { - if counter, ok := req.Request.(RequestItemsCounter); ok { - return counter.ItemsCount() +// extractPartialRequest returns a new Request that may contain the items left to be sent +// if only some items failed to process and can be retried. Otherwise, it returns the original Request. +func extractPartialRequest(req Request, err error) Request { + if errReq, ok := req.(RequestErrorHandler); ok { + return errReq.OnError(err) } - return 0 + return req } diff --git a/exporter/exporterhelper/request_test.go b/exporter/exporterhelper/request_test.go index 6dd3f67800a..18e8228f946 100644 --- a/exporter/exporterhelper/request_test.go +++ b/exporter/exporterhelper/request_test.go @@ -16,7 +16,7 @@ type fakeRequest struct { err error } -func (r fakeRequest) Export(_ context.Context) error { +func (r fakeRequest) Export(context.Context) error { return r.err } @@ -31,14 +31,14 @@ type fakeRequestConverter struct { requestError error } -func (c fakeRequestConverter) RequestFromMetrics(_ context.Context, md pmetric.Metrics) (Request, error) { - return fakeRequest{items: md.DataPointCount(), err: c.requestError}, c.metricsError +func (frc *fakeRequestConverter) requestFromMetricsFunc(_ context.Context, md pmetric.Metrics) (Request, error) { + return fakeRequest{items: md.DataPointCount(), err: frc.requestError}, frc.metricsError } -func (c fakeRequestConverter) RequestFromTraces(_ context.Context, td ptrace.Traces) (Request, error) { - return fakeRequest{items: td.SpanCount(), err: c.requestError}, c.tracesError +func (frc *fakeRequestConverter) requestFromTracesFunc(_ context.Context, md ptrace.Traces) (Request, error) { + return fakeRequest{items: md.SpanCount(), err: frc.requestError}, frc.tracesError } -func (c fakeRequestConverter) RequestFromLogs(_ context.Context, ld plog.Logs) (Request, error) { - return fakeRequest{items: ld.LogRecordCount(), err: c.requestError}, c.logsError +func (frc *fakeRequestConverter) requestFromLogsFunc(_ context.Context, md plog.Logs) (Request, error) { + return fakeRequest{items: md.LogRecordCount(), err: frc.requestError}, frc.logsError } diff --git a/exporter/exporterhelper/retry_sender.go b/exporter/exporterhelper/retry_sender.go index 14a90a9c1e6..6e8a36f9ef4 100644 --- a/exporter/exporterhelper/retry_sender.go +++ b/exporter/exporterhelper/retry_sender.go @@ -4,6 +4,7 @@ package exporterhelper // import "go.opentelemetry.io/collector/exporter/exporterhelper" import ( + "context" "errors" "fmt" "time" @@ -13,44 +14,13 @@ import ( "go.opentelemetry.io/otel/trace" "go.uber.org/zap" - "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/consumer/consumererror" - "go.opentelemetry.io/collector/exporter/exporterhelper/internal" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/internal/experr" "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" ) -// RetrySettings defines configuration for retrying batches in case of export failure. -// The current supported strategy is exponential backoff. -type RetrySettings struct { - // Enabled indicates whether to not retry sending batches in case of export failure. - Enabled bool `mapstructure:"enabled"` - // InitialInterval the time to wait after the first failure before retrying. - InitialInterval time.Duration `mapstructure:"initial_interval"` - // RandomizationFactor is a random factor used to calculate next backoffs - // Randomized interval = RetryInterval * (1 ± RandomizationFactor) - RandomizationFactor float64 `mapstructure:"randomization_factor"` - // Multiplier is the value multiplied by the backoff interval bounds - Multiplier float64 `mapstructure:"multiplier"` - // MaxInterval is the upper bound on backoff interval. Once this value is reached the delay between - // consecutive retries will always be `MaxInterval`. - MaxInterval time.Duration `mapstructure:"max_interval"` - // MaxElapsedTime is the maximum amount of time (including retries) spent trying to send a request/batch. - // Once this value is reached, the data is discarded. - MaxElapsedTime time.Duration `mapstructure:"max_elapsed_time"` -} - -// NewDefaultRetrySettings returns the default settings for RetrySettings. -func NewDefaultRetrySettings() RetrySettings { - return RetrySettings{ - Enabled: true, - InitialInterval: 5 * time.Second, - RandomizationFactor: backoff.DefaultRandomizationFactor, - Multiplier: backoff.DefaultMultiplier, - MaxInterval: 30 * time.Second, - MaxElapsedTime: 5 * time.Minute, - } -} - // TODO: Clean this by forcing all exporters to return an internal error type that always include the information about retries. type throttleRetry struct { err error @@ -73,49 +43,30 @@ func NewThrottleRetry(err error, delay time.Duration) error { } } -type onRequestHandlingFinishedFunc func(*zap.Logger, internal.Request, error) error - type retrySender struct { baseRequestSender - traceAttribute attribute.KeyValue - cfg RetrySettings - stopCh chan struct{} - logger *zap.Logger - onTemporaryFailure onRequestHandlingFinishedFunc + traceAttribute attribute.KeyValue + cfg configretry.BackOffConfig + stopCh chan struct{} + logger *zap.Logger } -func newRetrySender(id component.ID, rCfg RetrySettings, logger *zap.Logger, onTemporaryFailure onRequestHandlingFinishedFunc) *retrySender { - if onTemporaryFailure == nil { - onTemporaryFailure = func(logger *zap.Logger, req internal.Request, err error) error { - return err - } - } +func newRetrySender(config configretry.BackOffConfig, set exporter.CreateSettings) *retrySender { return &retrySender{ - traceAttribute: attribute.String(obsmetrics.ExporterKey, id.String()), - cfg: rCfg, - stopCh: make(chan struct{}), - logger: logger, - onTemporaryFailure: onTemporaryFailure, + traceAttribute: attribute.String(obsmetrics.ExporterKey, set.ID.String()), + cfg: config, + stopCh: make(chan struct{}), + logger: set.Logger, } } -func (rs *retrySender) shutdown() { +func (rs *retrySender) Shutdown(context.Context) error { close(rs.stopCh) + return nil } // send implements the requestSender interface -func (rs *retrySender) send(req internal.Request) error { - if !rs.cfg.Enabled { - err := rs.nextSender.send(req) - if err != nil { - rs.logger.Error( - "Exporting failed. Try enabling retry_on_failure config option to retry on retryable errors", - zap.Error(err), - ) - } - return err - } - +func (rs *retrySender) send(ctx context.Context, req Request) error { // Do not use NewExponentialBackOff since it calls Reset and the code here must // call Reset after changing the InitialInterval (this saves an unnecessary call to Now). expBackoff := backoff.ExponentialBackOff{ @@ -128,42 +79,32 @@ func (rs *retrySender) send(req internal.Request) error { Clock: backoff.SystemClock, } expBackoff.Reset() - span := trace.SpanFromContext(req.Context()) + span := trace.SpanFromContext(ctx) retryNum := int64(0) for { span.AddEvent( "Sending request.", trace.WithAttributes(rs.traceAttribute, attribute.Int64("retry_num", retryNum))) - err := rs.nextSender.send(req) + err := rs.nextSender.send(ctx, req) if err == nil { return nil } // Immediately drop data on permanent errors. if consumererror.IsPermanent(err) { - rs.logger.Error( - "Exporting failed. The error is not retryable. Dropping data.", - zap.Error(err), - zap.Int("dropped_items", req.Count()), - ) - return err + return fmt.Errorf("not retryable error: %w", err) } - // Give the request a chance to extract signal data to retry if only some data - // failed to process. - req = req.OnError(err) + req = extractPartialRequest(req, err) backoffDelay := expBackoff.NextBackOff() if backoffDelay == backoff.Stop { - // throw away the batch - err = fmt.Errorf("max elapsed time expired %w", err) - return rs.onTemporaryFailure(rs.logger, req, err) + return fmt.Errorf("no more retries left: %w", err) } throttleErr := throttleRetry{} - isThrottle := errors.As(err, &throttleErr) - if isThrottle { + if errors.As(err, &throttleErr) { backoffDelay = max(backoffDelay, throttleErr.delay) } @@ -183,10 +124,10 @@ func (rs *retrySender) send(req internal.Request) error { // back-off, but get interrupted when shutting down or request is cancelled or timed out. select { - case <-req.Context().Done(): - return fmt.Errorf("Request is cancelled or timed out %w", err) + case <-ctx.Done(): + return fmt.Errorf("request is cancelled or timed out %w", err) case <-rs.stopCh: - return rs.onTemporaryFailure(rs.logger, req, fmt.Errorf("interrupted due to shutdown %w", err)) + return experr.NewShutdownErr(err) case <-time.After(backoffDelay): } } diff --git a/exporter/exporterhelper/retry_sender_test.go b/exporter/exporterhelper/retry_sender_test.go index 1da5fb29ebd..96b4904f372 100644 --- a/exporter/exporterhelper/retry_sender_test.go +++ b/exporter/exporterhelper/retry_sender_test.go @@ -6,7 +6,6 @@ package exporterhelper import ( "context" "errors" - "fmt" "sync" "sync/atomic" "testing" @@ -14,33 +13,34 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opencensus.io/metric/metricdata" - "go.opencensus.io/metric/metricproducer" - "go.opencensus.io/tag" + "go.uber.org/zap" + "go.uber.org/zap/zaptest/observer" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/consumer/consumererror" - "go.opentelemetry.io/collector/exporter/exporterhelper/internal" + "go.opentelemetry.io/collector/exporter/exporterqueue" "go.opentelemetry.io/collector/exporter/exportertest" "go.opentelemetry.io/collector/internal/testdata" ) -func mockRequestUnmarshaler(mr *mockRequest) internal.RequestUnmarshaler { - return func(bytes []byte) (internal.Request, error) { +func mockRequestUnmarshaler(mr Request) exporterqueue.Unmarshaler[Request] { + return func([]byte) (Request, error) { return mr, nil } } -func mockRequestMarshaler(_ internal.Request) ([]byte, error) { - return nil, nil +func mockRequestMarshaler(Request) ([]byte, error) { + return []byte("mockRequest"), nil } func TestQueuedRetry_DropOnPermanentError(t *testing.T) { qCfg := NewDefaultQueueSettings() - rCfg := NewDefaultRetrySettings() - mockR := newMockRequest(context.Background(), 2, consumererror.NewPermanent(errors.New("bad data"))) - be, err := newBaseExporter(defaultSettings, "", false, nil, nil, newObservabilityConsumerSender, WithRetry(rCfg), WithQueue(qCfg)) + rCfg := configretry.NewDefaultBackOffConfig() + mockR := newMockRequest(2, consumererror.NewPermanent(errors.New("bad data"))) + be, err := newBaseExporter(defaultSettings, defaultType, newObservabilityConsumerSender, + withMarshaler(mockRequestMarshaler), withUnmarshaler(mockRequestUnmarshaler(mockR)), WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) ocs := be.obsrepSender.(*observabilityConsumerSender) require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) @@ -50,7 +50,7 @@ func TestQueuedRetry_DropOnPermanentError(t *testing.T) { ocs.run(func() { // This is asynchronous so it should just enqueue, no errors expected. - require.NoError(t, be.send(mockR)) + require.NoError(t, be.send(context.Background(), mockR)) }) ocs.awaitAsyncProcessing() // In the newMockConcurrentExporter we count requests and items even for failed requests @@ -61,11 +61,11 @@ func TestQueuedRetry_DropOnPermanentError(t *testing.T) { func TestQueuedRetry_DropOnNoRetry(t *testing.T) { qCfg := NewDefaultQueueSettings() - rCfg := NewDefaultRetrySettings() + rCfg := configretry.NewDefaultBackOffConfig() rCfg.Enabled = false - be, err := newBaseExporter(defaultSettings, "", false, mockRequestMarshaler, - mockRequestUnmarshaler(newMockRequest(context.Background(), 2, errors.New("transient error"))), - newObservabilityConsumerSender, WithRetry(rCfg), WithQueue(qCfg)) + be, err := newBaseExporter(defaultSettings, defaultType, newObservabilityConsumerSender, withMarshaler(mockRequestMarshaler), + withUnmarshaler(mockRequestUnmarshaler(newMockRequest(2, errors.New("transient error")))), + WithQueue(qCfg), WithRetry(rCfg)) require.NoError(t, err) ocs := be.obsrepSender.(*observabilityConsumerSender) require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) @@ -73,10 +73,10 @@ func TestQueuedRetry_DropOnNoRetry(t *testing.T) { assert.NoError(t, be.Shutdown(context.Background())) }) - mockR := newMockRequest(context.Background(), 2, errors.New("transient error")) + mockR := newMockRequest(2, errors.New("transient error")) ocs.run(func() { // This is asynchronous so it should just enqueue, no errors expected. - require.NoError(t, be.send(mockR)) + require.NoError(t, be.send(context.Background(), mockR)) }) ocs.awaitAsyncProcessing() // In the newMockConcurrentExporter we count requests and items even for failed requests @@ -88,9 +88,11 @@ func TestQueuedRetry_DropOnNoRetry(t *testing.T) { func TestQueuedRetry_OnError(t *testing.T) { qCfg := NewDefaultQueueSettings() qCfg.NumConsumers = 1 - rCfg := NewDefaultRetrySettings() + rCfg := configretry.NewDefaultBackOffConfig() rCfg.InitialInterval = 0 - be, err := newBaseExporter(defaultSettings, "", false, nil, nil, newObservabilityConsumerSender, WithRetry(rCfg), WithQueue(qCfg)) + be, err := newBaseExporter(defaultSettings, defaultType, newObservabilityConsumerSender, + withMarshaler(mockRequestMarshaler), withUnmarshaler(mockRequestUnmarshaler(&mockRequest{})), + WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) t.Cleanup(func() { @@ -98,11 +100,11 @@ func TestQueuedRetry_OnError(t *testing.T) { }) traceErr := consumererror.NewTraces(errors.New("some error"), testdata.GenerateTraces(1)) - mockR := newMockRequest(context.Background(), 2, traceErr) + mockR := newMockRequest(2, traceErr) ocs := be.obsrepSender.(*observabilityConsumerSender) ocs.run(func() { // This is asynchronous so it should just enqueue, no errors expected. - require.NoError(t, be.send(mockR)) + require.NoError(t, be.send(context.Background(), mockR)) }) ocs.awaitAsyncProcessing() @@ -115,10 +117,12 @@ func TestQueuedRetry_OnError(t *testing.T) { func TestQueuedRetry_MaxElapsedTime(t *testing.T) { qCfg := NewDefaultQueueSettings() qCfg.NumConsumers = 1 - rCfg := NewDefaultRetrySettings() + rCfg := configretry.NewDefaultBackOffConfig() rCfg.InitialInterval = time.Millisecond rCfg.MaxElapsedTime = 100 * time.Millisecond - be, err := newBaseExporter(defaultSettings, "", false, nil, nil, newObservabilityConsumerSender, WithRetry(rCfg), WithQueue(qCfg)) + be, err := newBaseExporter(defaultSettings, defaultType, newObservabilityConsumerSender, + withMarshaler(mockRequestMarshaler), withUnmarshaler(mockRequestUnmarshaler(&mockRequest{})), + WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) ocs := be.obsrepSender.(*observabilityConsumerSender) require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) @@ -128,14 +132,14 @@ func TestQueuedRetry_MaxElapsedTime(t *testing.T) { ocs.run(func() { // Add an item that will always fail. - require.NoError(t, be.send(newErrorRequest(context.Background()))) + require.NoError(t, be.send(context.Background(), newErrorRequest())) }) - mockR := newMockRequest(context.Background(), 2, nil) + mockR := newMockRequest(2, nil) start := time.Now() ocs.run(func() { // This is asynchronous so it should just enqueue, no errors expected. - require.NoError(t, be.send(mockR)) + require.NoError(t, be.send(context.Background(), mockR)) }) ocs.awaitAsyncProcessing() @@ -162,9 +166,11 @@ func (e wrappedError) Unwrap() error { func TestQueuedRetry_ThrottleError(t *testing.T) { qCfg := NewDefaultQueueSettings() qCfg.NumConsumers = 1 - rCfg := NewDefaultRetrySettings() + rCfg := configretry.NewDefaultBackOffConfig() rCfg.InitialInterval = 10 * time.Millisecond - be, err := newBaseExporter(defaultSettings, "", false, nil, nil, newObservabilityConsumerSender, WithRetry(rCfg), WithQueue(qCfg)) + be, err := newBaseExporter(defaultSettings, defaultType, newObservabilityConsumerSender, + withMarshaler(mockRequestMarshaler), withUnmarshaler(mockRequestUnmarshaler(&mockRequest{})), + WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) ocs := be.obsrepSender.(*observabilityConsumerSender) require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) @@ -173,11 +179,11 @@ func TestQueuedRetry_ThrottleError(t *testing.T) { }) retry := NewThrottleRetry(errors.New("throttle error"), 100*time.Millisecond) - mockR := newMockRequest(context.Background(), 2, wrappedError{retry}) + mockR := newMockRequest(2, wrappedError{retry}) start := time.Now() ocs.run(func() { // This is asynchronous so it should just enqueue, no errors expected. - require.NoError(t, be.send(mockR)) + require.NoError(t, be.send(context.Background(), mockR)) }) ocs.awaitAsyncProcessing() @@ -194,9 +200,11 @@ func TestQueuedRetry_RetryOnError(t *testing.T) { qCfg := NewDefaultQueueSettings() qCfg.NumConsumers = 1 qCfg.QueueSize = 1 - rCfg := NewDefaultRetrySettings() + rCfg := configretry.NewDefaultBackOffConfig() rCfg.InitialInterval = 0 - be, err := newBaseExporter(defaultSettings, "", false, nil, nil, newObservabilityConsumerSender, WithRetry(rCfg), WithQueue(qCfg)) + be, err := newBaseExporter(defaultSettings, defaultType, newObservabilityConsumerSender, + withMarshaler(mockRequestMarshaler), withUnmarshaler(mockRequestUnmarshaler(&mockRequest{})), + WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) ocs := be.obsrepSender.(*observabilityConsumerSender) require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) @@ -204,10 +212,10 @@ func TestQueuedRetry_RetryOnError(t *testing.T) { assert.NoError(t, be.Shutdown(context.Background())) }) - mockR := newMockRequest(context.Background(), 2, errors.New("transient error")) + mockR := newMockRequest(2, errors.New("transient error")) ocs.run(func() { // This is asynchronous so it should just enqueue, no errors expected. - require.NoError(t, be.send(mockR)) + require.NoError(t, be.send(context.Background(), mockR)) }) ocs.awaitAsyncProcessing() @@ -219,16 +227,15 @@ func TestQueuedRetry_RetryOnError(t *testing.T) { } func TestQueueRetryWithNoQueue(t *testing.T) { - rCfg := NewDefaultRetrySettings() + rCfg := configretry.NewDefaultBackOffConfig() rCfg.MaxElapsedTime = time.Nanosecond // fail fast - be, err := newBaseExporter(exportertest.NewNopCreateSettings(), component.DataTypeLogs, false, nil, nil, newObservabilityConsumerSender, WithRetry(rCfg)) + be, err := newBaseExporter(exportertest.NewNopCreateSettings(), component.DataTypeLogs, newObservabilityConsumerSender, WithRetry(rCfg)) require.NoError(t, err) require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) ocs := be.obsrepSender.(*observabilityConsumerSender) - mockR := newMockRequest(context.Background(), 2, errors.New("some error")) + mockR := newMockRequest(2, errors.New("some error")) ocs.run(func() { - // This is asynchronous so it should just enqueue, no errors expected. - require.Error(t, be.send(mockR)) + require.Error(t, be.send(context.Background(), mockR)) }) ocs.awaitAsyncProcessing() mockR.checkNumRequests(t, 1) @@ -237,30 +244,49 @@ func TestQueueRetryWithNoQueue(t *testing.T) { require.NoError(t, be.Shutdown(context.Background())) } -type mockErrorRequest struct { - baseRequest +func TestQueueRetryWithDisabledRetires(t *testing.T) { + rCfg := configretry.NewDefaultBackOffConfig() + rCfg.Enabled = false + set := exportertest.NewNopCreateSettings() + logger, observed := observer.New(zap.ErrorLevel) + set.Logger = zap.New(logger) + be, err := newBaseExporter(set, component.DataTypeLogs, newObservabilityConsumerSender, WithRetry(rCfg)) + require.NoError(t, err) + require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) + ocs := be.obsrepSender.(*observabilityConsumerSender) + mockR := newMockRequest(2, errors.New("some error")) + ocs.run(func() { + require.Error(t, be.send(context.Background(), mockR)) + }) + assert.Len(t, observed.All(), 1) + assert.Equal(t, "Exporting failed. Rejecting data. "+ + "Try enabling retry_on_failure config option to retry on retryable errors.", observed.All()[0].Message) + ocs.awaitAsyncProcessing() + mockR.checkNumRequests(t, 1) + ocs.checkSendItemsCount(t, 0) + ocs.checkDroppedItemsCount(t, 2) + require.NoError(t, be.Shutdown(context.Background())) } -func (mer *mockErrorRequest) Export(_ context.Context) error { +type mockErrorRequest struct{} + +func (mer *mockErrorRequest) Export(context.Context) error { return errors.New("transient error") } -func (mer *mockErrorRequest) OnError(error) internal.Request { +func (mer *mockErrorRequest) OnError(error) Request { return mer } -func (mer *mockErrorRequest) Count() int { +func (mer *mockErrorRequest) ItemsCount() int { return 7 } -func newErrorRequest(ctx context.Context) internal.Request { - return &mockErrorRequest{ - baseRequest: baseRequest{ctx: ctx}, - } +func newErrorRequest() Request { + return &mockErrorRequest{} } type mockRequest struct { - baseRequest cnt int mu sync.Mutex consumeError error @@ -280,9 +306,8 @@ func (m *mockRequest) Export(ctx context.Context) error { return ctx.Err() } -func (m *mockRequest) OnError(error) internal.Request { +func (m *mockRequest) OnError(error) Request { return &mockRequest{ - baseRequest: m.baseRequest, cnt: 1, consumeError: nil, requestCount: m.requestCount, @@ -295,13 +320,12 @@ func (m *mockRequest) checkNumRequests(t *testing.T, want int) { }, time.Second, 1*time.Millisecond) } -func (m *mockRequest) Count() int { +func (m *mockRequest) ItemsCount() int { return m.cnt } -func newMockRequest(ctx context.Context, cnt int, consumeError error) *mockRequest { +func newMockRequest(cnt int, consumeError error) *mockRequest { return &mockRequest{ - baseRequest: baseRequest{ctx: ctx}, cnt: cnt, consumeError: consumeError, requestCount: &atomic.Int64{}, @@ -315,7 +339,7 @@ type observabilityConsumerSender struct { droppedItemsCount *atomic.Int64 } -func newObservabilityConsumerSender(_ *obsExporter) requestSender { +func newObservabilityConsumerSender(*ObsReport) requestSender { return &observabilityConsumerSender{ waitGroup: new(sync.WaitGroup), droppedItemsCount: &atomic.Int64{}, @@ -323,12 +347,12 @@ func newObservabilityConsumerSender(_ *obsExporter) requestSender { } } -func (ocs *observabilityConsumerSender) send(req internal.Request) error { - err := ocs.nextSender.send(req) +func (ocs *observabilityConsumerSender) send(ctx context.Context, req Request) error { + err := ocs.nextSender.send(ctx, req) if err != nil { - ocs.droppedItemsCount.Add(int64(req.Count())) + ocs.droppedItemsCount.Add(int64(req.ItemsCount())) } else { - ocs.sentItemsCount.Add(int64(req.Count())) + ocs.sentItemsCount.Add(int64(req.ItemsCount())) } ocs.waitGroup.Done() return err @@ -350,66 +374,3 @@ func (ocs *observabilityConsumerSender) checkSendItemsCount(t *testing.T, want i func (ocs *observabilityConsumerSender) checkDroppedItemsCount(t *testing.T, want int) { assert.EqualValues(t, want, ocs.droppedItemsCount.Load()) } - -// checkValueForGlobalManager checks that the given metrics with wantTags is reported by one of the -// metric producers -func checkValueForGlobalManager(t *testing.T, wantTags []tag.Tag, value int64, vName string) { - producers := metricproducer.GlobalManager().GetAll() - for _, producer := range producers { - if checkValueForProducer(t, producer, wantTags, value, vName) { - return - } - } - require.Fail(t, fmt.Sprintf("could not find metric %v with tags %s reported", vName, wantTags)) -} - -// checkValueForProducer checks that the given metrics with wantTags is reported by the metric producer -func checkValueForProducer(t *testing.T, producer metricproducer.Producer, wantTags []tag.Tag, value int64, vName string) bool { - for _, metric := range producer.Read() { - if metric.Descriptor.Name == vName && len(metric.TimeSeries) > 0 { - for _, ts := range metric.TimeSeries { - if tagsMatchLabelKeys(wantTags, metric.Descriptor.LabelKeys, ts.LabelValues) { - require.Equal(t, value, ts.Points[len(ts.Points)-1].Value.(int64)) - return true - } - } - } - } - return false -} - -// tagsMatchLabelKeys returns true if provided tags match keys and values -func tagsMatchLabelKeys(tags []tag.Tag, keys []metricdata.LabelKey, labels []metricdata.LabelValue) bool { - if len(tags) != len(keys) { - return false - } - for i := 0; i < len(tags); i++ { - var labelVal string - if labels[i].Present { - labelVal = labels[i].Value - } - if tags[i].Key.Name() != keys[i].Key || tags[i].Value != labelVal { - return false - } - } - return true -} - -type producerConsumerQueueWithCounter struct { - internal.ProducerConsumerQueue - produceCounter *atomic.Uint32 -} - -func (pcq *producerConsumerQueueWithCounter) Produce(item internal.Request) bool { - pcq.produceCounter.Add(1) - return pcq.ProducerConsumerQueue.Produce(item) -} - -type errorRequestSender struct { - baseRequestSender - errToReturn error -} - -func (rs *errorRequestSender) send(_ internal.Request) error { - return rs.errToReturn -} diff --git a/exporter/exporterhelper/timeout_sender.go b/exporter/exporterhelper/timeout_sender.go index 11b85cf08be..2a6364a2aaf 100644 --- a/exporter/exporterhelper/timeout_sender.go +++ b/exporter/exporterhelper/timeout_sender.go @@ -5,17 +5,25 @@ package exporterhelper // import "go.opentelemetry.io/collector/exporter/exporte import ( "context" + "errors" "time" - - "go.opentelemetry.io/collector/exporter/exporterhelper/internal" ) // TimeoutSettings for timeout. The timeout applies to individual attempts to send data to the backend. type TimeoutSettings struct { // Timeout is the timeout for every attempt to send data to the backend. + // A zero timeout means no timeout. Timeout time.Duration `mapstructure:"timeout"` } +func (ts *TimeoutSettings) Validate() error { + // Negative timeouts are not acceptable, since all sends will fail. + if ts.Timeout < 0 { + return errors.New("'timeout' must be non-negative") + } + return nil +} + // NewDefaultTimeoutSettings returns the default settings for TimeoutSettings. func NewDefaultTimeoutSettings() TimeoutSettings { return TimeoutSettings{ @@ -29,14 +37,14 @@ type timeoutSender struct { cfg TimeoutSettings } -func (ts *timeoutSender) send(req internal.Request) error { +func (ts *timeoutSender) send(ctx context.Context, req Request) error { + // TODO: Remove this by avoiding to create the timeout sender if timeout is 0. + if ts.cfg.Timeout == 0 { + return req.Export(ctx) + } // Intentionally don't overwrite the context inside the request, because in case of retries deadline will not be // updated because this deadline most likely is before the next one. - ctx := req.Context() - if ts.cfg.Timeout > 0 { - var cancelFunc func() - ctx, cancelFunc = context.WithTimeout(req.Context(), ts.cfg.Timeout) - defer cancelFunc() - } - return req.Export(ctx) + tCtx, cancelFunc := context.WithTimeout(ctx, ts.cfg.Timeout) + defer cancelFunc() + return req.Export(tCtx) } diff --git a/exporter/exporterhelper/timeout_sender_test.go b/exporter/exporterhelper/timeout_sender_test.go new file mode 100644 index 00000000000..205ac094c07 --- /dev/null +++ b/exporter/exporterhelper/timeout_sender_test.go @@ -0,0 +1,24 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package exporterhelper + +import ( + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +func TestNewDefaultTimeoutSettings(t *testing.T) { + cfg := NewDefaultTimeoutSettings() + assert.NoError(t, cfg.Validate()) + assert.Equal(t, TimeoutSettings{Timeout: 5 * time.Second}, cfg) +} + +func TestInvalidTimeout(t *testing.T) { + cfg := NewDefaultTimeoutSettings() + assert.NoError(t, cfg.Validate()) + cfg.Timeout = -1 + assert.Error(t, cfg.Validate()) +} diff --git a/exporter/exporterhelper/traces.go b/exporter/exporterhelper/traces.go index 4b9e397ec43..778c0d63989 100644 --- a/exporter/exporterhelper/traces.go +++ b/exporter/exporterhelper/traces.go @@ -13,7 +13,8 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/exporter" - "go.opentelemetry.io/collector/exporter/exporterhelper/internal" + "go.opentelemetry.io/collector/exporter/exporterqueue" + "go.opentelemetry.io/collector/exporter/internal/queue" "go.opentelemetry.io/collector/pdata/ptrace" ) @@ -21,37 +22,35 @@ var tracesMarshaler = &ptrace.ProtoMarshaler{} var tracesUnmarshaler = &ptrace.ProtoUnmarshaler{} type tracesRequest struct { - baseRequest td ptrace.Traces pusher consumer.ConsumeTracesFunc } -func newTracesRequest(ctx context.Context, td ptrace.Traces, pusher consumer.ConsumeTracesFunc) internal.Request { +func newTracesRequest(td ptrace.Traces, pusher consumer.ConsumeTracesFunc) Request { return &tracesRequest{ - baseRequest: baseRequest{ctx: ctx}, - td: td, - pusher: pusher, + td: td, + pusher: pusher, } } -func newTraceRequestUnmarshalerFunc(pusher consumer.ConsumeTracesFunc) internal.RequestUnmarshaler { - return func(bytes []byte) (internal.Request, error) { +func newTraceRequestUnmarshalerFunc(pusher consumer.ConsumeTracesFunc) exporterqueue.Unmarshaler[Request] { + return func(bytes []byte) (Request, error) { traces, err := tracesUnmarshaler.UnmarshalTraces(bytes) if err != nil { return nil, err } - return newTracesRequest(context.Background(), traces, pusher), nil + return newTracesRequest(traces, pusher), nil } } -func tracesRequestMarshaler(req internal.Request) ([]byte, error) { +func tracesRequestMarshaler(req Request) ([]byte, error) { return tracesMarshaler.MarshalTraces(req.(*tracesRequest).td) } -func (req *tracesRequest) OnError(err error) internal.Request { +func (req *tracesRequest) OnError(err error) Request { var traceError consumererror.Traces if errors.As(err, &traceError) { - return newTracesRequest(req.ctx, traceError.Data(), req.pusher) + return newTracesRequest(traceError.Data(), req.pusher) } return req } @@ -60,7 +59,7 @@ func (req *tracesRequest) Export(ctx context.Context) error { return req.pusher(ctx, req.td) } -func (req *tracesRequest) Count() int { +func (req *tracesRequest) ItemsCount() int { return req.td.SpanCount() } @@ -71,7 +70,7 @@ type traceExporter struct { // NewTracesExporter creates an exporter.Traces that records observability metrics and wraps every request with a Span. func NewTracesExporter( - _ context.Context, + ctx context.Context, set exporter.CreateSettings, cfg component.Config, pusher consumer.ConsumeTracesFunc, @@ -80,42 +79,23 @@ func NewTracesExporter( if cfg == nil { return nil, errNilConfig } - - if set.Logger == nil { - return nil, errNilLogger - } - if pusher == nil { return nil, errNilPushTraceData } - - be, err := newBaseExporter(set, component.DataTypeTraces, false, tracesRequestMarshaler, - newTraceRequestUnmarshalerFunc(pusher), newTracesExporterWithObservability, options...) - if err != nil { - return nil, err - } - - tc, err := consumer.NewTraces(func(ctx context.Context, td ptrace.Traces) error { - req := newTracesRequest(ctx, td, pusher) - serr := be.send(req) - if errors.Is(serr, errSendingQueueIsFull) { - be.obsrep.recordTracesEnqueueFailure(req.Context(), int64(req.Count())) - } - return serr - }, be.consumerOptions...) - - return &traceExporter{ - baseExporter: be, - Traces: tc, - }, err + tracesOpts := []Option{withMarshaler(tracesRequestMarshaler), withUnmarshaler(newTraceRequestUnmarshalerFunc(pusher))} + return NewTracesRequestExporter(ctx, set, requestFromTraces(pusher), append(tracesOpts, options...)...) } -// TracesConverter provides an interface for converting ptrace.Traces into a request. +// RequestFromTracesFunc converts ptrace.Traces into a user-defined Request. // This API is at the early stage of development and may change without backward compatibility // until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. -type TracesConverter interface { - // RequestFromTraces converts ptrace.Traces into a Request. - RequestFromTraces(context.Context, ptrace.Traces) (Request, error) +type RequestFromTracesFunc func(context.Context, ptrace.Traces) (Request, error) + +// requestFromTraces returns a RequestFromTracesFunc that converts ptrace.Traces into a Request. +func requestFromTraces(pusher consumer.ConsumeTracesFunc) RequestFromTracesFunc { + return func(_ context.Context, traces ptrace.Traces) (Request, error) { + return newTracesRequest(traces, pusher), nil + } } // NewTracesRequestExporter creates a new traces exporter based on a custom TracesConverter and RequestSender. @@ -124,7 +104,7 @@ type TracesConverter interface { func NewTracesRequestExporter( _ context.Context, set exporter.CreateSettings, - converter TracesConverter, + converter RequestFromTracesFunc, options ...Option, ) (exporter.Traces, error) { if set.Logger == nil { @@ -135,23 +115,22 @@ func NewTracesRequestExporter( return nil, errNilTracesConverter } - be, err := newBaseExporter(set, component.DataTypeTraces, true, nil, nil, newTracesExporterWithObservability, options...) + be, err := newBaseExporter(set, component.DataTypeTraces, newTracesExporterWithObservability, options...) if err != nil { return nil, err } tc, err := consumer.NewTraces(func(ctx context.Context, td ptrace.Traces) error { - req, cErr := converter.RequestFromTraces(ctx, td) + req, cErr := converter(ctx, td) if cErr != nil { set.Logger.Error("Failed to convert traces. Dropping data.", zap.Int("dropped_spans", td.SpanCount()), zap.Error(err)) return consumererror.NewPermanent(cErr) } - r := newRequest(ctx, req) - sErr := be.send(r) - if errors.Is(sErr, errSendingQueueIsFull) { - be.obsrep.recordTracesEnqueueFailure(r.Context(), int64(r.Count())) + sErr := be.send(ctx, req) + if errors.Is(sErr, queue.ErrQueueIsFull) { + be.obsrep.recordEnqueueFailure(ctx, component.DataTypeTraces, int64(req.ItemsCount())) } return sErr }, be.consumerOptions...) @@ -164,17 +143,17 @@ func NewTracesRequestExporter( type tracesExporterWithObservability struct { baseRequestSender - obsrep *obsExporter + obsrep *ObsReport } -func newTracesExporterWithObservability(obsrep *obsExporter) requestSender { +func newTracesExporterWithObservability(obsrep *ObsReport) requestSender { return &tracesExporterWithObservability{obsrep: obsrep} } -func (tewo *tracesExporterWithObservability) send(req internal.Request) error { - req.SetContext(tewo.obsrep.StartTracesOp(req.Context())) +func (tewo *tracesExporterWithObservability) send(ctx context.Context, req Request) error { + c := tewo.obsrep.StartTracesOp(ctx) // Forward the data to the next consumer (this pusher is the next). - err := tewo.nextSender.send(req) - tewo.obsrep.EndTracesOp(req.Context(), req.Count(), err) + err := tewo.nextSender.send(c, req) + tewo.obsrep.EndTracesOp(c, req.ItemsCount(), err) return err } diff --git a/exporter/exporterhelper/traces_test.go b/exporter/exporterhelper/traces_test.go index ff7847b6990..0c8bec25f5f 100644 --- a/exporter/exporterhelper/traces_test.go +++ b/exporter/exporterhelper/traces_test.go @@ -16,18 +16,19 @@ import ( sdktrace "go.opentelemetry.io/otel/sdk/trace" "go.opentelemetry.io/otel/sdk/trace/tracetest" "go.opentelemetry.io/otel/trace" + nooptrace "go.opentelemetry.io/otel/trace/noop" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/exporter" - "go.opentelemetry.io/collector/exporter/exporterhelper/internal" "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/exporter/internal/queue" "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" "go.opentelemetry.io/collector/internal/testdata" - "go.opentelemetry.io/collector/obsreport/obsreporttest" "go.opentelemetry.io/collector/pdata/ptrace" ) @@ -36,15 +37,15 @@ const ( ) var ( - fakeTracesExporterName = component.NewIDWithName("fake_traces_exporter", "with_name") + fakeTracesExporterName = component.MustNewIDWithName("fake_traces_exporter", "with_name") fakeTracesExporterConfig = struct{}{} ) func TestTracesRequest(t *testing.T) { - mr := newTracesRequest(context.Background(), testdata.GenerateTraces(1), nil) + mr := newTracesRequest(testdata.GenerateTraces(1), nil) traceErr := consumererror.NewTraces(errors.New("some error"), ptrace.NewTraces()) - assert.EqualValues(t, newTracesRequest(context.Background(), ptrace.NewTraces(), nil), mr.OnError(traceErr)) + assert.EqualValues(t, newTracesRequest(ptrace.NewTraces(), nil), mr.(RequestErrorHandler).OnError(traceErr)) } func TestTracesExporter_InvalidName(t *testing.T) { @@ -60,7 +61,7 @@ func TestTracesExporter_NilLogger(t *testing.T) { } func TestTracesRequestExporter_NilLogger(t *testing.T) { - te, err := NewTracesRequestExporter(context.Background(), exporter.CreateSettings{}, &fakeRequestConverter{}) + te, err := NewTracesRequestExporter(context.Background(), exporter.CreateSettings{}, (&fakeRequestConverter{}).requestFromTracesFunc) require.Nil(t, te) require.Equal(t, errNilLogger, err) } @@ -91,7 +92,8 @@ func TestTracesExporter_Default(t *testing.T) { func TestTracesRequestExporter_Default(t *testing.T) { td := ptrace.NewTraces() - te, err := NewTracesRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), &fakeRequestConverter{}) + te, err := NewTracesRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), + (&fakeRequestConverter{}).requestFromTracesFunc) assert.NotNil(t, te) assert.NoError(t, err) @@ -112,7 +114,8 @@ func TestTracesExporter_WithCapabilities(t *testing.T) { func TestTracesRequestExporter_WithCapabilities(t *testing.T) { capabilities := consumer.Capabilities{MutatesData: true} - te, err := NewTracesRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), &fakeRequestConverter{}, WithCapabilities(capabilities)) + te, err := NewTracesRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), + (&fakeRequestConverter{}).requestFromTracesFunc, WithCapabilities(capabilities)) assert.NotNil(t, te) assert.NoError(t, err) @@ -134,7 +137,7 @@ func TestTracesRequestExporter_Default_ConvertError(t *testing.T) { td := ptrace.NewTraces() want := errors.New("convert_error") te, err := NewTracesRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), - &fakeRequestConverter{tracesError: want}) + (&fakeRequestConverter{tracesError: want}).requestFromTracesFunc) require.NoError(t, err) require.NotNil(t, te) require.Equal(t, consumererror.NewPermanent(want), te.ConsumeTraces(context.Background(), td)) @@ -143,7 +146,8 @@ func TestTracesRequestExporter_Default_ConvertError(t *testing.T) { func TestTracesRequestExporter_Default_ExportError(t *testing.T) { td := ptrace.NewTraces() want := errors.New("export_error") - te, err := NewTracesRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), &fakeRequestConverter{requestError: want}) + te, err := NewTracesRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), + (&fakeRequestConverter{requestError: want}).requestFromTracesFunc) require.NoError(t, err) require.NotNil(t, te) require.Equal(t, want, te.ConsumeTraces(context.Background(), td)) @@ -151,17 +155,17 @@ func TestTracesRequestExporter_Default_ExportError(t *testing.T) { func TestTracesExporter_WithPersistentQueue(t *testing.T) { qCfg := NewDefaultQueueSettings() - storageID := component.NewIDWithName("file_storage", "storage") + storageID := component.MustNewIDWithName("file_storage", "storage") qCfg.StorageID = &storageID - rCfg := NewDefaultRetrySettings() + rCfg := configretry.NewDefaultBackOffConfig() ts := consumertest.TracesSink{} set := exportertest.NewNopCreateSettings() - set.ID = component.NewIDWithName("test_traces", "with_persistent_queue") + set.ID = component.MustNewIDWithName("test_traces", "with_persistent_queue") te, err := NewTracesExporter(context.Background(), set, &fakeTracesExporterConfig, ts.ConsumeTraces, WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) host := &mockHost{ext: map[component.ID]component.Component{ - storageID: internal.NewMockStorageExtension(nil), + storageID: queue.NewMockStorageExtension(nil), }} require.NoError(t, te.Start(context.Background(), host)) t.Cleanup(func() { require.NoError(t, te.Shutdown(context.Background())) }) @@ -174,11 +178,11 @@ func TestTracesExporter_WithPersistentQueue(t *testing.T) { } func TestTracesExporter_WithRecordMetrics(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(fakeTracesExporterName) + tt, err := componenttest.SetupTelemetry(fakeTracesExporterName) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - te, err := NewTracesExporter(context.Background(), exportertest.NewCreateSettings(fakeTracesExporterName, tt.TelemetrySettings), &fakeTracesExporterConfig, newTraceDataPusher(nil)) + te, err := NewTracesExporter(context.Background(), exporter.CreateSettings{ID: fakeTracesExporterName, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, &fakeTracesExporterConfig, newTraceDataPusher(nil)) require.NoError(t, err) require.NotNil(t, te) @@ -186,11 +190,13 @@ func TestTracesExporter_WithRecordMetrics(t *testing.T) { } func TestTracesRequestExporter_WithRecordMetrics(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(fakeTracesExporterName) + tt, err := componenttest.SetupTelemetry(fakeTracesExporterName) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - te, err := NewTracesRequestExporter(context.Background(), exportertest.NewCreateSettings(fakeTracesExporterName, tt.TelemetrySettings), &fakeRequestConverter{}) + te, err := NewTracesRequestExporter(context.Background(), + exporter.CreateSettings{ID: fakeTracesExporterName, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, + (&fakeRequestConverter{}).requestFromTracesFunc) require.NoError(t, err) require.NotNil(t, te) @@ -199,11 +205,11 @@ func TestTracesRequestExporter_WithRecordMetrics(t *testing.T) { func TestTracesExporter_WithRecordMetrics_ReturnError(t *testing.T) { want := errors.New("my_error") - tt, err := obsreporttest.SetupTelemetry(fakeTracesExporterName) + tt, err := componenttest.SetupTelemetry(fakeTracesExporterName) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - te, err := NewTracesExporter(context.Background(), exportertest.NewCreateSettings(fakeTracesExporterName, tt.TelemetrySettings), &fakeTracesExporterConfig, newTraceDataPusher(want)) + te, err := NewTracesExporter(context.Background(), exporter.CreateSettings{ID: fakeTracesExporterName, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, &fakeTracesExporterConfig, newTraceDataPusher(want)) require.NoError(t, err) require.NotNil(t, te) @@ -212,11 +218,13 @@ func TestTracesExporter_WithRecordMetrics_ReturnError(t *testing.T) { func TestTracesRequestExporter_WithRecordMetrics_RequestSenderError(t *testing.T) { want := errors.New("export_error") - tt, err := obsreporttest.SetupTelemetry(fakeTracesExporterName) + tt, err := componenttest.SetupTelemetry(fakeTracesExporterName) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - te, err := NewTracesRequestExporter(context.Background(), exportertest.NewCreateSettings(fakeTracesExporterName, tt.TelemetrySettings), &fakeRequestConverter{requestError: want}) + te, err := NewTracesRequestExporter(context.Background(), + exporter.CreateSettings{ID: fakeTracesExporterName, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, + (&fakeRequestConverter{requestError: want}).requestFromTracesFunc) require.NoError(t, err) require.NotNil(t, te) @@ -224,16 +232,16 @@ func TestTracesRequestExporter_WithRecordMetrics_RequestSenderError(t *testing.T } func TestTracesExporter_WithRecordEnqueueFailedMetrics(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(fakeTracesExporterName) + tt, err := componenttest.SetupTelemetry(fakeTracesExporterName) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - rCfg := NewDefaultRetrySettings() + rCfg := configretry.NewDefaultBackOffConfig() qCfg := NewDefaultQueueSettings() qCfg.NumConsumers = 1 qCfg.QueueSize = 2 wantErr := errors.New("some-error") - te, err := NewTracesExporter(context.Background(), exportertest.NewCreateSettings(fakeTracesExporterName, tt.TelemetrySettings), &fakeTracesExporterConfig, newTraceDataPusher(wantErr), WithRetry(rCfg), WithQueue(qCfg)) + te, err := NewTracesExporter(context.Background(), exporter.CreateSettings{ID: fakeTracesExporterName, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, &fakeTracesExporterConfig, newTraceDataPusher(wantErr), WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) require.NotNil(t, te) @@ -245,7 +253,7 @@ func TestTracesExporter_WithRecordEnqueueFailedMetrics(t *testing.T) { } // 2 batched must be in queue, and 5 batches (10 spans) rejected due to queue overflow - checkExporterEnqueueFailedTracesStats(t, globalInstruments, fakeTracesExporterName, int64(10)) + require.NoError(t, tt.CheckExporterEnqueueFailedTraces(int64(10))) } func TestTracesExporter_WithSpan(t *testing.T) { @@ -253,7 +261,7 @@ func TestTracesExporter_WithSpan(t *testing.T) { sr := new(tracetest.SpanRecorder) set.TracerProvider = sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr)) otel.SetTracerProvider(set.TracerProvider) - defer otel.SetTracerProvider(trace.NewNoopTracerProvider()) + defer otel.SetTracerProvider(nooptrace.NewTracerProvider()) te, err := NewTracesExporter(context.Background(), set, &fakeTracesExporterConfig, newTraceDataPusher(nil)) require.NoError(t, err) @@ -267,9 +275,9 @@ func TestTracesRequestExporter_WithSpan(t *testing.T) { sr := new(tracetest.SpanRecorder) set.TracerProvider = sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr)) otel.SetTracerProvider(set.TracerProvider) - defer otel.SetTracerProvider(trace.NewNoopTracerProvider()) + defer otel.SetTracerProvider(nooptrace.NewTracerProvider()) - te, err := NewTracesRequestExporter(context.Background(), set, &fakeRequestConverter{}) + te, err := NewTracesRequestExporter(context.Background(), set, (&fakeRequestConverter{}).requestFromTracesFunc) require.NoError(t, err) require.NotNil(t, te) @@ -281,7 +289,7 @@ func TestTracesExporter_WithSpan_ReturnError(t *testing.T) { sr := new(tracetest.SpanRecorder) set.TracerProvider = sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr)) otel.SetTracerProvider(set.TracerProvider) - defer otel.SetTracerProvider(trace.NewNoopTracerProvider()) + defer otel.SetTracerProvider(nooptrace.NewTracerProvider()) want := errors.New("my_error") te, err := NewTracesExporter(context.Background(), set, &fakeTracesExporterConfig, newTraceDataPusher(want)) @@ -296,10 +304,10 @@ func TestTracesRequestExporter_WithSpan_ExportError(t *testing.T) { sr := new(tracetest.SpanRecorder) set.TracerProvider = sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr)) otel.SetTracerProvider(set.TracerProvider) - defer otel.SetTracerProvider(trace.NewNoopTracerProvider()) + defer otel.SetTracerProvider(nooptrace.NewTracerProvider()) want := errors.New("export_error") - te, err := NewTracesRequestExporter(context.Background(), set, &fakeRequestConverter{requestError: want}) + te, err := NewTracesRequestExporter(context.Background(), set, (&fakeRequestConverter{requestError: want}).requestFromTracesFunc) require.NoError(t, err) require.NotNil(t, te) @@ -323,7 +331,8 @@ func TestTracesRequestExporter_WithShutdown(t *testing.T) { shutdownCalled := false shutdown := func(context.Context) error { shutdownCalled = true; return nil } - te, err := NewTracesRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), &fakeRequestConverter{}, WithShutdown(shutdown)) + te, err := NewTracesRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), + (&fakeRequestConverter{}).requestFromTracesFunc, WithShutdown(shutdown)) assert.NotNil(t, te) assert.NoError(t, err) @@ -348,7 +357,8 @@ func TestTracesRequestExporter_WithShutdown_ReturnError(t *testing.T) { want := errors.New("my_error") shutdownErr := func(context.Context) error { return want } - te, err := NewTracesRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), &fakeRequestConverter{}, WithShutdown(shutdownErr)) + te, err := NewTracesRequestExporter(context.Background(), exportertest.NewNopCreateSettings(), + (&fakeRequestConverter{}).requestFromTracesFunc, WithShutdown(shutdownErr)) assert.NotNil(t, te) assert.NoError(t, err) @@ -357,12 +367,12 @@ func TestTracesRequestExporter_WithShutdown_ReturnError(t *testing.T) { } func newTraceDataPusher(retError error) consumer.ConsumeTracesFunc { - return func(ctx context.Context, td ptrace.Traces) error { + return func(context.Context, ptrace.Traces) error { return retError } } -func checkRecordedMetricsForTracesExporter(t *testing.T, tt obsreporttest.TestTelemetry, te exporter.Traces, wantError error) { +func checkRecordedMetricsForTracesExporter(t *testing.T, tt componenttest.TestTelemetry, te exporter.Traces, wantError error) { td := testdata.GenerateTraces(2) const numBatches = 7 for i := 0; i < numBatches; i++ { diff --git a/exporter/exporterqueue/config.go b/exporter/exporterqueue/config.go new file mode 100644 index 00000000000..ac888a0c227 --- /dev/null +++ b/exporter/exporterqueue/config.go @@ -0,0 +1,61 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package exporterqueue // import "go.opentelemetry.io/collector/exporter/exporterqueue" + +import ( + "errors" + + "go.opentelemetry.io/collector/component" +) + +// Config defines configuration for queueing requests before exporting. +// It's supposed to be used with the new exporter helpers New[Traces|Metrics|Logs]RequestExporter. +// This API is at the early stage of development and may change without backward compatibility +// until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. +type Config struct { + // Enabled indicates whether to not enqueue batches before exporting. + Enabled bool `mapstructure:"enabled"` + // NumConsumers is the number of consumers from the queue. + NumConsumers int `mapstructure:"num_consumers"` + // QueueSize is the maximum number of requests allowed in queue at any given time. + QueueSize int `mapstructure:"queue_size"` +} + +// NewDefaultConfig returns the default Config. +// This API is at the early stage of development and may change without backward compatibility +// until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. +func NewDefaultConfig() Config { + return Config{ + Enabled: true, + NumConsumers: 10, + QueueSize: 1_000, + } +} + +// Validate checks if the QueueSettings configuration is valid +func (qCfg *Config) Validate() error { + if !qCfg.Enabled { + return nil + } + if qCfg.NumConsumers <= 0 { + return errors.New("number of consumers must be positive") + } + if qCfg.QueueSize <= 0 { + return errors.New("queue size must be positive") + } + return nil +} + +// PersistentQueueConfig defines configuration for queueing requests in a persistent storage. +// The struct is provided to be added in the exporter configuration as one struct under the "sending_queue" key. +// The exporter helper Go interface requires the fields to be provided separately to WithRequestQueue and +// NewPersistentQueueFactory. +// This API is at the early stage of development and may change without backward compatibility +// until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. +type PersistentQueueConfig struct { + Config `mapstructure:",squash"` + // StorageID if not empty, enables the persistent storage and uses the component specified + // as a storage extension for the persistent queue + StorageID *component.ID `mapstructure:"storage"` +} diff --git a/exporter/exporterqueue/config_test.go b/exporter/exporterqueue/config_test.go new file mode 100644 index 00000000000..c1b43ba5f8e --- /dev/null +++ b/exporter/exporterqueue/config_test.go @@ -0,0 +1,26 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package exporterqueue + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestQueueConfig_Validate(t *testing.T) { + qCfg := NewDefaultConfig() + assert.NoError(t, qCfg.Validate()) + + qCfg.NumConsumers = 0 + assert.EqualError(t, qCfg.Validate(), "number of consumers must be positive") + + qCfg = NewDefaultConfig() + qCfg.QueueSize = 0 + assert.EqualError(t, qCfg.Validate(), "queue size must be positive") + + // Confirm Validate doesn't return error with invalid config when feature is disabled + qCfg.Enabled = false + assert.NoError(t, qCfg.Validate()) +} diff --git a/exporter/exporterqueue/queue.go b/exporter/exporterqueue/queue.go new file mode 100644 index 00000000000..556dce9f9c2 --- /dev/null +++ b/exporter/exporterqueue/queue.go @@ -0,0 +1,96 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package exporterqueue // import "go.opentelemetry.io/collector/exporter/exporterqueue" + +import ( + "context" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/internal/queue" +) + +// Queue defines a producer-consumer exchange which can be backed by e.g. the memory-based ring buffer queue +// (boundedMemoryQueue) or via a disk-based queue (persistentQueue) +// This API is at the early stage of development and may change without backward compatibility +// until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. +type Queue[T any] queue.Queue[T] + +// Settings defines settings for creating a queue. +type Settings struct { + DataType component.DataType + ExporterSettings exporter.CreateSettings +} + +// Marshaler is a function that can marshal a request into bytes. +// This API is at the early stage of development and may change without backward compatibility +// until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. +type Marshaler[T any] func(T) ([]byte, error) + +// Unmarshaler is a function that can unmarshal bytes into a request. +// This API is at the early stage of development and may change without backward compatibility +// until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. +type Unmarshaler[T any] func([]byte) (T, error) + +// Factory is a function that creates a new queue. +// This API is at the early stage of development and may change without backward compatibility +// until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. +type Factory[T any] func(context.Context, Settings, Config) Queue[T] + +// NewMemoryQueueFactory returns a factory to create a new memory queue. +// This API is at the early stage of development and may change without backward compatibility +// until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. +func NewMemoryQueueFactory[T itemsCounter]() Factory[T] { + return func(_ context.Context, _ Settings, cfg Config) Queue[T] { + return queue.NewBoundedMemoryQueue[T](queue.MemoryQueueSettings[T]{ + Sizer: sizerFromConfig[T](cfg), + Capacity: capacityFromConfig(cfg), + }) + } +} + +// PersistentQueueSettings defines developer settings for the persistent queue factory. +// This API is at the early stage of development and may change without backward compatibility +// until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. +type PersistentQueueSettings[T any] struct { + // Marshaler is used to serialize queue elements before storing them in the persistent storage. + Marshaler Marshaler[T] + // Unmarshaler is used to deserialize requests after reading them from the persistent storage. + Unmarshaler Unmarshaler[T] +} + +// NewPersistentQueueFactory returns a factory to create a new persistent queue. +// If cfg.StorageID is nil then it falls back to memory queue. +// This API is at the early stage of development and may change without backward compatibility +// until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. +func NewPersistentQueueFactory[T itemsCounter](storageID *component.ID, factorySettings PersistentQueueSettings[T]) Factory[T] { + if storageID == nil { + return NewMemoryQueueFactory[T]() + } + return func(_ context.Context, set Settings, cfg Config) Queue[T] { + return queue.NewPersistentQueue[T](queue.PersistentQueueSettings[T]{ + Sizer: sizerFromConfig[T](cfg), + Capacity: capacityFromConfig(cfg), + DataType: set.DataType, + StorageID: *storageID, + Marshaler: factorySettings.Marshaler, + Unmarshaler: factorySettings.Unmarshaler, + ExporterSettings: set.ExporterSettings, + }) + } +} + +type itemsCounter interface { + ItemsCount() int +} + +func sizerFromConfig[T itemsCounter](Config) queue.Sizer[T] { + // TODO: Handle other ways to measure the queue size once they are added. + return &queue.RequestSizer[T]{} +} + +func capacityFromConfig(cfg Config) int { + // TODO: Handle other ways to measure the queue size once they are added. + return cfg.QueueSize +} diff --git a/exporter/exportertest/contract_checker.go b/exporter/exportertest/contract_checker.go new file mode 100644 index 00000000000..7b3f55c1902 --- /dev/null +++ b/exporter/exportertest/contract_checker.go @@ -0,0 +1,280 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package exportertest // import "go.opentelemetry.io/collector/exporter/exportertest" + +import ( + "context" + "fmt" + "strconv" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/receiver" + "go.opentelemetry.io/collector/receiver/receivertest" +) + +// uniqueIDAttrName is the attribute name that is used in log records/spans/datapoints as the unique identifier. +const uniqueIDAttrName = "test_id" + +// uniqueIDAttrVal is the value type of the uniqueIDAttrName. +type uniqueIDAttrVal string + +type CheckConsumeContractParams struct { + T *testing.T + NumberOfTestElements int + // DataType to test for. + DataType component.DataType + // ExporterFactory to create an exporter to be tested. + ExporterFactory exporter.Factory + ExporterConfig component.Config + // ReceiverFactory to create a mock receiver. + ReceiverFactory receiver.Factory + ReceiverConfig component.Config +} + +func CheckConsumeContract(params CheckConsumeContractParams) { + // Different scenarios to test for. + // The decision function defines the testing scenario (i.e. to test for + // success case or for error case or a mix of both). See for example randomErrorsConsumeDecision. + scenarios := []struct { + name string + decisionFunc func() error + checkIfTestPassed func(*testing.T, int, requestCounter) + }{ + { + name: "always_succeed", + // Always succeed. We expect all data to be delivered as is. + decisionFunc: func() error { return nil }, + checkIfTestPassed: alwaysSucceedsPassed, + }, + { + name: "random_non_permanent_error", + decisionFunc: randomNonPermanentErrorConsumeDecision, + checkIfTestPassed: randomNonPermanentErrorConsumeDecisionPassed, + }, + { + name: "random_permanent_error", + decisionFunc: randomPermanentErrorConsumeDecision, + checkIfTestPassed: randomPermanentErrorConsumeDecisionPassed, + }, + { + name: "random_error", + decisionFunc: randomErrorsConsumeDecision, + checkIfTestPassed: randomErrorConsumeDecisionPassed, + }, + } + for _, scenario := range scenarios { + params.T.Run( + scenario.name, func(t *testing.T) { + checkConsumeContractScenario(t, params, scenario.decisionFunc, scenario.checkIfTestPassed) + }, + ) + } +} + +func checkConsumeContractScenario(t *testing.T, params CheckConsumeContractParams, decisionFunc func() error, checkIfTestPassed func(*testing.T, int, requestCounter)) { + mockConsumerInstance := newMockConsumer(decisionFunc) + switch params.DataType { + case component.DataTypeLogs: + r, err := params.ReceiverFactory.CreateLogsReceiver(context.Background(), receivertest.NewNopCreateSettings(), params.ReceiverConfig, &mockConsumerInstance) + require.NoError(t, err) + require.NoError(t, r.Start(context.Background(), componenttest.NewNopHost())) + checkLogs(t, params, r, &mockConsumerInstance, checkIfTestPassed) + case component.DataTypeTraces: + r, err := params.ReceiverFactory.CreateTracesReceiver(context.Background(), receivertest.NewNopCreateSettings(), params.ReceiverConfig, &mockConsumerInstance) + require.NoError(t, err) + require.NoError(t, r.Start(context.Background(), componenttest.NewNopHost())) + checkTraces(t, params, r, &mockConsumerInstance, checkIfTestPassed) + case component.DataTypeMetrics: + r, err := params.ReceiverFactory.CreateMetricsReceiver(context.Background(), receivertest.NewNopCreateSettings(), params.ReceiverConfig, &mockConsumerInstance) + require.NoError(t, err) + require.NoError(t, r.Start(context.Background(), componenttest.NewNopHost())) + checkMetrics(t, params, r, &mockConsumerInstance, checkIfTestPassed) + default: + require.FailNow(t, "must specify a valid DataType to test for") + } +} + +func checkMetrics(t *testing.T, params CheckConsumeContractParams, mockReceiver component.Component, + mockConsumer *mockConsumer, checkIfTestPassed func(*testing.T, int, requestCounter)) { + ctx := context.Background() + var exp exporter.Metrics + var err error + exp, err = params.ExporterFactory.CreateMetricsExporter(ctx, NewNopCreateSettings(), params.ExporterConfig) + require.NoError(t, err) + require.NotNil(t, exp) + + err = exp.Start(ctx, componenttest.NewNopHost()) + require.NoError(t, err) + + defer func(exp exporter.Metrics, ctx context.Context) { + err = exp.Shutdown(ctx) + require.NoError(t, err) + err = mockReceiver.Shutdown(ctx) + require.NoError(t, err) + mockConsumer.clear() + }(exp, ctx) + + for i := 0; i < params.NumberOfTestElements; i++ { + id := uniqueIDAttrVal(strconv.Itoa(i)) + data := createOneMetricWithID(id) + + err = exp.ConsumeMetrics(ctx, data) + } + + reqCounter := mockConsumer.getRequestCounter() + // The overall number of requests sent by exporter + fmt.Printf("Number of export tries: %d\n", reqCounter.total) + // Successfully delivered items + fmt.Printf("Total items received successfully: %d\n", reqCounter.success) + // Number of errors that happened + fmt.Printf("Number of permanent errors: %d\n", reqCounter.error.permanent) + fmt.Printf("Number of non-permanent errors: %d\n", reqCounter.error.nonpermanent) + + assert.EventuallyWithT(t, func(*assert.CollectT) { + checkIfTestPassed(t, params.NumberOfTestElements, *reqCounter) + }, 2*time.Second, 100*time.Millisecond) +} + +func checkTraces(t *testing.T, params CheckConsumeContractParams, mockReceiver component.Component, mockConsumer *mockConsumer, checkIfTestPassed func(*testing.T, int, requestCounter)) { + ctx := context.Background() + var exp exporter.Traces + var err error + exp, err = params.ExporterFactory.CreateTracesExporter(ctx, NewNopCreateSettings(), params.ExporterConfig) + require.NoError(t, err) + require.NotNil(t, exp) + + err = exp.Start(ctx, componenttest.NewNopHost()) + require.NoError(t, err) + + defer func(exp exporter.Traces, ctx context.Context) { + err = exp.Shutdown(ctx) + require.NoError(t, err) + err = mockReceiver.Shutdown(ctx) + require.NoError(t, err) + mockConsumer.clear() + }(exp, ctx) + + for i := 0; i < params.NumberOfTestElements; i++ { + id := uniqueIDAttrVal(strconv.Itoa(i)) + data := createOneTraceWithID(id) + + err = exp.ConsumeTraces(ctx, data) + } + + reqCounter := mockConsumer.getRequestCounter() + // The overall number of requests sent by exporter + fmt.Printf("Number of export tries: %d\n", reqCounter.total) + // Successfully delivered items + fmt.Printf("Total items received successfully: %d\n", reqCounter.success) + // Number of errors that happened + fmt.Printf("Number of permanent errors: %d\n", reqCounter.error.permanent) + fmt.Printf("Number of non-permanent errors: %d\n", reqCounter.error.nonpermanent) + + assert.EventuallyWithT(t, func(*assert.CollectT) { + checkIfTestPassed(t, params.NumberOfTestElements, *reqCounter) + }, 2*time.Second, 100*time.Millisecond) +} + +func checkLogs(t *testing.T, params CheckConsumeContractParams, mockReceiver component.Component, mockConsumer *mockConsumer, checkIfTestPassed func(*testing.T, int, requestCounter)) { + ctx := context.Background() + var exp exporter.Logs + var err error + exp, err = params.ExporterFactory.CreateLogsExporter(ctx, NewNopCreateSettings(), params.ExporterConfig) + require.NoError(t, err) + require.NotNil(t, exp) + + err = exp.Start(ctx, componenttest.NewNopHost()) + require.NoError(t, err) + + defer func(exp exporter.Logs, ctx context.Context) { + err = exp.Shutdown(ctx) + require.NoError(t, err) + err = mockReceiver.Shutdown(ctx) + require.NoError(t, err) + mockConsumer.clear() + }(exp, ctx) + + for i := 0; i < params.NumberOfTestElements; i++ { + id := uniqueIDAttrVal(strconv.Itoa(i)) + data := createOneLogWithID(id) + + err = exp.ConsumeLogs(ctx, data) + } + reqCounter := mockConsumer.getRequestCounter() + // The overall number of requests sent by exporter + fmt.Printf("Number of export tries: %d\n", reqCounter.total) + // Successfully delivered items + fmt.Printf("Total items received successfully: %d\n", reqCounter.success) + // Number of errors that happened + fmt.Printf("Number of permanent errors: %d\n", reqCounter.error.permanent) + fmt.Printf("Number of non-permanent errors: %d\n", reqCounter.error.nonpermanent) + + assert.EventuallyWithT(t, func(*assert.CollectT) { + checkIfTestPassed(t, params.NumberOfTestElements, *reqCounter) + }, 2*time.Second, 100*time.Millisecond) +} + +// Test is successful if all the elements were received successfully and no error was returned +func alwaysSucceedsPassed(t *testing.T, allRecordsNumber int, reqCounter requestCounter) { + require.Equal(t, allRecordsNumber, reqCounter.success) + require.Equal(t, reqCounter.total, allRecordsNumber) + require.Equal(t, reqCounter.error.nonpermanent, 0) + require.Equal(t, reqCounter.error.permanent, 0) +} + +// Test is successful if all the elements were retried on non-permanent errors +func randomNonPermanentErrorConsumeDecisionPassed(t *testing.T, allRecordsNumber int, reqCounter requestCounter) { + // more or equal tries than successes + require.GreaterOrEqual(t, reqCounter.total, reqCounter.success) + // it is retried on every error + require.Equal(t, reqCounter.total-reqCounter.error.nonpermanent, reqCounter.success) + require.Equal(t, allRecordsNumber+reqCounter.error.nonpermanent, reqCounter.total) +} + +// Test is successful if the calls are not retried on permanent errors +func randomPermanentErrorConsumeDecisionPassed(t *testing.T, allRecordsNumber int, reqCounter requestCounter) { + require.Equal(t, allRecordsNumber-reqCounter.error.permanent, reqCounter.success) + require.Equal(t, reqCounter.total, allRecordsNumber) +} + +// Test is successful if the calls are not retried on permanent errors +func randomErrorConsumeDecisionPassed(t *testing.T, allRecordsNumber int, reqCounter requestCounter) { + require.Equal(t, allRecordsNumber-reqCounter.error.permanent, reqCounter.success) + require.Equal(t, reqCounter.total, allRecordsNumber+reqCounter.error.nonpermanent) +} + +func createOneLogWithID(id uniqueIDAttrVal) plog.Logs { + data := plog.NewLogs() + data.ResourceLogs().AppendEmpty().ScopeLogs().AppendEmpty().LogRecords().AppendEmpty().Attributes().PutStr( + uniqueIDAttrName, + string(id), + ) + return data +} + +func createOneTraceWithID(id uniqueIDAttrVal) ptrace.Traces { + data := ptrace.NewTraces() + data.ResourceSpans().AppendEmpty().ScopeSpans().AppendEmpty().Spans().AppendEmpty().Attributes().PutStr( + uniqueIDAttrName, + string(id), + ) + return data +} + +func createOneMetricWithID(id uniqueIDAttrVal) pmetric.Metrics { + data := pmetric.NewMetrics() + data.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty().Metrics().AppendEmpty().SetEmptyHistogram(). + DataPoints().AppendEmpty().Attributes().PutStr(uniqueIDAttrName, string(id)) + return data +} diff --git a/exporter/exportertest/contract_checker_test.go b/exporter/exportertest/contract_checker_test.go new file mode 100644 index 00000000000..7b0a6d5abb3 --- /dev/null +++ b/exporter/exportertest/contract_checker_test.go @@ -0,0 +1,143 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package exportertest + +import ( + "context" + "testing" + "time" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exporterhelper" + "go.opentelemetry.io/collector/receiver" +) + +// retryConfig is a configuration to quickly retry failed exports. +var retryConfig = func() configretry.BackOffConfig { + c := configretry.NewDefaultBackOffConfig() + c.InitialInterval = time.Millisecond + return c +}() + +// mockReceiver is a receiver with pass-through consumers. +type mockReceiver struct { + component.StartFunc + component.ShutdownFunc + consumer.Traces + consumer.Metrics + consumer.Logs +} + +// mockExporterFactory is a factory to create exporters sending data to the mockReceiver. +type mockExporterFactory struct { + mr *mockReceiver + component.StartFunc + component.ShutdownFunc +} + +func (mef *mockExporterFactory) createMockTracesExporter( + ctx context.Context, + set exporter.CreateSettings, + cfg component.Config, +) (exporter.Traces, error) { + return exporterhelper.NewTracesExporter(ctx, set, cfg, + mef.mr.Traces.ConsumeTraces, + exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), + exporterhelper.WithRetry(retryConfig), + ) +} + +func (mef *mockExporterFactory) createMockMetricsExporter( + ctx context.Context, + set exporter.CreateSettings, + cfg component.Config, +) (exporter.Metrics, error) { + return exporterhelper.NewMetricsExporter(ctx, set, cfg, + mef.mr.Metrics.ConsumeMetrics, + exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), + exporterhelper.WithRetry(retryConfig), + ) +} + +func (mef *mockExporterFactory) createMockLogsExporter( + ctx context.Context, + set exporter.CreateSettings, + cfg component.Config, +) (exporter.Logs, error) { + return exporterhelper.NewLogsExporter(ctx, set, cfg, + mef.mr.Logs.ConsumeLogs, + exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), + exporterhelper.WithRetry(retryConfig), + ) +} + +func newMockExporterFactory(mr *mockReceiver) exporter.Factory { + mef := &mockExporterFactory{mr: mr} + return exporter.NewFactory( + component.MustNewType("pass_through_exporter"), + func() component.Config { return &nopConfig{} }, + exporter.WithTraces(mef.createMockTracesExporter, component.StabilityLevelBeta), + exporter.WithMetrics(mef.createMockMetricsExporter, component.StabilityLevelBeta), + exporter.WithLogs(mef.createMockLogsExporter, component.StabilityLevelBeta), + ) +} + +func newMockReceiverFactory(mr *mockReceiver) receiver.Factory { + return receiver.NewFactory(component.MustNewType("pass_through_receiver"), + func() component.Config { return &nopConfig{} }, + receiver.WithTraces(func(_ context.Context, _ receiver.CreateSettings, _ component.Config, c consumer.Traces) (receiver.Traces, error) { + mr.Traces = c + return mr, nil + }, component.StabilityLevelStable), + receiver.WithMetrics(func(_ context.Context, _ receiver.CreateSettings, _ component.Config, c consumer.Metrics) (receiver.Metrics, error) { + mr.Metrics = c + return mr, nil + }, component.StabilityLevelStable), + receiver.WithLogs(func(_ context.Context, _ receiver.CreateSettings, _ component.Config, c consumer.Logs) (receiver.Logs, error) { + mr.Logs = c + return mr, nil + }, component.StabilityLevelStable), + ) +} + +func TestCheckConsumeContractLogs(t *testing.T) { + mr := &mockReceiver{} + params := CheckConsumeContractParams{ + T: t, + ExporterFactory: newMockExporterFactory(mr), + DataType: component.DataTypeLogs, + ExporterConfig: nopConfig{}, + NumberOfTestElements: 10, + ReceiverFactory: newMockReceiverFactory(mr), + } + + CheckConsumeContract(params) +} + +func TestCheckConsumeContractMetrics(t *testing.T) { + mr := &mockReceiver{} + CheckConsumeContract(CheckConsumeContractParams{ + T: t, + ExporterFactory: newMockExporterFactory(mr), + DataType: component.DataTypeMetrics, // Change to the appropriate data type + ExporterConfig: nopConfig{}, + NumberOfTestElements: 10, + ReceiverFactory: newMockReceiverFactory(mr), + }) +} + +func TestCheckConsumeContractTraces(t *testing.T) { + mr := &mockReceiver{} + CheckConsumeContract(CheckConsumeContractParams{ + T: t, + ExporterFactory: newMockExporterFactory(mr), + DataType: component.DataTypeTraces, + ExporterConfig: nopConfig{}, + NumberOfTestElements: 10, + ReceiverFactory: newMockReceiverFactory(mr), + }) +} diff --git a/exporter/exportertest/mock_consumer.go b/exporter/exportertest/mock_consumer.go new file mode 100644 index 00000000000..b513e524735 --- /dev/null +++ b/exporter/exportertest/mock_consumer.go @@ -0,0 +1,212 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 +package exportertest // import "go.opentelemetry.io/collector/exporter/exportertest" + +import ( + "context" + "fmt" + "math/rand" + "sync" + + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/consumer/consumererror" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +var errNonPermanent = status.Error(codes.DeadlineExceeded, "non Permanent error") +var errPermanent = status.Error(codes.Internal, "Permanent error") + +// // randomNonPermanentErrorConsumeDecision is a decision function that succeeds approximately +// // half of the time and fails with a non-permanent error the rest of the time. +func randomNonPermanentErrorConsumeDecision() error { + if rand.Float32() < 0.5 { + return errNonPermanent + } + return nil +} + +// randomPermanentErrorConsumeDecision is a decision function that succeeds approximately +// half of the time and fails with a permanent error the rest of the time. +func randomPermanentErrorConsumeDecision() error { + if rand.Float32() < 0.5 { + return consumererror.NewPermanent(errPermanent) + } + return nil +} + +// randomErrorsConsumeDecision is a decision function that succeeds approximately +// a third of the time, fails with a permanent error the third of the time and fails with +// a non-permanent error the rest of the time. +func randomErrorsConsumeDecision() error { + r := rand.Float64() + third := 1.0 / 3.0 + if r < third { + return consumererror.NewPermanent(errPermanent) + } + if r < 2*third { + return errNonPermanent + } + return nil +} + +type mockConsumer struct { + consumer.Traces + consumer.Logs + consumer.Metrics + reqCounter *requestCounter + mux sync.Mutex + exportErrorFunction func() error + receivedTraces []ptrace.Traces + receivedMetrics []pmetric.Metrics + receivedLogs []plog.Logs +} + +func newMockConsumer(decisionFunc func() error) mockConsumer { + return mockConsumer{ + reqCounter: newRequestCounter(), + mux: sync.Mutex{}, + exportErrorFunction: decisionFunc, + receivedTraces: nil, + receivedMetrics: nil, + receivedLogs: nil, + } +} + +func (r *mockConsumer) ConsumeLogs(_ context.Context, ld plog.Logs) error { + r.mux.Lock() + defer r.mux.Unlock() + r.reqCounter.total++ + generatedError := r.exportErrorFunction() + if generatedError != nil { + r.processError(generatedError) + return generatedError + } + r.reqCounter.success++ + r.receivedLogs = append(r.receivedLogs, ld) + return nil +} + +func (r *mockConsumer) ConsumeTraces(_ context.Context, td ptrace.Traces) error { + r.mux.Lock() + defer r.mux.Unlock() + r.reqCounter.total++ + generatedError := r.exportErrorFunction() + if generatedError != nil { + r.processError(generatedError) + return generatedError + } + r.reqCounter.success++ + r.receivedTraces = append(r.receivedTraces, td) + return nil +} + +func (r *mockConsumer) ConsumeMetrics(_ context.Context, md pmetric.Metrics) error { + r.mux.Lock() + defer r.mux.Unlock() + r.reqCounter.total++ + generatedError := r.exportErrorFunction() + if generatedError != nil { + r.processError(generatedError) + return generatedError + } + r.reqCounter.success++ + r.receivedMetrics = append(r.receivedMetrics, md) + return nil +} + +func (r *mockConsumer) Capabilities() consumer.Capabilities { + return consumer.Capabilities{} +} + +func (r *mockConsumer) processError(err error) { + if consumererror.IsPermanent(err) { + r.reqCounter.error.permanent++ + } else { + r.reqCounter.error.nonpermanent++ + } +} + +func (r *mockConsumer) clear() { + r.mux.Lock() + defer r.mux.Unlock() + r.reqCounter = newRequestCounter() +} + +func (r *mockConsumer) getRequestCounter() *requestCounter { + return r.reqCounter +} + +type requestCounter struct { + success int + error errorCounter + total int +} + +type errorCounter struct { + permanent int + nonpermanent int +} + +func newErrorCounter() errorCounter { + return errorCounter{ + permanent: 0, + nonpermanent: 0, + } +} + +func newRequestCounter() *requestCounter { + return &requestCounter{ + success: 0, + error: newErrorCounter(), + total: 0, + } +} + +func idFromLogs(data plog.Logs) (string, error) { + var logID string + rss := data.ResourceLogs() + key, exists := rss.At(0).ScopeLogs().At(0).LogRecords().At(0).Attributes().Get(uniqueIDAttrName) + if !exists { + return "", fmt.Errorf("invalid data element, attribute %q is missing", uniqueIDAttrName) + } + if key.Type() != pcommon.ValueTypeStr { + return "", fmt.Errorf("invalid data element, attribute %q is wrong type %v", uniqueIDAttrName, key.Type()) + } + logID = key.Str() + return logID, nil +} + +func idFromTraces(data ptrace.Traces) (string, error) { + var traceID string + rss := data.ResourceSpans() + key, exists := rss.At(0).ScopeSpans().At(0).Spans().At(0).Attributes().Get(uniqueIDAttrName) + if !exists { + return "", fmt.Errorf("invalid data element, attribute %q is missing", uniqueIDAttrName) + } + if key.Type() != pcommon.ValueTypeStr { + return "", fmt.Errorf("invalid data element, attribute %q is wrong type %v", uniqueIDAttrName, key.Type()) + } + traceID = key.Str() + return traceID, nil +} + +func idFromMetrics(data pmetric.Metrics) (string, error) { + var metricID string + rss := data.ResourceMetrics() + key, exists := rss.At(0).ScopeMetrics().At(0).Metrics().At(0).Histogram().DataPoints().At(0).Attributes().Get( + uniqueIDAttrName) + if !exists { + return "", fmt.Errorf("invalid data element, attribute %q is missing", uniqueIDAttrName) + } + if key.Type() != pcommon.ValueTypeStr { + return "", fmt.Errorf("invalid data element, attribute %q is wrong type %v", uniqueIDAttrName, key.Type()) + } + metricID = key.Str() + return metricID, nil +} diff --git a/exporter/exportertest/mock_consumer_test.go b/exporter/exportertest/mock_consumer_test.go new file mode 100644 index 00000000000..63eec26d7fd --- /dev/null +++ b/exporter/exportertest/mock_consumer_test.go @@ -0,0 +1,256 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package exportertest + +import ( + "context" + "fmt" + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func createLog(id string) plog.Logs { + validData := plog.NewLogs() + validData.ResourceLogs().AppendEmpty().ScopeLogs().AppendEmpty().LogRecords().AppendEmpty().Attributes().PutStr( + uniqueIDAttrName, + id, + ) + return validData +} + +func createTrace(id string) ptrace.Traces { + validData := ptrace.NewTraces() + validData.ResourceSpans().AppendEmpty().ScopeSpans().AppendEmpty().Spans().AppendEmpty().Attributes().PutStr( + uniqueIDAttrName, + id, + ) + return validData +} + +func createMetric(id string) pmetric.Metrics { + validData := pmetric.NewMetrics() + validData.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty().Metrics().AppendEmpty().SetEmptyHistogram().DataPoints().AppendEmpty().Attributes().PutStr(uniqueIDAttrName, id) + return validData +} + +func TestIDFromMetrics(t *testing.T) { + // Test case 1: Valid data + id := "metric_id" + validData := createMetric(id) + metricID, err := idFromMetrics(validData) + assert.Equal(t, metricID, id) + assert.NoError(t, err) + + // Test case 2: Missing uniqueIDAttrName attribute + invalidData := pmetric.NewMetrics() // Create an invalid pmetric.Metrics object with missing attribute + invalidData.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty().Metrics().AppendEmpty().SetEmptyHistogram().DataPoints().AppendEmpty().Attributes() + _, err = idFromMetrics(invalidData) + assert.Error(t, err) + assert.Equal(t, err.Error(), fmt.Sprintf("invalid data element, attribute %q is missing", uniqueIDAttrName)) + + // Test case 3: Wrong attribute type + var intID int64 = 12 + wrongAttribute := pmetric.NewMetrics() // Create a valid pmetric.Metrics object + wrongAttribute.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty().Metrics().AppendEmpty(). + SetEmptyHistogram().DataPoints().AppendEmpty().Attributes().PutInt(uniqueIDAttrName, intID) + _, err = idFromMetrics(wrongAttribute) + assert.Error(t, err) + assert.Equal(t, err.Error(), fmt.Sprintf("invalid data element, attribute %q is wrong type Int", uniqueIDAttrName)) +} + +func TestIDFromTraces(t *testing.T) { + // Test case 1: Valid data + id := "trace_id" + validData := createTrace(id) + traceID, err := idFromTraces(validData) + assert.Equal(t, traceID, id) + assert.NoError(t, err) + + // Test case 2: Missing uniqueIDAttrName attribute + invalidData := ptrace.NewTraces() + invalidData.ResourceSpans().AppendEmpty().ScopeSpans().AppendEmpty().Spans().AppendEmpty().Attributes() + _, err = idFromTraces(invalidData) + assert.Error(t, err) + assert.Equal(t, err.Error(), fmt.Sprintf("invalid data element, attribute %q is missing", uniqueIDAttrName)) + + // Test case 3: Wrong attribute type + var intID int64 = 12 + wrongAttribute := ptrace.NewTraces() + wrongAttribute.ResourceSpans().AppendEmpty().ScopeSpans().AppendEmpty().Spans().AppendEmpty().Attributes(). + PutInt(uniqueIDAttrName, intID) + _, err = idFromTraces(wrongAttribute) + assert.Error(t, err) + assert.Equal(t, err.Error(), fmt.Sprintf("invalid data element, attribute %q is wrong type Int", uniqueIDAttrName)) +} + +func TestIDFromLogs(t *testing.T) { + // Test case 1: Valid data + id := "log_id" + validData := createLog(id) + logID, err := idFromLogs(validData) + assert.Equal(t, logID, id) + assert.NoError(t, err) + + // Test case 2: Missing uniqueIDAttrName attribute + invalidData := plog.NewLogs() + invalidData.ResourceLogs().AppendEmpty().ScopeLogs().AppendEmpty().LogRecords().AppendEmpty().Attributes() + _, err = idFromLogs(invalidData) + assert.Error(t, err) + assert.Equal(t, err.Error(), fmt.Sprintf("invalid data element, attribute %q is missing", uniqueIDAttrName)) + + // Test case 3: Wrong attribute type + var intID int64 = 12 + wrongAttribute := plog.NewLogs() // Create a valid plog.Metrics object + wrongAttribute.ResourceLogs().AppendEmpty().ScopeLogs().AppendEmpty().LogRecords().AppendEmpty().Attributes(). + PutInt(uniqueIDAttrName, intID) + _, err = idFromLogs(wrongAttribute) + assert.Error(t, err) + assert.Equal(t, err.Error(), fmt.Sprintf("invalid data element, attribute %q is wrong type Int", uniqueIDAttrName)) +} + +func returnNonPermanentError() error { + return errNonPermanent +} + +func returnPermanentError() error { + return errPermanent +} + +func TestConsumeLogsNonPermanent(t *testing.T) { + mc := newMockConsumer(returnNonPermanentError) + validData := createLog("logId") + err := mc.ConsumeLogs(context.Background(), validData) + if err != nil { + return + } + assert.Equal(t, mc.reqCounter.error.nonpermanent, 1) + assert.Equal(t, mc.reqCounter.error.permanent, 0) + assert.Equal(t, mc.reqCounter.success, 0) + assert.Equal(t, mc.reqCounter.total, 1) + +} + +func TestConsumeLogsPermanent(t *testing.T) { + + mc := newMockConsumer(returnPermanentError) + validData := createLog("logId") + err := mc.ConsumeLogs(context.Background(), validData) + if err != nil { + return + } + assert.Equal(t, mc.reqCounter.error.nonpermanent, 0) + assert.Equal(t, mc.reqCounter.error.permanent, 1) + assert.Equal(t, mc.reqCounter.success, 0) + assert.Equal(t, mc.reqCounter.total, 1) + +} + +func TestConsumeLogsSuccess(t *testing.T) { + mc := newMockConsumer(func() error { return nil }) + validData := createLog("logId") + err := mc.ConsumeLogs(context.Background(), validData) + if err != nil { + return + } + assert.Equal(t, mc.reqCounter.error.nonpermanent, 0) + assert.Equal(t, mc.reqCounter.error.permanent, 0) + assert.Equal(t, mc.reqCounter.success, 1) + assert.Equal(t, mc.reqCounter.total, 1) + +} + +func TestConsumeTracesNonPermanent(t *testing.T) { + mc := newMockConsumer(returnNonPermanentError) + validData := createTrace("traceId") + err := mc.ConsumeTraces(context.Background(), validData) + if err != nil { + return + } + assert.Equal(t, mc.reqCounter.error.nonpermanent, 1) + assert.Equal(t, mc.reqCounter.error.permanent, 0) + assert.Equal(t, mc.reqCounter.success, 0) + assert.Equal(t, mc.reqCounter.total, 1) + +} + +func TestConsumeTracesPermanent(t *testing.T) { + + mc := newMockConsumer(returnPermanentError) + validData := createTrace("traceId") + err := mc.ConsumeTraces(context.Background(), validData) + if err != nil { + return + } + assert.Equal(t, mc.reqCounter.error.nonpermanent, 0) + assert.Equal(t, mc.reqCounter.error.permanent, 1) + assert.Equal(t, mc.reqCounter.success, 0) + assert.Equal(t, mc.reqCounter.total, 1) + +} + +func TestConsumeTracesSuccess(t *testing.T) { + mc := newMockConsumer(func() error { return nil }) + validData := createTrace("traceId") + err := mc.ConsumeTraces(context.Background(), validData) + if err != nil { + return + } + assert.Equal(t, mc.reqCounter.error.nonpermanent, 0) + assert.Equal(t, mc.reqCounter.error.permanent, 0) + assert.Equal(t, mc.reqCounter.success, 1) + assert.Equal(t, mc.reqCounter.total, 1) + +} +func TestConsumeMetricsNonPermanent(t *testing.T) { + mc := newMockConsumer(returnNonPermanentError) + validData := createMetric("metricId") + err := mc.ConsumeMetrics(context.Background(), validData) + if err != nil { + return + } + assert.Equal(t, mc.reqCounter.error.nonpermanent, 1) + assert.Equal(t, mc.reqCounter.error.permanent, 0) + assert.Equal(t, mc.reqCounter.success, 0) + assert.Equal(t, mc.reqCounter.total, 1) + +} + +func TestConsumeMetricsPermanent(t *testing.T) { + mc := newMockConsumer(returnPermanentError) + validData := createMetric("metricId") + err := mc.ConsumeMetrics(context.Background(), validData) + if err != nil { + return + } + assert.Equal(t, mc.reqCounter.error.nonpermanent, 0) + assert.Equal(t, mc.reqCounter.error.permanent, 1) + assert.Equal(t, mc.reqCounter.success, 0) + assert.Equal(t, mc.reqCounter.total, 1) + +} + +func TestConsumeMetricsSuccess(t *testing.T) { + mc := newMockConsumer(func() error { return nil }) + validData := createMetric("metricId") + err := mc.ConsumeMetrics(context.Background(), validData) + if err != nil { + return + } + assert.Equal(t, mc.reqCounter.error.nonpermanent, 0) + assert.Equal(t, mc.reqCounter.error.permanent, 0) + assert.Equal(t, mc.reqCounter.success, 1) + assert.Equal(t, mc.reqCounter.total, 1) + +} + +func TestCapabilites(t *testing.T) { + mc := newMockConsumer(func() error { return nil }) + assert.Equal(t, mc.Capabilities(), consumer.Capabilities{}) +} diff --git a/exporter/exportertest/nop_exporter.go b/exporter/exportertest/nop_exporter.go index 676e8e04d96..e7e9f350331 100644 --- a/exporter/exportertest/nop_exporter.go +++ b/exporter/exportertest/nop_exporter.go @@ -12,11 +12,12 @@ import ( "go.opentelemetry.io/collector/exporter" ) -const typeStr = "nop" +var nopType = component.MustNewType("nop") // NewNopCreateSettings returns a new nop settings for Create*Exporter functions. func NewNopCreateSettings() exporter.CreateSettings { return exporter.CreateSettings{ + ID: component.NewID(nopType), TelemetrySettings: componenttest.NewNopTelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo(), } @@ -25,7 +26,7 @@ func NewNopCreateSettings() exporter.CreateSettings { // NewNopFactory returns an exporter.Factory that constructs nop exporters. func NewNopFactory() exporter.Factory { return exporter.NewFactory( - "nop", + nopType, func() component.Config { return &nopConfig{} }, exporter.WithTraces(createTracesExporter, component.StabilityLevelStable), exporter.WithMetrics(createMetricsExporter, component.StabilityLevelStable), @@ -62,14 +63,6 @@ type nopExporter struct { func NewNopBuilder() *exporter.Builder { nopFactory := NewNopFactory() return exporter.NewBuilder( - map[component.ID]component.Config{component.NewID(typeStr): nopFactory.CreateDefaultConfig()}, - map[component.Type]exporter.Factory{typeStr: nopFactory}) -} - -func NewCreateSettings(id component.ID, set component.TelemetrySettings) exporter.CreateSettings { - return exporter.CreateSettings{ - ID: id, - TelemetrySettings: set, - BuildInfo: component.NewDefaultBuildInfo(), - } + map[component.ID]component.Config{component.NewID(nopType): nopFactory.CreateDefaultConfig()}, + map[component.Type]exporter.Factory{nopType: nopFactory}) } diff --git a/exporter/exportertest/nop_exporter_test.go b/exporter/exportertest/nop_exporter_test.go index ed7a36bc062..6ae95efc08d 100644 --- a/exporter/exportertest/nop_exporter_test.go +++ b/exporter/exportertest/nop_exporter_test.go @@ -20,7 +20,7 @@ import ( func TestNewNopFactory(t *testing.T) { factory := NewNopFactory() require.NotNil(t, factory) - assert.Equal(t, component.Type("nop"), factory.Type()) + assert.Equal(t, component.MustNewType("nop"), factory.Type()) cfg := factory.CreateDefaultConfig() assert.Equal(t, &nopConfig{}, cfg) @@ -50,7 +50,7 @@ func TestNewNopBuilder(t *testing.T) { factory := NewNopFactory() cfg := factory.CreateDefaultConfig() set := NewNopCreateSettings() - set.ID = component.NewID(typeStr) + set.ID = component.NewID(nopType) traces, err := factory.CreateTracesExporter(context.Background(), set, cfg) require.NoError(t, err) diff --git a/exporter/exportertest/package_test.go b/exporter/exportertest/package_test.go new file mode 100644 index 00000000000..8fa8a72b85f --- /dev/null +++ b/exporter/exportertest/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package exportertest + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/go.mod b/exporter/go.mod index 7800ed9ab57..e353c8a8bd8 100644 --- a/exporter/go.mod +++ b/exporter/go.mod @@ -1,66 +1,58 @@ module go.opentelemetry.io/collector/exporter -go 1.20 +go 1.21 require ( github.com/cenkalti/backoff/v4 v4.2.1 github.com/stretchr/testify v1.8.4 - go.opencensus.io v0.24.0 - go.opentelemetry.io/collector v0.85.0 - go.opentelemetry.io/collector/component v0.85.0 - go.opentelemetry.io/collector/config/configtelemetry v0.85.0 - go.opentelemetry.io/collector/consumer v0.85.0 - go.opentelemetry.io/collector/extension v0.85.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0014 - go.opentelemetry.io/otel v1.18.0 - go.opentelemetry.io/otel/metric v1.18.0 - go.opentelemetry.io/otel/sdk v1.18.0 - go.opentelemetry.io/otel/sdk/metric v0.41.0 - go.opentelemetry.io/otel/trace v1.18.0 + go.opentelemetry.io/collector v0.96.0 + go.opentelemetry.io/collector/component v0.96.0 + go.opentelemetry.io/collector/config/configretry v0.96.0 + go.opentelemetry.io/collector/config/configtelemetry v0.96.0 + go.opentelemetry.io/collector/consumer v0.96.0 + go.opentelemetry.io/collector/extension v0.96.0 + go.opentelemetry.io/collector/pdata v1.3.0 + go.opentelemetry.io/collector/receiver v0.96.0 + go.opentelemetry.io/otel v1.24.0 + go.opentelemetry.io/otel/metric v1.24.0 + go.opentelemetry.io/otel/sdk v1.24.0 + go.opentelemetry.io/otel/trace v1.24.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 - golang.org/x/sys v0.12.0 + go.uber.org/zap v1.27.0 + golang.org/x/sys v0.17.0 + google.golang.org/grpc v1.62.0 ) require ( - contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.0.1 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.16.0 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect - github.com/prometheus/statsd_exporter v0.22.7 // indirect - go.opentelemetry.io/collector/confmap v0.85.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0014 // indirect - go.opentelemetry.io/collector/processor v0.85.0 // indirect - go.opentelemetry.io/collector/receiver v0.85.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.41.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/grpc v1.58.1 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/confmap v0.96.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -74,24 +66,14 @@ replace go.opentelemetry.io/collector/consumer => ../consumer replace go.opentelemetry.io/collector/extension => ../extension -replace go.opentelemetry.io/collector/extension/zpagesextension => ../extension/zpagesextension - replace go.opentelemetry.io/collector/featuregate => ../featuregate replace go.opentelemetry.io/collector/pdata => ../pdata -replace go.opentelemetry.io/collector/processor => ../processor - replace go.opentelemetry.io/collector/receiver => ../receiver -replace go.opentelemetry.io/collector/semconv => ../semconv - retract v0.76.0 // Depends on retracted pdata v1.0.0-rc10 module -replace go.opentelemetry.io/collector/connector => ../connector - -replace go.opentelemetry.io/collector/config/confignet => ../config/confignet +replace go.opentelemetry.io/collector/config/configretry => ../config/configretry replace go.opentelemetry.io/collector/config/configtelemetry => ../config/configtelemetry - -replace go.opentelemetry.io/collector/service => ../service diff --git a/exporter/go.sum b/exporter/go.sum index 1e7d2abfab4..dbdb92fd3bb 100644 --- a/exporter/go.sum +++ b/exporter/go.sum @@ -1,583 +1,128 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= 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= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= -github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 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/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= -github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -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/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= -go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= -go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/exporters/prometheus v0.41.0 h1:A3/bhjP5SmELy8dcpK+uttHeh9Qrh+YnS16/VzrztRQ= -go.opentelemetry.io/otel/exporters/prometheus v0.41.0/go.mod h1:mKuXEMi9suyyNJQ99SZCO0mpWGFe0MIALtjd3r6uo7Q= -go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= -go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= -go.opentelemetry.io/otel/sdk v1.18.0 h1:e3bAB0wB3MljH38sHzpV/qWrOTCFrdZF2ct9F8rBkcY= -go.opentelemetry.io/otel/sdk v1.18.0/go.mod h1:1RCygWV7plY2KmdskZEDDBs4tJeHG92MdHZIluiYs/M= -go.opentelemetry.io/otel/sdk/metric v0.41.0 h1:c3sAt9/pQ5fSIUfl0gPtClV3HhE18DCVzByD33R/zsk= -go.opentelemetry.io/otel/sdk/metric v0.41.0/go.mod h1:PmOmSt+iOklKtIg5O4Vz9H/ttcRFSNTgii+E1KGyn1w= -go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= -go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/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-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.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/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= -google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +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= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/exporter/internal/common/package_test.go b/exporter/internal/common/package_test.go new file mode 100644 index 00000000000..abc80d8f317 --- /dev/null +++ b/exporter/internal/common/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package common + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/internal/experr/err.go b/exporter/internal/experr/err.go new file mode 100644 index 00000000000..6bff64b162d --- /dev/null +++ b/exporter/internal/experr/err.go @@ -0,0 +1,27 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package experr // import "go.opentelemetry.io/collector/exporter/internal/experr" + +import "errors" + +type shutdownErr struct { + err error +} + +func NewShutdownErr(err error) error { + return shutdownErr{err: err} +} + +func (s shutdownErr) Error() string { + return "interrupted due to shutdown: " + s.err.Error() +} + +func (s shutdownErr) Unwrap() error { + return s.err +} + +func IsShutdownErr(err error) bool { + var sdErr shutdownErr + return errors.As(err, &sdErr) +} diff --git a/exporter/internal/experr/err_test.go b/exporter/internal/experr/err_test.go new file mode 100644 index 00000000000..ac0580025e5 --- /dev/null +++ b/exporter/internal/experr/err_test.go @@ -0,0 +1,24 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package experr + +import ( + "errors" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestNewShutdownErr(t *testing.T) { + err := NewShutdownErr(errors.New("some error")) + assert.Equal(t, "interrupted due to shutdown: some error", err.Error()) +} + +func TestIsShutdownErr(t *testing.T) { + err := errors.New("testError") + require.False(t, IsShutdownErr(err)) + err = NewShutdownErr(err) + require.True(t, IsShutdownErr(err)) +} diff --git a/exporter/internal/otlptext/known_sync_error.go b/exporter/internal/otlptext/known_sync_error.go index 06d5913ad2b..3745fea0e79 100644 --- a/exporter/internal/otlptext/known_sync_error.go +++ b/exporter/internal/otlptext/known_sync_error.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build linux || darwin -// +build linux darwin package otlptext // import "go.opentelemetry.io/collector/exporter/internal/otlptext" diff --git a/exporter/internal/otlptext/known_sync_error_other.go b/exporter/internal/otlptext/known_sync_error_other.go index ab8a343f877..6c9f10f8ad0 100644 --- a/exporter/internal/otlptext/known_sync_error_other.go +++ b/exporter/internal/otlptext/known_sync_error_other.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build !linux && !darwin && !windows -// +build !linux,!darwin,!windows package otlptext // import "go.opentelemetry.io/collector/exporter/internal/otlptext" diff --git a/exporter/internal/otlptext/known_sync_error_windows.go b/exporter/internal/otlptext/known_sync_error_windows.go index 780f9e65350..b7e0dc472d7 100644 --- a/exporter/internal/otlptext/known_sync_error_windows.go +++ b/exporter/internal/otlptext/known_sync_error_windows.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build windows -// +build windows package otlptext // import "go.opentelemetry.io/collector/exporter/internal/otlptext" diff --git a/exporter/internal/otlptext/package_test.go b/exporter/internal/otlptext/package_test.go new file mode 100644 index 00000000000..bdffd4818e1 --- /dev/null +++ b/exporter/internal/otlptext/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otlptext + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/internal/queue/bounded_memory_queue.go b/exporter/internal/queue/bounded_memory_queue.go new file mode 100644 index 00000000000..9f85e8496bf --- /dev/null +++ b/exporter/internal/queue/bounded_memory_queue.go @@ -0,0 +1,70 @@ +// Copyright The OpenTelemetry Authors +// Copyright (c) 2019 The Jaeger Authors. +// Copyright (c) 2017 Uber Technologies, Inc. +// SPDX-License-Identifier: Apache-2.0 + +package queue // import "go.opentelemetry.io/collector/exporter/internal/queue" + +import ( + "context" + + "go.opentelemetry.io/collector/component" +) + +// boundedMemoryQueue implements a producer-consumer exchange similar to a ring buffer queue, +// where the queue is bounded and if it fills up due to slow consumers, the new items written by +// the producer are dropped. +type boundedMemoryQueue[T any] struct { + component.StartFunc + *queueCapacityLimiter[T] + items chan queueRequest[T] +} + +// MemoryQueueSettings defines internal parameters for boundedMemoryQueue creation. +type MemoryQueueSettings[T any] struct { + Sizer Sizer[T] + Capacity int +} + +// NewBoundedMemoryQueue constructs the new queue of specified capacity, and with an optional +// callback for dropped items (e.g. useful to emit metrics). +func NewBoundedMemoryQueue[T any](set MemoryQueueSettings[T]) Queue[T] { + return &boundedMemoryQueue[T]{ + queueCapacityLimiter: newQueueCapacityLimiter[T](set.Sizer, set.Capacity), + items: make(chan queueRequest[T], set.Capacity), + } +} + +// Offer is used by the producer to submit new item to the queue. Calling this method on a stopped queue will panic. +func (q *boundedMemoryQueue[T]) Offer(ctx context.Context, req T) error { + if !q.queueCapacityLimiter.claim(req) { + return ErrQueueIsFull + } + q.items <- queueRequest[T]{ctx: ctx, req: req} + return nil +} + +// Consume applies the provided function on the head of queue. +// The call blocks until there is an item available or the queue is stopped. +// The function returns true when an item is consumed or false if the queue is stopped and emptied. +func (q *boundedMemoryQueue[T]) Consume(consumeFunc func(context.Context, T) error) bool { + item, ok := <-q.items + if !ok { + return false + } + q.queueCapacityLimiter.release(item.req) + // the memory queue doesn't handle consume errors + _ = consumeFunc(item.ctx, item.req) + return true +} + +// Shutdown closes the queue channel to initiate draining of the queue. +func (q *boundedMemoryQueue[T]) Shutdown(context.Context) error { + close(q.items) + return nil +} + +type queueRequest[T any] struct { + req T + ctx context.Context +} diff --git a/exporter/internal/queue/bounded_memory_queue_test.go b/exporter/internal/queue/bounded_memory_queue_test.go new file mode 100644 index 00000000000..d861893eda9 --- /dev/null +++ b/exporter/internal/queue/bounded_memory_queue_test.go @@ -0,0 +1,158 @@ +// Copyright The OpenTelemetry Authors +// Copyright (c) 2019 The Jaeger Authors. +// Copyright (c) 2017 Uber Technologies, Inc. +// SPDX-License-Identifier: Apache-2.0 + +package queue + +import ( + "context" + "strconv" + "sync" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/component/componenttest" +) + +// In this test we run a queue with capacity 1 and a single consumer. +// We want to test the overflow behavior, so we block the consumer +// by holding a startLock before submitting items to the queue. +func TestBoundedQueue(t *testing.T) { + q := NewBoundedMemoryQueue[string](MemoryQueueSettings[string]{Sizer: &RequestSizer[string]{}, Capacity: 1}) + + assert.NoError(t, q.Offer(context.Background(), "a")) + + numConsumed := 0 + assert.True(t, q.Consume(func(_ context.Context, item string) error { + assert.Equal(t, "a", item) + numConsumed++ + return nil + })) + assert.Equal(t, 1, numConsumed) + assert.Equal(t, 0, q.Size()) + + // produce two more items. The first one should be accepted, but not consumed. + assert.NoError(t, q.Offer(context.Background(), "b")) + assert.Equal(t, 1, q.Size()) + + // the second should be rejected since the queue is full + assert.ErrorIs(t, q.Offer(context.Background(), "c"), ErrQueueIsFull) + assert.Equal(t, 1, q.Size()) + + assert.True(t, q.Consume(func(_ context.Context, item string) error { + assert.Equal(t, "b", item) + numConsumed++ + return nil + })) + assert.Equal(t, 2, numConsumed) + + for _, toAddItem := range []string{"d", "e", "f"} { + assert.NoError(t, q.Offer(context.Background(), toAddItem)) + assert.True(t, q.Consume(func(_ context.Context, item string) error { + assert.Equal(t, toAddItem, item) + numConsumed++ + return nil + })) + } + assert.Equal(t, 5, numConsumed) + assert.NoError(t, q.Shutdown(context.Background())) + assert.False(t, q.Consume(func(_ context.Context, item string) error { + panic(item) + })) +} + +// In this test we run a queue with many items and a slow consumer. +// When the queue is stopped, the remaining items should be processed. +// Due to the way q.Stop() waits for all consumers to finish, the +// same lock strategy use above will not work, as calling Unlock +// only after Stop will mean the consumers are still locked while +// trying to perform the final consumptions. +func TestShutdownWhileNotEmpty(t *testing.T) { + q := NewBoundedMemoryQueue[string](MemoryQueueSettings[string]{Sizer: &RequestSizer[string]{}, Capacity: 1000}) + + assert.NoError(t, q.Start(context.Background(), componenttest.NewNopHost())) + for i := 0; i < 10; i++ { + assert.NoError(t, q.Offer(context.Background(), strconv.FormatInt(int64(i), 10))) + } + assert.NoError(t, q.Shutdown(context.Background())) + + assert.Equal(t, 10, q.Size()) + numConsumed := 0 + for i := 0; i < 10; i++ { + assert.True(t, q.Consume(func(_ context.Context, item string) error { + assert.Equal(t, strconv.FormatInt(int64(i), 10), item) + numConsumed++ + return nil + })) + } + assert.Equal(t, 10, numConsumed) + assert.Equal(t, 0, q.Size()) + + assert.False(t, q.Consume(func(_ context.Context, item string) error { + panic(item) + })) +} + +func Benchmark_QueueUsage_1000_requests(b *testing.B) { + benchmarkQueueUsage(b, &RequestSizer[fakeReq]{}, 1000) +} + +func Benchmark_QueueUsage_100000_requests(b *testing.B) { + benchmarkQueueUsage(b, &RequestSizer[fakeReq]{}, 100000) +} + +func Benchmark_QueueUsage_10000_items(b *testing.B) { + // each request has 10 items: 1000 requests = 10000 items + benchmarkQueueUsage(b, &ItemsSizer[fakeReq]{}, 1000) +} + +func Benchmark_QueueUsage_1M_items(b *testing.B) { + // each request has 10 items: 100000 requests = 1M items + benchmarkQueueUsage(b, &ItemsSizer[fakeReq]{}, 100000) +} + +func TestQueueUsage(t *testing.T) { + t.Run("requests_based", func(t *testing.T) { + queueUsage(t, &RequestSizer[fakeReq]{}, 10) + }) + t.Run("items_based", func(t *testing.T) { + queueUsage(t, &ItemsSizer[fakeReq]{}, 10) + }) +} + +func benchmarkQueueUsage(b *testing.B, sizer Sizer[fakeReq], requestsCount int) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + queueUsage(b, sizer, requestsCount) + } +} + +func queueUsage(tb testing.TB, sizer Sizer[fakeReq], requestsCount int) { + var wg sync.WaitGroup + wg.Add(requestsCount) + q := NewBoundedMemoryQueue[fakeReq](MemoryQueueSettings[fakeReq]{Sizer: sizer, Capacity: 10 * requestsCount}) + consumers := NewQueueConsumers(q, 1, func(context.Context, fakeReq) error { + wg.Done() + return nil + }) + require.NoError(tb, consumers.Start(context.Background(), componenttest.NewNopHost())) + for j := 0; j < requestsCount; j++ { + require.NoError(tb, q.Offer(context.Background(), fakeReq{10})) + } + assert.NoError(tb, consumers.Shutdown(context.Background())) + wg.Wait() +} + +func TestZeroSizeNoConsumers(t *testing.T) { + q := NewBoundedMemoryQueue[string](MemoryQueueSettings[string]{Sizer: &RequestSizer[string]{}, Capacity: 0}) + + err := q.Start(context.Background(), componenttest.NewNopHost()) + assert.NoError(t, err) + + assert.ErrorIs(t, q.Offer(context.Background(), "a"), ErrQueueIsFull) // in process + + assert.NoError(t, q.Shutdown(context.Background())) +} diff --git a/exporter/internal/queue/consumers.go b/exporter/internal/queue/consumers.go new file mode 100644 index 00000000000..7c57fea9620 --- /dev/null +++ b/exporter/internal/queue/consumers.go @@ -0,0 +1,61 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package queue // import "go.opentelemetry.io/collector/exporter/internal/queue" + +import ( + "context" + "sync" + + "go.opentelemetry.io/collector/component" +) + +type Consumers[T any] struct { + queue Queue[T] + numConsumers int + consumeFunc func(context.Context, T) error + stopWG sync.WaitGroup +} + +func NewQueueConsumers[T any](q Queue[T], numConsumers int, consumeFunc func(context.Context, T) error) *Consumers[T] { + return &Consumers[T]{ + queue: q, + numConsumers: numConsumers, + consumeFunc: consumeFunc, + stopWG: sync.WaitGroup{}, + } +} + +// Start ensures that queue and all consumers are started. +func (qc *Consumers[T]) Start(ctx context.Context, host component.Host) error { + if err := qc.queue.Start(ctx, host); err != nil { + return err + } + + var startWG sync.WaitGroup + for i := 0; i < qc.numConsumers; i++ { + qc.stopWG.Add(1) + startWG.Add(1) + go func() { + startWG.Done() + defer qc.stopWG.Done() + for { + if !qc.queue.Consume(qc.consumeFunc) { + return + } + } + }() + } + startWG.Wait() + + return nil +} + +// Shutdown ensures that queue and all consumers are stopped. +func (qc *Consumers[T]) Shutdown(ctx context.Context) error { + if err := qc.queue.Shutdown(ctx); err != nil { + return err + } + qc.stopWG.Wait() + return nil +} diff --git a/exporter/internal/queue/mock_storage.go b/exporter/internal/queue/mock_storage.go new file mode 100644 index 00000000000..6ef9810529b --- /dev/null +++ b/exporter/internal/queue/mock_storage.go @@ -0,0 +1,244 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package queue // import "go.opentelemetry.io/collector/exporter/internal/queue" + +import ( + "context" + "errors" + "fmt" + "sync" + "sync/atomic" + "syscall" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/extension/experimental/storage" +) + +type mockStorageExtension struct { + component.StartFunc + component.ShutdownFunc + st sync.Map + getClientError error +} + +func (m *mockStorageExtension) GetClient(context.Context, component.Kind, component.ID, string) (storage.Client, error) { + if m.getClientError != nil { + return nil, m.getClientError + } + return &mockStorageClient{st: &m.st, closed: &atomic.Bool{}}, nil +} + +func NewMockStorageExtension(getClientError error) storage.Extension { + return &mockStorageExtension{getClientError: getClientError} +} + +type mockStorageClient struct { + st *sync.Map + closed *atomic.Bool +} + +func (m *mockStorageClient) Get(ctx context.Context, s string) ([]byte, error) { + getOp := storage.GetOperation(s) + err := m.Batch(ctx, getOp) + return getOp.Value, err +} + +func (m *mockStorageClient) Set(ctx context.Context, s string, bytes []byte) error { + return m.Batch(ctx, storage.SetOperation(s, bytes)) +} + +func (m *mockStorageClient) Delete(ctx context.Context, s string) error { + return m.Batch(ctx, storage.DeleteOperation(s)) +} + +func (m *mockStorageClient) Close(context.Context) error { + m.closed.Store(true) + return nil +} + +func (m *mockStorageClient) Batch(_ context.Context, ops ...storage.Operation) error { + if m.isClosed() { + panic("client already closed") + } + for _, op := range ops { + switch op.Type { + case storage.Get: + val, found := m.st.Load(op.Key) + if !found { + break + } + op.Value = val.([]byte) + case storage.Set: + m.st.Store(op.Key, op.Value) + case storage.Delete: + m.st.Delete(op.Key) + default: + return errors.New("wrong operation type") + } + } + + return nil +} + +func (m *mockStorageClient) isClosed() bool { + return m.closed.Load() +} + +func newFakeBoundedStorageClient(maxSizeInBytes int) *fakeBoundedStorageClient { + return &fakeBoundedStorageClient{ + st: map[string][]byte{}, + MaxSizeInBytes: maxSizeInBytes, + } +} + +// this storage client mimics the behavior of actual storage engines with limited storage space available +// in general, real storage engines often have a per-write-transaction storage overhead, needing to keep +// both the old and the new value stored until the transaction is committed +// this is useful for testing the persistent queue queue behavior with a full disk +type fakeBoundedStorageClient struct { + MaxSizeInBytes int + st map[string][]byte + sizeInBytes int + mux sync.Mutex +} + +func (m *fakeBoundedStorageClient) Get(ctx context.Context, key string) ([]byte, error) { + op := storage.GetOperation(key) + if err := m.Batch(ctx, op); err != nil { + return nil, err + } + + return op.Value, nil +} + +func (m *fakeBoundedStorageClient) Set(ctx context.Context, key string, value []byte) error { + return m.Batch(ctx, storage.SetOperation(key, value)) +} + +func (m *fakeBoundedStorageClient) Delete(ctx context.Context, key string) error { + return m.Batch(ctx, storage.DeleteOperation(key)) +} + +func (m *fakeBoundedStorageClient) Close(context.Context) error { + return nil +} + +func (m *fakeBoundedStorageClient) Batch(_ context.Context, ops ...storage.Operation) error { + m.mux.Lock() + defer m.mux.Unlock() + + totalAdded, totalRemoved := m.getTotalSizeChange(ops) + + // the assumption here is that the new data needs to coexist with the old data on disk + // for the transaction to succeed + // this seems to be true for the file storage extension at least + if m.sizeInBytes+totalAdded > m.MaxSizeInBytes { + return fmt.Errorf("insufficient space available: %w", syscall.ENOSPC) + } + + for _, op := range ops { + switch op.Type { + case storage.Get: + op.Value = m.st[op.Key] + case storage.Set: + m.st[op.Key] = op.Value + case storage.Delete: + delete(m.st, op.Key) + default: + return errors.New("wrong operation type") + } + } + + m.sizeInBytes += totalAdded - totalRemoved + + return nil +} + +func (m *fakeBoundedStorageClient) SetMaxSizeInBytes(newMaxSize int) { + m.mux.Lock() + defer m.mux.Unlock() + m.MaxSizeInBytes = newMaxSize +} + +func (m *fakeBoundedStorageClient) GetSizeInBytes() int { + m.mux.Lock() + defer m.mux.Unlock() + return m.sizeInBytes +} + +func (m *fakeBoundedStorageClient) getTotalSizeChange(ops []storage.Operation) (totalAdded int, totalRemoved int) { + totalAdded, totalRemoved = 0, 0 + for _, op := range ops { + switch op.Type { + case storage.Set: + if oldValue, ok := m.st[op.Key]; ok { + totalRemoved += len(oldValue) + } else { + totalAdded += len(op.Key) + } + totalAdded += len(op.Value) + case storage.Delete: + if value, ok := m.st[op.Key]; ok { + totalRemoved += len(op.Key) + totalRemoved += len(value) + } + default: + } + } + return totalAdded, totalRemoved +} + +func newFakeStorageClientWithErrors(errors []error) *fakeStorageClientWithErrors { + return &fakeStorageClientWithErrors{ + errors: errors, + } +} + +// this storage client just returns errors from a list in order +// used for testing error handling +type fakeStorageClientWithErrors struct { + errors []error + nextErrorIndex int + mux sync.Mutex +} + +func (m *fakeStorageClientWithErrors) Get(ctx context.Context, key string) ([]byte, error) { + op := storage.GetOperation(key) + err := m.Batch(ctx, op) + if err != nil { + return nil, err + } + + return op.Value, nil +} + +func (m *fakeStorageClientWithErrors) Set(ctx context.Context, key string, value []byte) error { + return m.Batch(ctx, storage.SetOperation(key, value)) +} + +func (m *fakeStorageClientWithErrors) Delete(ctx context.Context, key string) error { + return m.Batch(ctx, storage.DeleteOperation(key)) +} + +func (m *fakeStorageClientWithErrors) Close(context.Context) error { + return nil +} + +func (m *fakeStorageClientWithErrors) Batch(context.Context, ...storage.Operation) error { + m.mux.Lock() + defer m.mux.Unlock() + + if m.nextErrorIndex >= len(m.errors) { + return nil + } + + m.nextErrorIndex++ + return m.errors[m.nextErrorIndex-1] +} + +func (m *fakeStorageClientWithErrors) Reset() { + m.mux.Lock() + defer m.mux.Unlock() + m.nextErrorIndex = 0 +} diff --git a/exporter/internal/queue/package_test.go b/exporter/internal/queue/package_test.go new file mode 100644 index 00000000000..e73f51264a8 --- /dev/null +++ b/exporter/internal/queue/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package queue + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/internal/queue/persistent_queue.go b/exporter/internal/queue/persistent_queue.go new file mode 100644 index 00000000000..b6e5d2be4dd --- /dev/null +++ b/exporter/internal/queue/persistent_queue.go @@ -0,0 +1,573 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package queue // import "go.opentelemetry.io/collector/exporter/internal/queue" + +import ( + "context" + "encoding/binary" + "errors" + "fmt" + "strconv" + "sync" + "sync/atomic" + + "go.uber.org/multierr" + "go.uber.org/zap" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/internal/experr" + "go.opentelemetry.io/collector/extension/experimental/storage" +) + +// persistentQueue provides a persistent queue implementation backed by file storage extension +// +// Write index describes the position at which next item is going to be stored. +// Read index describes which item needs to be read next. +// When Write index = Read index, no elements are in the queue. +// +// The items currently dispatched by consumers are not deleted until the processing is finished. +// Their list is stored under a separate key. +// +// ┌───────file extension-backed queue───────┐ +// │ │ +// │ ┌───┐ ┌───┐ ┌───┐ ┌───┐ ┌───┐ │ +// │ n+1 │ n │ ... │ 4 │ │ 3 │ │ 2 │ │ 1 │ │ +// │ └───┘ └───┘ └─x─┘ └─|─┘ └─x─┘ │ +// │ x | x │ +// └───────────────────────x─────|─────x─────┘ +// ▲ ▲ x | x +// │ │ x | xxxx deleted +// │ │ x | +// write read x └── currently dispatched item +// index index x +// xxxx deleted +type persistentQueue[T any] struct { + *queueCapacityLimiter[T] + + set PersistentQueueSettings[T] + logger *zap.Logger + client storage.Client + + // isRequestSized indicates whether the queue is sized by the number of requests. + isRequestSized bool + + putChan chan struct{} + + // mu guards everything declared below. + mu sync.Mutex + readIndex uint64 + writeIndex uint64 + initIndexSize uint64 + initQueueSize *atomic.Uint64 + currentlyDispatchedItems []uint64 + refClient int64 + stopped bool +} + +const ( + zapKey = "key" + zapErrorCount = "errorCount" + zapNumberOfItems = "numberOfItems" + + readIndexKey = "ri" + writeIndexKey = "wi" + currentlyDispatchedItemsKey = "di" + queueSizeKey = "si" +) + +var ( + errValueNotSet = errors.New("value not set") + errInvalidValue = errors.New("invalid value") + errNoStorageClient = errors.New("no storage client extension found") + errWrongExtensionType = errors.New("requested extension is not a storage extension") +) + +type PersistentQueueSettings[T any] struct { + Sizer Sizer[T] + Capacity int + DataType component.DataType + StorageID component.ID + Marshaler func(req T) ([]byte, error) + Unmarshaler func([]byte) (T, error) + ExporterSettings exporter.CreateSettings +} + +// NewPersistentQueue creates a new queue backed by file storage; name and signal must be a unique combination that identifies the queue storage +func NewPersistentQueue[T any](set PersistentQueueSettings[T]) Queue[T] { + _, isRequestSized := set.Sizer.(*RequestSizer[T]) + return &persistentQueue[T]{ + queueCapacityLimiter: newQueueCapacityLimiter[T](set.Sizer, set.Capacity), + set: set, + logger: set.ExporterSettings.Logger, + initQueueSize: &atomic.Uint64{}, + isRequestSized: isRequestSized, + putChan: make(chan struct{}, set.Capacity), + } +} + +// Start starts the persistentQueue with the given number of consumers. +func (pq *persistentQueue[T]) Start(ctx context.Context, host component.Host) error { + storageClient, err := toStorageClient(ctx, pq.set.StorageID, host, pq.set.ExporterSettings.ID, pq.set.DataType) + if err != nil { + return err + } + pq.initClient(ctx, storageClient) + return nil +} + +func (pq *persistentQueue[T]) initClient(ctx context.Context, client storage.Client) { + pq.client = client + // Start with a reference 1 which is the reference we use for the producer goroutines and initialization. + pq.refClient = 1 + pq.initPersistentContiguousStorage(ctx) + // Make sure the leftover requests are handled + pq.retrieveAndEnqueueNotDispatchedReqs(ctx) +} + +func (pq *persistentQueue[T]) initPersistentContiguousStorage(ctx context.Context) { + riOp := storage.GetOperation(readIndexKey) + wiOp := storage.GetOperation(writeIndexKey) + + err := pq.client.Batch(ctx, riOp, wiOp) + if err == nil { + pq.readIndex, err = bytesToItemIndex(riOp.Value) + } + + if err == nil { + pq.writeIndex, err = bytesToItemIndex(wiOp.Value) + } + + if err != nil { + if errors.Is(err, errValueNotSet) { + pq.logger.Info("Initializing new persistent queue") + } else { + pq.logger.Error("Failed getting read/write index, starting with new ones", zap.Error(err)) + } + pq.readIndex = 0 + pq.writeIndex = 0 + } + pq.initIndexSize = pq.writeIndex - pq.readIndex + + // Ensure the communication channel has the same size as the queue + for i := 0; i < int(pq.initIndexSize); i++ { + pq.putChan <- struct{}{} + } + + // Read snapshot of the queue size from storage. It's not a problem if the value cannot be fetched, + // or it's not accurate. The queue size will be corrected once the recovered queue is drained. + if pq.initIndexSize > 0 { + // If the queue is sized by the number of requests, no need to read the queue size from storage. + if pq.isRequestSized { + pq.initQueueSize.Store(pq.initIndexSize) + return + } + + res, err := pq.client.Get(ctx, queueSizeKey) + if err == nil { + var restoredQueueSize uint64 + restoredQueueSize, err = bytesToItemIndex(res) + pq.initQueueSize.Store(restoredQueueSize) + } + if err != nil { + if errors.Is(err, errValueNotSet) { + pq.logger.Warn("Cannot read the queue size snapshot from storage. "+ + "The reported queue size will be inaccurate until the initial queue is drained. "+ + "It's expected when the items sized queue enabled for the first time", zap.Error(err)) + } else { + pq.logger.Error("Failed to read the queue size snapshot from storage. "+ + "The reported queue size will be inaccurate until the initial queue is drained.", zap.Error(err)) + } + } + } +} + +// Consume applies the provided function on the head of queue. +// The call blocks until there is an item available or the queue is stopped. +// The function returns true when an item is consumed or false if the queue is stopped. +func (pq *persistentQueue[T]) Consume(consumeFunc func(context.Context, T) error) bool { + for { + // If we are stopped we still process all the other events in the channel before, but we + // return fast in the `getNextItem`, so we will free the channel fast and get to the stop. + _, ok := <-pq.putChan + if !ok { + return false + } + + req, onProcessingFinished, consumed := pq.getNextItem(context.Background()) + if consumed { + onProcessingFinished(consumeFunc(context.Background(), req)) + return true + } + } +} + +// Size returns the current size of the queue. +func (pq *persistentQueue[T]) Size() int { + return int(pq.initQueueSize.Load()) + pq.queueCapacityLimiter.Size() +} + +func (pq *persistentQueue[T]) Shutdown(ctx context.Context) error { + close(pq.putChan) + pq.mu.Lock() + defer pq.mu.Unlock() + // Mark this queue as stopped, so consumer don't start any more work. + pq.stopped = true + return multierr.Combine( + pq.backupQueueSize(ctx), + pq.unrefClient(ctx), + ) +} + +// backupQueueSize writes the current queue size to storage. The value is used to recover the queue size +// in case if the collector is killed. +func (pq *persistentQueue[T]) backupQueueSize(ctx context.Context) error { + // Client can be nil if the queue is not initialized yet. + if pq.client == nil { + return nil + } + + // No need to write the queue size if the queue is sized by the number of requests. + // That information is already stored as difference between read and write indexes. + if pq.isRequestSized { + return nil + } + + return pq.client.Set(ctx, queueSizeKey, itemIndexToBytes(uint64(pq.Size()))) +} + +// unrefClient unrefs the client, and closes if no more references. Callers MUST hold the mutex. +// This is needed because consumers of the queue may still process the requests while the queue is shutting down or immediately after. +func (pq *persistentQueue[T]) unrefClient(ctx context.Context) error { + pq.refClient-- + if pq.refClient == 0 { + return pq.client.Close(ctx) + } + return nil +} + +// Offer inserts the specified element into this queue if it is possible to do so immediately +// without violating capacity restrictions. If success returns no error. +// It returns ErrQueueIsFull if no space is currently available. +func (pq *persistentQueue[T]) Offer(ctx context.Context, req T) error { + pq.mu.Lock() + defer pq.mu.Unlock() + return pq.putInternal(ctx, req) +} + +// putInternal is the internal version that requires caller to hold the mutex lock. +func (pq *persistentQueue[T]) putInternal(ctx context.Context, req T) error { + if !pq.queueCapacityLimiter.claim(req) { + pq.logger.Warn("Maximum queue capacity reached") + return ErrQueueIsFull + } + + itemKey := getItemKey(pq.writeIndex) + newIndex := pq.writeIndex + 1 + + reqBuf, err := pq.set.Marshaler(req) + if err != nil { + pq.queueCapacityLimiter.release(req) + return err + } + + // Carry out a transaction where we both add the item and update the write index + ops := []storage.Operation{ + storage.SetOperation(writeIndexKey, itemIndexToBytes(newIndex)), + storage.SetOperation(itemKey, reqBuf), + } + if storageErr := pq.client.Batch(ctx, ops...); storageErr != nil { + pq.queueCapacityLimiter.release(req) + return storageErr + } + + pq.writeIndex = newIndex + // Inform the loop that there's some data to process + pq.putChan <- struct{}{} + + // Back up the queue size to storage every 10 writes. The stored value is used to recover the queue size + // in case if the collector is killed. The recovered queue size is allowed to be inaccurate. + if (pq.writeIndex % 10) == 5 { + if err := pq.backupQueueSize(ctx); err != nil { + pq.logger.Error("Error writing queue size to storage", zap.Error(err)) + } + } + + return nil +} + +// getNextItem pulls the next available item from the persistent storage along with a callback function that should be +// called after the item is processed to clean up the storage. If no new item is available, returns false. +func (pq *persistentQueue[T]) getNextItem(ctx context.Context) (T, func(error), bool) { + pq.mu.Lock() + defer pq.mu.Unlock() + + var request T + + if pq.stopped { + return request, nil, false + } + + if pq.readIndex == pq.writeIndex { + return request, nil, false + } + + index := pq.readIndex + // Increase here, so even if errors happen below, it always iterates + pq.readIndex++ + pq.currentlyDispatchedItems = append(pq.currentlyDispatchedItems, index) + getOp := storage.GetOperation(getItemKey(index)) + err := pq.client.Batch(ctx, + storage.SetOperation(readIndexKey, itemIndexToBytes(pq.readIndex)), + storage.SetOperation(currentlyDispatchedItemsKey, itemIndexArrayToBytes(pq.currentlyDispatchedItems)), + getOp) + + if err == nil { + request, err = pq.set.Unmarshaler(getOp.Value) + } + + if err != nil { + pq.logger.Debug("Failed to dispatch item", zap.Error(err)) + // We need to make sure that currently dispatched items list is cleaned + if err = pq.itemDispatchingFinish(ctx, index); err != nil { + pq.logger.Error("Error deleting item from queue", zap.Error(err)) + } + + return request, nil, false + } + + pq.releaseCapacity(request) + + // Back up the queue size to storage on every 10 reads. The stored value is used to recover the queue size + // in case if the collector is killed. The recovered queue size is allowed to be inaccurate. + if (pq.writeIndex % 10) == 0 { + if qsErr := pq.backupQueueSize(ctx); qsErr != nil { + pq.logger.Error("Error writing queue size to storage", zap.Error(err)) + } + } + + // Increase the reference count, so the client is not closed while the request is being processed. + // The client cannot be closed because we hold the lock since last we checked `stopped`. + pq.refClient++ + return request, func(consumeErr error) { + // Delete the item from the persistent storage after it was processed. + pq.mu.Lock() + // Always unref client even if the consumer is shutdown because we always ref it for every valid request. + defer func() { + if err = pq.unrefClient(ctx); err != nil { + pq.logger.Error("Error closing the storage client", zap.Error(err)) + } + pq.mu.Unlock() + }() + + if experr.IsShutdownErr(consumeErr) { + // The queue is shutting down, don't mark the item as dispatched, so it's picked up again after restart. + // TODO: Handle partially delivered requests by updating their values in the storage. + return + } + + if err = pq.itemDispatchingFinish(ctx, index); err != nil { + pq.logger.Error("Error deleting item from queue", zap.Error(err)) + } + + }, true +} + +// releaseCapacity releases the capacity of the queue. The caller must hold the mutex. +func (pq *persistentQueue[T]) releaseCapacity(req T) { + // If the recovered queue size is not emptied yet, decrease it first. + if pq.initIndexSize > 0 { + pq.initIndexSize-- + if pq.initIndexSize == 0 { + pq.initQueueSize.Store(0) + return + } + reqSize := pq.queueCapacityLimiter.sizeOf(req) + if pq.initQueueSize.Load() < reqSize { + pq.initQueueSize.Store(0) + return + } + pq.initQueueSize.Add(^(reqSize - 1)) + return + } + + // Otherwise, decrease the current queue size. + pq.queueCapacityLimiter.release(req) +} + +// retrieveAndEnqueueNotDispatchedReqs gets the items for which sending was not finished, cleans the storage +// and moves the items at the back of the queue. +func (pq *persistentQueue[T]) retrieveAndEnqueueNotDispatchedReqs(ctx context.Context) { + var dispatchedItems []uint64 + + pq.mu.Lock() + defer pq.mu.Unlock() + pq.logger.Debug("Checking if there are items left for dispatch by consumers") + itemKeysBuf, err := pq.client.Get(ctx, currentlyDispatchedItemsKey) + if err == nil { + dispatchedItems, err = bytesToItemIndexArray(itemKeysBuf) + } + if err != nil { + pq.logger.Error("Could not fetch items left for dispatch by consumers", zap.Error(err)) + return + } + + if len(dispatchedItems) == 0 { + pq.logger.Debug("No items left for dispatch by consumers") + return + } + + pq.logger.Info("Fetching items left for dispatch by consumers", zap.Int(zapNumberOfItems, + len(dispatchedItems))) + retrieveBatch := make([]storage.Operation, len(dispatchedItems)) + cleanupBatch := make([]storage.Operation, len(dispatchedItems)) + for i, it := range dispatchedItems { + key := getItemKey(it) + retrieveBatch[i] = storage.GetOperation(key) + cleanupBatch[i] = storage.DeleteOperation(key) + } + retrieveErr := pq.client.Batch(ctx, retrieveBatch...) + cleanupErr := pq.client.Batch(ctx, cleanupBatch...) + + if cleanupErr != nil { + pq.logger.Debug("Failed cleaning items left by consumers", zap.Error(cleanupErr)) + } + + if retrieveErr != nil { + pq.logger.Warn("Failed retrieving items left by consumers", zap.Error(retrieveErr)) + return + } + + errCount := 0 + for _, op := range retrieveBatch { + if op.Value == nil { + pq.logger.Warn("Failed retrieving item", zap.String(zapKey, op.Key), zap.Error(errValueNotSet)) + continue + } + req, err := pq.set.Unmarshaler(op.Value) + // If error happened or item is nil, it will be efficiently ignored + if err != nil { + pq.logger.Warn("Failed unmarshalling item", zap.String(zapKey, op.Key), zap.Error(err)) + continue + } + if pq.putInternal(ctx, req) != nil { + errCount++ + } + } + + if errCount > 0 { + pq.logger.Error("Errors occurred while moving items for dispatching back to queue", + zap.Int(zapNumberOfItems, len(retrieveBatch)), zap.Int(zapErrorCount, errCount)) + } else { + pq.logger.Info("Moved items for dispatching back to queue", + zap.Int(zapNumberOfItems, len(retrieveBatch))) + } +} + +// itemDispatchingFinish removes the item from the list of currently dispatched items and deletes it from the persistent queue +func (pq *persistentQueue[T]) itemDispatchingFinish(ctx context.Context, index uint64) error { + lenCDI := len(pq.currentlyDispatchedItems) + for i := 0; i < lenCDI; i++ { + if pq.currentlyDispatchedItems[i] == index { + pq.currentlyDispatchedItems[i] = pq.currentlyDispatchedItems[lenCDI-1] + pq.currentlyDispatchedItems = pq.currentlyDispatchedItems[:lenCDI-1] + break + } + } + + setOp := storage.SetOperation(currentlyDispatchedItemsKey, itemIndexArrayToBytes(pq.currentlyDispatchedItems)) + deleteOp := storage.DeleteOperation(getItemKey(index)) + if err := pq.client.Batch(ctx, setOp, deleteOp); err != nil { + // got an error, try to gracefully handle it + pq.logger.Warn("Failed updating currently dispatched items, trying to delete the item first", + zap.Error(err)) + } else { + // Everything ok, exit + return nil + } + + if err := pq.client.Batch(ctx, deleteOp); err != nil { + // Return an error here, as this indicates an issue with the underlying storage medium + return fmt.Errorf("failed deleting item from queue, got error from storage: %w", err) + } + + if err := pq.client.Batch(ctx, setOp); err != nil { + // even if this fails, we still have the right dispatched items in memory + // at worst, we'll have the wrong list in storage, and we'll discard the nonexistent items during startup + return fmt.Errorf("failed updating currently dispatched items, but deleted item successfully: %w", err) + } + + return nil +} + +func toStorageClient(ctx context.Context, storageID component.ID, host component.Host, ownerID component.ID, signal component.DataType) (storage.Client, error) { + ext, found := host.GetExtensions()[storageID] + if !found { + return nil, errNoStorageClient + } + + storageExt, ok := ext.(storage.Extension) + if !ok { + return nil, errWrongExtensionType + } + + return storageExt.GetClient(ctx, component.KindExporter, ownerID, signal.String()) +} + +func getItemKey(index uint64) string { + return strconv.FormatUint(index, 10) +} + +func itemIndexToBytes(value uint64) []byte { + return binary.LittleEndian.AppendUint64([]byte{}, value) +} + +func bytesToItemIndex(buf []byte) (uint64, error) { + if buf == nil { + return uint64(0), errValueNotSet + } + // The sizeof uint64 in binary is 8. + if len(buf) < 8 { + return 0, errInvalidValue + } + return binary.LittleEndian.Uint64(buf), nil +} + +func itemIndexArrayToBytes(arr []uint64) []byte { + size := len(arr) + buf := make([]byte, 0, 4+size*8) + buf = binary.LittleEndian.AppendUint32(buf, uint32(size)) + for _, item := range arr { + buf = binary.LittleEndian.AppendUint64(buf, item) + } + return buf +} + +func bytesToItemIndexArray(buf []byte) ([]uint64, error) { + if len(buf) == 0 { + return nil, nil + } + + // The sizeof uint32 in binary is 4. + if len(buf) < 4 { + return nil, errInvalidValue + } + size := int(binary.LittleEndian.Uint32(buf)) + if size == 0 { + return nil, nil + } + + buf = buf[4:] + // The sizeof uint64 in binary is 8, so we need to have size*8 bytes. + if len(buf) < size*8 { + return nil, errInvalidValue + } + + val := make([]uint64, size) + for i := 0; i < size; i++ { + val[i] = binary.LittleEndian.Uint64(buf) + buf = buf[8:] + } + return val, nil +} diff --git a/exporter/internal/queue/persistent_queue_test.go b/exporter/internal/queue/persistent_queue_test.go new file mode 100644 index 00000000000..2b525fa792f --- /dev/null +++ b/exporter/internal/queue/persistent_queue_test.go @@ -0,0 +1,884 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package queue + +import ( + "context" + "errors" + "fmt" + "strconv" + "sync/atomic" + "syscall" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/exporter/internal/experr" + "go.opentelemetry.io/collector/extension/experimental/storage" + "go.opentelemetry.io/collector/extension/extensiontest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +type tracesRequest struct { + traces ptrace.Traces +} + +func (tr tracesRequest) ItemsCount() int { + return tr.traces.SpanCount() +} + +func marshalTracesRequest(tr tracesRequest) ([]byte, error) { + marshaler := &ptrace.ProtoMarshaler{} + return marshaler.MarshalTraces(tr.traces) +} + +func unmarshalTracesRequest(bytes []byte) (tracesRequest, error) { + unmarshaler := &ptrace.ProtoUnmarshaler{} + traces, err := unmarshaler.UnmarshalTraces(bytes) + return tracesRequest{traces: traces}, err +} + +type mockHost struct { + component.Host + ext map[component.ID]component.Component +} + +func (nh *mockHost) GetExtensions() map[component.ID]component.Component { + return nh.ext +} + +// createAndStartTestPersistentQueue creates and starts a fake queue with the given capacity and number of consumers. +func createAndStartTestPersistentQueue(t *testing.T, sizer Sizer[tracesRequest], capacity int, numConsumers int, + consumeFunc func(_ context.Context, item tracesRequest) error) Queue[tracesRequest] { + pq := NewPersistentQueue[tracesRequest](PersistentQueueSettings[tracesRequest]{ + Sizer: sizer, + Capacity: capacity, + DataType: component.DataTypeTraces, + StorageID: component.ID{}, + Marshaler: marshalTracesRequest, + Unmarshaler: unmarshalTracesRequest, + ExporterSettings: exportertest.NewNopCreateSettings(), + }) + host := &mockHost{ext: map[component.ID]component.Component{ + {}: NewMockStorageExtension(nil), + }} + consumers := NewQueueConsumers(pq, numConsumers, consumeFunc) + require.NoError(t, consumers.Start(context.Background(), host)) + t.Cleanup(func() { + assert.NoError(t, consumers.Shutdown(context.Background())) + }) + return pq +} + +func createTestPersistentQueueWithClient(client storage.Client) *persistentQueue[tracesRequest] { + pq := NewPersistentQueue[tracesRequest](PersistentQueueSettings[tracesRequest]{ + Sizer: &RequestSizer[tracesRequest]{}, + Capacity: 1000, + DataType: component.DataTypeTraces, + StorageID: component.ID{}, + Marshaler: marshalTracesRequest, + Unmarshaler: unmarshalTracesRequest, + ExporterSettings: exportertest.NewNopCreateSettings(), + }).(*persistentQueue[tracesRequest]) + pq.initClient(context.Background(), client) + return pq +} + +func createTestPersistentQueueWithRequestsCapacity(t testing.TB, ext storage.Extension, capacity int) *persistentQueue[tracesRequest] { + return createTestPersistentQueueWithCapacityLimiter(t, ext, &RequestSizer[tracesRequest]{}, capacity) +} + +func createTestPersistentQueueWithItemsCapacity(t testing.TB, ext storage.Extension, capacity int) *persistentQueue[tracesRequest] { + return createTestPersistentQueueWithCapacityLimiter(t, ext, &ItemsSizer[tracesRequest]{}, capacity) +} + +func createTestPersistentQueueWithCapacityLimiter(t testing.TB, ext storage.Extension, sizer Sizer[tracesRequest], + capacity int) *persistentQueue[tracesRequest] { + pq := NewPersistentQueue[tracesRequest](PersistentQueueSettings[tracesRequest]{ + Sizer: sizer, + Capacity: capacity, + DataType: component.DataTypeTraces, + StorageID: component.ID{}, + Marshaler: marshalTracesRequest, + Unmarshaler: unmarshalTracesRequest, + ExporterSettings: exportertest.NewNopCreateSettings(), + }).(*persistentQueue[tracesRequest]) + require.NoError(t, pq.Start(context.Background(), &mockHost{ext: map[component.ID]component.Component{{}: ext}})) + return pq +} + +func TestPersistentQueue_FullCapacity(t *testing.T) { + tests := []struct { + name string + sizer Sizer[tracesRequest] + capacity int + sizeMultiplier int + }{ + { + name: "requests_capacity", + sizer: &RequestSizer[tracesRequest]{}, + capacity: 5, + sizeMultiplier: 1, + }, + { + name: "items_capacity", + sizer: &ItemsSizer[tracesRequest]{}, + capacity: 55, + sizeMultiplier: 10, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + start := make(chan struct{}) + done := make(chan struct{}) + pq := createAndStartTestPersistentQueue(t, tt.sizer, tt.capacity, 1, func(context.Context, tracesRequest) error { + <-start + <-done + return nil + }) + assert.Equal(t, 0, pq.Size()) + + req := newTracesRequest(1, 10) + + // First request is picked by the consumer. Wait until the consumer is blocked on done. + assert.NoError(t, pq.Offer(context.Background(), req)) + start <- struct{}{} + close(start) + + for i := 0; i < 10; i++ { + result := pq.Offer(context.Background(), newTracesRequest(1, 10)) + if i < 5 { + assert.NoError(t, result) + } else { + assert.ErrorIs(t, result, ErrQueueIsFull) + } + } + assert.Equal(t, 5*tt.sizeMultiplier, pq.Size()) + close(done) + }) + } +} + +func TestPersistentQueue_Shutdown(t *testing.T) { + pq := createAndStartTestPersistentQueue(t, &RequestSizer[tracesRequest]{}, 1001, 100, func(context.Context, + tracesRequest) error { + return nil + }) + req := newTracesRequest(1, 10) + + for i := 0; i < 1000; i++ { + assert.NoError(t, pq.Offer(context.Background(), req)) + } + +} + +func TestPersistentQueue_ConsumersProducers(t *testing.T) { + cases := []struct { + numMessagesProduced int + numConsumers int + }{ + { + numMessagesProduced: 1, + numConsumers: 1, + }, + { + numMessagesProduced: 100, + numConsumers: 1, + }, + { + numMessagesProduced: 100, + numConsumers: 3, + }, + { + numMessagesProduced: 1, + numConsumers: 100, + }, + { + numMessagesProduced: 100, + numConsumers: 100, + }, + } + + for _, c := range cases { + t.Run(fmt.Sprintf("#messages: %d #consumers: %d", c.numMessagesProduced, c.numConsumers), func(t *testing.T) { + req := newTracesRequest(1, 10) + + numMessagesConsumed := &atomic.Int32{} + pq := createAndStartTestPersistentQueue(t, &RequestSizer[tracesRequest]{}, 1000, c.numConsumers, + func(context.Context, + tracesRequest) error { + numMessagesConsumed.Add(int32(1)) + return nil + }) + + for i := 0; i < c.numMessagesProduced; i++ { + assert.NoError(t, pq.Offer(context.Background(), req)) + } + + assert.Eventually(t, func() bool { + return c.numMessagesProduced == int(numMessagesConsumed.Load()) + }, 5*time.Second, 10*time.Millisecond) + }) + } +} + +func newTracesRequest(numTraces int, numSpans int) tracesRequest { + traces := ptrace.NewTraces() + batch := traces.ResourceSpans().AppendEmpty() + batch.Resource().Attributes().PutStr("resource-attr", "some-resource") + batch.Resource().Attributes().PutInt("num-traces", int64(numTraces)) + batch.Resource().Attributes().PutInt("num-spans", int64(numSpans)) + + for i := 0; i < numTraces; i++ { + traceID := pcommon.TraceID([16]byte{1, 2, 3, byte(i)}) + ils := batch.ScopeSpans().AppendEmpty() + for j := 0; j < numSpans; j++ { + span := ils.Spans().AppendEmpty() + span.SetTraceID(traceID) + span.SetSpanID([8]byte{1, 2, 3, byte(j)}) + span.SetName("should-not-be-changed") + span.Attributes().PutInt("int-attribute", int64(j)) + span.Attributes().PutStr("str-attribute-1", "foobar") + span.Attributes().PutStr("str-attribute-2", "fdslafjasdk12312312jkl") + span.Attributes().PutStr("str-attribute-3", "AbcDefGeKKjkfdsafasdfsdasdf") + span.Attributes().PutStr("str-attribute-4", "xxxxxx") + span.Attributes().PutStr("str-attribute-5", "abcdef") + } + } + + return tracesRequest{traces: traces} +} + +func TestToStorageClient(t *testing.T) { + getStorageClientError := errors.New("unable to create storage client") + testCases := []struct { + desc string + storage storage.Extension + numStorages int + storageIndex int + expectedError error + getClientError error + }{ + { + desc: "obtain storage extension by name", + numStorages: 2, + storageIndex: 0, + expectedError: nil, + }, + { + desc: "fail on not existing storage extension", + numStorages: 2, + storageIndex: 100, + expectedError: errNoStorageClient, + }, + { + desc: "invalid extension type", + numStorages: 2, + storageIndex: 100, + expectedError: errNoStorageClient, + }, + { + desc: "fail on error getting storage client from extension", + numStorages: 1, + storageIndex: 0, + expectedError: getStorageClientError, + getClientError: getStorageClientError, + }, + } + + for _, tC := range testCases { + t.Run(tC.desc, func(t *testing.T) { + storageID := component.MustNewIDWithName("file_storage", strconv.Itoa(tC.storageIndex)) + + var extensions = map[component.ID]component.Component{} + for i := 0; i < tC.numStorages; i++ { + extensions[component.MustNewIDWithName("file_storage", strconv.Itoa(i))] = NewMockStorageExtension(tC.getClientError) + } + host := &mockHost{ext: extensions} + ownerID := component.MustNewID("foo_exporter") + + // execute + client, err := toStorageClient(context.Background(), storageID, host, ownerID, component.DataTypeTraces) + + // verify + if tC.expectedError != nil { + assert.ErrorIs(t, err, tC.expectedError) + assert.Nil(t, client) + } else { + assert.NoError(t, err) + assert.NotNil(t, client) + } + }) + } +} + +func TestInvalidStorageExtensionType(t *testing.T) { + storageID := component.MustNewIDWithName("extension", "extension") + + // make a test extension + factory := extensiontest.NewNopFactory() + extConfig := factory.CreateDefaultConfig() + settings := extensiontest.NewNopCreateSettings() + extension, err := factory.CreateExtension(context.Background(), settings, extConfig) + assert.NoError(t, err) + var extensions = map[component.ID]component.Component{ + storageID: extension, + } + host := &mockHost{ext: extensions} + ownerID := component.MustNewID("foo_exporter") + + // execute + client, err := toStorageClient(context.Background(), storageID, host, ownerID, component.DataTypeTraces) + + // we should get an error about the extension type + assert.ErrorIs(t, err, errWrongExtensionType) + assert.Nil(t, client) +} + +func TestPersistentQueue_StopAfterBadStart(t *testing.T) { + pq := NewPersistentQueue[tracesRequest](PersistentQueueSettings[tracesRequest]{}) + // verify that stopping a un-start/started w/error queue does not panic + assert.NoError(t, pq.Shutdown(context.Background())) +} + +func TestPersistentQueue_CorruptedData(t *testing.T) { + req := newTracesRequest(5, 10) + + cases := []struct { + name string + corruptAllData bool + corruptSomeData bool + corruptCurrentlyDispatchedItemsKey bool + corruptReadIndex bool + corruptWriteIndex bool + desiredQueueSize int + }{ + { + name: "corrupted no items", + desiredQueueSize: 3, + }, + { + name: "corrupted all items", + corruptAllData: true, + desiredQueueSize: 2, // - the dispatched item which was corrupted. + }, + { + name: "corrupted some items", + corruptSomeData: true, + desiredQueueSize: 2, // - the dispatched item which was corrupted. + }, + { + name: "corrupted dispatched items key", + corruptCurrentlyDispatchedItemsKey: true, + desiredQueueSize: 2, + }, + { + name: "corrupted read index", + corruptReadIndex: true, + desiredQueueSize: 1, // The dispatched item. + }, + { + name: "corrupted write index", + corruptWriteIndex: true, + desiredQueueSize: 1, // The dispatched item. + }, + { + name: "corrupted everything", + corruptAllData: true, + corruptCurrentlyDispatchedItemsKey: true, + corruptReadIndex: true, + corruptWriteIndex: true, + desiredQueueSize: 0, + }, + } + + badBytes := []byte{0, 1, 2} + + for _, c := range cases { + t.Run(c.name, func(t *testing.T) { + ext := NewMockStorageExtension(nil) + ps := createTestPersistentQueueWithRequestsCapacity(t, ext, 1000) + + // Put some items, make sure they are loaded and shutdown the storage... + for i := 0; i < 3; i++ { + err := ps.Offer(context.Background(), req) + require.NoError(t, err) + } + assert.Equal(t, 3, ps.Size()) + require.True(t, ps.Consume(func(context.Context, tracesRequest) error { + return experr.NewShutdownErr(nil) + })) + assert.Equal(t, 2, ps.Size()) + + // We can corrupt data (in several ways) and not worry since we return ShutdownErr client will not be touched. + if c.corruptAllData || c.corruptSomeData { + require.NoError(t, ps.client.Set(context.Background(), "0", badBytes)) + } + if c.corruptAllData { + require.NoError(t, ps.client.Set(context.Background(), "1", badBytes)) + require.NoError(t, ps.client.Set(context.Background(), "2", badBytes)) + } + + if c.corruptCurrentlyDispatchedItemsKey { + require.NoError(t, ps.client.Set(context.Background(), currentlyDispatchedItemsKey, badBytes)) + } + + if c.corruptReadIndex { + require.NoError(t, ps.client.Set(context.Background(), readIndexKey, badBytes)) + } + + if c.corruptWriteIndex { + require.NoError(t, ps.client.Set(context.Background(), writeIndexKey, badBytes)) + } + + // Cannot close until we corrupt the data because the + assert.NoError(t, ps.Shutdown(context.Background())) + + // Reload + newPs := createTestPersistentQueueWithRequestsCapacity(t, ext, 1000) + assert.Equal(t, c.desiredQueueSize, newPs.Size()) + }) + } +} + +func TestPersistentQueue_CurrentlyProcessedItems(t *testing.T) { + req := newTracesRequest(5, 10) + + ext := NewMockStorageExtension(nil) + ps := createTestPersistentQueueWithRequestsCapacity(t, ext, 1000) + + for i := 0; i < 5; i++ { + err := ps.Offer(context.Background(), req) + require.NoError(t, err) + } + + requireCurrentlyDispatchedItemsEqual(t, ps, []uint64{}) + + // Takes index 0 in process. + readReq, _, found := ps.getNextItem(context.Background()) + require.True(t, found) + assert.Equal(t, req, readReq) + requireCurrentlyDispatchedItemsEqual(t, ps, []uint64{0}) + + // This takes item 1 to process. + secondReadReq, onProcessingFinished, found := ps.getNextItem(context.Background()) + require.True(t, found) + assert.Equal(t, req, secondReadReq) + requireCurrentlyDispatchedItemsEqual(t, ps, []uint64{0, 1}) + + // Lets mark item 1 as finished, it will remove it from the currently dispatched items list. + onProcessingFinished(nil) + requireCurrentlyDispatchedItemsEqual(t, ps, []uint64{0}) + + // Reload the storage. Since items 0 was not finished, this should be re-enqueued at the end. + // The queue should be essentially {3,4,0,2}. + newPs := createTestPersistentQueueWithRequestsCapacity(t, ext, 1000) + assert.Equal(t, 4, newPs.Size()) + requireCurrentlyDispatchedItemsEqual(t, newPs, []uint64{}) + + // We should be able to pull all remaining items now + for i := 0; i < 4; i++ { + newPs.Consume(func(_ context.Context, traces tracesRequest) error { + assert.Equal(t, req, traces) + return nil + }) + } + + // The queue should be now empty + requireCurrentlyDispatchedItemsEqual(t, newPs, []uint64{}) + assert.Equal(t, 0, newPs.Size()) + // The writeIndex should be now set accordingly + require.EqualValues(t, 6, newPs.writeIndex) + + // There should be no items left in the storage + for i := 0; i < int(newPs.writeIndex); i++ { + bb, err := newPs.client.Get(context.Background(), getItemKey(uint64(i))) + require.NoError(t, err) + require.Nil(t, bb) + } +} + +// this test attempts to check if all the invariants are kept if the queue is recreated while +// close to full and with some items dispatched +func TestPersistentQueueStartWithNonDispatched(t *testing.T) { + req := newTracesRequest(5, 10) + + ext := NewMockStorageExtension(nil) + ps := createTestPersistentQueueWithRequestsCapacity(t, ext, 5) + + // Put in items up to capacity + for i := 0; i < 5; i++ { + err := ps.Offer(context.Background(), req) + require.NoError(t, err) + } + + // get one item out, but don't mark it as processed + <-ps.putChan + require.True(t, ps.Consume(func(context.Context, tracesRequest) error { + // put one more item in + require.NoError(t, ps.Offer(context.Background(), req)) + require.Equal(t, 5, ps.Size()) + return experr.NewShutdownErr(nil) + })) + assert.NoError(t, ps.Shutdown(context.Background())) + + // Reload with extra capacity to make sure we re-enqueue in-progress items. + newPs := createTestPersistentQueueWithRequestsCapacity(t, ext, 6) + require.Equal(t, 6, newPs.Size()) +} + +func TestPersistentQueue_PutCloseReadClose(t *testing.T) { + req := newTracesRequest(5, 10) + ext := NewMockStorageExtension(nil) + ps := createTestPersistentQueueWithRequestsCapacity(t, ext, 1000) + assert.Equal(t, 0, ps.Size()) + + // Put two elements and close the extension + assert.NoError(t, ps.Offer(context.Background(), req)) + assert.NoError(t, ps.Offer(context.Background(), req)) + assert.Equal(t, 2, ps.Size()) + // TODO: Remove this, after the initialization writes the readIndex. + _, _, _ = ps.getNextItem(context.Background()) + assert.NoError(t, ps.Shutdown(context.Background())) + + newPs := createTestPersistentQueueWithRequestsCapacity(t, ext, 1000) + require.Equal(t, 2, newPs.Size()) + + // Let's read both of the elements we put + newPs.Consume(func(_ context.Context, traces tracesRequest) error { + require.Equal(t, req, traces) + return nil + }) + assert.Equal(t, 1, newPs.Size()) + + newPs.Consume(func(_ context.Context, traces tracesRequest) error { + require.Equal(t, req, traces) + return nil + }) + require.Equal(t, 0, newPs.Size()) + assert.NoError(t, newPs.Shutdown(context.Background())) +} + +func BenchmarkPersistentQueue_TraceSpans(b *testing.B) { + cases := []struct { + numTraces int + numSpansPerTrace int + }{ + { + numTraces: 1, + numSpansPerTrace: 1, + }, + { + numTraces: 1, + numSpansPerTrace: 10, + }, + { + numTraces: 10, + numSpansPerTrace: 10, + }, + } + + for _, c := range cases { + b.Run(fmt.Sprintf("#traces: %d #spansPerTrace: %d", c.numTraces, c.numSpansPerTrace), func(bb *testing.B) { + ext := NewMockStorageExtension(nil) + ps := createTestPersistentQueueWithRequestsCapacity(b, ext, 10000000) + + req := newTracesRequest(c.numTraces, c.numSpansPerTrace) + + bb.ReportAllocs() + bb.ResetTimer() + + for i := 0; i < bb.N; i++ { + require.NoError(bb, ps.Offer(context.Background(), req)) + } + + for i := 0; i < bb.N; i++ { + require.True(bb, ps.Consume(func(context.Context, tracesRequest) error { return nil })) + } + require.NoError(b, ext.Shutdown(context.Background())) + }) + } +} + +func TestItemIndexMarshaling(t *testing.T) { + cases := []struct { + in uint64 + out uint64 + }{ + { + in: 0, + out: 0, + }, + { + in: 1, + out: 1, + }, + { + in: 0xFFFFFFFFFFFFFFFF, + out: 0xFFFFFFFFFFFFFFFF, + }, + } + + for _, c := range cases { + t.Run(fmt.Sprintf("#elements:%v", c.in), func(*testing.T) { + buf := itemIndexToBytes(c.in) + out, err := bytesToItemIndex(buf) + require.NoError(t, err) + require.Equal(t, c.out, out) + }) + } +} + +func TestItemIndexArrayMarshaling(t *testing.T) { + cases := []struct { + in []uint64 + out []uint64 + }{ + { + in: []uint64{0, 1, 2}, + out: []uint64{0, 1, 2}, + }, + { + in: []uint64{}, + out: nil, + }, + { + in: nil, + out: nil, + }, + } + + for _, c := range cases { + t.Run(fmt.Sprintf("#elements:%v", c.in), func(_ *testing.T) { + buf := itemIndexArrayToBytes(c.in) + out, err := bytesToItemIndexArray(buf) + require.NoError(t, err) + require.Equal(t, c.out, out) + }) + } +} + +func TestPersistentQueue_ShutdownWhileConsuming(t *testing.T) { + ps := createTestPersistentQueueWithRequestsCapacity(t, NewMockStorageExtension(nil), 1000) + + assert.Equal(t, 0, ps.Size()) + assert.False(t, ps.client.(*mockStorageClient).isClosed()) + + assert.NoError(t, ps.Offer(context.Background(), newTracesRequest(5, 10))) + + _, onProcessingFinished, ok := ps.getNextItem(context.Background()) + require.True(t, ok) + assert.False(t, ps.client.(*mockStorageClient).isClosed()) + assert.NoError(t, ps.Shutdown(context.Background())) + assert.False(t, ps.client.(*mockStorageClient).isClosed()) + onProcessingFinished(nil) + assert.True(t, ps.client.(*mockStorageClient).isClosed()) +} + +func TestPersistentQueue_StorageFull(t *testing.T) { + req := newTracesRequest(5, 10) + marshaled, err := marshalTracesRequest(req) + require.NoError(t, err) + maxSizeInBytes := len(marshaled) * 5 // arbitrary small number + freeSpaceInBytes := 1 + + client := newFakeBoundedStorageClient(maxSizeInBytes) + ps := createTestPersistentQueueWithClient(client) + + // Put enough items in to fill the underlying storage + reqCount := 0 + for { + err = ps.Offer(context.Background(), req) + if errors.Is(err, syscall.ENOSPC) { + break + } + require.NoError(t, err) + reqCount++ + } + + // Check that the size is correct + require.Equal(t, reqCount, ps.Size(), "Size must be equal to the number of items inserted") + + // Manually set the storage to only have a small amount of free space left + newMaxSize := client.GetSizeInBytes() + freeSpaceInBytes + client.SetMaxSizeInBytes(newMaxSize) + + // Try to put an item in, should fail + require.Error(t, ps.Offer(context.Background(), req)) + + // Take out all the items + // Getting the first item fails, as we can't update the state in storage, so we just delete it without returning it + // Subsequent items succeed, as deleting the first item frees enough space for the state update + reqCount-- + for i := reqCount; i > 0; i-- { + require.True(t, ps.Consume(func(context.Context, tracesRequest) error { return nil })) + } + + // We should be able to put a new item in + // However, this will fail if deleting items fails with full storage + require.NoError(t, ps.Offer(context.Background(), req)) +} + +func TestPersistentQueue_ItemDispatchingFinish_ErrorHandling(t *testing.T) { + errDeletingItem := fmt.Errorf("error deleting item") + errUpdatingDispatched := fmt.Errorf("error updating dispatched items") + testCases := []struct { + storageErrors []error + expectedError error + description string + }{ + { + description: "no errors", + storageErrors: []error{}, + expectedError: nil, + }, + { + description: "error on first transaction, success afterwards", + storageErrors: []error{ + errUpdatingDispatched, + }, + expectedError: nil, + }, + { + description: "error on first and second transaction", + storageErrors: []error{ + errUpdatingDispatched, + errDeletingItem, + }, + expectedError: errDeletingItem, + }, + { + description: "error on first and third transaction", + storageErrors: []error{ + errUpdatingDispatched, + nil, + errUpdatingDispatched, + }, + expectedError: errUpdatingDispatched, + }, + } + + for _, testCase := range testCases { + t.Run(testCase.description, func(t *testing.T) { + client := newFakeStorageClientWithErrors(testCase.storageErrors) + ps := createTestPersistentQueueWithClient(client) + client.Reset() + + err := ps.itemDispatchingFinish(context.Background(), 0) + + require.ErrorIs(t, err, testCase.expectedError) + }) + } +} + +func TestPersistentQueue_ItemsCapacityUsageRestoredOnShutdown(t *testing.T) { + ext := NewMockStorageExtension(nil) + pq := createTestPersistentQueueWithItemsCapacity(t, ext, 100) + + assert.Equal(t, 0, pq.Size()) + + // Fill the queue up to the capacity. + assert.NoError(t, pq.Offer(context.Background(), newTracesRequest(4, 10))) + assert.NoError(t, pq.Offer(context.Background(), newTracesRequest(4, 10))) + assert.NoError(t, pq.Offer(context.Background(), newTracesRequest(2, 10))) + assert.Equal(t, 100, pq.Size()) + + assert.ErrorIs(t, pq.Offer(context.Background(), newTracesRequest(5, 5)), ErrQueueIsFull) + assert.Equal(t, 100, pq.Size()) + + assert.True(t, pq.Consume(func(_ context.Context, traces tracesRequest) error { + assert.Equal(t, 40, traces.traces.SpanCount()) + return nil + })) + assert.Equal(t, 60, pq.Size()) + + assert.NoError(t, pq.Shutdown(context.Background())) + + newPQ := createTestPersistentQueueWithItemsCapacity(t, ext, 100) + + // The queue should be restored to the previous size. + assert.Equal(t, 60, newPQ.Size()) + + assert.NoError(t, newPQ.Offer(context.Background(), newTracesRequest(2, 5))) + + // Check the combined queue size. + assert.Equal(t, 70, newPQ.Size()) + + assert.True(t, newPQ.Consume(func(_ context.Context, traces tracesRequest) error { + assert.Equal(t, 40, traces.traces.SpanCount()) + return nil + })) + assert.Equal(t, 30, newPQ.Size()) + + assert.True(t, newPQ.Consume(func(_ context.Context, traces tracesRequest) error { + assert.Equal(t, 20, traces.traces.SpanCount()) + return nil + })) + assert.Equal(t, 10, newPQ.Size()) + + assert.NoError(t, newPQ.Shutdown(context.Background())) +} + +// This test covers the case when the items capacity queue is enabled for the first time. +func TestPersistentQueue_ItemsCapacityUsageIsNotPreserved(t *testing.T) { + ext := NewMockStorageExtension(nil) + pq := createTestPersistentQueueWithRequestsCapacity(t, ext, 100) + + assert.Equal(t, 0, pq.Size()) + + assert.NoError(t, pq.Offer(context.Background(), newTracesRequest(4, 10))) + assert.NoError(t, pq.Offer(context.Background(), newTracesRequest(2, 10))) + assert.NoError(t, pq.Offer(context.Background(), newTracesRequest(5, 5))) + assert.Equal(t, 3, pq.Size()) + + assert.True(t, pq.Consume(func(_ context.Context, traces tracesRequest) error { + assert.Equal(t, 40, traces.traces.SpanCount()) + return nil + })) + assert.Equal(t, 2, pq.Size()) + + assert.NoError(t, pq.Shutdown(context.Background())) + + newPQ := createTestPersistentQueueWithItemsCapacity(t, ext, 100) + + // The queue items size cannot be restored to the previous size. Falls back to 0. + assert.Equal(t, 0, newPQ.Size()) + + assert.NoError(t, newPQ.Offer(context.Background(), newTracesRequest(2, 5))) + + // Only new items are reflected + assert.Equal(t, 10, newPQ.Size()) + + // Consuming old items should does not affect the size. + assert.True(t, newPQ.Consume(func(_ context.Context, traces tracesRequest) error { + assert.Equal(t, 20, traces.traces.SpanCount()) + return nil + })) + assert.Equal(t, 10, newPQ.Size()) + + assert.True(t, newPQ.Consume(func(_ context.Context, traces tracesRequest) error { + assert.Equal(t, 25, traces.traces.SpanCount()) + return nil + })) + assert.Equal(t, 10, newPQ.Size()) + + assert.True(t, newPQ.Consume(func(_ context.Context, traces tracesRequest) error { + assert.Equal(t, 10, traces.traces.SpanCount()) + return nil + })) + assert.Equal(t, 0, newPQ.Size()) + + assert.NoError(t, newPQ.Shutdown(context.Background())) +} + +func requireCurrentlyDispatchedItemsEqual(t *testing.T, pq *persistentQueue[tracesRequest], compare []uint64) { + pq.mu.Lock() + defer pq.mu.Unlock() + assert.ElementsMatch(t, compare, pq.currentlyDispatchedItems) +} diff --git a/exporter/internal/queue/queue.go b/exporter/internal/queue/queue.go new file mode 100644 index 00000000000..0ae0703b05d --- /dev/null +++ b/exporter/internal/queue/queue.go @@ -0,0 +1,36 @@ +// Copyright The OpenTelemetry Authors +// Copyright (c) 2019 The Jaeger Authors. +// Copyright (c) 2017 Uber Technologies, Inc. +// SPDX-License-Identifier: Apache-2.0 + +package queue // import "go.opentelemetry.io/collector/exporter/internal/queue" + +import ( + "context" + "errors" + + "go.opentelemetry.io/collector/component" +) + +var ( + // ErrQueueIsFull is the error returned when an item is offered to the Queue and the queue is full. + ErrQueueIsFull = errors.New("sending queue is full") +) + +// Queue defines a producer-consumer exchange which can be backed by e.g. the memory-based ring buffer queue +// (boundedMemoryQueue) or via a disk-based queue (persistentQueue) +type Queue[T any] interface { + component.Component + // Offer inserts the specified element into this queue if it is possible to do so immediately + // without violating capacity restrictions. If success returns no error. + // It returns ErrQueueIsFull if no space is currently available. + Offer(ctx context.Context, item T) error + // Consume applies the provided function on the head of queue. + // The call blocks until there is an item available or the queue is stopped. + // The function returns true when an item is consumed or false if the queue is stopped. + Consume(func(ctx context.Context, item T) error) bool + // Size returns the current Size of the queue + Size() int + // Capacity returns the capacity of the queue. + Capacity() int +} diff --git a/exporter/internal/queue/queue_capacity.go b/exporter/internal/queue/queue_capacity.go new file mode 100644 index 00000000000..1995febcd63 --- /dev/null +++ b/exporter/internal/queue/queue_capacity.go @@ -0,0 +1,74 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package queue // import "go.opentelemetry.io/collector/exporter/internal/queue" + +import ( + "sync/atomic" +) + +type itemsCounter interface { + ItemsCount() int +} + +// Sizer is an interface that returns the size of the given element. +type Sizer[T any] interface { + SizeOf(T) uint64 +} + +// ItemsSizer is a Sizer implementation that returns the size of a queue element as the number of items it contains. +type ItemsSizer[T itemsCounter] struct{} + +func (is *ItemsSizer[T]) SizeOf(el T) uint64 { + return uint64(el.ItemsCount()) +} + +// RequestSizer is a Sizer implementation that returns the size of a queue element as one request. +type RequestSizer[T any] struct{} + +func (rs *RequestSizer[T]) SizeOf(T) uint64 { + return 1 +} + +type queueCapacityLimiter[T any] struct { + used *atomic.Uint64 + cap uint64 + sz Sizer[T] +} + +func (bcl queueCapacityLimiter[T]) Capacity() int { + return int(bcl.cap) +} + +func (bcl queueCapacityLimiter[T]) Size() int { + return int(bcl.used.Load()) +} + +func (bcl queueCapacityLimiter[T]) claim(el T) bool { + size := bcl.sizeOf(el) + if bcl.used.Add(size) > bcl.cap { + bcl.releaseSize(size) + return false + } + return true +} + +func (bcl queueCapacityLimiter[T]) release(el T) { + bcl.releaseSize(bcl.sizeOf(el)) +} + +func (bcl queueCapacityLimiter[T]) releaseSize(size uint64) { + bcl.used.Add(^(size - 1)) +} + +func (bcl queueCapacityLimiter[T]) sizeOf(el T) uint64 { + return bcl.sz.SizeOf(el) +} + +func newQueueCapacityLimiter[T any](sizer Sizer[T], capacity int) *queueCapacityLimiter[T] { + return &queueCapacityLimiter[T]{ + used: &atomic.Uint64{}, + cap: uint64(capacity), + sz: sizer, + } +} diff --git a/exporter/internal/queue/queue_capacity_test.go b/exporter/internal/queue/queue_capacity_test.go new file mode 100644 index 00000000000..3dd6ad2b898 --- /dev/null +++ b/exporter/internal/queue/queue_capacity_test.go @@ -0,0 +1,58 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package queue + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestRequestsCapacityLimiter(t *testing.T) { + rl := newQueueCapacityLimiter[fakeReq](&RequestSizer[fakeReq]{}, 2) + assert.Equal(t, 0, rl.Size()) + assert.Equal(t, 2, rl.Capacity()) + + req := fakeReq{itemsCount: 5} + + assert.True(t, rl.claim(req)) + assert.Equal(t, 1, rl.Size()) + + assert.True(t, rl.claim(req)) + assert.Equal(t, 2, rl.Size()) + + assert.False(t, rl.claim(req)) + assert.Equal(t, 2, rl.Size()) + + rl.release(req) + assert.Equal(t, 1, rl.Size()) +} + +func TestItemsCapacityLimiter(t *testing.T) { + rl := newQueueCapacityLimiter[fakeReq](&ItemsSizer[fakeReq]{}, 7) + assert.Equal(t, 0, rl.Size()) + assert.Equal(t, 7, rl.Capacity()) + + req := fakeReq{itemsCount: 3} + + assert.True(t, rl.claim(req)) + assert.Equal(t, 3, rl.Size()) + + assert.True(t, rl.claim(req)) + assert.Equal(t, 6, rl.Size()) + + assert.False(t, rl.claim(req)) + assert.Equal(t, 6, rl.Size()) + + rl.release(req) + assert.Equal(t, 3, rl.Size()) +} + +type fakeReq struct { + itemsCount int +} + +func (r fakeReq) ItemsCount() int { + return r.itemsCount +} diff --git a/exporter/loggingexporter/README.md b/exporter/loggingexporter/README.md index b45701bce3e..f6b7d9d9859 100644 --- a/exporter/loggingexporter/README.md +++ b/exporter/loggingexporter/README.md @@ -1,10 +1,16 @@ # Logging Exporter -| Status | | -| ------------------------ |-----------------------| -| Stability | [Deprecated] | -| Supported pipeline types | traces, metrics, logs | -| Distributions | [core], [contrib] | + +| Status | | +| ------------- |-----------| +| Stability | [deprecated]: traces, metrics, logs | +| Distributions | [core], [contrib] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Flogging%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Flogging) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Flogging%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Flogging) | + +[deprecated]: https://github.com/open-telemetry/opentelemetry-collector#deprecated +[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib + This exporter is being deprecated in favour of the [debug exporter]. It will be removed in September 2024. @@ -43,7 +49,4 @@ exporters: sampling_thereafter: 200 ``` -[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol -[Deprecated]: https://github.com/open-telemetry/opentelemetry-collector#deprecated [debug exporter]: ../debugexporter/README.md diff --git a/exporter/loggingexporter/config.go b/exporter/loggingexporter/config.go index 469286b111d..d35cdd6fa4d 100644 --- a/exporter/loggingexporter/config.go +++ b/exporter/loggingexporter/config.go @@ -65,7 +65,7 @@ func (cfg *Config) Unmarshal(conf *confmap.Conf) error { return fmt.Errorf("'loglevel' and 'verbosity' are incompatible. Use only 'verbosity' instead") } - if err := conf.Unmarshal(cfg, confmap.WithErrorUnused()); err != nil { + if err := conf.Unmarshal(cfg); err != nil { return err } diff --git a/exporter/loggingexporter/doc.go b/exporter/loggingexporter/doc.go index bcbf2babaa4..3a5c01850d9 100644 --- a/exporter/loggingexporter/doc.go +++ b/exporter/loggingexporter/doc.go @@ -1,5 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +//go:generate mdatagen metadata.yaml + // Package loggingexporter exports data to console as logs. package loggingexporter // import "go.opentelemetry.io/collector/exporter/loggingexporter" diff --git a/exporter/loggingexporter/factory.go b/exporter/loggingexporter/factory.go index b2d4ec8fe79..1f38b315db0 100644 --- a/exporter/loggingexporter/factory.go +++ b/exporter/loggingexporter/factory.go @@ -12,11 +12,13 @@ import ( "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/internal/common" + "go.opentelemetry.io/collector/exporter/loggingexporter/internal/metadata" ) +// The value of "type" key in configuration. +var componentType = component.MustNewType("logging") + const ( - // The value of "type" key in configuration. - typeStr = "logging" defaultSamplingInitial = 2 defaultSamplingThereafter = 500 ) @@ -24,11 +26,11 @@ const ( // NewFactory creates a factory for Logging exporter func NewFactory() exporter.Factory { return exporter.NewFactory( - typeStr, + componentType, createDefaultConfig, - exporter.WithTraces(createTracesExporter, component.StabilityLevelDeprecated), - exporter.WithMetrics(createMetricsExporter, component.StabilityLevelDeprecated), - exporter.WithLogs(createLogsExporter, component.StabilityLevelDeprecated), + exporter.WithTraces(createTracesExporter, metadata.TracesStability), + exporter.WithMetrics(createMetricsExporter, metadata.MetricsStability), + exporter.WithLogs(createLogsExporter, metadata.LogsStability), ) } diff --git a/exporter/loggingexporter/go.mod b/exporter/loggingexporter/go.mod index 1a026a883eb..97dac63f6aa 100644 --- a/exporter/loggingexporter/go.mod +++ b/exporter/loggingexporter/go.mod @@ -1,52 +1,60 @@ // Deprecated: loggingexporter is deprecated in favour of the debugexporter. It will be removed in September 2024. module go.opentelemetry.io/collector/exporter/loggingexporter -go 1.20 +go 1.21 require ( github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.85.0 - go.opentelemetry.io/collector/config/configtelemetry v0.85.0 - go.opentelemetry.io/collector/confmap v0.85.0 - go.opentelemetry.io/collector/exporter v0.85.0 - go.uber.org/zap v1.26.0 + go.opentelemetry.io/collector/component v0.96.0 + go.opentelemetry.io/collector/config/configtelemetry v0.96.0 + go.opentelemetry.io/collector/confmap v0.96.0 + go.opentelemetry.io/collector/exporter v0.96.0 + go.opentelemetry.io/otel/metric v1.24.0 + go.opentelemetry.io/otel/trace v1.24.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( + github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.0.1 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.85.0 // indirect - go.opentelemetry.io/collector/consumer v0.85.0 // indirect - go.opentelemetry.io/collector/extension v0.85.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0014 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0014 // indirect - go.opentelemetry.io/otel v1.18.0 // indirect - go.opentelemetry.io/otel/metric v1.18.0 // indirect - go.opentelemetry.io/otel/sdk v1.18.0 // indirect - go.opentelemetry.io/otel/sdk/metric v0.41.0 // indirect - go.opentelemetry.io/otel/trace v1.18.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector v0.96.0 // indirect + go.opentelemetry.io/collector/config/configretry v0.96.0 // indirect + go.opentelemetry.io/collector/consumer v0.96.0 // indirect + go.opentelemetry.io/collector/extension v0.96.0 // indirect + go.opentelemetry.io/collector/pdata v1.3.0 // indirect + go.opentelemetry.io/collector/receiver v0.96.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/grpc v1.58.1 // indirect - google.golang.org/protobuf v1.31.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -66,23 +74,13 @@ replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/pdata => ../../pdata -replace go.opentelemetry.io/collector/processor => ../../processor - replace go.opentelemetry.io/collector/receiver => ../../receiver -replace go.opentelemetry.io/collector/semconv => ../../semconv - -replace go.opentelemetry.io/collector/extension/zpagesextension => ../../extension/zpagesextension - retract ( v0.76.0 // Depends on retracted pdata v1.0.0-rc10 module, use v0.76.1 v0.69.0 // Release failed, use v0.69.1 ) -replace go.opentelemetry.io/collector/connector => ../../connector - -replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet - replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry -replace go.opentelemetry.io/collector/service => ../../service +replace go.opentelemetry.io/collector/config/configretry => ../../config/configretry diff --git a/exporter/loggingexporter/go.sum b/exporter/loggingexporter/go.sum index 56e97816e75..dbdb92fd3bb 100644 --- a/exporter/loggingexporter/go.sum +++ b/exporter/loggingexporter/go.sum @@ -1,55 +1,28 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -58,15 +31,14 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= -github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -76,83 +48,64 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= -go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= -go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/exporters/prometheus v0.41.0 h1:A3/bhjP5SmELy8dcpK+uttHeh9Qrh+YnS16/VzrztRQ= -go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= -go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= -go.opentelemetry.io/otel/sdk v1.18.0 h1:e3bAB0wB3MljH38sHzpV/qWrOTCFrdZF2ct9F8rBkcY= -go.opentelemetry.io/otel/sdk v1.18.0/go.mod h1:1RCygWV7plY2KmdskZEDDBs4tJeHG92MdHZIluiYs/M= -go.opentelemetry.io/otel/sdk/metric v0.41.0 h1:c3sAt9/pQ5fSIUfl0gPtClV3HhE18DCVzByD33R/zsk= -go.opentelemetry.io/otel/sdk/metric v0.41.0/go.mod h1:PmOmSt+iOklKtIg5O4Vz9H/ttcRFSNTgii+E1KGyn1w= -go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= -go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -160,38 +113,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= -google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +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= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/exporter/loggingexporter/internal/metadata/generated_status.go b/exporter/loggingexporter/internal/metadata/generated_status.go new file mode 100644 index 00000000000..64c84dcae1f --- /dev/null +++ b/exporter/loggingexporter/internal/metadata/generated_status.go @@ -0,0 +1,29 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" +) + +var ( + Type = component.MustNewType("logging") + scopeName = "go.opentelemetry.io/collector/exporter/loggingexporter" +) + +const ( + TracesStability = component.StabilityLevelDeprecated + MetricsStability = component.StabilityLevelDeprecated + LogsStability = component.StabilityLevelDeprecated +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter(scopeName) +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer(scopeName) +} diff --git a/exporter/loggingexporter/metadata.yaml b/exporter/loggingexporter/metadata.yaml new file mode 100644 index 00000000000..165fa39f173 --- /dev/null +++ b/exporter/loggingexporter/metadata.yaml @@ -0,0 +1,7 @@ +type: logging + +status: + class: exporter + stability: + deprecated: [traces, metrics, logs] + distributions: [core, contrib] diff --git a/exporter/loggingexporter/package_test.go b/exporter/loggingexporter/package_test.go new file mode 100644 index 00000000000..0c1b40739cc --- /dev/null +++ b/exporter/loggingexporter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package loggingexporter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/otlpexporter/README.md b/exporter/otlpexporter/README.md index 9dc48422026..8926a14369b 100644 --- a/exporter/otlpexporter/README.md +++ b/exporter/otlpexporter/README.md @@ -1,12 +1,18 @@ # OTLP gRPC Exporter -| Status | | -| ------------------------ | --------------------- | -| Stability | traces [stable] | -| | metrics [stable] | -| | logs [beta] | -| Supported pipeline types | traces, metrics, logs | -| Distributions | [core], [contrib] | + +| Status | | +| ------------- |-----------| +| Stability | [beta]: logs | +| | [stable]: traces, metrics | +| Distributions | [core], [contrib] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fotlp%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fotlp) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fotlp%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fotlp) | + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[stable]: https://github.com/open-telemetry/opentelemetry-collector#stable +[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib + Export data via gRPC using [OTLP]( https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specification.md) @@ -53,8 +59,3 @@ Several helper files are leveraged to provide additional capabilities automatica - [gRPC settings](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configgrpc/README.md) - [TLS and mTLS settings](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configtls/README.md) - [Queuing, retry and timeout settings](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/exporterhelper/README.md) - -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta -[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol -[stable]: https://github.com/open-telemetry/opentelemetry-collector#stable diff --git a/exporter/otlpexporter/config.go b/exporter/otlpexporter/config.go index d276f6e7c87..61440c3a9e3 100644 --- a/exporter/otlpexporter/config.go +++ b/exporter/otlpexporter/config.go @@ -4,29 +4,28 @@ package otlpexporter // import "go.opentelemetry.io/collector/exporter/otlpexporter" import ( - "fmt" + "errors" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configgrpc" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" ) // Config defines configuration for OTLP exporter. type Config struct { - exporterhelper.TimeoutSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. - exporterhelper.QueueSettings `mapstructure:"sending_queue"` - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` + exporterhelper.TimeoutSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + QueueConfig exporterhelper.QueueSettings `mapstructure:"sending_queue"` + RetryConfig configretry.BackOffConfig `mapstructure:"retry_on_failure"` - configgrpc.GRPCClientSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + configgrpc.ClientConfig `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. } -var _ component.Config = (*Config)(nil) - -// Validate checks if the exporter configuration is valid -func (cfg *Config) Validate() error { - if err := cfg.QueueSettings.Validate(); err != nil { - return fmt.Errorf("queue settings has invalid configuration: %w", err) +func (c *Config) Validate() error { + if c.SanitizedEndpoint() == "" { + return errors.New(`requires a non-empty "endpoint"`) } - return nil } + +var _ component.Config = (*Config)(nil) diff --git a/exporter/otlpexporter/config_test.go b/exporter/otlpexporter/config_test.go index ebc1789a41e..c024eb0af88 100644 --- a/exporter/otlpexporter/config_test.go +++ b/exporter/otlpexporter/config_test.go @@ -15,6 +15,7 @@ import ( "go.opentelemetry.io/collector/config/configauth" "go.opentelemetry.io/collector/config/configgrpc" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/confmaptest" @@ -39,7 +40,7 @@ func TestUnmarshalConfig(t *testing.T) { TimeoutSettings: exporterhelper.TimeoutSettings{ Timeout: 10 * time.Second, }, - RetrySettings: exporterhelper.RetrySettings{ + RetryConfig: configretry.BackOffConfig{ Enabled: true, InitialInterval: 10 * time.Second, RandomizationFactor: 0.7, @@ -47,12 +48,12 @@ func TestUnmarshalConfig(t *testing.T) { MaxInterval: 1 * time.Minute, MaxElapsedTime: 10 * time.Minute, }, - QueueSettings: exporterhelper.QueueSettings{ + QueueConfig: exporterhelper.QueueSettings{ Enabled: true, NumConsumers: 2, QueueSize: 10, }, - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Headers: map[string]configopaque.String{ "can you have a . here?": "F0000000-0000-0000-0000-000000000000", "header1": "234", @@ -60,8 +61,8 @@ func TestUnmarshalConfig(t *testing.T) { }, Endpoint: "1.2.3.4:1234", Compression: "gzip", - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + TLSSetting: configtls.Config{ CAFile: "/var/lib/mycert.pem", }, Insecure: false, @@ -73,7 +74,43 @@ func TestUnmarshalConfig(t *testing.T) { }, WriteBufferSize: 512 * 1024, BalancerName: "round_robin", - Auth: &configauth.Authentication{AuthenticatorID: component.NewID("nop")}, + Auth: &configauth.Authentication{AuthenticatorID: component.MustNewID("nop")}, }, }, cfg) } + +func TestUnmarshalInvalidConfig(t *testing.T) { + cm, err := confmaptest.LoadConf(filepath.Join("testdata", "invalid_configs.yaml")) + require.NoError(t, err) + factory := NewFactory() + for _, test := range []struct { + name string + errorMsg string + }{ + { + name: "no_endpoint", + errorMsg: `requires a non-empty "endpoint"`, + }, + { + name: "http_endpoint", + errorMsg: `requires a non-empty "endpoint"`, + }, + { + name: "invalid_timeout", + errorMsg: `'timeout' must be non-negative`, + }, + { + name: "invalid_retry", + errorMsg: `'randomization_factor' must be within [0, 1]`, + }, + } { + t.Run(test.name, func(t *testing.T) { + cfg := factory.CreateDefaultConfig() + sub, err := cm.Sub(test.name) + require.NoError(t, err) + assert.NoError(t, component.UnmarshalConfig(sub, cfg)) + assert.ErrorContains(t, component.ValidateConfig(cfg), test.errorMsg) + }) + } + +} diff --git a/exporter/otlpexporter/doc.go b/exporter/otlpexporter/doc.go index 5fad358a654..3f09a753285 100644 --- a/exporter/otlpexporter/doc.go +++ b/exporter/otlpexporter/doc.go @@ -1,5 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +//go:generate mdatagen metadata.yaml + // Package otlpexporter exports data by using the OTLP format to a gPRC endpoint. package otlpexporter // import "go.opentelemetry.io/collector/exporter/otlpexporter" diff --git a/exporter/otlpexporter/factory.go b/exporter/otlpexporter/factory.go index 3980216331a..8a72aab8cdc 100644 --- a/exporter/otlpexporter/factory.go +++ b/exporter/otlpexporter/factory.go @@ -10,36 +10,33 @@ import ( "go.opentelemetry.io/collector/config/configcompression" "go.opentelemetry.io/collector/config/configgrpc" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" -) - -const ( - // The value of "type" key in configuration. - typeStr = "otlp" + "go.opentelemetry.io/collector/exporter/otlpexporter/internal/metadata" ) // NewFactory creates a factory for OTLP exporter. func NewFactory() exporter.Factory { return exporter.NewFactory( - typeStr, + metadata.Type, createDefaultConfig, - exporter.WithTraces(createTracesExporter, component.StabilityLevelStable), - exporter.WithMetrics(createMetricsExporter, component.StabilityLevelStable), - exporter.WithLogs(createLogsExporter, component.StabilityLevelBeta), + exporter.WithTraces(createTracesExporter, metadata.TracesStability), + exporter.WithMetrics(createMetricsExporter, metadata.MetricsStability), + exporter.WithLogs(createLogsExporter, metadata.LogsStability), ) } func createDefaultConfig() component.Config { return &Config{ TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), - RetrySettings: exporterhelper.NewDefaultRetrySettings(), - QueueSettings: exporterhelper.NewDefaultQueueSettings(), - GRPCClientSettings: configgrpc.GRPCClientSettings{ + RetryConfig: configretry.NewDefaultBackOffConfig(), + QueueConfig: exporterhelper.NewDefaultQueueSettings(), + ClientConfig: configgrpc.ClientConfig{ Headers: map[string]configopaque.String{}, // Default to gzip compression - Compression: configcompression.Gzip, + Compression: configcompression.TypeGzip, // We almost read 0 bytes, so no need to tune ReadBufferSize. WriteBufferSize: 512 * 1024, }, @@ -51,17 +48,14 @@ func createTracesExporter( set exporter.CreateSettings, cfg component.Config, ) (exporter.Traces, error) { - oce, err := newExporter(cfg, set) - if err != nil { - return nil, err - } + oce := newExporter(cfg, set) oCfg := cfg.(*Config) return exporterhelper.NewTracesExporter(ctx, set, cfg, oce.pushTraces, exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), exporterhelper.WithTimeout(oCfg.TimeoutSettings), - exporterhelper.WithRetry(oCfg.RetrySettings), - exporterhelper.WithQueue(oCfg.QueueSettings), + exporterhelper.WithRetry(oCfg.RetryConfig), + exporterhelper.WithQueue(oCfg.QueueConfig), exporterhelper.WithStart(oce.start), exporterhelper.WithShutdown(oce.shutdown)) } @@ -71,17 +65,14 @@ func createMetricsExporter( set exporter.CreateSettings, cfg component.Config, ) (exporter.Metrics, error) { - oce, err := newExporter(cfg, set) - if err != nil { - return nil, err - } + oce := newExporter(cfg, set) oCfg := cfg.(*Config) return exporterhelper.NewMetricsExporter(ctx, set, cfg, oce.pushMetrics, exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), exporterhelper.WithTimeout(oCfg.TimeoutSettings), - exporterhelper.WithRetry(oCfg.RetrySettings), - exporterhelper.WithQueue(oCfg.QueueSettings), + exporterhelper.WithRetry(oCfg.RetryConfig), + exporterhelper.WithQueue(oCfg.QueueConfig), exporterhelper.WithStart(oce.start), exporterhelper.WithShutdown(oce.shutdown), ) @@ -92,17 +83,14 @@ func createLogsExporter( set exporter.CreateSettings, cfg component.Config, ) (exporter.Logs, error) { - oce, err := newExporter(cfg, set) - if err != nil { - return nil, err - } + oce := newExporter(cfg, set) oCfg := cfg.(*Config) return exporterhelper.NewLogsExporter(ctx, set, cfg, oce.pushLogs, exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), exporterhelper.WithTimeout(oCfg.TimeoutSettings), - exporterhelper.WithRetry(oCfg.RetrySettings), - exporterhelper.WithQueue(oCfg.QueueSettings), + exporterhelper.WithRetry(oCfg.RetryConfig), + exporterhelper.WithQueue(oCfg.QueueConfig), exporterhelper.WithStart(oce.start), exporterhelper.WithShutdown(oce.shutdown), ) diff --git a/exporter/otlpexporter/factory_test.go b/exporter/otlpexporter/factory_test.go index 4ebb0e283ba..45db95986b4 100644 --- a/exporter/otlpexporter/factory_test.go +++ b/exporter/otlpexporter/factory_test.go @@ -16,6 +16,7 @@ import ( "go.opentelemetry.io/collector/config/configcompression" "go.opentelemetry.io/collector/config/configgrpc" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.opentelemetry.io/collector/exporter/exportertest" @@ -29,16 +30,16 @@ func TestCreateDefaultConfig(t *testing.T) { assert.NoError(t, componenttest.CheckConfigStruct(cfg)) ocfg, ok := factory.CreateDefaultConfig().(*Config) assert.True(t, ok) - assert.Equal(t, ocfg.RetrySettings, exporterhelper.NewDefaultRetrySettings()) - assert.Equal(t, ocfg.QueueSettings, exporterhelper.NewDefaultQueueSettings()) + assert.Equal(t, ocfg.RetryConfig, configretry.NewDefaultBackOffConfig()) + assert.Equal(t, ocfg.QueueConfig, exporterhelper.NewDefaultQueueSettings()) assert.Equal(t, ocfg.TimeoutSettings, exporterhelper.NewDefaultTimeoutSettings()) - assert.Equal(t, ocfg.Compression, configcompression.Gzip) + assert.Equal(t, ocfg.Compression, configcompression.TypeGzip) } func TestCreateMetricsExporter(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig().(*Config) - cfg.GRPCClientSettings.Endpoint = testutil.GetAvailableLocalAddress(t) + cfg.ClientConfig.Endpoint = testutil.GetAvailableLocalAddress(t) set := exportertest.NewNopCreateSettings() oexp, err := factory.CreateMetricsExporter(context.Background(), set, cfg) @@ -49,26 +50,16 @@ func TestCreateMetricsExporter(t *testing.T) { func TestCreateTracesExporter(t *testing.T) { endpoint := testutil.GetAvailableLocalAddress(t) tests := []struct { - name string - config *Config - mustFailOnCreate bool - mustFailOnStart bool + name string + config *Config + mustFailOnStart bool }{ - { - name: "NoEndpoint", - config: &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ - Endpoint: "", - }, - }, - mustFailOnCreate: true, - }, { name: "UseSecure", config: &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: endpoint, - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: false, }, }, @@ -77,7 +68,7 @@ func TestCreateTracesExporter(t *testing.T) { { name: "Keepalive", config: &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: endpoint, Keepalive: &configgrpc.KeepaliveClientConfig{ Time: 30 * time.Second, @@ -90,7 +81,7 @@ func TestCreateTracesExporter(t *testing.T) { { name: "NoneCompression", config: &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: endpoint, Compression: "none", }, @@ -99,34 +90,34 @@ func TestCreateTracesExporter(t *testing.T) { { name: "GzipCompression", config: &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: endpoint, - Compression: configcompression.Gzip, + Compression: configcompression.TypeGzip, }, }, }, { name: "SnappyCompression", config: &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: endpoint, - Compression: configcompression.Snappy, + Compression: configcompression.TypeSnappy, }, }, }, { name: "ZstdCompression", config: &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: endpoint, - Compression: configcompression.Zstd, + Compression: configcompression.TypeZstd, }, }, }, { name: "Headers", config: &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: endpoint, Headers: map[string]configopaque.String{ "hdr1": "val1", @@ -138,7 +129,7 @@ func TestCreateTracesExporter(t *testing.T) { { name: "NumConsumers", config: &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: endpoint, }, }, @@ -146,10 +137,10 @@ func TestCreateTracesExporter(t *testing.T) { { name: "CaCert", config: &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: endpoint, - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + TLSSetting: configtls.Config{ CAFile: filepath.Join("testdata", "test_cert.pem"), }, }, @@ -159,10 +150,10 @@ func TestCreateTracesExporter(t *testing.T) { { name: "CertPemFileError", config: &Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ + ClientConfig: configgrpc.ClientConfig{ Endpoint: endpoint, - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + TLSSetting: configtls.Config{ CAFile: "nosuchfile", }, }, @@ -177,10 +168,6 @@ func TestCreateTracesExporter(t *testing.T) { factory := NewFactory() set := exportertest.NewNopCreateSettings() consumer, err := factory.CreateTracesExporter(context.Background(), set, tt.config) - if tt.mustFailOnCreate { - assert.NotNil(t, err) - return - } assert.NoError(t, err) assert.NotNil(t, consumer) err = consumer.Start(context.Background(), componenttest.NewNopHost()) @@ -203,7 +190,7 @@ func TestCreateTracesExporter(t *testing.T) { func TestCreateLogsExporter(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig().(*Config) - cfg.GRPCClientSettings.Endpoint = testutil.GetAvailableLocalAddress(t) + cfg.ClientConfig.Endpoint = testutil.GetAvailableLocalAddress(t) set := exportertest.NewNopCreateSettings() oexp, err := factory.CreateLogsExporter(context.Background(), set, cfg) diff --git a/exporter/otlpexporter/go.mod b/exporter/otlpexporter/go.mod index c0f1eae71a1..8762e4cc0f9 100644 --- a/exporter/otlpexporter/go.mod +++ b/exporter/otlpexporter/go.mod @@ -1,66 +1,82 @@ module go.opentelemetry.io/collector/exporter/otlpexporter -go 1.20 +go 1.21 require ( github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.85.0 - go.opentelemetry.io/collector/component v0.85.0 - go.opentelemetry.io/collector/config/configauth v0.85.0 - go.opentelemetry.io/collector/config/configcompression v0.85.0 - go.opentelemetry.io/collector/config/configgrpc v0.85.0 - go.opentelemetry.io/collector/config/configopaque v0.85.0 - go.opentelemetry.io/collector/config/configtls v0.85.0 - go.opentelemetry.io/collector/confmap v0.85.0 - go.opentelemetry.io/collector/consumer v0.85.0 - go.opentelemetry.io/collector/exporter v0.85.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0014 - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 - google.golang.org/grpc v1.58.1 - google.golang.org/protobuf v1.31.0 + go.opentelemetry.io/collector v0.96.0 + go.opentelemetry.io/collector/component v0.96.0 + go.opentelemetry.io/collector/config/configauth v0.96.0 + go.opentelemetry.io/collector/config/configcompression v0.96.0 + go.opentelemetry.io/collector/config/configgrpc v0.96.0 + go.opentelemetry.io/collector/config/configopaque v1.3.0 + go.opentelemetry.io/collector/config/configretry v0.96.0 + go.opentelemetry.io/collector/config/configtls v0.96.0 + go.opentelemetry.io/collector/confmap v0.96.0 + go.opentelemetry.io/collector/consumer v0.96.0 + go.opentelemetry.io/collector/exporter v0.96.0 + go.opentelemetry.io/collector/pdata v1.3.0 + go.opentelemetry.io/otel/metric v1.24.0 + go.opentelemetry.io/otel/trace v1.24.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 + google.golang.org/grpc v1.62.0 + google.golang.org/protobuf v1.32.0 ) require ( - cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 // indirect + github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect + github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.0 // indirect + github.com/klauspost/compress v1.17.4 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.0.1 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/mostynb/go-grpc-compression v1.2.1 // indirect + github.com/mostynb/go-grpc-compression v1.2.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector/config/confignet v0.85.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.85.0 // indirect - go.opentelemetry.io/collector/config/internal v0.85.0 // indirect - go.opentelemetry.io/collector/extension v0.85.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.85.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0014 // indirect - go.opentelemetry.io/collector/service v0.0.0-20230915215502-07938f20fcc7 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.44.0 // indirect - go.opentelemetry.io/otel v1.18.0 // indirect - go.opentelemetry.io/otel/metric v1.18.0 // indirect - go.opentelemetry.io/otel/sdk v1.18.0 // indirect - go.opentelemetry.io/otel/sdk/metric v0.41.0 // indirect - go.opentelemetry.io/otel/trace v1.18.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/confignet v0.96.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect + go.opentelemetry.io/collector/config/internal v0.96.0 // indirect + go.opentelemetry.io/collector/extension v0.96.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.96.0 // indirect + go.opentelemetry.io/collector/featuregate v1.3.0 // indirect + go.opentelemetry.io/collector/receiver v0.96.0 // indirect + go.opentelemetry.io/contrib/config v0.4.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect + go.opentelemetry.io/proto/otlp v1.1.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -94,16 +110,8 @@ replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/pdata => ../../pdata -replace go.opentelemetry.io/collector/processor => ../../processor - replace go.opentelemetry.io/collector/receiver => ../../receiver -replace go.opentelemetry.io/collector/semconv => ../../semconv - -replace go.opentelemetry.io/collector/service => ../../service - -replace go.opentelemetry.io/collector/extension/zpagesextension => ../../extension/zpagesextension - replace go.opentelemetry.io/collector/consumer => ../../consumer retract ( @@ -111,6 +119,6 @@ retract ( v0.69.0 // Release failed, use v0.69.1 ) -replace go.opentelemetry.io/collector/connector => ../../connector - replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry + +replace go.opentelemetry.io/collector/config/configretry => ../../config/configretry diff --git a/exporter/otlpexporter/go.sum b/exporter/otlpexporter/go.sum index 201aa810ed2..d617159313d 100644 --- a/exporter/otlpexporter/go.sum +++ b/exporter/otlpexporter/go.sum @@ -1,84 +1,62 @@ -cloud.google.com/go v0.26.0 h1:e0WKqKTd5BnrG8aKH3J3h+QvEIQtSUcf2n5UZ5ZgLtQ= -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go/compute v1.21.0 h1:JNBsyXVoOoNJtTQcnEY5uYpZIbeCTYIeDe0Xh1bySMk= +cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= +cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 h1:aRVqY1p2IJaBGStWMsQMpkAa83cPkCDLl80eOj0Rbz4= cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68/go.mod h1:1a3eRNYX12fs5UABBIXS8HXVvQbX9hRB/RkEBPORpe8= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= 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= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= +github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= -github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= +github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= -github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -86,91 +64,84 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mostynb/go-grpc-compression v1.2.1 h1:16tdYxBZSD8p9AUmvw4F7Nyc2T4/eE7XsIXrgxSEcJI= -github.com/mostynb/go-grpc-compression v1.2.1/go.mod h1:oidYvYyefMmhcuvU8fLJ8FfZyTyVzJ6SkmD5fIKgRe8= +github.com/mostynb/go-grpc-compression v1.2.2 h1:XaDbnRvt2+1vgr0b/l0qh4mJAfIxE0bKXtz2Znl3GGI= +github.com/mostynb/go-grpc-compression v1.2.2/go.mod h1:GOCr2KBxXcblCuczg3YdLQlcin1/NfyDA348ckuCH6w= 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/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= -go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.44.0 h1:b8xjZxHbLrXAum4SxJd1Rlm7Y/fKaB+6ACI7/e5EfSA= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.44.0/go.mod h1:1ei0a32xOGkFoySu7y1DAHfcuIhC0pNZpvY2huXuMy4= -go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= -go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/exporters/prometheus v0.41.0 h1:A3/bhjP5SmELy8dcpK+uttHeh9Qrh+YnS16/VzrztRQ= -go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= -go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= -go.opentelemetry.io/otel/sdk v1.18.0 h1:e3bAB0wB3MljH38sHzpV/qWrOTCFrdZF2ct9F8rBkcY= -go.opentelemetry.io/otel/sdk v1.18.0/go.mod h1:1RCygWV7plY2KmdskZEDDBs4tJeHG92MdHZIluiYs/M= -go.opentelemetry.io/otel/sdk/metric v0.41.0 h1:c3sAt9/pQ5fSIUfl0gPtClV3HhE18DCVzByD33R/zsk= -go.opentelemetry.io/otel/sdk/metric v0.41.0/go.mod h1:PmOmSt+iOklKtIg5O4Vz9H/ttcRFSNTgii+E1KGyn1w= -go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= -go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= +go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 h1:UNQQKPfTDe1J81ViolILjTKPr9WetKW6uei2hFgJmFs= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 h1:Mw5xcxMwlqoJd97vwPxA8isEaIoxsta9/Q51+TTJLGE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0/go.mod h1:CQNu9bj7o7mC6U7+CA/schKEYakYXWr79ucDHTMGhCM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 h1:s0PHtIkN+3xrbDOpt2M8OTG92cWqUESvzh2MxiR5xY8= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0/go.mod h1:hZlFbDbRt++MMPCCfSJfmhkGIWnX1h3XjkfxZUjLrIA= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= +golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -178,39 +149,22 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= -google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +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= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/exporter/otlpexporter/internal/metadata/generated_status.go b/exporter/otlpexporter/internal/metadata/generated_status.go new file mode 100644 index 00000000000..4b0d0f0ecd5 --- /dev/null +++ b/exporter/otlpexporter/internal/metadata/generated_status.go @@ -0,0 +1,29 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" +) + +var ( + Type = component.MustNewType("otlp") + scopeName = "go.opentelemetry.io/collector/exporter/otlpexporter" +) + +const ( + LogsStability = component.StabilityLevelBeta + TracesStability = component.StabilityLevelStable + MetricsStability = component.StabilityLevelStable +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter(scopeName) +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer(scopeName) +} diff --git a/exporter/otlpexporter/metadata.yaml b/exporter/otlpexporter/metadata.yaml new file mode 100644 index 00000000000..820930b1dc5 --- /dev/null +++ b/exporter/otlpexporter/metadata.yaml @@ -0,0 +1,8 @@ +type: otlp + +status: + class: exporter + stability: + stable: [traces, metrics] + beta: [logs] + distributions: [core, contrib] diff --git a/exporter/otlpexporter/otlp.go b/exporter/otlpexporter/otlp.go index 2c60c39ee4a..21864d7723a 100644 --- a/exporter/otlpexporter/otlp.go +++ b/exporter/otlpexporter/otlp.go @@ -5,11 +5,11 @@ package otlpexporter // import "go.opentelemetry.io/collector/exporter/otlpexpor import ( "context" - "errors" "fmt" "runtime" "time" + "go.uber.org/zap" "google.golang.org/genproto/googleapis/rpc/errdetails" "google.golang.org/grpc" "google.golang.org/grpc/codes" @@ -46,37 +46,31 @@ type baseExporter struct { userAgent string } -// Crete new exporter and start it. The exporter will begin connecting but -// this function may return before the connection is established. -func newExporter(cfg component.Config, set exporter.CreateSettings) (*baseExporter, error) { +func newExporter(cfg component.Config, set exporter.CreateSettings) *baseExporter { oCfg := cfg.(*Config) - if oCfg.Endpoint == "" { - return nil, errors.New("OTLP exporter config requires an Endpoint") - } - userAgent := fmt.Sprintf("%s/%s (%s/%s)", set.BuildInfo.Description, set.BuildInfo.Version, runtime.GOOS, runtime.GOARCH) - return &baseExporter{config: oCfg, settings: set.TelemetrySettings, userAgent: userAgent}, nil + return &baseExporter{config: oCfg, settings: set.TelemetrySettings, userAgent: userAgent} } // start actually creates the gRPC connection. The client construction is deferred till this point as this // is the only place we get hold of Extensions which are required to construct auth round tripper. func (e *baseExporter) start(ctx context.Context, host component.Host) (err error) { - if e.clientConn, err = e.config.GRPCClientSettings.ToClientConn(ctx, host, e.settings, grpc.WithUserAgent(e.userAgent)); err != nil { + if e.clientConn, err = e.config.ClientConfig.ToClientConn(ctx, host, e.settings, grpc.WithUserAgent(e.userAgent)); err != nil { return err } e.traceExporter = ptraceotlp.NewGRPCClient(e.clientConn) e.metricExporter = pmetricotlp.NewGRPCClient(e.clientConn) e.logExporter = plogotlp.NewGRPCClient(e.clientConn) headers := map[string]string{} - for k, v := range e.config.GRPCClientSettings.Headers { + for k, v := range e.config.ClientConfig.Headers { headers[k] = string(v) } e.metadata = metadata.New(headers) e.callOptions = []grpc.CallOption{ - grpc.WaitForReady(e.config.GRPCClientSettings.WaitForReady), + grpc.WaitForReady(e.config.ClientConfig.WaitForReady), } return @@ -97,7 +91,10 @@ func (e *baseExporter) pushTraces(ctx context.Context, td ptrace.Traces) error { } partialSuccess := resp.PartialSuccess() if !(partialSuccess.ErrorMessage() == "" && partialSuccess.RejectedSpans() == 0) { - return consumererror.NewPermanent(fmt.Errorf("OTLP partial success: \"%s\" (%d rejected)", resp.PartialSuccess().ErrorMessage(), resp.PartialSuccess().RejectedSpans())) + e.settings.Logger.Warn("Partial success response", + zap.String("message", resp.PartialSuccess().ErrorMessage()), + zap.Int64("dropped_spans", resp.PartialSuccess().RejectedSpans()), + ) } return nil } @@ -110,7 +107,10 @@ func (e *baseExporter) pushMetrics(ctx context.Context, md pmetric.Metrics) erro } partialSuccess := resp.PartialSuccess() if !(partialSuccess.ErrorMessage() == "" && partialSuccess.RejectedDataPoints() == 0) { - return consumererror.NewPermanent(fmt.Errorf("OTLP partial success: \"%s\" (%d rejected)", resp.PartialSuccess().ErrorMessage(), resp.PartialSuccess().RejectedDataPoints())) + e.settings.Logger.Warn("Partial success response", + zap.String("message", resp.PartialSuccess().ErrorMessage()), + zap.Int64("dropped_data_points", resp.PartialSuccess().RejectedDataPoints()), + ) } return nil } @@ -123,7 +123,10 @@ func (e *baseExporter) pushLogs(ctx context.Context, ld plog.Logs) error { } partialSuccess := resp.PartialSuccess() if !(partialSuccess.ErrorMessage() == "" && partialSuccess.RejectedLogRecords() == 0) { - return consumererror.NewPermanent(fmt.Errorf("OTLP partial success: \"%s\" (%d rejected)", resp.PartialSuccess().ErrorMessage(), resp.PartialSuccess().RejectedLogRecords())) + e.settings.Logger.Warn("Partial success response", + zap.String("message", resp.PartialSuccess().ErrorMessage()), + zap.Int64("dropped_log_records", resp.PartialSuccess().RejectedLogRecords()), + ) } return nil } diff --git a/exporter/otlpexporter/otlp_test.go b/exporter/otlpexporter/otlp_test.go index 3d7d7eef6ff..d1c4f622bc0 100644 --- a/exporter/otlpexporter/otlp_test.go +++ b/exporter/otlpexporter/otlp_test.go @@ -15,6 +15,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/zap" + "go.uber.org/zap/zaptest/observer" "google.golang.org/genproto/googleapis/rpc/errdetails" "google.golang.org/grpc" "google.golang.org/grpc/codes" @@ -234,10 +236,10 @@ func TestSendTraces(t *testing.T) { cfg := factory.CreateDefaultConfig().(*Config) // Disable queuing to ensure that we execute the request when calling ConsumeTraces // otherwise we will not see any errors. - cfg.QueueSettings.Enabled = false - cfg.GRPCClientSettings = configgrpc.GRPCClientSettings{ + cfg.QueueConfig.Enabled = false + cfg.ClientConfig = configgrpc.ClientConfig{ Endpoint: ln.Addr().String(), - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: true, }, Headers: map[string]configopaque.String{ @@ -247,6 +249,11 @@ func TestSendTraces(t *testing.T) { set := exportertest.NewNopCreateSettings() set.BuildInfo.Description = "Collector" set.BuildInfo.Version = "1.2.3test" + + // For testing the "Partial success" warning. + logger, observed := observer.New(zap.DebugLevel) + set.TelemetrySettings.Logger = zap.New(logger) + exp, err := factory.CreateTracesExporter(context.Background(), set, cfg) require.NoError(t, err) require.NotNil(t, exp) @@ -310,7 +317,9 @@ func TestSendTraces(t *testing.T) { td = testdata.GenerateTraces(2) err = exp.ConsumeTraces(context.Background(), td) - assert.Error(t, err) + assert.NoError(t, err) + assert.Len(t, observed.FilterLevelExact(zap.WarnLevel).All(), 1) + assert.Contains(t, observed.FilterLevelExact(zap.WarnLevel).All()[0].Message, "Partial success") } func TestSendTracesWhenEndpointHasHttpScheme(t *testing.T) { @@ -318,20 +327,20 @@ func TestSendTracesWhenEndpointHasHttpScheme(t *testing.T) { name string useTLS bool scheme string - gRPCClientSettings configgrpc.GRPCClientSettings + gRPCClientSettings configgrpc.ClientConfig }{ { name: "Use https scheme", useTLS: true, scheme: "https://", - gRPCClientSettings: configgrpc.GRPCClientSettings{}, + gRPCClientSettings: configgrpc.ClientConfig{}, }, { name: "Use http scheme", useTLS: false, scheme: "http://", - gRPCClientSettings: configgrpc.GRPCClientSettings{ - TLSSetting: configtls.TLSClientSetting{ + gRPCClientSettings: configgrpc.ClientConfig{ + TLSSetting: configtls.ClientConfig{ Insecure: true, }, }, @@ -351,10 +360,10 @@ func TestSendTracesWhenEndpointHasHttpScheme(t *testing.T) { // Start an OTLP exporter and point to the receiver. factory := NewFactory() cfg := factory.CreateDefaultConfig().(*Config) - cfg.GRPCClientSettings = test.gRPCClientSettings - cfg.GRPCClientSettings.Endpoint = test.scheme + ln.Addr().String() + cfg.ClientConfig = test.gRPCClientSettings + cfg.ClientConfig.Endpoint = test.scheme + ln.Addr().String() if test.useTLS { - cfg.GRPCClientSettings.TLSSetting.InsecureSkipVerify = true + cfg.ClientConfig.TLSSetting.InsecureSkipVerify = true } set := exportertest.NewNopCreateSettings() exp, err := factory.CreateTracesExporter(context.Background(), set, cfg) @@ -399,10 +408,10 @@ func TestSendMetrics(t *testing.T) { cfg := factory.CreateDefaultConfig().(*Config) // Disable queuing to ensure that we execute the request when calling ConsumeMetrics // otherwise we will not see any errors. - cfg.QueueSettings.Enabled = false - cfg.GRPCClientSettings = configgrpc.GRPCClientSettings{ + cfg.QueueConfig.Enabled = false + cfg.ClientConfig = configgrpc.ClientConfig{ Endpoint: ln.Addr().String(), - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: true, }, Headers: map[string]configopaque.String{ @@ -412,6 +421,11 @@ func TestSendMetrics(t *testing.T) { set := exportertest.NewNopCreateSettings() set.BuildInfo.Description = "Collector" set.BuildInfo.Version = "1.2.3test" + + // For testing the "Partial success" warning. + logger, observed := observer.New(zap.DebugLevel) + set.TelemetrySettings.Logger = zap.New(logger) + exp, err := factory.CreateMetricsExporter(context.Background(), set, cfg) require.NoError(t, err) require.NotNil(t, exp) @@ -484,7 +498,9 @@ func TestSendMetrics(t *testing.T) { // Send two metrics. md = testdata.GenerateMetrics(2) - assert.Error(t, exp.ConsumeMetrics(context.Background(), md)) + assert.NoError(t, exp.ConsumeMetrics(context.Background(), md)) + assert.Len(t, observed.FilterLevelExact(zap.WarnLevel).All(), 1) + assert.Contains(t, observed.FilterLevelExact(zap.WarnLevel).All()[0].Message, "Partial success") } func TestSendTraceDataServerDownAndUp(t *testing.T) { @@ -497,10 +513,10 @@ func TestSendTraceDataServerDownAndUp(t *testing.T) { cfg := factory.CreateDefaultConfig().(*Config) // Disable queuing to ensure that we execute the request when calling ConsumeTraces // otherwise we will not see the error. - cfg.QueueSettings.Enabled = false - cfg.GRPCClientSettings = configgrpc.GRPCClientSettings{ + cfg.QueueConfig.Enabled = false + cfg.ClientConfig = configgrpc.ClientConfig{ Endpoint: ln.Addr().String(), - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: true, }, // Need to wait for every request blocking until either request timeouts or succeed. @@ -558,9 +574,9 @@ func TestSendTraceDataServerStartWhileRequest(t *testing.T) { // Start an OTLP exporter and point to the receiver. factory := NewFactory() cfg := factory.CreateDefaultConfig().(*Config) - cfg.GRPCClientSettings = configgrpc.GRPCClientSettings{ + cfg.ClientConfig = configgrpc.ClientConfig{ Endpoint: ln.Addr().String(), - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: true, }, } @@ -608,10 +624,10 @@ func TestSendTracesOnResourceExhaustion(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig().(*Config) - cfg.RetrySettings.InitialInterval = 0 - cfg.GRPCClientSettings = configgrpc.GRPCClientSettings{ + cfg.RetryConfig.InitialInterval = 0 + cfg.ClientConfig = configgrpc.ClientConfig{ Endpoint: ln.Addr().String(), - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: true, }, } @@ -689,16 +705,21 @@ func TestSendLogData(t *testing.T) { cfg := factory.CreateDefaultConfig().(*Config) // Disable queuing to ensure that we execute the request when calling ConsumeLogs // otherwise we will not see any errors. - cfg.QueueSettings.Enabled = false - cfg.GRPCClientSettings = configgrpc.GRPCClientSettings{ + cfg.QueueConfig.Enabled = false + cfg.ClientConfig = configgrpc.ClientConfig{ Endpoint: ln.Addr().String(), - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: true, }, } set := exportertest.NewNopCreateSettings() set.BuildInfo.Description = "Collector" set.BuildInfo.Version = "1.2.3test" + + // For testing the "Partial success" warning. + logger, observed := observer.New(zap.DebugLevel) + set.TelemetrySettings.Logger = zap.New(logger) + exp, err := factory.CreateLogsExporter(context.Background(), set, cfg) require.NoError(t, err) require.NotNil(t, exp) @@ -770,5 +791,7 @@ func TestSendLogData(t *testing.T) { ld = testdata.GenerateLogs(2) err = exp.ConsumeLogs(context.Background(), ld) - assert.Error(t, err) + assert.NoError(t, err) + assert.Len(t, observed.FilterLevelExact(zap.WarnLevel).All(), 1) + assert.Contains(t, observed.FilterLevelExact(zap.WarnLevel).All()[0].Message, "Partial success") } diff --git a/exporter/otlpexporter/package_test.go b/exporter/otlpexporter/package_test.go new file mode 100644 index 00000000000..c5fb1007f5b --- /dev/null +++ b/exporter/otlpexporter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otlpexporter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/otlpexporter/testdata/invalid_configs.yaml b/exporter/otlpexporter/testdata/invalid_configs.yaml new file mode 100644 index 00000000000..73c24e3f13e --- /dev/null +++ b/exporter/otlpexporter/testdata/invalid_configs.yaml @@ -0,0 +1,55 @@ +no_endpoint: + timeout: 10s + sending_queue: + enabled: true + num_consumers: 2 + queue_size: 10 + retry_on_failure: + enabled: true + initial_interval: 10s + randomization_factor: 0.7 + multiplier: 1.3 + max_interval: 60s + max_elapsed_time: 10m +http_endpoint: + endpoint: http:// + timeout: 10s + sending_queue: + enabled: true + num_consumers: 2 + queue_size: 10 + retry_on_failure: + enabled: true + initial_interval: 10s + randomization_factor: 0.7 + multiplier: 1.3 + max_interval: 60s + max_elapsed_time: 10m +invalid_timeout: + endpoint: example.com:443 + timeout: -5s + sending_queue: + enabled: true + num_consumers: 2 + queue_size: 10 + retry_on_failure: + enabled: true + initial_interval: 10s + randomization_factor: 0.7 + multiplier: 1.3 + max_interval: 60s + max_elapsed_time: 10m +invalid_retry: + endpoint: example.com:443 + timeout: 30s + sending_queue: + enabled: true + num_consumers: 2 + queue_size: 10 + retry_on_failure: + enabled: true + initial_interval: 10s + randomization_factor: -5 + multiplier: 1.3 + max_interval: 60s + max_elapsed_time: 10m diff --git a/exporter/otlphttpexporter/README.md b/exporter/otlphttpexporter/README.md index 5dfc1b9874c..fb15c0dab7a 100644 --- a/exporter/otlphttpexporter/README.md +++ b/exporter/otlphttpexporter/README.md @@ -1,12 +1,18 @@ # OTLP/HTTP Exporter -| Status | | -| ------------------------ | --------------------- | -| Stability | traces [stable] | -| | metrics [stable] | -| | logs [beta] | -| Supported pipeline types | traces, metrics, logs | -| Distributions | [core], [contrib] | + +| Status | | +| ------------- |-----------| +| Stability | [beta]: logs | +| | [stable]: traces, metrics | +| Distributions | [core], [contrib] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fotlphttp%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fotlphttp) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fotlphttp%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fotlphttp) | + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[stable]: https://github.com/open-telemetry/opentelemetry-collector#stable +[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib + Export traces and/or metrics via HTTP using [OTLP]( https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specification.md) @@ -31,6 +37,7 @@ The following settings can be optionally configured: - `timeout` (default = 30s): HTTP request time limit. For details see https://golang.org/pkg/net/http/#Client - `read_buffer_size` (default = 0): ReadBufferSize for HTTP client. - `write_buffer_size` (default = 512 * 1024): WriteBufferSize for HTTP client. +- `encoding` (default = proto): The encoding to use for the messages (valid options: `proto`, `json`) Example: @@ -49,10 +56,14 @@ exporters: compression: none ``` +By default `proto` encoding is used, to change the content encoding of the message configure it as follows: + +```yaml +exporters: + otlphttp: + ... + encoding: json +``` + The full list of settings exposed for this exporter are documented [here](./config.go) with detailed sample configurations [here](./testdata/config.yaml). - -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta -[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol -[stable]: https://github.com/open-telemetry/opentelemetry-collector#stable diff --git a/exporter/otlphttpexporter/config.go b/exporter/otlphttpexporter/config.go index 692f7e0124b..ef59fc324a0 100644 --- a/exporter/otlphttpexporter/config.go +++ b/exporter/otlphttpexporter/config.go @@ -4,18 +4,50 @@ package otlphttpexporter // import "go.opentelemetry.io/collector/exporter/otlphttpexporter" import ( + "encoding" "errors" + "fmt" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" ) +// EncodingType defines the type for content encoding +type EncodingType string + +const ( + EncodingProto EncodingType = "proto" + EncodingJSON EncodingType = "json" +) + +var _ encoding.TextUnmarshaler = (*EncodingType)(nil) + +// UnmarshalText unmarshalls text to an EncodingType. +func (e *EncodingType) UnmarshalText(text []byte) error { + if e == nil { + return errors.New("cannot unmarshal to a nil *EncodingType") + } + + str := string(text) + switch str { + case string(EncodingProto): + *e = EncodingProto + case string(EncodingJSON): + *e = EncodingJSON + default: + return fmt.Errorf("invalid encoding type: %s", str) + } + + return nil +} + // Config defines configuration for OTLP/HTTP exporter. type Config struct { - confighttp.HTTPClientSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. - exporterhelper.QueueSettings `mapstructure:"sending_queue"` - exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` + confighttp.ClientConfig `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + QueueConfig exporterhelper.QueueSettings `mapstructure:"sending_queue"` + RetryConfig configretry.BackOffConfig `mapstructure:"retry_on_failure"` // The URL to send traces to. If omitted the Endpoint + "/v1/traces" will be used. TracesEndpoint string `mapstructure:"traces_endpoint"` @@ -25,6 +57,9 @@ type Config struct { // The URL to send logs to. If omitted the Endpoint + "/v1/logs" will be used. LogsEndpoint string `mapstructure:"logs_endpoint"` + + // The encoding to export telemetry (default: "proto") + Encoding EncodingType `mapstructure:"encoding"` } var _ component.Config = (*Config)(nil) diff --git a/exporter/otlphttpexporter/config_test.go b/exporter/otlphttpexporter/config_test.go index 35b2d15a160..04bb1041036 100644 --- a/exporter/otlphttpexporter/config_test.go +++ b/exporter/otlphttpexporter/config_test.go @@ -14,6 +14,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/confmaptest" @@ -37,7 +38,7 @@ func TestUnmarshalConfig(t *testing.T) { assert.NoError(t, component.UnmarshalConfig(cm, cfg)) assert.Equal(t, &Config{ - RetrySettings: exporterhelper.RetrySettings{ + RetryConfig: configretry.BackOffConfig{ Enabled: true, InitialInterval: 10 * time.Second, RandomizationFactor: 0.7, @@ -45,20 +46,21 @@ func TestUnmarshalConfig(t *testing.T) { MaxInterval: 1 * time.Minute, MaxElapsedTime: 10 * time.Minute, }, - QueueSettings: exporterhelper.QueueSettings{ + QueueConfig: exporterhelper.QueueSettings{ Enabled: true, NumConsumers: 2, QueueSize: 10, }, - HTTPClientSettings: confighttp.HTTPClientSettings{ + Encoding: EncodingProto, + ClientConfig: confighttp.ClientConfig{ Headers: map[string]configopaque.String{ "can you have a . here?": "F0000000-0000-0000-0000-000000000000", "header1": "234", "another": "somevalue", }, Endpoint: "https://1.2.3.4:1234", - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + TLSSetting: configtls.Config{ CAFile: "/var/lib/mycert.pem", CertFile: "certfile", KeyFile: "keyfile", @@ -72,3 +74,57 @@ func TestUnmarshalConfig(t *testing.T) { }, }, cfg) } + +func TestUnmarshalConfigInvalidEncoding(t *testing.T) { + cm, err := confmaptest.LoadConf(filepath.Join("testdata", "bad_invalid_encoding.yaml")) + require.NoError(t, err) + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + assert.Error(t, component.UnmarshalConfig(cm, cfg)) +} + +func TestUnmarshalEncoding(t *testing.T) { + tests := []struct { + name string + encodingBytes []byte + expected EncodingType + shouldError bool + }{ + { + name: "UnmarshalEncodingProto", + encodingBytes: []byte("proto"), + expected: EncodingProto, + shouldError: false, + }, + { + name: "UnmarshalEncodingJson", + encodingBytes: []byte("json"), + expected: EncodingJSON, + shouldError: false, + }, + { + name: "UnmarshalEmptyEncoding", + encodingBytes: []byte(""), + shouldError: true, + }, + { + name: "UnmarshalInvalidEncoding", + encodingBytes: []byte("invalid"), + shouldError: true, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + var encoding EncodingType + err := encoding.UnmarshalText(tt.encodingBytes) + + if tt.shouldError { + assert.Error(t, err) + } else { + assert.NoError(t, err) + assert.Equal(t, tt.expected, encoding) + } + }) + } +} diff --git a/exporter/otlphttpexporter/doc.go b/exporter/otlphttpexporter/doc.go index 3e1f11cc5df..16eccd7cbd4 100644 --- a/exporter/otlphttpexporter/doc.go +++ b/exporter/otlphttpexporter/doc.go @@ -1,5 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +//go:generate mdatagen metadata.yaml + // Package otlphttpexporter exports data by using the OTLP format to an HTTP endpoint. package otlphttpexporter // import "go.opentelemetry.io/collector/exporter/otlphttpexporter" diff --git a/exporter/otlphttpexporter/factory.go b/exporter/otlphttpexporter/factory.go index 4bdbcdf40fd..9ebcc01fba1 100644 --- a/exporter/otlphttpexporter/factory.go +++ b/exporter/otlphttpexporter/factory.go @@ -14,37 +14,35 @@ import ( "go.opentelemetry.io/collector/config/configcompression" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" -) - -const ( - // The value of "type" key in configuration. - typeStr = "otlphttp" + "go.opentelemetry.io/collector/exporter/otlphttpexporter/internal/metadata" ) // NewFactory creates a factory for OTLP exporter. func NewFactory() exporter.Factory { return exporter.NewFactory( - typeStr, + metadata.Type, createDefaultConfig, - exporter.WithTraces(createTracesExporter, component.StabilityLevelStable), - exporter.WithMetrics(createMetricsExporter, component.StabilityLevelStable), - exporter.WithLogs(createLogsExporter, component.StabilityLevelBeta), + exporter.WithTraces(createTracesExporter, metadata.TracesStability), + exporter.WithMetrics(createMetricsExporter, metadata.MetricsStability), + exporter.WithLogs(createLogsExporter, metadata.LogsStability), ) } func createDefaultConfig() component.Config { return &Config{ - RetrySettings: exporterhelper.NewDefaultRetrySettings(), - QueueSettings: exporterhelper.NewDefaultQueueSettings(), - HTTPClientSettings: confighttp.HTTPClientSettings{ + RetryConfig: configretry.NewDefaultBackOffConfig(), + QueueConfig: exporterhelper.NewDefaultQueueSettings(), + Encoding: EncodingProto, + ClientConfig: confighttp.ClientConfig{ Endpoint: "", Timeout: 30 * time.Second, Headers: map[string]configopaque.String{}, // Default to gzip compression - Compression: configcompression.Gzip, + Compression: configcompression.TypeGzip, // We almost read 0 bytes, so no need to tune ReadBufferSize. WriteBufferSize: 512 * 1024, }, @@ -91,8 +89,8 @@ func createTracesExporter( exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), // explicitly disable since we rely on http.Client timeout logic. exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), - exporterhelper.WithRetry(oCfg.RetrySettings), - exporterhelper.WithQueue(oCfg.QueueSettings)) + exporterhelper.WithRetry(oCfg.RetryConfig), + exporterhelper.WithQueue(oCfg.QueueConfig)) } func createMetricsExporter( @@ -117,8 +115,8 @@ func createMetricsExporter( exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), // explicitly disable since we rely on http.Client timeout logic. exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), - exporterhelper.WithRetry(oCfg.RetrySettings), - exporterhelper.WithQueue(oCfg.QueueSettings)) + exporterhelper.WithRetry(oCfg.RetryConfig), + exporterhelper.WithQueue(oCfg.QueueConfig)) } func createLogsExporter( @@ -143,6 +141,6 @@ func createLogsExporter( exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), // explicitly disable since we rely on http.Client timeout logic. exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), - exporterhelper.WithRetry(oCfg.RetrySettings), - exporterhelper.WithQueue(oCfg.QueueSettings)) + exporterhelper.WithRetry(oCfg.RetryConfig), + exporterhelper.WithQueue(oCfg.QueueConfig)) } diff --git a/exporter/otlphttpexporter/factory_test.go b/exporter/otlphttpexporter/factory_test.go index ba6d4d1c835..a36a9548d95 100644 --- a/exporter/otlphttpexporter/factory_test.go +++ b/exporter/otlphttpexporter/factory_test.go @@ -28,20 +28,21 @@ func TestCreateDefaultConfig(t *testing.T) { assert.NoError(t, componenttest.CheckConfigStruct(cfg)) ocfg, ok := factory.CreateDefaultConfig().(*Config) assert.True(t, ok) - assert.Equal(t, ocfg.HTTPClientSettings.Endpoint, "") - assert.Equal(t, ocfg.HTTPClientSettings.Timeout, 30*time.Second, "default timeout is 30 second") - assert.Equal(t, ocfg.RetrySettings.Enabled, true, "default retry is enabled") - assert.Equal(t, ocfg.RetrySettings.MaxElapsedTime, 300*time.Second, "default retry MaxElapsedTime") - assert.Equal(t, ocfg.RetrySettings.InitialInterval, 5*time.Second, "default retry InitialInterval") - assert.Equal(t, ocfg.RetrySettings.MaxInterval, 30*time.Second, "default retry MaxInterval") - assert.Equal(t, ocfg.QueueSettings.Enabled, true, "default sending queue is enabled") - assert.Equal(t, ocfg.Compression, configcompression.Gzip) + assert.Equal(t, ocfg.ClientConfig.Endpoint, "") + assert.Equal(t, ocfg.ClientConfig.Timeout, 30*time.Second, "default timeout is 30 second") + assert.Equal(t, ocfg.RetryConfig.Enabled, true, "default retry is enabled") + assert.Equal(t, ocfg.RetryConfig.MaxElapsedTime, 300*time.Second, "default retry MaxElapsedTime") + assert.Equal(t, ocfg.RetryConfig.InitialInterval, 5*time.Second, "default retry InitialInterval") + assert.Equal(t, ocfg.RetryConfig.MaxInterval, 30*time.Second, "default retry MaxInterval") + assert.Equal(t, ocfg.QueueConfig.Enabled, true, "default sending queue is enabled") + assert.Equal(t, ocfg.Encoding, EncodingProto) + assert.Equal(t, ocfg.Compression, configcompression.TypeGzip) } func TestCreateMetricsExporter(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig().(*Config) - cfg.HTTPClientSettings.Endpoint = "http://" + testutil.GetAvailableLocalAddress(t) + cfg.ClientConfig.Endpoint = "http://" + testutil.GetAvailableLocalAddress(t) set := exportertest.NewNopCreateSettings() oexp, err := factory.CreateMetricsExporter(context.Background(), set, cfg) @@ -61,7 +62,7 @@ func TestCreateTracesExporter(t *testing.T) { { name: "NoEndpoint", config: &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: "", }, }, @@ -70,9 +71,9 @@ func TestCreateTracesExporter(t *testing.T) { { name: "UseSecure", config: &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: endpoint, - TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.ClientConfig{ Insecure: false, }, }, @@ -81,7 +82,7 @@ func TestCreateTracesExporter(t *testing.T) { { name: "Headers", config: &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: endpoint, Headers: map[string]configopaque.String{ "hdr1": "val1", @@ -93,10 +94,10 @@ func TestCreateTracesExporter(t *testing.T) { { name: "CaCert", config: &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: endpoint, - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + TLSSetting: configtls.Config{ CAFile: filepath.Join("testdata", "test_cert.pem"), }, }, @@ -106,10 +107,10 @@ func TestCreateTracesExporter(t *testing.T) { { name: "CertPemFileError", config: &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: endpoint, - TLSSetting: configtls.TLSClientSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: configtls.ClientConfig{ + TLSSetting: configtls.Config{ CAFile: "nosuchfile", }, }, @@ -121,7 +122,7 @@ func TestCreateTracesExporter(t *testing.T) { { name: "NoneCompression", config: &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: endpoint, Compression: "none", }, @@ -130,30 +131,44 @@ func TestCreateTracesExporter(t *testing.T) { { name: "GzipCompression", config: &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: endpoint, - Compression: configcompression.Gzip, + Compression: configcompression.TypeGzip, }, }, }, { name: "SnappyCompression", config: &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: endpoint, - Compression: configcompression.Snappy, + Compression: configcompression.TypeSnappy, }, }, }, { name: "ZstdCompression", config: &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Endpoint: endpoint, - Compression: configcompression.Zstd, + Compression: configcompression.TypeZstd, }, }, }, + { + name: "ProtoEncoding", + config: &Config{ + Encoding: EncodingProto, + ClientConfig: confighttp.ClientConfig{Endpoint: endpoint}, + }, + }, + { + name: "JSONEncoding", + config: &Config{ + Encoding: EncodingJSON, + ClientConfig: confighttp.ClientConfig{Endpoint: endpoint}, + }, + }, } for _, tt := range tests { @@ -186,7 +201,7 @@ func TestCreateTracesExporter(t *testing.T) { func TestCreateLogsExporter(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig().(*Config) - cfg.HTTPClientSettings.Endpoint = "http://" + testutil.GetAvailableLocalAddress(t) + cfg.ClientConfig.Endpoint = "http://" + testutil.GetAvailableLocalAddress(t) set := exportertest.NewNopCreateSettings() oexp, err := factory.CreateLogsExporter(context.Background(), set, cfg) @@ -199,13 +214,13 @@ func TestComposeSignalURL(t *testing.T) { cfg := factory.CreateDefaultConfig().(*Config) // Has slash at end - cfg.HTTPClientSettings.Endpoint = "http://localhost:4318/" + cfg.ClientConfig.Endpoint = "http://localhost:4318/" url, err := composeSignalURL(cfg, "", "traces") require.NoError(t, err) assert.Equal(t, "http://localhost:4318/v1/traces", url) // No slash at end - cfg.HTTPClientSettings.Endpoint = "http://localhost:4318" + cfg.ClientConfig.Endpoint = "http://localhost:4318" url, err = composeSignalURL(cfg, "", "traces") require.NoError(t, err) assert.Equal(t, "http://localhost:4318/v1/traces", url) diff --git a/exporter/otlphttpexporter/go.mod b/exporter/otlphttpexporter/go.mod index 0429d675cd3..20043caf0b6 100644 --- a/exporter/otlphttpexporter/go.mod +++ b/exporter/otlphttpexporter/go.mod @@ -1,71 +1,82 @@ module go.opentelemetry.io/collector/exporter/otlphttpexporter -go 1.20 +go 1.21 require ( github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.85.0 - go.opentelemetry.io/collector/component v0.85.0 - go.opentelemetry.io/collector/config/configcompression v0.85.0 - go.opentelemetry.io/collector/config/confighttp v0.85.0 - go.opentelemetry.io/collector/config/configopaque v0.85.0 - go.opentelemetry.io/collector/config/configtls v0.85.0 - go.opentelemetry.io/collector/confmap v0.85.0 - go.opentelemetry.io/collector/consumer v0.85.0 - go.opentelemetry.io/collector/exporter v0.85.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0014 - go.opentelemetry.io/collector/receiver v0.85.0 - go.opentelemetry.io/collector/receiver/otlpreceiver v0.85.0 - go.uber.org/zap v1.26.0 - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 - google.golang.org/grpc v1.58.1 - google.golang.org/protobuf v1.31.0 + go.opentelemetry.io/collector v0.96.0 + go.opentelemetry.io/collector/component v0.96.0 + go.opentelemetry.io/collector/config/configcompression v0.96.0 + go.opentelemetry.io/collector/config/confighttp v0.96.0 + go.opentelemetry.io/collector/config/configopaque v1.3.0 + go.opentelemetry.io/collector/config/configretry v0.96.0 + go.opentelemetry.io/collector/config/configtls v0.96.0 + go.opentelemetry.io/collector/confmap v0.96.0 + go.opentelemetry.io/collector/consumer v0.96.0 + go.opentelemetry.io/collector/exporter v0.96.0 + go.opentelemetry.io/collector/pdata v1.3.0 + go.opentelemetry.io/otel/metric v1.24.0 + go.opentelemetry.io/otel/trace v1.24.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 + google.golang.org/grpc v1.62.0 + google.golang.org/protobuf v1.32.0 ) require ( + github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/felixge/httpsnoop v1.0.3 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect + github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.0 // indirect + github.com/klauspost/compress v1.17.7 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.0.1 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/mostynb/go-grpc-compression v1.2.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/rs/cors v1.10.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.85.0 // indirect - go.opentelemetry.io/collector/config/configgrpc v0.85.0 // indirect - go.opentelemetry.io/collector/config/confignet v0.85.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.85.0 // indirect - go.opentelemetry.io/collector/config/internal v0.85.0 // indirect - go.opentelemetry.io/collector/extension v0.85.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.85.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0014 // indirect - go.opentelemetry.io/collector/service v0.0.0-20230915215502-07938f20fcc7 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.44.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0 // indirect - go.opentelemetry.io/otel v1.18.0 // indirect - go.opentelemetry.io/otel/metric v1.18.0 // indirect - go.opentelemetry.io/otel/sdk v1.18.0 // indirect - go.opentelemetry.io/otel/sdk/metric v0.41.0 // indirect - go.opentelemetry.io/otel/trace v1.18.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/rs/cors v1.10.1 // indirect + go.opentelemetry.io/collector/config/configauth v0.96.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect + go.opentelemetry.io/collector/config/internal v0.96.0 // indirect + go.opentelemetry.io/collector/extension v0.96.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.96.0 // indirect + go.opentelemetry.io/collector/featuregate v1.3.0 // indirect + go.opentelemetry.io/collector/receiver v0.96.0 // indirect + go.opentelemetry.io/contrib/config v0.4.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect + go.opentelemetry.io/proto/otlp v1.1.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -77,12 +88,8 @@ replace go.opentelemetry.io/collector/config/configauth => ../../config/configau replace go.opentelemetry.io/collector/config/configcompression => ../../config/configcompression -replace go.opentelemetry.io/collector/config/configgrpc => ../../config/configgrpc - replace go.opentelemetry.io/collector/config/confighttp => ../../config/confighttp -replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet - replace go.opentelemetry.io/collector/config/configopaque => ../../config/configopaque replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry @@ -93,8 +100,6 @@ replace go.opentelemetry.io/collector/config/internal => ../../config/internal replace go.opentelemetry.io/collector/confmap => ../../confmap -replace go.opentelemetry.io/collector/connector => ../../connector - replace go.opentelemetry.io/collector/exporter => ../ replace go.opentelemetry.io/collector/extension => ../../extension @@ -105,18 +110,8 @@ replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/pdata => ../../pdata -replace go.opentelemetry.io/collector/processor => ../../processor - replace go.opentelemetry.io/collector/receiver => ../../receiver -replace go.opentelemetry.io/collector/receiver/otlpreceiver => ../../receiver/otlpreceiver - -replace go.opentelemetry.io/collector/semconv => ../../semconv - -replace go.opentelemetry.io/collector/service => ../../service - -replace go.opentelemetry.io/collector/extension/zpagesextension => ../../extension/zpagesextension - replace go.opentelemetry.io/collector/consumer => ../../consumer retract ( @@ -124,5 +119,4 @@ retract ( v0.69.0 // Release failed, use v0.69.1 ) -// ambiguous import: found package cloud.google.com/go/compute/metadata in multiple modules -replace cloud.google.com/go => cloud.google.com/go v0.110.2 +replace go.opentelemetry.io/collector/config/configretry => ../../config/configretry diff --git a/exporter/otlphttpexporter/go.sum b/exporter/otlphttpexporter/go.sum index 0e10debd90b..9d2b7f63d76 100644 --- a/exporter/otlphttpexporter/go.sum +++ b/exporter/otlphttpexporter/go.sum @@ -1,755 +1,56 @@ -cloud.google.com/go v0.110.2 h1:sdFPBr6xG9/wkBbfhmUz/JmZC7X6LavQgcrVINrKiVA= -cloud.google.com/go v0.110.2/go.mod h1:k04UEeEtb6ZBRTv3dZz4CeJC3jKGxyhl0sAiVVquxiw= -cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= -cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= -cloud.google.com/go/accessapproval v1.6.0/go.mod h1:R0EiYnwV5fsRFiKZkPHr6mwyk2wxUJ30nL4j2pcFY2E= -cloud.google.com/go/accesscontextmanager v1.3.0/go.mod h1:TgCBehyr5gNMz7ZaH9xubp+CE8dkrszb4oK9CWyvD4o= -cloud.google.com/go/accesscontextmanager v1.4.0/go.mod h1:/Kjh7BBu/Gh83sv+K60vN9QE5NJcd80sU33vIe2IFPE= -cloud.google.com/go/accesscontextmanager v1.6.0/go.mod h1:8XCvZWfYw3K/ji0iVnp+6pu7huxoQTLmxAbVjbloTtM= -cloud.google.com/go/accesscontextmanager v1.7.0/go.mod h1:CEGLewx8dwa33aDAZQujl7Dx+uYhS0eay198wB/VumQ= -cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= -cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= -cloud.google.com/go/aiplatform v1.27.0/go.mod h1:Bvxqtl40l0WImSb04d0hXFU7gDOiq9jQmorivIiWcKg= -cloud.google.com/go/aiplatform v1.35.0/go.mod h1:7MFT/vCaOyZT/4IIFfxH4ErVg/4ku6lKv3w0+tFTgXQ= -cloud.google.com/go/aiplatform v1.36.1/go.mod h1:WTm12vJRPARNvJ+v6P52RDHCNe4AhvjcIZ/9/RRHy/k= -cloud.google.com/go/aiplatform v1.37.0/go.mod h1:IU2Cv29Lv9oCn/9LkFiiuKfwrRTq+QQMbW+hPCxJGZw= -cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= -cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= -cloud.google.com/go/analytics v0.17.0/go.mod h1:WXFa3WSym4IZ+JiKmavYdJwGG/CvpqiqczmL59bTD9M= -cloud.google.com/go/analytics v0.18.0/go.mod h1:ZkeHGQlcIPkw0R/GW+boWHhCOR43xz9RN/jn7WcqfIE= -cloud.google.com/go/analytics v0.19.0/go.mod h1:k8liqf5/HCnOUkbawNtrWWc+UAzyDlW89doe8TtoDsE= -cloud.google.com/go/apigateway v1.3.0/go.mod h1:89Z8Bhpmxu6AmUxuVRg/ECRGReEdiP3vQtk4Z1J9rJk= -cloud.google.com/go/apigateway v1.4.0/go.mod h1:pHVY9MKGaH9PQ3pJ4YLzoj6U5FUDeDFBllIz7WmzJoc= -cloud.google.com/go/apigateway v1.5.0/go.mod h1:GpnZR3Q4rR7LVu5951qfXPJCHquZt02jf7xQx7kpqN8= -cloud.google.com/go/apigeeconnect v1.3.0/go.mod h1:G/AwXFAKo0gIXkPTVfZDd2qA1TxBXJ3MgMRBQkIi9jc= -cloud.google.com/go/apigeeconnect v1.4.0/go.mod h1:kV4NwOKqjvt2JYR0AoIWo2QGfoRtn/pkS3QlHp0Ni04= -cloud.google.com/go/apigeeconnect v1.5.0/go.mod h1:KFaCqvBRU6idyhSNyn3vlHXc8VMDJdRmwDF6JyFRqZ8= -cloud.google.com/go/apigeeregistry v0.4.0/go.mod h1:EUG4PGcsZvxOXAdyEghIdXwAEi/4MEaoqLMLDMIwKXY= -cloud.google.com/go/apigeeregistry v0.5.0/go.mod h1:YR5+s0BVNZfVOUkMa5pAR2xGd0A473vA5M7j247o1wM= -cloud.google.com/go/apigeeregistry v0.6.0/go.mod h1:BFNzW7yQVLZ3yj0TKcwzb8n25CFBri51GVGOEUcgQsc= -cloud.google.com/go/apikeys v0.4.0/go.mod h1:XATS/yqZbaBK0HOssf+ALHp8jAlNHUgyfprvNcBIszU= -cloud.google.com/go/apikeys v0.5.0/go.mod h1:5aQfwY4D+ewMMWScd3hm2en3hCj+BROlyrt3ytS7KLI= -cloud.google.com/go/apikeys v0.6.0/go.mod h1:kbpXu5upyiAlGkKrJgQl8A0rKNNJ7dQ377pdroRSSi8= -cloud.google.com/go/appengine v1.4.0/go.mod h1:CS2NhuBuDXM9f+qscZ6V86m1MIIqPj3WC/UoEuR1Sno= -cloud.google.com/go/appengine v1.5.0/go.mod h1:TfasSozdkFI0zeoxW3PTBLiNqRmzraodCWatWI9Dmak= -cloud.google.com/go/appengine v1.6.0/go.mod h1:hg6i0J/BD2cKmDJbaFSYHFyZkgBEfQrDg/X0V5fJn84= -cloud.google.com/go/appengine v1.7.0/go.mod h1:eZqpbHFCqRGa2aCdope7eC0SWLV1j0neb/QnMJVWx6A= -cloud.google.com/go/appengine v1.7.1/go.mod h1:IHLToyb/3fKutRysUlFO0BPt5j7RiQ45nrzEJmKTo6E= -cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= -cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= -cloud.google.com/go/area120 v0.7.0/go.mod h1:a3+8EUD1SX5RUcCs3MY5YasiO1z6yLiNLRiFrykbynY= -cloud.google.com/go/area120 v0.7.1/go.mod h1:j84i4E1RboTWjKtZVWXPqvK5VHQFJRF2c1Nm69pWm9k= -cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= -cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= -cloud.google.com/go/artifactregistry v1.8.0/go.mod h1:w3GQXkJX8hiKN0v+at4b0qotwijQbYUqF2GWkZzAhC0= -cloud.google.com/go/artifactregistry v1.9.0/go.mod h1:2K2RqvA2CYvAeARHRkLDhMDJ3OXy26h3XW+3/Jh2uYc= -cloud.google.com/go/artifactregistry v1.11.1/go.mod h1:lLYghw+Itq9SONbCa1YWBoWs1nOucMH0pwXN1rOBZFI= -cloud.google.com/go/artifactregistry v1.11.2/go.mod h1:nLZns771ZGAwVLzTX/7Al6R9ehma4WUEhZGWV6CeQNQ= -cloud.google.com/go/artifactregistry v1.12.0/go.mod h1:o6P3MIvtzTOnmvGagO9v/rOjjA0HmhJ+/6KAXrmYDCI= -cloud.google.com/go/artifactregistry v1.13.0/go.mod h1:uy/LNfoOIivepGhooAUpL1i30Hgee3Cu0l4VTWHUC08= -cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= -cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= -cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= -cloud.google.com/go/asset v1.9.0/go.mod h1:83MOE6jEJBMqFKadM9NLRcs80Gdw76qGuHn8m3h8oHQ= -cloud.google.com/go/asset v1.10.0/go.mod h1:pLz7uokL80qKhzKr4xXGvBQXnzHn5evJAEAtZiIb0wY= -cloud.google.com/go/asset v1.11.1/go.mod h1:fSwLhbRvC9p9CXQHJ3BgFeQNM4c9x10lqlrdEUYXlJo= -cloud.google.com/go/asset v1.12.0/go.mod h1:h9/sFOa4eDIyKmH6QMpm4eUK3pDojWnUhTgJlk762Hg= -cloud.google.com/go/asset v1.13.0/go.mod h1:WQAMyYek/b7NBpYq/K4KJWcRqzoalEsxz/t/dTk4THw= -cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= -cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= -cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= -cloud.google.com/go/assuredworkloads v1.8.0/go.mod h1:AsX2cqyNCOvEQC8RMPnoc0yEarXQk6WEKkxYfL6kGIo= -cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0= -cloud.google.com/go/assuredworkloads v1.10.0/go.mod h1:kwdUQuXcedVdsIaKgKTp9t0UJkE5+PAVNhdQm4ZVq2E= -cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= -cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= -cloud.google.com/go/automl v1.7.0/go.mod h1:RL9MYCCsJEOmt0Wf3z9uzG0a7adTT1fe+aObgSpkCt8= -cloud.google.com/go/automl v1.8.0/go.mod h1:xWx7G/aPEe/NP+qzYXktoBSDfjO+vnKMGgsApGJJquM= -cloud.google.com/go/automl v1.12.0/go.mod h1:tWDcHDp86aMIuHmyvjuKeeHEGq76lD7ZqfGLN6B0NuU= -cloud.google.com/go/baremetalsolution v0.3.0/go.mod h1:XOrocE+pvK1xFfleEnShBlNAXf+j5blPPxrhjKgnIFc= -cloud.google.com/go/baremetalsolution v0.4.0/go.mod h1:BymplhAadOO/eBa7KewQ0Ppg4A4Wplbn+PsFKRLo0uI= -cloud.google.com/go/baremetalsolution v0.5.0/go.mod h1:dXGxEkmR9BMwxhzBhV0AioD0ULBmuLZI8CdwalUxuss= -cloud.google.com/go/batch v0.3.0/go.mod h1:TR18ZoAekj1GuirsUsR1ZTKN3FC/4UDnScjT8NXImFE= -cloud.google.com/go/batch v0.4.0/go.mod h1:WZkHnP43R/QCGQsZ+0JyG4i79ranE2u8xvjq/9+STPE= -cloud.google.com/go/batch v0.7.0/go.mod h1:vLZN95s6teRUqRQ4s3RLDsH8PvboqBK+rn1oevL159g= -cloud.google.com/go/beyondcorp v0.2.0/go.mod h1:TB7Bd+EEtcw9PCPQhCJtJGjk/7TC6ckmnSFS+xwTfm4= -cloud.google.com/go/beyondcorp v0.3.0/go.mod h1:E5U5lcrcXMsCuoDNyGrpyTm/hn7ne941Jz2vmksAxW8= -cloud.google.com/go/beyondcorp v0.4.0/go.mod h1:3ApA0mbhHx6YImmuubf5pyW8srKnCEPON32/5hj+RmM= -cloud.google.com/go/beyondcorp v0.5.0/go.mod h1:uFqj9X+dSfrheVp7ssLTaRHd2EHqSL4QZmH4e8WXGGU= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= -cloud.google.com/go/bigquery v1.43.0/go.mod h1:ZMQcXHsl+xmU1z36G2jNGZmKp9zNY5BUua5wDgmNCfw= -cloud.google.com/go/bigquery v1.44.0/go.mod h1:0Y33VqXTEsbamHJvJHdFmtqHvMIY28aK1+dFsvaChGc= -cloud.google.com/go/bigquery v1.47.0/go.mod h1:sA9XOgy0A8vQK9+MWhEQTY6Tix87M/ZurWFIxmF9I/E= -cloud.google.com/go/bigquery v1.48.0/go.mod h1:QAwSz+ipNgfL5jxiaK7weyOhzdoAy1zFm0Nf1fysJac= -cloud.google.com/go/bigquery v1.49.0/go.mod h1:Sv8hMmTFFYBlt/ftw2uN6dFdQPzBlREY9yBh7Oy7/4Q= -cloud.google.com/go/bigquery v1.50.0/go.mod h1:YrleYEh2pSEbgTBZYMJ5SuSr0ML3ypjRB1zgf7pvQLU= -cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= -cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= -cloud.google.com/go/billing v1.6.0/go.mod h1:WoXzguj+BeHXPbKfNWkqVtDdzORazmCjraY+vrxcyvI= -cloud.google.com/go/billing v1.7.0/go.mod h1:q457N3Hbj9lYwwRbnlD7vUpyjq6u5U1RAOArInEiD5Y= -cloud.google.com/go/billing v1.12.0/go.mod h1:yKrZio/eu+okO/2McZEbch17O5CB5NpZhhXG6Z766ss= -cloud.google.com/go/billing v1.13.0/go.mod h1:7kB2W9Xf98hP9Sr12KfECgfGclsH3CQR0R08tnRlRbc= -cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= -cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= -cloud.google.com/go/binaryauthorization v1.3.0/go.mod h1:lRZbKgjDIIQvzYQS1p99A7/U1JqvqeZg0wiI5tp6tg0= -cloud.google.com/go/binaryauthorization v1.4.0/go.mod h1:tsSPQrBd77VLplV70GUhBf/Zm3FsKmgSqgm4UmiDItk= -cloud.google.com/go/binaryauthorization v1.5.0/go.mod h1:OSe4OU1nN/VswXKRBmciKpo9LulY41gch5c68htf3/Q= -cloud.google.com/go/certificatemanager v1.3.0/go.mod h1:n6twGDvcUBFu9uBgt4eYvvf3sQ6My8jADcOVwHmzadg= -cloud.google.com/go/certificatemanager v1.4.0/go.mod h1:vowpercVFyqs8ABSmrdV+GiFf2H/ch3KyudYQEMM590= -cloud.google.com/go/certificatemanager v1.6.0/go.mod h1:3Hh64rCKjRAX8dXgRAyOcY5vQ/fE1sh8o+Mdd6KPgY8= -cloud.google.com/go/channel v1.8.0/go.mod h1:W5SwCXDJsq/rg3tn3oG0LOxpAo6IMxNa09ngphpSlnk= -cloud.google.com/go/channel v1.9.0/go.mod h1:jcu05W0my9Vx4mt3/rEHpfxc9eKi9XwsdDL8yBMbKUk= -cloud.google.com/go/channel v1.11.0/go.mod h1:IdtI0uWGqhEeatSB62VOoJ8FSUhJ9/+iGkJVqp74CGE= -cloud.google.com/go/channel v1.12.0/go.mod h1:VkxCGKASi4Cq7TbXxlaBezonAYpp1GCnKMY6tnMQnLU= -cloud.google.com/go/cloudbuild v1.3.0/go.mod h1:WequR4ULxlqvMsjDEEEFnOG5ZSRSgWOywXYDb1vPE6U= -cloud.google.com/go/cloudbuild v1.4.0/go.mod h1:5Qwa40LHiOXmz3386FrjrYM93rM/hdRr7b53sySrTqA= -cloud.google.com/go/cloudbuild v1.6.0/go.mod h1:UIbc/w9QCbH12xX+ezUsgblrWv+Cv4Tw83GiSMHOn9M= -cloud.google.com/go/cloudbuild v1.7.0/go.mod h1:zb5tWh2XI6lR9zQmsm1VRA+7OCuve5d8S+zJUul8KTg= -cloud.google.com/go/cloudbuild v1.9.0/go.mod h1:qK1d7s4QlO0VwfYn5YuClDGg2hfmLZEb4wQGAbIgL1s= -cloud.google.com/go/clouddms v1.3.0/go.mod h1:oK6XsCDdW4Ib3jCCBugx+gVjevp2TMXFtgxvPSee3OM= -cloud.google.com/go/clouddms v1.4.0/go.mod h1:Eh7sUGCC+aKry14O1NRljhjyrr0NFC0G2cjwX0cByRk= -cloud.google.com/go/clouddms v1.5.0/go.mod h1:QSxQnhikCLUw13iAbffF2CZxAER3xDGNHjsTAkQJcQA= -cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= -cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= -cloud.google.com/go/cloudtasks v1.7.0/go.mod h1:ImsfdYWwlWNJbdgPIIGJWC+gemEGTBK/SunNQQNCAb4= -cloud.google.com/go/cloudtasks v1.8.0/go.mod h1:gQXUIwCSOI4yPVK7DgTVFiiP0ZW/eQkydWzwVMdHxrI= -cloud.google.com/go/cloudtasks v1.9.0/go.mod h1:w+EyLsVkLWHcOaqNEyvcKAsWp9p29dL6uL9Nst1cI7Y= -cloud.google.com/go/cloudtasks v1.10.0/go.mod h1:NDSoTLkZ3+vExFEWu2UJV1arUyzVDAiZtdWcsUyNwBs= -cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= -cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= -cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= -cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= -cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= -cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= -cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.12.0/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= -cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= -cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE= -cloud.google.com/go/compute v1.14.0/go.mod h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvjxega5vAdo= -cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63rR+SXhcpA= -cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= -cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/q8Bs93scU= -cloud.google.com/go/compute v1.21.0 h1:JNBsyXVoOoNJtTQcnEY5uYpZIbeCTYIeDe0Xh1bySMk= -cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= -cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= -cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 h1:aRVqY1p2IJaBGStWMsQMpkAa83cPkCDLl80eOj0Rbz4= -cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbTuPSj0fYJcPls9TFlPNnHHY= -cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck= -cloud.google.com/go/contactcenterinsights v1.6.0/go.mod h1:IIDlT6CLcDoyv79kDv8iWxMSTZhLxSCofVV5W6YFM/w= -cloud.google.com/go/container v1.6.0/go.mod h1:Xazp7GjJSeUYo688S+6J5V+n/t+G5sKBTFkKNudGRxg= -cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3amoYfxVkLo= -cloud.google.com/go/container v1.13.1/go.mod h1:6wgbMPeQRw9rSnKBCAJXnds3Pzj03C4JHamr8asWKy4= -cloud.google.com/go/container v1.14.0/go.mod h1:3AoJMPhHfLDxLvrlVWaK57IXzaPnLaZq63WX59aQBfM= -cloud.google.com/go/container v1.15.0/go.mod h1:ft+9S0WGjAyjDggg5S06DXj+fHJICWg8L7isCQe9pQA= -cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= -cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= -cloud.google.com/go/containeranalysis v0.7.0/go.mod h1:9aUL+/vZ55P2CXfuZjS4UjQ9AgXoSw8Ts6lemfmxBxI= -cloud.google.com/go/containeranalysis v0.9.0/go.mod h1:orbOANbwk5Ejoom+s+DUCTTJ7IBdBQJDcSylAx/on9s= -cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= -cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= -cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= -cloud.google.com/go/datacatalog v1.7.0/go.mod h1:9mEl4AuDYWw81UGc41HonIHH7/sn52H0/tc8f8ZbZIE= -cloud.google.com/go/datacatalog v1.8.0/go.mod h1:KYuoVOv9BM8EYz/4eMFxrr4DUKhGIOXxZoKYF5wdISM= -cloud.google.com/go/datacatalog v1.8.1/go.mod h1:RJ58z4rMp3gvETA465Vg+ag8BGgBdnRPEMMSTr5Uv+M= -cloud.google.com/go/datacatalog v1.12.0/go.mod h1:CWae8rFkfp6LzLumKOnmVh4+Zle4A3NXLzVJ1d1mRm0= -cloud.google.com/go/datacatalog v1.13.0/go.mod h1:E4Rj9a5ZtAxcQJlEBTLgMTphfP11/lNaAshpoBgemX8= -cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= -cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= -cloud.google.com/go/dataflow v0.8.0/go.mod h1:Rcf5YgTKPtQyYz8bLYhFoIV/vP39eL7fWNcSOyFfLJE= -cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= -cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= -cloud.google.com/go/dataform v0.5.0/go.mod h1:GFUYRe8IBa2hcomWplodVmUx/iTL0FrsauObOM3Ipr0= -cloud.google.com/go/dataform v0.6.0/go.mod h1:QPflImQy33e29VuapFdf19oPbE4aYTJxr31OAPV+ulA= -cloud.google.com/go/dataform v0.7.0/go.mod h1:7NulqnVozfHvWUBpMDfKMUESr+85aJsC/2O0o3jWPDE= -cloud.google.com/go/datafusion v1.4.0/go.mod h1:1Zb6VN+W6ALo85cXnM1IKiPw+yQMKMhB9TsTSRDo/38= -cloud.google.com/go/datafusion v1.5.0/go.mod h1:Kz+l1FGHB0J+4XF2fud96WMmRiq/wj8N9u007vyXZ2w= -cloud.google.com/go/datafusion v1.6.0/go.mod h1:WBsMF8F1RhSXvVM8rCV3AeyWVxcC2xY6vith3iw3S+8= -cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= -cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= -cloud.google.com/go/datalabeling v0.7.0/go.mod h1:WPQb1y08RJbmpM3ww0CSUAGweL0SxByuW2E+FU+wXcM= -cloud.google.com/go/dataplex v1.3.0/go.mod h1:hQuRtDg+fCiFgC8j0zV222HvzFQdRd+SVX8gdmFcZzA= -cloud.google.com/go/dataplex v1.4.0/go.mod h1:X51GfLXEMVJ6UN47ESVqvlsRplbLhcsAt0kZCCKsU0A= -cloud.google.com/go/dataplex v1.5.2/go.mod h1:cVMgQHsmfRoI5KFYq4JtIBEUbYwc3c7tXmIDhRmNNVQ= -cloud.google.com/go/dataplex v1.6.0/go.mod h1:bMsomC/aEJOSpHXdFKFGQ1b0TDPIeL28nJObeO1ppRs= -cloud.google.com/go/dataproc v1.7.0/go.mod h1:CKAlMjII9H90RXaMpSxQ8EU6dQx6iAYNPcYPOkSbi8s= -cloud.google.com/go/dataproc v1.8.0/go.mod h1:5OW+zNAH0pMpw14JVrPONsxMQYMBqJuzORhIBfBn9uI= -cloud.google.com/go/dataproc v1.12.0/go.mod h1:zrF3aX0uV3ikkMz6z4uBbIKyhRITnxvr4i3IjKsKrw4= -cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= -cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= -cloud.google.com/go/dataqna v0.7.0/go.mod h1:Lx9OcIIeqCrw1a6KdO3/5KMP1wAmTc0slZWwP12Qq3c= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.10.0/go.mod h1:PC5UzAmDEkAmkfaknstTYbNpgE49HAgW2J1gcgUfmdM= -cloud.google.com/go/datastore v1.11.0/go.mod h1:TvGxBIHCS50u8jzG+AW/ppf87v1of8nwzFNgEZU1D3c= -cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= -cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= -cloud.google.com/go/datastream v1.4.0/go.mod h1:h9dpzScPhDTs5noEMQVWP8Wx8AFBRyS0s8KWPx/9r0g= -cloud.google.com/go/datastream v1.5.0/go.mod h1:6TZMMNPwjUqZHBKPQ1wwXpb0d5VDVPl2/XoS5yi88q4= -cloud.google.com/go/datastream v1.6.0/go.mod h1:6LQSuswqLa7S4rPAOZFVjHIG3wJIjZcZrw8JDEDJuIs= -cloud.google.com/go/datastream v1.7.0/go.mod h1:uxVRMm2elUSPuh65IbZpzJNMbuzkcvu5CjMqVIUHrww= -cloud.google.com/go/deploy v1.4.0/go.mod h1:5Xghikd4VrmMLNaF6FiRFDlHb59VM59YoDQnOUdsH/c= -cloud.google.com/go/deploy v1.5.0/go.mod h1:ffgdD0B89tToyW/U/D2eL0jN2+IEV/3EMuXHA0l4r+s= -cloud.google.com/go/deploy v1.6.0/go.mod h1:f9PTHehG/DjCom3QH0cntOVRm93uGBDt2vKzAPwpXQI= -cloud.google.com/go/deploy v1.8.0/go.mod h1:z3myEJnA/2wnB4sgjqdMfgxCA0EqC3RBTNcVPs93mtQ= -cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= -cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= -cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= -cloud.google.com/go/dialogflow v1.18.0/go.mod h1:trO7Zu5YdyEuR+BhSNOqJezyFQ3aUzz0njv7sMx/iek= -cloud.google.com/go/dialogflow v1.19.0/go.mod h1:JVmlG1TwykZDtxtTXujec4tQ+D8SBFMoosgy+6Gn0s0= -cloud.google.com/go/dialogflow v1.29.0/go.mod h1:b+2bzMe+k1s9V+F2jbJwpHPzrnIyHihAdRFMtn2WXuM= -cloud.google.com/go/dialogflow v1.31.0/go.mod h1:cuoUccuL1Z+HADhyIA7dci3N5zUssgpBJmCzI6fNRB4= -cloud.google.com/go/dialogflow v1.32.0/go.mod h1:jG9TRJl8CKrDhMEcvfcfFkkpp8ZhgPz3sBGmAUYJ2qE= -cloud.google.com/go/dlp v1.6.0/go.mod h1:9eyB2xIhpU0sVwUixfBubDoRwP+GjeUoxxeueZmqvmM= -cloud.google.com/go/dlp v1.7.0/go.mod h1:68ak9vCiMBjbasxeVD17hVPxDEck+ExiHavX8kiHG+Q= -cloud.google.com/go/dlp v1.9.0/go.mod h1:qdgmqgTyReTz5/YNSSuueR8pl7hO0o9bQ39ZhtgkWp4= -cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= -cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= -cloud.google.com/go/documentai v1.9.0/go.mod h1:FS5485S8R00U10GhgBC0aNGrJxBP8ZVpEeJ7PQDZd6k= -cloud.google.com/go/documentai v1.10.0/go.mod h1:vod47hKQIPeCfN2QS/jULIvQTugbmdc0ZvxxfQY1bg4= -cloud.google.com/go/documentai v1.16.0/go.mod h1:o0o0DLTEZ+YnJZ+J4wNfTxmDVyrkzFvttBXXtYRMHkM= -cloud.google.com/go/documentai v1.18.0/go.mod h1:F6CK6iUH8J81FehpskRmhLq/3VlwQvb7TvwOceQ2tbs= -cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= -cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= -cloud.google.com/go/domains v0.8.0/go.mod h1:M9i3MMDzGFXsydri9/vW+EWz9sWb4I6WyHqdlAk0idE= -cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= -cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= -cloud.google.com/go/edgecontainer v0.3.0/go.mod h1:FLDpP4nykgwwIfcLt6zInhprzw0lEi2P1fjO6Ie0qbc= -cloud.google.com/go/edgecontainer v1.0.0/go.mod h1:cttArqZpBB2q58W/upSG++ooo6EsblxDIolxa3jSjbY= -cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= -cloud.google.com/go/essentialcontacts v1.3.0/go.mod h1:r+OnHa5jfj90qIfZDO/VztSFqbQan7HV75p8sA+mdGI= -cloud.google.com/go/essentialcontacts v1.4.0/go.mod h1:8tRldvHYsmnBCHdFpvU+GL75oWiBKl80BiqlFh9tp+8= -cloud.google.com/go/essentialcontacts v1.5.0/go.mod h1:ay29Z4zODTuwliK7SnX8E86aUF2CTzdNtvv42niCX0M= -cloud.google.com/go/eventarc v1.7.0/go.mod h1:6ctpF3zTnaQCxUjHUdcfgcA1A2T309+omHZth7gDfmc= -cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEup4kvF+4gw= -cloud.google.com/go/eventarc v1.10.0/go.mod h1:u3R35tmZ9HvswGRBnF48IlYgYeBcPUCjkr4BTdem2Kw= -cloud.google.com/go/eventarc v1.11.0/go.mod h1:PyUjsUKPWoRBCHeOxZd/lbOOjahV41icXyUY5kSTvVY= -cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCVEBXNY9z0+w= -cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI= -cloud.google.com/go/filestore v1.5.0/go.mod h1:FqBXDWBp4YLHqRnVGveOkHDf8svj9r5+mUDLupOWEDs= -cloud.google.com/go/filestore v1.6.0/go.mod h1:di5unNuss/qfZTw2U9nhFqo8/ZDSc466dre85Kydllg= -cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= -cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= -cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= -cloud.google.com/go/functions v1.8.0/go.mod h1:RTZ4/HsQjIqIYP9a9YPbU+QFoQsAlYgrwOXJWHn1POY= -cloud.google.com/go/functions v1.9.0/go.mod h1:Y+Dz8yGguzO3PpIjhLTbnqV1CWmgQ5UwtlpzoyquQ08= -cloud.google.com/go/functions v1.10.0/go.mod h1:0D3hEOe3DbEvCXtYOZHQZmD+SzYsi1YbI7dGvHfldXw= -cloud.google.com/go/functions v1.12.0/go.mod h1:AXWGrF3e2C/5ehvwYo/GH6O5s09tOPksiKhz+hH8WkA= -cloud.google.com/go/functions v1.13.0/go.mod h1:EU4O007sQm6Ef/PwRsI8N2umygGqPBS/IZQKBQBcJ3c= -cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= -cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= -cloud.google.com/go/gaming v1.7.0/go.mod h1:LrB8U7MHdGgFG851iHAfqUdLcKBdQ55hzXy9xBJz0+w= -cloud.google.com/go/gaming v1.8.0/go.mod h1:xAqjS8b7jAVW0KFYeRUxngo9My3f33kFmua++Pi+ggM= -cloud.google.com/go/gaming v1.9.0/go.mod h1:Fc7kEmCObylSWLO334NcO+O9QMDyz+TKC4v1D7X+Bc0= -cloud.google.com/go/gkebackup v0.2.0/go.mod h1:XKvv/4LfG829/B8B7xRkk8zRrOEbKtEam6yNfuQNH60= -cloud.google.com/go/gkebackup v0.3.0/go.mod h1:n/E671i1aOQvUxT541aTkCwExO/bTer2HDlj4TsBRAo= -cloud.google.com/go/gkebackup v0.4.0/go.mod h1:byAyBGUwYGEEww7xsbnUTBHIYcOPy/PgUWUtOeRm9Vg= -cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= -cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= -cloud.google.com/go/gkeconnect v0.7.0/go.mod h1:SNfmVqPkaEi3bF/B3CNZOAYPYdg7sU+obZ+QTky2Myw= -cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= -cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= -cloud.google.com/go/gkehub v0.11.0/go.mod h1:JOWHlmN+GHyIbuWQPl47/C2RFhnFKH38jH9Ascu3n0E= -cloud.google.com/go/gkehub v0.12.0/go.mod h1:djiIwwzTTBrF5NaXCGv3mf7klpEMcST17VBTVVDcuaw= -cloud.google.com/go/gkemulticloud v0.3.0/go.mod h1:7orzy7O0S+5kq95e4Hpn7RysVA7dPs8W/GgfUtsPbrA= -cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZTyIgLKSalC7tuI= -cloud.google.com/go/gkemulticloud v0.5.0/go.mod h1:W0JDkiyi3Tqh0TJr//y19wyb1yf8llHVto2Htf2Ja3Y= -cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= -cloud.google.com/go/gsuiteaddons v1.3.0/go.mod h1:EUNK/J1lZEZO8yPtykKxLXI6JSVN2rg9bN8SXOa0bgM= -cloud.google.com/go/gsuiteaddons v1.4.0/go.mod h1:rZK5I8hht7u7HxFQcFei0+AtfS9uSushomRlg+3ua1o= -cloud.google.com/go/gsuiteaddons v1.5.0/go.mod h1:TFCClYLd64Eaa12sFVmUyG62tk4mdIsI7pAnSXRkcFo= -cloud.google.com/go/iam v0.1.0/go.mod h1:vcUNEa0pEm0qRVpmWepWaFMIAI8/hjB9mO8rNCJtF6c= -cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= -cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= -cloud.google.com/go/iam v0.7.0/go.mod h1:H5Br8wRaDGNc8XP3keLc4unfUUZeyH3Sfl9XpQEYOeg= -cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGESjkE= -cloud.google.com/go/iam v0.11.0/go.mod h1:9PiLDanza5D+oWFZiH1uG+RnRCfEGKoyl6yo4cgWZGY= -cloud.google.com/go/iam v0.12.0/go.mod h1:knyHGviacl11zrtZUoDuYpDgLjvr28sLQaG0YB2GYAY= -cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= -cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= -cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= -cloud.google.com/go/iap v1.6.0/go.mod h1:NSuvI9C/j7UdjGjIde7t7HBz+QTwBcapPE07+sSRcLk= -cloud.google.com/go/iap v1.7.0/go.mod h1:beqQx56T9O1G1yNPph+spKpNibDlYIiIixiqsQXxLIo= -cloud.google.com/go/iap v1.7.1/go.mod h1:WapEwPc7ZxGt2jFGB/C/bm+hP0Y6NXzOYGjpPnmMS74= -cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+KubM= -cloud.google.com/go/ids v1.2.0/go.mod h1:5WXvp4n25S0rA/mQWAg1YEEBBq6/s+7ml1RDCW1IrcY= -cloud.google.com/go/ids v1.3.0/go.mod h1:JBdTYwANikFKaDP6LtW5JAi4gubs57SVNQjemdt6xV4= -cloud.google.com/go/iot v1.3.0/go.mod h1:r7RGh2B61+B8oz0AGE+J72AhA0G7tdXItODWsaA2oLs= -cloud.google.com/go/iot v1.4.0/go.mod h1:dIDxPOn0UvNDUMD8Ger7FIaTuvMkj+aGk94RPP0iV+g= -cloud.google.com/go/iot v1.5.0/go.mod h1:mpz5259PDl3XJthEmh9+ap0affn/MqNSP4My77Qql9o= -cloud.google.com/go/iot v1.6.0/go.mod h1:IqdAsmE2cTYYNO1Fvjfzo9po179rAtJeVGUvkLN3rLE= -cloud.google.com/go/kms v1.4.0/go.mod h1:fajBHndQ+6ubNw6Ss2sSd+SWvjL26RNo/dr7uxsnnOA= -cloud.google.com/go/kms v1.5.0/go.mod h1:QJS2YY0eJGBg3mnDfuaCyLauWwBJiHRboYxJ++1xJNg= -cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0= -cloud.google.com/go/kms v1.8.0/go.mod h1:4xFEhYFqvW+4VMELtZyxomGSYtSQKzM178ylFW4jMAg= -cloud.google.com/go/kms v1.9.0/go.mod h1:qb1tPTgfF9RQP8e1wq4cLFErVuTJv7UsSC915J8dh3w= -cloud.google.com/go/kms v1.10.0/go.mod h1:ng3KTUtQQU9bPX3+QGLsflZIHlkbn8amFAMY63m8d24= -cloud.google.com/go/kms v1.10.1/go.mod h1:rIWk/TryCkR59GMC3YtHtXeLzd634lBbKenvyySAyYI= -cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= -cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= -cloud.google.com/go/language v1.7.0/go.mod h1:DJ6dYN/W+SQOjF8e1hLQXMF21AkH2w9wiPzPCJa2MIE= -cloud.google.com/go/language v1.8.0/go.mod h1:qYPVHf7SPoNNiCL2Dr0FfEFNil1qi3pQEyygwpgVKB8= -cloud.google.com/go/language v1.9.0/go.mod h1:Ns15WooPM5Ad/5no/0n81yUetis74g3zrbeJBE+ptUY= -cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= -cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= -cloud.google.com/go/lifesciences v0.8.0/go.mod h1:lFxiEOMqII6XggGbOnKiyZ7IBwoIqA84ClvoezaA/bo= -cloud.google.com/go/logging v1.6.1/go.mod h1:5ZO0mHHbvm8gEmeEUHrmDlTDSu5imF6MUP9OfilNXBw= -cloud.google.com/go/logging v1.7.0/go.mod h1:3xjP2CjkM3ZkO73aj4ASA5wRPGGCRrPIAeNqVNkzY8M= -cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= -cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= -cloud.google.com/go/longrunning v0.4.1/go.mod h1:4iWDqhBZ70CvZ6BfETbvam3T8FMvLK+eFj0E6AaRQTo= -cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= -cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= -cloud.google.com/go/managedidentities v1.5.0/go.mod h1:+dWcZ0JlUmpuxpIDfyP5pP5y0bLdRwOS4Lp7gMni/LA= -cloud.google.com/go/maps v0.1.0/go.mod h1:BQM97WGyfw9FWEmQMpZ5T6cpovXXSd1cGmFma94eubI= -cloud.google.com/go/maps v0.6.0/go.mod h1:o6DAMMfb+aINHz/p/jbcY+mYeXBoZoxTfdSQ8VAJaCw= -cloud.google.com/go/maps v0.7.0/go.mod h1:3GnvVl3cqeSvgMcpRlQidXsPYuDGQ8naBis7MVzpXsY= -cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= -cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= -cloud.google.com/go/mediatranslation v0.7.0/go.mod h1:LCnB/gZr90ONOIQLgSXagp8XUW1ODs2UmUMvcgMfI2I= -cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= -cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= -cloud.google.com/go/memcache v1.6.0/go.mod h1:XS5xB0eQZdHtTuTF9Hf8eJkKtR3pVRCcvJwtm68T3rA= -cloud.google.com/go/memcache v1.7.0/go.mod h1:ywMKfjWhNtkQTxrWxCkCFkoPjLHPW6A7WOTVI8xy3LY= -cloud.google.com/go/memcache v1.9.0/go.mod h1:8oEyzXCu+zo9RzlEaEjHl4KkgjlNDaXbCQeQWlzNFJM= -cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= -cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= -cloud.google.com/go/metastore v1.7.0/go.mod h1:s45D0B4IlsINu87/AsWiEVYbLaIMeUSoxlKKDqBGFS8= -cloud.google.com/go/metastore v1.8.0/go.mod h1:zHiMc4ZUpBiM7twCIFQmJ9JMEkDSyZS9U12uf7wHqSI= -cloud.google.com/go/metastore v1.10.0/go.mod h1:fPEnH3g4JJAk+gMRnrAnoqyv2lpUCqJPWOodSaf45Eo= -cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhIsnmlA53dvEk= -cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4= -cloud.google.com/go/monitoring v1.12.0/go.mod h1:yx8Jj2fZNEkL/GYZyTLS4ZtZEZN8WtDEiEqG4kLK50w= -cloud.google.com/go/monitoring v1.13.0/go.mod h1:k2yMBAB1H9JT/QETjNkgdCGD9bPF712XiLTVr+cBrpw= -cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= -cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= -cloud.google.com/go/networkconnectivity v1.6.0/go.mod h1:OJOoEXW+0LAxHh89nXd64uGG+FbQoeH8DtxCHVOMlaM= -cloud.google.com/go/networkconnectivity v1.7.0/go.mod h1:RMuSbkdbPwNMQjB5HBWD5MpTBnNm39iAVpC3TmsExt8= -cloud.google.com/go/networkconnectivity v1.10.0/go.mod h1:UP4O4sWXJG13AqrTdQCD9TnLGEbtNRqjuaaA7bNjF5E= -cloud.google.com/go/networkconnectivity v1.11.0/go.mod h1:iWmDD4QF16VCDLXUqvyspJjIEtBR/4zq5hwnY2X3scM= -cloud.google.com/go/networkmanagement v1.4.0/go.mod h1:Q9mdLLRn60AsOrPc8rs8iNV6OHXaGcDdsIQe1ohekq8= -cloud.google.com/go/networkmanagement v1.5.0/go.mod h1:ZnOeZ/evzUdUsnvRt792H0uYEnHQEMaz+REhhzJRcf4= -cloud.google.com/go/networkmanagement v1.6.0/go.mod h1:5pKPqyXjB/sgtvB5xqOemumoQNB7y95Q7S+4rjSOPYY= -cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= -cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= -cloud.google.com/go/networksecurity v0.7.0/go.mod h1:mAnzoxx/8TBSyXEeESMy9OOYwo1v+gZ5eMRnsT5bC8k= -cloud.google.com/go/networksecurity v0.8.0/go.mod h1:B78DkqsxFG5zRSVuwYFRZ9Xz8IcQ5iECsNrPn74hKHU= -cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= -cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= -cloud.google.com/go/notebooks v1.4.0/go.mod h1:4QPMngcwmgb6uw7Po99B2xv5ufVoIQ7nOGDyL4P8AgA= -cloud.google.com/go/notebooks v1.5.0/go.mod h1:q8mwhnP9aR8Hpfnrc5iN5IBhrXUy8S2vuYs+kBJ/gu0= -cloud.google.com/go/notebooks v1.7.0/go.mod h1:PVlaDGfJgj1fl1S3dUwhFMXFgfYGhYQt2164xOMONmE= -cloud.google.com/go/notebooks v1.8.0/go.mod h1:Lq6dYKOYOWUCTvw5t2q1gp1lAp0zxAxRycayS0iJcqQ= -cloud.google.com/go/optimization v1.1.0/go.mod h1:5po+wfvX5AQlPznyVEZjGJTMr4+CAkJf2XSTQOOl9l4= -cloud.google.com/go/optimization v1.2.0/go.mod h1:Lr7SOHdRDENsh+WXVmQhQTrzdu9ybg0NecjHidBq6xs= -cloud.google.com/go/optimization v1.3.1/go.mod h1:IvUSefKiwd1a5p0RgHDbWCIbDFgKuEdB+fPPuP0IDLI= -cloud.google.com/go/orchestration v1.3.0/go.mod h1:Sj5tq/JpWiB//X/q3Ngwdl5K7B7Y0KZ7bfv0wL6fqVA= -cloud.google.com/go/orchestration v1.4.0/go.mod h1:6W5NLFWs2TlniBphAViZEVhrXRSMgUGDfW7vrWKvsBk= -cloud.google.com/go/orchestration v1.6.0/go.mod h1:M62Bevp7pkxStDfFfTuCOaXgaaqRAga1yKyoMtEoWPQ= -cloud.google.com/go/orgpolicy v1.4.0/go.mod h1:xrSLIV4RePWmP9P3tBl8S93lTmlAxjm06NSm2UTmKvE= -cloud.google.com/go/orgpolicy v1.5.0/go.mod h1:hZEc5q3wzwXJaKrsx5+Ewg0u1LxJ51nNFlext7Tanwc= -cloud.google.com/go/orgpolicy v1.10.0/go.mod h1:w1fo8b7rRqlXlIJbVhOMPrwVljyuW5mqssvBtU18ONc= -cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= -cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= -cloud.google.com/go/osconfig v1.9.0/go.mod h1:Yx+IeIZJ3bdWmzbQU4fxNl8xsZ4amB+dygAwFPlvnNo= -cloud.google.com/go/osconfig v1.10.0/go.mod h1:uMhCzqC5I8zfD9zDEAfvgVhDS8oIjySWh+l4WK6GnWw= -cloud.google.com/go/osconfig v1.11.0/go.mod h1:aDICxrur2ogRd9zY5ytBLV89KEgT2MKB2L/n6x1ooPw= -cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= -cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= -cloud.google.com/go/oslogin v1.6.0/go.mod h1:zOJ1O3+dTU8WPlGEkFSh7qeHPPSoxrcMbbK1Nm2iX70= -cloud.google.com/go/oslogin v1.7.0/go.mod h1:e04SN0xO1UNJ1M5GP0vzVBFicIe4O53FOfcixIqTyXo= -cloud.google.com/go/oslogin v1.9.0/go.mod h1:HNavntnH8nzrn8JCTT5fj18FuJLFJc4NaZJtBnQtKFs= -cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= -cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= -cloud.google.com/go/phishingprotection v0.7.0/go.mod h1:8qJI4QKHoda/sb/7/YmMQ2omRLSLYSu9bU0EKCNI+Lk= -cloud.google.com/go/policytroubleshooter v1.3.0/go.mod h1:qy0+VwANja+kKrjlQuOzmlvscn4RNsAc0e15GGqfMxg= -cloud.google.com/go/policytroubleshooter v1.4.0/go.mod h1:DZT4BcRw3QoO8ota9xw/LKtPa8lKeCByYeKTIf/vxdE= -cloud.google.com/go/policytroubleshooter v1.5.0/go.mod h1:Rz1WfV+1oIpPdN2VvvuboLVRsB1Hclg3CKQ53j9l8vw= -cloud.google.com/go/policytroubleshooter v1.6.0/go.mod h1:zYqaPTsmfvpjm5ULxAyD/lINQxJ0DDsnWOP/GZ7xzBc= -cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= -cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= -cloud.google.com/go/privatecatalog v0.7.0/go.mod h1:2s5ssIFO69F5csTXcwBP7NPFTZvps26xGzvQ2PQaBYg= -cloud.google.com/go/privatecatalog v0.8.0/go.mod h1:nQ6pfaegeDAq/Q5lrfCQzQLhubPiZhSaNhIgfJlnIXs= -cloud.google.com/go/pubsub v1.26.0/go.mod h1:QgBH3U/jdJy/ftjPhTkyXNj543Tin1pRYcdcPRnFIRI= -cloud.google.com/go/pubsub v1.27.1/go.mod h1:hQN39ymbV9geqBnfQq6Xf63yNhUAhv9CZhzp5O6qsW0= -cloud.google.com/go/pubsub v1.28.0/go.mod h1:vuXFpwaVoIPQMGXqRyUQigu/AX1S3IWugR9xznmcXX8= -cloud.google.com/go/pubsub v1.30.0/go.mod h1:qWi1OPS0B+b5L+Sg6Gmc9zD1Y+HaM0MdUr7LsupY1P4= -cloud.google.com/go/pubsublite v1.5.0/go.mod h1:xapqNQ1CuLfGi23Yda/9l4bBCKz/wC3KIJ5gKcxveZg= -cloud.google.com/go/pubsublite v1.6.0/go.mod h1:1eFCS0U11xlOuMFV/0iBqw3zP12kddMeCbj/F3FSj9k= -cloud.google.com/go/pubsublite v1.7.0/go.mod h1:8hVMwRXfDfvGm3fahVbtDbiLePT3gpoiJYJY+vxWxVM= -cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= -cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o= -cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk= -cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo= -cloud.google.com/go/recaptchaenterprise/v2 v2.4.0/go.mod h1:Am3LHfOuBstrLrNCBrlI5sbwx9LBg3te2N6hGvHn2mE= -cloud.google.com/go/recaptchaenterprise/v2 v2.5.0/go.mod h1:O8LzcHXN3rz0j+LBC91jrwI3R+1ZSZEWrfL7XHgNo9U= -cloud.google.com/go/recaptchaenterprise/v2 v2.6.0/go.mod h1:RPauz9jeLtB3JVzg6nCbe12qNoaa8pXc4d/YukAmcnA= -cloud.google.com/go/recaptchaenterprise/v2 v2.7.0/go.mod h1:19wVj/fs5RtYtynAPJdDTb69oW0vNHYDBTbB4NvMD9c= -cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= -cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= -cloud.google.com/go/recommendationengine v0.7.0/go.mod h1:1reUcE3GIu6MeBz/h5xZJqNLuuVjNg1lmWMPyjatzac= -cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= -cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= -cloud.google.com/go/recommender v1.7.0/go.mod h1:XLHs/W+T8olwlGOgfQenXBTbIseGclClff6lhFVe9Bs= -cloud.google.com/go/recommender v1.8.0/go.mod h1:PkjXrTT05BFKwxaUxQmtIlrtj0kph108r02ZZQ5FE70= -cloud.google.com/go/recommender v1.9.0/go.mod h1:PnSsnZY7q+VL1uax2JWkt/UegHssxjUVVCrX52CuEmQ= -cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= -cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= -cloud.google.com/go/redis v1.9.0/go.mod h1:HMYQuajvb2D0LvMgZmLDZW8V5aOC/WxstZHiy4g8OiA= -cloud.google.com/go/redis v1.10.0/go.mod h1:ThJf3mMBQtW18JzGgh41/Wld6vnDDc/F/F35UolRZPM= -cloud.google.com/go/redis v1.11.0/go.mod h1:/X6eicana+BWcUda5PpwZC48o37SiFVTFSs0fWAJ7uQ= -cloud.google.com/go/resourcemanager v1.3.0/go.mod h1:bAtrTjZQFJkiWTPDb1WBjzvc6/kifjj4QBYuKCCoqKA= -cloud.google.com/go/resourcemanager v1.4.0/go.mod h1:MwxuzkumyTX7/a3n37gmsT3py7LIXwrShilPh3P1tR0= -cloud.google.com/go/resourcemanager v1.5.0/go.mod h1:eQoXNAiAvCf5PXxWxXjhKQoTMaUSNrEfg+6qdf/wots= -cloud.google.com/go/resourcemanager v1.6.0/go.mod h1:YcpXGRs8fDzcUl1Xw8uOVmI8JEadvhRIkoXXUNVYcVo= -cloud.google.com/go/resourcemanager v1.7.0/go.mod h1:HlD3m6+bwhzj9XCouqmeiGuni95NTrExfhoSrkC/3EI= -cloud.google.com/go/resourcesettings v1.3.0/go.mod h1:lzew8VfESA5DQ8gdlHwMrqZs1S9V87v3oCnKCWoOuQU= -cloud.google.com/go/resourcesettings v1.4.0/go.mod h1:ldiH9IJpcrlC3VSuCGvjR5of/ezRrOxFtpJoJo5SmXg= -cloud.google.com/go/resourcesettings v1.5.0/go.mod h1:+xJF7QSG6undsQDfsCJyqWXyBwUoJLhetkRMDRnIoXA= -cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= -cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= -cloud.google.com/go/retail v1.10.0/go.mod h1:2gDk9HsL4HMS4oZwz6daui2/jmKvqShXKQuB2RZ+cCc= -cloud.google.com/go/retail v1.11.0/go.mod h1:MBLk1NaWPmh6iVFSz9MeKG/Psyd7TAgm6y/9L2B4x9Y= -cloud.google.com/go/retail v1.12.0/go.mod h1:UMkelN/0Z8XvKymXFbD4EhFJlYKRx1FGhQkVPU5kF14= -cloud.google.com/go/run v0.2.0/go.mod h1:CNtKsTA1sDcnqqIFR3Pb5Tq0usWxJJvsWOCPldRU3Do= -cloud.google.com/go/run v0.3.0/go.mod h1:TuyY1+taHxTjrD0ZFk2iAR+xyOXEA0ztb7U3UNA0zBo= -cloud.google.com/go/run v0.8.0/go.mod h1:VniEnuBwqjigv0A7ONfQUaEItaiCRVujlMqerPPiktM= -cloud.google.com/go/run v0.9.0/go.mod h1:Wwu+/vvg8Y+JUApMwEDfVfhetv30hCG4ZwDR/IXl2Qg= -cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= -cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= -cloud.google.com/go/scheduler v1.6.0/go.mod h1:SgeKVM7MIwPn3BqtcBntpLyrIJftQISRrYB5ZtT+KOk= -cloud.google.com/go/scheduler v1.7.0/go.mod h1:jyCiBqWW956uBjjPMMuX09n3x37mtyPJegEWKxRsn44= -cloud.google.com/go/scheduler v1.8.0/go.mod h1:TCET+Y5Gp1YgHT8py4nlg2Sew8nUHMqcpousDgXJVQc= -cloud.google.com/go/scheduler v1.9.0/go.mod h1:yexg5t+KSmqu+njTIh3b7oYPheFtBWGcbVUYF1GGMIc= -cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= -cloud.google.com/go/secretmanager v1.8.0/go.mod h1:hnVgi/bN5MYHd3Gt0SPuTPPp5ENina1/LxM+2W9U9J4= -cloud.google.com/go/secretmanager v1.9.0/go.mod h1:b71qH2l1yHmWQHt9LC80akm86mX8AL6X1MA01dW8ht4= -cloud.google.com/go/secretmanager v1.10.0/go.mod h1:MfnrdvKMPNra9aZtQFvBcvRU54hbPD8/HayQdlUgJpU= -cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= -cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= -cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= -cloud.google.com/go/security v1.9.0/go.mod h1:6Ta1bO8LXI89nZnmnsZGp9lVoVWXqsVbIq/t9dzI+2Q= -cloud.google.com/go/security v1.10.0/go.mod h1:QtOMZByJVlibUT2h9afNDWRZ1G96gVywH8T5GUSb9IA= -cloud.google.com/go/security v1.12.0/go.mod h1:rV6EhrpbNHrrxqlvW0BWAIawFWq3X90SduMJdFwtLB8= -cloud.google.com/go/security v1.13.0/go.mod h1:Q1Nvxl1PAgmeW0y3HTt54JYIvUdtcpYKVfIB8AOMZ+0= -cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= -cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= -cloud.google.com/go/securitycenter v1.15.0/go.mod h1:PeKJ0t8MoFmmXLXWm41JidyzI3PJjd8sXWaVqg43WWk= -cloud.google.com/go/securitycenter v1.16.0/go.mod h1:Q9GMaLQFUD+5ZTabrbujNWLtSLZIZF7SAR0wWECrjdk= -cloud.google.com/go/securitycenter v1.18.1/go.mod h1:0/25gAzCM/9OL9vVx4ChPeM/+DlfGQJDwBy/UC8AKK0= -cloud.google.com/go/securitycenter v1.19.0/go.mod h1:LVLmSg8ZkkyaNy4u7HCIshAngSQ8EcIRREP3xBnyfag= -cloud.google.com/go/servicecontrol v1.4.0/go.mod h1:o0hUSJ1TXJAmi/7fLJAedOovnujSEvjKCAFNXPQ1RaU= -cloud.google.com/go/servicecontrol v1.5.0/go.mod h1:qM0CnXHhyqKVuiZnGKrIurvVImCs8gmqWsDoqe9sU1s= -cloud.google.com/go/servicecontrol v1.10.0/go.mod h1:pQvyvSRh7YzUF2efw7H87V92mxU8FnFDawMClGCNuAA= -cloud.google.com/go/servicecontrol v1.11.0/go.mod h1:kFmTzYzTUIuZs0ycVqRHNaNhgR+UMUpw9n02l/pY+mc= -cloud.google.com/go/servicecontrol v1.11.1/go.mod h1:aSnNNlwEFBY+PWGQ2DoM0JJ/QUXqV5/ZD9DOLB7SnUk= -cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs= -cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg= -cloud.google.com/go/servicedirectory v1.6.0/go.mod h1:pUlbnWsLH9c13yGkxCmfumWEPjsRs1RlmJ4pqiNjVL4= -cloud.google.com/go/servicedirectory v1.7.0/go.mod h1:5p/U5oyvgYGYejufvxhgwjL8UVXjkuw7q5XcG10wx1U= -cloud.google.com/go/servicedirectory v1.8.0/go.mod h1:srXodfhY1GFIPvltunswqXpVxFPpZjf8nkKQT7XcXaY= -cloud.google.com/go/servicedirectory v1.9.0/go.mod h1:29je5JjiygNYlmsGz8k6o+OZ8vd4f//bQLtvzkPPT/s= -cloud.google.com/go/servicemanagement v1.4.0/go.mod h1:d8t8MDbezI7Z2R1O/wu8oTggo3BI2GKYbdG4y/SJTco= -cloud.google.com/go/servicemanagement v1.5.0/go.mod h1:XGaCRe57kfqu4+lRxaFEAuqmjzF0r+gWHjWqKqBvKFo= -cloud.google.com/go/servicemanagement v1.6.0/go.mod h1:aWns7EeeCOtGEX4OvZUWCCJONRZeFKiptqKf1D0l/Jc= -cloud.google.com/go/servicemanagement v1.8.0/go.mod h1:MSS2TDlIEQD/fzsSGfCdJItQveu9NXnUniTrq/L8LK4= -cloud.google.com/go/serviceusage v1.3.0/go.mod h1:Hya1cozXM4SeSKTAgGXgj97GlqUvF5JaoXacR1JTP/E= -cloud.google.com/go/serviceusage v1.4.0/go.mod h1:SB4yxXSaYVuUBYUml6qklyONXNLt83U0Rb+CXyhjEeU= -cloud.google.com/go/serviceusage v1.5.0/go.mod h1:w8U1JvqUqwJNPEOTQjrMHkw3IaIFLoLsPLvsE3xueec= -cloud.google.com/go/serviceusage v1.6.0/go.mod h1:R5wwQcbOWsyuOfbP9tGdAnCAc6B9DRwPG1xtWMDeuPA= -cloud.google.com/go/shell v1.3.0/go.mod h1:VZ9HmRjZBsjLGXusm7K5Q5lzzByZmJHf1d0IWHEN5X4= -cloud.google.com/go/shell v1.4.0/go.mod h1:HDxPzZf3GkDdhExzD/gs8Grqk+dmYcEjGShZgYa9URw= -cloud.google.com/go/shell v1.6.0/go.mod h1:oHO8QACS90luWgxP3N9iZVuEiSF84zNyLytb+qE2f9A= -cloud.google.com/go/spanner v1.41.0/go.mod h1:MLYDBJR/dY4Wt7ZaMIQ7rXOTLjYrmxLE/5ve9vFfWos= -cloud.google.com/go/spanner v1.44.0/go.mod h1:G8XIgYdOK+Fbcpbs7p2fiprDw4CaZX63whnSMLVBxjk= -cloud.google.com/go/spanner v1.45.0/go.mod h1:FIws5LowYz8YAE1J8fOS7DJup8ff7xJeetWEo5REA2M= -cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= -cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= -cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= -cloud.google.com/go/speech v1.9.0/go.mod h1:xQ0jTcmnRFFM2RfX/U+rk6FQNUF6DQlydUSyoooSpco= -cloud.google.com/go/speech v1.14.1/go.mod h1:gEosVRPJ9waG7zqqnsHpYTOoAS4KouMRLDFMekpJ0J0= -cloud.google.com/go/speech v1.15.0/go.mod h1:y6oH7GhqCaZANH7+Oe0BhgIogsNInLlz542tg3VqeYI= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= -cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5ogcBBKhU86Y= -cloud.google.com/go/storage v1.29.0/go.mod h1:4puEjyTKnku6gfKoTfNOU/W+a9JyuVNxjpS5GBrB8h4= -cloud.google.com/go/storagetransfer v1.5.0/go.mod h1:dxNzUopWy7RQevYFHewchb29POFv3/AaBgnhqzqiK0w= -cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS7Gh6pSKrM8dJyg6I= -cloud.google.com/go/storagetransfer v1.7.0/go.mod h1:8Giuj1QNb1kfLAiWM1bN6dHzfdlDAVC9rv9abHot2W4= -cloud.google.com/go/storagetransfer v1.8.0/go.mod h1:JpegsHHU1eXg7lMHkvf+KE5XDJ7EQu0GwNJbbVGanEw= -cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= -cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= -cloud.google.com/go/talent v1.3.0/go.mod h1:CmcxwJ/PKfRgd1pBjQgU6W3YBwiewmUzQYH5HHmSCmM= -cloud.google.com/go/talent v1.4.0/go.mod h1:ezFtAgVuRf8jRsvyE6EwmbTK5LKciD4KVnHuDEFmOOA= -cloud.google.com/go/talent v1.5.0/go.mod h1:G+ODMj9bsasAEJkQSzO2uHQWXHHXUomArjWQQYkqK6c= -cloud.google.com/go/texttospeech v1.4.0/go.mod h1:FX8HQHA6sEpJ7rCMSfXuzBcysDAuWusNNNvN9FELDd8= -cloud.google.com/go/texttospeech v1.5.0/go.mod h1:oKPLhR4n4ZdQqWKURdwxMy0uiTS1xU161C8W57Wkea4= -cloud.google.com/go/texttospeech v1.6.0/go.mod h1:YmwmFT8pj1aBblQOI3TfKmwibnsfvhIBzPXcW4EBovc= -cloud.google.com/go/tpu v1.3.0/go.mod h1:aJIManG0o20tfDQlRIej44FcwGGl/cD0oiRyMKG19IQ= -cloud.google.com/go/tpu v1.4.0/go.mod h1:mjZaX8p0VBgllCzF6wcU2ovUXN9TONFLd7iz227X2Xg= -cloud.google.com/go/tpu v1.5.0/go.mod h1:8zVo1rYDFuW2l4yZVY0R0fb/v44xLh3llq7RuV61fPM= -cloud.google.com/go/trace v1.3.0/go.mod h1:FFUE83d9Ca57C+K8rDl/Ih8LwOzWIV1krKgxg6N0G28= -cloud.google.com/go/trace v1.4.0/go.mod h1:UG0v8UBqzusp+z63o7FK74SdFE+AXpCLdFb1rshXG+Y= -cloud.google.com/go/trace v1.8.0/go.mod h1:zH7vcsbAhklH8hWFig58HvxcxyQbaIqMarMg9hn5ECA= -cloud.google.com/go/trace v1.9.0/go.mod h1:lOQqpE5IaWY0Ixg7/r2SjixMuc6lfTFeO4QGM4dQWOk= -cloud.google.com/go/translate v1.3.0/go.mod h1:gzMUwRjvOqj5i69y/LYLd8RrNQk+hOmIXTi9+nb3Djs= -cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg= -cloud.google.com/go/translate v1.5.0/go.mod h1:29YDSYveqqpA1CQFD7NQuP49xymq17RXNaUDdc0mNu0= -cloud.google.com/go/translate v1.6.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= -cloud.google.com/go/translate v1.7.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= -cloud.google.com/go/video v1.8.0/go.mod h1:sTzKFc0bUSByE8Yoh8X0mn8bMymItVGPfTuUBUyRgxk= -cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw= -cloud.google.com/go/video v1.12.0/go.mod h1:MLQew95eTuaNDEGriQdcYn0dTwf9oWiA4uYebxM5kdg= -cloud.google.com/go/video v1.13.0/go.mod h1:ulzkYlYgCp15N2AokzKjy7MQ9ejuynOJdf1tR5lGthk= -cloud.google.com/go/video v1.14.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= -cloud.google.com/go/video v1.15.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= -cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= -cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= -cloud.google.com/go/videointelligence v1.8.0/go.mod h1:dIcCn4gVDdS7yte/w+koiXn5dWVplOZkE+xwG9FgK+M= -cloud.google.com/go/videointelligence v1.9.0/go.mod h1:29lVRMPDYHikk3v8EdPSaL8Ku+eMzDljjuvRs105XoU= -cloud.google.com/go/videointelligence v1.10.0/go.mod h1:LHZngX1liVtUhZvi2uNS0VQuOzNi2TkY1OakiuoUOjU= -cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= -cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= -cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= -cloud.google.com/go/vision/v2 v2.4.0/go.mod h1:VtI579ll9RpVTrdKdkMzckdnwMyX2JILb+MhPqRbPsY= -cloud.google.com/go/vision/v2 v2.5.0/go.mod h1:MmaezXOOE+IWa+cS7OhRRLK2cNv1ZL98zhqFFZaaH2E= -cloud.google.com/go/vision/v2 v2.6.0/go.mod h1:158Hes0MvOS9Z/bDMSFpjwsUrZ5fPrdwuyyvKSGAGMY= -cloud.google.com/go/vision/v2 v2.7.0/go.mod h1:H89VysHy21avemp6xcf9b9JvZHVehWbET0uT/bcuY/0= -cloud.google.com/go/vmmigration v1.2.0/go.mod h1:IRf0o7myyWFSmVR1ItrBSFLFD/rJkfDCUTO4vLlJvsE= -cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g= -cloud.google.com/go/vmmigration v1.5.0/go.mod h1:E4YQ8q7/4W9gobHjQg4JJSgXXSgY21nA5r8swQV+Xxc= -cloud.google.com/go/vmmigration v1.6.0/go.mod h1:bopQ/g4z+8qXzichC7GW1w2MjbErL54rk3/C843CjfY= -cloud.google.com/go/vmwareengine v0.1.0/go.mod h1:RsdNEf/8UDvKllXhMz5J40XxDrNJNN4sagiox+OI208= -cloud.google.com/go/vmwareengine v0.2.2/go.mod h1:sKdctNJxb3KLZkE/6Oui94iw/xs9PRNC2wnNLXsHvH8= -cloud.google.com/go/vmwareengine v0.3.0/go.mod h1:wvoyMvNWdIzxMYSpH/R7y2h5h3WFkx6d+1TIsP39WGY= -cloud.google.com/go/vpcaccess v1.4.0/go.mod h1:aQHVbTWDYUR1EbTApSVvMq1EnT57ppDmQzZ3imqIk4w= -cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8= -cloud.google.com/go/vpcaccess v1.6.0/go.mod h1:wX2ILaNhe7TlVa4vC5xce1bCnqE3AeH27RV31lnmZes= -cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= -cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= -cloud.google.com/go/webrisk v1.6.0/go.mod h1:65sW9V9rOosnc9ZY7A7jsy1zoHS5W9IAXv6dGqhMQMc= -cloud.google.com/go/webrisk v1.7.0/go.mod h1:mVMHgEYH0r337nmt1JyLthzMr6YxwN1aAIEc2fTcq7A= -cloud.google.com/go/webrisk v1.8.0/go.mod h1:oJPDuamzHXgUc+b8SiHRcVInZQuybnvEW72PqTc7sSg= -cloud.google.com/go/websecurityscanner v1.3.0/go.mod h1:uImdKm2wyeXQevQJXeh8Uun/Ym1VqworNDlBXQevGMo= -cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S8CzdTkAS77oDsiSqYWQ= -cloud.google.com/go/websecurityscanner v1.5.0/go.mod h1:Y6xdCPy81yi0SQnDY1xdNTNpfY1oAgXUlcfN3B3eSng= -cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= -cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M= -cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= -cloud.google.com/go/workflows v1.10.0/go.mod h1:fZ8LmRmZQWacon9UCX1r/g/DfAXx5VcPALq2CxzdePw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= -git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY= -github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk= -github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM= -github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0= -github.com/apache/arrow/go/v11 v11.0.0/go.mod h1:Eg5OsL5H+e299f7u5ssuXsuHQVEGC4xei5aX110hRiI= -github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= -github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230310173818-32f1caf87195/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 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= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= -github.com/envoyproxy/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJJM//w9BV6Fxbg2LuVd34= -github.com/envoyproxy/go-control-plane v0.11.0/go.mod h1:VnHyVMpzcLvCFt9yUz1UnCwHLhwx1WguiVDV7pTG/tI= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= -github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= -github.com/envoyproxy/protoc-gen-validate v0.10.0/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= -github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= -github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= -github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= -github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= -github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= -github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= -github.com/go-fonts/liberation v0.2.0/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= -github.com/go-fonts/stix v0.1.0/go.mod h1:w/c1f0ldAUlJmLBvlbkvVXLAD+tAMqobIIQpmnUIzUY= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2CSIqUrmQPqA0gdRIlnLEY0gK5JGjh37zN5U= -github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81/go.mod h1:SX0U8uGpxhq9o2S/CELCSUxEWWAuoCUcVCQWv7G2OCk= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= -github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= -github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/s2a-go v0.1.0/go.mod h1:OJpEgntRZo8ugHpF9hkoLJbS5dSI20XZeXJ9JVywLlM= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= -github.com/googleapis/enterprise-certificate-proxy v0.2.1/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= -github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= -github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= -github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= -github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= -github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= -github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= -github.com/googleapis/gax-go/v2 v2.8.0/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= -github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= -github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= -github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= -github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= +github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= -github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +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/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= -github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= -github.com/lyft/protoc-gen-star/v2 v2.0.1/go.mod h1:RcCdONR2ScXaYnQC5tUzxzlpA3WVYF7/opLeUgcQs/o= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= -github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -757,566 +58,103 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mostynb/go-grpc-compression v1.2.1 h1:16tdYxBZSD8p9AUmvw4F7Nyc2T4/eE7XsIXrgxSEcJI= -github.com/mostynb/go-grpc-compression v1.2.1/go.mod h1:oidYvYyefMmhcuvU8fLJ8FfZyTyVzJ6SkmD5fIKgRe8= -github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= -github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= -github.com/phpdave11/gofpdi v1.0.13/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= -github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= 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/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= -github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rs/cors v1.10.0 h1:62NOS1h+r8p1mW6FM0FSB0exioXLhd/sh15KpjWBZ+8= -github.com/rs/cors v1.10.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= -github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= +github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -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/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= -github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= -go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.44.0 h1:b8xjZxHbLrXAum4SxJd1Rlm7Y/fKaB+6ACI7/e5EfSA= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.44.0/go.mod h1:1ei0a32xOGkFoySu7y1DAHfcuIhC0pNZpvY2huXuMy4= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0 h1:KfYpVmrjI7JuToy5k8XV3nkapjWx48k4E4JOtVstzQI= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0/go.mod h1:SeQhzAEccGVZVEy7aH87Nh0km+utSpo1pTv6eMMop48= -go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= -go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/exporters/prometheus v0.41.0 h1:A3/bhjP5SmELy8dcpK+uttHeh9Qrh+YnS16/VzrztRQ= -go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= -go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= -go.opentelemetry.io/otel/sdk v1.18.0 h1:e3bAB0wB3MljH38sHzpV/qWrOTCFrdZF2ct9F8rBkcY= -go.opentelemetry.io/otel/sdk v1.18.0/go.mod h1:1RCygWV7plY2KmdskZEDDBs4tJeHG92MdHZIluiYs/M= -go.opentelemetry.io/otel/sdk/metric v0.41.0 h1:c3sAt9/pQ5fSIUfl0gPtClV3HhE18DCVzByD33R/zsk= -go.opentelemetry.io/otel/sdk/metric v0.41.0/go.mod h1:PmOmSt+iOklKtIg5O4Vz9H/ttcRFSNTgii+E1KGyn1w= -go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= -go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= +go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 h1:Mw5xcxMwlqoJd97vwPxA8isEaIoxsta9/Q51+TTJLGE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0/go.mod h1:CQNu9bj7o7mC6U7+CA/schKEYakYXWr79ucDHTMGhCM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 h1:s0PHtIkN+3xrbDOpt2M8OTG92cWqUESvzh2MxiR5xY8= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0/go.mod h1:hZlFbDbRt++MMPCCfSJfmhkGIWnX1h3XjkfxZUjLrIA= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3/go.mod h1:NOZ3BPKG0ec/BKJQgnvsSFpcKLM5xXVWnvZS97DWHgE= -golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20200618115811-c13761719519/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20210216034530-4410531fe030/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20210607152325-775e3b0c77b9/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/image v0.0.0-20220302094943-723b81ca9867/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= -golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= -golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= -golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= -golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210304124612-50617c2ba197/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/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-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.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= -golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= -golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= -golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= -gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0= -gonum.org/v1/gonum v0.11.0/go.mod h1:fSG4YDCxxUZQJ7rKsQrj0gMOg00Il0Z96/qMA4bVQhA= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= -gonum.org/v1/plot v0.9.0/go.mod h1:3Pcqqmp6RHvJI72kgb8fThyUnav364FOsdDo2aGW5lY= -gonum.org/v1/plot v0.10.1/go.mod h1:VZW5OlhkL1mysU9vaqNHnsy86inf6Ot+jB3r+BczCEo= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= -google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= -google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= -google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= -google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= -google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= -google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= -google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= -google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= -google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= -google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.99.0/go.mod h1:1YOf74vkVndF7pG6hIHuINsM7eWwpVTAfNMNiL91A08= -google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= -google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= -google.golang.org/api v0.106.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= -google.golang.org/api v0.107.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= -google.golang.org/api v0.108.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= -google.golang.org/api v0.110.0/go.mod h1:7FC4Vvx1Mooxh8C5HWjzZHcavuS2f6pmJpZx60ca7iI= -google.golang.org/api v0.111.0/go.mod h1:qtFHvU9mhgTJegR31csQ+rwxyUTHOKFqCKWp1J0fdw0= -google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg= -google.golang.org/api v0.118.0/go.mod h1:76TtD3vkgmZ66zZzp72bUUklpmQmKlhh6sYtIjYK+5E= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= -google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= -google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= -google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= -google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= -google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= -google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= -google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= -google.golang.org/genproto v0.0.0-20221024153911-1573dae28c9c/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= -google.golang.org/genproto v0.0.0-20221109142239-94d6d90a7d66/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221117204609-8f9c96812029/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221201204527-e3fa12d562f3/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd/go.mod h1:cTsE614GARnxrLsqKREzmNYJACSWWpAWdNMwnD7c2BE= -google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230112194545-e10362b5ecf9/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230113154510-dbe35b8444a5/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230123190316-2c411cf9d197/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230125152338-dcaf20b6aeaa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230127162408-596548ed4efa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230216225411-c8e22ba71e44/go.mod h1:8B0gmkoRebU8ukX6HP+4wrVQUY1+6PkQ44BSyIlflHA= -google.golang.org/genproto v0.0.0-20230222225845-10f96fb3dbec/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= -google.golang.org/genproto v0.0.0-20230223222841-637eb2293923/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= -google.golang.org/genproto v0.0.0-20230303212802-e74f57abe488/go.mod h1:TvhZT5f700eVlTNwND1xoEZQeWTB2RY/65kplwl/bFA= -google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= -google.golang.org/genproto v0.0.0-20230320184635-7606e756e683/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= -google.golang.org/genproto v0.0.0-20230323212658-478b75c54725/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= -google.golang.org/genproto v0.0.0-20230330154414-c0448cd141ea/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= -google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= -google.golang.org/genproto v0.0.0-20230403163135-c38d8f061ccd/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= -google.golang.org/grpc v1.52.0/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= -google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= -google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= -google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= -google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/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/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= -lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= -lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= -modernc.org/cc/v3 v3.36.0/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= -modernc.org/cc/v3 v3.36.2/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= -modernc.org/cc/v3 v3.36.3/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= -modernc.org/ccgo/v3 v3.0.0-20220428102840-41399a37e894/go.mod h1:eI31LL8EwEBKPpNpA4bU1/i+sKOwOrQy8D87zWUcRZc= -modernc.org/ccgo/v3 v3.0.0-20220430103911-bc99d88307be/go.mod h1:bwdAnOoaIt8Ax9YdWGjxWsdkPcZyRPHqrOvJxaKAKGw= -modernc.org/ccgo/v3 v3.16.4/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= -modernc.org/ccgo/v3 v3.16.6/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= -modernc.org/ccgo/v3 v3.16.8/go.mod h1:zNjwkizS+fIFDrDjIAgBSCLkWbJuHF+ar3QRn+Z9aws= -modernc.org/ccgo/v3 v3.16.9/go.mod h1:zNMzC9A9xeNUepy6KuZBbugn3c0Mc9TeiJO4lgvkJDo= -modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= -modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM= -modernc.org/libc v0.0.0-20220428101251-2d5f3daf273b/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= -modernc.org/libc v1.16.0/go.mod h1:N4LD6DBE9cf+Dzf9buBlzVJndKr/iJHG97vGLHYnb5A= -modernc.org/libc v1.16.1/go.mod h1:JjJE0eu4yeK7tab2n4S1w8tlWd9MxXLRzheaRnAKymU= -modernc.org/libc v1.16.17/go.mod h1:hYIV5VZczAmGZAnG15Vdngn5HSF5cSkbvfz2B7GRuVU= -modernc.org/libc v1.16.19/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= -modernc.org/libc v1.17.0/go.mod h1:XsgLldpP4aWlPlsjqKRdHPqCxCjISdHfM/yeWC5GyW0= -modernc.org/libc v1.17.1/go.mod h1:FZ23b+8LjxZs7XtFMbSzL/EhPxNbfZbErxEHc7cbD9s= -modernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/memory v1.1.1/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= -modernc.org/memory v1.2.0/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= -modernc.org/memory v1.2.1/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= -modernc.org/opt v0.1.1/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= -modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= -modernc.org/sqlite v1.18.1/go.mod h1:6ho+Gow7oX5V+OiOQ6Tr4xeqbx13UZ6t+Fw9IRUG4d4= -modernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw= -modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= -modernc.org/tcl v1.13.1/go.mod h1:XOLfOwzhkljL4itZkK6T72ckMgvj0BDsnKNdZVUOecw= -modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= -modernc.org/z v1.5.1/go.mod h1:eWFB510QWW5Th9YGZT81s+LwvaAs3Q2yr4sP0rmLkv8= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/exporter/otlphttpexporter/internal/metadata/generated_status.go b/exporter/otlphttpexporter/internal/metadata/generated_status.go new file mode 100644 index 00000000000..d9f62544a6f --- /dev/null +++ b/exporter/otlphttpexporter/internal/metadata/generated_status.go @@ -0,0 +1,29 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" +) + +var ( + Type = component.MustNewType("otlphttp") + scopeName = "go.opentelemetry.io/collector/exporter/otlphttpexporter" +) + +const ( + LogsStability = component.StabilityLevelBeta + TracesStability = component.StabilityLevelStable + MetricsStability = component.StabilityLevelStable +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter(scopeName) +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer(scopeName) +} diff --git a/exporter/otlphttpexporter/metadata.yaml b/exporter/otlphttpexporter/metadata.yaml new file mode 100644 index 00000000000..14cae78d175 --- /dev/null +++ b/exporter/otlphttpexporter/metadata.yaml @@ -0,0 +1,8 @@ +type: otlphttp + +status: + class: exporter + stability: + stable: [traces, metrics] + beta: [logs] + distributions: [core, contrib] diff --git a/exporter/otlphttpexporter/otlp.go b/exporter/otlphttpexporter/otlp.go index b118b72f2a3..6ebc50e2cc0 100644 --- a/exporter/otlphttpexporter/otlp.go +++ b/exporter/otlphttpexporter/otlp.go @@ -48,6 +48,7 @@ const ( headerRetryAfter = "Retry-After" maxHTTPResponseReadBytes = 64 * 1024 + jsonContentType = "application/json" protobufContentType = "application/x-protobuf" ) @@ -77,7 +78,7 @@ func newExporter(cfg component.Config, set exporter.CreateSettings) (*baseExport // start actually creates the HTTP client. The client construction is deferred till this point as this // is the only place we get hold of Extensions which are required to construct auth round tripper. func (e *baseExporter) start(_ context.Context, host component.Host) error { - client, err := e.config.HTTPClientSettings.ToClient(host, e.settings) + client, err := e.config.ClientConfig.ToClient(host, e.settings) if err != nil { return err } @@ -87,31 +88,64 @@ func (e *baseExporter) start(_ context.Context, host component.Host) error { func (e *baseExporter) pushTraces(ctx context.Context, td ptrace.Traces) error { tr := ptraceotlp.NewExportRequestFromTraces(td) - request, err := tr.MarshalProto() + + var err error + var request []byte + switch e.config.Encoding { + case EncodingJSON: + request, err = tr.MarshalJSON() + case EncodingProto: + request, err = tr.MarshalProto() + default: + err = fmt.Errorf("invalid encoding: %s", e.config.Encoding) + } + if err != nil { return consumererror.NewPermanent(err) } - return e.export(ctx, e.tracesURL, request, tracesPartialSuccessHandler) + return e.export(ctx, e.tracesURL, request, e.tracesPartialSuccessHandler) } func (e *baseExporter) pushMetrics(ctx context.Context, md pmetric.Metrics) error { tr := pmetricotlp.NewExportRequestFromMetrics(md) - request, err := tr.MarshalProto() + + var err error + var request []byte + switch e.config.Encoding { + case EncodingJSON: + request, err = tr.MarshalJSON() + case EncodingProto: + request, err = tr.MarshalProto() + default: + err = fmt.Errorf("invalid encoding: %s", e.config.Encoding) + } + if err != nil { return consumererror.NewPermanent(err) } - return e.export(ctx, e.metricsURL, request, metricsPartialSuccessHandler) + return e.export(ctx, e.metricsURL, request, e.metricsPartialSuccessHandler) } func (e *baseExporter) pushLogs(ctx context.Context, ld plog.Logs) error { tr := plogotlp.NewExportRequestFromLogs(ld) - request, err := tr.MarshalProto() + + var err error + var request []byte + switch e.config.Encoding { + case EncodingJSON: + request, err = tr.MarshalJSON() + case EncodingProto: + request, err = tr.MarshalProto() + default: + err = fmt.Errorf("invalid encoding: %s", e.config.Encoding) + } + if err != nil { return consumererror.NewPermanent(err) } - return e.export(ctx, e.logsURL, request, logsPartialSuccessHandler) + return e.export(ctx, e.logsURL, request, e.logsPartialSuccessHandler) } func (e *baseExporter) export(ctx context.Context, url string, request []byte, partialSuccessHandler partialSuccessHandler) error { @@ -120,7 +154,16 @@ func (e *baseExporter) export(ctx context.Context, url string, request []byte, p if err != nil { return consumererror.NewPermanent(err) } - req.Header.Set("Content-Type", protobufContentType) + + switch e.config.Encoding { + case EncodingJSON: + req.Header.Set("Content-Type", jsonContentType) + case EncodingProto: + req.Header.Set("Content-Type", protobufContentType) + default: + return fmt.Errorf("invalid encoding: %s", e.config.Encoding) + } + req.Header.Set("User-Agent", e.userAgent) resp, err := e.client.Do(req) @@ -231,7 +274,6 @@ func readResponseStatus(resp *http.Response) *status.Status { // "Response body for all HTTP 4xx and HTTP 5xx responses MUST be a // Protobuf-encoded Status message that describes the problem." respBytes, err := readResponseBody(resp) - if err != nil { return nil } @@ -249,7 +291,6 @@ func readResponseStatus(resp *http.Response) *status.Status { func handlePartialSuccessResponse(resp *http.Response, partialSuccessHandler partialSuccessHandler) error { bodyBytes, err := readResponseBody(resp) - if err != nil { return err } @@ -259,50 +300,83 @@ func handlePartialSuccessResponse(resp *http.Response, partialSuccessHandler par type partialSuccessHandler func(bytes []byte, contentType string) error -func tracesPartialSuccessHandler(protoBytes []byte, contentType string) error { - if contentType != protobufContentType { - return nil - } +func (e *baseExporter) tracesPartialSuccessHandler(protoBytes []byte, contentType string) error { exportResponse := ptraceotlp.NewExportResponse() - err := exportResponse.UnmarshalProto(protoBytes) - if err != nil { - return fmt.Errorf("error parsing protobuf response: %w", err) + switch contentType { + case protobufContentType: + err := exportResponse.UnmarshalProto(protoBytes) + if err != nil { + return fmt.Errorf("error parsing protobuf response: %w", err) + } + case jsonContentType: + err := exportResponse.UnmarshalJSON(protoBytes) + if err != nil { + return fmt.Errorf("error parsing json response: %w", err) + } + default: + return nil } + partialSuccess := exportResponse.PartialSuccess() if !(partialSuccess.ErrorMessage() == "" && partialSuccess.RejectedSpans() == 0) { - return consumererror.NewPermanent(fmt.Errorf("OTLP partial success: %s (%d rejected)", partialSuccess.ErrorMessage(), partialSuccess.RejectedSpans())) + e.logger.Warn("Partial success response", + zap.String("message", exportResponse.PartialSuccess().ErrorMessage()), + zap.Int64("dropped_spans", exportResponse.PartialSuccess().RejectedSpans()), + ) } return nil } -func metricsPartialSuccessHandler(protoBytes []byte, contentType string) error { - if contentType != protobufContentType { - return nil - } +func (e *baseExporter) metricsPartialSuccessHandler(protoBytes []byte, contentType string) error { exportResponse := pmetricotlp.NewExportResponse() - err := exportResponse.UnmarshalProto(protoBytes) - if err != nil { - return fmt.Errorf("error parsing protobuf response: %w", err) + switch contentType { + case protobufContentType: + err := exportResponse.UnmarshalProto(protoBytes) + if err != nil { + return fmt.Errorf("error parsing protobuf response: %w", err) + } + case jsonContentType: + err := exportResponse.UnmarshalJSON(protoBytes) + if err != nil { + return fmt.Errorf("error parsing json response: %w", err) + } + default: + return nil } + partialSuccess := exportResponse.PartialSuccess() if !(partialSuccess.ErrorMessage() == "" && partialSuccess.RejectedDataPoints() == 0) { - return consumererror.NewPermanent(fmt.Errorf("OTLP partial success: %s (%d rejected)", partialSuccess.ErrorMessage(), partialSuccess.RejectedDataPoints())) + e.logger.Warn("Partial success response", + zap.String("message", exportResponse.PartialSuccess().ErrorMessage()), + zap.Int64("dropped_data_points", exportResponse.PartialSuccess().RejectedDataPoints()), + ) } return nil } -func logsPartialSuccessHandler(protoBytes []byte, contentType string) error { - if contentType != protobufContentType { - return nil - } +func (e *baseExporter) logsPartialSuccessHandler(protoBytes []byte, contentType string) error { exportResponse := plogotlp.NewExportResponse() - err := exportResponse.UnmarshalProto(protoBytes) - if err != nil { - return fmt.Errorf("error parsing protobuf response: %w", err) + switch contentType { + case protobufContentType: + err := exportResponse.UnmarshalProto(protoBytes) + if err != nil { + return fmt.Errorf("error parsing protobuf response: %w", err) + } + case jsonContentType: + err := exportResponse.UnmarshalJSON(protoBytes) + if err != nil { + return fmt.Errorf("error parsing json response: %w", err) + } + default: + return nil } + partialSuccess := exportResponse.PartialSuccess() if !(partialSuccess.ErrorMessage() == "" && partialSuccess.RejectedLogRecords() == 0) { - return consumererror.NewPermanent(fmt.Errorf("OTLP partial success: %s (%d rejected)", partialSuccess.ErrorMessage(), partialSuccess.RejectedLogRecords())) + e.logger.Warn("Partial success response", + zap.String("message", exportResponse.PartialSuccess().ErrorMessage()), + zap.Int64("dropped_log_records", exportResponse.PartialSuccess().RejectedLogRecords()), + ) } return nil } diff --git a/exporter/otlphttpexporter/otlp_test.go b/exporter/otlphttpexporter/otlp_test.go index daa54d4b7ea..0116803d816 100644 --- a/exporter/otlphttpexporter/otlp_test.go +++ b/exporter/otlphttpexporter/otlp_test.go @@ -5,10 +5,7 @@ package otlphttpexporter import ( "bytes" - "compress/gzip" "context" - "encoding/base64" - "encoding/hex" "errors" "fmt" "io" @@ -20,358 +17,26 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "google.golang.org/grpc/codes" + "go.uber.org/zap" + "go.uber.org/zap/zaptest/observer" + codes "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "google.golang.org/protobuf/proto" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/configopaque" - "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumererror" - "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.opentelemetry.io/collector/exporter/exportertest" - "go.opentelemetry.io/collector/internal/testdata" - "go.opentelemetry.io/collector/internal/testutil" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/plog/plogotlp" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp" "go.opentelemetry.io/collector/pdata/ptrace" "go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp" - "go.opentelemetry.io/collector/receiver/otlpreceiver" - "go.opentelemetry.io/collector/receiver/receivertest" ) -func TestInvalidConfig(t *testing.T) { - config := &Config{ - HTTPClientSettings: confighttp.HTTPClientSettings{ - Endpoint: "", - }, - } - f := NewFactory() - set := exportertest.NewNopCreateSettings() - _, err := f.CreateTracesExporter(context.Background(), set, config) - require.Error(t, err) - _, err = f.CreateMetricsExporter(context.Background(), set, config) - require.Error(t, err) - _, err = f.CreateLogsExporter(context.Background(), set, config) - require.Error(t, err) -} - -func TestTraceNoBackend(t *testing.T) { - addr := testutil.GetAvailableLocalAddress(t) - exp := startTracesExporter(t, "", fmt.Sprintf("http://%s/v1/traces", addr)) - td := testdata.GenerateTraces(1) - assert.Error(t, exp.ConsumeTraces(context.Background(), td)) -} - -func TestTraceInvalidUrl(t *testing.T) { - exp := startTracesExporter(t, "http:/\\//this_is_an/*/invalid_url", "") - td := testdata.GenerateTraces(1) - assert.Error(t, exp.ConsumeTraces(context.Background(), td)) - - exp = startTracesExporter(t, "", "http:/\\//this_is_an/*/invalid_url") - td = testdata.GenerateTraces(1) - assert.Error(t, exp.ConsumeTraces(context.Background(), td)) -} - -func TestTraceError(t *testing.T) { - addr := testutil.GetAvailableLocalAddress(t) - - startTracesReceiver(t, addr, consumertest.NewErr(errors.New("my_error"))) - exp := startTracesExporter(t, "", fmt.Sprintf("http://%s/v1/traces", addr)) - - td := testdata.GenerateTraces(1) - assert.Error(t, exp.ConsumeTraces(context.Background(), td)) -} - -func TestTraceRoundTrip(t *testing.T) { - addr := testutil.GetAvailableLocalAddress(t) - - tests := []struct { - name string - baseURL string - overrideURL string - }{ - { - name: "wrongbase", - baseURL: "http://wronghostname", - overrideURL: fmt.Sprintf("http://%s/v1/traces", addr), - }, - { - name: "onlybase", - baseURL: fmt.Sprintf("http://%s", addr), - overrideURL: "", - }, - { - name: "override", - baseURL: "", - overrideURL: fmt.Sprintf("http://%s/v1/traces", addr), - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - sink := new(consumertest.TracesSink) - startTracesReceiver(t, addr, sink) - exp := startTracesExporter(t, test.baseURL, test.overrideURL) - - td := testdata.GenerateTraces(1) - assert.NoError(t, exp.ConsumeTraces(context.Background(), td)) - require.Eventually(t, func() bool { - return sink.SpanCount() > 0 - }, 1*time.Second, 10*time.Millisecond) - allTraces := sink.AllTraces() - require.Len(t, allTraces, 1) - assert.EqualValues(t, td, allTraces[0]) - }) - } -} - -func TestMetricsError(t *testing.T) { - addr := testutil.GetAvailableLocalAddress(t) - - startMetricsReceiver(t, addr, consumertest.NewErr(errors.New("my_error"))) - exp := startMetricsExporter(t, "", fmt.Sprintf("http://%s/v1/metrics", addr)) - - md := testdata.GenerateMetrics(1) - assert.Error(t, exp.ConsumeMetrics(context.Background(), md)) -} - -func TestMetricsRoundTrip(t *testing.T) { - addr := testutil.GetAvailableLocalAddress(t) - - tests := []struct { - name string - baseURL string - overrideURL string - }{ - { - name: "wrongbase", - baseURL: "http://wronghostname", - overrideURL: fmt.Sprintf("http://%s/v1/metrics", addr), - }, - { - name: "onlybase", - baseURL: fmt.Sprintf("http://%s", addr), - overrideURL: "", - }, - { - name: "override", - baseURL: "", - overrideURL: fmt.Sprintf("http://%s/v1/metrics", addr), - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - sink := new(consumertest.MetricsSink) - startMetricsReceiver(t, addr, sink) - exp := startMetricsExporter(t, test.baseURL, test.overrideURL) - - md := testdata.GenerateMetrics(1) - assert.NoError(t, exp.ConsumeMetrics(context.Background(), md)) - require.Eventually(t, func() bool { - return sink.DataPointCount() > 0 - }, 1*time.Second, 10*time.Millisecond) - allMetrics := sink.AllMetrics() - require.Len(t, allMetrics, 1) - assert.EqualValues(t, md, allMetrics[0]) - }) - } -} - -func TestLogsError(t *testing.T) { - addr := testutil.GetAvailableLocalAddress(t) - - startLogsReceiver(t, addr, consumertest.NewErr(errors.New("my_error"))) - exp := startLogsExporter(t, "", fmt.Sprintf("http://%s/v1/logs", addr)) - - md := testdata.GenerateLogs(1) - assert.Error(t, exp.ConsumeLogs(context.Background(), md)) -} - -func TestLogsRoundTrip(t *testing.T) { - addr := testutil.GetAvailableLocalAddress(t) - - tests := []struct { - name string - baseURL string - overrideURL string - }{ - { - name: "wrongbase", - baseURL: "http://wronghostname", - overrideURL: fmt.Sprintf("http://%s/v1/logs", addr), - }, - { - name: "onlybase", - baseURL: fmt.Sprintf("http://%s", addr), - overrideURL: "", - }, - { - name: "override", - baseURL: "", - overrideURL: fmt.Sprintf("http://%s/v1/logs", addr), - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - sink := new(consumertest.LogsSink) - startLogsReceiver(t, addr, sink) - exp := startLogsExporter(t, test.baseURL, test.overrideURL) - - md := testdata.GenerateLogs(1) - assert.NoError(t, exp.ConsumeLogs(context.Background(), md)) - require.Eventually(t, func() bool { - return sink.LogRecordCount() > 0 - }, 1*time.Second, 10*time.Millisecond) - allLogs := sink.AllLogs() - require.Len(t, allLogs, 1) - assert.EqualValues(t, md, allLogs[0]) - }) - } -} - -func TestIssue_4221(t *testing.T) { - svr := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - defer func() { assert.NoError(t, r.Body.Close()) }() - compressedData, err := io.ReadAll(r.Body) - require.NoError(t, err) - gzipReader, err := gzip.NewReader(bytes.NewReader(compressedData)) - require.NoError(t, err) - data, err := io.ReadAll(gzipReader) - require.NoError(t, err) - base64Data := base64.StdEncoding.EncodeToString(data) - // Verify same base64 encoded string is received. - assert.Equal(t, "CscBCkkKIAoMc2VydmljZS5uYW1lEhAKDnVvcC5zdGFnZS1ldS0xCiUKGW91dHN5c3RlbXMubW9kdWxlLnZlcnNpb24SCAoGOTAzMzg2EnoKEQoMdW9wX2NhbmFyaWVzEgExEmUKEEMDhT8Ib0+Mhs8Zi2VR34QSCOVRPDJ5XEG5IgA5QE41aASRrxZBQE41aASRrxZKEAoKc3Bhbl9pbmRleBICGANKHwoNY29kZS5mdW5jdGlvbhIOCgxteUZ1bmN0aW9uMzZ6AA==", base64Data) - unbase64Data, err := base64.StdEncoding.DecodeString(base64Data) - require.NoError(t, err) - tr := ptraceotlp.NewExportRequest() - require.NoError(t, tr.UnmarshalProto(unbase64Data)) - span := tr.Traces().ResourceSpans().At(0).ScopeSpans().At(0).Spans().At(0) - traceID := span.TraceID() - assert.Equal(t, "4303853f086f4f8c86cf198b6551df84", hex.EncodeToString(traceID[:])) - spanID := span.SpanID() - assert.Equal(t, "e5513c32795c41b9", hex.EncodeToString(spanID[:])) - })) - - exp := startTracesExporter(t, "", svr.URL) - - md := ptrace.NewTraces() - rms := md.ResourceSpans().AppendEmpty() - rms.Resource().Attributes().PutStr("service.name", "uop.stage-eu-1") - rms.Resource().Attributes().PutStr("outsystems.module.version", "903386") - ils := rms.ScopeSpans().AppendEmpty() - ils.Scope().SetName("uop_canaries") - ils.Scope().SetVersion("1") - span := ils.Spans().AppendEmpty() - - var traceIDBytes [16]byte - traceIDBytesSlice, err := hex.DecodeString("4303853f086f4f8c86cf198b6551df84") - require.NoError(t, err) - copy(traceIDBytes[:], traceIDBytesSlice) - span.SetTraceID(traceIDBytes) - traceID := span.TraceID() - assert.Equal(t, "4303853f086f4f8c86cf198b6551df84", hex.EncodeToString(traceID[:])) - - var spanIDBytes [8]byte - spanIDBytesSlice, err := hex.DecodeString("e5513c32795c41b9") - require.NoError(t, err) - copy(spanIDBytes[:], spanIDBytesSlice) - span.SetSpanID(spanIDBytes) - spanID := span.SpanID() - assert.Equal(t, "e5513c32795c41b9", hex.EncodeToString(spanID[:])) - - span.SetEndTimestamp(1634684637873000000) - span.Attributes().PutInt("span_index", 3) - span.Attributes().PutStr("code.function", "myFunction36") - span.SetStartTimestamp(1634684637873000000) - - assert.NoError(t, exp.ConsumeTraces(context.Background(), md)) -} - -func startTracesExporter(t *testing.T, baseURL string, overrideURL string) exporter.Traces { - factory := NewFactory() - cfg := createExporterConfig(baseURL, factory.CreateDefaultConfig()) - cfg.TracesEndpoint = overrideURL - exp, err := factory.CreateTracesExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) - require.NoError(t, err) - startAndCleanup(t, exp) - return exp -} - -func startMetricsExporter(t *testing.T, baseURL string, overrideURL string) exporter.Metrics { - factory := NewFactory() - cfg := createExporterConfig(baseURL, factory.CreateDefaultConfig()) - cfg.MetricsEndpoint = overrideURL - exp, err := factory.CreateMetricsExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) - require.NoError(t, err) - startAndCleanup(t, exp) - return exp -} - -func startLogsExporter(t *testing.T, baseURL string, overrideURL string) exporter.Logs { - factory := NewFactory() - cfg := createExporterConfig(baseURL, factory.CreateDefaultConfig()) - cfg.LogsEndpoint = overrideURL - exp, err := factory.CreateLogsExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) - require.NoError(t, err) - startAndCleanup(t, exp) - return exp -} - -func createExporterConfig(baseURL string, defaultCfg component.Config) *Config { - cfg := defaultCfg.(*Config) - cfg.Endpoint = baseURL - cfg.QueueSettings.Enabled = false - cfg.RetrySettings.Enabled = false - return cfg -} - -func startTracesReceiver(t *testing.T, addr string, next consumer.Traces) { - factory := otlpreceiver.NewFactory() - cfg := createReceiverConfig(addr, factory.CreateDefaultConfig()) - recv, err := factory.CreateTracesReceiver(context.Background(), receivertest.NewNopCreateSettings(), cfg, next) - require.NoError(t, err) - startAndCleanup(t, recv) -} - -func startMetricsReceiver(t *testing.T, addr string, next consumer.Metrics) { - factory := otlpreceiver.NewFactory() - cfg := createReceiverConfig(addr, factory.CreateDefaultConfig()) - recv, err := factory.CreateMetricsReceiver(context.Background(), receivertest.NewNopCreateSettings(), cfg, next) - require.NoError(t, err) - startAndCleanup(t, recv) -} - -func startLogsReceiver(t *testing.T, addr string, next consumer.Logs) { - factory := otlpreceiver.NewFactory() - cfg := createReceiverConfig(addr, factory.CreateDefaultConfig()) - recv, err := factory.CreateLogsReceiver(context.Background(), receivertest.NewNopCreateSettings(), cfg, next) - require.NoError(t, err) - startAndCleanup(t, recv) -} - -func createReceiverConfig(addr string, defaultCfg component.Config) *otlpreceiver.Config { - cfg := defaultCfg.(*otlpreceiver.Config) - cfg.HTTP.Endpoint = addr - cfg.GRPC = nil - return cfg -} - -func startAndCleanup(t *testing.T, cmp component.Component) { - require.NoError(t, cmp.Start(context.Background(), componenttest.NewNopHost())) - t.Cleanup(func() { - require.NoError(t, cmp.Shutdown(context.Background())) - }) -} - func TestErrorResponses(t *testing.T) { errMsgPrefix := func(srv *httptest.Server) string { return fmt.Sprintf("error exporting items, request to %s/v1/traces responded with HTTP Status Code ", srv.URL) @@ -498,7 +163,7 @@ func TestErrorResponses(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - srv := createBackend("/v1/traces", func(writer http.ResponseWriter, request *http.Request) { + srv := createBackend("/v1/traces", func(writer http.ResponseWriter, _ *http.Request) { for k, v := range test.headers { writer.Header().Add(k, v) } @@ -513,8 +178,9 @@ func TestErrorResponses(t *testing.T) { defer srv.Close() cfg := &Config{ + Encoding: EncodingProto, TracesEndpoint: fmt.Sprintf("%s/v1/traces", srv.URL), - // Create without QueueSettings and RetrySettings so that ConsumeTraces + // Create without QueueSettings and RetryConfig so that ConsumeTraces // returns the errors that we want to check immediately. } exp, err := createTracesExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) @@ -587,8 +253,9 @@ func TestUserAgent(t *testing.T) { defer srv.Close() cfg := &Config{ + Encoding: EncodingProto, TracesEndpoint: fmt.Sprintf("%s/v1/traces", srv.URL), - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Headers: test.headers, }, } @@ -620,8 +287,9 @@ func TestUserAgent(t *testing.T) { defer srv.Close() cfg := &Config{ + Encoding: EncodingProto, MetricsEndpoint: fmt.Sprintf("%s/v1/metrics", srv.URL), - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Headers: test.headers, }, } @@ -653,8 +321,9 @@ func TestUserAgent(t *testing.T) { defer srv.Close() cfg := &Config{ + Encoding: EncodingProto, LogsEndpoint: fmt.Sprintf("%s/v1/logs", srv.URL), - HTTPClientSettings: confighttp.HTTPClientSettings{ + ClientConfig: confighttp.ClientConfig{ Headers: test.headers, }, } @@ -679,76 +348,79 @@ func TestUserAgent(t *testing.T) { }) } -func TestPartialSuccess_traces(t *testing.T) { - srv := createBackend("/v1/traces", func(writer http.ResponseWriter, request *http.Request) { - response := ptraceotlp.NewExportResponse() - partial := response.PartialSuccess() - partial.SetErrorMessage("hello") - partial.SetRejectedSpans(1) - bytes, err := response.MarshalProto() - require.NoError(t, err) - writer.Header().Set("Content-Type", "application/x-protobuf") - _, err = writer.Write(bytes) - require.NoError(t, err) - }) - defer srv.Close() - - cfg := &Config{ - TracesEndpoint: fmt.Sprintf("%s/v1/traces", srv.URL), - HTTPClientSettings: confighttp.HTTPClientSettings{}, - } - exp, err := createTracesExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) - require.NoError(t, err) - - // start the exporter - err = exp.Start(context.Background(), componenttest.NewNopHost()) +func TestPartialSuccessInvalidBody(t *testing.T) { + cfg := createDefaultConfig() + set := exportertest.NewNopCreateSettings() + exp, err := newExporter(cfg, set) require.NoError(t, err) - t.Cleanup(func() { - require.NoError(t, exp.Shutdown(context.Background())) - }) - - // generate data - traces := ptrace.NewTraces() - err = exp.ConsumeTraces(context.Background(), traces) - require.Error(t, err) -} - -func TestPartialSuccess_metrics(t *testing.T) { - srv := createBackend("/v1/metrics", func(writer http.ResponseWriter, request *http.Request) { - response := pmetricotlp.NewExportResponse() - partial := response.PartialSuccess() - partial.SetErrorMessage("hello") - partial.SetRejectedDataPoints(1) - bytes, err := response.MarshalProto() - require.NoError(t, err) - writer.Header().Set("Content-Type", "application/x-protobuf") - _, err = writer.Write(bytes) - require.NoError(t, err) - }) - defer srv.Close() - - cfg := &Config{ - MetricsEndpoint: fmt.Sprintf("%s/v1/metrics", srv.URL), - HTTPClientSettings: confighttp.HTTPClientSettings{}, + invalidBodyCases := []struct { + telemetryType string + handler partialSuccessHandler + }{ + { + telemetryType: "traces", + handler: exp.tracesPartialSuccessHandler, + }, + { + telemetryType: "metrics", + handler: exp.metricsPartialSuccessHandler, + }, + { + telemetryType: "logs", + handler: exp.logsPartialSuccessHandler, + }, } - exp, err := createMetricsExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) - require.NoError(t, err) + for _, tt := range invalidBodyCases { + t.Run("Invalid response body_"+tt.telemetryType, func(t *testing.T) { + err := tt.handler([]byte{1}, "application/x-protobuf") + assert.ErrorContains(t, err, "error parsing protobuf response:") + }) + } +} - // start the exporter - err = exp.Start(context.Background(), componenttest.NewNopHost()) +func TestPartialSuccessUnsupportedContentType(t *testing.T) { + cfg := createDefaultConfig() + set := exportertest.NewNopCreateSettings() + exp, err := newExporter(cfg, set) require.NoError(t, err) - t.Cleanup(func() { - require.NoError(t, exp.Shutdown(context.Background())) - }) - - // generate data - metrics := pmetric.NewMetrics() - err = exp.ConsumeMetrics(context.Background(), metrics) - require.Error(t, err) + unsupportedContentTypeCases := []struct { + contentType string + }{ + { + contentType: "text/plain", + }, + { + contentType: "application/octet-stream", + }, + } + for _, telemetryType := range []string{"logs", "metrics", "traces"} { + for _, tt := range unsupportedContentTypeCases { + t.Run("Unsupported content type "+tt.contentType+" "+telemetryType, func(t *testing.T) { + var handler func(b []byte, contentType string) error + switch telemetryType { + case "logs": + handler = exp.logsPartialSuccessHandler + case "metrics": + handler = exp.metricsPartialSuccessHandler + case "traces": + handler = exp.tracesPartialSuccessHandler + default: + panic(telemetryType) + } + exportResponse := ptraceotlp.NewExportResponse() + exportResponse.PartialSuccess().SetErrorMessage("foo") + exportResponse.PartialSuccess().SetRejectedSpans(42) + b, err := exportResponse.MarshalProto() + require.NoError(t, err) + err = handler(b, tt.contentType) + assert.NoError(t, err) + }) + } + } } func TestPartialSuccess_logs(t *testing.T) { - srv := createBackend("/v1/logs", func(writer http.ResponseWriter, request *http.Request) { + srv := createBackend("/v1/logs", func(writer http.ResponseWriter, _ *http.Request) { response := plogotlp.NewExportResponse() partial := response.PartialSuccess() partial.SetErrorMessage("hello") @@ -762,10 +434,16 @@ func TestPartialSuccess_logs(t *testing.T) { defer srv.Close() cfg := &Config{ - LogsEndpoint: fmt.Sprintf("%s/v1/logs", srv.URL), - HTTPClientSettings: confighttp.HTTPClientSettings{}, + Encoding: EncodingProto, + LogsEndpoint: fmt.Sprintf("%s/v1/logs", srv.URL), + ClientConfig: confighttp.ClientConfig{}, } - exp, err := createLogsExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) + set := exportertest.NewNopCreateSettings() + + logger, observed := observer.New(zap.DebugLevel) + set.TelemetrySettings.Logger = zap.New(logger) + + exp, err := createLogsExporter(context.Background(), set, cfg) require.NoError(t, err) // start the exporter @@ -778,10 +456,17 @@ func TestPartialSuccess_logs(t *testing.T) { // generate data logs := plog.NewLogs() err = exp.ConsumeLogs(context.Background(), logs) - require.Error(t, err) + require.NoError(t, err) + require.Len(t, observed.FilterLevelExact(zap.WarnLevel).All(), 1) + require.Contains(t, observed.FilterLevelExact(zap.WarnLevel).All()[0].Message, "Partial success") } func TestPartialResponse_missingHeaderButHasBody(t *testing.T) { + cfg := createDefaultConfig() + set := exportertest.NewNopCreateSettings() + exp, err := newExporter(cfg, set) + require.NoError(t, err) + response := ptraceotlp.NewExportResponse() partial := response.PartialSuccess() partial.SetErrorMessage("hello") @@ -796,11 +481,16 @@ func TestPartialResponse_missingHeaderButHasBody(t *testing.T) { "Content-Type": {"application/x-protobuf"}, }, } - err = handlePartialSuccessResponse(resp, tracesPartialSuccessHandler) - assert.True(t, consumererror.IsPermanent(err)) + err = handlePartialSuccessResponse(resp, exp.tracesPartialSuccessHandler) + assert.NoError(t, err) } func TestPartialResponse_missingHeaderAndBody(t *testing.T) { + cfg := createDefaultConfig() + set := exportertest.NewNopCreateSettings() + exp, err := newExporter(cfg, set) + require.NoError(t, err) + resp := &http.Response{ // `-1` indicates a missing Content-Length header in the Go http standard library ContentLength: -1, @@ -809,21 +499,31 @@ func TestPartialResponse_missingHeaderAndBody(t *testing.T) { "Content-Type": {"application/x-protobuf"}, }, } - err := handlePartialSuccessResponse(resp, tracesPartialSuccessHandler) + err = handlePartialSuccessResponse(resp, exp.tracesPartialSuccessHandler) assert.Nil(t, err) } func TestPartialResponse_nonErrUnexpectedEOFError(t *testing.T) { + cfg := createDefaultConfig() + set := exportertest.NewNopCreateSettings() + exp, err := newExporter(cfg, set) + require.NoError(t, err) + resp := &http.Response{ // `-1` indicates a missing Content-Length header in the Go http standard library ContentLength: -1, Body: io.NopCloser(badReader{}), } - err := handlePartialSuccessResponse(resp, tracesPartialSuccessHandler) + err = handlePartialSuccessResponse(resp, exp.tracesPartialSuccessHandler) assert.Error(t, err) } func TestPartialSuccess_shortContentLengthHeader(t *testing.T) { + cfg := createDefaultConfig() + set := exportertest.NewNopCreateSettings() + exp, err := newExporter(cfg, set) + require.NoError(t, err) + response := ptraceotlp.NewExportResponse() partial := response.PartialSuccess() partial.SetErrorMessage("hello") @@ -837,11 +537,21 @@ func TestPartialSuccess_shortContentLengthHeader(t *testing.T) { "Content-Type": {"application/x-protobuf"}, }, } - err = handlePartialSuccessResponse(resp, tracesPartialSuccessHandler) + // For short content-length, a real error happens. + err = handlePartialSuccessResponse(resp, exp.tracesPartialSuccessHandler) assert.Error(t, err) } func TestPartialSuccess_longContentLengthHeader(t *testing.T) { + cfg := createDefaultConfig() + set := exportertest.NewNopCreateSettings() + + logger, observed := observer.New(zap.DebugLevel) + set.TelemetrySettings.Logger = zap.New(logger) + + exp, err := newExporter(cfg, set) + require.NoError(t, err) + response := ptraceotlp.NewExportResponse() partial := response.PartialSuccess() partial.SetErrorMessage("hello") @@ -855,11 +565,20 @@ func TestPartialSuccess_longContentLengthHeader(t *testing.T) { "Content-Type": {"application/x-protobuf"}, }, } - err = handlePartialSuccessResponse(resp, tracesPartialSuccessHandler) - assert.Error(t, err) + // No real error happens for long content length, so the partial + // success is handled as success with a warning. + err = handlePartialSuccessResponse(resp, exp.tracesPartialSuccessHandler) + assert.NoError(t, err) + assert.Len(t, observed.FilterLevelExact(zap.WarnLevel).All(), 1) + assert.Contains(t, observed.FilterLevelExact(zap.WarnLevel).All()[0].Message, "Partial success") } func TestPartialSuccessInvalidResponseBody(t *testing.T) { + cfg := createDefaultConfig() + set := exportertest.NewNopCreateSettings() + exp, err := newExporter(cfg, set) + require.NoError(t, err) + resp := &http.Response{ Body: io.NopCloser(badReader{}), ContentLength: 100, @@ -867,74 +586,206 @@ func TestPartialSuccessInvalidResponseBody(t *testing.T) { "Content-Type": {protobufContentType}, }, } - err := handlePartialSuccessResponse(resp, tracesPartialSuccessHandler) + err = handlePartialSuccessResponse(resp, exp.tracesPartialSuccessHandler) assert.Error(t, err) } -func TestPartialSuccessInvalidBody(t *testing.T) { - invalidBodyCases := []struct { - telemetryType string - handler partialSuccessHandler - }{ - { - telemetryType: "traces", - handler: tracesPartialSuccessHandler, - }, - { - telemetryType: "metrics", - handler: metricsPartialSuccessHandler, - }, - { - telemetryType: "logs", - handler: logsPartialSuccessHandler, - }, +func TestPartialSuccess_traces(t *testing.T) { + srv := createBackend("/v1/traces", func(writer http.ResponseWriter, _ *http.Request) { + response := ptraceotlp.NewExportResponse() + partial := response.PartialSuccess() + partial.SetErrorMessage("hello") + partial.SetRejectedSpans(1) + bytes, err := response.MarshalProto() + require.NoError(t, err) + writer.Header().Set("Content-Type", "application/x-protobuf") + _, err = writer.Write(bytes) + require.NoError(t, err) + }) + defer srv.Close() + + cfg := &Config{ + Encoding: EncodingProto, + TracesEndpoint: fmt.Sprintf("%s/v1/traces", srv.URL), + ClientConfig: confighttp.ClientConfig{}, } - for _, tt := range invalidBodyCases { - t.Run("Invalid response body_"+tt.telemetryType, func(t *testing.T) { - err := tt.handler([]byte{1}, "application/x-protobuf") - assert.ErrorContains(t, err, "error parsing protobuf response:") - }) + set := exportertest.NewNopCreateSettings() + logger, observed := observer.New(zap.DebugLevel) + set.TelemetrySettings.Logger = zap.New(logger) + exp, err := createTracesExporter(context.Background(), set, cfg) + require.NoError(t, err) + + // start the exporter + err = exp.Start(context.Background(), componenttest.NewNopHost()) + require.NoError(t, err) + t.Cleanup(func() { + require.NoError(t, exp.Shutdown(context.Background())) + }) + + // generate data + traces := ptrace.NewTraces() + err = exp.ConsumeTraces(context.Background(), traces) + require.NoError(t, err) + require.Len(t, observed.FilterLevelExact(zap.WarnLevel).All(), 1) + require.Contains(t, observed.FilterLevelExact(zap.WarnLevel).All()[0].Message, "Partial success") +} + +func TestPartialSuccess_metrics(t *testing.T) { + srv := createBackend("/v1/metrics", func(writer http.ResponseWriter, _ *http.Request) { + response := pmetricotlp.NewExportResponse() + partial := response.PartialSuccess() + partial.SetErrorMessage("hello") + partial.SetRejectedDataPoints(1) + bytes, err := response.MarshalProto() + require.NoError(t, err) + writer.Header().Set("Content-Type", "application/x-protobuf") + _, err = writer.Write(bytes) + require.NoError(t, err) + }) + defer srv.Close() + + cfg := &Config{ + Encoding: EncodingProto, + MetricsEndpoint: fmt.Sprintf("%s/v1/metrics", srv.URL), + ClientConfig: confighttp.ClientConfig{}, } + set := exportertest.NewNopCreateSettings() + logger, observed := observer.New(zap.DebugLevel) + set.TelemetrySettings.Logger = zap.New(logger) + exp, err := createMetricsExporter(context.Background(), set, cfg) + require.NoError(t, err) + + // start the exporter + err = exp.Start(context.Background(), componenttest.NewNopHost()) + require.NoError(t, err) + t.Cleanup(func() { + require.NoError(t, exp.Shutdown(context.Background())) + }) + + // generate data + metrics := pmetric.NewMetrics() + err = exp.ConsumeMetrics(context.Background(), metrics) + require.NoError(t, err) + require.Len(t, observed.FilterLevelExact(zap.WarnLevel).All(), 1) + require.Contains(t, observed.FilterLevelExact(zap.WarnLevel).All()[0].Message, "Partial success") } -func TestPartialSuccessUnsupportedContentType(t *testing.T) { - unsupportedContentTypeCases := []struct { - contentType string +func TestEncoding(t *testing.T) { + set := exportertest.NewNopCreateSettings() + set.BuildInfo.Description = "Collector" + set.BuildInfo.Version = "1.2.3test" + + tests := []struct { + name string + encoding EncodingType + expectedEncoding EncodingType }{ { - contentType: "application/json", + name: "proto_encoding", + encoding: EncodingProto, + expectedEncoding: "application/x-protobuf", }, { - contentType: "text/plain", - }, - { - contentType: "application/octet-stream", + name: "json_encoding", + encoding: EncodingJSON, + expectedEncoding: "application/json", }, } - for _, telemetryType := range []string{"logs", "metrics", "traces"} { - for _, tt := range unsupportedContentTypeCases { - t.Run("Unsupported content type "+tt.contentType+" "+telemetryType, func(t *testing.T) { - var handler func(b []byte, contentType string) error - switch telemetryType { - case "logs": - handler = logsPartialSuccessHandler - case "metrics": - handler = metricsPartialSuccessHandler - case "traces": - handler = tracesPartialSuccessHandler - default: - panic(telemetryType) + + t.Run("traces", func(t *testing.T) { + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + srv := createBackend("/v1/traces", func(writer http.ResponseWriter, request *http.Request) { + assert.Contains(t, request.Header.Get("content-type"), test.expectedEncoding) + writer.WriteHeader(200) + }) + defer srv.Close() + + cfg := &Config{ + TracesEndpoint: fmt.Sprintf("%s/v1/traces", srv.URL), + Encoding: test.encoding, } - exportResponse := ptraceotlp.NewExportResponse() - exportResponse.PartialSuccess().SetErrorMessage("foo") - exportResponse.PartialSuccess().SetRejectedSpans(42) - b, err := exportResponse.MarshalProto() + exp, err := createTracesExporter(context.Background(), set, cfg) + require.NoError(t, err) + + // start the exporter + err = exp.Start(context.Background(), componenttest.NewNopHost()) + require.NoError(t, err) + t.Cleanup(func() { + require.NoError(t, exp.Shutdown(context.Background())) + }) + + // generate data + traces := ptrace.NewTraces() + err = exp.ConsumeTraces(context.Background(), traces) require.NoError(t, err) - err = handler(b, tt.contentType) - assert.NoError(t, err) }) } - } + }) + + t.Run("metrics", func(t *testing.T) { + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + srv := createBackend("/v1/metrics", func(writer http.ResponseWriter, request *http.Request) { + assert.Contains(t, request.Header.Get("content-type"), test.expectedEncoding) + writer.WriteHeader(200) + }) + defer srv.Close() + + cfg := &Config{ + MetricsEndpoint: fmt.Sprintf("%s/v1/metrics", srv.URL), + Encoding: test.encoding, + } + exp, err := createMetricsExporter(context.Background(), set, cfg) + require.NoError(t, err) + + // start the exporter + err = exp.Start(context.Background(), componenttest.NewNopHost()) + require.NoError(t, err) + t.Cleanup(func() { + require.NoError(t, exp.Shutdown(context.Background())) + }) + + // generate data + metrics := pmetric.NewMetrics() + err = exp.ConsumeMetrics(context.Background(), metrics) + require.NoError(t, err) + }) + } + }) + + t.Run("logs", func(t *testing.T) { + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + srv := createBackend("/v1/logs", func(writer http.ResponseWriter, request *http.Request) { + assert.Contains(t, request.Header.Get("content-type"), test.expectedEncoding) + writer.WriteHeader(200) + }) + defer srv.Close() + + cfg := &Config{ + LogsEndpoint: fmt.Sprintf("%s/v1/logs", srv.URL), + Encoding: test.encoding, + } + exp, err := createLogsExporter(context.Background(), set, cfg) + require.NoError(t, err) + + // start the exporter + err = exp.Start(context.Background(), componenttest.NewNopHost()) + require.NoError(t, err) + t.Cleanup(func() { + require.NoError(t, exp.Shutdown(context.Background())) + }) + + // generate data + logs := plog.NewLogs() + err = exp.ConsumeLogs(context.Background(), logs) + require.NoError(t, err) + + srv.Close() + }) + } + }) } func createBackend(endpoint string, handler func(writer http.ResponseWriter, request *http.Request)) *httptest.Server { diff --git a/exporter/otlphttpexporter/package_test.go b/exporter/otlphttpexporter/package_test.go new file mode 100644 index 00000000000..07858386cc4 --- /dev/null +++ b/exporter/otlphttpexporter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otlphttpexporter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/otlphttpexporter/testdata/bad_invalid_encoding.yaml b/exporter/otlphttpexporter/testdata/bad_invalid_encoding.yaml new file mode 100644 index 00000000000..593aee269a5 --- /dev/null +++ b/exporter/otlphttpexporter/testdata/bad_invalid_encoding.yaml @@ -0,0 +1 @@ +encoding: invalid diff --git a/exporter/package_test.go b/exporter/package_test.go new file mode 100644 index 00000000000..cb9a4484dae --- /dev/null +++ b/exporter/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package exporter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/auth/authtest/mock_clientauth.go b/extension/auth/authtest/mock_clientauth.go index b9c6b80e8b0..d28546fc4a0 100644 --- a/extension/auth/authtest/mock_clientauth.go +++ b/extension/auth/authtest/mock_clientauth.go @@ -27,18 +27,18 @@ type MockClient struct { } // Start for the MockClient does nothing -func (m *MockClient) Start(_ context.Context, _ component.Host) error { +func (m *MockClient) Start(context.Context, component.Host) error { return nil } // Shutdown for the MockClient does nothing -func (m *MockClient) Shutdown(_ context.Context) error { +func (m *MockClient) Shutdown(context.Context) error { return nil } // RoundTripper for the MockClient either returns error if the mock authenticator is forced to or // returns the supplied resultRoundTripper. -func (m *MockClient) RoundTripper(_ http.RoundTripper) (http.RoundTripper, error) { +func (m *MockClient) RoundTripper(http.RoundTripper) (http.RoundTripper, error) { if m.MustError { return nil, errMockError } diff --git a/extension/auth/authtest/mock_clientauth_test.go b/extension/auth/authtest/mock_clientauth_test.go index 5b0bd18d6b5..873d62e8384 100644 --- a/extension/auth/authtest/mock_clientauth_test.go +++ b/extension/auth/authtest/mock_clientauth_test.go @@ -28,7 +28,7 @@ func TestNilStartAndShutdown(t *testing.T) { type customRoundTripper struct{} -func (c *customRoundTripper) RoundTrip(_ *http.Request) (*http.Response, error) { +func (c *customRoundTripper) RoundTrip(*http.Request) (*http.Response, error) { return nil, nil } diff --git a/extension/auth/authtest/package_test.go b/extension/auth/authtest/package_test.go new file mode 100644 index 00000000000..b503d1f7ce2 --- /dev/null +++ b/extension/auth/authtest/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package authtest + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/auth/client.go b/extension/auth/client.go index cf1bdb55fb8..d1855d8aece 100644 --- a/extension/auth/client.go +++ b/extension/auth/client.go @@ -25,7 +25,7 @@ type Client interface { PerRPCCredentials() (credentials.PerRPCCredentials, error) } -// ClientOption represents the possible options for NewServerAuthenticator. +// ClientOption represents the possible options for NewClient. type ClientOption func(*defaultClient) // ClientRoundTripperFunc specifies the function that returns a RoundTripper that can be used to authenticate HTTP requests. diff --git a/extension/auth/client_test.go b/extension/auth/client_test.go index ea643b2cc14..c3666c229b0 100644 --- a/extension/auth/client_test.go +++ b/extension/auth/client_test.go @@ -45,7 +45,7 @@ func TestClientDefaultValues(t *testing.T) { func TestWithClientStart(t *testing.T) { called := false - e := NewClient(WithClientStart(func(c context.Context, h component.Host) error { + e := NewClient(WithClientStart(func(context.Context, component.Host) error { called = true return nil })) @@ -60,7 +60,7 @@ func TestWithClientStart(t *testing.T) { func TestWithClientShutdown(t *testing.T) { called := false - e := NewClient(WithClientShutdown(func(c context.Context) error { + e := NewClient(WithClientShutdown(func(context.Context) error { called = true return nil })) diff --git a/extension/auth/go.mod b/extension/auth/go.mod index 836e37564c0..8b1b0ba6a45 100644 --- a/extension/auth/go.mod +++ b/extension/auth/go.mod @@ -1,39 +1,50 @@ module go.opentelemetry.io/collector/extension/auth -go 1.20 +go 1.21 require ( github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.85.0 - go.opentelemetry.io/collector/extension v0.85.0 - google.golang.org/grpc v1.58.1 + go.opentelemetry.io/collector/component v0.96.0 + go.opentelemetry.io/collector/extension v0.96.0 + go.uber.org/goleak v1.3.0 + google.golang.org/grpc v1.62.0 ) require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.0.1 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.85.0 // indirect - go.opentelemetry.io/collector/confmap v0.85.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0014 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0014 // indirect - go.opentelemetry.io/otel v1.18.0 // indirect - go.opentelemetry.io/otel/metric v1.18.0 // indirect - go.opentelemetry.io/otel/trace v1.18.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect + go.opentelemetry.io/collector/confmap v0.96.0 // indirect + go.opentelemetry.io/collector/pdata v1.3.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/protobuf v1.31.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.20.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -43,8 +54,6 @@ replace go.opentelemetry.io/collector/confmap => ../../confmap replace go.opentelemetry.io/collector/extension => ../ -replace go.opentelemetry.io/collector/featuregate => ../../featuregate - replace go.opentelemetry.io/collector/pdata => ../../pdata replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry diff --git a/extension/auth/go.sum b/extension/auth/go.sum index e5817058840..2f664245ecd 100644 --- a/extension/auth/go.sum +++ b/extension/auth/go.sum @@ -1,48 +1,74 @@ +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= -github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= -go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= -go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= -go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= -go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -52,20 +78,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -74,15 +100,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= -google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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/extension/auth/package_test.go b/extension/auth/package_test.go new file mode 100644 index 00000000000..205e87026a7 --- /dev/null +++ b/extension/auth/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package auth + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/auth/server_test.go b/extension/auth/server_test.go index c99ee6042d1..9e1f7a5b973 100644 --- a/extension/auth/server_test.go +++ b/extension/auth/server_test.go @@ -39,7 +39,7 @@ func TestWithServerAuthenticateFunc(t *testing.T) { // prepare authCalled := false e := NewServer( - WithServerAuthenticate(func(ctx context.Context, headers map[string][]string) (context.Context, error) { + WithServerAuthenticate(func(ctx context.Context, _ map[string][]string) (context.Context, error) { authCalled = true return ctx, nil }), @@ -55,7 +55,7 @@ func TestWithServerAuthenticateFunc(t *testing.T) { func TestWithServerStart(t *testing.T) { called := false - e := NewServer(WithServerStart(func(c context.Context, h component.Host) error { + e := NewServer(WithServerStart(func(context.Context, component.Host) error { called = true return nil })) @@ -70,7 +70,7 @@ func TestWithServerStart(t *testing.T) { func TestWithServerShutdown(t *testing.T) { called := false - e := NewServer(WithServerShutdown(func(c context.Context) error { + e := NewServer(WithServerShutdown(func(context.Context) error { called = true return nil })) diff --git a/extension/ballastextension/README.md b/extension/ballastextension/README.md index a67ab0bbbca..a82e1b7ad39 100644 --- a/extension/ballastextension/README.md +++ b/extension/ballastextension/README.md @@ -1,9 +1,24 @@ +> [!WARNING] +> The memory ballast extension is deprecated in favor of using the `GOMEMLIMIT` environment variable. +> This environment variable is available on any Collector built with Go 1.19 or higher. Official binary releases are built with Go 1.19 since v0.61.0. See [issue 8343](https://github.com/open-telemetry/opentelemetry-collector/issues/8343) for the deprecation timeline. +> +> To migrate to `GOMEMLIMIT`, set its value to 80% of the hard memory limit of your Collector. +> For example, if the Collector hard memory limit is 1GiB, set `GOMEMLIMIT` to `800MiB`. +> Check [the Go documentation](https://pkg.go.dev/runtime#hdr-Environment_Variables) for more information about `GOMEMLIMIT`'s syntax. + # Memory Ballast -| Status | | -| ------------------------ | ----------------- | -| Stability | [beta] | -| Distributions | [core], [contrib] | + +| Status | | +| ------------- |-----------| +| Stability | [deprecated] | +| Distributions | [core], [contrib] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fballast%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fballast) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fballast%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fballast) | + +[deprecated]: https://github.com/open-telemetry/opentelemetry-collector#deprecated +[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib + Memory Ballast extension enables applications to configure memory ballast for the process. For more details see: - [Go memory ballast blogpost](https://web.archive.org/web/20210929130001/https://blog.twitch.tv/en/2019/04/10/go-memory-ballast-how-i-learnt-to-stop-worrying-and-love-the-heap-26c2462549a2/) @@ -46,7 +61,3 @@ extensions: memory_ballast: size_in_percentage: 20 ``` - -[beta]: https://github.com/open-telemetry/opentelemetry-collector-contrib#beta -[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol diff --git a/extension/ballastextension/factory.go b/extension/ballastextension/factory.go index 6609111dd80..b1742d9081b 100644 --- a/extension/ballastextension/factory.go +++ b/extension/ballastextension/factory.go @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +//go:generate mdatagen metadata.yaml + package ballastextension // import "go.opentelemetry.io/collector/extension/ballastextension" import ( @@ -8,20 +10,16 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/extension" + "go.opentelemetry.io/collector/extension/ballastextension/internal/metadata" "go.opentelemetry.io/collector/internal/iruntime" ) -const ( - // The value of extension "type" in configuration. - typeStr = "memory_ballast" -) - // memHandler returns the total memory of the target host/vm var memHandler = iruntime.TotalMemory // NewFactory creates a factory for FluentBit extension. func NewFactory() extension.Factory { - return extension.NewFactory(typeStr, createDefaultConfig, createExtension, component.StabilityLevelBeta) + return extension.NewFactory(metadata.Type, createDefaultConfig, createExtension, metadata.ExtensionStability) } func createDefaultConfig() component.Config { diff --git a/extension/ballastextension/go.mod b/extension/ballastextension/go.mod index b7913a24909..a6035aa3fca 100644 --- a/extension/ballastextension/go.mod +++ b/extension/ballastextension/go.mod @@ -1,47 +1,59 @@ +// Deprecated: Use the GOMEMLIMIT environment variable instead. module go.opentelemetry.io/collector/extension/ballastextension -go 1.20 +go 1.21 require ( github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.85.0 - go.opentelemetry.io/collector/component v0.85.0 - go.opentelemetry.io/collector/confmap v0.85.0 - go.opentelemetry.io/collector/extension v0.85.0 - go.uber.org/zap v1.26.0 + go.opentelemetry.io/collector v0.96.0 + go.opentelemetry.io/collector/component v0.96.0 + go.opentelemetry.io/collector/confmap v0.96.0 + go.opentelemetry.io/collector/extension v0.96.0 + go.opentelemetry.io/otel/metric v1.24.0 + go.opentelemetry.io/otel/trace v1.24.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.0.1 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/shirou/gopsutil/v3 v3.23.8 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/shirou/gopsutil/v3 v3.24.1 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.85.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0014 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0014 // indirect - go.opentelemetry.io/otel v1.18.0 // indirect - go.opentelemetry.io/otel/metric v1.18.0 // indirect - go.opentelemetry.io/otel/trace v1.18.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect + go.opentelemetry.io/collector/pdata v1.3.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/grpc v1.58.1 // indirect - google.golang.org/protobuf v1.31.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -51,20 +63,12 @@ replace go.opentelemetry.io/collector/component => ../../component replace go.opentelemetry.io/collector/confmap => ../../confmap -replace go.opentelemetry.io/collector/exporter => ../../exporter - replace go.opentelemetry.io/collector/extension => ../ replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/pdata => ../../pdata -replace go.opentelemetry.io/collector/receiver => ../../receiver - -replace go.opentelemetry.io/collector/semconv => ../../semconv - -replace go.opentelemetry.io/collector/extension/zpagesextension => ../zpagesextension - replace go.opentelemetry.io/collector/consumer => ../../consumer retract ( @@ -72,12 +76,4 @@ retract ( v0.69.0 // Release failed, use v0.69.1 ) -replace go.opentelemetry.io/collector/processor => ../../processor - -replace go.opentelemetry.io/collector/connector => ../../connector - -replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet - replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry - -replace go.opentelemetry.io/collector/service => ../../service diff --git a/extension/ballastextension/go.sum b/extension/ballastextension/go.sum index 770757aef0d..9394f812d28 100644 --- a/extension/ballastextension/go.sum +++ b/extension/ballastextension/go.sum @@ -1,10 +1,19 @@ +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= @@ -12,33 +21,43 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= -github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= 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/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/shirou/gopsutil/v3 v3.23.8 h1:xnATPiybo6GgdRoC4YoGnxXZFRc3dqQTGi73oLvvBrE= -github.com/shirou/gopsutil/v3 v3.23.8/go.mod h1:7hmCaBn+2ZwaZOr6jmPBZDfawwMGuo1id3C6aM8EDqQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/shirou/gopsutil/v3 v3.24.1 h1:R3t6ondCEvmARp3wxODhXMTLC/klMa87h2PHUw5m7QI= +github.com/shirou/gopsutil/v3 v3.24.1/go.mod h1:UU7a2MSBQa+kW1uuDq8DeEBS8kmrnQwsv2b5O513rwU= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -56,17 +75,24 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= -go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= -go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= -go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= -go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -76,8 +102,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -88,12 +114,13 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -102,16 +129,17 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= -google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 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/extension/ballastextension/internal/metadata/generated_status.go b/extension/ballastextension/internal/metadata/generated_status.go new file mode 100644 index 00000000000..c6407064c52 --- /dev/null +++ b/extension/ballastextension/internal/metadata/generated_status.go @@ -0,0 +1,27 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" +) + +var ( + Type = component.MustNewType("memory_ballast") + scopeName = "go.opentelemetry.io/collector/extension/ballastextension" +) + +const ( + ExtensionStability = component.StabilityLevelDeprecated +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter(scopeName) +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer(scopeName) +} diff --git a/extension/ballastextension/memory_ballast.go b/extension/ballastextension/memory_ballast.go index ba1b1749b6e..afbf6ec6d7d 100644 --- a/extension/ballastextension/memory_ballast.go +++ b/extension/ballastextension/memory_ballast.go @@ -21,7 +21,7 @@ type memoryBallast struct { getTotalMem func() (uint64, error) } -func (m *memoryBallast) Start(_ context.Context, _ component.Host) error { +func (m *memoryBallast) Start(context.Context, component.Host) error { // absolute value supersedes percentage setting if m.cfg.SizeMiB > 0 { m.ballastSizeBytes = m.cfg.SizeMiB * megaBytes @@ -43,7 +43,7 @@ func (m *memoryBallast) Start(_ context.Context, _ component.Host) error { return nil } -func (m *memoryBallast) Shutdown(_ context.Context) error { +func (m *memoryBallast) Shutdown(context.Context) error { m.ballast = nil return nil } diff --git a/extension/ballastextension/metadata.yaml b/extension/ballastextension/metadata.yaml new file mode 100644 index 00000000000..2909cd5cd83 --- /dev/null +++ b/extension/ballastextension/metadata.yaml @@ -0,0 +1,7 @@ +type: memory_ballast + +status: + class: extension + stability: + deprecated: [extension] + distributions: [core, contrib] diff --git a/extension/ballastextension/package_test.go b/extension/ballastextension/package_test.go new file mode 100644 index 00000000000..9035e22edbc --- /dev/null +++ b/extension/ballastextension/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ballastextension + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/extension.go b/extension/extension.go index 6b8df571b81..292358b33ba 100644 --- a/extension/extension.go +++ b/extension/extension.go @@ -16,6 +16,14 @@ import ( // to the service, examples: health check endpoint, z-pages, etc. type Extension = component.Component +// Dependent is an optional interface that can be implemented by extensions +// that depend on other extensions and must be started only after their dependencies. +// See https://github.com/open-telemetry/opentelemetry-collector/pull/8768 for examples. +type Dependent interface { + Extension + Dependencies() []component.ID +} + // PipelineWatcher is an extra interface for Extension hosted by the OpenTelemetry // Collector that is to be implemented by extensions interested in changes to pipeline // states. Typically this will be used by extensions that change their behavior if data is @@ -37,9 +45,23 @@ type PipelineWatcher interface { // wishes to be notified of the Collector's effective configuration. type ConfigWatcher interface { // NotifyConfig notifies the extension of the Collector's current effective configuration. + // The extension owns the `confmap.Conf`. Callers must ensure that it's safe for + // extensions to store the `conf` pointer and use it concurrently with any other + // instances of `conf`. NotifyConfig(ctx context.Context, conf *confmap.Conf) error } +// StatusWatcher is an extra interface for Extension hosted by the OpenTelemetry +// Collector that is to be implemented by extensions interested in changes to component +// status. +type StatusWatcher interface { + // ComponentStatusChanged notifies about a change in the source component status. + // Extensions that implement this interface must be ready that the ComponentStatusChanged + // may be called before, after or concurrently with calls to Component.Start() and Component.Shutdown(). + // The function may be called concurrently with itself. + ComponentStatusChanged(source *component.InstanceID, event *component.StatusEvent) +} + // CreateSettings is passed to Factory.Create(...) function. type CreateSettings struct { // ID returns the ID of the component that will be created. diff --git a/extension/extension_test.go b/extension/extension_test.go index 23a57d0bcc9..d3dbf80c8c3 100644 --- a/extension/extension_test.go +++ b/extension/extension_test.go @@ -21,18 +21,18 @@ type nopExtension struct { } func TestNewFactory(t *testing.T) { - const typeStr = "test" + var testType = component.MustNewType("test") defaultCfg := struct{}{} nopExtensionInstance := new(nopExtension) factory := NewFactory( - typeStr, + testType, func() component.Config { return &defaultCfg }, - func(ctx context.Context, settings CreateSettings, extension component.Config) (Extension, error) { + func(context.Context, CreateSettings, component.Config) (Extension, error) { return nopExtensionInstance, nil }, component.StabilityLevelDevelopment) - assert.EqualValues(t, typeStr, factory.Type()) + assert.EqualValues(t, testType, factory.Type()) assert.EqualValues(t, &defaultCfg, factory.CreateDefaultConfig()) assert.Equal(t, component.StabilityLevelDevelopment, factory.ExtensionStability()) @@ -48,8 +48,8 @@ func TestMakeFactoryMap(t *testing.T) { out map[component.Type]Factory } - p1 := NewFactory("p1", nil, nil, component.StabilityLevelAlpha) - p2 := NewFactory("p2", nil, nil, component.StabilityLevelAlpha) + p1 := NewFactory(component.MustNewType("p1"), nil, nil, component.StabilityLevelAlpha) + p2 := NewFactory(component.MustNewType("p2"), nil, nil, component.StabilityLevelAlpha) testCases := []testCase{ { name: "different names", @@ -61,7 +61,7 @@ func TestMakeFactoryMap(t *testing.T) { }, { name: "same name", - in: []Factory{p1, p2, NewFactory("p1", nil, nil, component.StabilityLevelAlpha)}, + in: []Factory{p1, p2, NewFactory(component.MustNewType("p1"), nil, nil, component.StabilityLevelAlpha)}, }, } for i := range testCases { @@ -79,16 +79,16 @@ func TestMakeFactoryMap(t *testing.T) { } func TestBuilder(t *testing.T) { - const typeStr = "test" + var testType = component.MustNewType("test") defaultCfg := struct{}{} - testID := component.NewID(typeStr) - unknownID := component.NewID("unknown") + testID := component.NewID(testType) + unknownID := component.MustNewID("unknown") factories, err := MakeFactoryMap([]Factory{ NewFactory( - typeStr, + testType, func() component.Config { return &defaultCfg }, - func(ctx context.Context, settings CreateSettings, extension component.Config) (Extension, error) { + func(_ context.Context, settings CreateSettings, _ component.Config) (Extension, error) { return nopExtension{CreateSettings: settings}, nil }, component.StabilityLevelDevelopment), @@ -111,20 +111,20 @@ func TestBuilder(t *testing.T) { assert.EqualError(t, err, "extension factory not available for: \"unknown\"") assert.Nil(t, missingType) - missingCfg, err := b.Create(context.Background(), createSettings(component.NewIDWithName(typeStr, "foo"))) + missingCfg, err := b.Create(context.Background(), createSettings(component.NewIDWithName(testType, "foo"))) assert.EqualError(t, err, "extension \"test/foo\" is not configured") assert.Nil(t, missingCfg) } func TestBuilderFactory(t *testing.T) { - factories, err := MakeFactoryMap([]Factory{NewFactory("foo", nil, nil, component.StabilityLevelDevelopment)}...) + factories, err := MakeFactoryMap([]Factory{NewFactory(component.MustNewType("foo"), nil, nil, component.StabilityLevelDevelopment)}...) require.NoError(t, err) - cfgs := map[component.ID]component.Config{component.NewID("foo"): struct{}{}} + cfgs := map[component.ID]component.Config{component.MustNewID("foo"): struct{}{}} b := NewBuilder(cfgs, factories) - assert.NotNil(t, b.Factory(component.NewID("foo").Type())) - assert.Nil(t, b.Factory(component.NewID("bar").Type())) + assert.NotNil(t, b.Factory(component.MustNewID("foo").Type())) + assert.Nil(t, b.Factory(component.MustNewID("bar").Type())) } func createSettings(id component.ID) CreateSettings { diff --git a/extension/extensiontest/nop_extension.go b/extension/extensiontest/nop_extension.go index 192650a0442..f92ff388d94 100644 --- a/extension/extensiontest/nop_extension.go +++ b/extension/extensiontest/nop_extension.go @@ -11,11 +11,12 @@ import ( "go.opentelemetry.io/collector/extension" ) -const typeStr = "nop" +var nopType = component.MustNewType("nop") // NewNopCreateSettings returns a new nop settings for extension.Factory Create* functions. func NewNopCreateSettings() extension.CreateSettings { return extension.CreateSettings{ + ID: component.NewID(nopType), TelemetrySettings: componenttest.NewNopTelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo(), } @@ -24,7 +25,7 @@ func NewNopCreateSettings() extension.CreateSettings { // NewNopFactory returns an extension.Factory that constructs nop extensions. func NewNopFactory() extension.Factory { return extension.NewFactory( - "nop", + nopType, func() component.Config { return &nopConfig{} }, @@ -38,16 +39,16 @@ type nopConfig struct{} var nopInstance = &nopExtension{} -// nopExtension stores consumed traces and metrics for testing purposes. +// nopExtension acts as an extension for testing purposes. type nopExtension struct { component.StartFunc component.ShutdownFunc } -// NewNopBuilder returns a extension.Builder that constructs nop receivers. +// NewNopBuilder returns a extension.Builder that constructs nop extension. func NewNopBuilder() *extension.Builder { nopFactory := NewNopFactory() return extension.NewBuilder( - map[component.ID]component.Config{component.NewID(typeStr): nopFactory.CreateDefaultConfig()}, - map[component.Type]extension.Factory{typeStr: nopFactory}) + map[component.ID]component.Config{component.NewID(nopType): nopFactory.CreateDefaultConfig()}, + map[component.Type]extension.Factory{nopType: nopFactory}) } diff --git a/extension/extensiontest/nop_extension_test.go b/extension/extensiontest/nop_extension_test.go index c188feecdfc..7ebda6195ae 100644 --- a/extension/extensiontest/nop_extension_test.go +++ b/extension/extensiontest/nop_extension_test.go @@ -17,7 +17,7 @@ import ( func TestNewNopFactory(t *testing.T) { factory := NewNopFactory() require.NotNil(t, factory) - assert.Equal(t, component.Type("nop"), factory.Type()) + assert.Equal(t, component.MustNewType("nop"), factory.Type()) cfg := factory.CreateDefaultConfig() assert.Equal(t, &nopConfig{}, cfg) @@ -34,7 +34,7 @@ func TestNewNopBuilder(t *testing.T) { factory := NewNopFactory() cfg := factory.CreateDefaultConfig() set := NewNopCreateSettings() - set.ID = component.NewID(typeStr) + set.ID = component.NewID(nopType) ext, err := factory.CreateExtension(context.Background(), set, cfg) require.NoError(t, err) diff --git a/extension/extensiontest/package_test.go b/extension/extensiontest/package_test.go new file mode 100644 index 00000000000..22f7af4bd14 --- /dev/null +++ b/extension/extensiontest/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package extensiontest + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/extensiontest/statuswatcher_extension.go b/extension/extensiontest/statuswatcher_extension.go new file mode 100644 index 00000000000..eee0db94165 --- /dev/null +++ b/extension/extensiontest/statuswatcher_extension.go @@ -0,0 +1,47 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package extensiontest // import "go.opentelemetry.io/collector/extension/extensiontest" + +import ( + "context" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/extension" +) + +// NewStatusWatcherExtensionCreateSettings returns a new nop settings for Create*Extension functions. +func NewStatusWatcherExtensionCreateSettings() extension.CreateSettings { + return extension.CreateSettings{ + TelemetrySettings: componenttest.NewNopTelemetrySettings(), + BuildInfo: component.NewDefaultBuildInfo(), + } +} + +// NewStatusWatcherExtensionFactory returns a component.ExtensionFactory to construct a status watcher extension. +func NewStatusWatcherExtensionFactory( + onStatusChanged func(source *component.InstanceID, event *component.StatusEvent), +) extension.Factory { + return extension.NewFactory( + component.MustNewType("statuswatcher"), + func() component.Config { + return &struct{}{} + }, + func(context.Context, extension.CreateSettings, component.Config) (component.Component, error) { + return &statusWatcherExtension{onStatusChanged: onStatusChanged}, nil + }, + component.StabilityLevelStable) +} + +// statusWatcherExtension receives status events reported via component status reporting for testing +// purposes. +type statusWatcherExtension struct { + component.StartFunc + component.ShutdownFunc + onStatusChanged func(source *component.InstanceID, event *component.StatusEvent) +} + +func (e statusWatcherExtension) ComponentStatusChanged(source *component.InstanceID, event *component.StatusEvent) { + e.onStatusChanged(source, event) +} diff --git a/extension/extensiontest/statuswatcher_extension_test.go b/extension/extensiontest/statuswatcher_extension_test.go new file mode 100644 index 00000000000..14f9859e354 --- /dev/null +++ b/extension/extensiontest/statuswatcher_extension_test.go @@ -0,0 +1,39 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package extensiontest + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/extension" +) + +func TestStatusWatcherExtension(t *testing.T) { + statusChanged := false + factory := NewStatusWatcherExtensionFactory( + func(*component.InstanceID, *component.StatusEvent) { + statusChanged = true + }, + ) + require.NotNil(t, factory) + assert.Equal(t, component.MustNewType("statuswatcher"), factory.Type()) + cfg := factory.CreateDefaultConfig() + assert.Equal(t, &struct{}{}, cfg) + + ext, err := factory.CreateExtension(context.Background(), NewStatusWatcherExtensionCreateSettings(), cfg) + require.NoError(t, err) + assert.NoError(t, ext.Start(context.Background(), componenttest.NewNopHost())) + assert.False(t, statusChanged) + + ext.(extension.StatusWatcher).ComponentStatusChanged(&component.InstanceID{}, &component.StatusEvent{}) + + assert.True(t, statusChanged) + assert.NoError(t, ext.Shutdown(context.Background())) +} diff --git a/extension/go.mod b/extension/go.mod index 7ca2a872e6a..61adfe39b85 100644 --- a/extension/go.mod +++ b/extension/go.mod @@ -1,38 +1,49 @@ module go.opentelemetry.io/collector/extension -go 1.20 +go 1.21 require ( github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.85.0 - go.opentelemetry.io/collector/confmap v0.85.0 + go.opentelemetry.io/collector/component v0.96.0 + go.opentelemetry.io/collector/confmap v0.96.0 + go.uber.org/goleak v1.3.0 ) require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.0.1 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.85.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0014 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0014 // indirect - go.opentelemetry.io/otel v1.18.0 // indirect - go.opentelemetry.io/otel/metric v1.18.0 // indirect - go.opentelemetry.io/otel/trace v1.18.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect + go.opentelemetry.io/collector/pdata v1.3.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/grpc v1.58.1 // indirect - google.golang.org/protobuf v1.31.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.20.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -40,8 +51,6 @@ replace go.opentelemetry.io/collector/component => ../component replace go.opentelemetry.io/collector/confmap => ../confmap -replace go.opentelemetry.io/collector/featuregate => ../featuregate - replace go.opentelemetry.io/collector/pdata => ../pdata replace go.opentelemetry.io/collector/config/configtelemetry => ../config/configtelemetry diff --git a/extension/go.sum b/extension/go.sum index e5817058840..2f664245ecd 100644 --- a/extension/go.sum +++ b/extension/go.sum @@ -1,48 +1,74 @@ +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= -github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= -go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= -go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= -go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= -go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -52,20 +78,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -74,15 +100,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= -google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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/extension/memorylimiterextension/Makefile b/extension/memorylimiterextension/Makefile new file mode 100644 index 00000000000..ded7a36092d --- /dev/null +++ b/extension/memorylimiterextension/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common diff --git a/extension/memorylimiterextension/README.md b/extension/memorylimiterextension/README.md new file mode 100644 index 00000000000..90f19a78a07 --- /dev/null +++ b/extension/memorylimiterextension/README.md @@ -0,0 +1,22 @@ +# Memory Limiter Extension + +> [!WARNING] +> The memory_limiter extension cannot be used if the deprecated memory_ballast extension is enabled. + + +| Status | | +| ------------- |-----------| +| Stability | [development] | +| Distributions | [] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fmemorylimiter%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fmemorylimiter) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fmemorylimiter%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fmemorylimiter) | + +[development]: https://github.com/open-telemetry/opentelemetry-collector#development + + +The memory limiter extension is used to prevent out of memory situations on +the collector. The extension will potentially replace the Memory Limiter Processor. +It provides better guarantees from running out of memory as it will be used by the +receivers to reject requests before converting them into OTLP. All the configurations +are the same as Memory Limiter Processor. The extension is under development and does nothing. + +see [memorylimiterprocessor](../../processor/memorylimiterprocessor/README.md) for additional details diff --git a/extension/memorylimiterextension/config.go b/extension/memorylimiterextension/config.go new file mode 100644 index 00000000000..1e5df4fe813 --- /dev/null +++ b/extension/memorylimiterextension/config.go @@ -0,0 +1,10 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package memorylimiterextension // import "go.opentelemetry.io/collector/extension/memorylimiterextension" + +import ( + "go.opentelemetry.io/collector/internal/memorylimiter" +) + +type Config = memorylimiter.Config diff --git a/extension/memorylimiterextension/factory.go b/extension/memorylimiterextension/factory.go new file mode 100644 index 00000000000..55b8efec5ea --- /dev/null +++ b/extension/memorylimiterextension/factory.go @@ -0,0 +1,33 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package memorylimiterextension // import "go.opentelemetry.io/collector/extension/memorylimiterextension" + +//go:generate mdatagen metadata.yaml + +import ( + "context" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/extension" + "go.opentelemetry.io/collector/extension/memorylimiterextension/internal/metadata" +) + +// NewFactory returns a new factory for the Memory Limiter extension. +func NewFactory() extension.Factory { + return extension.NewFactory( + metadata.Type, + createDefaultConfig, + createExtension, + metadata.ExtensionStability) +} + +// CreateDefaultConfig creates the default configuration for extension. Notice +// that the default configuration is expected to fail for this extension. +func createDefaultConfig() component.Config { + return &Config{} +} + +func createExtension(_ context.Context, set extension.CreateSettings, cfg component.Config) (extension.Extension, error) { + return newMemoryLimiter(cfg.(*Config), set.TelemetrySettings.Logger) +} diff --git a/extension/memorylimiterextension/factory_test.go b/extension/memorylimiterextension/factory_test.go new file mode 100644 index 00000000000..21bae72ee6d --- /dev/null +++ b/extension/memorylimiterextension/factory_test.go @@ -0,0 +1,50 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package memorylimiterextension + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/extension/extensiontest" + "go.opentelemetry.io/collector/internal/memorylimiter" +) + +func TestCreateDefaultConfig(t *testing.T) { + factory := NewFactory() + require.NotNil(t, factory) + + cfg := factory.CreateDefaultConfig() + assert.NotNil(t, cfg, "failed to create default config") + assert.NoError(t, componenttest.CheckConfigStruct(cfg)) +} + +func TestCreateExtension(t *testing.T) { + factory := NewFactory() + require.NotNil(t, factory) + + cfg := factory.CreateDefaultConfig() + + // Create extension with a valid config. + pCfg := cfg.(*Config) + pCfg.MemoryLimitMiB = 5722 + pCfg.MemorySpikeLimitMiB = 1907 + pCfg.CheckInterval = 100 * time.Millisecond + + tp, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + assert.NoError(t, err) + assert.NotNil(t, tp) + // test if we can shutdown a monitoring routine that has not started + assert.ErrorIs(t, tp.Shutdown(context.Background()), memorylimiter.ErrShutdownNotStarted) + assert.NoError(t, tp.Start(context.Background(), componenttest.NewNopHost())) + + assert.NoError(t, tp.Shutdown(context.Background())) + // verify that no monitoring routine is running + assert.ErrorIs(t, tp.Shutdown(context.Background()), memorylimiter.ErrShutdownNotStarted) +} diff --git a/extension/memorylimiterextension/go.mod b/extension/memorylimiterextension/go.mod new file mode 100644 index 00000000000..b44b779bdc9 --- /dev/null +++ b/extension/memorylimiterextension/go.mod @@ -0,0 +1,72 @@ +module go.opentelemetry.io/collector/extension/memorylimiterextension + +go 1.21 + +require ( + github.com/stretchr/testify v1.8.4 + go.opentelemetry.io/collector v0.96.0 + go.opentelemetry.io/collector/component v0.96.0 + go.opentelemetry.io/collector/extension v0.96.0 + go.opentelemetry.io/otel/metric v1.24.0 + go.opentelemetry.io/otel/trace v1.24.0 + go.uber.org/zap v1.27.0 +) + +require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-ole/go-ole v1.2.6 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/knadh/koanf/maps v0.1.1 // indirect + github.com/knadh/koanf/providers/confmap v0.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/shirou/gopsutil/v3 v3.24.1 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect + github.com/yusufpapurcu/wmi v1.2.3 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect + go.opentelemetry.io/collector/confmap v0.96.0 // indirect + go.opentelemetry.io/collector/pdata v1.3.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + +replace go.opentelemetry.io/collector => ../../ + +replace go.opentelemetry.io/collector/component => ../../component + +replace go.opentelemetry.io/collector/confmap => ../../confmap + +replace go.opentelemetry.io/collector/extension => ../../extension + +replace go.opentelemetry.io/collector/featuregate => ../../featuregate + +replace go.opentelemetry.io/collector/pdata => ../../pdata + +replace go.opentelemetry.io/collector/consumer => ../../consumer + +replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry diff --git a/extension/memorylimiterextension/go.sum b/extension/memorylimiterextension/go.sum new file mode 100644 index 00000000000..9394f812d28 --- /dev/null +++ b/extension/memorylimiterextension/go.sum @@ -0,0 +1,145 @@ +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +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= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= +github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= +github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= +github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +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/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +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/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/shirou/gopsutil/v3 v3.24.1 h1:R3t6ondCEvmARp3wxODhXMTLC/klMa87h2PHUw5m7QI= +github.com/shirou/gopsutil/v3 v3.24.1/go.mod h1:UU7a2MSBQa+kW1uuDq8DeEBS8kmrnQwsv2b5O513rwU= +github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= +github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +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.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= +github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +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.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +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/extension/memorylimiterextension/internal/metadata/generated_status.go b/extension/memorylimiterextension/internal/metadata/generated_status.go new file mode 100644 index 00000000000..5f0f98ec044 --- /dev/null +++ b/extension/memorylimiterextension/internal/metadata/generated_status.go @@ -0,0 +1,27 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" +) + +var ( + Type = component.MustNewType("memory_limiter") + scopeName = "go.opentelemetry.io/collector/extension/memorylimiterextension" +) + +const ( + ExtensionStability = component.StabilityLevelDevelopment +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter(scopeName) +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer(scopeName) +} diff --git a/extension/memorylimiterextension/memorylimiter.go b/extension/memorylimiterextension/memorylimiter.go new file mode 100644 index 00000000000..4986243ce10 --- /dev/null +++ b/extension/memorylimiterextension/memorylimiter.go @@ -0,0 +1,40 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package memorylimiterextension // import "go.opentelemetry.io/collector/extension/memorylimiterextension" + +import ( + "context" + + "go.uber.org/zap" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/internal/memorylimiter" +) + +type memoryLimiterExtension struct { + memLimiter *memorylimiter.MemoryLimiter +} + +// newMemoryLimiter returns a new memorylimiter extension. +func newMemoryLimiter(cfg *Config, logger *zap.Logger) (*memoryLimiterExtension, error) { + ml, err := memorylimiter.NewMemoryLimiter(cfg, logger) + if err != nil { + return nil, err + } + + return &memoryLimiterExtension{memLimiter: ml}, nil +} + +func (ml *memoryLimiterExtension) Start(ctx context.Context, host component.Host) error { + return ml.memLimiter.Start(ctx, host) +} + +func (ml *memoryLimiterExtension) Shutdown(ctx context.Context) error { + return ml.memLimiter.Shutdown(ctx) +} + +// MustRefuse returns if the caller should deny because memory has reached it's configured limits +func (ml *memoryLimiterExtension) MustRefuse() bool { + return ml.memLimiter.MustRefuse() +} diff --git a/extension/memorylimiterextension/memorylimiter_test.go b/extension/memorylimiterextension/memorylimiter_test.go new file mode 100644 index 00000000000..2a63a497b08 --- /dev/null +++ b/extension/memorylimiterextension/memorylimiter_test.go @@ -0,0 +1,106 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package memorylimiterextension + +import ( + "context" + "runtime" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "go.uber.org/zap" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/internal/iruntime" + "go.opentelemetry.io/collector/internal/memorylimiter" +) + +func TestMemoryPressureResponse(t *testing.T) { + ctx := context.Background() + + tests := []struct { + name string + mlCfg *Config + memAlloc uint64 + expectError bool + }{ + { + name: "Below memAllocLimit", + mlCfg: &Config{ + CheckInterval: time.Second, + MemoryLimitPercentage: 50, + MemorySpikePercentage: 1, + }, + memAlloc: 800, + expectError: false, + }, + { + name: "Above memAllocLimit", + mlCfg: &Config{ + CheckInterval: time.Second, + MemoryLimitPercentage: 50, + MemorySpikePercentage: 1, + }, + memAlloc: 1800, + expectError: true, + }, + { + name: "Below memSpikeLimit", + mlCfg: &Config{ + CheckInterval: time.Second, + MemoryLimitPercentage: 50, + MemorySpikePercentage: 10, + }, + memAlloc: 800, + expectError: false, + }, + { + name: "Above memSpikeLimit", + mlCfg: &Config{ + CheckInterval: time.Second, + MemoryLimitPercentage: 50, + MemorySpikePercentage: 11, + }, + memAlloc: 800, + expectError: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + memorylimiter.GetMemoryFn = totalMemory + memorylimiter.ReadMemStatsFn = func(ms *runtime.MemStats) { + ms.Alloc = tt.memAlloc + } + ml, err := newMemoryLimiter(tt.mlCfg, zap.NewNop()) + assert.NoError(t, err) + + assert.NoError(t, ml.Start(ctx, &mockHost{})) + ml.memLimiter.CheckMemLimits() + mustRefuse := ml.MustRefuse() + if tt.expectError { + assert.True(t, mustRefuse) + } else { + assert.NoError(t, err) + } + assert.NoError(t, ml.Shutdown(ctx)) + }) + } + t.Cleanup(func() { + memorylimiter.GetMemoryFn = iruntime.TotalMemory + memorylimiter.ReadMemStatsFn = runtime.ReadMemStats + }) +} + +type mockHost struct { + component.Host +} + +func (h *mockHost) GetExtensions() map[component.ID]component.Component { + return make(map[component.ID]component.Component) +} + +func totalMemory() (uint64, error) { + return uint64(2048), nil +} diff --git a/extension/memorylimiterextension/metadata.yaml b/extension/memorylimiterextension/metadata.yaml new file mode 100644 index 00000000000..75f16b8f750 --- /dev/null +++ b/extension/memorylimiterextension/metadata.yaml @@ -0,0 +1,7 @@ +type: memory_limiter + +status: + class: extension + stability: + development: [extension] + distributions: [] diff --git a/extension/memorylimiterextension/testdata/config.yaml b/extension/memorylimiterextension/testdata/config.yaml new file mode 100644 index 00000000000..4aa0385c000 --- /dev/null +++ b/extension/memorylimiterextension/testdata/config.yaml @@ -0,0 +1,19 @@ +# check_interval is the time between measurements of memory usage for the +# purposes of avoiding going over the limits. Defaults to zero, so no +# checks will be performed. Values below 1 second are not recommended since +# it can result in unnecessary CPU consumption. +check_interval: 5s + +# Maximum amount of memory, in MiB, targeted to be allocated by the process heap. +# Note that typically the total memory usage of process will be about 50MiB higher +# than this value. +limit_mib: 4000 + +# The maximum, in MiB, spike expected between the measurements of memory usage. +spike_limit_mib: 500 + +# the maximum amount of memory, in %, targeted to be allocated by the process +limit_percentage: 0 + +# the maximum, in percents against the total memory, spike expected between the measurements of memory usage. +spike_limit_percentage: 0 \ No newline at end of file diff --git a/extension/package_test.go b/extension/package_test.go new file mode 100644 index 00000000000..8a71f79db26 --- /dev/null +++ b/extension/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package extension + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/zpagesextension/README.md b/extension/zpagesextension/README.md index 4af9999c3f8..bdae98913ef 100644 --- a/extension/zpagesextension/README.md +++ b/extension/zpagesextension/README.md @@ -1,9 +1,16 @@ # zPages -| Status | | -| ------------------------ | ----------------- | -| Stability | [beta] | -| Distributions | [core], [contrib] | + +| Status | | +| ------------- |-----------| +| Stability | [beta] | +| Distributions | [core], [contrib] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fzpages%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fzpages) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fzpages%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fzpages) | + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib + Enables an extension that serves zPages, an HTTP endpoint that provides live data for debugging different components that were properly instrumented for such. @@ -68,13 +75,3 @@ example They also allow you to quickly examine error samples Example URL: http://localhost:55679/debug/tracez - -### RpcZ -The Rpcz route is available to help examine statistics of remote procedure calls (RPCs) -that are properly instrumented. For example when using gRPC - -Example URL: http://localhost:55679/debug/rpcz - -[beta]: https://github.com/open-telemetry/opentelemetry-collector-contrib#beta -[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol diff --git a/extension/zpagesextension/config.go b/extension/zpagesextension/config.go index 090dbfd6e1a..6702491ad0d 100644 --- a/extension/zpagesextension/config.go +++ b/extension/zpagesextension/config.go @@ -15,7 +15,7 @@ type Config struct { // TCPAddr is the address and port in which the zPages will be listening to. // Use localhost: to make it available only locally, or ":" to // make it available on all network interfaces. - TCPAddr confignet.TCPAddr `mapstructure:",squash"` + TCPAddr confignet.TCPAddrConfig `mapstructure:",squash"` } var _ component.Config = (*Config)(nil) diff --git a/extension/zpagesextension/config_test.go b/extension/zpagesextension/config_test.go index 7aa2b55706f..f79e74d25c9 100644 --- a/extension/zpagesextension/config_test.go +++ b/extension/zpagesextension/config_test.go @@ -31,7 +31,7 @@ func TestUnmarshalConfig(t *testing.T) { assert.NoError(t, component.UnmarshalConfig(cm, cfg)) assert.Equal(t, &Config{ - TCPAddr: confignet.TCPAddr{ + TCPAddr: confignet.TCPAddrConfig{ Endpoint: "localhost:56888", }, }, cfg) diff --git a/extension/zpagesextension/doc.go b/extension/zpagesextension/doc.go index 8cb9684f42a..8f6d1cc6b11 100644 --- a/extension/zpagesextension/doc.go +++ b/extension/zpagesextension/doc.go @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +//go:generate mdatagen metadata.yaml + // Package zpagesextension implements an extension that exposes zPages of // properly instrumented components. package zpagesextension // import "go.opentelemetry.io/collector/extension/zpagesextension" diff --git a/extension/zpagesextension/factory.go b/extension/zpagesextension/factory.go index dae6eb57f0b..ecb94cc0f97 100644 --- a/extension/zpagesextension/factory.go +++ b/extension/zpagesextension/factory.go @@ -9,23 +9,21 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/extension" + "go.opentelemetry.io/collector/extension/zpagesextension/internal/metadata" ) const ( - // The value of extension "type" in configuration. - typeStr = "zpages" - defaultEndpoint = "localhost:55679" ) // NewFactory creates a factory for Z-Pages extension. func NewFactory() extension.Factory { - return extension.NewFactory(typeStr, createDefaultConfig, createExtension, component.StabilityLevelBeta) + return extension.NewFactory(metadata.Type, createDefaultConfig, createExtension, metadata.ExtensionStability) } func createDefaultConfig() component.Config { return &Config{ - TCPAddr: confignet.TCPAddr{ + TCPAddr: confignet.TCPAddrConfig{ Endpoint: defaultEndpoint, }, } diff --git a/extension/zpagesextension/factory_test.go b/extension/zpagesextension/factory_test.go index b2e9a056dbf..fc1bcc512a1 100644 --- a/extension/zpagesextension/factory_test.go +++ b/extension/zpagesextension/factory_test.go @@ -19,7 +19,7 @@ import ( func TestFactory_CreateDefaultConfig(t *testing.T) { cfg := createDefaultConfig() assert.Equal(t, &Config{ - TCPAddr: confignet.TCPAddr{ + TCPAddr: confignet.TCPAddrConfig{ Endpoint: "localhost:55679", }, }, diff --git a/extension/zpagesextension/go.mod b/extension/zpagesextension/go.mod index 3036a69b7bd..4e795a8d6ac 100644 --- a/extension/zpagesextension/go.mod +++ b/extension/zpagesextension/go.mod @@ -1,47 +1,62 @@ module go.opentelemetry.io/collector/extension/zpagesextension -go 1.20 +go 1.21 require ( github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.85.0 - go.opentelemetry.io/collector/component v0.85.0 - go.opentelemetry.io/collector/config/confignet v0.85.0 - go.opentelemetry.io/collector/confmap v0.85.0 - go.opentelemetry.io/collector/extension v0.85.0 - go.opentelemetry.io/contrib/zpages v0.44.0 - go.opentelemetry.io/otel/sdk v1.18.0 - go.opentelemetry.io/otel/trace v1.18.0 - go.uber.org/zap v1.26.0 + go.opentelemetry.io/collector v0.96.0 + go.opentelemetry.io/collector/component v0.96.0 + go.opentelemetry.io/collector/config/confignet v0.96.0 + go.opentelemetry.io/collector/confmap v0.96.0 + go.opentelemetry.io/collector/extension v0.96.0 + go.opentelemetry.io/contrib/zpages v0.49.0 + go.opentelemetry.io/otel/metric v1.24.0 + go.opentelemetry.io/otel/sdk v1.24.0 + go.opentelemetry.io/otel/trace v1.24.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.0.1 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.85.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0014 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0014 // indirect - go.opentelemetry.io/collector/service v0.0.0-20230915215502-07938f20fcc7 // indirect - go.opentelemetry.io/otel v1.18.0 // indirect - go.opentelemetry.io/otel/metric v1.18.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect + go.opentelemetry.io/collector/pdata v1.3.0 // indirect + go.opentelemetry.io/contrib/config v0.4.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect + go.opentelemetry.io/proto/otlp v1.1.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/grpc v1.58.1 // indirect - google.golang.org/protobuf v1.31.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -53,22 +68,12 @@ replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet replace go.opentelemetry.io/collector/confmap => ../../confmap -replace go.opentelemetry.io/collector/exporter => ../../exporter - replace go.opentelemetry.io/collector/extension => ../ replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/pdata => ../../pdata -replace go.opentelemetry.io/collector/processor => ../../processor - -replace go.opentelemetry.io/collector/receiver => ../../receiver - -replace go.opentelemetry.io/collector/semconv => ../../semconv - -replace go.opentelemetry.io/collector/service => ../../service - replace go.opentelemetry.io/collector/consumer => ../../consumer retract ( @@ -76,6 +81,4 @@ retract ( v0.69.0 // Release failed, use v0.69.1 ) -replace go.opentelemetry.io/collector/connector => ../../connector - replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry diff --git a/extension/zpagesextension/go.sum b/extension/zpagesextension/go.sum index a8d1d11a064..1210952ad72 100644 --- a/extension/zpagesextension/go.sum +++ b/extension/zpagesextension/go.sum @@ -1,135 +1,116 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= -github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= 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/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -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/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= -go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/zpages v0.44.0 h1:9J/cxTTWhM6kzgdaBt6NiXS2HUreXn/eW2M+vzHgDAQ= -go.opentelemetry.io/contrib/zpages v0.44.0/go.mod h1:G3eNCGhodjn2wIdM+i6GneZb1Cqg6dNRBlm1cpNEElg= -go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= -go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= -go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= -go.opentelemetry.io/otel/sdk v1.18.0 h1:e3bAB0wB3MljH38sHzpV/qWrOTCFrdZF2ct9F8rBkcY= -go.opentelemetry.io/otel/sdk v1.18.0/go.mod h1:1RCygWV7plY2KmdskZEDDBs4tJeHG92MdHZIluiYs/M= -go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= -go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= +go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= +go.opentelemetry.io/contrib/zpages v0.49.0 h1:Wk217PkNBxcKWnIQpwtbZZE286K4ZY9uajnM5woSeLU= +go.opentelemetry.io/contrib/zpages v0.49.0/go.mod h1:6alLi5mmkZWbAtZMRPd1ffIgkTcsU9OTHQF2NbSOhrQ= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 h1:Mw5xcxMwlqoJd97vwPxA8isEaIoxsta9/Q51+TTJLGE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0/go.mod h1:CQNu9bj7o7mC6U7+CA/schKEYakYXWr79ucDHTMGhCM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 h1:s0PHtIkN+3xrbDOpt2M8OTG92cWqUESvzh2MxiR5xY8= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0/go.mod h1:hZlFbDbRt++MMPCCfSJfmhkGIWnX1h3XjkfxZUjLrIA= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -137,37 +118,20 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= -google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +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= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/extension/zpagesextension/internal/metadata/generated_status.go b/extension/zpagesextension/internal/metadata/generated_status.go new file mode 100644 index 00000000000..21ba9b8e88e --- /dev/null +++ b/extension/zpagesextension/internal/metadata/generated_status.go @@ -0,0 +1,27 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" +) + +var ( + Type = component.MustNewType("zpages") + scopeName = "go.opentelemetry.io/collector/extension/zpagesextension" +) + +const ( + ExtensionStability = component.StabilityLevelBeta +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter(scopeName) +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer(scopeName) +} diff --git a/extension/zpagesextension/metadata.yaml b/extension/zpagesextension/metadata.yaml new file mode 100644 index 00000000000..558eec8fccd --- /dev/null +++ b/extension/zpagesextension/metadata.yaml @@ -0,0 +1,7 @@ +type: zpages + +status: + class: extension + stability: + beta: [extension] + distributions: [core, contrib] diff --git a/extension/zpagesextension/package_test.go b/extension/zpagesextension/package_test.go new file mode 100644 index 00000000000..40ce0f11cc4 --- /dev/null +++ b/extension/zpagesextension/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package zpagesextension + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/zpagesextension/zpagesextension.go b/extension/zpagesextension/zpagesextension.go index 84c321d4221..5e331966b01 100644 --- a/extension/zpagesextension/zpagesextension.go +++ b/extension/zpagesextension/zpagesextension.go @@ -67,7 +67,7 @@ func (zpe *zpagesExtension) Start(_ context.Context, host component.Host) error // Start the listener here so we can have earlier failure if port is // already in use. - ln, err := zpe.config.TCPAddr.Listen() + ln, err := zpe.config.TCPAddr.Listen(context.Background()) if err != nil { return err } @@ -79,7 +79,7 @@ func (zpe *zpagesExtension) Start(_ context.Context, host component.Host) error defer close(zpe.stopCh) if errHTTP := zpe.server.Serve(ln); errHTTP != nil && !errors.Is(errHTTP, http.ErrServerClosed) { - host.ReportFatalError(errHTTP) + zpe.telemetry.ReportStatus(component.NewFatalErrorEvent(errHTTP)) } }() diff --git a/extension/zpagesextension/zpagesextension_test.go b/extension/zpagesextension/zpagesextension_test.go index b61c12129a1..462ca58cf07 100644 --- a/extension/zpagesextension/zpagesextension_test.go +++ b/extension/zpagesextension/zpagesextension_test.go @@ -28,7 +28,7 @@ func newZPagesHost() *zpagesHost { return &zpagesHost{Host: componenttest.NewNopHost()} } -func (*zpagesHost) RegisterZPages(_ *http.ServeMux, _ string) {} +func (*zpagesHost) RegisterZPages(*http.ServeMux, string) {} var _ registerableTracerProvider = (*registerableProvider)(nil) var _ registerableTracerProvider = sdktrace.NewTracerProvider() @@ -48,7 +48,7 @@ func newZpagesTelemetrySettings() component.TelemetrySettings { func TestZPagesExtensionUsage(t *testing.T) { cfg := &Config{ - TCPAddr: confignet.TCPAddr{ + TCPAddr: confignet.TCPAddrConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), }, } @@ -80,7 +80,7 @@ func TestZPagesExtensionPortAlreadyInUse(t *testing.T) { defer ln.Close() cfg := &Config{ - TCPAddr: confignet.TCPAddr{ + TCPAddr: confignet.TCPAddrConfig{ Endpoint: endpoint, }, } @@ -92,7 +92,7 @@ func TestZPagesExtensionPortAlreadyInUse(t *testing.T) { func TestZPagesMultipleStarts(t *testing.T) { cfg := &Config{ - TCPAddr: confignet.TCPAddr{ + TCPAddr: confignet.TCPAddrConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), }, } @@ -109,7 +109,7 @@ func TestZPagesMultipleStarts(t *testing.T) { func TestZPagesMultipleShutdowns(t *testing.T) { cfg := &Config{ - TCPAddr: confignet.TCPAddr{ + TCPAddr: confignet.TCPAddrConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), }, } @@ -124,7 +124,7 @@ func TestZPagesMultipleShutdowns(t *testing.T) { func TestZPagesShutdownWithoutStart(t *testing.T) { cfg := &Config{ - TCPAddr: confignet.TCPAddr{ + TCPAddr: confignet.TCPAddrConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), }, } diff --git a/featuregate/flag.go b/featuregate/flag.go index 3ff105d3e69..95012968126 100644 --- a/featuregate/flag.go +++ b/featuregate/flag.go @@ -10,9 +10,19 @@ import ( "go.uber.org/multierr" ) -// NewFlag returns a flag.Value that directly applies feature gate statuses to a Registry. -func NewFlag(reg *Registry) flag.Value { - return &flagValue{reg: reg} +const ( + featureGatesFlag = "feature-gates" + featureGatesFlagDescription = "Comma-delimited list of feature gate identifiers. Prefix with '-' to disable the feature. '+' or no prefix will enable the feature." +) + +// RegisterFlagsOption is an option for RegisterFlags. +type RegisterFlagsOption interface { + private() +} + +// RegisterFlags that directly applies feature gate statuses to a Registry. +func (r *Registry) RegisterFlags(flagSet *flag.FlagSet, _ ...RegisterFlagsOption) { + flagSet.Var(&flagValue{reg: r}, featureGatesFlag, featureGatesFlagDescription) } // flagValue implements the flag.Value interface and directly applies feature gate statuses to a Registry. diff --git a/featuregate/flag_test.go b/featuregate/flag_test.go index b7ee5fc433c..0eb60330794 100644 --- a/featuregate/flag_test.go +++ b/featuregate/flag_test.go @@ -4,6 +4,7 @@ package featuregate import ( + "flag" "testing" "github.com/stretchr/testify/assert" @@ -113,18 +114,21 @@ func TestNewFlag(t *testing.T) { reg.MustRegister("beta", StageBeta) reg.MustRegister("deprecated", StageDeprecated, WithRegisterToVersion("1.0.0")) reg.MustRegister("stable", StageStable, WithRegisterToVersion("1.0.0")) - v := NewFlag(reg) + fs := flag.NewFlagSet("test", flag.ContinueOnError) + reg.RegisterFlags(fs) + registrationFlag := fs.Lookup(featureGatesFlag) + require.NotNil(t, registrationFlag) if tt.expectedSetErr { - require.Error(t, v.Set(tt.input)) + require.Error(t, registrationFlag.Value.Set(tt.input)) } else { - require.NoError(t, v.Set(tt.input)) + require.NoError(t, registrationFlag.Value.Set(tt.input)) } got := map[string]bool{} reg.VisitAll(func(g *Gate) { got[g.ID()] = g.IsEnabled() }) assert.Equal(t, tt.expected, got) - assert.Equal(t, tt.expectedStr, v.String()) + assert.Equal(t, tt.expectedStr, registrationFlag.Value.String()) }) } } diff --git a/featuregate/gate.go b/featuregate/gate.go index 2b6cae31e85..a250ceb9a86 100644 --- a/featuregate/gate.go +++ b/featuregate/gate.go @@ -3,7 +3,12 @@ package featuregate // import "go.opentelemetry.io/collector/featuregate" -import "sync/atomic" +import ( + "fmt" + "sync/atomic" + + "github.com/hashicorp/go-version" +) // Gate is an immutable object that is owned by the Registry and represents an individual feature that // may be enabled or disabled based on the lifecycle state of the feature and CLI flags specified by the user. @@ -11,8 +16,8 @@ type Gate struct { id string description string referenceURL string - fromVersion string - toVersion string + fromVersion *version.Version + toVersion *version.Version stage Stage enabled *atomic.Bool } @@ -44,10 +49,10 @@ func (g *Gate) ReferenceURL() string { // FromVersion returns the version information when the Gate's was added. func (g *Gate) FromVersion() string { - return g.fromVersion + return fmt.Sprintf("v%s", g.fromVersion) } // ToVersion returns the version information when Gate's in StageStable. func (g *Gate) ToVersion() string { - return g.toVersion + return fmt.Sprintf("v%s", g.toVersion) } diff --git a/featuregate/gate_test.go b/featuregate/gate_test.go index ece1494eecb..be111b4e687 100644 --- a/featuregate/gate_test.go +++ b/featuregate/gate_test.go @@ -7,20 +7,27 @@ import ( "sync/atomic" "testing" + "github.com/hashicorp/go-version" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestGate(t *testing.T) { enabled := &atomic.Bool{} enabled.Store(true) + from, err := version.NewVersion("v0.61.0") + require.NoError(t, err) + to, err := version.NewVersion("v0.64.0") + require.NoError(t, err) + g := &Gate{ id: "test", description: "test gate", enabled: enabled, stage: StageAlpha, referenceURL: "http://example.com", - fromVersion: "v0.61.0", - toVersion: "v0.64.0", + fromVersion: from, + toVersion: to, } assert.Equal(t, "test", g.ID()) diff --git a/featuregate/go.mod b/featuregate/go.mod index 1597ac80cc6..4382445ec39 100644 --- a/featuregate/go.mod +++ b/featuregate/go.mod @@ -1,9 +1,11 @@ module go.opentelemetry.io/collector/featuregate -go 1.20 +go 1.21 require ( + github.com/hashicorp/go-version v1.6.0 github.com/stretchr/testify v1.8.4 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 ) diff --git a/featuregate/go.sum b/featuregate/go.sum index 3a025c4981e..f198f93ff2e 100644 --- a/featuregate/go.sum +++ b/featuregate/go.sum @@ -1,6 +1,8 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 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/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -16,6 +18,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/featuregate/package_test.go b/featuregate/package_test.go new file mode 100644 index 00000000000..77d7a03b5d0 --- /dev/null +++ b/featuregate/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package featuregate + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/featuregate/registry.go b/featuregate/registry.go index e734711082e..69486d623ee 100644 --- a/featuregate/registry.go +++ b/featuregate/registry.go @@ -4,13 +4,29 @@ package featuregate // import "go.opentelemetry.io/collector/featuregate" import ( + "errors" "fmt" + "net/url" + "regexp" "sort" "sync" "sync/atomic" + + "github.com/hashicorp/go-version" +) + +var ( + globalRegistry = NewRegistry() + + // idRegexp is used to validate the ID of a Gate. + // IDs' characters must be alphanumeric or dots. + idRegexp = regexp.MustCompile(`^[0-9a-zA-Z\.]*$`) ) -var globalRegistry = NewRegistry() +var ( + // ErrAlreadyRegistered is returned when adding a Gate that is already registered. + ErrAlreadyRegistered = errors.New("gate is already registered") +) // GlobalRegistry returns the global Registry. func GlobalRegistry() *Registry { @@ -28,43 +44,66 @@ func NewRegistry() *Registry { // RegisterOption allows to configure additional information about a Gate during registration. type RegisterOption interface { - apply(g *Gate) + apply(g *Gate) error } -type registerOptionFunc func(g *Gate) +type registerOptionFunc func(g *Gate) error -func (ro registerOptionFunc) apply(g *Gate) { - ro(g) +func (ro registerOptionFunc) apply(g *Gate) error { + return ro(g) } // WithRegisterDescription adds description for the Gate. func WithRegisterDescription(description string) RegisterOption { - return registerOptionFunc(func(g *Gate) { + return registerOptionFunc(func(g *Gate) error { g.description = description + return nil }) } // WithRegisterReferenceURL adds a URL that has all the contextual information about the Gate. -func WithRegisterReferenceURL(url string) RegisterOption { - return registerOptionFunc(func(g *Gate) { - g.referenceURL = url +// referenceURL must be a valid URL as defined by `net/url.Parse`. +func WithRegisterReferenceURL(referenceURL string) RegisterOption { + return registerOptionFunc(func(g *Gate) error { + if _, err := url.Parse(referenceURL); err != nil { + return fmt.Errorf("WithRegisterReferenceURL: invalid reference URL %q: %w", referenceURL, err) + } + + g.referenceURL = referenceURL + return nil }) } // WithRegisterFromVersion is used to set the Gate "FromVersion". // The "FromVersion" contains the Collector release when a feature is introduced. +// fromVersion must be a valid version string: it may start with 'v' and must be in the format Major.Minor.Patch[-PreRelease]. +// PreRelease is optional and may have dashes, tildes and ASCII alphanumeric characters. func WithRegisterFromVersion(fromVersion string) RegisterOption { - return registerOptionFunc(func(g *Gate) { - g.fromVersion = fromVersion + return registerOptionFunc(func(g *Gate) error { + from, err := version.NewVersion(fromVersion) + if err != nil { + return fmt.Errorf("WithRegisterFromVersion: invalid version %q: %w", fromVersion, err) + } + + g.fromVersion = from + return nil }) } // WithRegisterToVersion is used to set the Gate "ToVersion". // The "ToVersion", if not empty, contains the last Collector release in which you can still use a feature gate. // If the feature stage is either "Deprecated" or "Stable", the "ToVersion" is the Collector release when the feature is removed. +// toVersion must be a valid version string: it may start with 'v' and must be in the format Major.Minor.Patch[-PreRelease]. +// PreRelease is optional and may have dashes, tildes and ASCII alphanumeric characters. func WithRegisterToVersion(toVersion string) RegisterOption { - return registerOptionFunc(func(g *Gate) { - g.toVersion = toVersion + return registerOptionFunc(func(g *Gate) error { + to, err := version.NewVersion(toVersion) + if err != nil { + return fmt.Errorf("WithRegisterToVersion: invalid version %q: %w", toVersion, err) + } + + g.toVersion = to + return nil }) } @@ -77,14 +116,33 @@ func (r *Registry) MustRegister(id string, stage Stage, opts ...RegisterOption) return g } +func validateID(id string) error { + if id == "" { + return fmt.Errorf("empty ID") + } + + if !idRegexp.MatchString(id) { + return fmt.Errorf("invalid character(s) in ID") + } + return nil +} + // Register a Gate and return it. The returned Gate can be used to check if is enabled or not. +// id must be an ASCII alphanumeric nonempty string. Dots are allowed for namespacing. func (r *Registry) Register(id string, stage Stage, opts ...RegisterOption) (*Gate, error) { + if err := validateID(id); err != nil { + return nil, fmt.Errorf("invalid ID %q: %w", id, err) + } + g := &Gate{ id: id, stage: stage, } for _, opt := range opts { - opt.apply(g) + err := opt.apply(g) + if err != nil { + return nil, fmt.Errorf("failed to apply option: %w", err) + } } switch g.stage { case StageAlpha, StageDeprecated: @@ -96,11 +154,16 @@ func (r *Registry) Register(id string, stage Stage, opts ...RegisterOption) (*Ga default: return nil, fmt.Errorf("unknown stage value %q for gate %q", stage, id) } - if (g.stage == StageStable || g.stage == StageDeprecated) && g.toVersion == "" { + if (g.stage == StageStable || g.stage == StageDeprecated) && g.toVersion == nil { return nil, fmt.Errorf("no removal version set for %v gate %q", g.stage.String(), id) } + + if g.fromVersion != nil && g.toVersion != nil && g.toVersion.LessThan(g.fromVersion) { + return nil, fmt.Errorf("toVersion %q is before fromVersion %q", g.toVersion, g.fromVersion) + } + if _, loaded := r.gates.LoadOrStore(id, g); loaded { - return nil, fmt.Errorf("attempted to add pre-existing gate %q", id) + return nil, fmt.Errorf("failed to register %q: %w", id, ErrAlreadyRegistered) } return g, nil } @@ -137,7 +200,7 @@ func (r *Registry) Set(id string, enabled bool) error { // VisitAll visits all the gates in lexicographical order, calling fn for each. func (r *Registry) VisitAll(fn func(*Gate)) { var gates []*Gate - r.gates.Range(func(key, value any) bool { + r.gates.Range(func(_, value any) bool { gates = append(gates, value.(*Gate)) return true }) diff --git a/featuregate/registry_test.go b/featuregate/registry_test.go index 7bc304d1ec4..47646721857 100644 --- a/featuregate/registry_test.go +++ b/featuregate/registry_test.go @@ -17,7 +17,7 @@ func TestGlobalRegistry(t *testing.T) { func TestRegistry(t *testing.T) { r := NewRegistry() // Expect that no gates to visit. - r.VisitAll(func(gate *Gate) { + r.VisitAll(func(*Gate) { t.FailNow() }) @@ -33,7 +33,7 @@ func TestRegistry(t *testing.T) { assert.False(t, g.IsEnabled()) _, err = r.Register(id, StageBeta) - assert.Error(t, err) + assert.ErrorIs(t, err, ErrAlreadyRegistered) assert.Panics(t, func() { r.MustRegister(id, StageBeta) }) @@ -48,14 +48,14 @@ func TestRegistryApplyError(t *testing.T) { _, err := r.Register("foo", StageStable) assert.Error(t, err) assert.Error(t, r.Set("foo", true)) - r.MustRegister("foo", StageStable, WithRegisterToVersion("next")) + r.MustRegister("foo", StageStable, WithRegisterToVersion("v1.0.0")) assert.Error(t, r.Set("foo", false)) assert.Error(t, r.Set("deprecated", true)) _, err = r.Register("deprecated", StageDeprecated) assert.Error(t, err) assert.Error(t, r.Set("deprecated", true)) - r.MustRegister("deprecated", StageDeprecated, WithRegisterToVersion("next")) + r.MustRegister("deprecated", StageDeprecated, WithRegisterToVersion("v1.0.0")) assert.Error(t, r.Set("deprecated", true)) } @@ -78,78 +78,121 @@ func TestRegisterGateLifecycle(t *testing.T) { }{ { name: "StageAlpha Flag", - id: "test-gate", + id: "test.gate", stage: StageAlpha, enabled: false, shouldErr: false, }, { name: "StageAlpha Flag with all options", - id: "test-gate", + id: "test.gate", stage: StageAlpha, opts: []RegisterOption{ - WithRegisterDescription("test-gate"), + WithRegisterDescription("test.gate"), WithRegisterReferenceURL("http://example.com/issue/1"), - WithRegisterToVersion(""), + WithRegisterToVersion("v0.88.0"), }, enabled: false, shouldErr: false, }, { name: "StageBeta Flag", - id: "test-gate", + id: "test.gate", stage: StageBeta, enabled: true, shouldErr: false, }, { name: "StageStable Flag", - id: "test-gate", + id: "test.gate", stage: StageStable, opts: []RegisterOption{ - WithRegisterToVersion("next"), + WithRegisterToVersion("v1.0.0-rcv.0014"), }, enabled: true, shouldErr: false, }, { name: "StageDeprecated Flag", - id: "test-gate", + id: "test.gate", stage: StageDeprecated, opts: []RegisterOption{ - WithRegisterToVersion("next"), + WithRegisterToVersion("v0.89.0"), }, enabled: false, shouldErr: false, }, { name: "Invalid stage", - id: "test-gate", + id: "test.gate", stage: Stage(-1), shouldErr: true, }, { name: "StageStable gate missing removal version", - id: "test-gate", + id: "test.gate", stage: StageStable, shouldErr: true, }, { name: "StageDeprecated gate missing removal version", - id: "test-gate", + id: "test.gate", stage: StageDeprecated, shouldErr: true, }, { name: "Duplicate gate", - id: "existing-gate", + id: "existing.gate", stage: StageStable, shouldErr: true, }, + { + name: "Invalid gate name", + id: "+invalid.gate.name", + stage: StageAlpha, + shouldErr: true, + }, + { + name: "Invalid empty gate", + id: "", + stage: StageAlpha, + shouldErr: true, + }, + { + name: "Invalid gate to version", + id: "invalid.gate.to.version", + stage: StageAlpha, + opts: []RegisterOption{WithRegisterToVersion("invalid-version")}, + shouldErr: true, + }, + { + name: "Invalid gate from version", + id: "invalid.gate.from.version", + stage: StageAlpha, + opts: []RegisterOption{WithRegisterFromVersion("invalid-version")}, + shouldErr: true, + }, + { + name: "Invalid gate reference URL", + id: "invalid.gate.reference.URL", + stage: StageAlpha, + opts: []RegisterOption{WithRegisterReferenceURL(":invalid-url")}, + shouldErr: true, + }, + { + name: "Empty version range", + id: "invalid.gate.version.range", + stage: StageAlpha, + opts: []RegisterOption{ + WithRegisterFromVersion("v0.88.0"), + WithRegisterToVersion("v0.87.0"), + }, + shouldErr: true, + }, } { t.Run(tc.name, func(t *testing.T) { r := NewRegistry() - r.MustRegister("existing-gate", StageBeta) + r.MustRegister("existing.gate", StageBeta) if tc.shouldErr { _, err := r.Register(tc.id, tc.stage, tc.opts...) assert.Error(t, err) diff --git a/go.mod b/go.mod index 8be7b8a441d..79c836ef8ef 100644 --- a/go.mod +++ b/go.mod @@ -1,30 +1,19 @@ module go.opentelemetry.io/collector -go 1.20 +go 1.21 require ( - contrib.go.opencensus.io/exporter/prometheus v0.4.2 - github.com/prometheus/client_golang v1.16.0 - github.com/prometheus/client_model v0.4.0 - github.com/prometheus/common v0.44.0 - github.com/shirou/gopsutil/v3 v3.23.8 + github.com/shirou/gopsutil/v3 v3.24.1 github.com/stretchr/testify v1.8.4 - go.opencensus.io v0.24.0 - go.opentelemetry.io/collector/component v0.85.0 - go.opentelemetry.io/collector/config/configtelemetry v0.85.0 - go.opentelemetry.io/collector/connector v0.85.0 - go.opentelemetry.io/collector/consumer v0.85.0 - go.opentelemetry.io/collector/exporter v0.85.0 - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0014 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0014 - go.opentelemetry.io/collector/processor v0.85.0 - go.opentelemetry.io/collector/receiver v0.85.0 - go.opentelemetry.io/collector/service v0.0.0-20230915215502-07938f20fcc7 - go.opentelemetry.io/otel v1.18.0 - go.opentelemetry.io/otel/exporters/prometheus v0.41.0 - go.opentelemetry.io/otel/sdk v1.18.0 - go.opentelemetry.io/otel/sdk/metric v0.41.0 + go.opentelemetry.io/collector/component v0.96.0 + go.opentelemetry.io/collector/confmap v0.96.0 + go.opentelemetry.io/collector/consumer v0.96.0 + go.opentelemetry.io/collector/featuregate v1.3.0 + go.opentelemetry.io/collector/pdata v1.3.0 + go.opentelemetry.io/contrib/config v0.4.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 + go.uber.org/zap v1.27.0 ) require ( @@ -32,45 +21,51 @@ require ( github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect + github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.0.1 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/prometheus/procfs v0.10.1 // indirect - github.com/prometheus/statsd_exporter v0.22.7 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect - go.opentelemetry.io/collector/confmap v0.85.0 // indirect - go.opentelemetry.io/collector/extension v0.85.0 // indirect - go.opentelemetry.io/otel/metric v1.18.0 // indirect - go.opentelemetry.io/otel/trace v1.18.0 // indirect - go.uber.org/goleak v1.2.1 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/grpc v1.58.1 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect + go.opentelemetry.io/proto/otlp v1.1.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -78,32 +73,14 @@ replace go.opentelemetry.io/collector/component => ./component replace go.opentelemetry.io/collector/confmap => ./confmap -replace go.opentelemetry.io/collector/config/confignet => ./config/confignet - replace go.opentelemetry.io/collector/config/configtelemetry => ./config/configtelemetry -replace go.opentelemetry.io/collector/connector => ./connector - replace go.opentelemetry.io/collector/consumer => ./consumer -replace go.opentelemetry.io/collector/exporter => ./exporter - -replace go.opentelemetry.io/collector/extension => ./extension - replace go.opentelemetry.io/collector/featuregate => ./featuregate -replace go.opentelemetry.io/collector/semconv => ./semconv - replace go.opentelemetry.io/collector/pdata => ./pdata -replace go.opentelemetry.io/collector/processor => ./processor - -replace go.opentelemetry.io/collector/receiver => ./receiver - -replace go.opentelemetry.io/collector/service => ./service - -replace go.opentelemetry.io/collector/extension/zpagesextension => ./extension/zpagesextension - retract ( v0.76.0 // Depends on retracted pdata v1.0.0-rc10 module, use v0.76.1 v0.69.0 // Release failed, use v0.69.1 diff --git a/go.sum b/go.sum index c8cdbad3e4d..f060cc531e2 100644 --- a/go.sum +++ b/go.sum @@ -1,606 +1,176 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= 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= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= -github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +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/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 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/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= -github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/shirou/gopsutil/v3 v3.23.8 h1:xnATPiybo6GgdRoC4YoGnxXZFRc3dqQTGi73oLvvBrE= -github.com/shirou/gopsutil/v3 v3.23.8/go.mod h1:7hmCaBn+2ZwaZOr6jmPBZDfawwMGuo1id3C6aM8EDqQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/shirou/gopsutil/v3 v3.24.1 h1:R3t6ondCEvmARp3wxODhXMTLC/klMa87h2PHUw5m7QI= +github.com/shirou/gopsutil/v3 v3.24.1/go.mod h1:UU7a2MSBQa+kW1uuDq8DeEBS8kmrnQwsv2b5O513rwU= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 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/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= -go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= -go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/exporters/prometheus v0.41.0 h1:A3/bhjP5SmELy8dcpK+uttHeh9Qrh+YnS16/VzrztRQ= -go.opentelemetry.io/otel/exporters/prometheus v0.41.0/go.mod h1:mKuXEMi9suyyNJQ99SZCO0mpWGFe0MIALtjd3r6uo7Q= -go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= -go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= -go.opentelemetry.io/otel/sdk v1.18.0 h1:e3bAB0wB3MljH38sHzpV/qWrOTCFrdZF2ct9F8rBkcY= -go.opentelemetry.io/otel/sdk v1.18.0/go.mod h1:1RCygWV7plY2KmdskZEDDBs4tJeHG92MdHZIluiYs/M= -go.opentelemetry.io/otel/sdk/metric v0.41.0 h1:c3sAt9/pQ5fSIUfl0gPtClV3HhE18DCVzByD33R/zsk= -go.opentelemetry.io/otel/sdk/metric v0.41.0/go.mod h1:PmOmSt+iOklKtIg5O4Vz9H/ttcRFSNTgii+E1KGyn1w= -go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= -go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= -go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= +go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= +go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 h1:Mw5xcxMwlqoJd97vwPxA8isEaIoxsta9/Q51+TTJLGE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0/go.mod h1:CQNu9bj7o7mC6U7+CA/schKEYakYXWr79ucDHTMGhCM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 h1:s0PHtIkN+3xrbDOpt2M8OTG92cWqUESvzh2MxiR5xY8= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0/go.mod h1:hZlFbDbRt++MMPCCfSJfmhkGIWnX1h3XjkfxZUjLrIA= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/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-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.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/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= -google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/internal/cgroups/cgroup.go b/internal/cgroups/cgroup.go index 7848b0a8b1b..74ef31254d7 100644 --- a/internal/cgroups/cgroup.go +++ b/internal/cgroups/cgroup.go @@ -24,7 +24,6 @@ // THE SOFTWARE. //go:build linux -// +build linux package cgroups // import "go.opentelemetry.io/collector/internal/cgroups" diff --git a/internal/cgroups/cgroup_test.go b/internal/cgroups/cgroup_test.go index a268de10c95..f359c7c6f37 100644 --- a/internal/cgroups/cgroup_test.go +++ b/internal/cgroups/cgroup_test.go @@ -24,7 +24,6 @@ // THE SOFTWARE. //go:build linux -// +build linux package cgroups diff --git a/internal/cgroups/cgroups.go b/internal/cgroups/cgroups.go index 1e928480c1d..0b04709c199 100644 --- a/internal/cgroups/cgroups.go +++ b/internal/cgroups/cgroups.go @@ -24,7 +24,6 @@ // THE SOFTWARE. //go:build linux -// +build linux package cgroups // import "go.opentelemetry.io/collector/internal/cgroups" import ( diff --git a/internal/cgroups/cgroups_test.go b/internal/cgroups/cgroups_test.go index 960d1417ecc..3c4c0996695 100644 --- a/internal/cgroups/cgroups_test.go +++ b/internal/cgroups/cgroups_test.go @@ -24,7 +24,6 @@ // THE SOFTWARE. //go:build linux -// +build linux package cgroups diff --git a/internal/cgroups/errors.go b/internal/cgroups/errors.go index bfa1737f79c..815d01d5704 100644 --- a/internal/cgroups/errors.go +++ b/internal/cgroups/errors.go @@ -24,7 +24,6 @@ // THE SOFTWARE. //go:build linux -// +build linux package cgroups // import "go.opentelemetry.io/collector/internal/cgroups" diff --git a/internal/cgroups/mountpoint.go b/internal/cgroups/mountpoint.go index d4a6a4f97a0..69582b35aa5 100644 --- a/internal/cgroups/mountpoint.go +++ b/internal/cgroups/mountpoint.go @@ -24,7 +24,6 @@ // THE SOFTWARE. //go:build linux -// +build linux package cgroups // import "go.opentelemetry.io/collector/internal/cgroups" diff --git a/internal/cgroups/mountpoint_test.go b/internal/cgroups/mountpoint_test.go index ec13238b4c2..8ce2810f89f 100644 --- a/internal/cgroups/mountpoint_test.go +++ b/internal/cgroups/mountpoint_test.go @@ -24,7 +24,6 @@ // THE SOFTWARE. //go:build linux -// +build linux package cgroups diff --git a/internal/cgroups/package_test.go b/internal/cgroups/package_test.go new file mode 100644 index 00000000000..04c6820d3a2 --- /dev/null +++ b/internal/cgroups/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package cgroups + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/cgroups/subsys.go b/internal/cgroups/subsys.go index 7e72a73add8..dfe60779a31 100644 --- a/internal/cgroups/subsys.go +++ b/internal/cgroups/subsys.go @@ -24,7 +24,6 @@ // THE SOFTWARE. //go:build linux -// +build linux package cgroups // import "go.opentelemetry.io/collector/internal/cgroups" diff --git a/internal/cgroups/subsys_test.go b/internal/cgroups/subsys_test.go index 404195618b5..18adcc835fc 100644 --- a/internal/cgroups/subsys_test.go +++ b/internal/cgroups/subsys_test.go @@ -24,7 +24,6 @@ // THE SOFTWARE. //go:build linux -// +build linux package cgroups diff --git a/internal/cgroups/util_test.go b/internal/cgroups/util_test.go index 4b254d7c41a..9babdc7802e 100644 --- a/internal/cgroups/util_test.go +++ b/internal/cgroups/util_test.go @@ -24,7 +24,6 @@ // THE SOFTWARE. //go:build linux -// +build linux package cgroups diff --git a/internal/e2e/Makefile b/internal/e2e/Makefile new file mode 100644 index 00000000000..ded7a36092d --- /dev/null +++ b/internal/e2e/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common diff --git a/internal/e2e/consume_contract_test.go b/internal/e2e/consume_contract_test.go new file mode 100644 index 00000000000..efda43101f3 --- /dev/null +++ b/internal/e2e/consume_contract_test.go @@ -0,0 +1,82 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package e2e + +import ( + "testing" + "time" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configgrpc" + "go.opentelemetry.io/collector/config/configretry" + "go.opentelemetry.io/collector/config/configtls" + "go.opentelemetry.io/collector/exporter/exporterhelper" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/exporter/otlpexporter" + "go.opentelemetry.io/collector/internal/testutil" + "go.opentelemetry.io/collector/receiver/otlpreceiver" +) + +func testExporterConfig(endpoint string) component.Config { + retryConfig := configretry.NewDefaultBackOffConfig() + retryConfig.InitialInterval = time.Millisecond // interval is short for the test purposes + return &otlpexporter.Config{ + QueueConfig: exporterhelper.QueueSettings{Enabled: false}, + RetryConfig: retryConfig, + ClientConfig: configgrpc.ClientConfig{ + Endpoint: endpoint, + TLSSetting: configtls.ClientConfig{ + Insecure: true, + }, + }, + } +} + +func testReceiverConfig(endpoint string) component.Config { + cfg := otlpreceiver.NewFactory().CreateDefaultConfig() + cfg.(*otlpreceiver.Config).HTTP = nil + cfg.(*otlpreceiver.Config).GRPC.NetAddr.Endpoint = endpoint + return cfg +} + +// TestConsumeContract is an example of testing of the exporter for the contract between the +// exporter and the receiver. +func TestConsumeContractOtlpLogs(t *testing.T) { + addr := testutil.GetAvailableLocalAddress(t) + exportertest.CheckConsumeContract(exportertest.CheckConsumeContractParams{ + T: t, + NumberOfTestElements: 10, + ExporterFactory: otlpexporter.NewFactory(), + DataType: component.DataTypeLogs, + ExporterConfig: testExporterConfig(addr), + ReceiverFactory: otlpreceiver.NewFactory(), + ReceiverConfig: testReceiverConfig(addr), + }) +} + +func TestConsumeContractOtlpTraces(t *testing.T) { + addr := testutil.GetAvailableLocalAddress(t) + exportertest.CheckConsumeContract(exportertest.CheckConsumeContractParams{ + T: t, + NumberOfTestElements: 10, + DataType: component.DataTypeTraces, + ExporterFactory: otlpexporter.NewFactory(), + ExporterConfig: testExporterConfig(addr), + ReceiverFactory: otlpreceiver.NewFactory(), + ReceiverConfig: testReceiverConfig(addr), + }) +} + +func TestConsumeContractOtlpMetrics(t *testing.T) { + addr := testutil.GetAvailableLocalAddress(t) + exportertest.CheckConsumeContract(exportertest.CheckConsumeContractParams{ + T: t, + NumberOfTestElements: 10, + ExporterFactory: otlpexporter.NewFactory(), + DataType: component.DataTypeMetrics, + ExporterConfig: testExporterConfig(addr), + ReceiverFactory: otlpreceiver.NewFactory(), + ReceiverConfig: testReceiverConfig(addr), + }) +} diff --git a/internal/e2e/go.mod b/internal/e2e/go.mod new file mode 100644 index 00000000000..70e5da18f40 --- /dev/null +++ b/internal/e2e/go.mod @@ -0,0 +1,134 @@ +module go.opentelemetry.io/collector/internal/e2e + +go 1.21 + +require ( + github.com/stretchr/testify v1.8.4 + go.opentelemetry.io/collector v0.96.0 + go.opentelemetry.io/collector/component v0.96.0 + go.opentelemetry.io/collector/config/configgrpc v0.96.0 + go.opentelemetry.io/collector/config/confighttp v0.96.0 + go.opentelemetry.io/collector/config/configretry v0.96.0 + go.opentelemetry.io/collector/config/configtls v0.96.0 + go.opentelemetry.io/collector/consumer v0.96.0 + go.opentelemetry.io/collector/exporter v0.96.0 + go.opentelemetry.io/collector/exporter/otlpexporter v0.95.0 + go.opentelemetry.io/collector/exporter/otlphttpexporter v0.95.0 + go.opentelemetry.io/collector/pdata v1.3.0 + go.opentelemetry.io/collector/receiver v0.96.0 + go.opentelemetry.io/collector/receiver/otlpreceiver v0.95.0 + go.uber.org/goleak v1.3.0 +) + +require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect + github.com/hashicorp/go-version v1.6.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/klauspost/compress v1.17.7 // indirect + github.com/knadh/koanf/maps v0.1.1 // indirect + github.com/knadh/koanf/providers/confmap v0.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/mostynb/go-grpc-compression v1.2.2 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/rs/cors v1.10.1 // indirect + go.opentelemetry.io/collector/config/configauth v0.96.0 // indirect + go.opentelemetry.io/collector/config/configcompression v0.96.0 // indirect + go.opentelemetry.io/collector/config/confignet v0.96.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.3.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect + go.opentelemetry.io/collector/config/internal v0.96.0 // indirect + go.opentelemetry.io/collector/confmap v0.96.0 // indirect + go.opentelemetry.io/collector/extension v0.96.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.96.0 // indirect + go.opentelemetry.io/collector/featuregate v1.3.0 // indirect + go.opentelemetry.io/contrib/config v0.4.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect + go.opentelemetry.io/proto/otlp v1.1.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + +replace go.opentelemetry.io/collector => ../.. + +replace go.opentelemetry.io/collector/config/configopaque => ../../config/configopaque + +replace go.opentelemetry.io/collector/config/configgrpc => ../../config/configgrpc + +replace go.opentelemetry.io/collector/config/internal => ../../config/internal + +replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet + +replace go.opentelemetry.io/collector/config/confighttp => ../../config/confighttp + +replace go.opentelemetry.io/collector/config/configauth => ../../config/configauth + +replace go.opentelemetry.io/collector/config/configretry => ../../config/configretry + +replace go.opentelemetry.io/collector/config/configtls => ../../config/configtls + +replace go.opentelemetry.io/collector/extension/auth => ../../extension/auth + +replace go.opentelemetry.io/collector/exporter/otlpexporter => ../../exporter/otlpexporter + +replace go.opentelemetry.io/collector/config/configcompression => ../../config/configcompression + +replace go.opentelemetry.io/collector/exporter/otlphttpexporter => ../../exporter/otlphttpexporter + +replace go.opentelemetry.io/collector/pdata => ../../pdata + +replace go.opentelemetry.io/collector/consumer => ../../consumer + +replace go.opentelemetry.io/collector/receiver/otlpreceiver => ../../receiver/otlpreceiver + +replace go.opentelemetry.io/collector/receiver => ../../receiver + +replace go.opentelemetry.io/collector/extension => ../../extension + +replace go.opentelemetry.io/collector/confmap => ../../confmap + +replace go.opentelemetry.io/collector/component => ../../component + +replace go.opentelemetry.io/collector/exporter => ../../exporter + +replace go.opentelemetry.io/collector/featuregate => ../../featuregate + +replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry diff --git a/internal/e2e/go.sum b/internal/e2e/go.sum new file mode 100644 index 00000000000..6dc69bb0e99 --- /dev/null +++ b/internal/e2e/go.sum @@ -0,0 +1,176 @@ +cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= +cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= +cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 h1:aRVqY1p2IJaBGStWMsQMpkAa83cPkCDLl80eOj0Rbz4= +cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68/go.mod h1:1a3eRNYX12fs5UABBIXS8HXVvQbX9hRB/RkEBPORpe8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= +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= +github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= +github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= +github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= +github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= +github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +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/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/mostynb/go-grpc-compression v1.2.2 h1:XaDbnRvt2+1vgr0b/l0qh4mJAfIxE0bKXtz2Znl3GGI= +github.com/mostynb/go-grpc-compression v1.2.2/go.mod h1:GOCr2KBxXcblCuczg3YdLQlcin1/NfyDA348ckuCH6w= +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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= +github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= +go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 h1:UNQQKPfTDe1J81ViolILjTKPr9WetKW6uei2hFgJmFs= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 h1:Mw5xcxMwlqoJd97vwPxA8isEaIoxsta9/Q51+TTJLGE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0/go.mod h1:CQNu9bj7o7mC6U7+CA/schKEYakYXWr79ucDHTMGhCM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 h1:s0PHtIkN+3xrbDOpt2M8OTG92cWqUESvzh2MxiR5xY8= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0/go.mod h1:hZlFbDbRt++MMPCCfSJfmhkGIWnX1h3XjkfxZUjLrIA= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= +golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +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/internal/e2e/otlphttp_test.go b/internal/e2e/otlphttp_test.go new file mode 100644 index 00000000000..59627ab4b17 --- /dev/null +++ b/internal/e2e/otlphttp_test.go @@ -0,0 +1,364 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package e2e + +import ( + "bytes" + "compress/gzip" + "context" + "encoding/base64" + "encoding/hex" + "errors" + "fmt" + "io" + "net/http" + "net/http/httptest" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/exporter/otlphttpexporter" + "go.opentelemetry.io/collector/internal/testdata" + "go.opentelemetry.io/collector/internal/testutil" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp" + "go.opentelemetry.io/collector/receiver/otlpreceiver" + "go.opentelemetry.io/collector/receiver/receivertest" +) + +func TestInvalidConfig(t *testing.T) { + config := &otlphttpexporter.Config{ + ClientConfig: confighttp.ClientConfig{ + Endpoint: "", + }, + } + f := otlphttpexporter.NewFactory() + set := exportertest.NewNopCreateSettings() + _, err := f.CreateTracesExporter(context.Background(), set, config) + require.Error(t, err) + _, err = f.CreateMetricsExporter(context.Background(), set, config) + require.Error(t, err) + _, err = f.CreateLogsExporter(context.Background(), set, config) + require.Error(t, err) +} + +func TestTraceNoBackend(t *testing.T) { + addr := testutil.GetAvailableLocalAddress(t) + exp := startTracesExporter(t, "", fmt.Sprintf("http://%s/v1/traces", addr)) + td := testdata.GenerateTraces(1) + assert.Error(t, exp.ConsumeTraces(context.Background(), td)) +} + +func TestTraceInvalidUrl(t *testing.T) { + exp := startTracesExporter(t, "http:/\\//this_is_an/*/invalid_url", "") + td := testdata.GenerateTraces(1) + assert.Error(t, exp.ConsumeTraces(context.Background(), td)) + + exp = startTracesExporter(t, "", "http:/\\//this_is_an/*/invalid_url") + td = testdata.GenerateTraces(1) + assert.Error(t, exp.ConsumeTraces(context.Background(), td)) +} + +func TestTraceError(t *testing.T) { + addr := testutil.GetAvailableLocalAddress(t) + + startTracesReceiver(t, addr, consumertest.NewErr(errors.New("my_error"))) + exp := startTracesExporter(t, "", fmt.Sprintf("http://%s/v1/traces", addr)) + + td := testdata.GenerateTraces(1) + assert.Error(t, exp.ConsumeTraces(context.Background(), td)) +} + +func TestTraceRoundTrip(t *testing.T) { + addr := testutil.GetAvailableLocalAddress(t) + + tests := []struct { + name string + baseURL string + overrideURL string + }{ + { + name: "wrongbase", + baseURL: "http://wronghostname", + overrideURL: fmt.Sprintf("http://%s/v1/traces", addr), + }, + { + name: "onlybase", + baseURL: fmt.Sprintf("http://%s", addr), + overrideURL: "", + }, + { + name: "override", + baseURL: "", + overrideURL: fmt.Sprintf("http://%s/v1/traces", addr), + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + sink := new(consumertest.TracesSink) + startTracesReceiver(t, addr, sink) + exp := startTracesExporter(t, test.baseURL, test.overrideURL) + + td := testdata.GenerateTraces(1) + assert.NoError(t, exp.ConsumeTraces(context.Background(), td)) + require.Eventually(t, func() bool { + return sink.SpanCount() > 0 + }, 1*time.Second, 10*time.Millisecond) + allTraces := sink.AllTraces() + require.Len(t, allTraces, 1) + assert.EqualValues(t, td, allTraces[0]) + }) + } +} + +func TestMetricsError(t *testing.T) { + addr := testutil.GetAvailableLocalAddress(t) + + startMetricsReceiver(t, addr, consumertest.NewErr(errors.New("my_error"))) + exp := startMetricsExporter(t, "", fmt.Sprintf("http://%s/v1/metrics", addr)) + + md := testdata.GenerateMetrics(1) + assert.Error(t, exp.ConsumeMetrics(context.Background(), md)) +} + +func TestMetricsRoundTrip(t *testing.T) { + addr := testutil.GetAvailableLocalAddress(t) + + tests := []struct { + name string + baseURL string + overrideURL string + }{ + { + name: "wrongbase", + baseURL: "http://wronghostname", + overrideURL: fmt.Sprintf("http://%s/v1/metrics", addr), + }, + { + name: "onlybase", + baseURL: fmt.Sprintf("http://%s", addr), + overrideURL: "", + }, + { + name: "override", + baseURL: "", + overrideURL: fmt.Sprintf("http://%s/v1/metrics", addr), + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + sink := new(consumertest.MetricsSink) + startMetricsReceiver(t, addr, sink) + exp := startMetricsExporter(t, test.baseURL, test.overrideURL) + + md := testdata.GenerateMetrics(1) + assert.NoError(t, exp.ConsumeMetrics(context.Background(), md)) + require.Eventually(t, func() bool { + return sink.DataPointCount() > 0 + }, 1*time.Second, 10*time.Millisecond) + allMetrics := sink.AllMetrics() + require.Len(t, allMetrics, 1) + assert.EqualValues(t, md, allMetrics[0]) + }) + } +} + +func TestLogsError(t *testing.T) { + addr := testutil.GetAvailableLocalAddress(t) + + startLogsReceiver(t, addr, consumertest.NewErr(errors.New("my_error"))) + exp := startLogsExporter(t, "", fmt.Sprintf("http://%s/v1/logs", addr)) + + md := testdata.GenerateLogs(1) + assert.Error(t, exp.ConsumeLogs(context.Background(), md)) +} + +func TestLogsRoundTrip(t *testing.T) { + addr := testutil.GetAvailableLocalAddress(t) + + tests := []struct { + name string + baseURL string + overrideURL string + }{ + { + name: "wrongbase", + baseURL: "http://wronghostname", + overrideURL: fmt.Sprintf("http://%s/v1/logs", addr), + }, + { + name: "onlybase", + baseURL: fmt.Sprintf("http://%s", addr), + overrideURL: "", + }, + { + name: "override", + baseURL: "", + overrideURL: fmt.Sprintf("http://%s/v1/logs", addr), + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + sink := new(consumertest.LogsSink) + startLogsReceiver(t, addr, sink) + exp := startLogsExporter(t, test.baseURL, test.overrideURL) + + md := testdata.GenerateLogs(1) + assert.NoError(t, exp.ConsumeLogs(context.Background(), md)) + require.Eventually(t, func() bool { + return sink.LogRecordCount() > 0 + }, 1*time.Second, 10*time.Millisecond) + allLogs := sink.AllLogs() + require.Len(t, allLogs, 1) + assert.EqualValues(t, md, allLogs[0]) + }) + } +} + +func TestIssue_4221(t *testing.T) { + svr := httptest.NewServer(http.HandlerFunc(func(_ http.ResponseWriter, r *http.Request) { + defer func() { assert.NoError(t, r.Body.Close()) }() + compressedData, err := io.ReadAll(r.Body) + require.NoError(t, err) + gzipReader, err := gzip.NewReader(bytes.NewReader(compressedData)) + require.NoError(t, err) + data, err := io.ReadAll(gzipReader) + require.NoError(t, err) + base64Data := base64.StdEncoding.EncodeToString(data) + // Verify same base64 encoded string is received. + assert.Equal(t, "CscBCkkKIAoMc2VydmljZS5uYW1lEhAKDnVvcC5zdGFnZS1ldS0xCiUKGW91dHN5c3RlbXMubW9kdWxlLnZlcnNpb24SCAoGOTAzMzg2EnoKEQoMdW9wX2NhbmFyaWVzEgExEmUKEEMDhT8Ib0+Mhs8Zi2VR34QSCOVRPDJ5XEG5IgA5QE41aASRrxZBQE41aASRrxZKEAoKc3Bhbl9pbmRleBICGANKHwoNY29kZS5mdW5jdGlvbhIOCgxteUZ1bmN0aW9uMzZ6AA==", base64Data) + unbase64Data, err := base64.StdEncoding.DecodeString(base64Data) + require.NoError(t, err) + tr := ptraceotlp.NewExportRequest() + require.NoError(t, tr.UnmarshalProto(unbase64Data)) + span := tr.Traces().ResourceSpans().At(0).ScopeSpans().At(0).Spans().At(0) + traceID := span.TraceID() + assert.Equal(t, "4303853f086f4f8c86cf198b6551df84", hex.EncodeToString(traceID[:])) + spanID := span.SpanID() + assert.Equal(t, "e5513c32795c41b9", hex.EncodeToString(spanID[:])) + })) + defer func() { svr.Close() }() + + exp := startTracesExporter(t, "", svr.URL) + + md := ptrace.NewTraces() + rms := md.ResourceSpans().AppendEmpty() + rms.Resource().Attributes().PutStr("service.name", "uop.stage-eu-1") + rms.Resource().Attributes().PutStr("outsystems.module.version", "903386") + ils := rms.ScopeSpans().AppendEmpty() + ils.Scope().SetName("uop_canaries") + ils.Scope().SetVersion("1") + span := ils.Spans().AppendEmpty() + + var traceIDBytes [16]byte + traceIDBytesSlice, err := hex.DecodeString("4303853f086f4f8c86cf198b6551df84") + require.NoError(t, err) + copy(traceIDBytes[:], traceIDBytesSlice) + span.SetTraceID(traceIDBytes) + traceID := span.TraceID() + assert.Equal(t, "4303853f086f4f8c86cf198b6551df84", hex.EncodeToString(traceID[:])) + + var spanIDBytes [8]byte + spanIDBytesSlice, err := hex.DecodeString("e5513c32795c41b9") + require.NoError(t, err) + copy(spanIDBytes[:], spanIDBytesSlice) + span.SetSpanID(spanIDBytes) + spanID := span.SpanID() + assert.Equal(t, "e5513c32795c41b9", hex.EncodeToString(spanID[:])) + + span.SetEndTimestamp(1634684637873000000) + span.Attributes().PutInt("span_index", 3) + span.Attributes().PutStr("code.function", "myFunction36") + span.SetStartTimestamp(1634684637873000000) + + assert.NoError(t, exp.ConsumeTraces(context.Background(), md)) +} + +func startTracesExporter(t *testing.T, baseURL string, overrideURL string) exporter.Traces { + factory := otlphttpexporter.NewFactory() + cfg := createExporterConfig(baseURL, factory.CreateDefaultConfig()) + cfg.TracesEndpoint = overrideURL + exp, err := factory.CreateTracesExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + startAndCleanup(t, exp) + return exp +} + +func startMetricsExporter(t *testing.T, baseURL string, overrideURL string) exporter.Metrics { + factory := otlphttpexporter.NewFactory() + cfg := createExporterConfig(baseURL, factory.CreateDefaultConfig()) + cfg.MetricsEndpoint = overrideURL + exp, err := factory.CreateMetricsExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + startAndCleanup(t, exp) + return exp +} + +func startLogsExporter(t *testing.T, baseURL string, overrideURL string) exporter.Logs { + factory := otlphttpexporter.NewFactory() + cfg := createExporterConfig(baseURL, factory.CreateDefaultConfig()) + cfg.LogsEndpoint = overrideURL + exp, err := factory.CreateLogsExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + startAndCleanup(t, exp) + return exp +} + +func createExporterConfig(baseURL string, defaultCfg component.Config) *otlphttpexporter.Config { + cfg := defaultCfg.(*otlphttpexporter.Config) + cfg.Endpoint = baseURL + cfg.QueueConfig.Enabled = false + cfg.RetryConfig.Enabled = false + return cfg +} + +func startTracesReceiver(t *testing.T, addr string, next consumer.Traces) { + factory := otlpreceiver.NewFactory() + cfg := createReceiverConfig(addr, factory.CreateDefaultConfig()) + recv, err := factory.CreateTracesReceiver(context.Background(), receivertest.NewNopCreateSettings(), cfg, next) + require.NoError(t, err) + startAndCleanup(t, recv) +} + +func startMetricsReceiver(t *testing.T, addr string, next consumer.Metrics) { + factory := otlpreceiver.NewFactory() + cfg := createReceiverConfig(addr, factory.CreateDefaultConfig()) + recv, err := factory.CreateMetricsReceiver(context.Background(), receivertest.NewNopCreateSettings(), cfg, next) + require.NoError(t, err) + startAndCleanup(t, recv) +} + +func startLogsReceiver(t *testing.T, addr string, next consumer.Logs) { + factory := otlpreceiver.NewFactory() + cfg := createReceiverConfig(addr, factory.CreateDefaultConfig()) + recv, err := factory.CreateLogsReceiver(context.Background(), receivertest.NewNopCreateSettings(), cfg, next) + require.NoError(t, err) + startAndCleanup(t, recv) +} + +func createReceiverConfig(addr string, defaultCfg component.Config) *otlpreceiver.Config { + cfg := defaultCfg.(*otlpreceiver.Config) + cfg.HTTP.Endpoint = addr + cfg.GRPC = nil + return cfg +} + +func startAndCleanup(t *testing.T, cmp component.Component) { + require.NoError(t, cmp.Start(context.Background(), componenttest.NewNopHost())) + t.Cleanup(func() { + require.NoError(t, cmp.Shutdown(context.Background())) + }) +} diff --git a/internal/e2e/package_test.go b/internal/e2e/package_test.go new file mode 100644 index 00000000000..73da050f0da --- /dev/null +++ b/internal/e2e/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package e2e + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/fanoutconsumer/logs.go b/internal/fanoutconsumer/logs.go index 9b07bbc6377..bff5c1a897e 100644 --- a/internal/fanoutconsumer/logs.go +++ b/internal/fanoutconsumer/logs.go @@ -7,12 +7,9 @@ package fanoutconsumer // import "go.opentelemetry.io/collector/internal/fanoutc import ( "context" - "fmt" "go.uber.org/multierr" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/connector" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/pdata/plog" ) @@ -20,102 +17,67 @@ import ( // NewLogs wraps multiple log consumers in a single one. // It fanouts the incoming data to all the consumers, and does smart routing: // - Clones only to the consumer that needs to mutate the data. -// - If all consumers needs to mutate the data one will get the original data. +// - If all consumers needs to mutate the data one will get the original mutable data. func NewLogs(lcs []consumer.Logs) consumer.Logs { - if len(lcs) == 1 { - // Don't wrap if no need to do it. + // Don't wrap if there is only one non-mutating consumer. + if len(lcs) == 1 && !lcs[0].Capabilities().MutatesData { return lcs[0] } - var pass []consumer.Logs - var clone []consumer.Logs - for i := 0; i < len(lcs)-1; i++ { - if !lcs[i].Capabilities().MutatesData { - pass = append(pass, lcs[i]) + + lc := &logsConsumer{} + for i := 0; i < len(lcs); i++ { + if lcs[i].Capabilities().MutatesData { + lc.mutable = append(lc.mutable, lcs[i]) } else { - clone = append(clone, lcs[i]) + lc.readonly = append(lc.readonly, lcs[i]) } } - // Give the original data to the last consumer if no other read-only consumer, - // otherwise put it in the right bucket. Never share the same data between - // a mutating and a non-mutating consumer since the non-mutating consumer may process - // data async and the mutating consumer may change the data before that. - if len(pass) == 0 || !lcs[len(lcs)-1].Capabilities().MutatesData { - pass = append(pass, lcs[len(lcs)-1]) - } else { - clone = append(clone, lcs[len(lcs)-1]) - } - return &logsConsumer{pass: pass, clone: clone} + return lc } type logsConsumer struct { - pass []consumer.Logs - clone []consumer.Logs + mutable []consumer.Logs + readonly []consumer.Logs } func (lsc *logsConsumer) Capabilities() consumer.Capabilities { - return consumer.Capabilities{MutatesData: false} + // If all consumers are mutating, then the original data will be passed to one of them. + return consumer.Capabilities{MutatesData: len(lsc.mutable) > 0 && len(lsc.readonly) == 0} } // ConsumeLogs exports the plog.Logs to all consumers wrapped by the current one. func (lsc *logsConsumer) ConsumeLogs(ctx context.Context, ld plog.Logs) error { var errs error - // Initially pass to clone exporter to avoid the case where the optimization of sending - // the incoming data to a mutating consumer is used that may change the incoming data before - // cloning. - for _, lc := range lsc.clone { - clonedLogs := plog.NewLogs() - ld.CopyTo(clonedLogs) - errs = multierr.Append(errs, lc.ConsumeLogs(ctx, clonedLogs)) - } - for _, lc := range lsc.pass { - errs = multierr.Append(errs, lc.ConsumeLogs(ctx, ld)) - } - return errs -} - -var _ connector.LogsRouter = (*logsRouter)(nil) -type logsRouter struct { - consumer.Logs - consumers map[component.ID]consumer.Logs -} + if len(lsc.mutable) > 0 { + // Clone the data before sending to all mutating consumers except the last one. + for i := 0; i < len(lsc.mutable)-1; i++ { + errs = multierr.Append(errs, lsc.mutable[i].ConsumeLogs(ctx, cloneLogs(ld))) + } + // Send data as is to the last mutating consumer only if there are no other non-mutating consumers and the + // data is mutable. Never share the same data between a mutating and a non-mutating consumer since the + // non-mutating consumer may process data async and the mutating consumer may change the data before that. + lastConsumer := lsc.mutable[len(lsc.mutable)-1] + if len(lsc.readonly) == 0 && !ld.IsReadOnly() { + errs = multierr.Append(errs, lastConsumer.ConsumeLogs(ctx, ld)) + } else { + errs = multierr.Append(errs, lastConsumer.ConsumeLogs(ctx, cloneLogs(ld))) + } + } -func NewLogsRouter(cm map[component.ID]consumer.Logs) consumer.Logs { - consumers := make([]consumer.Logs, 0, len(cm)) - for _, consumer := range cm { - consumers = append(consumers, consumer) + // Mark the data as read-only if it will be sent to more than one read-only consumer. + if len(lsc.readonly) > 1 && !ld.IsReadOnly() { + ld.MarkReadOnly() } - return &logsRouter{ - Logs: NewLogs(consumers), - consumers: cm, + for _, lc := range lsc.readonly { + errs = multierr.Append(errs, lc.ConsumeLogs(ctx, ld)) } -} -func (r *logsRouter) PipelineIDs() []component.ID { - ids := make([]component.ID, 0, len(r.consumers)) - for id := range r.consumers { - ids = append(ids, id) - } - return ids + return errs } -func (r *logsRouter) Consumer(pipelineIDs ...component.ID) (consumer.Logs, error) { - if len(pipelineIDs) == 0 { - return nil, fmt.Errorf("missing consumers") - } - consumers := make([]consumer.Logs, 0, len(pipelineIDs)) - var errors error - for _, pipelineID := range pipelineIDs { - c, ok := r.consumers[pipelineID] - if ok { - consumers = append(consumers, c) - } else { - errors = multierr.Append(errors, fmt.Errorf("missing consumer: %q", pipelineID)) - } - } - if errors != nil { - // TODO potentially this could return a NewLogs with the valid consumers - return nil, errors - } - return NewLogs(consumers), nil +func cloneLogs(ld plog.Logs) plog.Logs { + clonedLogs := plog.NewLogs() + ld.CopyTo(clonedLogs) + return clonedLogs } diff --git a/internal/fanoutconsumer/logs_test.go b/internal/fanoutconsumer/logs_test.go index 1db046b854d..8c247cb1232 100644 --- a/internal/fanoutconsumer/logs_test.go +++ b/internal/fanoutconsumer/logs_test.go @@ -6,18 +6,13 @@ package fanoutconsumer import ( "context" "errors" - "fmt" - "strconv" "testing" "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/connector" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/internal/testdata" - "go.opentelemetry.io/collector/pdata/plog" ) func TestLogsNotMultiplexing(t *testing.T) { @@ -26,6 +21,12 @@ func TestLogsNotMultiplexing(t *testing.T) { assert.Same(t, nop, lfc) } +func TestLogsNotMultiplexingMutating(t *testing.T) { + p := &mutatingLogsSink{LogsSink: new(consumertest.LogsSink)} + lfc := NewLogs([]consumer.Logs{p}) + assert.True(t, lfc.Capabilities().MutatesData) +} + func TestLogsMultiplexingNonMutating(t *testing.T) { p1 := new(consumertest.LogsSink) p2 := new(consumertest.LogsSink) @@ -57,6 +58,9 @@ func TestLogsMultiplexingNonMutating(t *testing.T) { assert.True(t, ld == p3.AllLogs()[1]) assert.EqualValues(t, ld, p3.AllLogs()[0]) assert.EqualValues(t, ld, p3.AllLogs()[1]) + + // The data should be marked as read only. + assert.True(t, ld.IsReadOnly()) } func TestLogsMultiplexingMutating(t *testing.T) { @@ -65,7 +69,7 @@ func TestLogsMultiplexingMutating(t *testing.T) { p3 := &mutatingLogsSink{LogsSink: new(consumertest.LogsSink)} lfc := NewLogs([]consumer.Logs{p1, p2, p3}) - assert.False(t, lfc.Capabilities().MutatesData) + assert.True(t, lfc.Capabilities().MutatesData) ld := testdata.GenerateLogs(1) for i := 0; i < 2; i++ { @@ -91,6 +95,46 @@ func TestLogsMultiplexingMutating(t *testing.T) { assert.True(t, ld == p3.AllLogs()[1]) assert.EqualValues(t, ld, p3.AllLogs()[0]) assert.EqualValues(t, ld, p3.AllLogs()[1]) + + // The data should not be marked as read only. + assert.False(t, ld.IsReadOnly()) +} + +func TestReadOnlyLogsMultiplexingMutating(t *testing.T) { + p1 := &mutatingLogsSink{LogsSink: new(consumertest.LogsSink)} + p2 := &mutatingLogsSink{LogsSink: new(consumertest.LogsSink)} + p3 := &mutatingLogsSink{LogsSink: new(consumertest.LogsSink)} + + lfc := NewLogs([]consumer.Logs{p1, p2, p3}) + assert.True(t, lfc.Capabilities().MutatesData) + ldOrig := testdata.GenerateLogs(1) + ld := testdata.GenerateLogs(1) + ld.MarkReadOnly() + + for i := 0; i < 2; i++ { + err := lfc.ConsumeLogs(context.Background(), ld) + if err != nil { + t.Errorf("Wanted nil got error") + return + } + } + + // All consumers should receive the cloned data. + + assert.True(t, ld != p1.AllLogs()[0]) + assert.True(t, ld != p1.AllLogs()[1]) + assert.EqualValues(t, ldOrig, p1.AllLogs()[0]) + assert.EqualValues(t, ldOrig, p1.AllLogs()[1]) + + assert.True(t, ld != p2.AllLogs()[0]) + assert.True(t, ld != p2.AllLogs()[1]) + assert.EqualValues(t, ldOrig, p2.AllLogs()[0]) + assert.EqualValues(t, ldOrig, p2.AllLogs()[1]) + + assert.True(t, ld != p3.AllLogs()[0]) + assert.True(t, ld != p3.AllLogs()[1]) + assert.EqualValues(t, ldOrig, p3.AllLogs()[0]) + assert.EqualValues(t, ldOrig, p3.AllLogs()[1]) } func TestLogsMultiplexingMixLastMutating(t *testing.T) { @@ -126,6 +170,9 @@ func TestLogsMultiplexingMixLastMutating(t *testing.T) { assert.True(t, ld != p3.AllLogs()[1]) assert.EqualValues(t, ld, p3.AllLogs()[0]) assert.EqualValues(t, ld, p3.AllLogs()[1]) + + // The data should not be marked as read only. + assert.False(t, ld.IsReadOnly()) } func TestLogsMultiplexingMixLastNonMutating(t *testing.T) { @@ -160,6 +207,9 @@ func TestLogsMultiplexingMixLastNonMutating(t *testing.T) { assert.True(t, ld == p3.AllLogs()[1]) assert.EqualValues(t, ld, p3.AllLogs()[0]) assert.EqualValues(t, ld, p3.AllLogs()[1]) + + // The data should not be marked as read only. + assert.False(t, ld.IsReadOnly()) } func TestLogsWhenErrors(t *testing.T) { @@ -195,132 +245,3 @@ type mutatingErr struct { func (mts mutatingErr) Capabilities() consumer.Capabilities { return consumer.Capabilities{MutatesData: true} } - -func TestLogsRouterMultiplexing(t *testing.T) { - var max = 20 - for numIDs := 1; numIDs < max; numIDs++ { - for numCons := 1; numCons < max; numCons++ { - for numLogs := 1; numLogs < max; numLogs++ { - t.Run( - fmt.Sprintf("%d-ids/%d-cons/%d-logs", numIDs, numCons, numLogs), - fuzzLogsRouter(numIDs, numCons, numLogs), - ) - } - } - } -} - -func fuzzLogsRouter(numIDs, numCons, numLogs int) func(*testing.T) { - return func(t *testing.T) { - allIDs := make([]component.ID, 0, numCons) - allCons := make([]consumer.Logs, 0, numCons) - allConsMap := make(map[component.ID]consumer.Logs) - - // If any consumer is mutating, the router must report mutating - for i := 0; i < numCons; i++ { - allIDs = append(allIDs, component.NewIDWithName("sink", strconv.Itoa(numCons))) - // Random chance for each consumer to be mutating - if (numCons+numLogs+i)%4 == 0 { - allCons = append(allCons, &mutatingLogsSink{LogsSink: new(consumertest.LogsSink)}) - } else { - allCons = append(allCons, new(consumertest.LogsSink)) - } - allConsMap[allIDs[i]] = allCons[i] - } - - r := NewLogsRouter(allConsMap).(connector.LogsRouter) - ld := testdata.GenerateLogs(1) - - // Keep track of how many logs each consumer should receive. - // This will be validated after every call to RouteLogs. - expected := make(map[component.ID]int, numCons) - - for i := 0; i < numLogs; i++ { - // Build a random set of ids (no duplicates) - randCons := make(map[component.ID]bool, numIDs) - for j := 0; j < numIDs; j++ { - // This number should be pretty random and less than numCons - conNum := (numCons + numIDs + i + j) % numCons - randCons[allIDs[conNum]] = true - } - - // Convert to slice, update expectations - conIDs := make([]component.ID, 0, len(randCons)) - for id := range randCons { - conIDs = append(conIDs, id) - expected[id]++ - } - - // Route to list of consumers - fanout, err := r.Consumer(conIDs...) - assert.NoError(t, err) - assert.NoError(t, fanout.ConsumeLogs(context.Background(), ld)) - - // Validate expectations for all consumers - for id := range expected { - logs := []plog.Logs{} - switch con := allConsMap[id].(type) { - case *consumertest.LogsSink: - logs = con.AllLogs() - case *mutatingLogsSink: - logs = con.AllLogs() - } - assert.Len(t, logs, expected[id]) - for n := 0; n < len(logs); n++ { - assert.EqualValues(t, ld, logs[n]) - } - } - } - } -} - -func TestLogsRouterGetConsumers(t *testing.T) { - ctx := context.Background() - ld := testdata.GenerateLogs(1) - - fooID := component.NewID("foo") - barID := component.NewID("bar") - - foo := new(consumertest.LogsSink) - bar := new(consumertest.LogsSink) - r := NewLogsRouter(map[component.ID]consumer.Logs{fooID: foo, barID: bar}).(connector.LogsRouter) - - rcs := r.PipelineIDs() - assert.Len(t, rcs, 2) - assert.ElementsMatch(t, []component.ID{fooID, barID}, rcs) - - assert.Len(t, foo.AllLogs(), 0) - assert.Len(t, bar.AllLogs(), 0) - - both, err := r.Consumer(fooID, barID) - assert.NotNil(t, both) - assert.NoError(t, err) - - assert.NoError(t, both.ConsumeLogs(ctx, ld)) - assert.Len(t, foo.AllLogs(), 1) - assert.Len(t, bar.AllLogs(), 1) - - fooOnly, err := r.Consumer(fooID) - assert.NotNil(t, fooOnly) - assert.NoError(t, err) - - assert.NoError(t, fooOnly.ConsumeLogs(ctx, ld)) - assert.Len(t, foo.AllLogs(), 2) - assert.Len(t, bar.AllLogs(), 1) - - barOnly, err := r.Consumer(barID) - assert.NotNil(t, barOnly) - assert.NoError(t, err) - - assert.NoError(t, barOnly.ConsumeLogs(ctx, ld)) - assert.Len(t, foo.AllLogs(), 2) - assert.Len(t, bar.AllLogs(), 2) - - none, err := r.Consumer() - assert.Nil(t, none) - assert.Error(t, err) - - fake, err := r.Consumer(component.NewID("fake")) - assert.Nil(t, fake) - assert.Error(t, err) -} diff --git a/internal/fanoutconsumer/metrics.go b/internal/fanoutconsumer/metrics.go index f1c1280e4c3..32d9514561d 100644 --- a/internal/fanoutconsumer/metrics.go +++ b/internal/fanoutconsumer/metrics.go @@ -5,12 +5,9 @@ package fanoutconsumer // import "go.opentelemetry.io/collector/internal/fanoutc import ( "context" - "fmt" "go.uber.org/multierr" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/connector" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/pdata/pmetric" ) @@ -18,102 +15,67 @@ import ( // NewMetrics wraps multiple metrics consumers in a single one. // It fanouts the incoming data to all the consumers, and does smart routing: // - Clones only to the consumer that needs to mutate the data. -// - If all consumers needs to mutate the data one will get the original data. +// - If all consumers needs to mutate the data one will get the original mutable data. func NewMetrics(mcs []consumer.Metrics) consumer.Metrics { - if len(mcs) == 1 { - // Don't wrap if no need to do it. + // Don't wrap if there is only one non-mutating consumer. + if len(mcs) == 1 && !mcs[0].Capabilities().MutatesData { return mcs[0] } - var pass []consumer.Metrics - var clone []consumer.Metrics - for i := 0; i < len(mcs)-1; i++ { - if !mcs[i].Capabilities().MutatesData { - pass = append(pass, mcs[i]) + + mc := &metricsConsumer{} + for i := 0; i < len(mcs); i++ { + if mcs[i].Capabilities().MutatesData { + mc.mutable = append(mc.mutable, mcs[i]) } else { - clone = append(clone, mcs[i]) + mc.readonly = append(mc.readonly, mcs[i]) } } - // Give the original data to the last consumer if no other read-only consumer, - // otherwise put it in the right bucket. Never share the same data between - // a mutating and a non-mutating consumer since the non-mutating consumer may process - // data async and the mutating consumer may change the data before that. - if len(pass) == 0 || !mcs[len(mcs)-1].Capabilities().MutatesData { - pass = append(pass, mcs[len(mcs)-1]) - } else { - clone = append(clone, mcs[len(mcs)-1]) - } - return &metricsConsumer{pass: pass, clone: clone} + return mc } type metricsConsumer struct { - pass []consumer.Metrics - clone []consumer.Metrics + mutable []consumer.Metrics + readonly []consumer.Metrics } func (msc *metricsConsumer) Capabilities() consumer.Capabilities { - return consumer.Capabilities{MutatesData: false} + // If all consumers are mutating, then the original data will be passed to one of them. + return consumer.Capabilities{MutatesData: len(msc.mutable) > 0 && len(msc.readonly) == 0} } // ConsumeMetrics exports the pmetric.Metrics to all consumers wrapped by the current one. func (msc *metricsConsumer) ConsumeMetrics(ctx context.Context, md pmetric.Metrics) error { var errs error - // Initially pass to clone exporter to avoid the case where the optimization of sending - // the incoming data to a mutating consumer is used that may change the incoming data before - // cloning. - for _, mc := range msc.clone { - clonedMetrics := pmetric.NewMetrics() - md.CopyTo(clonedMetrics) - errs = multierr.Append(errs, mc.ConsumeMetrics(ctx, clonedMetrics)) - } - for _, mc := range msc.pass { - errs = multierr.Append(errs, mc.ConsumeMetrics(ctx, md)) - } - return errs -} - -var _ connector.MetricsRouter = (*metricsRouter)(nil) -type metricsRouter struct { - consumer.Metrics - consumers map[component.ID]consumer.Metrics -} + if len(msc.mutable) > 0 { + // Clone the data before sending to all mutating consumers except the last one. + for i := 0; i < len(msc.mutable)-1; i++ { + errs = multierr.Append(errs, msc.mutable[i].ConsumeMetrics(ctx, cloneMetrics(md))) + } + // Send data as is to the last mutating consumer only if there are no other non-mutating consumers and the + // data is mutable. Never share the same data between a mutating and a non-mutating consumer since the + // non-mutating consumer may process data async and the mutating consumer may change the data before that. + lastConsumer := msc.mutable[len(msc.mutable)-1] + if len(msc.readonly) == 0 && !md.IsReadOnly() { + errs = multierr.Append(errs, lastConsumer.ConsumeMetrics(ctx, md)) + } else { + errs = multierr.Append(errs, lastConsumer.ConsumeMetrics(ctx, cloneMetrics(md))) + } + } -func NewMetricsRouter(cm map[component.ID]consumer.Metrics) consumer.Metrics { - consumers := make([]consumer.Metrics, 0, len(cm)) - for _, consumer := range cm { - consumers = append(consumers, consumer) + // Mark the data as read-only if it will be sent to more than one read-only consumer. + if len(msc.readonly) > 1 && !md.IsReadOnly() { + md.MarkReadOnly() } - return &metricsRouter{ - Metrics: NewMetrics(consumers), - consumers: cm, + for _, mc := range msc.readonly { + errs = multierr.Append(errs, mc.ConsumeMetrics(ctx, md)) } -} -func (r *metricsRouter) PipelineIDs() []component.ID { - ids := make([]component.ID, 0, len(r.consumers)) - for id := range r.consumers { - ids = append(ids, id) - } - return ids + return errs } -func (r *metricsRouter) Consumer(pipelineIDs ...component.ID) (consumer.Metrics, error) { - if len(pipelineIDs) == 0 { - return nil, fmt.Errorf("missing consumers") - } - consumers := make([]consumer.Metrics, 0, len(pipelineIDs)) - var errors error - for _, pipelineID := range pipelineIDs { - c, ok := r.consumers[pipelineID] - if ok { - consumers = append(consumers, c) - } else { - errors = multierr.Append(errors, fmt.Errorf("missing consumer: %q", pipelineID)) - } - } - if errors != nil { - // TODO potentially this could return a NewMetrics with the valid consumers - return nil, errors - } - return NewMetrics(consumers), nil +func cloneMetrics(md pmetric.Metrics) pmetric.Metrics { + clonedMetrics := pmetric.NewMetrics() + md.CopyTo(clonedMetrics) + return clonedMetrics } diff --git a/internal/fanoutconsumer/metrics_test.go b/internal/fanoutconsumer/metrics_test.go index 8cdfeeb51fa..efb39ec552a 100644 --- a/internal/fanoutconsumer/metrics_test.go +++ b/internal/fanoutconsumer/metrics_test.go @@ -6,18 +6,13 @@ package fanoutconsumer import ( "context" "errors" - "fmt" - "strconv" "testing" "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/connector" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/internal/testdata" - "go.opentelemetry.io/collector/pdata/pmetric" ) func TestMetricsNotMultiplexing(t *testing.T) { @@ -26,6 +21,12 @@ func TestMetricsNotMultiplexing(t *testing.T) { assert.Same(t, nop, mfc) } +func TestMetricssNotMultiplexingMutating(t *testing.T) { + p := &mutatingMetricsSink{MetricsSink: new(consumertest.MetricsSink)} + lfc := NewMetrics([]consumer.Metrics{p}) + assert.True(t, lfc.Capabilities().MutatesData) +} + func TestMetricsMultiplexingNonMutating(t *testing.T) { p1 := new(consumertest.MetricsSink) p2 := new(consumertest.MetricsSink) @@ -57,6 +58,9 @@ func TestMetricsMultiplexingNonMutating(t *testing.T) { assert.True(t, md == p3.AllMetrics()[1]) assert.EqualValues(t, md, p3.AllMetrics()[0]) assert.EqualValues(t, md, p3.AllMetrics()[1]) + + // The data should be marked as read only. + assert.True(t, md.IsReadOnly()) } func TestMetricsMultiplexingMutating(t *testing.T) { @@ -65,7 +69,7 @@ func TestMetricsMultiplexingMutating(t *testing.T) { p3 := &mutatingMetricsSink{MetricsSink: new(consumertest.MetricsSink)} mfc := NewMetrics([]consumer.Metrics{p1, p2, p3}) - assert.False(t, mfc.Capabilities().MutatesData) + assert.True(t, mfc.Capabilities().MutatesData) md := testdata.GenerateMetrics(1) for i := 0; i < 2; i++ { @@ -91,6 +95,46 @@ func TestMetricsMultiplexingMutating(t *testing.T) { assert.True(t, md == p3.AllMetrics()[1]) assert.EqualValues(t, md, p3.AllMetrics()[0]) assert.EqualValues(t, md, p3.AllMetrics()[1]) + + // The data should not be marked as read only. + assert.False(t, md.IsReadOnly()) +} + +func TestReadOnlyMetricsMultiplexingMixFirstMutating(t *testing.T) { + p1 := &mutatingMetricsSink{MetricsSink: new(consumertest.MetricsSink)} + p2 := &mutatingMetricsSink{MetricsSink: new(consumertest.MetricsSink)} + p3 := &mutatingMetricsSink{MetricsSink: new(consumertest.MetricsSink)} + + mfc := NewMetrics([]consumer.Metrics{p1, p2, p3}) + assert.True(t, mfc.Capabilities().MutatesData) + mdOrig := testdata.GenerateMetrics(1) + md := testdata.GenerateMetrics(1) + md.MarkReadOnly() + + for i := 0; i < 2; i++ { + err := mfc.ConsumeMetrics(context.Background(), md) + if err != nil { + t.Errorf("Wanted nil got error") + return + } + } + + // All consumers should receive the cloned data. + + assert.True(t, md != p1.AllMetrics()[0]) + assert.True(t, md != p1.AllMetrics()[1]) + assert.EqualValues(t, mdOrig, p1.AllMetrics()[0]) + assert.EqualValues(t, mdOrig, p1.AllMetrics()[1]) + + assert.True(t, md != p2.AllMetrics()[0]) + assert.True(t, md != p2.AllMetrics()[1]) + assert.EqualValues(t, mdOrig, p2.AllMetrics()[0]) + assert.EqualValues(t, mdOrig, p2.AllMetrics()[1]) + + assert.True(t, md != p3.AllMetrics()[0]) + assert.True(t, md != p3.AllMetrics()[1]) + assert.EqualValues(t, mdOrig, p3.AllMetrics()[0]) + assert.EqualValues(t, mdOrig, p3.AllMetrics()[1]) } func TestMetricsMultiplexingMixLastMutating(t *testing.T) { @@ -126,6 +170,9 @@ func TestMetricsMultiplexingMixLastMutating(t *testing.T) { assert.True(t, md != p3.AllMetrics()[1]) assert.EqualValues(t, md, p3.AllMetrics()[0]) assert.EqualValues(t, md, p3.AllMetrics()[1]) + + // The data should not be marked as read only. + assert.False(t, md.IsReadOnly()) } func TestMetricsMultiplexingMixLastNonMutating(t *testing.T) { @@ -160,6 +207,9 @@ func TestMetricsMultiplexingMixLastNonMutating(t *testing.T) { assert.True(t, md == p3.AllMetrics()[1]) assert.EqualValues(t, md, p3.AllMetrics()[0]) assert.EqualValues(t, md, p3.AllMetrics()[1]) + + // The data should not be marked as read only. + assert.False(t, md.IsReadOnly()) } func TestMetricsWhenErrors(t *testing.T) { @@ -187,132 +237,3 @@ type mutatingMetricsSink struct { func (mts *mutatingMetricsSink) Capabilities() consumer.Capabilities { return consumer.Capabilities{MutatesData: true} } - -func TestMetricsRouterMultiplexing(t *testing.T) { - var max = 20 - for numIDs := 1; numIDs < max; numIDs++ { - for numCons := 1; numCons < max; numCons++ { - for numMetrics := 1; numMetrics < max; numMetrics++ { - t.Run( - fmt.Sprintf("%d-ids/%d-cons/%d-logs", numIDs, numCons, numMetrics), - fuzzMetricsRouter(numIDs, numCons, numMetrics), - ) - } - } - } -} - -func fuzzMetricsRouter(numIDs, numCons, numMetrics int) func(*testing.T) { - return func(t *testing.T) { - allIDs := make([]component.ID, 0, numCons) - allCons := make([]consumer.Metrics, 0, numCons) - allConsMap := make(map[component.ID]consumer.Metrics) - - // If any consumer is mutating, the router must report mutating - for i := 0; i < numCons; i++ { - allIDs = append(allIDs, component.NewIDWithName("sink", strconv.Itoa(numCons))) - // Random chance for each consumer to be mutating - if (numCons+numMetrics+i)%4 == 0 { - allCons = append(allCons, &mutatingMetricsSink{MetricsSink: new(consumertest.MetricsSink)}) - } else { - allCons = append(allCons, new(consumertest.MetricsSink)) - } - allConsMap[allIDs[i]] = allCons[i] - } - - r := NewMetricsRouter(allConsMap).(connector.MetricsRouter) - md := testdata.GenerateMetrics(1) - - // Keep track of how many logs each consumer should receive. - // This will be validated after every call to RouteMetrics. - expected := make(map[component.ID]int, numCons) - - for i := 0; i < numMetrics; i++ { - // Build a random set of ids (no duplicates) - randCons := make(map[component.ID]bool, numIDs) - for j := 0; j < numIDs; j++ { - // This number should be pretty random and less than numCons - conNum := (numCons + numIDs + i + j) % numCons - randCons[allIDs[conNum]] = true - } - - // Convert to slice, update expectations - conIDs := make([]component.ID, 0, len(randCons)) - for id := range randCons { - conIDs = append(conIDs, id) - expected[id]++ - } - - // Route to list of consumers - fanout, err := r.Consumer(conIDs...) - assert.NoError(t, err) - assert.NoError(t, fanout.ConsumeMetrics(context.Background(), md)) - - // Validate expectations for all consumers - for id := range expected { - metrics := []pmetric.Metrics{} - switch con := allConsMap[id].(type) { - case *consumertest.MetricsSink: - metrics = con.AllMetrics() - case *mutatingMetricsSink: - metrics = con.AllMetrics() - } - assert.Len(t, metrics, expected[id]) - for n := 0; n < len(metrics); n++ { - assert.EqualValues(t, md, metrics[n]) - } - } - } - } -} - -func TestMetricsRouterGetConsumers(t *testing.T) { - ctx := context.Background() - md := testdata.GenerateMetrics(1) - - fooID := component.NewID("foo") - barID := component.NewID("bar") - - foo := new(consumertest.MetricsSink) - bar := new(consumertest.MetricsSink) - r := NewMetricsRouter(map[component.ID]consumer.Metrics{fooID: foo, barID: bar}).(connector.MetricsRouter) - - rcs := r.PipelineIDs() - assert.Len(t, rcs, 2) - assert.ElementsMatch(t, []component.ID{fooID, barID}, rcs) - - assert.Len(t, foo.AllMetrics(), 0) - assert.Len(t, bar.AllMetrics(), 0) - - both, err := r.Consumer(fooID, barID) - assert.NotNil(t, both) - assert.NoError(t, err) - - assert.NoError(t, both.ConsumeMetrics(ctx, md)) - assert.Len(t, foo.AllMetrics(), 1) - assert.Len(t, bar.AllMetrics(), 1) - - fooOnly, err := r.Consumer(fooID) - assert.NotNil(t, fooOnly) - assert.NoError(t, err) - - assert.NoError(t, fooOnly.ConsumeMetrics(ctx, md)) - assert.Len(t, foo.AllMetrics(), 2) - assert.Len(t, bar.AllMetrics(), 1) - - barOnly, err := r.Consumer(barID) - assert.NotNil(t, barOnly) - assert.NoError(t, err) - - assert.NoError(t, barOnly.ConsumeMetrics(ctx, md)) - assert.Len(t, foo.AllMetrics(), 2) - assert.Len(t, bar.AllMetrics(), 2) - - none, err := r.Consumer() - assert.Nil(t, none) - assert.Error(t, err) - - fake, err := r.Consumer(component.NewID("fake")) - assert.Nil(t, fake) - assert.Error(t, err) -} diff --git a/internal/fanoutconsumer/package_test.go b/internal/fanoutconsumer/package_test.go new file mode 100644 index 00000000000..b2da7cedcee --- /dev/null +++ b/internal/fanoutconsumer/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package fanoutconsumer + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/fanoutconsumer/traces.go b/internal/fanoutconsumer/traces.go index 89ecb166ec5..f9a34027017 100644 --- a/internal/fanoutconsumer/traces.go +++ b/internal/fanoutconsumer/traces.go @@ -5,12 +5,9 @@ package fanoutconsumer // import "go.opentelemetry.io/collector/internal/fanoutc import ( "context" - "fmt" "go.uber.org/multierr" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/connector" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/pdata/ptrace" ) @@ -18,102 +15,67 @@ import ( // NewTraces wraps multiple trace consumers in a single one. // It fanouts the incoming data to all the consumers, and does smart routing: // - Clones only to the consumer that needs to mutate the data. -// - If all consumers needs to mutate the data one will get the original data. +// - If all consumers needs to mutate the data one will get the original mutable data. func NewTraces(tcs []consumer.Traces) consumer.Traces { - if len(tcs) == 1 { - // Don't wrap if no need to do it. + // Don't wrap if there is only one non-mutating consumer. + if len(tcs) == 1 && !tcs[0].Capabilities().MutatesData { return tcs[0] } - var pass []consumer.Traces - var clone []consumer.Traces - for i := 0; i < len(tcs)-1; i++ { - if !tcs[i].Capabilities().MutatesData { - pass = append(pass, tcs[i]) + + tc := &tracesConsumer{} + for i := 0; i < len(tcs); i++ { + if tcs[i].Capabilities().MutatesData { + tc.mutable = append(tc.mutable, tcs[i]) } else { - clone = append(clone, tcs[i]) + tc.readonly = append(tc.readonly, tcs[i]) } } - // Give the original data to the last consumer if no other read-only consumer, - // otherwise put it in the right bucket. Never share the same data between - // a mutating and a non-mutating consumer since the non-mutating consumer may process - // data async and the mutating consumer may change the data before that. - if len(pass) == 0 || !tcs[len(tcs)-1].Capabilities().MutatesData { - pass = append(pass, tcs[len(tcs)-1]) - } else { - clone = append(clone, tcs[len(tcs)-1]) - } - return &tracesConsumer{pass: pass, clone: clone} + return tc } type tracesConsumer struct { - pass []consumer.Traces - clone []consumer.Traces + mutable []consumer.Traces + readonly []consumer.Traces } func (tsc *tracesConsumer) Capabilities() consumer.Capabilities { - return consumer.Capabilities{MutatesData: false} + // If all consumers are mutating, then the original data will be passed to one of them. + return consumer.Capabilities{MutatesData: len(tsc.mutable) > 0 && len(tsc.readonly) == 0} } // ConsumeTraces exports the ptrace.Traces to all consumers wrapped by the current one. func (tsc *tracesConsumer) ConsumeTraces(ctx context.Context, td ptrace.Traces) error { var errs error - // Initially pass to clone exporter to avoid the case where the optimization of sending - // the incoming data to a mutating consumer is used that may change the incoming data before - // cloning. - for _, tc := range tsc.clone { - clonedTraces := ptrace.NewTraces() - td.CopyTo(clonedTraces) - errs = multierr.Append(errs, tc.ConsumeTraces(ctx, clonedTraces)) - } - for _, tc := range tsc.pass { - errs = multierr.Append(errs, tc.ConsumeTraces(ctx, td)) - } - return errs -} - -var _ connector.TracesRouter = (*tracesRouter)(nil) -type tracesRouter struct { - consumer.Traces - consumers map[component.ID]consumer.Traces -} + if len(tsc.mutable) > 0 { + // Clone the data before sending to all mutating consumers except the last one. + for i := 0; i < len(tsc.mutable)-1; i++ { + errs = multierr.Append(errs, tsc.mutable[i].ConsumeTraces(ctx, cloneTraces(td))) + } + // Send data as is to the last mutating consumer only if there are no other non-mutating consumers and the + // data is mutable. Never share the same data between a mutating and a non-mutating consumer since the + // non-mutating consumer may process data async and the mutating consumer may change the data before that. + lastConsumer := tsc.mutable[len(tsc.mutable)-1] + if len(tsc.readonly) == 0 && !td.IsReadOnly() { + errs = multierr.Append(errs, lastConsumer.ConsumeTraces(ctx, td)) + } else { + errs = multierr.Append(errs, lastConsumer.ConsumeTraces(ctx, cloneTraces(td))) + } + } -func NewTracesRouter(cm map[component.ID]consumer.Traces) consumer.Traces { - consumers := make([]consumer.Traces, 0, len(cm)) - for _, consumer := range cm { - consumers = append(consumers, consumer) + // Mark the data as read-only if it will be sent to more than one read-only consumer. + if len(tsc.readonly) > 1 && !td.IsReadOnly() { + td.MarkReadOnly() } - return &tracesRouter{ - Traces: NewTraces(consumers), - consumers: cm, + for _, tc := range tsc.readonly { + errs = multierr.Append(errs, tc.ConsumeTraces(ctx, td)) } -} -func (r *tracesRouter) PipelineIDs() []component.ID { - ids := make([]component.ID, 0, len(r.consumers)) - for id := range r.consumers { - ids = append(ids, id) - } - return ids + return errs } -func (r *tracesRouter) Consumer(pipelineIDs ...component.ID) (consumer.Traces, error) { - if len(pipelineIDs) == 0 { - return nil, fmt.Errorf("missing consumers") - } - consumers := make([]consumer.Traces, 0, len(pipelineIDs)) - var errors error - for _, pipelineID := range pipelineIDs { - c, ok := r.consumers[pipelineID] - if ok { - consumers = append(consumers, c) - } else { - errors = multierr.Append(errors, fmt.Errorf("missing consumer: %q", pipelineID)) - } - } - if errors != nil { - // TODO potentially this could return a NewTraces with the valid consumers - return nil, errors - } - return NewTraces(consumers), nil +func cloneTraces(td ptrace.Traces) ptrace.Traces { + clonedTraces := ptrace.NewTraces() + td.CopyTo(clonedTraces) + return clonedTraces } diff --git a/internal/fanoutconsumer/traces_test.go b/internal/fanoutconsumer/traces_test.go index d2147b36167..120c6524715 100644 --- a/internal/fanoutconsumer/traces_test.go +++ b/internal/fanoutconsumer/traces_test.go @@ -6,18 +6,13 @@ package fanoutconsumer import ( "context" "errors" - "fmt" - "strconv" "testing" "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/connector" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/internal/testdata" - "go.opentelemetry.io/collector/pdata/ptrace" ) func TestTracesNotMultiplexing(t *testing.T) { @@ -26,6 +21,12 @@ func TestTracesNotMultiplexing(t *testing.T) { assert.Same(t, nop, tfc) } +func TestTracesNotMultiplexingMutating(t *testing.T) { + p := &mutatingTracesSink{TracesSink: new(consumertest.TracesSink)} + lfc := NewTraces([]consumer.Traces{p}) + assert.True(t, lfc.Capabilities().MutatesData) +} + func TestTracesMultiplexingNonMutating(t *testing.T) { p1 := new(consumertest.TracesSink) p2 := new(consumertest.TracesSink) @@ -57,6 +58,9 @@ func TestTracesMultiplexingNonMutating(t *testing.T) { assert.True(t, td == p3.AllTraces()[1]) assert.EqualValues(t, td, p3.AllTraces()[0]) assert.EqualValues(t, td, p3.AllTraces()[1]) + + // The data should be marked as read only. + assert.True(t, td.IsReadOnly()) } func TestTracesMultiplexingMutating(t *testing.T) { @@ -65,7 +69,7 @@ func TestTracesMultiplexingMutating(t *testing.T) { p3 := &mutatingTracesSink{TracesSink: new(consumertest.TracesSink)} tfc := NewTraces([]consumer.Traces{p1, p2, p3}) - assert.False(t, tfc.Capabilities().MutatesData) + assert.True(t, tfc.Capabilities().MutatesData) td := testdata.GenerateTraces(1) for i := 0; i < 2; i++ { @@ -91,6 +95,47 @@ func TestTracesMultiplexingMutating(t *testing.T) { assert.True(t, td == p3.AllTraces()[1]) assert.EqualValues(t, td, p3.AllTraces()[0]) assert.EqualValues(t, td, p3.AllTraces()[1]) + + // The data should not be marked as read only. + assert.False(t, td.IsReadOnly()) +} + +func TestReadOnlyTracesMultiplexingMutating(t *testing.T) { + p1 := &mutatingTracesSink{TracesSink: new(consumertest.TracesSink)} + p2 := &mutatingTracesSink{TracesSink: new(consumertest.TracesSink)} + p3 := &mutatingTracesSink{TracesSink: new(consumertest.TracesSink)} + + tfc := NewTraces([]consumer.Traces{p1, p2, p3}) + assert.True(t, tfc.Capabilities().MutatesData) + + tdOrig := testdata.GenerateTraces(1) + td := testdata.GenerateTraces(1) + td.MarkReadOnly() + + for i := 0; i < 2; i++ { + err := tfc.ConsumeTraces(context.Background(), td) + if err != nil { + t.Errorf("Wanted nil got error") + return + } + } + + // All consumers should receive the cloned data. + + assert.True(t, td != p1.AllTraces()[0]) + assert.True(t, td != p1.AllTraces()[1]) + assert.EqualValues(t, tdOrig, p1.AllTraces()[0]) + assert.EqualValues(t, tdOrig, p1.AllTraces()[1]) + + assert.True(t, td != p2.AllTraces()[0]) + assert.True(t, td != p2.AllTraces()[1]) + assert.EqualValues(t, tdOrig, p2.AllTraces()[0]) + assert.EqualValues(t, tdOrig, p2.AllTraces()[1]) + + assert.True(t, td != p3.AllTraces()[0]) + assert.True(t, td != p3.AllTraces()[1]) + assert.EqualValues(t, tdOrig, p3.AllTraces()[0]) + assert.EqualValues(t, tdOrig, p3.AllTraces()[1]) } func TestTracesMultiplexingMixLastMutating(t *testing.T) { @@ -126,6 +171,9 @@ func TestTracesMultiplexingMixLastMutating(t *testing.T) { assert.True(t, td != p3.AllTraces()[1]) assert.EqualValues(t, td, p3.AllTraces()[0]) assert.EqualValues(t, td, p3.AllTraces()[1]) + + // The data should not be marked as read only. + assert.False(t, td.IsReadOnly()) } func TestTracesMultiplexingMixLastNonMutating(t *testing.T) { @@ -160,6 +208,9 @@ func TestTracesMultiplexingMixLastNonMutating(t *testing.T) { assert.True(t, td == p3.AllTraces()[1]) assert.EqualValues(t, td, p3.AllTraces()[0]) assert.EqualValues(t, td, p3.AllTraces()[1]) + + // The data should not be marked as read only. + assert.False(t, td.IsReadOnly()) } func TestTracesWhenErrors(t *testing.T) { @@ -187,132 +238,3 @@ type mutatingTracesSink struct { func (mts *mutatingTracesSink) Capabilities() consumer.Capabilities { return consumer.Capabilities{MutatesData: true} } - -func TestTracesRouterMultiplexing(t *testing.T) { - var max = 20 - for numIDs := 1; numIDs < max; numIDs++ { - for numCons := 1; numCons < max; numCons++ { - for numTraces := 1; numTraces < max; numTraces++ { - t.Run( - fmt.Sprintf("%d-ids/%d-cons/%d-logs", numIDs, numCons, numTraces), - fuzzTracesRouter(numIDs, numCons, numTraces), - ) - } - } - } -} - -func fuzzTracesRouter(numIDs, numCons, numTraces int) func(*testing.T) { - return func(t *testing.T) { - allIDs := make([]component.ID, 0, numCons) - allCons := make([]consumer.Traces, 0, numCons) - allConsMap := make(map[component.ID]consumer.Traces) - - // If any consumer is mutating, the router must report mutating - for i := 0; i < numCons; i++ { - allIDs = append(allIDs, component.NewIDWithName("sink", strconv.Itoa(numCons))) - // Random chance for each consumer to be mutating - if (numCons+numTraces+i)%4 == 0 { - allCons = append(allCons, &mutatingTracesSink{TracesSink: new(consumertest.TracesSink)}) - } else { - allCons = append(allCons, new(consumertest.TracesSink)) - } - allConsMap[allIDs[i]] = allCons[i] - } - - r := NewTracesRouter(allConsMap).(connector.TracesRouter) - td := testdata.GenerateTraces(1) - - // Keep track of how many logs each consumer should receive. - // This will be validated after every call to RouteTraces. - expected := make(map[component.ID]int, numCons) - - for i := 0; i < numTraces; i++ { - // Build a random set of ids (no duplicates) - randCons := make(map[component.ID]bool, numIDs) - for j := 0; j < numIDs; j++ { - // This number should be pretty random and less than numCons - conNum := (numCons + numIDs + i + j) % numCons - randCons[allIDs[conNum]] = true - } - - // Convert to slice, update expectations - conIDs := make([]component.ID, 0, len(randCons)) - for id := range randCons { - conIDs = append(conIDs, id) - expected[id]++ - } - - // Route to list of consumers - fanout, err := r.Consumer(conIDs...) - assert.NoError(t, err) - assert.NoError(t, fanout.ConsumeTraces(context.Background(), td)) - - // Validate expectations for all consumers - for id := range expected { - traces := []ptrace.Traces{} - switch con := allConsMap[id].(type) { - case *consumertest.TracesSink: - traces = con.AllTraces() - case *mutatingTracesSink: - traces = con.AllTraces() - } - assert.Len(t, traces, expected[id]) - for n := 0; n < len(traces); n++ { - assert.EqualValues(t, td, traces[n]) - } - } - } - } -} - -func TestTracesRouterGetConsumer(t *testing.T) { - ctx := context.Background() - td := testdata.GenerateTraces(1) - - fooID := component.NewID("foo") - barID := component.NewID("bar") - - foo := new(consumertest.TracesSink) - bar := new(consumertest.TracesSink) - r := NewTracesRouter(map[component.ID]consumer.Traces{fooID: foo, barID: bar}).(connector.TracesRouter) - - rcs := r.PipelineIDs() - assert.Len(t, rcs, 2) - assert.ElementsMatch(t, []component.ID{fooID, barID}, rcs) - - assert.Len(t, foo.AllTraces(), 0) - assert.Len(t, bar.AllTraces(), 0) - - both, err := r.Consumer(fooID, barID) - assert.NotNil(t, both) - assert.NoError(t, err) - - assert.NoError(t, both.ConsumeTraces(ctx, td)) - assert.Len(t, foo.AllTraces(), 1) - assert.Len(t, bar.AllTraces(), 1) - - fooOnly, err := r.Consumer(fooID) - assert.NotNil(t, fooOnly) - assert.NoError(t, err) - - assert.NoError(t, fooOnly.ConsumeTraces(ctx, td)) - assert.Len(t, foo.AllTraces(), 2) - assert.Len(t, bar.AllTraces(), 1) - - barOnly, err := r.Consumer(barID) - assert.NotNil(t, barOnly) - assert.NoError(t, err) - - assert.NoError(t, barOnly.ConsumeTraces(ctx, td)) - assert.Len(t, foo.AllTraces(), 2) - assert.Len(t, bar.AllTraces(), 2) - - none, err := r.Consumer() - assert.Nil(t, none) - assert.Error(t, err) - - fake, err := r.Consumer(component.NewID("fake")) - assert.Nil(t, fake) - assert.Error(t, err) -} diff --git a/internal/iruntime/package_test.go b/internal/iruntime/package_test.go new file mode 100644 index 00000000000..1c0d898aae7 --- /dev/null +++ b/internal/iruntime/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package iruntime + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/iruntime/total_memory_linux.go b/internal/iruntime/total_memory_linux.go index a804cbdbed3..0b53d7a604a 100644 --- a/internal/iruntime/total_memory_linux.go +++ b/internal/iruntime/total_memory_linux.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build linux -// +build linux package iruntime // import "go.opentelemetry.io/collector/internal/iruntime" diff --git a/internal/iruntime/total_memory_linux_test.go b/internal/iruntime/total_memory_linux_test.go index 0a3db2786ec..563f3942207 100644 --- a/internal/iruntime/total_memory_linux_test.go +++ b/internal/iruntime/total_memory_linux_test.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build linux -// +build linux package iruntime diff --git a/internal/iruntime/total_memory_other.go b/internal/iruntime/total_memory_other.go index 00b7116981e..8edb5915d64 100644 --- a/internal/iruntime/total_memory_other.go +++ b/internal/iruntime/total_memory_other.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build !linux -// +build !linux package iruntime // import "go.opentelemetry.io/collector/internal/iruntime" diff --git a/internal/iruntime/total_memory_other_test.go b/internal/iruntime/total_memory_other_test.go index 19d6f997a6c..5b1d9115827 100644 --- a/internal/iruntime/total_memory_other_test.go +++ b/internal/iruntime/total_memory_other_test.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build !linux -// +build !linux package iruntime diff --git a/internal/localhostgate/featuregate.go b/internal/localhostgate/featuregate.go new file mode 100644 index 00000000000..e1b02fca044 --- /dev/null +++ b/internal/localhostgate/featuregate.go @@ -0,0 +1,68 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// package localhostgate defines a feature gate that controls whether server-like receivers and extensions use localhost as the default host for their endpoints. +// This package is duplicated across core and contrib to avoid exposing the feature gate as part of the public API. +// To do this we define a `registerOrLoad` helper and try to register the gate in both modules. +// IMPORTANT NOTE: ANY CHANGES TO THIS PACKAGE MUST BE MIRRORED IN THE CONTRIB COUNTERPART. +package localhostgate // import "go.opentelemetry.io/collector/internal/localhostgate" + +import ( + "errors" + "fmt" + + "go.uber.org/zap" + + "go.opentelemetry.io/collector/featuregate" +) + +const UseLocalHostAsDefaultHostID = "component.UseLocalHostAsDefaultHost" + +// useLocalHostAsDefaultHostfeatureGate is the feature gate that controls whether +// server-like receivers and extensions such as the OTLP receiver use localhost as the default host for their endpoints. +var useLocalHostAsDefaultHostfeatureGate = mustRegisterOrLoad( + featuregate.GlobalRegistry(), + UseLocalHostAsDefaultHostID, + featuregate.StageAlpha, + featuregate.WithRegisterDescription("controls whether server-like receivers and extensions such as the OTLP receiver use localhost as the default host for their endpoints"), +) + +// mustRegisterOrLoad tries to register the feature gate and loads it if it already exists. +// It panics on any other error. +func mustRegisterOrLoad(reg *featuregate.Registry, id string, stage featuregate.Stage, opts ...featuregate.RegisterOption) *featuregate.Gate { + gate, err := reg.Register(id, stage, opts...) + + if errors.Is(err, featuregate.ErrAlreadyRegistered) { + // Gate is already registered; find it. + // Only a handful of feature gates are registered, so it's fine to iterate over all of them. + reg.VisitAll(func(g *featuregate.Gate) { + if g.ID() == id { + gate = g + return + } + }) + } else if err != nil { + panic(err) + } + + return gate +} + +// EndpointForPort gets the endpoint for a given port using localhost or 0.0.0.0 depending on the feature gate. +func EndpointForPort(port int) string { + host := "localhost" + if !useLocalHostAsDefaultHostfeatureGate.IsEnabled() { + host = "0.0.0.0" + } + return fmt.Sprintf("%s:%d", host, port) +} + +// LogAboutUseLocalHostAsDefault logs about the upcoming change from 0.0.0.0 to localhost on server-like components. +func LogAboutUseLocalHostAsDefault(logger *zap.Logger) { + if !useLocalHostAsDefaultHostfeatureGate.IsEnabled() { + logger.Warn( + "The default endpoints for all servers in components will change to use localhost instead of 0.0.0.0 in a future version. Use the feature gate to preview the new default.", + zap.String("feature gate ID", UseLocalHostAsDefaultHostID), + ) + } +} diff --git a/internal/localhostgate/featuregate_test.go b/internal/localhostgate/featuregate_test.go new file mode 100644 index 00000000000..ef09519ac9c --- /dev/null +++ b/internal/localhostgate/featuregate_test.go @@ -0,0 +1,57 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package localhostgate + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/featuregate" +) + +func setFeatureGateForTest(t testing.TB, gate *featuregate.Gate, enabled bool) func() { + originalValue := gate.IsEnabled() + require.NoError(t, featuregate.GlobalRegistry().Set(gate.ID(), enabled)) + return func() { + require.NoError(t, featuregate.GlobalRegistry().Set(gate.ID(), originalValue)) + } +} + +func TestEndpointForPort(t *testing.T) { + tests := []struct { + port int + enabled bool + endpoint string + }{ + { + port: 4317, + enabled: false, + endpoint: "0.0.0.0:4317", + }, + { + port: 4317, + enabled: true, + endpoint: "localhost:4317", + }, + { + port: 0, + enabled: false, + endpoint: "0.0.0.0:0", + }, + { + port: 0, + enabled: true, + endpoint: "localhost:0", + }, + } + + for _, tt := range tests { + t.Run(tt.endpoint, func(t *testing.T) { + defer setFeatureGateForTest(t, useLocalHostAsDefaultHostfeatureGate, tt.enabled)() + assert.Equal(t, EndpointForPort(tt.port), tt.endpoint) + }) + } +} diff --git a/internal/memorylimiter/config.go b/internal/memorylimiter/config.go new file mode 100644 index 00000000000..bb20ad6565a --- /dev/null +++ b/internal/memorylimiter/config.go @@ -0,0 +1,66 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package memorylimiter // import "go.opentelemetry.io/collector/internal/memorylimiter" + +import ( + "errors" + "time" + + "go.opentelemetry.io/collector/component" +) + +var ( + errCheckIntervalOutOfRange = errors.New("'check_interval' must be greater than zero") + errLimitOutOfRange = errors.New("'limit_mib' or 'limit_percentage' must be greater than zero") + errSpikeLimitOutOfRange = errors.New("'spike_limit_mib' must be smaller than 'limit_mib'") + errSpikeLimitPercentageOutOfRange = errors.New("'spike_limit_percentage' must be smaller than 'limit_percentage'") + errLimitPercentageOutOfRange = errors.New( + "'limit_percentage' and 'spike_limit_percentage' must be greater than zero and less than or equal to hundred") +) + +// Config defines configuration for memory memoryLimiter processor. +type Config struct { + // CheckInterval is the time between measurements of memory usage for the + // purposes of avoiding going over the limits. Defaults to zero, so no + // checks will be performed. + CheckInterval time.Duration `mapstructure:"check_interval"` + + // MemoryLimitMiB is the maximum amount of memory, in MiB, targeted to be + // allocated by the process. + MemoryLimitMiB uint32 `mapstructure:"limit_mib"` + + // MemorySpikeLimitMiB is the maximum, in MiB, spike expected between the + // measurements of memory usage. + MemorySpikeLimitMiB uint32 `mapstructure:"spike_limit_mib"` + + // MemoryLimitPercentage is the maximum amount of memory, in %, targeted to be + // allocated by the process. The fixed memory settings MemoryLimitMiB has a higher precedence. + MemoryLimitPercentage uint32 `mapstructure:"limit_percentage"` + + // MemorySpikePercentage is the maximum, in percents against the total memory, + // spike expected between the measurements of memory usage. + MemorySpikePercentage uint32 `mapstructure:"spike_limit_percentage"` +} + +var _ component.Config = (*Config)(nil) + +// Validate checks if the processor configuration is valid +func (cfg *Config) Validate() error { + if cfg.CheckInterval <= 0 { + return errCheckIntervalOutOfRange + } + if cfg.MemoryLimitMiB == 0 && cfg.MemoryLimitPercentage == 0 { + return errLimitOutOfRange + } + if cfg.MemoryLimitPercentage > 100 || cfg.MemorySpikePercentage > 100 { + return errLimitPercentageOutOfRange + } + if cfg.MemoryLimitMiB > 0 && cfg.MemoryLimitMiB <= cfg.MemorySpikeLimitMiB { + return errSpikeLimitOutOfRange + } + if cfg.MemoryLimitPercentage > 0 && cfg.MemoryLimitPercentage <= cfg.MemorySpikePercentage { + return errSpikeLimitPercentageOutOfRange + } + return nil +} diff --git a/internal/memorylimiter/config_test.go b/internal/memorylimiter/config_test.go new file mode 100644 index 00000000000..ca7a243f861 --- /dev/null +++ b/internal/memorylimiter/config_test.go @@ -0,0 +1,95 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package memorylimiter + +import ( + "path/filepath" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap/confmaptest" +) + +func TestUnmarshalConfig(t *testing.T) { + cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) + require.NoError(t, err) + cfg := &Config{} + assert.NoError(t, component.UnmarshalConfig(cm, cfg)) + assert.Equal(t, + &Config{ + CheckInterval: 5 * time.Second, + MemoryLimitMiB: 4000, + MemorySpikeLimitMiB: 500, + }, cfg) +} + +func TestConfigValidate(t *testing.T) { + tests := []struct { + name string + cfg *Config + err error + }{ + { + name: "valid", + cfg: &Config{ + MemoryLimitMiB: 5722, + MemorySpikeLimitMiB: 1907, + CheckInterval: 100 * time.Millisecond, + }, + err: nil, + }, + { + name: "zero check interval", + cfg: &Config{ + CheckInterval: 0, + }, + err: errCheckIntervalOutOfRange, + }, + { + name: "unset memory limit", + cfg: &Config{ + CheckInterval: 1 * time.Second, + MemoryLimitMiB: 0, + MemoryLimitPercentage: 0, + }, + err: errLimitOutOfRange, + }, + { + name: "invalid memory spike limit", + cfg: &Config{ + CheckInterval: 1 * time.Second, + MemoryLimitMiB: 10, + MemorySpikeLimitMiB: 10, + }, + err: errSpikeLimitOutOfRange, + }, + { + name: "invalid memory percentage limit", + cfg: &Config{ + CheckInterval: 1 * time.Second, + MemoryLimitPercentage: 101, + }, + err: errLimitPercentageOutOfRange, + }, + { + name: "invalid memory spike percentage limit", + cfg: &Config{ + CheckInterval: 1 * time.Second, + MemoryLimitPercentage: 50, + MemorySpikePercentage: 60, + }, + err: errSpikeLimitPercentageOutOfRange, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := tt.cfg.Validate() + assert.Equal(t, tt.err, err) + }) + } +} diff --git a/internal/memorylimiter/memorylimiter.go b/internal/memorylimiter/memorylimiter.go new file mode 100644 index 00000000000..a010cba5427 --- /dev/null +++ b/internal/memorylimiter/memorylimiter.go @@ -0,0 +1,262 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package memorylimiter // import "go.opentelemetry.io/collector/internal/memorylimiter" + +import ( + "context" + "errors" + "fmt" + "runtime" + "sync" + "sync/atomic" + "time" + + "go.uber.org/zap" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/internal/iruntime" +) + +const ( + mibBytes = 1024 * 1024 + + // Minimum interval between forced GC when in soft limited mode. We don't want to + // do GCs too frequently since it is a CPU-heavy operation. + minGCIntervalWhenSoftLimited = 10 * time.Second +) + +var ( + // ErrDataRefused will be returned to callers of ConsumeTraceData to indicate + // that data is being refused due to high memory usage. + ErrDataRefused = errors.New("data refused due to high memory usage") + + // ErrShutdownNotStarted indicates no memorylimiter has not start when shutdown + ErrShutdownNotStarted = errors.New("no existing monitoring routine is running") + + // GetMemoryFn and ReadMemStatsFn make it overridable by tests + GetMemoryFn = iruntime.TotalMemory + ReadMemStatsFn = runtime.ReadMemStats +) + +// MemoryLimiter is used to prevent out of memory situations on the collector. +type MemoryLimiter struct { + usageChecker memUsageChecker + + memCheckWait time.Duration + ballastSize uint64 + + // mustRefuse is used to indicate when data should be refused. + mustRefuse *atomic.Bool + + ticker *time.Ticker + + lastGCDone time.Time + + // The function to read the mem values is set as a reference to help with + // testing different values. + readMemStatsFn func(m *runtime.MemStats) + + // Fields used for logging. + logger *zap.Logger + configMismatchedLogged bool + + refCounterLock sync.Mutex + refCounter int + waitGroup sync.WaitGroup + closed chan struct{} +} + +// NewMemoryLimiter returns a new memory limiter component +func NewMemoryLimiter(cfg *Config, logger *zap.Logger) (*MemoryLimiter, error) { + usageChecker, err := getMemUsageChecker(cfg, logger) + if err != nil { + return nil, err + } + + logger.Info("Memory limiter configured", + zap.Uint64("limit_mib", usageChecker.memAllocLimit/mibBytes), + zap.Uint64("spike_limit_mib", usageChecker.memSpikeLimit/mibBytes), + zap.Duration("check_interval", cfg.CheckInterval)) + + return &MemoryLimiter{ + usageChecker: *usageChecker, + memCheckWait: cfg.CheckInterval, + ticker: time.NewTicker(cfg.CheckInterval), + readMemStatsFn: ReadMemStatsFn, + logger: logger, + mustRefuse: &atomic.Bool{}, + }, nil +} + +// startMonitoring starts a single ticker'd goroutine per instance +// that will check memory usage every checkInterval period. +func (ml *MemoryLimiter) startMonitoring() { + ml.refCounterLock.Lock() + defer ml.refCounterLock.Unlock() + + ml.refCounter++ + if ml.refCounter == 1 { + ml.closed = make(chan struct{}) + ml.waitGroup.Add(1) + go func() { + defer ml.waitGroup.Done() + + for { + select { + case <-ml.ticker.C: + case <-ml.closed: + return + } + ml.CheckMemLimits() + } + }() + } +} + +func (ml *MemoryLimiter) Start(_ context.Context, host component.Host) error { + extensions := host.GetExtensions() + for _, extension := range extensions { + if ext, ok := extension.(interface{ GetBallastSize() uint64 }); ok { + ml.ballastSize = ext.GetBallastSize() + break + } + } + ml.startMonitoring() + return nil +} + +// Shutdown resets MemoryLimiter monitoring ticker and stop monitoring +func (ml *MemoryLimiter) Shutdown(context.Context) error { + ml.refCounterLock.Lock() + defer ml.refCounterLock.Unlock() + + if ml.refCounter == 0 { + return ErrShutdownNotStarted + } else if ml.refCounter == 1 { + ml.ticker.Stop() + close(ml.closed) + ml.waitGroup.Wait() + } + ml.refCounter-- + return nil +} + +// MustRefuse returns if the caller should deny because memory has reached it's configured limits +func (ml *MemoryLimiter) MustRefuse() bool { + return ml.mustRefuse.Load() +} + +func getMemUsageChecker(cfg *Config, logger *zap.Logger) (*memUsageChecker, error) { + memAllocLimit := uint64(cfg.MemoryLimitMiB) * mibBytes + memSpikeLimit := uint64(cfg.MemorySpikeLimitMiB) * mibBytes + if cfg.MemoryLimitMiB != 0 { + return newFixedMemUsageChecker(memAllocLimit, memSpikeLimit), nil + } + totalMemory, err := GetMemoryFn() + if err != nil { + return nil, fmt.Errorf("failed to get total memory, use fixed memory settings (limit_mib): %w", err) + } + logger.Info("Using percentage memory limiter", + zap.Uint64("total_memory_mib", totalMemory/mibBytes), + zap.Uint32("limit_percentage", cfg.MemoryLimitPercentage), + zap.Uint32("spike_limit_percentage", cfg.MemorySpikePercentage)) + return newPercentageMemUsageChecker(totalMemory, uint64(cfg.MemoryLimitPercentage), + uint64(cfg.MemorySpikePercentage)), nil +} + +func (ml *MemoryLimiter) readMemStats() *runtime.MemStats { + ms := &runtime.MemStats{} + ml.readMemStatsFn(ms) + // If proper configured ms.Alloc should be at least ml.ballastSize but since + // a misconfiguration is possible check for that here. + if ms.Alloc >= ml.ballastSize { + ms.Alloc -= ml.ballastSize + } else if !ml.configMismatchedLogged { + // This indicates misconfiguration. Log it once. + ml.configMismatchedLogged = true + ml.logger.Warn(`"size_mib" in ballast extension is likely incorrectly configured.`) + } + + return ms +} + +func memstatToZapField(ms *runtime.MemStats) zap.Field { + return zap.Uint64("cur_mem_mib", ms.Alloc/mibBytes) +} + +func (ml *MemoryLimiter) doGCandReadMemStats() *runtime.MemStats { + runtime.GC() + ml.lastGCDone = time.Now() + ms := ml.readMemStats() + ml.logger.Info("Memory usage after GC.", memstatToZapField(ms)) + return ms +} + +// CheckMemLimits inspects current memory usage against threshold and toggle mustRefuse when threshold is exceeded +func (ml *MemoryLimiter) CheckMemLimits() { + ms := ml.readMemStats() + + ml.logger.Debug("Currently used memory.", memstatToZapField(ms)) + + if ml.usageChecker.aboveHardLimit(ms) { + ml.logger.Warn("Memory usage is above hard limit. Forcing a GC.", memstatToZapField(ms)) + ms = ml.doGCandReadMemStats() + } + + // Remember current state. + wasRefusing := ml.mustRefuse.Load() + + // Check if the memory usage is above the soft limit. + mustRefuse := ml.usageChecker.aboveSoftLimit(ms) + + if wasRefusing && !mustRefuse { + // Was previously refusing but enough memory is available now, no need to limit. + ml.logger.Info("Memory usage back within limits. Resuming normal operation.", memstatToZapField(ms)) + } + + if !wasRefusing && mustRefuse { + // We are above soft limit, do a GC if it wasn't done recently and see if + // it brings memory usage below the soft limit. + if time.Since(ml.lastGCDone) > minGCIntervalWhenSoftLimited { + ml.logger.Info("Memory usage is above soft limit. Forcing a GC.", memstatToZapField(ms)) + ms = ml.doGCandReadMemStats() + // Check the limit again to see if GC helped. + mustRefuse = ml.usageChecker.aboveSoftLimit(ms) + } + + if mustRefuse { + ml.logger.Warn("Memory usage is above soft limit. Refusing data.", memstatToZapField(ms)) + } + } + + ml.mustRefuse.Store(mustRefuse) +} + +type memUsageChecker struct { + memAllocLimit uint64 + memSpikeLimit uint64 +} + +func (d memUsageChecker) aboveSoftLimit(ms *runtime.MemStats) bool { + return ms.Alloc >= d.memAllocLimit-d.memSpikeLimit +} + +func (d memUsageChecker) aboveHardLimit(ms *runtime.MemStats) bool { + return ms.Alloc >= d.memAllocLimit +} + +func newFixedMemUsageChecker(memAllocLimit, memSpikeLimit uint64) *memUsageChecker { + if memSpikeLimit == 0 { + // If spike limit is unspecified use 20% of mem limit. + memSpikeLimit = memAllocLimit / 5 + } + return &memUsageChecker{ + memAllocLimit: memAllocLimit, + memSpikeLimit: memSpikeLimit, + } +} + +func newPercentageMemUsageChecker(totalMemory uint64, percentageLimit, percentageSpike uint64) *memUsageChecker { + return newFixedMemUsageChecker(percentageLimit*totalMemory/100, percentageSpike*totalMemory/100) +} diff --git a/internal/memorylimiter/memorylimiter_test.go b/internal/memorylimiter/memorylimiter_test.go new file mode 100644 index 00000000000..e9e92a33f70 --- /dev/null +++ b/internal/memorylimiter/memorylimiter_test.go @@ -0,0 +1,188 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package memorylimiter + +import ( + "context" + "runtime" + "sync/atomic" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.uber.org/zap" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/internal/iruntime" +) + +// TestMemoryPressureResponse manipulates results from querying memory and +// check expected side effects. +func TestMemoryPressureResponse(t *testing.T) { + var currentMemAlloc uint64 + ml := &MemoryLimiter{ + usageChecker: memUsageChecker{ + memAllocLimit: 1024, + }, + mustRefuse: &atomic.Bool{}, + readMemStatsFn: func(ms *runtime.MemStats) { + ms.Alloc = currentMemAlloc + }, + logger: zap.NewNop(), + } + + // Below memAllocLimit. + currentMemAlloc = 800 + ml.CheckMemLimits() + assert.False(t, ml.MustRefuse()) + + // Above memAllocLimit. + currentMemAlloc = 1800 + ml.CheckMemLimits() + assert.True(t, ml.MustRefuse()) + + // Check ballast effect + ml.ballastSize = 1000 + + // Below memAllocLimit accounting for ballast. + currentMemAlloc = 800 + ml.ballastSize + ml.CheckMemLimits() + assert.False(t, ml.MustRefuse()) + + // Above memAllocLimit even accounting for ballast. + currentMemAlloc = 1800 + ml.ballastSize + ml.CheckMemLimits() + assert.True(t, ml.MustRefuse()) + + // Restore ballast to default. + ml.ballastSize = 0 + + // Check spike limit + ml.usageChecker.memSpikeLimit = 512 + + // Below memSpikeLimit. + currentMemAlloc = 500 + ml.CheckMemLimits() + assert.False(t, ml.MustRefuse()) + + // Above memSpikeLimit. + currentMemAlloc = 550 + ml.CheckMemLimits() + assert.True(t, ml.MustRefuse()) +} + +func TestGetDecision(t *testing.T) { + t.Run("fixed_limit", func(t *testing.T) { + d, err := getMemUsageChecker(&Config{MemoryLimitMiB: 100, MemorySpikeLimitMiB: 20}, zap.NewNop()) + require.NoError(t, err) + assert.Equal(t, &memUsageChecker{ + memAllocLimit: 100 * mibBytes, + memSpikeLimit: 20 * mibBytes, + }, d) + }) + + t.Cleanup(func() { + GetMemoryFn = iruntime.TotalMemory + }) + GetMemoryFn = func() (uint64, error) { + return 100 * mibBytes, nil + } + t.Run("percentage_limit", func(t *testing.T) { + d, err := getMemUsageChecker(&Config{MemoryLimitPercentage: 50, MemorySpikePercentage: 10}, zap.NewNop()) + require.NoError(t, err) + assert.Equal(t, &memUsageChecker{ + memAllocLimit: 50 * mibBytes, + memSpikeLimit: 10 * mibBytes, + }, d) + }) +} + +func TestRefuseDecision(t *testing.T) { + decison1000Limit30Spike30 := newPercentageMemUsageChecker(1000, 60, 30) + decison1000Limit60Spike50 := newPercentageMemUsageChecker(1000, 60, 50) + decison1000Limit40Spike20 := newPercentageMemUsageChecker(1000, 40, 20) + + tests := []struct { + name string + usageChecker memUsageChecker + ms *runtime.MemStats + shouldRefuse bool + }{ + { + name: "should refuse over limit", + usageChecker: *decison1000Limit30Spike30, + ms: &runtime.MemStats{Alloc: 600}, + shouldRefuse: true, + }, + { + name: "should not refuse", + usageChecker: *decison1000Limit30Spike30, + ms: &runtime.MemStats{Alloc: 100}, + shouldRefuse: false, + }, + { + name: "should not refuse spike, fixed usageChecker", + usageChecker: memUsageChecker{ + memAllocLimit: 600, + memSpikeLimit: 500, + }, + ms: &runtime.MemStats{Alloc: 300}, + shouldRefuse: true, + }, + { + name: "should refuse, spike, percentage usageChecker", + usageChecker: *decison1000Limit60Spike50, + ms: &runtime.MemStats{Alloc: 300}, + shouldRefuse: true, + }, + { + name: "should refuse, spike, percentage usageChecker", + usageChecker: *decison1000Limit40Spike20, + ms: &runtime.MemStats{Alloc: 250}, + shouldRefuse: true, + }, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + shouldRefuse := test.usageChecker.aboveSoftLimit(test.ms) + assert.Equal(t, test.shouldRefuse, shouldRefuse) + }) + } +} + +func TestBallastSize(t *testing.T) { + cfg := &Config{ + CheckInterval: 10 * time.Second, + MemoryLimitMiB: 1024, + } + got, err := NewMemoryLimiter(cfg, zap.NewNop()) + require.NoError(t, err) + + got.startMonitoring() + require.NoError(t, got.Start(context.Background(), &host{ballastSize: 113})) + assert.Equal(t, uint64(113), got.ballastSize) + require.NoError(t, got.Shutdown(context.Background())) +} + +type host struct { + ballastSize uint64 + component.Host +} + +func (h *host) GetExtensions() map[component.ID]component.Component { + ret := make(map[component.ID]component.Component) + ret[component.MustNewID("ballast")] = &ballastExtension{ballastSize: h.ballastSize} + return ret +} + +type ballastExtension struct { + ballastSize uint64 + component.StartFunc + component.ShutdownFunc +} + +func (be *ballastExtension) GetBallastSize() uint64 { + return be.ballastSize +} diff --git a/processor/memorylimiterprocessor/testdata/config.yaml b/internal/memorylimiter/testdata/config.yaml similarity index 100% rename from processor/memorylimiterprocessor/testdata/config.yaml rename to internal/memorylimiter/testdata/config.yaml diff --git a/internal/obsreportconfig/obsmetrics/obs_exporter.go b/internal/obsreportconfig/obsmetrics/obs_exporter.go index 9ecebf2d9b4..50a2724070c 100644 --- a/internal/obsreportconfig/obsmetrics/obs_exporter.go +++ b/internal/obsreportconfig/obsmetrics/obs_exporter.go @@ -3,11 +3,6 @@ package obsmetrics // import "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" -import ( - "go.opencensus.io/stats" - "go.opencensus.io/tag" -) - const ( // ExporterKey used to identify exporters in metrics and traces. ExporterKey = "exporter" @@ -16,53 +11,27 @@ const ( SentSpansKey = "sent_spans" // FailedToSendSpansKey used to track spans that failed to be sent by exporters. FailedToSendSpansKey = "send_failed_spans" + // FailedToEnqueueSpansKey used to track spans that failed to be enqueued by exporters. + FailedToEnqueueSpansKey = "enqueue_failed_spans" // SentMetricPointsKey used to track metric points sent by exporters. SentMetricPointsKey = "sent_metric_points" // FailedToSendMetricPointsKey used to track metric points that failed to be sent by exporters. FailedToSendMetricPointsKey = "send_failed_metric_points" + // FailedToEnqueueMetricPointsKey used to track metric points that failed to be enqueued by exporters. + FailedToEnqueueMetricPointsKey = "enqueue_failed_metric_points" // SentLogRecordsKey used to track logs sent by exporters. SentLogRecordsKey = "sent_log_records" // FailedToSendLogRecordsKey used to track logs that failed to be sent by exporters. FailedToSendLogRecordsKey = "send_failed_log_records" + // FailedToEnqueueLogRecordsKey used to track logs that failed to be enqueued by exporters. + FailedToEnqueueLogRecordsKey = "enqueue_failed_log_records" ) var ( - TagKeyExporter, _ = tag.NewKey(ExporterKey) - ExporterPrefix = ExporterKey + NameSep ExportTraceDataOperationSuffix = NameSep + "traces" ExportMetricsOperationSuffix = NameSep + "metrics" ExportLogsOperationSuffix = NameSep + "logs" - - // Exporter metrics. Any count of data items below is in the final format - // that they were sent, reasoning: reconciliation is easier if measurements - // on backend and exporter are expected to be the same. Translation issues - // that result in a different number of elements should be reported in a - // separate way. - ExporterSentSpans = stats.Int64( - ExporterPrefix+SentSpansKey, - "Number of spans successfully sent to destination.", - stats.UnitDimensionless) - ExporterFailedToSendSpans = stats.Int64( - ExporterPrefix+FailedToSendSpansKey, - "Number of spans in failed attempts to send to destination.", - stats.UnitDimensionless) - ExporterSentMetricPoints = stats.Int64( - ExporterPrefix+SentMetricPointsKey, - "Number of metric points successfully sent to destination.", - stats.UnitDimensionless) - ExporterFailedToSendMetricPoints = stats.Int64( - ExporterPrefix+FailedToSendMetricPointsKey, - "Number of metric points in failed attempts to send to destination.", - stats.UnitDimensionless) - ExporterSentLogRecords = stats.Int64( - ExporterPrefix+SentLogRecordsKey, - "Number of log record successfully sent to destination.", - stats.UnitDimensionless) - ExporterFailedToSendLogRecords = stats.Int64( - ExporterPrefix+FailedToSendLogRecordsKey, - "Number of log records in failed attempts to send to destination.", - stats.UnitDimensionless) ) diff --git a/internal/obsreportconfig/obsmetrics/obs_processor.go b/internal/obsreportconfig/obsmetrics/obs_processor.go index 40c8d698cb1..75084014ec5 100644 --- a/internal/obsreportconfig/obsmetrics/obs_processor.go +++ b/internal/obsreportconfig/obsmetrics/obs_processor.go @@ -3,11 +3,6 @@ package obsmetrics // import "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" -import ( - "go.opencensus.io/stats" - "go.opencensus.io/tag" -) - const ( // ProcessorKey is the key used to identify processors in metrics and traces. ProcessorKey = "processor" @@ -23,46 +18,5 @@ const ( ) var ( - TagKeyProcessor, _ = tag.NewKey(ProcessorKey) - ProcessorPrefix = ProcessorKey + NameSep - - // Processor metrics. Any count of data items below is in the internal format - // of the collector since processors only deal with internal format. - ProcessorAcceptedSpans = stats.Int64( - ProcessorPrefix+AcceptedSpansKey, - "Number of spans successfully pushed into the next component in the pipeline.", - stats.UnitDimensionless) - ProcessorRefusedSpans = stats.Int64( - ProcessorPrefix+RefusedSpansKey, - "Number of spans that were rejected by the next component in the pipeline.", - stats.UnitDimensionless) - ProcessorDroppedSpans = stats.Int64( - ProcessorPrefix+DroppedSpansKey, - "Number of spans that were dropped.", - stats.UnitDimensionless) - ProcessorAcceptedMetricPoints = stats.Int64( - ProcessorPrefix+AcceptedMetricPointsKey, - "Number of metric points successfully pushed into the next component in the pipeline.", - stats.UnitDimensionless) - ProcessorRefusedMetricPoints = stats.Int64( - ProcessorPrefix+RefusedMetricPointsKey, - "Number of metric points that were rejected by the next component in the pipeline.", - stats.UnitDimensionless) - ProcessorDroppedMetricPoints = stats.Int64( - ProcessorPrefix+DroppedMetricPointsKey, - "Number of metric points that were dropped.", - stats.UnitDimensionless) - ProcessorAcceptedLogRecords = stats.Int64( - ProcessorPrefix+AcceptedLogRecordsKey, - "Number of log records successfully pushed into the next component in the pipeline.", - stats.UnitDimensionless) - ProcessorRefusedLogRecords = stats.Int64( - ProcessorPrefix+RefusedLogRecordsKey, - "Number of log records that were rejected by the next component in the pipeline.", - stats.UnitDimensionless) - ProcessorDroppedLogRecords = stats.Int64( - ProcessorPrefix+DroppedLogRecordsKey, - "Number of log records that were dropped.", - stats.UnitDimensionless) ) diff --git a/internal/obsreportconfig/obsmetrics/obs_receiver.go b/internal/obsreportconfig/obsmetrics/obs_receiver.go index 0f380b4aa3f..d70148c1ff9 100644 --- a/internal/obsreportconfig/obsmetrics/obs_receiver.go +++ b/internal/obsreportconfig/obsmetrics/obs_receiver.go @@ -3,11 +3,6 @@ package obsmetrics // import "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" -import ( - "go.opencensus.io/stats" - "go.opencensus.io/tag" -) - const ( // ReceiverKey used to identify receivers in metrics and traces. ReceiverKey = "receiver" @@ -35,41 +30,8 @@ const ( ) var ( - TagKeyReceiver, _ = tag.NewKey(ReceiverKey) - TagKeyTransport, _ = tag.NewKey(TransportKey) - ReceiverPrefix = ReceiverKey + NameSep ReceiveTraceDataOperationSuffix = NameSep + "TraceDataReceived" ReceiverMetricsOperationSuffix = NameSep + "MetricsReceived" ReceiverLogsOperationSuffix = NameSep + "LogsReceived" - - // Receiver metrics. Any count of data items below is in the original format - // that they were received, reasoning: reconciliation is easier if measurement - // on clients and receiver are expected to be the same. Translation issues - // that result in a different number of elements should be reported in a - // separate way. - ReceiverAcceptedSpans = stats.Int64( - ReceiverPrefix+AcceptedSpansKey, - "Number of spans successfully pushed into the pipeline.", - stats.UnitDimensionless) - ReceiverRefusedSpans = stats.Int64( - ReceiverPrefix+RefusedSpansKey, - "Number of spans that could not be pushed into the pipeline.", - stats.UnitDimensionless) - ReceiverAcceptedMetricPoints = stats.Int64( - ReceiverPrefix+AcceptedMetricPointsKey, - "Number of metric points successfully pushed into the pipeline.", - stats.UnitDimensionless) - ReceiverRefusedMetricPoints = stats.Int64( - ReceiverPrefix+RefusedMetricPointsKey, - "Number of metric points that could not be pushed into the pipeline.", - stats.UnitDimensionless) - ReceiverAcceptedLogRecords = stats.Int64( - ReceiverPrefix+AcceptedLogRecordsKey, - "Number of log records successfully pushed into the pipeline.", - stats.UnitDimensionless) - ReceiverRefusedLogRecords = stats.Int64( - ReceiverPrefix+RefusedLogRecordsKey, - "Number of log records that could not be pushed into the pipeline.", - stats.UnitDimensionless) ) diff --git a/internal/obsreportconfig/obsmetrics/obs_scraper.go b/internal/obsreportconfig/obsmetrics/obs_scraper.go index 2beaebec78e..7e2b73d127f 100644 --- a/internal/obsreportconfig/obsmetrics/obs_scraper.go +++ b/internal/obsreportconfig/obsmetrics/obs_scraper.go @@ -3,11 +3,6 @@ package obsmetrics // import "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" -import ( - "go.opencensus.io/stats" - "go.opencensus.io/tag" -) - const ( // ScraperKey used to identify scrapers in metrics and traces. ScraperKey = "scraper" @@ -24,16 +19,3 @@ const ( ScraperPrefix = ScraperKey + NameSep ScraperMetricsOperationSuffix = NameSep + "MetricsScraped" ) - -var ( - TagKeyScraper, _ = tag.NewKey(ScraperKey) - - ScraperScrapedMetricPoints = stats.Int64( - ScraperPrefix+ScrapedMetricPointsKey, - "Number of metric points successfully scraped.", - stats.UnitDimensionless) - ScraperErroredMetricPoints = stats.Int64( - ScraperPrefix+ErroredMetricPointsKey, - "Number of metric points that were unable to be scraped.", - stats.UnitDimensionless) -) diff --git a/internal/obsreportconfig/obsreportconfig.go b/internal/obsreportconfig/obsreportconfig.go index 9b3bd1b8abf..aed6813460c 100644 --- a/internal/obsreportconfig/obsreportconfig.go +++ b/internal/obsreportconfig/obsreportconfig.go @@ -4,21 +4,16 @@ package obsreportconfig // import "go.opentelemetry.io/collector/internal/obsreportconfig" import ( - "go.opencensus.io/stats" - "go.opencensus.io/stats/view" - "go.opencensus.io/tag" - - "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/featuregate" - "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" ) // UseOtelForInternalMetricsfeatureGate is the feature gate that controls whether the collector uses open // telemetrySettings for internal metrics. var UseOtelForInternalMetricsfeatureGate = featuregate.GlobalRegistry().MustRegister( "telemetry.useOtelForInternalMetrics", - featuregate.StageAlpha, - featuregate.WithRegisterDescription("controls whether the collector uses OpenTelemetry for internal metrics")) + featuregate.StageStable, + featuregate.WithRegisterDescription("controls whether the collector uses OpenTelemetry for internal metrics"), + featuregate.WithRegisterToVersion("0.95.0")) // DisableHighCardinalityMetricsfeatureGate is the feature gate that controls whether the collector should enable // potentially high cardinality metrics. The gate will be removed when the collector allows for view configuration. @@ -35,109 +30,3 @@ var UseOtelWithSDKConfigurationForInternalTelemetryFeatureGate = featuregate.Glo featuregate.StageAlpha, featuregate.WithRegisterDescription("controls whether the collector supports extended OpenTelemetry"+ "configuration for internal telemetry")) - -// AllViews returns all the OpenCensus views requires by obsreport package. -func AllViews(level configtelemetry.Level) []*view.View { - if level == configtelemetry.LevelNone { - return nil - } - - var views []*view.View - var measures []*stats.Int64Measure - var tagKeys []tag.Key - - // Receiver views. - views = append(views, receiverViews()...) - - // Scraper views. - views = append(views, scraperViews()...) - - // Exporter views. - measures = []*stats.Int64Measure{ - obsmetrics.ExporterSentSpans, - obsmetrics.ExporterFailedToSendSpans, - obsmetrics.ExporterSentMetricPoints, - obsmetrics.ExporterFailedToSendMetricPoints, - obsmetrics.ExporterSentLogRecords, - obsmetrics.ExporterFailedToSendLogRecords, - } - tagKeys = []tag.Key{obsmetrics.TagKeyExporter} - views = append(views, genViews(measures, tagKeys, view.Sum())...) - - errorNumberView := &view.View{ - Name: obsmetrics.ExporterPrefix + "send_failed_requests", - Description: "number of times exporters failed to send requests to the destination", - Measure: obsmetrics.ExporterFailedToSendSpans, - Aggregation: view.Count(), - } - views = append(views, errorNumberView) - - // Processor views. - measures = []*stats.Int64Measure{ - obsmetrics.ProcessorAcceptedSpans, - obsmetrics.ProcessorRefusedSpans, - obsmetrics.ProcessorDroppedSpans, - obsmetrics.ProcessorAcceptedMetricPoints, - obsmetrics.ProcessorRefusedMetricPoints, - obsmetrics.ProcessorDroppedMetricPoints, - obsmetrics.ProcessorAcceptedLogRecords, - obsmetrics.ProcessorRefusedLogRecords, - obsmetrics.ProcessorDroppedLogRecords, - } - tagKeys = []tag.Key{obsmetrics.TagKeyProcessor} - views = append(views, genViews(measures, tagKeys, view.Sum())...) - - return views -} - -func receiverViews() []*view.View { - if UseOtelForInternalMetricsfeatureGate.IsEnabled() { - return nil - } - - measures := []*stats.Int64Measure{ - obsmetrics.ReceiverAcceptedSpans, - obsmetrics.ReceiverRefusedSpans, - obsmetrics.ReceiverAcceptedMetricPoints, - obsmetrics.ReceiverRefusedMetricPoints, - obsmetrics.ReceiverAcceptedLogRecords, - obsmetrics.ReceiverRefusedLogRecords, - } - tagKeys := []tag.Key{ - obsmetrics.TagKeyReceiver, obsmetrics.TagKeyTransport, - } - - return genViews(measures, tagKeys, view.Sum()) -} - -func scraperViews() []*view.View { - if UseOtelForInternalMetricsfeatureGate.IsEnabled() { - return nil - } - - measures := []*stats.Int64Measure{ - obsmetrics.ScraperScrapedMetricPoints, - obsmetrics.ScraperErroredMetricPoints, - } - tagKeys := []tag.Key{obsmetrics.TagKeyReceiver, obsmetrics.TagKeyScraper} - - return genViews(measures, tagKeys, view.Sum()) -} - -func genViews( - measures []*stats.Int64Measure, - tagKeys []tag.Key, - aggregation *view.Aggregation, -) []*view.View { - views := make([]*view.View, 0, len(measures)) - for _, measure := range measures { - views = append(views, &view.View{ - Name: measure.Name(), - Description: measure.Description(), - TagKeys: tagKeys, - Measure: measure, - Aggregation: aggregation, - }) - } - return views -} diff --git a/internal/obsreportconfig/obsreportconfig_test.go b/internal/obsreportconfig/obsreportconfig_test.go deleted file mode 100644 index 3634a437245..00000000000 --- a/internal/obsreportconfig/obsreportconfig_test.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package obsreportconfig - -import ( - "testing" - - "github.com/stretchr/testify/assert" - - "go.opentelemetry.io/collector/config/configtelemetry" -) - -func TestConfigure(t *testing.T) { - tests := []struct { - name string - level configtelemetry.Level - wantViewsLen int - }{ - { - name: "none", - level: configtelemetry.LevelNone, - }, - { - name: "basic", - level: configtelemetry.LevelBasic, - wantViewsLen: 24, - }, - { - name: "normal", - level: configtelemetry.LevelNormal, - wantViewsLen: 24, - }, - { - name: "detailed", - level: configtelemetry.LevelDetailed, - wantViewsLen: 24, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - assert.Len(t, AllViews(tt.level), tt.wantViewsLen) - }) - } -} diff --git a/internal/obsreportconfig/package_test.go b/internal/obsreportconfig/package_test.go new file mode 100644 index 00000000000..d70955f9088 --- /dev/null +++ b/internal/obsreportconfig/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package obsreportconfig + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/sharedcomponent/package_test.go b/internal/sharedcomponent/package_test.go new file mode 100644 index 00000000000..424f48bf6d6 --- /dev/null +++ b/internal/sharedcomponent/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sharedcomponent + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/sharedcomponent/sharedcomponent.go b/internal/sharedcomponent/sharedcomponent.go index 2d1c74f355e..1a3e65878c2 100644 --- a/internal/sharedcomponent/sharedcomponent.go +++ b/internal/sharedcomponent/sharedcomponent.go @@ -1,8 +1,9 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Package sharedcomponent exposes util functionality for receivers and exporters -// that need to share state between different signal types instances such as net.Listener or os.File. +// Package sharedcomponent exposes functionality for components +// to register against a shared key, such as a configuration object, in order to be reused across signal types. +// This is particularly useful when the component relies on a shared resource such as os.File or http.Server. package sharedcomponent // import "go.opentelemetry.io/collector/internal/sharedcomponent" import ( @@ -12,69 +13,108 @@ import ( "go.opentelemetry.io/collector/component" ) -// SharedComponents a map that keeps reference of all created instances for a given configuration, -// and ensures that the shared state is started and stopped only once. -type SharedComponents[K comparable, V component.Component] struct { - comps map[K]*SharedComponent[V] +func NewMap[K comparable, V component.Component]() *Map[K, V] { + return &Map[K, V]{ + components: map[K]*Component[V]{}, + } } -// NewSharedComponents returns a new empty SharedComponents. -func NewSharedComponents[K comparable, V component.Component]() *SharedComponents[K, V] { - return &SharedComponents[K, V]{ - comps: make(map[K]*SharedComponent[V]), - } +// Map keeps reference of all created instances for a given shared key such as a component configuration. +type Map[K comparable, V component.Component] struct { + lock sync.Mutex + components map[K]*Component[V] } -// GetOrAdd returns the already created instance if exists, otherwise creates a new instance +// LoadOrStore returns the already created instance if exists, otherwise creates a new instance // and adds it to the map of references. -func (scs *SharedComponents[K, V]) GetOrAdd(key K, create func() (V, error)) (*SharedComponent[V], error) { - if c, ok := scs.comps[key]; ok { +func (m *Map[K, V]) LoadOrStore(key K, create func() (V, error), telemetrySettings *component.TelemetrySettings) (*Component[V], error) { + m.lock.Lock() + defer m.lock.Unlock() + if c, ok := m.components[key]; ok { + // If we haven't already seen this telemetry settings, this shared component represents + // another instance. Wrap ReportStatus to report for all instances this shared + // component represents. + if _, ok := c.seenSettings[telemetrySettings]; !ok { + c.seenSettings[telemetrySettings] = struct{}{} + prev := c.telemetry.ReportStatus + c.telemetry.ReportStatus = func(ev *component.StatusEvent) { + telemetrySettings.ReportStatus(ev) + prev(ev) + } + } return c, nil } comp, err := create() if err != nil { return nil, err } - newComp := &SharedComponent[V]{ + + newComp := &Component[V]{ component: comp, removeFunc: func() { - delete(scs.comps, key) + m.lock.Lock() + defer m.lock.Unlock() + delete(m.components, key) + }, + telemetry: telemetrySettings, + seenSettings: map[*component.TelemetrySettings]struct{}{ + telemetrySettings: {}, }, } - scs.comps[key] = newComp + m.components[key] = newComp return newComp, nil } -// SharedComponent ensures that the wrapped component is started and stopped only once. -// When stopped it is removed from the SharedComponents map. -type SharedComponent[V component.Component] struct { +// Component ensures that the wrapped component is started and stopped only once. +// When stopped it is removed from the Map. +type Component[V component.Component] struct { component V startOnce sync.Once stopOnce sync.Once removeFunc func() + + telemetry *component.TelemetrySettings + seenSettings map[*component.TelemetrySettings]struct{} } // Unwrap returns the original component. -func (r *SharedComponent[V]) Unwrap() V { - return r.component +func (c *Component[V]) Unwrap() V { + return c.component } -// Start implements component.Component. -func (r *SharedComponent[V]) Start(ctx context.Context, host component.Host) error { +// Start starts the underlying component if it never started before. +func (c *Component[V]) Start(ctx context.Context, host component.Host) error { var err error - r.startOnce.Do(func() { - err = r.component.Start(ctx, host) + c.startOnce.Do(func() { + // It's important that status for a shared component is reported through its + // telemetry settings to keep status in sync and avoid race conditions. This logic duplicates + // and takes priority over the automated status reporting that happens in graph, making the + // status reporting in graph a no-op. + c.telemetry.ReportStatus(component.NewStatusEvent(component.StatusStarting)) + if err = c.component.Start(ctx, host); err != nil { + c.telemetry.ReportStatus(component.NewPermanentErrorEvent(err)) + } }) return err } -// Shutdown implements component.Component. -func (r *SharedComponent[V]) Shutdown(ctx context.Context) error { +// Shutdown shuts down the underlying component. +func (c *Component[V]) Shutdown(ctx context.Context) error { var err error - r.stopOnce.Do(func() { - err = r.component.Shutdown(ctx) - r.removeFunc() + c.stopOnce.Do(func() { + // It's important that status for a shared component is reported through its + // telemetry settings to keep status in sync and avoid race conditions. This logic duplicates + // and takes priority over the automated status reporting that happens in graph, making the + // status reporting in graph a no-op. + c.telemetry.ReportStatus(component.NewStatusEvent(component.StatusStopping)) + err = c.component.Shutdown(ctx) + if err != nil { + c.telemetry.ReportStatus(component.NewPermanentErrorEvent(err)) + } else { + c.telemetry.ReportStatus(component.NewStatusEvent(component.StatusStopped)) + } + c.removeFunc() }) return err } diff --git a/internal/sharedcomponent/sharedcomponent_test.go b/internal/sharedcomponent/sharedcomponent_test.go index 112f1d79d07..77cda5124db 100644 --- a/internal/sharedcomponent/sharedcomponent_test.go +++ b/internal/sharedcomponent/sharedcomponent_test.go @@ -15,43 +15,61 @@ import ( "go.opentelemetry.io/collector/component/componenttest" ) -var id = component.NewID("test") +var id = component.MustNewID("test") type baseComponent struct { component.StartFunc component.ShutdownFunc + telemetry *component.TelemetrySettings } -func TestNewSharedComponents(t *testing.T) { - comps := NewSharedComponents[component.ID, *baseComponent]() - assert.Len(t, comps.comps, 0) +func TestNewMap(t *testing.T) { + comps := NewMap[component.ID, *baseComponent]() + assert.Len(t, comps.components, 0) } func TestNewSharedComponentsCreateError(t *testing.T) { - comps := NewSharedComponents[component.ID, *baseComponent]() - assert.Len(t, comps.comps, 0) + comps := NewMap[component.ID, *baseComponent]() + assert.Len(t, comps.components, 0) myErr := errors.New("my error") - _, err := comps.GetOrAdd(id, func() (*baseComponent, error) { return nil, myErr }) + _, err := comps.LoadOrStore( + id, + func() (*baseComponent, error) { return nil, myErr }, + newNopTelemetrySettings(), + ) assert.ErrorIs(t, err, myErr) - assert.Len(t, comps.comps, 0) + assert.Len(t, comps.components, 0) } -func TestSharedComponentsGetOrAdd(t *testing.T) { +func TestSharedComponentsLoadOrStore(t *testing.T) { nop := &baseComponent{} - comps := NewSharedComponents[component.ID, *baseComponent]() - got, err := comps.GetOrAdd(id, func() (*baseComponent, error) { return nop, nil }) + comps := NewMap[component.ID, *baseComponent]() + got, err := comps.LoadOrStore( + id, + func() (*baseComponent, error) { return nop, nil }, + newNopTelemetrySettings(), + ) require.NoError(t, err) - assert.Len(t, comps.comps, 1) + assert.Len(t, comps.components, 1) assert.Same(t, nop, got.Unwrap()) - gotSecond, err := comps.GetOrAdd(id, func() (*baseComponent, error) { panic("should not be called") }) + gotSecond, err := comps.LoadOrStore( + id, + func() (*baseComponent, error) { panic("should not be called") }, + newNopTelemetrySettings(), + ) + require.NoError(t, err) assert.Same(t, got, gotSecond) // Shutdown nop will remove assert.NoError(t, got.Shutdown(context.Background())) - assert.Len(t, comps.comps, 0) - gotThird, err := comps.GetOrAdd(id, func() (*baseComponent, error) { return nop, nil }) + assert.Len(t, comps.components, 0) + gotThird, err := comps.LoadOrStore( + id, + func() (*baseComponent, error) { return nop, nil }, + newNopTelemetrySettings(), + ) require.NoError(t, err) assert.NotSame(t, got, gotThird) } @@ -61,26 +79,201 @@ func TestSharedComponent(t *testing.T) { calledStart := 0 calledStop := 0 comp := &baseComponent{ - StartFunc: func(ctx context.Context, host component.Host) error { + StartFunc: func(context.Context, component.Host) error { calledStart++ return wantErr }, - ShutdownFunc: func(ctx context.Context) error { + ShutdownFunc: func(context.Context) error { calledStop++ return wantErr }} - comps := NewSharedComponents[component.ID, *baseComponent]() - got, err := comps.GetOrAdd(id, func() (*baseComponent, error) { return comp, nil }) + comps := NewMap[component.ID, *baseComponent]() + got, err := comps.LoadOrStore( + id, + func() (*baseComponent, error) { return comp, nil }, + newNopTelemetrySettings(), + ) require.NoError(t, err) assert.Equal(t, wantErr, got.Start(context.Background(), componenttest.NewNopHost())) assert.Equal(t, 1, calledStart) // Second time is not called anymore. assert.NoError(t, got.Start(context.Background(), componenttest.NewNopHost())) assert.Equal(t, 1, calledStart) + // first time, shutdown is called. assert.Equal(t, wantErr, got.Shutdown(context.Background())) assert.Equal(t, 1, calledStop) // Second time is not called anymore. assert.NoError(t, got.Shutdown(context.Background())) assert.Equal(t, 1, calledStop) } +func TestSharedComponentsReportStatus(t *testing.T) { + reportedStatuses := make(map[*component.InstanceID][]component.Status) + newStatusFunc := func() func(*component.StatusEvent) { + instanceID := &component.InstanceID{} + return func(ev *component.StatusEvent) { + if ev.Status() == component.StatusNone { + return + } + reportedStatuses[instanceID] = append(reportedStatuses[instanceID], ev.Status()) + } + } + + comp := &baseComponent{} + comps := NewMap[component.ID, *baseComponent]() + var telemetrySettings *component.TelemetrySettings + + // make a shared component that represents three instances + for i := 0; i < 3; i++ { + telemetrySettings = newNopTelemetrySettings() + telemetrySettings.ReportStatus = newStatusFunc() + // The initial settings for the shared component need to match the ones passed to the first + // invocation of LoadOrStore so that underlying telemetry settings reference can be used to + // wrap ReportStatus for subsequently added "instances". + if i == 0 { + comp.telemetry = telemetrySettings + } + got, err := comps.LoadOrStore( + id, + func() (*baseComponent, error) { return comp, nil }, + telemetrySettings, + ) + require.NoError(t, err) + assert.Len(t, comps.components, 1) + assert.Same(t, comp, got.Unwrap()) + } + + // make sure we don't try to represent a fourth instance if we reuse a telemetrySettings + _, _ = comps.LoadOrStore( + id, + func() (*baseComponent, error) { return comp, nil }, + telemetrySettings, + ) + + comp.telemetry.ReportStatus(component.NewStatusEvent(component.StatusStarting)) + + comp.telemetry.ReportStatus(component.NewStatusEvent(component.StatusOK)) + + // simulate an error + comp.telemetry.ReportStatus(component.NewStatusEvent(component.StatusNone)) + + // stopping + comp.telemetry.ReportStatus(component.NewStatusEvent(component.StatusStopping)) + + // stopped + comp.telemetry.ReportStatus(component.NewStatusEvent(component.StatusStopped)) + + // The shared component represents 3 component instances. Reporting status for the shared + // component should report status for each of the instances it represents. + expectedStatuses := []component.Status{ + component.StatusStarting, + component.StatusOK, + component.StatusStopping, + component.StatusStopped, + } + + require.Equal(t, 3, len(reportedStatuses)) + + for _, actualStatuses := range reportedStatuses { + require.Equal(t, expectedStatuses, actualStatuses) + } +} + +func TestReportStatusOnStartShutdown(t *testing.T) { + for _, tc := range []struct { + name string + startErr error + shutdownErr error + expectedStatuses []component.Status + }{ + { + name: "successful start/stop", + startErr: nil, + shutdownErr: nil, + expectedStatuses: []component.Status{ + component.StatusStarting, + component.StatusOK, + component.StatusStopping, + component.StatusStopped, + }, + }, + { + name: "start error", + startErr: assert.AnError, + shutdownErr: nil, + expectedStatuses: []component.Status{ + component.StatusStarting, + component.StatusPermanentError, + }, + }, + { + name: "shutdown error", + shutdownErr: assert.AnError, + expectedStatuses: []component.Status{ + component.StatusStarting, + component.StatusOK, + component.StatusStopping, + component.StatusPermanentError, + }, + }, + } { + t.Run(tc.name, func(t *testing.T) { + reportedStatuses := make(map[*component.InstanceID][]component.Status) + newStatusFunc := func() func(*component.StatusEvent) { + instanceID := &component.InstanceID{} + return func(ev *component.StatusEvent) { + reportedStatuses[instanceID] = append(reportedStatuses[instanceID], ev.Status()) + } + } + base := &baseComponent{} + if tc.startErr != nil { + base.StartFunc = func(context.Context, component.Host) error { + return tc.startErr + } + } + if tc.shutdownErr != nil { + base.ShutdownFunc = func(context.Context) error { + return tc.shutdownErr + } + } + comps := NewMap[component.ID, *baseComponent]() + var comp *Component[*baseComponent] + var err error + for i := 0; i < 3; i++ { + telemetrySettings := newNopTelemetrySettings() + telemetrySettings.ReportStatus = newStatusFunc() + if i == 0 { + base.telemetry = telemetrySettings + } + comp, err = comps.LoadOrStore( + id, + func() (*baseComponent, error) { return base, nil }, + telemetrySettings, + ) + require.NoError(t, err) + } + + err = comp.Start(context.Background(), componenttest.NewNopHost()) + require.Equal(t, tc.startErr, err) + + if tc.startErr == nil { + comp.telemetry.ReportStatus(component.NewStatusEvent(component.StatusOK)) + + err = comp.Shutdown(context.Background()) + require.Equal(t, tc.shutdownErr, err) + } + + require.Equal(t, 3, len(reportedStatuses)) + + for _, actualStatuses := range reportedStatuses { + require.Equal(t, tc.expectedStatuses, actualStatuses) + } + }) + } +} + +// newNopTelemetrySettings streamlines getting a pointer to a NopTelemetrySettings +func newNopTelemetrySettings() *component.TelemetrySettings { + set := componenttest.NewNopTelemetrySettings() + return &set +} diff --git a/internal/testutil/package_test.go b/internal/testutil/package_test.go new file mode 100644 index 00000000000..d77e80fc1ab --- /dev/null +++ b/internal/testutil/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package testutil + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/internal/testutil/testutil.go b/internal/testutil/testutil.go index 427e51d2e19..b8d9923869c 100644 --- a/internal/testutil/testutil.go +++ b/internal/testutil/testutil.go @@ -13,8 +13,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - "go.opentelemetry.io/collector/service/telemetry" + "go.opentelemetry.io/contrib/config" ) type portpair struct { @@ -57,7 +56,7 @@ func GetAvailableLocalAddress(t testing.TB) string { return endpoint } -func GetAvailableLocalAddressPrometheus(t testing.TB) *telemetry.Prometheus { +func GetAvailableLocalAddressPrometheus(t testing.TB) *config.Prometheus { address := GetAvailableLocalAddress(t) host, port, err := net.SplitHostPort(address) if err != nil { @@ -67,7 +66,7 @@ func GetAvailableLocalAddressPrometheus(t testing.TB) *telemetry.Prometheus { if err != nil { return nil } - return &telemetry.Prometheus{ + return &config.Prometheus{ Host: &host, Port: &portInt, } diff --git a/internal/tools/go.mod b/internal/tools/go.mod index 9f8c6a53af4..c5dda5ebbdc 100644 --- a/internal/tools/go.mod +++ b/internal/tools/go.mod @@ -1,43 +1,42 @@ module go.opentelemetry.io/collector/internal/tools -go 1.20 +go 1.21 require ( github.com/a8m/envsubst v1.4.2 - github.com/atombender/go-jsonschema v0.12.1 github.com/client9/misspell v0.3.4 - github.com/golangci/golangci-lint v1.54.2 + github.com/golangci/golangci-lint v1.56.2 github.com/google/addlicense v1.1.1 - github.com/jcchavezs/porto v0.4.0 - github.com/mikefarah/yq/v4 v4.35.1 + github.com/jcchavezs/porto v0.6.0 github.com/pavius/impi v0.0.3 - go.opentelemetry.io/build-tools/checkfile v0.11.0 - go.opentelemetry.io/build-tools/chloggen v0.11.0 - go.opentelemetry.io/build-tools/crosslink v0.11.0 - go.opentelemetry.io/build-tools/multimod v0.11.0 - go.opentelemetry.io/build-tools/semconvgen v0.11.0 - golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 - golang.org/x/tools v0.13.0 - golang.org/x/vuln v1.0.1 + go.opentelemetry.io/build-tools/checkfile v0.12.0 + go.opentelemetry.io/build-tools/chloggen v0.12.0 + go.opentelemetry.io/build-tools/crosslink v0.12.1-0.20240121161735-d70c842b1bf5 + go.opentelemetry.io/build-tools/multimod v0.12.0 + go.opentelemetry.io/build-tools/semconvgen v0.12.0 + golang.org/x/exp v0.0.0-20240119083558-1b970713d09a + golang.org/x/tools v0.18.0 + golang.org/x/vuln v1.0.4 ) require ( 4d63.com/gocheckcompilerdirectives v1.2.1 // indirect 4d63.com/gochecknoglobals v0.2.1 // indirect dario.cat/mergo v1.0.0 // indirect - github.com/4meepo/tagalign v1.3.2 // indirect - github.com/Abirdcfly/dupword v0.0.12 // indirect + github.com/4meepo/tagalign v1.3.3 // indirect + github.com/Abirdcfly/dupword v0.0.13 // indirect github.com/Antonboom/errname v0.1.12 // indirect github.com/Antonboom/nilnil v0.1.7 // indirect + github.com/Antonboom/testifylint v1.1.2 // indirect github.com/BurntSushi/toml v1.3.2 // indirect github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect - github.com/GaijinEntertainment/go-exhaustruct/v3 v3.1.0 // indirect + github.com/GaijinEntertainment/go-exhaustruct/v3 v3.2.0 // indirect github.com/Masterminds/semver v1.5.0 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/OpenPeeDeeP/depguard/v2 v2.1.0 // indirect - github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95 // indirect - github.com/acomagu/bufpipe v1.0.4 // indirect - github.com/alecthomas/participle/v2 v2.0.0 // indirect + github.com/OpenPeeDeeP/depguard/v2 v2.2.0 // indirect + github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect + github.com/alecthomas/assert/v2 v2.3.0 // indirect + github.com/alecthomas/go-check-sumtype v0.1.4 // indirect github.com/alexkohler/nakedret/v2 v2.0.2 // indirect github.com/alexkohler/prealloc v1.0.0 // indirect github.com/alingse/asasalint v0.0.11 // indirect @@ -47,137 +46,132 @@ require ( github.com/bkielbasa/cyclop v1.2.1 // indirect github.com/blizzy78/varnamelen v0.8.0 // indirect github.com/bmatcuk/doublestar/v4 v4.0.2 // indirect - github.com/bombsimon/wsl/v3 v3.4.0 // indirect - github.com/breml/bidichk v0.2.4 // indirect - github.com/breml/errchkjson v0.3.1 // indirect - github.com/butuzov/ireturn v0.2.0 // indirect + github.com/bombsimon/wsl/v4 v4.2.1 // indirect + github.com/breml/bidichk v0.2.7 // indirect + github.com/breml/errchkjson v0.3.6 // indirect + github.com/butuzov/ireturn v0.3.0 // indirect github.com/butuzov/mirror v1.1.0 // indirect - github.com/ccojocar/zxcvbn-go v1.0.1 // indirect + github.com/catenacyber/perfsprint v0.6.0 // indirect + github.com/ccojocar/zxcvbn-go v1.0.2 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/charithe/durationcheck v0.0.10 // indirect - github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8 // indirect - github.com/cloudflare/circl v1.3.3 // indirect + github.com/chavacava/garif v0.1.0 // indirect + github.com/cloudflare/circl v1.3.7 // indirect github.com/curioswitch/go-reassign v0.2.0 // indirect - github.com/daixiang0/gci v0.11.0 // indirect + github.com/cyphar/filepath-securejoin v0.2.4 // indirect + github.com/daixiang0/gci v0.12.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/denis-tingaikin/go-header v0.4.3 // indirect - github.com/dimchansky/utfbom v1.1.1 // indirect - github.com/elliotchance/orderedmap v1.5.0 // indirect github.com/emirpasic/gods v1.18.1 // indirect github.com/esimonov/ifshort v1.0.4 // indirect - github.com/ettle/strcase v0.1.1 // indirect - github.com/fatih/color v1.15.0 // indirect + github.com/ettle/strcase v0.2.0 // indirect + github.com/fatih/color v1.16.0 // indirect github.com/fatih/structtag v1.2.0 // indirect github.com/firefart/nonamedreturns v1.0.4 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fzipp/gocyclo v0.6.0 // indirect - github.com/go-critic/go-critic v0.9.0 // indirect + github.com/ghostiam/protogetter v0.3.4 // indirect + github.com/go-critic/go-critic v0.11.1 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect - github.com/go-git/go-billy/v5 v5.4.1 // indirect - github.com/go-git/go-git/v5 v5.8.1 // indirect + github.com/go-git/go-billy/v5 v5.5.0 // indirect + github.com/go-git/go-git/v5 v5.11.0 // indirect github.com/go-toolsmith/astcast v1.1.0 // indirect github.com/go-toolsmith/astcopy v1.1.0 // indirect - github.com/go-toolsmith/astequal v1.1.0 // indirect + github.com/go-toolsmith/astequal v1.2.0 // indirect github.com/go-toolsmith/astfmt v1.1.0 // indirect github.com/go-toolsmith/astp v1.1.0 // indirect github.com/go-toolsmith/strparse v1.1.0 // indirect github.com/go-toolsmith/typep v1.1.0 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/go-xmlfmt/xmlfmt v1.1.2 // indirect github.com/gobwas/glob v0.2.3 // indirect - github.com/goccy/go-json v0.10.2 // indirect - github.com/goccy/go-yaml v1.11.0 // indirect github.com/gofrs/flock v0.8.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe // indirect - github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2 // indirect + github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e // indirect github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 // indirect github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca // indirect github.com/golangci/misspell v0.4.1 // indirect - github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 // indirect + github.com/golangci/revgrep v0.5.2 // indirect github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect - github.com/google/go-cmp v0.5.9 // indirect - github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601 // indirect + github.com/google/go-cmp v0.6.0 // indirect + github.com/gordonklaus/ineffassign v0.1.0 // indirect github.com/gostaticanalysis/analysisutil v0.7.1 // indirect github.com/gostaticanalysis/comment v1.4.2 // indirect github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect github.com/gostaticanalysis/nilerr v0.1.1 // indirect - github.com/hashicorp/errwrap v1.0.0 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hexops/gotextdiff v1.0.3 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/jgautheron/goconst v1.5.1 // indirect + github.com/jgautheron/goconst v1.7.0 // indirect github.com/jingyugao/rowserrcheck v1.1.1 // indirect - github.com/jinzhu/copier v0.3.5 // indirect github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect + github.com/jjti/go-spancheck v0.5.2 // indirect github.com/julz/importas v0.1.0 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/kisielk/errcheck v1.6.3 // indirect + github.com/kisielk/errcheck v1.7.0 // indirect github.com/kisielk/gotool v1.0.0 // indirect github.com/kkHAIKE/contextcheck v1.1.4 // indirect github.com/kulti/thelper v0.6.3 // indirect - github.com/kunwardeep/paralleltest v1.0.8 // indirect + github.com/kunwardeep/paralleltest v1.0.9 // indirect github.com/kyoh86/exportloopref v0.1.11 // indirect github.com/ldez/gomoddirectives v0.2.3 // indirect github.com/ldez/tagliatelle v0.5.0 // indirect github.com/leonklingele/grouper v1.1.1 // indirect github.com/lufeee/execinquery v1.2.1 // indirect + github.com/macabu/inamedparam v0.1.3 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/maratori/testableexamples v1.0.0 // indirect github.com/maratori/testpackage v1.1.1 // indirect github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.17 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.9 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/mbilski/exhaustivestruct v1.2.0 // indirect - github.com/mgechev/revive v1.3.2 // indirect + github.com/mgechev/revive v1.3.7 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/moricho/tparallel v0.3.1 // indirect github.com/nakabonne/nestif v0.3.1 // indirect - github.com/nishanths/exhaustive v0.11.0 // indirect + github.com/nishanths/exhaustive v0.12.0 // indirect github.com/nishanths/predeclared v0.2.2 // indirect - github.com/nunnatsa/ginkgolinter v0.13.5 // indirect + github.com/nunnatsa/ginkgolinter v0.15.2 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect - github.com/pelletier/go-toml/v2 v2.0.9 // indirect + github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect - github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/polyfloyd/go-errorlint v1.4.4 // indirect - github.com/prometheus/client_golang v1.16.0 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect + github.com/polyfloyd/go-errorlint v1.4.8 // indirect + github.com/prometheus/client_golang v1.17.0 // indirect + github.com/prometheus/client_model v0.5.0 // indirect + github.com/prometheus/common v0.45.0 // indirect + github.com/prometheus/procfs v0.11.1 // indirect github.com/quasilyte/go-ruleguard v0.4.0 // indirect github.com/quasilyte/gogrep v0.5.0 // indirect github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect github.com/ryancurrah/gomodguard v1.3.0 // indirect - github.com/ryanrolds/sqlclosecheck v0.4.0 // indirect - github.com/sanity-io/litter v1.5.5 // indirect + github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect github.com/sashamelentyev/interfacebloat v1.1.0 // indirect - github.com/sashamelentyev/usestdlibvars v1.24.0 // indirect - github.com/securego/gosec/v2 v2.17.0 // indirect + github.com/sashamelentyev/usestdlibvars v1.25.0 // indirect + github.com/securego/gosec/v2 v2.19.0 // indirect github.com/sergi/go-diff v1.1.0 // indirect github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/sivchari/containedctx v1.0.3 // indirect github.com/sivchari/nosnakecase v1.7.0 // indirect github.com/sivchari/tenv v1.7.1 // indirect - github.com/skeema/knownhosts v1.2.0 // indirect + github.com/skeema/knownhosts v1.2.1 // indirect github.com/sonatard/noctx v0.0.2 // indirect github.com/sourcegraph/go-diff v0.7.0 // indirect - github.com/spf13/afero v1.9.5 // indirect + github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cast v1.5.1 // indirect - github.com/spf13/cobra v1.7.0 // indirect + github.com/spf13/cobra v1.8.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.16.0 // indirect @@ -188,43 +182,42 @@ require ( github.com/subosito/gotenv v1.4.2 // indirect github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect github.com/tdakkota/asciicheck v0.2.0 // indirect - github.com/tetafro/godot v1.4.14 // indirect + github.com/tetafro/godot v1.4.16 // indirect github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 // indirect github.com/timonwong/loggercheck v0.9.4 // indirect github.com/tomarrell/wrapcheck/v2 v2.8.1 // indirect github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect github.com/ultraware/funlen v0.1.0 // indirect - github.com/ultraware/whitespace v0.0.5 // indirect - github.com/uudashr/gocognit v1.0.7 // indirect + github.com/ultraware/whitespace v0.1.0 // indirect + github.com/uudashr/gocognit v1.1.2 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect - github.com/xen0n/gosmopolitan v1.2.1 // indirect + github.com/xen0n/gosmopolitan v1.2.2 // indirect github.com/yagipy/maintidx v1.0.0 // indirect github.com/yeya24/promlinter v0.2.0 // indirect - github.com/ykadowak/zerologlint v0.1.3 // indirect - gitlab.com/bosi/decorder v0.4.0 // indirect - go.opentelemetry.io/build-tools v0.11.0 // indirect - go.tmz.dev/musttag v0.7.2 // indirect + github.com/ykadowak/zerologlint v0.1.5 // indirect + gitlab.com/bosi/decorder v0.4.1 // indirect + go-simpler.org/musttag v0.8.0 // indirect + go-simpler.org/sloglint v0.4.0 // indirect + go.opentelemetry.io/build-tools v0.12.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect - golang.org/x/crypto v0.13.0 // indirect - golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833 // indirect - golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect - golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect + golang.org/x/crypto v0.19.0 // indirect + golang.org/x/exp/typeparams v0.0.0-20231219180239-dc181d75b848 // indirect + golang.org/x/mod v0.15.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/op/go-logging.v1 v1.0.0-20160211212156-b2cb9fa56473 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - honnef.co/go/tools v0.4.5 // indirect - mvdan.cc/gofumpt v0.5.0 // indirect + honnef.co/go/tools v0.4.6 // indirect + mvdan.cc/gofumpt v0.6.0 // indirect mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect - mvdan.cc/unparam v0.0.0-20230312165513-e84e2d14e3b8 // indirect + mvdan.cc/unparam v0.0.0-20240104100049-c549a3470d14 // indirect ) retract ( diff --git a/internal/tools/go.sum b/internal/tools/go.sum index 3a2a1c9a7b7..b0c915fbf3d 100644 --- a/internal/tools/go.sum +++ b/internal/tools/go.sum @@ -7,7 +7,6 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -18,9 +17,6 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -38,43 +34,44 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/4meepo/tagalign v1.3.2 h1:1idD3yxlRGV18VjqtDbqYvQ5pXqQS0wO2dn6M3XstvI= -github.com/4meepo/tagalign v1.3.2/go.mod h1:Q9c1rYMZJc9dPRkbQPpcBNCLEmY2njbAsXhQOZFE2dE= -github.com/Abirdcfly/dupword v0.0.12 h1:56NnOyrXzChj07BDFjeRA+IUzSz01jmzEq+G4kEgFhc= -github.com/Abirdcfly/dupword v0.0.12/go.mod h1:+us/TGct/nI9Ndcbcp3rgNcQzctTj68pq7TcgNpLfdI= +github.com/4meepo/tagalign v1.3.3 h1:ZsOxcwGD/jP4U/aw7qeWu58i7dwYemfy5Y+IF1ACoNw= +github.com/4meepo/tagalign v1.3.3/go.mod h1:Q9c1rYMZJc9dPRkbQPpcBNCLEmY2njbAsXhQOZFE2dE= +github.com/Abirdcfly/dupword v0.0.13 h1:SMS17YXypwP000fA7Lr+kfyBQyW14tTT+nRv9ASwUUo= +github.com/Abirdcfly/dupword v0.0.13/go.mod h1:Ut6Ue2KgF/kCOawpW4LnExT+xZLQviJPE4klBPMK/5Y= github.com/Antonboom/errname v0.1.12 h1:oh9ak2zUtsLp5oaEd/erjB4GPu9w19NyoIskZClDcQY= github.com/Antonboom/errname v0.1.12/go.mod h1:bK7todrzvlaZoQagP1orKzWXv59X/x0W0Io2XT1Ssro= github.com/Antonboom/nilnil v0.1.7 h1:ofgL+BA7vlA1K2wNQOsHzLJ2Pw5B5DpWRLdDAVvvTow= github.com/Antonboom/nilnil v0.1.7/go.mod h1:TP+ScQWVEq0eSIxqU8CbdT5DFWoHp0MbP+KMUO1BKYQ= +github.com/Antonboom/testifylint v1.1.2 h1:IdLRermiLRogxY5AumBL4sP0A+qKHQM/AP1Xd7XOTKc= +github.com/Antonboom/testifylint v1.1.2/go.mod h1:9PFi+vWa8zzl4/B/kqmFJcw85ZUv8ReyBzuQCd30+WI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= -github.com/GaijinEntertainment/go-exhaustruct/v3 v3.1.0 h1:3ZBs7LAezy8gh0uECsA6CGU43FF3zsx5f4eah5FxTMA= -github.com/GaijinEntertainment/go-exhaustruct/v3 v3.1.0/go.mod h1:rZLTje5A9kFBe0pzhpe2TdhRniBF++PRHQuRpR8esVc= +github.com/GaijinEntertainment/go-exhaustruct/v3 v3.2.0 h1:sATXp1x6/axKxz2Gjxv8MALP0bXaNRfQinEwyfMcx8c= +github.com/GaijinEntertainment/go-exhaustruct/v3 v3.2.0/go.mod h1:Nl76DrGNJTA1KJ0LePKBw/vznBX1EHbAZX8mwjR82nI= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/OpenPeeDeeP/depguard/v2 v2.1.0 h1:aQl70G173h/GZYhWf36aE5H0KaujXfVMnn/f1kSDVYY= -github.com/OpenPeeDeeP/depguard/v2 v2.1.0/go.mod h1:PUBgk35fX4i7JDmwzlJwJ+GMe6NfO1723wmJMgPThNQ= -github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95 h1:KLq8BE0KwCL+mmXnjLWEAOYO+2l2AE4YMmqG1ZpZHBs= -github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= +github.com/OpenPeeDeeP/depguard/v2 v2.2.0 h1:vDfG60vDtIuf0MEOhmLlLLSzqaRM8EMcgJPdp74zmpA= +github.com/OpenPeeDeeP/depguard/v2 v2.2.0/go.mod h1:CIzddKRvLBC4Au5aYP/i3nyaWQ+ClszLIuVocRiCYFQ= +github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg= +github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/a8m/envsubst v1.4.2 h1:4yWIHXOLEJHQEFd4UjrWDrYeYlV7ncFWJOCBRLOZHQg= github.com/a8m/envsubst v1.4.2/go.mod h1:MVUTQNGQ3tsjOOtKCNd+fl8RzhsXcDvvAEzkhGtlsbY= -github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= -github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= -github.com/alecthomas/assert/v2 v2.2.2 h1:Z/iVC0xZfWTaFNE6bA3z07T86hd45Xe2eLt6WVy2bbk= -github.com/alecthomas/participle/v2 v2.0.0 h1:Fgrq+MbuSsJwIkw3fEj9h75vDP0Er5JzepJ0/HNHv0g= -github.com/alecthomas/participle/v2 v2.0.0/go.mod h1:rAKZdJldHu8084ojcWevWAL8KmEU+AT+Olodb+WoN2Y= +github.com/alecthomas/assert/v2 v2.3.0 h1:mAsH2wmvjsuvyBvAmCtm7zFsBlb8mIHx5ySLVdDZXL0= +github.com/alecthomas/assert/v2 v2.3.0/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= +github.com/alecthomas/go-check-sumtype v0.1.4 h1:WCvlB3l5Vq5dZQTFmodqL2g68uHiSwwlWcT5a2FGK0c= +github.com/alecthomas/go-check-sumtype v0.1.4/go.mod h1:WyYPfhfkdhyrdaligV6svFopZV8Lqdzn5pyVBaV6jhQ= github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= +github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -87,13 +84,13 @@ github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cv github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQRnw= github.com/alingse/asasalint v0.0.11/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/ashanbrown/forbidigo v1.6.0 h1:D3aewfM37Yb3pxHujIPSpTf6oQk9sc9WZi8gerOIVIY= github.com/ashanbrown/forbidigo v1.6.0/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1MUyfOKL+AjcU= github.com/ashanbrown/makezero v1.1.1 h1:iCQ87C0V0vSyO+M9E/FZYbu65auqH0lnsOkf5FcB28s= github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= -github.com/atombender/go-jsonschema v0.12.1 h1:TGt/A1LIT6K/8Kro0Mgu0urhMSuDah9UdI9HfBScn10= -github.com/atombender/go-jsonschema v0.12.1/go.mod h1:O/retkAzM5emQ4e/3Mv16NHzc/+oBIAdzPk/JL4DQt8= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -104,19 +101,21 @@ github.com/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= github.com/bmatcuk/doublestar/v4 v4.0.2 h1:X0krlUVAVmtr2cRoTqR8aDMrDqnB36ht8wpWTiQ3jsA= github.com/bmatcuk/doublestar/v4 v4.0.2/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= -github.com/bombsimon/wsl/v3 v3.4.0 h1:RkSxjT3tmlptwfgEgTgU+KYKLI35p/tviNXNXiL2aNU= -github.com/bombsimon/wsl/v3 v3.4.0/go.mod h1:KkIB+TXkqy6MvK9BDZVbZxKNYsE1/oLRJbIFtf14qqo= -github.com/breml/bidichk v0.2.4 h1:i3yedFWWQ7YzjdZJHnPo9d/xURinSq3OM+gyM43K4/8= -github.com/breml/bidichk v0.2.4/go.mod h1:7Zk0kRFt1LIZxtQdl9W9JwGAcLTTkOs+tN7wuEYGJ3s= -github.com/breml/errchkjson v0.3.1 h1:hlIeXuspTyt8Y/UmP5qy1JocGNR00KQHgfaNtRAjoxQ= -github.com/breml/errchkjson v0.3.1/go.mod h1:XroxrzKjdiutFyW3nWhw34VGg7kiMsDQox73yWCGI2U= -github.com/butuzov/ireturn v0.2.0 h1:kCHi+YzC150GE98WFuZQu9yrTn6GEydO2AuPLbTgnO4= -github.com/butuzov/ireturn v0.2.0/go.mod h1:Wh6Zl3IMtTpaIKbmwzqi6olnM9ptYQxxVacMsOEFPoc= +github.com/bombsimon/wsl/v4 v4.2.1 h1:Cxg6u+XDWff75SIFFmNsqnIOgob+Q9hG6y/ioKbRFiM= +github.com/bombsimon/wsl/v4 v4.2.1/go.mod h1:Xu/kDxGZTofQcDGCtQe9KCzhHphIe0fDuyWTxER9Feo= +github.com/breml/bidichk v0.2.7 h1:dAkKQPLl/Qrk7hnP6P+E0xOodrq8Us7+U0o4UBOAlQY= +github.com/breml/bidichk v0.2.7/go.mod h1:YodjipAGI9fGcYM7II6wFvGhdMYsC5pHDlGzqvEW3tQ= +github.com/breml/errchkjson v0.3.6 h1:VLhVkqSBH96AvXEyclMR37rZslRrY2kcyq+31HCsVrA= +github.com/breml/errchkjson v0.3.6/go.mod h1:jhSDoFheAF2RSDOlCfhHO9KqhZgAYLyvHe7bRCX8f/U= +github.com/butuzov/ireturn v0.3.0 h1:hTjMqWw3y5JC3kpnC5vXmFJAWI/m31jaCYQqzkS6PL0= +github.com/butuzov/ireturn v0.3.0/go.mod h1:A09nIiwiqzN/IoVo9ogpa0Hzi9fex1kd9PSD6edP5ZA= github.com/butuzov/mirror v1.1.0 h1:ZqX54gBVMXu78QLoiqdwpl2mgmoOJTk7s4p4o+0avZI= github.com/butuzov/mirror v1.1.0/go.mod h1:8Q0BdQU6rC6WILDiBM60DBfvV78OLJmMmixe7GF45AE= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= -github.com/ccojocar/zxcvbn-go v1.0.1 h1:+sxrANSCj6CdadkcMnvde/GWU1vZiiXRbqYSCalV4/4= -github.com/ccojocar/zxcvbn-go v1.0.1/go.mod h1:g1qkXtUSvHP8lhHp5GrSmTz6uWALGRMQdw6Qnz/hi60= +github.com/catenacyber/perfsprint v0.6.0 h1:VSv95RRkk5+BxrU/YTPcnxuMEWar1iMK5Vyh3fWcBfs= +github.com/catenacyber/perfsprint v0.6.0/go.mod h1:/wclWYompEyjUD2FuIIDVKNkqz7IgBIWXIH3V0Zol50= +github.com/ccojocar/zxcvbn-go v1.0.2 h1:na/czXU8RrhXO4EZme6eQJLR4PzcGsahsBOAwU6I3Vg= +github.com/ccojocar/zxcvbn-go v1.0.2/go.mod h1:g1qkXtUSvHP8lhHp5GrSmTz6uWALGRMQdw6Qnz/hi60= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -124,68 +123,67 @@ github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/charithe/durationcheck v0.0.10 h1:wgw73BiocdBDQPik+zcEoBG/ob8uyBHf2iyoHGPf5w4= github.com/charithe/durationcheck v0.0.10/go.mod h1:bCWXb7gYRysD1CU3C+u4ceO49LoGOY1C1L6uouGNreQ= -github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8 h1:W9o46d2kbNL06lq7UNDPV0zYLzkrde/bjIqO02eoll0= -github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8/go.mod h1:gakxgyXaaPkxvLw1XQxNGK4I37ys9iBRzNUx/B7pUCo= +github.com/chavacava/garif v0.1.0 h1:2JHa3hbYf5D9dsgseMKAmc/MZ109otzgNFk5s87H9Pc= +github.com/chavacava/garif v0.1.0/go.mod h1:XMyYCkEL58DF0oyW4qDjjnPWONs2HBqYKI+UIPD+Gww= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= +github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= +github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/curioswitch/go-reassign v0.2.0 h1:G9UZyOcpk/d7Gd6mqYgd8XYWFMw/znxwGDUstnC9DIo= github.com/curioswitch/go-reassign v0.2.0/go.mod h1:x6OpXuWvgfQaMGks2BZybTngWjT84hqJfKoO8Tt/Roc= -github.com/daixiang0/gci v0.11.0 h1:XeQbFKkCRxvVyn06EOuNY6LPGBLVuB/W130c8FrnX6A= -github.com/daixiang0/gci v0.11.0/go.mod h1:xtHP9N7AHdNvtRNfcx9gwTDfw7FRJx4bZUsiEfiNNAI= -github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= +github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= +github.com/daixiang0/gci v0.12.1 h1:ugsG+KRYny1VK4oqrX4Vtj70bo4akYKa0tgT1DXMYiY= +github.com/daixiang0/gci v0.12.1/go.mod h1:xtHP9N7AHdNvtRNfcx9gwTDfw7FRJx4bZUsiEfiNNAI= 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= github.com/denis-tingaikin/go-header v0.4.3 h1:tEaZKAlqql6SKCY++utLmkPLd6K8IBM20Ha7UVm+mtU= github.com/denis-tingaikin/go-header v0.4.3/go.mod h1:0wOCWuN71D5qIgE2nz9KrKmuYBAC2Mra5RassOIQ2/c= -github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi/U= -github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= -github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819 h1:RIB4cRk+lBqKK3Oy0r2gRX4ui7tuhiZq2SuTtTCi0/0= -github.com/elliotchance/orderedmap v1.5.0 h1:1IsExUsjv5XNBD3ZdC7jkAAqLWOOKdbPTmkHx63OsBg= -github.com/elliotchance/orderedmap v1.5.0/go.mod h1:wsDwEaX5jEoyhbs7x93zk2H/qv0zwuhg4inXhDkYqys= +github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= +github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/esimonov/ifshort v1.0.4 h1:6SID4yGWfRae/M7hkVDVVyppy8q/v9OuxNdmjLQStBA= github.com/esimonov/ifshort v1.0.4/go.mod h1:Pe8zjlRrJ80+q2CxHLfEOfTwxCZ4O+MuhcHcfgNWTk0= -github.com/ettle/strcase v0.1.1 h1:htFueZyVeE1XNnMEfbqp5r67qAN/4r6ya1ysq8Q+Zcw= -github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/ettle/strcase v0.2.0 h1:fGNiVF21fHXpX1niBgk0aROov1LagYsOwV/xqKDKR/Q= +github.com/ettle/strcase v0.2.0/go.mod h1:DajmHElDSaX76ITe3/VHVyMin4LWSJN5Z909Wp+ED1A= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/firefart/nonamedreturns v1.0.4 h1:abzI1p7mAEPYuR4A+VLKn4eNDOycjYo2phmY9sfv40Y= github.com/firefart/nonamedreturns v1.0.4/go.mod h1:TDhe/tjI1BXo48CmYbUduTV7BdIga8MAO/xbKdcVsGI= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= +github.com/ghostiam/protogetter v0.3.4 h1:5SZ+lZSNmNkSbGVSF9hUHhv/b7ELF9Rwchoq7btYo6c= +github.com/ghostiam/protogetter v0.3.4/go.mod h1:A0JgIhs0fgVnotGinjQiKaFVG3waItLJNwPmcMzDnvk= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= -github.com/go-critic/go-critic v0.9.0 h1:Pmys9qvU3pSML/3GEQ2Xd9RZ/ip+aXHKILuxczKGV/U= -github.com/go-critic/go-critic v0.9.0/go.mod h1:5P8tdXL7m/6qnyG6oRAlYLORvoXH0WDypYgAEmagT40= +github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= +github.com/go-critic/go-critic v0.11.1 h1:/zBseUSUMytnRqxjlsYNbDDxpu3R2yH8oLXo/FOE8b8= +github.com/go-critic/go-critic v0.11.1/go.mod h1:aZVQR7+gazH6aDEQx4356SD7d8ez8MipYjXbEl5JAKA= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= -github.com/go-git/go-billy/v5 v5.4.1 h1:Uwp5tDRkPr+l/TnbHOQzp+tmJfLceOlbVucgpTz8ix4= -github.com/go-git/go-billy/v5 v5.4.1/go.mod h1:vjbugF6Fz7JIflbVpl1hJsGjSHNltrSw45YK/ukIvQg= -github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20230305113008-0c11038e723f h1:Pz0DHeFij3XFhoBRGUDPzSJ+w2UcK5/0JvF8DRI58r8= -github.com/go-git/go-git/v5 v5.8.1 h1:Zo79E4p7TRk0xoRgMq0RShiTHGKcKI4+DI6BfJc/Q+A= -github.com/go-git/go-git/v5 v5.8.1/go.mod h1:FHFuoD6yGz5OSKEBK+aWN9Oah0q54Jxl0abmj6GnqAo= +github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= +github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= +github.com/go-git/go-git/v5 v5.11.0 h1:XIZc1p+8YzypNr34itUfSvYJcv+eYdTnTvOZ2vD3cA4= +github.com/go-git/go-git/v5 v5.11.0/go.mod h1:6GFcX2P3NM7FPBfpePbpLd21XxsgdAt+lKqXmCUiUCY= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -195,37 +193,36 @@ github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vb github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= -github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= -github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= +github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/go-toolsmith/astcast v1.1.0 h1:+JN9xZV1A+Re+95pgnMgDboWNVnIMMQXwfBwLRPgSC8= github.com/go-toolsmith/astcast v1.1.0/go.mod h1:qdcuFWeGGS2xX5bLM/c3U9lewg7+Zu4mr+xPwZIB4ZU= github.com/go-toolsmith/astcopy v1.1.0 h1:YGwBN0WM+ekI/6SS6+52zLDEf8Yvp3n2seZITCUBt5s= github.com/go-toolsmith/astcopy v1.1.0/go.mod h1:hXM6gan18VA1T/daUEHCFcYiW8Ai1tIwIzHY6srfEAw= github.com/go-toolsmith/astequal v1.0.3/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= -github.com/go-toolsmith/astequal v1.1.0 h1:kHKm1AWqClYn15R0K1KKE4RG614D46n+nqUQ06E1dTw= github.com/go-toolsmith/astequal v1.1.0/go.mod h1:sedf7VIdCL22LD8qIvv7Nn9MuWJruQA/ysswh64lffQ= +github.com/go-toolsmith/astequal v1.2.0 h1:3Fs3CYZ1k9Vo4FzFhwwewC3CHISHDnVUPC4x0bI2+Cw= +github.com/go-toolsmith/astequal v1.2.0/go.mod h1:c8NZ3+kSFtFY/8lPso4v8LuJjdJiUFVnSuU3s0qrrDY= github.com/go-toolsmith/astfmt v1.1.0 h1:iJVPDPp6/7AaeLJEruMsBUlOYCmvg0MoCfJprsOmcco= github.com/go-toolsmith/astfmt v1.1.0/go.mod h1:OrcLlRwu0CuiIBp/8b5PYF9ktGVZUjlNMV634mhwuQ4= github.com/go-toolsmith/astp v1.1.0 h1:dXPuCl6u2llURjdPLLDxJeZInAeZ0/eZwFJmqZMnpQA= github.com/go-toolsmith/astp v1.1.0/go.mod h1:0T1xFGz9hicKs8Z5MfAqSUitoUYS30pDMsRVIDHs8CA= github.com/go-toolsmith/pkgload v1.2.2 h1:0CtmHq/02QhxcF7E9N5LIFcYFsMR5rdovfqTtRKkgIk= +github.com/go-toolsmith/pkgload v1.2.2/go.mod h1:R2hxLNRKuAsiXCo2i5J6ZQPhnPMOVtU+f0arbFPWCus= github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= github.com/go-toolsmith/strparse v1.1.0 h1:GAioeZUK9TGxnLS+qfdqNbA4z0SSm5zVNtCQiyP2Bvw= github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ= github.com/go-toolsmith/typep v1.1.0 h1:fIRYDyF+JywLfqzyhdiHzRop/GQDxxNhLGQ6gFUNHus= github.com/go-toolsmith/typep v1.1.0/go.mod h1:fVIw+7zjdsMxDA3ITWnH1yOiw1rnTQKCsF/sk2H/qig= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/go-xmlfmt/xmlfmt v1.1.2 h1:Nea7b4icn8s57fTx1M5AI4qQT5HEM3rVUO8MuE6g80U= github.com/go-xmlfmt/xmlfmt v1.1.2/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= -github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/goccy/go-yaml v1.11.0 h1:n7Z+zx8S9f9KgzG6KtQKf+kwqXZlLNR2F6018Dgau54= -github.com/goccy/go-yaml v1.11.0/go.mod h1:H+mJrWtjPTJAHvRbV09MCK9xYwODM+wRTVFFTWckfng= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -258,26 +255,24 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 h1:23T5iq8rbUYlhpt5DB4XJkc6BU31uODLD1o1gKvZmD0= github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe h1:6RGUuS7EGotKx6J5HIP8ZtyMdiDscjMLfRBSPuzVVeo= github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe/go.mod h1:gjqyPShc/m8pEMpk0a3SeagVb0kaqvhscv+i9jI5ZhQ= -github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2 h1:amWTbTGqOZ71ruzrdA+Nx5WA3tV1N0goTspwmKCQvBY= -github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2/go.mod h1:9wOXstvyDRshQ9LggQuzBCGysxs3b6Uo/1MvYCR2NMs= -github.com/golangci/golangci-lint v1.54.2 h1:oR9zxfWYxt7hFqk6+fw6Enr+E7F0SN2nqHhJYyIb0yo= -github.com/golangci/golangci-lint v1.54.2/go.mod h1:vnsaCTPKCI2wreL9tv7RkHDwUrz3htLjed6+6UsvcwU= +github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e h1:ULcKCDV1LOZPFxGZaA6TlQbiM3J2GCPnkx/bGF6sX/g= +github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e/go.mod h1:Pm5KhLPA8gSnQwrQ6ukebRcapGb/BG9iUkdaiCcGHJM= +github.com/golangci/golangci-lint v1.56.2 h1:dgQzlWHgNbCqJjuxRJhFEnHDVrrjuTGQHJ3RIZMpp/o= +github.com/golangci/golangci-lint v1.56.2/go.mod h1:7CfNO675+EY7j84jihO4iAqDQ80s3HCjcc5M6B7SlZQ= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA= github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= github.com/golangci/misspell v0.4.1 h1:+y73iSicVy2PqyX7kmUefHusENlrP9YwuHZHPLGQj/g= github.com/golangci/misspell v0.4.1/go.mod h1:9mAN1quEo3DlpbaIKKyEvRxK1pwqR9s/Sea1bJCtlNI= -github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 h1:DIPQnGy2Gv2FSA4B/hh8Q7xx3B7AIDk3DAMeHclH1vQ= -github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6/go.mod h1:0AKcRCkMoKvUvlf89F6O7H2LYdhr1zBh736mBItOdRs= +github.com/golangci/revgrep v0.5.2 h1:EndcWoRhcnfj2NHQ+28hyuXpLMF+dQmCN+YaeeIl4FU= +github.com/golangci/revgrep v0.5.2/go.mod h1:bjAMA+Sh/QUfTDcHzxfyHxr4xKvllVr/0sCv2e7jJHA= github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys= github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= github.com/google/addlicense v1.1.1 h1:jpVf9qPbU8rz5MxKo7d+RMcNHkqxi4YJi/laauX4aAE= @@ -285,6 +280,7 @@ github.com/google/addlicense v1.1.1/go.mod h1:Sm/DHu7Jk+T5miFHHehdIjbi4M5+dJDRS3 github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmdtest v0.4.1-0.20220921163831-55ab3332a786 h1:rcv+Ippz6RAtvaGgKxc+8FQIpxHgsF+HBzPyYL2cyVU= +github.com/google/go-cmdtest v0.4.1-0.20220921163831-55ab3332a786/go.mod h1:apVn/GCasLZUVpAJ6oWAuyP7Ne7CEsQbTnc0plM3m+o= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -297,12 +293,11 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -310,18 +305,14 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601 h1:mrEEilTAUmaAORhssPPkxj84TsHrPMLBGW2Z4SoTxm8= -github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= +github.com/gordonklaus/ineffassign v0.1.0 h1:y2Gd/9I7MdY1oEIt+n+rowjBNDcLQq3RsH5hwJd0f9s= +github.com/gordonklaus/ineffassign v0.1.0/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= github.com/gostaticanalysis/analysisutil v0.7.1 h1:ZMCjoue3DtDWQ5WyU16YbjbQEQ3VuzwxALrpYd+HeKk= github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= @@ -333,10 +324,7 @@ github.com/gostaticanalysis/nilerr v0.1.1 h1:ThE+hJP0fEp4zWLkWHWcRyI2Od0p7DlgYG3 github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= github.com/gostaticanalysis/testutil v0.4.0 h1:nhdCmubdmDF6VEatUNjgUZBJKWRqugoISdUv3PPQgHY= -github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= -github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/gostaticanalysis/testutil v0.4.0/go.mod h1:bLIoPefWXrRi/ssLFWX1dx7Repi5x3CuviD3dgAZaBU= github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= @@ -347,21 +335,20 @@ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= -github.com/jcchavezs/porto v0.4.0 h1:Zj7RligrxmDdKGo6fBO2xYAHxEgrVBfs1YAja20WbV4= -github.com/jcchavezs/porto v0.4.0/go.mod h1:fESH0gzDHiutHRdX2hv27ojnOVFco37hg1W6E9EZF4A= -github.com/jgautheron/goconst v1.5.1 h1:HxVbL1MhydKs8R8n/HE5NPvzfaYmQJA3o879lE4+WcM= -github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= +github.com/jcchavezs/porto v0.6.0 h1:AgQLGwsXaxDkPj4Y+paFkVGLAR4n/1RRF0xV5UKinwg= +github.com/jcchavezs/porto v0.6.0/go.mod h1:fESH0gzDHiutHRdX2hv27ojnOVFco37hg1W6E9EZF4A= +github.com/jgautheron/goconst v1.7.0 h1:cEqH+YBKLsECnRSd4F4TK5ri8t/aXtt/qoL0Ft252B0= +github.com/jgautheron/goconst v1.7.0/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= -github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg= -github.com/jinzhu/copier v0.3.5/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9BjwUk7KlCh6S9EAGWBt1oExIUv9WyNCiRz5amv48= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= +github.com/jjti/go-spancheck v0.5.2 h1:WXTZG3efY/ji1Vi8mkH+23O3bLeKR6hp3tI3YB7XwKk= +github.com/jjti/go-spancheck v0.5.2/go.mod h1:ARPNI1JRG1V2Rjnd6/2f2NEfghjSVDZGVmruNKlnXU0= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -375,38 +362,38 @@ github.com/julz/importas v0.1.0 h1:F78HnrsjY3cR7j0etXy5+TU1Zuy7Xt08X/1aJnH5xXY= github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/kisielk/errcheck v1.6.3 h1:dEKh+GLHcWm2oN34nMvDzn1sqI0i0WxPvrgiJA5JuM8= -github.com/kisielk/errcheck v1.6.3/go.mod h1:nXw/i/MfnvRHqXa7XXmQMUB0oNFGuBrNI8d8NLy0LPw= +github.com/kisielk/errcheck v1.7.0 h1:+SbscKmWJ5mOK/bO1zS60F5I9WwZDWOfRsC4RwfwRV0= +github.com/kisielk/errcheck v1.7.0/go.mod h1:1kLL+jV4e+CFfueBmI1dSK2ADDyQnlrnrY/FqKluHJQ= github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkHAIKE/contextcheck v1.1.4 h1:B6zAaLhOEEcjvUgIYEqystmnFk1Oemn8bvJhbt0GMb8= github.com/kkHAIKE/contextcheck v1.1.4/go.mod h1:1+i/gWqokIa+dm31mqGLZhZJ7Uh44DJGZVmr6QRBNJg= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kulti/thelper v0.6.3 h1:ElhKf+AlItIu+xGnI990no4cE2+XaSu1ULymV2Yulxs= github.com/kulti/thelper v0.6.3/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= -github.com/kunwardeep/paralleltest v1.0.8 h1:Ul2KsqtzFxTlSU7IP0JusWlLiNqQaloB9vguyjbE558= -github.com/kunwardeep/paralleltest v1.0.8/go.mod h1:2C7s65hONVqY7Q5Efj5aLzRCNLjw2h4eMc9EcypGjcY= +github.com/kunwardeep/paralleltest v1.0.9 h1:3Sr2IfFNcsMmlqPk1cjTUbJ4zofKPGyHxenwPebgTug= +github.com/kunwardeep/paralleltest v1.0.9/go.mod h1:2C7s65hONVqY7Q5Efj5aLzRCNLjw2h4eMc9EcypGjcY= github.com/kyoh86/exportloopref v0.1.11 h1:1Z0bcmTypkL3Q4k+IDHMWTcnCliEZcaPiIe0/ymEyhQ= github.com/kyoh86/exportloopref v0.1.11/go.mod h1:qkV4UF1zGl6EkF1ox8L5t9SwyeBAZ3qLMd6up458uqA= github.com/ldez/gomoddirectives v0.2.3 h1:y7MBaisZVDYmKvt9/l1mjNCiSA1BVn34U0ObUcJwlhA= github.com/ldez/gomoddirectives v0.2.3/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= github.com/ldez/tagliatelle v0.5.0 h1:epgfuYt9v0CG3fms0pEgIMNPuFf/LpPIfjk4kyqSioo= github.com/ldez/tagliatelle v0.5.0/go.mod h1:rj1HmWiL1MiKQuOONhd09iySTEkUuE/8+5jtPYz9xa4= -github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leonklingele/grouper v1.1.1 h1:suWXRU57D4/Enn6pXR0QVqqWWrnJ9Osrz+5rjt8ivzU= github.com/leonklingele/grouper v1.1.1/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY= github.com/lufeee/execinquery v1.2.1 h1:hf0Ems4SHcUGBxpGN7Jz78z1ppVkP/837ZlETPCEtOM= github.com/lufeee/execinquery v1.2.1/go.mod h1:EC7DrEKView09ocscGHC+apXMIaorh4xqSxS/dy8SbM= +github.com/macabu/inamedparam v0.1.3 h1:2tk/phHkMlEL/1GNe/Yf6kkR/hkcUdAEY3L0hjYV1Mk= +github.com/macabu/inamedparam v0.1.3/go.mod h1:93FLICAIk/quk7eaPPQvbzihUdn/QkGDwIZEoLtpH6I= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/maratori/testableexamples v1.0.0 h1:dU5alXRrD8WKSjOUnmJZuzdxWOEQ57+7s93SLMxb2vI= @@ -415,29 +402,24 @@ github.com/maratori/testpackage v1.1.1 h1:S58XVV5AD7HADMmD0fNnziNHqKvSdDuEKdPD1r github.com/maratori/testpackage v1.1.1/go.mod h1:s4gRK/ym6AMrqpOa/kEbQTV4Q4jb7WeLZzVhVVVOQMc= github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 h1:gWg6ZQ4JhDfJPqlo2srm/LN17lpybq15AryXIRcWYLE= github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= -github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/mbilski/exhaustivestruct v1.2.0 h1:wCBmUnSYufAHO6J4AVWY6ff+oxWxsVFrwgOdMUQePUo= github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= -github.com/mgechev/revive v1.3.2 h1:Wb8NQKBaALBJ3xrrj4zpwJwqwNA6nDpyJSEQWcCka6U= -github.com/mgechev/revive v1.3.2/go.mod h1:UCLtc7o5vg5aXCwdUTU1kEBQ1v+YXPAkYDIDXbrs5I0= -github.com/mikefarah/yq/v4 v4.35.1 h1:NTQ6CECE+9fjxPhBojdsmUvQM8YCmaZITz0+/nbWkbc= -github.com/mikefarah/yq/v4 v4.35.1/go.mod h1:KdjcC3wn+Dm9qp6A2WAKMXY6YQ3wxPvh3mj8A7NPK1E= +github.com/mgechev/revive v1.3.7 h1:502QY0vQGe9KtYJ9FpxMz9rL+Fc/P13CI5POL4uHCcE= +github.com/mgechev/revive v1.3.7/go.mod h1:RJ16jUbF0OWC3co/+XTxmFNgEpUPwnnA0BRllX2aDNA= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= -github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -451,66 +433,65 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nakabonne/nestif v0.3.1 h1:wm28nZjhQY5HyYPx+weN3Q65k6ilSBxDb8v5S81B81U= github.com/nakabonne/nestif v0.3.1/go.mod h1:9EtoZochLn5iUprVDmDjqGKPofoUEBL8U4Ngq6aY7OE= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nishanths/exhaustive v0.11.0 h1:T3I8nUGhl/Cwu5Z2hfc92l0e04D2GEW6e0l8pzda2l0= -github.com/nishanths/exhaustive v0.11.0/go.mod h1:RqwDsZ1xY0dNdqHho2z6X+bgzizwbLYOWnZbbl2wLB4= +github.com/nishanths/exhaustive v0.12.0 h1:vIY9sALmw6T/yxiASewa4TQcFsVYZQQRUQJhKRf3Swg= +github.com/nishanths/exhaustive v0.12.0/go.mod h1:mEZ95wPIZW+x8kC4TgC+9YCUgiST7ecevsVDTgc2obs= github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk= github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= -github.com/nunnatsa/ginkgolinter v0.13.5 h1:fOsPB4CEZOPkyMqF4B9hoqOpooFWU7vWSVkCSscVpgU= -github.com/nunnatsa/ginkgolinter v0.13.5/go.mod h1:OBHy4536xtuX3102NM63XRtOyxqZOO02chsaeDWXVO8= +github.com/nunnatsa/ginkgolinter v0.15.2 h1:N2ORxUxPU56R9gsfLIlVVvCv/V/VVou5qVI1oBKBNHg= +github.com/nunnatsa/ginkgolinter v0.15.2/go.mod h1:oYxE7dt1vZI8cK2rZOs3RgTaBN2vggkqnENmoJ8kVvc= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= -github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= -github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= +github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM= +github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo= +github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= -github.com/otiai10/copy v1.12.0 h1:cLMgSQnXBs1eehF0Wy/FAGsgDTDmAqFR7rQylBb1nDY= +github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= +github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= github.com/pavius/impi v0.0.3 h1:DND6MzU+BLABhOZXbELR3FU8b+zDgcq4dOCNLhiTYuI= github.com/pavius/impi v0.0.3/go.mod h1:x/hU0bfdWIhuOT1SKwiJg++yvkk6EuOtJk8WtDZqgr8= -github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0= -github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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/polyfloyd/go-errorlint v1.4.4 h1:A9gytp+p6TYqeALTYRoxJESYP8wJRETRX2xzGWFsEBU= -github.com/polyfloyd/go-errorlint v1.4.4/go.mod h1:ry5NqF7l9Q77V+XqAfUg1zfryrEtyac3G5+WVpIK0xU= +github.com/polyfloyd/go-errorlint v1.4.8 h1:jiEjKDH33ouFktyez7sckv6pHWif9B7SuS8cutDXFHw= +github.com/polyfloyd/go-errorlint v1.4.8/go.mod h1:NNCxFcFjZcw3xNjVdCchERkEM6Oz7wta2XJVxRftwO4= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= +github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= +github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= +github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= +github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= github.com/quasilyte/go-ruleguard v0.4.0 h1:DyM6r+TKL+xbKB4Nm7Afd1IQh9kEUKQs2pboWGKtvQo= github.com/quasilyte/go-ruleguard v0.4.0/go.mod h1:Eu76Z/R8IXtViWUIHkE3p8gdH3/PKk1eh3YGfaEof10= github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo= @@ -520,22 +501,21 @@ github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:r github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryancurrah/gomodguard v1.3.0 h1:q15RT/pd6UggBXVBuLps8BXRvl5GPBcwVA7BJHMLuTw= github.com/ryancurrah/gomodguard v1.3.0/go.mod h1:ggBxb3luypPEzqVtq33ee7YSN35V28XeGnid8dnni50= -github.com/ryanrolds/sqlclosecheck v0.4.0 h1:i8SX60Rppc1wRuyQjMciLqIzV3xnoHB7/tXbr6RGYNI= -github.com/ryanrolds/sqlclosecheck v0.4.0/go.mod h1:TBRRjzL31JONc9i4XMinicuo+s+E8yKZ5FN8X3G6CKQ= -github.com/sanity-io/litter v1.5.5 h1:iE+sBxPBzoK6uaEP5Lt3fHNgpKcHXc/A2HGETy0uJQo= -github.com/sanity-io/litter v1.5.5/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U= +github.com/ryanrolds/sqlclosecheck v0.5.1 h1:dibWW826u0P8jNLsLN+En7+RqWWTYrjCB9fJfSfdyCU= +github.com/ryanrolds/sqlclosecheck v0.5.1/go.mod h1:2g3dUjoS6AL4huFdv6wn55WpLIDjY7ZgUR4J8HOO/XQ= github.com/sanposhiho/wastedassign/v2 v2.0.7 h1:J+6nrY4VW+gC9xFzUc+XjPD3g3wF3je/NsJFwFK7Uxc= github.com/sanposhiho/wastedassign/v2 v2.0.7/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tMEOsumirXcOJqAw= github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= -github.com/sashamelentyev/usestdlibvars v1.24.0 h1:MKNzmXtGh5N0y74Z/CIaJh4GlB364l0K1RUT08WSWAc= -github.com/sashamelentyev/usestdlibvars v1.24.0/go.mod h1:9cYkq+gYJ+a5W2RPdhfaSCnTVUC1OQP/bSiiBhq3OZE= -github.com/securego/gosec/v2 v2.17.0 h1:ZpAStTDKY39insEG9OH6kV3IkhQZPTq9a9eGOLOjcdI= -github.com/securego/gosec/v2 v2.17.0/go.mod h1:lt+mgC91VSmriVoJLentrMkRCYs+HLTBnUFUBuhV2hc= +github.com/sashamelentyev/usestdlibvars v1.25.0 h1:IK8SI2QyFzy/2OD2PYnhy84dpfNo9qADrRt6LH8vSzU= +github.com/sashamelentyev/usestdlibvars v1.25.0/go.mod h1:9nl0jgOfHKWNFS43Ojw0i7aRoS4j6EBye3YBhmAIRF8= +github.com/securego/gosec/v2 v2.19.0 h1:gl5xMkOI0/E6Hxx0XCY2XujA3V7SNSefA8sC+3f1gnk= +github.com/securego/gosec/v2 v2.19.0/go.mod h1:hOkDcHz9J/XIgIlPDXalxjeVYsHxoWUc5zJSHxcB8YM= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU= @@ -554,18 +534,18 @@ github.com/sivchari/nosnakecase v1.7.0 h1:7QkpWIRMe8x25gckkFd2A5Pi6Ymo0qgr4JrhGt github.com/sivchari/nosnakecase v1.7.0/go.mod h1:CwDzrzPea40/GB6uynrNLiorAlgFRvRbFSgJx2Gs+QY= github.com/sivchari/tenv v1.7.1 h1:PSpuD4bu6fSmtWMxSGWcvqUUgIn7k3yOJhOIzVWn8Ak= github.com/sivchari/tenv v1.7.1/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= -github.com/skeema/knownhosts v1.2.0 h1:h9r9cf0+u7wSE+M183ZtMGgOJKiL96brpaz5ekfJCpM= -github.com/skeema/knownhosts v1.2.0/go.mod h1:g4fPeYpque7P0xefxtGzV81ihjC8sX2IqpAoNkjxbMo= +github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ= +github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= github.com/sonatard/noctx v0.0.2 h1:L7Dz4De2zDQhW8S0t+KUjY0MAQJd6SgVwhzNIc4ok00= github.com/sonatard/noctx v0.0.2/go.mod h1:kzFz+CzWSjQ2OzIm46uJZoXuBpa2+0y3T36U18dWqIo= github.com/sourcegraph/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCpA8G0= github.com/sourcegraph/go-diff v0.7.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -581,7 +561,6 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v0.0.0-20161117074351-18a02ba4a312/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -590,7 +569,6 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 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.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= @@ -603,8 +581,8 @@ github.com/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3 h1:f+jULpRQGxTSkNYKJ51yaw6ChIqO+Je8UqsTKN/cDag= github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= -github.com/tetafro/godot v1.4.14 h1:ScO641OHpf9UpHPk8fCknSuXNMpi4iFlwuWoBs3L+1s= -github.com/tetafro/godot v1.4.14/go.mod h1:2oVxTBSftRTh4+MVfUaUXR6bn2GDXCaMcOG4Dk3rfio= +github.com/tetafro/godot v1.4.16 h1:4ChfhveiNLk4NveAZ9Pu2AN8QZ2nkUGFuadM9lrr5D0= +github.com/tetafro/godot v1.4.16/go.mod h1:2oVxTBSftRTh4+MVfUaUXR6bn2GDXCaMcOG4Dk3rfio= github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 h1:quvGphlmUVU+nhpFa4gg4yJyTRJ13reZMDHrKwYw53M= github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966/go.mod h1:27bSVNWSBOHm+qRp1T9qzaIpsWEP6TbUnei/43HK+PQ= github.com/timonwong/loggercheck v0.9.4 h1:HKKhqrjcVj8sxL7K77beXh0adEm6DLjV/QOGeMXEVi4= @@ -615,20 +593,20 @@ github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+ github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/ultraware/funlen v0.1.0 h1:BuqclbkY6pO+cvxoq7OsktIXZpgBSkYTQtmwhAK81vI= github.com/ultraware/funlen v0.1.0/go.mod h1:XJqmOQja6DpxarLj6Jj1U7JuoS8PvL4nEqDaQhy22p4= -github.com/ultraware/whitespace v0.0.5 h1:hh+/cpIcopyMYbZNVov9iSxvJU3OYQg78Sfaqzi/CzI= -github.com/ultraware/whitespace v0.0.5/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= -github.com/uudashr/gocognit v1.0.7 h1:e9aFXgKgUJrQ5+bs61zBigmj7bFJ/5cC6HmMahVzuDo= -github.com/uudashr/gocognit v1.0.7/go.mod h1:nAIUuVBnYU7pcninia3BHOvQkpQCeO76Uscky5BOwcY= +github.com/ultraware/whitespace v0.1.0 h1:O1HKYoh0kIeqE8sFqZf1o0qbORXUCOQFrlaQyZsczZw= +github.com/ultraware/whitespace v0.1.0/go.mod h1:/se4r3beMFNmewJ4Xmz0nMQ941GJt+qmSHGP9emHYe0= +github.com/uudashr/gocognit v1.1.2 h1:l6BAEKJqQH2UpKAPKdMfZf5kE4W/2xk8pfU1OVLvniI= +github.com/uudashr/gocognit v1.1.2/go.mod h1:aAVdLURqcanke8h3vg35BC++eseDm66Z7KmchI5et4k= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= -github.com/xen0n/gosmopolitan v1.2.1 h1:3pttnTuFumELBRSh+KQs1zcz4fN6Zy7aB0xlnQSn1Iw= -github.com/xen0n/gosmopolitan v1.2.1/go.mod h1:JsHq/Brs1o050OOdmzHeOr0N7OtlnKRAGAsElF8xBQA= +github.com/xen0n/gosmopolitan v1.2.2 h1:/p2KTnMzwRexIW8GlKawsTWOxn7UHA+jCMF/V8HHtvU= +github.com/xen0n/gosmopolitan v1.2.2/go.mod h1:7XX7Mj61uLYrj0qmeN0zi7XDon9JRAEhYQqAPLVNTeg= github.com/yagipy/maintidx v1.0.0 h1:h5NvIsCz+nRDapQ0exNv4aJ0yXSI0420omVANTv3GJM= github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= github.com/yeya24/promlinter v0.2.0 h1:xFKDQ82orCU5jQujdaD8stOHiv8UN68BSdn2a8u8Y3o= github.com/yeya24/promlinter v0.2.0/go.mod h1:u54lkmBOZrpEbQQ6gox2zWKKLKu2SGe+2KOiextY+IA= -github.com/ykadowak/zerologlint v0.1.3 h1:TLy1dTW3Nuc+YE3bYRPToG1Q9Ej78b5UUN6bjbGdxPE= -github.com/ykadowak/zerologlint v0.1.3/go.mod h1:KaUskqF3e/v59oPmdq1U1DnKcuHokl2/K1U4pmIELKg= +github.com/ykadowak/zerologlint v0.1.5 h1:Gy/fMz1dFQN9JZTPjv1hxEk+sRWm05row04Yoolgdiw= +github.com/ykadowak/zerologlint v0.1.5/go.mod h1:KaUskqF3e/v59oPmdq1U1DnKcuHokl2/K1U4pmIELKg= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -636,30 +614,33 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -gitlab.com/bosi/decorder v0.4.0 h1:HWuxAhSxIvsITcXeP+iIRg9d1cVfvVkmlF7M68GaoDY= -gitlab.com/bosi/decorder v0.4.0/go.mod h1:xarnteyUoJiOTEldDysquWKTVDCKo2TOIOIibSuWqOg= -go-simpler.org/assert v0.6.0 h1:QxSrXa4oRuo/1eHMXSBFHKvJIpWABayzKldqZyugG7E= +gitlab.com/bosi/decorder v0.4.1 h1:VdsdfxhstabyhZovHafFw+9eJ6eU0d2CkFNJcZz/NU4= +gitlab.com/bosi/decorder v0.4.1/go.mod h1:jecSqWUew6Yle1pCr2eLWTensJMmsxHsBwt+PVbkAqA= +go-simpler.org/assert v0.7.0 h1:OzWWZqfNxt8cLS+MlUp6Tgk1HjPkmgdKBq9qvy8lZsA= +go-simpler.org/assert v0.7.0/go.mod h1:74Eqh5eI6vCK6Y5l3PI8ZYFXG4Sa+tkr70OIPJAUr28= +go-simpler.org/musttag v0.8.0 h1:DR4UTgetNNhPRNo02rkK1hwDTRzAPotN+ZqYpdtEwWc= +go-simpler.org/musttag v0.8.0/go.mod h1:fiNdCkXt2S6je9Eblma3okjnlva9NT1Eg/WUt19rWu8= +go-simpler.org/sloglint v0.4.0 h1:UVJuUJo63iNQNFEOtZ6o1xAgagVg/giVLLvG9nNLobI= +go-simpler.org/sloglint v0.4.0/go.mod h1:v6zJ++j/thFPhefs2wEXoCKwT10yo5nkBDYRCXyqgNQ= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opentelemetry.io/build-tools v0.11.0 h1:yXTgCJM/vxWZEB8FbgVhKOAFnRlacG2Z3eoTQZ0/gYE= -go.opentelemetry.io/build-tools v0.11.0/go.mod h1:GFpz8YD/DG5shfY1J2f3uuK88zr61U5rVRGOhKMDE9M= -go.opentelemetry.io/build-tools/checkfile v0.11.0 h1:Qtp1ZKj9jXwR9zL4/YEzRv7CmTajSPJwoTRrrZ24mpQ= -go.opentelemetry.io/build-tools/checkfile v0.11.0/go.mod h1:0Ql58QUUwr2jaQJSjFKkAFkT/Eent7eEOKiQ1+R+zvA= -go.opentelemetry.io/build-tools/chloggen v0.11.0 h1:PYbfjzw/4pHNfwH0kCAMolvmdorMVGxSSFY8A9097fw= -go.opentelemetry.io/build-tools/chloggen v0.11.0/go.mod h1:zuYbAo3TkrHo3C7lCrM5dHWSS50BDr0UfRYtyBFv2dQ= -go.opentelemetry.io/build-tools/crosslink v0.11.0 h1:K0eJY/AT6SiIaoJSrQyiVquGErcJEHsx4oHkhxvpj9k= -go.opentelemetry.io/build-tools/crosslink v0.11.0/go.mod h1:h5oxbHx+O50aO0/M7mFejZmd7cMONdsmmC+IOmgWoWw= -go.opentelemetry.io/build-tools/multimod v0.11.0 h1:QMo2Y4BlsTsWUR0LXV4gmiv5yEiX2iPLn2qAdAcCE6k= -go.opentelemetry.io/build-tools/multimod v0.11.0/go.mod h1:EID7sjEGyk1FWzRdsV6rlWp43IIn8iHXGE5pM4TytyQ= -go.opentelemetry.io/build-tools/semconvgen v0.11.0 h1:gQsNzy49l9JjNozybaRUl+vy0EMxYasV8w6aK+IWquc= -go.opentelemetry.io/build-tools/semconvgen v0.11.0/go.mod h1:Zy04Bw3w3lT7mORe23V2BwjfJYpoza6Xz1XSMIrLTCg= -go.tmz.dev/musttag v0.7.2 h1:1J6S9ipDbalBSODNT5jCep8dhZyMr4ttnjQagmGYR5s= -go.tmz.dev/musttag v0.7.2/go.mod h1:m6q5NiiSKMnQYokefa2xGoyoXnrswCbJ0AWYzf4Zs28= +go.opentelemetry.io/build-tools v0.12.0 h1:ZqK1GuqBp9Mf1RthYO3/jjf9tPWzeHMcVDo0itFi/lI= +go.opentelemetry.io/build-tools v0.12.0/go.mod h1:I76Qvv9cN055XJfTHw9t257EUd5Yp0EofeTMESlZuRU= +go.opentelemetry.io/build-tools/checkfile v0.12.0 h1:1g3iBxjPuack0pEvqkTiEcyh0uJvKXkQg8IMJkhiFX0= +go.opentelemetry.io/build-tools/checkfile v0.12.0/go.mod h1:0Ql58QUUwr2jaQJSjFKkAFkT/Eent7eEOKiQ1+R+zvA= +go.opentelemetry.io/build-tools/chloggen v0.12.0 h1:BFj/1bNIGxOs1GykGjhV4gycz1nqVWI/xVDUaVfNibw= +go.opentelemetry.io/build-tools/chloggen v0.12.0/go.mod h1:zuYbAo3TkrHo3C7lCrM5dHWSS50BDr0UfRYtyBFv2dQ= +go.opentelemetry.io/build-tools/crosslink v0.12.1-0.20240121161735-d70c842b1bf5 h1:3XxFDNe5QBv6qPqUJK/ihejuTpJfCPSFyoJuP8DHKew= +go.opentelemetry.io/build-tools/crosslink v0.12.1-0.20240121161735-d70c842b1bf5/go.mod h1:pHYd1joKyVZPA5sf6gOrbzfbY8VFDiXFp0fVi68whAU= +go.opentelemetry.io/build-tools/multimod v0.12.0 h1:DKi+A+4EaKrOZDTNDDZz3ijiAduEQDo8j1rzWUaGUHo= +go.opentelemetry.io/build-tools/multimod v0.12.0/go.mod h1:w03q3WgZs7reoBNnmfdClkKdTIA/IHM8ric5E2jEDD0= +go.opentelemetry.io/build-tools/semconvgen v0.12.0 h1:AsjYFwo8sSLAjwjklj+yVwm2xogJUxRf5pxflATg9N0= +go.opentelemetry.io/build-tools/semconvgen v0.12.0/go.mod h1:SRmou8pp+7gBmf1AvdxOTwVts74Syyrgm1/Qx7R8mis= go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= @@ -670,15 +651,13 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -689,12 +668,12 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 h1:FqrVOBQxQ8r/UwwXibI0KMolVhvFiGobSfdE33deHJM= -golang.org/x/exp v0.0.0-20230711023510-fffb14384f22/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20240119083558-1b970713d09a h1:Q8/wZp0KX97QFTc2ywcOE0YRjZPVIx+MXInMzdvQqcA= +golang.org/x/exp v0.0.0-20240119083558-1b970713d09a/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= -golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833 h1:jWGQJV4niP+CCmFW9ekjA9Zx8vYORzOUH2/Nl5WPuLQ= -golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20231219180239-dc181d75b848 h1:UhRVJ0i7bF9n/Hd8YjW3eKjlPVBHzbQdxrBgjbSKl64= +golang.org/x/exp/typeparams v0.0.0-20231219180239-dc181d75b848/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -707,7 +686,6 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -716,7 +694,6 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= @@ -725,8 +702,8 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= +golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -756,9 +733,6 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -770,17 +744,13 @@ golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -795,8 +765,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -829,17 +799,12 @@ golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -851,15 +816,14 @@ golang.org/x/sys v0.0.0-20220702020025-31831981b65f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 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= @@ -867,21 +831,21 @@ golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= +golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -932,14 +896,8 @@ golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= @@ -953,16 +911,14 @@ golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= -golang.org/x/vuln v1.0.1 h1:KUas02EjQK5LTuIx1OylBQdKKZ9jeugs+HiqO5HormU= -golang.org/x/vuln v1.0.1/go.mod h1:bb2hMwln/tqxg32BNY4CcxHWtHXuYa3SbIBmtsyjxtM= +golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= +golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= +golang.org/x/vuln v1.0.4 h1:SP0mPeg2PmGCu03V+61EcQiOjmpri2XijexKdzv8Z1I= +golang.org/x/vuln v1.0.4/go.mod h1:NbJdUQhX8jY++FtuhrXs2Eyx0yePo9pF7nPlIjo9aaQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -979,16 +935,12 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1018,13 +970,6 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1037,10 +982,6 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1064,8 +1005,6 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EV gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/op/go-logging.v1 v1.0.0-20160211212156-b2cb9fa56473 h1:6D+BvnJ/j6e222UW8s2qTSe3wGBtvo0MbVQG/c5k8RE= -gopkg.in/op/go-logging.v1 v1.0.0-20160211212156-b2cb9fa56473/go.mod h1:N1eN2tsCx0Ydtgjl4cqmbRCsY4/+z4cYDeqwZTk6zog= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1085,16 +1024,16 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.4.5 h1:YGD4H+SuIOOqsyoLOpZDWcieM28W47/zRO7f+9V3nvo= -honnef.co/go/tools v0.4.5/go.mod h1:GUV+uIBCLpdf0/v6UhHHG/yzI/z6qPskBeQCjcNB96k= -mvdan.cc/gofumpt v0.5.0 h1:0EQ+Z56k8tXjj/6TQD25BFNKQXpCvT0rnansIc7Ug5E= -mvdan.cc/gofumpt v0.5.0/go.mod h1:HBeVDtMKRZpXyxFciAirzdKklDlGu8aAy1wEbH5Y9js= +honnef.co/go/tools v0.4.6 h1:oFEHCKeID7to/3autwsWfnuv69j3NsfcXbvJKuIcep8= +honnef.co/go/tools v0.4.6/go.mod h1:+rnGS1THNh8zMwnd2oVOTL9QF6vmfyG6ZXBULae2uc0= +mvdan.cc/gofumpt v0.6.0 h1:G3QvahNDmpD+Aek/bNOLrFR2XC6ZAdo62dZu65gmwGo= +mvdan.cc/gofumpt v0.6.0/go.mod h1:4L0wf+kgIPZtcCWXynNS2e6bhmj73umwnuXSZarixzA= mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed h1:WX1yoOaKQfddO/mLzdV4wptyWgoH/6hwLs7QHTixo0I= mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphDJbHOQO1DFFFTeBo= mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= -mvdan.cc/unparam v0.0.0-20230312165513-e84e2d14e3b8 h1:VuJo4Mt0EVPychre4fNlDWDuE5AjXtPJpRUWqZDQhaI= -mvdan.cc/unparam v0.0.0-20230312165513-e84e2d14e3b8/go.mod h1:Oh/d7dEtzsNHGOq1Cdv8aMm3KdKhVvPbRQcM8WFpBR8= +mvdan.cc/unparam v0.0.0-20240104100049-c549a3470d14 h1:zCr3iRRgdk5eIikZNDphGcM6KGVTx3Yu+/Uu9Es254w= +mvdan.cc/unparam v0.0.0-20240104100049-c549a3470d14/go.mod h1:ZzZjEpJDOmx8TdVU6umamY3Xy0UAQUI2DHbf05USVbI= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/internal/tools/jsonschema_patch.sed b/internal/tools/jsonschema_patch.sed deleted file mode 100644 index 04090d912d0..00000000000 --- a/internal/tools/jsonschema_patch.sed +++ /dev/null @@ -1,4 +0,0 @@ -# go-jsonschema always generates patternProperties as -# map[string]interface{}, for more specific types, they must -# be replaced here -s+type Headers.*+type Headers map[string]string+g \ No newline at end of file diff --git a/internal/tools/semconvkit/main.go b/internal/tools/semconvkit/main.go new file mode 100644 index 00000000000..2dc73c37c05 --- /dev/null +++ b/internal/tools/semconvkit/main.go @@ -0,0 +1,70 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package main + +import ( + "embed" + "flag" + "log" + "os" + "path/filepath" + "strings" + "text/template" +) + +var ( + out = flag.String("output", "./", "output directory") + tag = flag.String("tag", "", "OpenTelemetry tagged version") + + //go:embed templates/*.tmpl + rootFS embed.FS +) + +// SemanticConventions are information about the semantic conventions being +// generated. +type SemanticConventions struct { + // TagVer is the tagged version (i.e. v1.7.0 and not 1.7.0). + TagVer string +} + +func (sc SemanticConventions) SemVer() string { + return strings.TrimPrefix(*tag, "v") +} + +// render renders all templates to the dest directory using the data. +func render(src, dest string, data *SemanticConventions) error { + tmpls, err := template.ParseFS(rootFS, src) + if err != nil { + return err + } + for _, tmpl := range tmpls.Templates() { + target := filepath.Join(dest, strings.TrimSuffix(tmpl.Name(), ".tmpl")) + // nolint: gosec + wr, err := os.Create(target) + if err != nil { + return err + } + + err = tmpl.Execute(wr, data) + if err != nil { + return err + } + } + + return nil +} + +func main() { + flag.Parse() + + if *tag == "" { + log.Fatalf("invalid tag: %q", *tag) + } + + sc := &SemanticConventions{TagVer: *tag} + + if err := render("templates/*.tmpl", *out, sc); err != nil { + log.Fatal(err) + } +} diff --git a/internal/tools/semconvkit/templates/doc.go.tmpl b/internal/tools/semconvkit/templates/doc.go.tmpl new file mode 100644 index 00000000000..0085e604fae --- /dev/null +++ b/internal/tools/semconvkit/templates/doc.go.tmpl @@ -0,0 +1,9 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package semconv implements OpenTelemetry semantic conventions. +// +// OpenTelemetry semantic conventions are agreed standardized naming +// patterns for OpenTelemetry things. This package represents the {{.TagVer}} +// version of the OpenTelemetry semantic conventions. +package semconv // import "go.opentelemetry.io/collector/semconv/{{.TagVer}}" diff --git a/internal/tools/semconvkit/templates/schema.go.tmpl b/internal/tools/semconvkit/templates/schema.go.tmpl new file mode 100644 index 00000000000..41006fa206b --- /dev/null +++ b/internal/tools/semconvkit/templates/schema.go.tmpl @@ -0,0 +1,9 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package semconv // import "go.opentelemetry.io/collector/semconv/{{.TagVer}}" + +// SchemaURL is the schema URL that matches the version of the semantic conventions +// that this package defines. Semconv packages starting from v1.4.0 must declare +// non-empty schema URL in the form https://opentelemetry.io/schemas/ +const SchemaURL = "https://opentelemetry.io/schemas/{{.SemVer}}" diff --git a/internal/tools/tools.go b/internal/tools/tools.go index 1cc59069724..06f143c3701 100644 --- a/internal/tools/tools.go +++ b/internal/tools/tools.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build tools -// +build tools package tools // import "go.opentelemetry.io/collector/internal/tools" @@ -13,12 +12,10 @@ package tools // import "go.opentelemetry.io/collector/internal/tools" import ( _ "github.com/a8m/envsubst/cmd/envsubst" - _ "github.com/atombender/go-jsonschema/cmd/gojsonschema" _ "github.com/client9/misspell/cmd/misspell" _ "github.com/golangci/golangci-lint/cmd/golangci-lint" _ "github.com/google/addlicense" _ "github.com/jcchavezs/porto/cmd/porto" - _ "github.com/mikefarah/yq/v4" _ "github.com/pavius/impi/cmd/impi" _ "go.opentelemetry.io/build-tools/checkfile" _ "go.opentelemetry.io/build-tools/chloggen" @@ -28,4 +25,6 @@ import ( _ "golang.org/x/exp/cmd/apidiff" _ "golang.org/x/tools/cmd/goimports" _ "golang.org/x/vuln/cmd/govulncheck" + + _ "go.opentelemetry.io/collector/internal/tools/semconvkit" ) diff --git a/obsreport/obsreport_exporter.go b/obsreport/obsreport_exporter.go deleted file mode 100644 index acbbedf9f5a..00000000000 --- a/obsreport/obsreport_exporter.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package obsreport // import "go.opentelemetry.io/collector/obsreport" - -import "go.opentelemetry.io/collector/exporter/exporterhelper" - -// Exporter is a helper to add observability to an exporter. -// -// Deprecated: [0.85.0] Use exporterhelper.ObsReport instead. -type Exporter = exporterhelper.ObsReport - -// ExporterSettings are settings for creating an Exporter. -// -// Deprecated: [0.85.0] Use exporterhelper.ObsReportSettings instead. -type ExporterSettings = exporterhelper.ObsReportSettings - -// NewExporter creates a new Exporter. -// -// Deprecated: [0.85.0] Use exporterhelper.New instead. -func NewExporter(cfg ExporterSettings) (*exporterhelper.ObsReport, error) { - return exporterhelper.NewObsReport(cfg) -} diff --git a/obsreport/obsreport_processor.go b/obsreport/obsreport_processor.go deleted file mode 100644 index 95915200f6a..00000000000 --- a/obsreport/obsreport_processor.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package obsreport // import "go.opentelemetry.io/collector/obsreport" - -import ( - "go.opentelemetry.io/collector/processor/processorhelper" -) - -// BuildProcessorCustomMetricName is used to be build a metric name following -// the standards used in the Collector. The configType should be the same -// value used to identify the type on the config. -// -// Deprecated: [0.85.0] Use processorhelper.BuildCustomMetricName instead. -func BuildProcessorCustomMetricName(configType, metric string) string { - return processorhelper.BuildCustomMetricName(configType, metric) -} - -// Processor is a helper to add observability to a processor. -// -// Deprecated: [0.85.0] Use processorhelper.ObsReport instead. -type Processor = processorhelper.ObsReport - -// ProcessorSettings is a helper to add observability to a processor. -// -// Deprecated: [0.85.0] Use processorhelper.ObsReportSettings instead. -type ProcessorSettings = processorhelper.ObsReportSettings - -// NewProcessor creates a new Processor. -// -// Deprecated: [0.85.0] Use processorhelper.NewObsReport instead. -func NewProcessor(cfg ProcessorSettings) (*Processor, error) { - return processorhelper.NewObsReport(cfg) -} diff --git a/obsreport/obsreport_receiver.go b/obsreport/obsreport_receiver.go deleted file mode 100644 index e816434d895..00000000000 --- a/obsreport/obsreport_receiver.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package obsreport // import "go.opentelemetry.io/collector/obsreport" - -import "go.opentelemetry.io/collector/receiver/receiverhelper" - -// Receiver is a helper to add observability to a receiver. -// -// Deprecated: [0.85.0] Use receiverhelper.ObsReport instead. -type Receiver = receiverhelper.ObsReport - -// ReceiverSettings are settings for creating an Receiver. -// -// Deprecated: [0.85.0] Use receiverhelper.ObsReportSettings instead. -type ReceiverSettings = receiverhelper.ObsReportSettings - -// NewReceiver creates a new Receiver. -// -// Deprecated: [0.85.0] Use receiverhelper.NewObsReport instead. -func NewReceiver(cfg ReceiverSettings) (*Receiver, error) { - return receiverhelper.NewObsReport(cfg) -} diff --git a/obsreport/obsreport_scraper.go b/obsreport/obsreport_scraper.go deleted file mode 100644 index f6ae510b20f..00000000000 --- a/obsreport/obsreport_scraper.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package obsreport // import "go.opentelemetry.io/collector/obsreport" - -import "go.opentelemetry.io/collector/receiver/scraperhelper" - -// Scraper is a helper to add observability to a scraper. -// -// Deprecated: [0.85.0] Use scraperhelper.ObsReport instead. -type Scraper = scraperhelper.ObsReport - -// ScraperSettings are settings for creating a Scraper. -// -// Deprecated: [0.85.0] Use scraperhelper.ObsReportSettings instead. -type ScraperSettings = scraperhelper.ObsReportSettings - -// NewScraper creates a new Scraper. -// -// Deprecated: [0.85.0] Use scraperhelper.NewObsReport instead. -func NewScraper(cfg ScraperSettings) (*Scraper, error) { - return scraperhelper.NewObsReport(cfg) -} diff --git a/obsreport/obsreporttest/deprecated.go b/obsreport/obsreporttest/deprecated.go new file mode 100644 index 00000000000..b822191ee4e --- /dev/null +++ b/obsreport/obsreporttest/deprecated.go @@ -0,0 +1,29 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package obsreporttest // import "go.opentelemetry.io/collector/obsreport/obsreporttest" + +import ( + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" +) + +// Deprecated: [0.93.0] Use componenttest.TestTelemetry instead +type TestTelemetry = componenttest.TestTelemetry + +// SetupTelemetry does setup the testing environment to check the metrics recorded by receivers, producers or exporters. +// The caller must pass the ID of the component that intends to test, so the CreateSettings and Check methods will use. +// The caller should defer a call to Shutdown the returned TestTelemetry. +// +// Deprecated: [0.93.0] Use componenttest.SetupTelemetry instead +func SetupTelemetry(id component.ID) (TestTelemetry, error) { + return componenttest.SetupTelemetry(id) +} + +// CheckScraperMetrics checks that for the current exported values for metrics scraper metrics match given values. +// When this function is called it is required to also call SetupTelemetry as first thing. +// +// Deprecated: [0.93.0] Use TestTelemetry.CheckScraperMetrics instead +func CheckScraperMetrics(tts TestTelemetry, receiver component.ID, scraper component.ID, scrapedMetricPoints, erroredMetricPoints int64) error { + return tts.CheckScraperMetrics(receiver, scraper, scrapedMetricPoints, erroredMetricPoints) +} diff --git a/obsreport/obsreporttest/obsreporttest_test.go b/obsreport/obsreporttest/obsreporttest_test.go deleted file mode 100644 index bfc4256f8f6..00000000000 --- a/obsreport/obsreporttest/obsreporttest_test.go +++ /dev/null @@ -1,253 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package obsreporttest_test - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/exporter/exporterhelper" - "go.opentelemetry.io/collector/exporter/exportertest" - "go.opentelemetry.io/collector/obsreport/obsreporttest" - "go.opentelemetry.io/collector/processor/processorhelper" - "go.opentelemetry.io/collector/processor/processortest" - "go.opentelemetry.io/collector/receiver/receiverhelper" - "go.opentelemetry.io/collector/receiver/receivertest" - "go.opentelemetry.io/collector/receiver/scraperhelper" -) - -const ( - transport = "fakeTransport" - format = "fakeFormat" -) - -var ( - scraper = component.NewID("fakeScraper") - receiver = component.NewID("fakeReicever") - processor = component.NewID("fakeProcessor") - exporter = component.NewID("fakeExporter") -) - -func TestCheckScraperMetricsViews(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(receiver) - require.NoError(t, err) - t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - - s, err := scraperhelper.NewObsReport(scraperhelper.ObsReportSettings{ - ReceiverID: receiver, - Scraper: scraper, - ReceiverCreateSettings: receivertest.NewCreateSettings(receiver, tt.TelemetrySettings), - }) - require.NoError(t, err) - ctx := s.StartMetricsOp(context.Background()) - require.NotNil(t, ctx) - s.EndMetricsOp(ctx, 7, nil) - - assert.NoError(t, obsreporttest.CheckScraperMetrics(tt, receiver, scraper, 7, 0)) - assert.Error(t, obsreporttest.CheckScraperMetrics(tt, receiver, scraper, 7, 7)) - assert.Error(t, obsreporttest.CheckScraperMetrics(tt, receiver, scraper, 0, 0)) - assert.Error(t, obsreporttest.CheckScraperMetrics(tt, receiver, scraper, 0, 7)) -} - -func TestCheckReceiverTracesViews(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(receiver) - require.NoError(t, err) - t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - - rec, err := receiverhelper.NewObsReport(receiverhelper.ObsReportSettings{ - ReceiverID: receiver, - Transport: transport, - ReceiverCreateSettings: receivertest.NewCreateSettings(receiver, tt.TelemetrySettings), - }) - require.NoError(t, err) - ctx := rec.StartTracesOp(context.Background()) - require.NotNil(t, ctx) - rec.EndTracesOp(ctx, format, 7, nil) - - assert.NoError(t, tt.CheckReceiverTraces(transport, 7, 0)) - assert.Error(t, tt.CheckReceiverTraces(transport, 7, 7)) - assert.Error(t, tt.CheckReceiverTraces(transport, 0, 0)) - assert.Error(t, tt.CheckReceiverTraces(transport, 0, 7)) -} - -func TestCheckReceiverMetricsViews(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(receiver) - require.NoError(t, err) - t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - - rec, err := receiverhelper.NewObsReport(receiverhelper.ObsReportSettings{ - ReceiverID: receiver, - Transport: transport, - ReceiverCreateSettings: receivertest.NewCreateSettings(receiver, tt.TelemetrySettings), - }) - require.NoError(t, err) - ctx := rec.StartMetricsOp(context.Background()) - require.NotNil(t, ctx) - rec.EndMetricsOp(ctx, format, 7, nil) - - assert.NoError(t, tt.CheckReceiverMetrics(transport, 7, 0)) - assert.Error(t, tt.CheckReceiverMetrics(transport, 7, 7)) - assert.Error(t, tt.CheckReceiverMetrics(transport, 0, 0)) - assert.Error(t, tt.CheckReceiverMetrics(transport, 0, 7)) -} - -func TestCheckReceiverLogsViews(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(receiver) - require.NoError(t, err) - t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - - rec, err := receiverhelper.NewObsReport(receiverhelper.ObsReportSettings{ - ReceiverID: receiver, - Transport: transport, - ReceiverCreateSettings: receivertest.NewCreateSettings(receiver, tt.TelemetrySettings), - }) - require.NoError(t, err) - ctx := rec.StartLogsOp(context.Background()) - require.NotNil(t, ctx) - rec.EndLogsOp(ctx, format, 7, nil) - - assert.NoError(t, tt.CheckReceiverLogs(transport, 7, 0)) - assert.Error(t, tt.CheckReceiverLogs(transport, 7, 7)) - assert.Error(t, tt.CheckReceiverLogs(transport, 0, 0)) - assert.Error(t, tt.CheckReceiverLogs(transport, 0, 7)) -} - -func TestCheckProcessorTracesViews(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(processor) - require.NoError(t, err) - t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - - por, err := processorhelper.NewObsReport(processorhelper.ObsReportSettings{ - ProcessorID: processor, - ProcessorCreateSettings: processortest.NewCreateSettings(processor, tt.TelemetrySettings), - }) - assert.NoError(t, err) - - por.TracesAccepted(context.Background(), 7) - por.TracesRefused(context.Background(), 8) - por.TracesDropped(context.Background(), 9) - - assert.NoError(t, tt.CheckProcessorTraces(7, 8, 9)) - assert.Error(t, tt.CheckProcessorTraces(0, 0, 0)) - assert.Error(t, tt.CheckProcessorTraces(7, 0, 0)) - assert.Error(t, tt.CheckProcessorTraces(7, 8, 0)) - assert.Error(t, tt.CheckProcessorTraces(7, 0, 9)) - assert.Error(t, tt.CheckProcessorTraces(0, 8, 0)) - assert.Error(t, tt.CheckProcessorTraces(0, 8, 9)) - assert.Error(t, tt.CheckProcessorTraces(0, 0, 9)) -} - -func TestCheckProcessorMetricsViews(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(processor) - require.NoError(t, err) - t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - - por, err := processorhelper.NewObsReport(processorhelper.ObsReportSettings{ - ProcessorID: processor, - ProcessorCreateSettings: processortest.NewCreateSettings(processor, tt.TelemetrySettings), - }) - assert.NoError(t, err) - - por.MetricsAccepted(context.Background(), 7) - por.MetricsRefused(context.Background(), 8) - por.MetricsDropped(context.Background(), 9) - - assert.NoError(t, tt.CheckProcessorMetrics(7, 8, 9)) - assert.Error(t, tt.CheckProcessorMetrics(0, 0, 0)) - assert.Error(t, tt.CheckProcessorMetrics(7, 0, 0)) - assert.Error(t, tt.CheckProcessorMetrics(7, 8, 0)) - assert.Error(t, tt.CheckProcessorMetrics(7, 0, 9)) - assert.Error(t, tt.CheckProcessorMetrics(0, 8, 0)) - assert.Error(t, tt.CheckProcessorMetrics(0, 8, 9)) - assert.Error(t, tt.CheckProcessorMetrics(0, 0, 9)) -} - -func TestCheckProcessorLogViews(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(processor) - require.NoError(t, err) - t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - - por, err := processorhelper.NewObsReport(processorhelper.ObsReportSettings{ - ProcessorID: processor, - ProcessorCreateSettings: processortest.NewCreateSettings(processor, tt.TelemetrySettings), - }) - assert.NoError(t, err) - - por.LogsAccepted(context.Background(), 7) - por.LogsRefused(context.Background(), 8) - por.LogsDropped(context.Background(), 9) - - assert.NoError(t, tt.CheckProcessorLogs(7, 8, 9)) - assert.Error(t, tt.CheckProcessorLogs(0, 0, 0)) - assert.Error(t, tt.CheckProcessorLogs(7, 0, 0)) - assert.Error(t, tt.CheckProcessorLogs(7, 8, 0)) - assert.Error(t, tt.CheckProcessorLogs(7, 0, 9)) - assert.Error(t, tt.CheckProcessorLogs(0, 8, 0)) - assert.Error(t, tt.CheckProcessorLogs(0, 8, 9)) - assert.Error(t, tt.CheckProcessorLogs(0, 0, 9)) -} - -func TestCheckExporterTracesViews(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(exporter) - require.NoError(t, err) - t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - - obsrep, err := exporterhelper.NewObsReport(exporterhelper.ObsReportSettings{ - ExporterID: exporter, - ExporterCreateSettings: exportertest.NewCreateSettings(exporter, tt.TelemetrySettings), - }) - require.NoError(t, err) - ctx := obsrep.StartTracesOp(context.Background()) - require.NotNil(t, ctx) - obsrep.EndTracesOp(ctx, 7, nil) - - assert.NoError(t, tt.CheckExporterTraces(7, 0)) - assert.Error(t, tt.CheckExporterTraces(7, 7)) - assert.Error(t, tt.CheckExporterTraces(0, 0)) - assert.Error(t, tt.CheckExporterTraces(0, 7)) -} - -func TestCheckExporterMetricsViews(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(exporter) - require.NoError(t, err) - t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - - obsrep, err := exporterhelper.NewObsReport(exporterhelper.ObsReportSettings{ - ExporterID: exporter, - ExporterCreateSettings: exportertest.NewCreateSettings(exporter, tt.TelemetrySettings), - }) - require.NoError(t, err) - ctx := obsrep.StartMetricsOp(context.Background()) - require.NotNil(t, ctx) - obsrep.EndMetricsOp(ctx, 7, nil) - - assert.NoError(t, tt.CheckExporterMetrics(7, 0)) - assert.Error(t, tt.CheckExporterMetrics(7, 7)) - assert.Error(t, tt.CheckExporterMetrics(0, 0)) - assert.Error(t, tt.CheckExporterMetrics(0, 7)) -} - -func TestCheckExporterLogsViews(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(exporter) - require.NoError(t, err) - t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - - obsrep, err := exporterhelper.NewObsReport(exporterhelper.ObsReportSettings{ - ExporterID: exporter, - ExporterCreateSettings: exportertest.NewCreateSettings(exporter, tt.TelemetrySettings), - }) - require.NoError(t, err) - ctx := obsrep.StartLogsOp(context.Background()) - require.NotNil(t, ctx) - obsrep.EndLogsOp(ctx, 7, nil) - - assert.NoError(t, tt.CheckExporterLogs(7, 0)) - assert.Error(t, tt.CheckExporterLogs(7, 7)) - assert.Error(t, tt.CheckExporterLogs(0, 0)) - assert.Error(t, tt.CheckExporterLogs(0, 7)) -} diff --git a/obsreport/obsreporttest/package_test.go b/obsreport/obsreporttest/package_test.go new file mode 100644 index 00000000000..97b3f7f9210 --- /dev/null +++ b/obsreport/obsreporttest/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package obsreporttest + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/otelcol/collector.go b/otelcol/collector.go index 557ff6f18aa..3fd5cb2ca31 100644 --- a/otelcol/collector.go +++ b/otelcol/collector.go @@ -7,7 +7,6 @@ package otelcol // import "go.opentelemetry.io/collector/otelcol" import ( "context" - "errors" "fmt" "os" "os/signal" @@ -55,7 +54,7 @@ func (s State) String() string { // CollectorSettings holds configuration for creating a new Collector. type CollectorSettings struct { // Factories service factories. - Factories Factories + Factories func() (Factories, error) // BuildInfo provides collector start information. BuildInfo component.BuildInfo @@ -66,10 +65,16 @@ type CollectorSettings struct { // and manually handle the signals to shutdown the collector. DisableGracefulShutdown bool + // Deprecated: [v0.95.0] Use ConfigProviderSettings instead. // ConfigProvider provides the service configuration. // If the provider watches for configuration change, collector may reload the new configuration upon changes. ConfigProvider ConfigProvider + // ConfigProviderSettings allows configuring the way the Collector retrieves its configuration + // The Collector will reload based on configuration changes from the ConfigProvider if any + // confmap.Providers watch for configuration changes. + ConfigProviderSettings ConfigProviderSettings + // LoggingOptions provides a way to change behavior of zap logging. LoggingOptions []zap.Option @@ -92,6 +97,8 @@ type CollectorSettings struct { type Collector struct { set CollectorSettings + configProvider ConfigProvider + service *service.Service state *atomic.Int32 @@ -105,8 +112,14 @@ type Collector struct { // NewCollector creates and returns a new instance of Collector. func NewCollector(set CollectorSettings) (*Collector, error) { - if set.ConfigProvider == nil { - return nil, errors.New("invalid nil config provider") + var err error + configProvider := set.ConfigProvider + + if configProvider == nil { + configProvider, err = NewConfigProvider(set.ConfigProviderSettings) + if err != nil { + return nil, err + } } state := &atomic.Int32{} @@ -119,6 +132,7 @@ func NewCollector(set CollectorSettings) (*Collector, error) { // the number of signals getting notified on is recommended. signalsChannel: make(chan os.Signal, 3), asyncErrorChannel: make(chan error), + configProvider: configProvider, }, nil } @@ -146,7 +160,7 @@ func (col *Collector) setupConfigurationComponents(ctx context.Context) error { var conf *confmap.Conf - if cp, ok := col.set.ConfigProvider.(ConfmapProvider); ok { + if cp, ok := col.configProvider.(ConfmapProvider); ok { var err error conf, err = cp.GetConfmap(ctx) @@ -155,7 +169,11 @@ func (col *Collector) setupConfigurationComponents(ctx context.Context) error { } } - cfg, err := col.set.ConfigProvider.Get(ctx, col.set.Factories) + factories, err := col.set.Factories() + if err != nil { + return fmt.Errorf("failed to initialize factories: %w", err) + } + cfg, err := col.configProvider.Get(ctx, factories) if err != nil { return fmt.Errorf("failed to get config: %w", err) } @@ -167,11 +185,11 @@ func (col *Collector) setupConfigurationComponents(ctx context.Context) error { col.service, err = service.New(ctx, service.Settings{ BuildInfo: col.set.BuildInfo, CollectorConf: conf, - Receivers: receiver.NewBuilder(cfg.Receivers, col.set.Factories.Receivers), - Processors: processor.NewBuilder(cfg.Processors, col.set.Factories.Processors), - Exporters: exporter.NewBuilder(cfg.Exporters, col.set.Factories.Exporters), - Connectors: connector.NewBuilder(cfg.Connectors, col.set.Factories.Connectors), - Extensions: extension.NewBuilder(cfg.Extensions, col.set.Factories.Extensions), + Receivers: receiver.NewBuilder(cfg.Receivers, factories.Receivers), + Processors: processor.NewBuilder(cfg.Processors, factories.Processors), + Exporters: exporter.NewBuilder(cfg.Exporters, factories.Exporters), + Connectors: connector.NewBuilder(cfg.Connectors, factories.Connectors), + Extensions: extension.NewBuilder(cfg.Extensions, factories.Extensions), AsyncErrorChannel: col.asyncErrorChannel, LoggingOptions: col.set.LoggingOptions, }, cfg.Service) @@ -207,7 +225,11 @@ func (col *Collector) reloadConfiguration(ctx context.Context) error { } func (col *Collector) DryRun(ctx context.Context) error { - cfg, err := col.set.ConfigProvider.Get(ctx, col.set.Factories) + factories, err := col.set.Factories() + if err != nil { + return fmt.Errorf("failed to initialize factories: %w", err) + } + cfg, err := col.configProvider.Get(ctx, factories) if err != nil { return fmt.Errorf("failed to get config: %w", err) } @@ -235,7 +257,7 @@ func (col *Collector) Run(ctx context.Context) error { LOOP: for { select { - case err := <-col.set.ConfigProvider.Watch(): + case err := <-col.configProvider.Watch(): if err != nil { col.service.Logger().Error("Config watch failed", zap.Error(err)) break LOOP @@ -272,7 +294,7 @@ func (col *Collector) shutdown(ctx context.Context) error { // Accumulate errors and proceed with shutting down remaining components. var errs error - if err := col.set.ConfigProvider.Shutdown(ctx); err != nil { + if err := col.configProvider.Shutdown(ctx); err != nil { errs = multierr.Append(errs, fmt.Errorf("failed to shutdown config provider: %w", err)) } diff --git a/otelcol/collector_test.go b/otelcol/collector_test.go index 1a0ad8d0607..c56d56fc728 100644 --- a/otelcol/collector_test.go +++ b/otelcol/collector_test.go @@ -18,7 +18,8 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/confmap" - "go.opentelemetry.io/collector/confmap/converter/expandconverter" + "go.opentelemetry.io/collector/extension/extensiontest" + "go.opentelemetry.io/collector/processor/processortest" ) func TestStateString(t *testing.T) { @@ -30,16 +31,10 @@ func TestStateString(t *testing.T) { } func TestCollectorStartAsGoRoutine(t *testing.T) { - factories, err := nopFactories() - require.NoError(t, err) - - cfgProvider, err := NewConfigProvider(newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-nop.yaml")})) - require.NoError(t, err) - set := CollectorSettings{ - BuildInfo: component.NewDefaultBuildInfo(), - Factories: factories, - ConfigProvider: cfgProvider, + BuildInfo: component.NewDefaultBuildInfo(), + Factories: nopFactories, + ConfigProviderSettings: newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-nop.yaml")}), } col, err := NewCollector(set) require.NoError(t, err) @@ -57,16 +52,10 @@ func TestCollectorStartAsGoRoutine(t *testing.T) { } func TestCollectorCancelContext(t *testing.T) { - factories, err := nopFactories() - require.NoError(t, err) - - cfgProvider, err := NewConfigProvider(newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-nop.yaml")})) - require.NoError(t, err) - set := CollectorSettings{ - BuildInfo: component.NewDefaultBuildInfo(), - Factories: factories, - ConfigProvider: cfgProvider, + BuildInfo: component.NewDefaultBuildInfo(), + Factories: nopFactories, + ConfigProviderSettings: newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-nop.yaml")}), } col, err := NewCollector(set) require.NoError(t, err) @@ -93,16 +82,13 @@ func (p mockCfgProvider) Watch() <-chan error { } func TestCollectorStateAfterConfigChange(t *testing.T) { - factories, err := nopFactories() - require.NoError(t, err) - provider, err := NewConfigProvider(newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-nop.yaml")})) require.NoError(t, err) watcher := make(chan error, 1) col, err := NewCollector(CollectorSettings{ BuildInfo: component.NewDefaultBuildInfo(), - Factories: factories, + Factories: nopFactories, ConfigProvider: &mockCfgProvider{ConfigProvider: provider, watcher: watcher}, }) require.NoError(t, err) @@ -126,16 +112,10 @@ func TestCollectorStateAfterConfigChange(t *testing.T) { } func TestCollectorReportError(t *testing.T) { - factories, err := nopFactories() - require.NoError(t, err) - - cfgProvider, err := NewConfigProvider(newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-nop.yaml")})) - require.NoError(t, err) - col, err := NewCollector(CollectorSettings{ - BuildInfo: component.NewDefaultBuildInfo(), - Factories: factories, - ConfigProvider: cfgProvider, + BuildInfo: component.NewDefaultBuildInfo(), + Factories: nopFactories, + ConfigProviderSettings: newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-nop.yaml")}), }) require.NoError(t, err) @@ -151,17 +131,104 @@ func TestCollectorReportError(t *testing.T) { assert.Equal(t, StateClosed, col.GetState()) } -func TestCollectorSendSignal(t *testing.T) { +func TestComponentStatusWatcher(t *testing.T) { factories, err := nopFactories() - require.NoError(t, err) + assert.NoError(t, err) + + // Use a processor factory that creates "unhealthy" processor: one that + // always reports StatusRecoverableError after successful Start. + unhealthyProcessorFactory := processortest.NewUnhealthyProcessorFactory() + factories.Processors[unhealthyProcessorFactory.Type()] = unhealthyProcessorFactory + + // Keep track of all status changes in a map. + changedComponents := map[*component.InstanceID][]component.Status{} + var mux sync.Mutex + onStatusChanged := func(source *component.InstanceID, event *component.StatusEvent) { + if source.ID.Type() != unhealthyProcessorFactory.Type() { + return + } + mux.Lock() + defer mux.Unlock() + changedComponents[source] = append(changedComponents[source], event.Status()) + } - cfgProvider, err := NewConfigProvider(newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-nop.yaml")})) + // Add a "statuswatcher" extension that will receive notifications when processor + // status changes. + factory := extensiontest.NewStatusWatcherExtensionFactory(onStatusChanged) + factories.Extensions[factory.Type()] = factory + + // Read config from file. This config uses 3 "unhealthy" processors. + validProvider, err := NewConfigProvider(newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-statuswatcher.yaml")})) require.NoError(t, err) + // Create a collector col, err := NewCollector(CollectorSettings{ BuildInfo: component.NewDefaultBuildInfo(), - Factories: factories, - ConfigProvider: cfgProvider, + Factories: func() (Factories, error) { return factories, nil }, + ConfigProvider: validProvider, + }) + require.NoError(t, err) + + // Start the newly created collector. + wg := startCollector(context.Background(), t, col) + + // An unhealthy processor asynchronously reports a recoverable error. Depending on the Go + // Scheduler the statuses reported at startup will be one of the two valid sequnces below. + startupStatuses1 := []component.Status{ + component.StatusStarting, + component.StatusOK, + component.StatusRecoverableError, + } + startupStatuses2 := []component.Status{ + component.StatusStarting, + component.StatusRecoverableError, + } + // the modulus of the actual statuses will match the modulus of the startup statuses + startupStatuses := func(actualStatuses []component.Status) []component.Status { + if len(actualStatuses)%2 == 1 { + return startupStatuses1 + } + return startupStatuses2 + } + + // The "unhealthy" processors will now begin to asynchronously report StatusRecoverableError. + // We expect to see these reports. + assert.Eventually(t, func() bool { + mux.Lock() + defer mux.Unlock() + + for k, v := range changedComponents { + // All processors must report a status change with the same ID + assert.EqualValues(t, component.NewID(unhealthyProcessorFactory.Type()), k.ID) + // And all must have a valid startup sequence + assert.Equal(t, startupStatuses(v), v) + } + // We have 3 processors with exactly the same ID in otelcol-statuswatcher.yaml + // We must have exactly 3 items in our map. This ensures that the "source" argument + // passed to status change func is unique per instance of source component despite + // components having the same IDs (having same ID for different component instances + // is a normal situation for processors). + return len(changedComponents) == 3 + }, 2*time.Second, time.Millisecond*100) + + col.Shutdown() + wg.Wait() + + // Check for additional statuses after Shutdown. + for _, v := range changedComponents { + expectedStatuses := append([]component.Status{}, startupStatuses(v)...) + expectedStatuses = append(expectedStatuses, component.StatusStopping, component.StatusStopped) + assert.Equal(t, expectedStatuses, v) + } + + assert.Equal(t, StateClosed, col.GetState()) +} + +func TestCollectorSendSignal(t *testing.T) { + col, err := NewCollector(CollectorSettings{ + BuildInfo: component.NewDefaultBuildInfo(), + Factories: nopFactories, + ConfigProviderSettings: newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-nop.yaml")}), }) require.NoError(t, err) @@ -185,16 +252,11 @@ func TestCollectorSendSignal(t *testing.T) { func TestCollectorFailedShutdown(t *testing.T) { t.Skip("This test was using telemetry shutdown failure, switch to use a component that errors on shutdown.") - factories, err := nopFactories() - require.NoError(t, err) - - cfgProvider, err := NewConfigProvider(newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-nop.yaml")})) - require.NoError(t, err) col, err := NewCollector(CollectorSettings{ - BuildInfo: component.NewDefaultBuildInfo(), - Factories: factories, - ConfigProvider: cfgProvider, + BuildInfo: component.NewDefaultBuildInfo(), + Factories: nopFactories, + ConfigProviderSettings: newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-nop.yaml")}), }) require.NoError(t, err) @@ -216,19 +278,49 @@ func TestCollectorFailedShutdown(t *testing.T) { } func TestCollectorStartInvalidConfig(t *testing.T) { - factories, err := nopFactories() + col, err := NewCollector(CollectorSettings{ + BuildInfo: component.NewDefaultBuildInfo(), + Factories: nopFactories, + ConfigProviderSettings: newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-invalid.yaml")}), + }) require.NoError(t, err) + assert.Error(t, col.Run(context.Background())) +} - cfgProvider, err := NewConfigProvider(newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-invalid.yaml")})) - require.NoError(t, err) +func TestNewCollectorInvalidConfigProviderSettings(t *testing.T) { + _, err := NewCollector(CollectorSettings{ + BuildInfo: component.NewDefaultBuildInfo(), + Factories: nopFactories, + ConfigProviderSettings: ConfigProviderSettings{}, + }) + require.Error(t, err) +} + +func TestNewCollectorUseConfig(t *testing.T) { + set := newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-nop.yaml")}) col, err := NewCollector(CollectorSettings{ - BuildInfo: component.NewDefaultBuildInfo(), - Factories: factories, - ConfigProvider: cfgProvider, + BuildInfo: component.NewDefaultBuildInfo(), + Factories: nopFactories, + ConfigProviderSettings: set, }) require.NoError(t, err) - assert.Error(t, col.Run(context.Background())) + require.NotNil(t, col.configProvider) +} + +func TestNewCollectorValidatesResolverSettings(t *testing.T) { + set := ConfigProviderSettings{ + ResolverSettings: confmap.ResolverSettings{ + URIs: []string{filepath.Join("testdata", "otelcol-nop.yaml")}, + }, + } + + _, err := NewCollector(CollectorSettings{ + BuildInfo: component.NewDefaultBuildInfo(), + Factories: nopFactories, + ConfigProviderSettings: set, + }) + require.Error(t, err) } func TestCollectorStartWithTraceContextPropagation(t *testing.T) { @@ -243,16 +335,10 @@ func TestCollectorStartWithTraceContextPropagation(t *testing.T) { for _, tt := range tests { t.Run(tt.file, func(t *testing.T) { - factories, err := nopFactories() - require.NoError(t, err) - - cfgProvider, err := NewConfigProvider(newDefaultConfigProviderSettings([]string{filepath.Join("testdata", tt.file)})) - require.NoError(t, err) - set := CollectorSettings{ - BuildInfo: component.NewDefaultBuildInfo(), - Factories: factories, - ConfigProvider: cfgProvider, + BuildInfo: component.NewDefaultBuildInfo(), + Factories: nopFactories, + ConfigProviderSettings: newDefaultConfigProviderSettings([]string{filepath.Join("testdata", tt.file)}), } col, err := NewCollector(set) @@ -281,16 +367,10 @@ func TestCollectorRun(t *testing.T) { for _, tt := range tests { t.Run(tt.file, func(t *testing.T) { - factories, err := nopFactories() - require.NoError(t, err) - - cfgProvider, err := NewConfigProvider(newDefaultConfigProviderSettings([]string{filepath.Join("testdata", tt.file)})) - require.NoError(t, err) - set := CollectorSettings{ - BuildInfo: component.NewDefaultBuildInfo(), - Factories: factories, - ConfigProvider: cfgProvider, + BuildInfo: component.NewDefaultBuildInfo(), + Factories: nopFactories, + ConfigProviderSettings: newDefaultConfigProviderSettings([]string{filepath.Join("testdata", tt.file)}), } col, err := NewCollector(set) require.NoError(t, err) @@ -305,16 +385,10 @@ func TestCollectorRun(t *testing.T) { } func TestCollectorShutdownBeforeRun(t *testing.T) { - factories, err := nopFactories() - require.NoError(t, err) - - cfgProvider, err := NewConfigProvider(newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-nop.yaml")})) - require.NoError(t, err) - set := CollectorSettings{ - BuildInfo: component.NewDefaultBuildInfo(), - Factories: factories, - ConfigProvider: cfgProvider, + BuildInfo: component.NewDefaultBuildInfo(), + Factories: nopFactories, + ConfigProviderSettings: newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-nop.yaml")}), } col, err := NewCollector(set) require.NoError(t, err) @@ -330,17 +404,11 @@ func TestCollectorShutdownBeforeRun(t *testing.T) { } func TestCollectorClosedStateOnStartUpError(t *testing.T) { - factories, err := nopFactories() - require.NoError(t, err) - - cfgProvider, err := NewConfigProvider(newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-invalid.yaml")})) - require.NoError(t, err) - // Load a bad config causing startup to fail set := CollectorSettings{ - BuildInfo: component.NewDefaultBuildInfo(), - Factories: factories, - ConfigProvider: cfgProvider, + BuildInfo: component.NewDefaultBuildInfo(), + Factories: nopFactories, + ConfigProviderSettings: newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-invalid.yaml")}), } col, err := NewCollector(set) require.NoError(t, err) @@ -353,17 +421,11 @@ func TestCollectorClosedStateOnStartUpError(t *testing.T) { } func TestCollectorDryRun(t *testing.T) { - factories, err := nopFactories() - require.NoError(t, err) - - cfgProvider, err := NewConfigProvider(newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-invalid.yaml")})) - require.NoError(t, err) - // Load a bad config causing startup to fail set := CollectorSettings{ - BuildInfo: component.NewDefaultBuildInfo(), - Factories: factories, - ConfigProvider: cfgProvider, + BuildInfo: component.NewDefaultBuildInfo(), + Factories: nopFactories, + ConfigProviderSettings: newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-invalid.yaml")}), } col, err := NewCollector(set) require.NoError(t, err) @@ -372,22 +434,15 @@ func TestCollectorDryRun(t *testing.T) { } func TestPassConfmapToServiceFailure(t *testing.T) { - factories, err := nopFactories() - require.NoError(t, err) - - cfgProvider, err := NewConfigProvider(ConfigProviderSettings{ - ResolverSettings: confmap.ResolverSettings{ - URIs: []string{filepath.Join("testdata", "otelcol-invalid.yaml")}, - Providers: makeMapProvidersMap(newFailureProvider()), - Converters: []confmap.Converter{expandconverter.New()}, - }, - }) - require.NoError(t, err) - set := CollectorSettings{ - BuildInfo: component.NewDefaultBuildInfo(), - Factories: factories, - ConfigProvider: cfgProvider, + BuildInfo: component.NewDefaultBuildInfo(), + Factories: nopFactories, + ConfigProviderSettings: ConfigProviderSettings{ + ResolverSettings: confmap.ResolverSettings{ + URIs: []string{filepath.Join("testdata", "otelcol-invalid.yaml")}, + Providers: makeMapProvidersMap(newFailureProvider()), + }, + }, } col, err := NewCollector(set) require.NoError(t, err) @@ -412,7 +467,7 @@ func newFailureProvider() confmap.Provider { return &failureProvider{} } -func (fmp *failureProvider) Retrieve(_ context.Context, _ string, _ confmap.WatcherFunc) (*confmap.Retrieved, error) { +func (fmp *failureProvider) Retrieve(context.Context, string, confmap.WatcherFunc) (*confmap.Retrieved, error) { return nil, errors.New("a failure occurred during configuration retrieval") } diff --git a/otelcol/collector_windows.go b/otelcol/collector_windows.go index 3959d28ce7c..f443d930b17 100644 --- a/otelcol/collector_windows.go +++ b/otelcol/collector_windows.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build windows -// +build windows package otelcol // import "go.opentelemetry.io/collector/otelcol" @@ -88,7 +87,11 @@ func (s *windowsService) start(elog *eventlog.Log, colErrorChannel chan error) e } var err error - s.col, err = newCollectorWithFlags(s.settings, s.flags) + err = updateSettingsUsingFlags(&s.settings, s.flags) + if err != nil { + return err + } + s.col, err = NewCollector(s.settings) if err != nil { return err } diff --git a/otelcol/collector_windows_test.go b/otelcol/collector_windows_test.go index fb12df6d11b..f562c02db4c 100644 --- a/otelcol/collector_windows_test.go +++ b/otelcol/collector_windows_test.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build windows -// +build windows package otelcol @@ -12,7 +11,6 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" "golang.org/x/sys/windows/svc" "go.opentelemetry.io/collector/component" @@ -23,10 +21,7 @@ func TestNewSvcHandler(t *testing.T) { defer func() { os.Args = oldArgs }() os.Args = []string{"otelcol", "--config", filepath.Join("testdata", "otelcol-nop.yaml")} - factories, err := nopFactories() - require.NoError(t, err) - - s := NewSvcHandler(CollectorSettings{BuildInfo: component.NewDefaultBuildInfo(), Factories: factories}) + s := NewSvcHandler(CollectorSettings{BuildInfo: component.NewDefaultBuildInfo(), Factories: nopFactories}) colDone := make(chan struct{}) requests := make(chan svc.ChangeRequest) diff --git a/otelcol/command.go b/otelcol/command.go index a9baff305f3..f510687c31b 100644 --- a/otelcol/command.go +++ b/otelcol/command.go @@ -13,14 +13,22 @@ import ( ) // NewCommand constructs a new cobra.Command using the given CollectorSettings. +// Any URIs specified in CollectorSettings.ConfigProviderSettings.ResolverSettings.URIs +// are considered defaults and will be overwritten by config flags passed as +// command-line arguments to the executable. func NewCommand(set CollectorSettings) *cobra.Command { flagSet := flags(featuregate.GlobalRegistry()) rootCmd := &cobra.Command{ Use: set.BuildInfo.Command, Version: set.BuildInfo.Version, SilenceUsage: true, - RunE: func(cmd *cobra.Command, args []string) error { - col, err := newCollectorWithFlags(set, flagSet) + RunE: func(cmd *cobra.Command, _ []string) error { + err := updateSettingsUsingFlags(&set, flagSet) + if err != nil { + return err + } + + col, err := NewCollector(set) if err != nil { return err } @@ -33,18 +41,23 @@ func NewCommand(set CollectorSettings) *cobra.Command { return rootCmd } -func newCollectorWithFlags(set CollectorSettings, flags *flag.FlagSet) (*Collector, error) { +func updateSettingsUsingFlags(set *CollectorSettings, flags *flag.FlagSet) error { if set.ConfigProvider == nil { + resolverSet := &set.ConfigProviderSettings.ResolverSettings configFlags := getConfigFlag(flags) - if len(configFlags) == 0 { - return nil, errors.New("at least one config flag must be provided") - } - var err error - set.ConfigProvider, err = NewConfigProvider(newDefaultConfigProviderSettings(configFlags)) - if err != nil { - return nil, err + if len(configFlags) > 0 { + resolverSet.URIs = configFlags + } + if len(resolverSet.URIs) == 0 { + return errors.New("at least one config flag must be provided") + } + // Provide a default set of providers and converters if none have been specified. + // TODO: Remove this after CollectorSettings.ConfigProvider is removed and instead + // do it in the builder. + if len(resolverSet.Providers) == 0 && len(resolverSet.Converters) == 0 { + set.ConfigProviderSettings = newDefaultConfigProviderSettings(resolverSet.URIs) } } - return NewCollector(set) + return nil } diff --git a/otelcol/command_components.go b/otelcol/command_components.go index f63fce8e55f..83dd4670375 100644 --- a/otelcol/command_components.go +++ b/otelcol/command_components.go @@ -33,62 +33,67 @@ func newComponentsCommand(set CollectorSettings) *cobra.Command { Short: "Outputs available components in this collector distribution", Long: "Outputs available components in this collector distribution including their stability levels. The output format is not stable and can change between releases.", Args: cobra.ExactArgs(0), - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { + + factories, err := set.Factories() + if err != nil { + return fmt.Errorf("failed to initialize factories: %w", err) + } components := componentsOutput{} - for con := range set.Factories.Connectors { + for con := range factories.Connectors { components.Connectors = append(components.Connectors, componentWithStability{ Name: con, Stability: map[string]string{ - "logs-to-logs": set.Factories.Connectors[con].LogsToLogsStability().String(), - "logs-to-metrics": set.Factories.Connectors[con].LogsToMetricsStability().String(), - "logs-to-traces": set.Factories.Connectors[con].LogsToTracesStability().String(), + "logs-to-logs": factories.Connectors[con].LogsToLogsStability().String(), + "logs-to-metrics": factories.Connectors[con].LogsToMetricsStability().String(), + "logs-to-traces": factories.Connectors[con].LogsToTracesStability().String(), - "metrics-to-logs": set.Factories.Connectors[con].MetricsToLogsStability().String(), - "metrics-to-metrics": set.Factories.Connectors[con].MetricsToMetricsStability().String(), - "metrics-to-traces": set.Factories.Connectors[con].MetricsToTracesStability().String(), + "metrics-to-logs": factories.Connectors[con].MetricsToLogsStability().String(), + "metrics-to-metrics": factories.Connectors[con].MetricsToMetricsStability().String(), + "metrics-to-traces": factories.Connectors[con].MetricsToTracesStability().String(), - "traces-to-logs": set.Factories.Connectors[con].TracesToLogsStability().String(), - "traces-to-metrics": set.Factories.Connectors[con].TracesToMetricsStability().String(), - "traces-to-traces": set.Factories.Connectors[con].TracesToTracesStability().String(), + "traces-to-logs": factories.Connectors[con].TracesToLogsStability().String(), + "traces-to-metrics": factories.Connectors[con].TracesToMetricsStability().String(), + "traces-to-traces": factories.Connectors[con].TracesToTracesStability().String(), }, }) } - for ext := range set.Factories.Extensions { + for ext := range factories.Extensions { components.Extensions = append(components.Extensions, componentWithStability{ Name: ext, Stability: map[string]string{ - "extension": set.Factories.Extensions[ext].ExtensionStability().String(), + "extension": factories.Extensions[ext].ExtensionStability().String(), }, }) } - for prs := range set.Factories.Processors { + for prs := range factories.Processors { components.Processors = append(components.Processors, componentWithStability{ Name: prs, Stability: map[string]string{ - "logs": set.Factories.Processors[prs].LogsProcessorStability().String(), - "metrics": set.Factories.Processors[prs].MetricsProcessorStability().String(), - "traces": set.Factories.Processors[prs].TracesProcessorStability().String(), + "logs": factories.Processors[prs].LogsProcessorStability().String(), + "metrics": factories.Processors[prs].MetricsProcessorStability().String(), + "traces": factories.Processors[prs].TracesProcessorStability().String(), }, }) } - for rcv := range set.Factories.Receivers { + for rcv := range factories.Receivers { components.Receivers = append(components.Receivers, componentWithStability{ Name: rcv, Stability: map[string]string{ - "logs": set.Factories.Receivers[rcv].LogsReceiverStability().String(), - "metrics": set.Factories.Receivers[rcv].MetricsReceiverStability().String(), - "traces": set.Factories.Receivers[rcv].TracesReceiverStability().String(), + "logs": factories.Receivers[rcv].LogsReceiverStability().String(), + "metrics": factories.Receivers[rcv].MetricsReceiverStability().String(), + "traces": factories.Receivers[rcv].TracesReceiverStability().String(), }, }) } - for exp := range set.Factories.Exporters { + for exp := range factories.Exporters { components.Exporters = append(components.Exporters, componentWithStability{ Name: exp, Stability: map[string]string{ - "logs": set.Factories.Exporters[exp].LogsExporterStability().String(), - "metrics": set.Factories.Exporters[exp].MetricsExporterStability().String(), - "traces": set.Factories.Exporters[exp].TracesExporterStability().String(), + "logs": factories.Exporters[exp].LogsExporterStability().String(), + "metrics": factories.Exporters[exp].MetricsExporterStability().String(), + "traces": factories.Exporters[exp].TracesExporterStability().String(), }, }) } diff --git a/otelcol/command_components_test.go b/otelcol/command_components_test.go index b143023eb5c..141fb586010 100644 --- a/otelcol/command_components_test.go +++ b/otelcol/command_components_test.go @@ -16,16 +16,15 @@ import ( "go.opentelemetry.io/collector/component" ) -func TestNewBuildSubCommand(t *testing.T) { - factories, err := nopFactories() - require.NoError(t, err) +var nopType = component.MustNewType("nop") +func TestNewBuildSubCommand(t *testing.T) { cfgProvider, err := NewConfigProvider(newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-nop.yaml")})) require.NoError(t, err) set := CollectorSettings{ BuildInfo: component.NewDefaultBuildInfo(), - Factories: factories, + Factories: nopFactories, ConfigProvider: cfgProvider, } cmd := NewCommand(set) @@ -34,7 +33,7 @@ func TestNewBuildSubCommand(t *testing.T) { ExpectedYamlStruct := componentsOutput{ BuildInfo: component.NewDefaultBuildInfo(), Receivers: []componentWithStability{{ - Name: component.Type("nop"), + Name: nopType, Stability: map[string]string{ "logs": "Stable", "metrics": "Stable", @@ -42,7 +41,7 @@ func TestNewBuildSubCommand(t *testing.T) { }, }}, Processors: []componentWithStability{{ - Name: component.Type("nop"), + Name: nopType, Stability: map[string]string{ "logs": "Stable", "metrics": "Stable", @@ -50,7 +49,7 @@ func TestNewBuildSubCommand(t *testing.T) { }, }}, Exporters: []componentWithStability{{ - Name: component.Type("nop"), + Name: nopType, Stability: map[string]string{ "logs": "Stable", "metrics": "Stable", @@ -58,7 +57,7 @@ func TestNewBuildSubCommand(t *testing.T) { }, }}, Connectors: []componentWithStability{{ - Name: component.Type("nop"), + Name: nopType, Stability: map[string]string{ "logs-to-logs": "Development", "logs-to-metrics": "Development", @@ -74,7 +73,7 @@ func TestNewBuildSubCommand(t *testing.T) { }, }}, Extensions: []componentWithStability{{ - Name: component.Type("nop"), + Name: nopType, Stability: map[string]string{ "extension": "Stable", }, diff --git a/otelcol/command_test.go b/otelcol/command_test.go index fdf2885dc1e..d599441c658 100644 --- a/otelcol/command_test.go +++ b/otelcol/command_test.go @@ -7,6 +7,7 @@ import ( "path/filepath" "testing" + "github.com/spf13/cobra" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -14,6 +15,7 @@ import ( "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/converter/expandconverter" "go.opentelemetry.io/collector/confmap/provider/fileprovider" + "go.opentelemetry.io/collector/featuregate" ) func TestNewCommandVersion(t *testing.T) { @@ -22,27 +24,89 @@ func TestNewCommandVersion(t *testing.T) { } func TestNewCommandNoConfigURI(t *testing.T) { - factories, err := nopFactories() - require.NoError(t, err) - - cmd := NewCommand(CollectorSettings{Factories: factories}) + cmd := NewCommand(CollectorSettings{Factories: nopFactories}) require.Error(t, cmd.Execute()) } -func TestNewCommandInvalidComponent(t *testing.T) { - factories, err := nopFactories() - require.NoError(t, err) +// This test emulates usage of Collector in Jaeger all-in-one, which +// allows running the binary with no explicit configuration. +func TestNewCommandProgrammaticallyPassedConfig(t *testing.T) { + cmd := NewCommand(CollectorSettings{Factories: nopFactories}) + otelRunE := cmd.RunE + cmd.RunE = func(c *cobra.Command, args []string) error { + configFlag := c.Flag("config") + cfg := ` +service: + extensions: [invalid_component_name] +receivers: + invalid_component_name: +` + require.NoError(t, configFlag.Value.Set("yaml:"+cfg)) + return otelRunE(cmd, args) + } + // verify that cmd.Execute was run with the implicitly provided config. + require.ErrorContains(t, cmd.Execute(), "invalid_component_name") +} - cfgProvider, err := NewConfigProvider( - ConfigProviderSettings{ +func TestAddFlagToSettings(t *testing.T) { + set := CollectorSettings{ + ConfigProviderSettings: ConfigProviderSettings{ ResolverSettings: confmap.ResolverSettings{ URIs: []string{filepath.Join("testdata", "otelcol-invalid.yaml")}, - Providers: map[string]confmap.Provider{"file": fileprovider.New()}, - Converters: []confmap.Converter{expandconverter.New()}, + Providers: map[string]confmap.Provider{"file": fileprovider.NewWithSettings(confmap.ProviderSettings{})}, + Converters: []confmap.Converter{expandconverter.New(confmap.ConverterSettings{})}, }, - }) + }, + } + flgs := flags(featuregate.NewRegistry()) + err := flgs.Parse([]string{"--config=otelcol-nop.yaml"}) require.NoError(t, err) - cmd := NewCommand(CollectorSettings{Factories: factories, ConfigProvider: cfgProvider}) + err = updateSettingsUsingFlags(&set, flgs) + require.NoError(t, err) + require.Len(t, set.ConfigProviderSettings.ResolverSettings.URIs, 1) +} + +func TestAddDefaultConfmapModules(t *testing.T) { + set := CollectorSettings{ + ConfigProviderSettings: ConfigProviderSettings{ + ResolverSettings: confmap.ResolverSettings{}, + }, + } + flgs := flags(featuregate.NewRegistry()) + err := flgs.Parse([]string{"--config=otelcol-nop.yaml"}) + require.NoError(t, err) + + err = updateSettingsUsingFlags(&set, flgs) + require.NoError(t, err) + require.Len(t, set.ConfigProviderSettings.ResolverSettings.URIs, 1) + require.Len(t, set.ConfigProviderSettings.ResolverSettings.Converters, 1) + require.Len(t, set.ConfigProviderSettings.ResolverSettings.Providers, 5) +} + +func TestInvalidCollectorSettings(t *testing.T) { + set := CollectorSettings{ + ConfigProviderSettings: ConfigProviderSettings{ + ResolverSettings: confmap.ResolverSettings{ + Converters: []confmap.Converter{expandconverter.New(confmap.ConverterSettings{})}, + URIs: []string{"--config=otelcol-nop.yaml"}, + }, + }, + } + + cmd := NewCommand(set) + require.Error(t, cmd.Execute()) +} + +func TestNewCommandInvalidComponent(t *testing.T) { + set := ConfigProviderSettings{ + ResolverSettings: confmap.ResolverSettings{ + URIs: []string{filepath.Join("testdata", "otelcol-invalid.yaml")}, + Providers: map[string]confmap.Provider{"file": fileprovider.NewWithSettings(confmap.ProviderSettings{})}, + Converters: []confmap.Converter{expandconverter.New(confmap.ConverterSettings{})}, + }, + } + + cmd := NewCommand(CollectorSettings{Factories: nopFactories, ConfigProviderSettings: set}) require.Error(t, cmd.Execute()) } diff --git a/otelcol/command_validate.go b/otelcol/command_validate.go index b64cb282d1d..72d20d476d8 100644 --- a/otelcol/command_validate.go +++ b/otelcol/command_validate.go @@ -16,7 +16,7 @@ func newValidateSubCommand(set CollectorSettings, flagSet *flag.FlagSet) *cobra. Use: "validate", Short: "Validates the config without running the collector", Args: cobra.ExactArgs(0), - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { if set.ConfigProvider == nil { var err error diff --git a/otelcol/command_validate_test.go b/otelcol/command_validate_test.go index 4511eb73097..b215a77ffbf 100644 --- a/otelcol/command_validate_test.go +++ b/otelcol/command_validate_test.go @@ -16,30 +16,24 @@ import ( ) func TestValidateSubCommandNoConfig(t *testing.T) { - factories, err := nopFactories() - require.NoError(t, err) - - cmd := newValidateSubCommand(CollectorSettings{Factories: factories}, flags(featuregate.GlobalRegistry())) - err = cmd.Execute() + cmd := newValidateSubCommand(CollectorSettings{Factories: nopFactories}, flags(featuregate.GlobalRegistry())) + err := cmd.Execute() require.Error(t, err) require.Contains(t, err.Error(), "at least one config flag must be provided") } func TestValidateSubCommandInvalidComponents(t *testing.T) { - factories, err := nopFactories() - require.NoError(t, err) - cfgProvider, err := NewConfigProvider( ConfigProviderSettings{ ResolverSettings: confmap.ResolverSettings{ URIs: []string{filepath.Join("testdata", "otelcol-invalid-components.yaml")}, - Providers: map[string]confmap.Provider{"file": fileprovider.New()}, - Converters: []confmap.Converter{expandconverter.New()}, + Providers: map[string]confmap.Provider{"file": fileprovider.NewWithSettings(confmap.ProviderSettings{})}, + Converters: []confmap.Converter{expandconverter.New(confmap.ConverterSettings{})}, }, }) require.NoError(t, err) - cmd := newValidateSubCommand(CollectorSettings{Factories: factories, ConfigProvider: cfgProvider}, flags(featuregate.GlobalRegistry())) + cmd := newValidateSubCommand(CollectorSettings{Factories: nopFactories, ConfigProvider: cfgProvider}, flags(featuregate.GlobalRegistry())) err = cmd.Execute() require.Error(t, err) require.Contains(t, err.Error(), "unknown type: \"nosuchprocessor\"") diff --git a/otelcol/config_test.go b/otelcol/config_test.go index 9a4ddb87c4f..e482e6c8ae8 100644 --- a/otelcol/config_test.go +++ b/otelcol/config_test.go @@ -76,7 +76,7 @@ func TestConfigValidate(t *testing.T) { name: "invalid-extension-reference", cfgFn: func() *Config { cfg := generateConfig() - cfg.Service.Extensions = append(cfg.Service.Extensions, component.NewIDWithName("nop", "2")) + cfg.Service.Extensions = append(cfg.Service.Extensions, component.MustNewIDWithName("nop", "2")) return cfg }, expected: errors.New(`service::extensions: references extension "nop/2" which is not configured`), @@ -85,8 +85,8 @@ func TestConfigValidate(t *testing.T) { name: "invalid-receiver-reference", cfgFn: func() *Config { cfg := generateConfig() - pipe := cfg.Service.Pipelines[component.NewID("traces")] - pipe.Receivers = append(pipe.Receivers, component.NewIDWithName("nop", "2")) + pipe := cfg.Service.Pipelines[component.MustNewID("traces")] + pipe.Receivers = append(pipe.Receivers, component.MustNewIDWithName("nop", "2")) return cfg }, expected: errors.New(`service::pipelines::traces: references receiver "nop/2" which is not configured`), @@ -95,8 +95,8 @@ func TestConfigValidate(t *testing.T) { name: "invalid-processor-reference", cfgFn: func() *Config { cfg := generateConfig() - pipe := cfg.Service.Pipelines[component.NewID("traces")] - pipe.Processors = append(pipe.Processors, component.NewIDWithName("nop", "2")) + pipe := cfg.Service.Pipelines[component.MustNewID("traces")] + pipe.Processors = append(pipe.Processors, component.MustNewIDWithName("nop", "2")) return cfg }, expected: errors.New(`service::pipelines::traces: references processor "nop/2" which is not configured`), @@ -105,8 +105,8 @@ func TestConfigValidate(t *testing.T) { name: "invalid-exporter-reference", cfgFn: func() *Config { cfg := generateConfig() - pipe := cfg.Service.Pipelines[component.NewID("traces")] - pipe.Exporters = append(pipe.Exporters, component.NewIDWithName("nop", "2")) + pipe := cfg.Service.Pipelines[component.MustNewID("traces")] + pipe.Exporters = append(pipe.Exporters, component.MustNewIDWithName("nop", "2")) return cfg }, expected: errors.New(`service::pipelines::traces: references exporter "nop/2" which is not configured`), @@ -115,7 +115,7 @@ func TestConfigValidate(t *testing.T) { name: "invalid-receiver-config", cfgFn: func() *Config { cfg := generateConfig() - cfg.Receivers[component.NewID("nop")] = &errConfig{ + cfg.Receivers[component.MustNewID("nop")] = &errConfig{ validateErr: errInvalidRecvConfig, } return cfg @@ -126,7 +126,7 @@ func TestConfigValidate(t *testing.T) { name: "invalid-exporter-config", cfgFn: func() *Config { cfg := generateConfig() - cfg.Exporters[component.NewID("nop")] = &errConfig{ + cfg.Exporters[component.MustNewID("nop")] = &errConfig{ validateErr: errInvalidExpConfig, } return cfg @@ -137,7 +137,7 @@ func TestConfigValidate(t *testing.T) { name: "invalid-processor-config", cfgFn: func() *Config { cfg := generateConfig() - cfg.Processors[component.NewID("nop")] = &errConfig{ + cfg.Processors[component.MustNewID("nop")] = &errConfig{ validateErr: errInvalidProcConfig, } return cfg @@ -148,7 +148,7 @@ func TestConfigValidate(t *testing.T) { name: "invalid-extension-config", cfgFn: func() *Config { cfg := generateConfig() - cfg.Extensions[component.NewID("nop")] = &errConfig{ + cfg.Extensions[component.MustNewID("nop")] = &errConfig{ validateErr: errInvalidExtConfig, } return cfg @@ -159,7 +159,7 @@ func TestConfigValidate(t *testing.T) { name: "invalid-connector-config", cfgFn: func() *Config { cfg := generateConfig() - cfg.Connectors[component.NewIDWithName("nop", "conn")] = &errConfig{ + cfg.Connectors[component.MustNewIDWithName("nop", "conn")] = &errConfig{ validateErr: errInvalidConnConfig, } return cfg @@ -170,34 +170,34 @@ func TestConfigValidate(t *testing.T) { name: "ambiguous-connector-name-as-receiver", cfgFn: func() *Config { cfg := generateConfig() - cfg.Receivers[component.NewID("nop/2")] = &errConfig{} - cfg.Connectors[component.NewID("nop/2")] = &errConfig{} - pipe := cfg.Service.Pipelines[component.NewID("traces")] - pipe.Receivers = append(pipe.Receivers, component.NewIDWithName("nop", "2")) - pipe.Exporters = append(pipe.Exporters, component.NewIDWithName("nop", "2")) + cfg.Receivers[component.MustNewID("nop2")] = &errConfig{} + cfg.Connectors[component.MustNewID("nop2")] = &errConfig{} + pipe := cfg.Service.Pipelines[component.MustNewID("traces")] + pipe.Receivers = append(pipe.Receivers, component.MustNewIDWithName("nop", "2")) + pipe.Exporters = append(pipe.Exporters, component.MustNewIDWithName("nop", "2")) return cfg }, - expected: errors.New(`connectors::nop/2: ambiguous ID: Found both "nop/2" receiver and "nop/2" connector. Change one of the components' IDs to eliminate ambiguity (e.g. rename "nop/2" connector to "nop/2/connector")`), + expected: errors.New(`connectors::nop2: ambiguous ID: Found both "nop2" receiver and "nop2" connector. Change one of the components' IDs to eliminate ambiguity (e.g. rename "nop2" connector to "nop2/connector")`), }, { name: "ambiguous-connector-name-as-exporter", cfgFn: func() *Config { cfg := generateConfig() - cfg.Exporters[component.NewID("nop/2")] = &errConfig{} - cfg.Connectors[component.NewID("nop/2")] = &errConfig{} - pipe := cfg.Service.Pipelines[component.NewID("traces")] - pipe.Receivers = append(pipe.Receivers, component.NewIDWithName("nop", "2")) - pipe.Exporters = append(pipe.Exporters, component.NewIDWithName("nop", "2")) + cfg.Exporters[component.MustNewID("nop2")] = &errConfig{} + cfg.Connectors[component.MustNewID("nop2")] = &errConfig{} + pipe := cfg.Service.Pipelines[component.MustNewID("traces")] + pipe.Receivers = append(pipe.Receivers, component.MustNewIDWithName("nop", "2")) + pipe.Exporters = append(pipe.Exporters, component.MustNewIDWithName("nop", "2")) return cfg }, - expected: errors.New(`connectors::nop/2: ambiguous ID: Found both "nop/2" exporter and "nop/2" connector. Change one of the components' IDs to eliminate ambiguity (e.g. rename "nop/2" connector to "nop/2/connector")`), + expected: errors.New(`connectors::nop2: ambiguous ID: Found both "nop2" exporter and "nop2" connector. Change one of the components' IDs to eliminate ambiguity (e.g. rename "nop2" connector to "nop2/connector")`), }, { name: "invalid-connector-reference-as-receiver", cfgFn: func() *Config { cfg := generateConfig() - pipe := cfg.Service.Pipelines[component.NewID("traces")] - pipe.Receivers = append(pipe.Receivers, component.NewIDWithName("nop", "conn2")) + pipe := cfg.Service.Pipelines[component.MustNewID("traces")] + pipe.Receivers = append(pipe.Receivers, component.MustNewIDWithName("nop", "conn2")) return cfg }, expected: errors.New(`service::pipelines::traces: references receiver "nop/conn2" which is not configured`), @@ -206,8 +206,8 @@ func TestConfigValidate(t *testing.T) { name: "invalid-connector-reference-as-receiver", cfgFn: func() *Config { cfg := generateConfig() - pipe := cfg.Service.Pipelines[component.NewID("traces")] - pipe.Exporters = append(pipe.Exporters, component.NewIDWithName("nop", "conn2")) + pipe := cfg.Service.Pipelines[component.MustNewID("traces")] + pipe.Exporters = append(pipe.Exporters, component.MustNewIDWithName("nop", "conn2")) return cfg }, expected: errors.New(`service::pipelines::traces: references exporter "nop/conn2" which is not configured`), @@ -234,19 +234,19 @@ func TestConfigValidate(t *testing.T) { func generateConfig() *Config { return &Config{ Receivers: map[component.ID]component.Config{ - component.NewID("nop"): &errConfig{}, + component.MustNewID("nop"): &errConfig{}, }, Exporters: map[component.ID]component.Config{ - component.NewID("nop"): &errConfig{}, + component.MustNewID("nop"): &errConfig{}, }, Processors: map[component.ID]component.Config{ - component.NewID("nop"): &errConfig{}, + component.MustNewID("nop"): &errConfig{}, }, Connectors: map[component.ID]component.Config{ - component.NewIDWithName("nop", "conn"): &errConfig{}, + component.MustNewIDWithName("nop", "conn"): &errConfig{}, }, Extensions: map[component.ID]component.Config{ - component.NewID("nop"): &errConfig{}, + component.MustNewID("nop"): &errConfig{}, }, Service: service.Config{ Telemetry: telemetry.Config{ @@ -265,12 +265,12 @@ func generateConfig() *Config { Address: ":8080", }, }, - Extensions: []component.ID{component.NewID("nop")}, + Extensions: []component.ID{component.MustNewID("nop")}, Pipelines: pipelines.Config{ - component.NewID("traces"): { - Receivers: []component.ID{component.NewID("nop")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewID("traces"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, }, }, diff --git a/otelcol/configprovider.go b/otelcol/configprovider.go index c266c9a47df..fa43aa64ae6 100644 --- a/otelcol/configprovider.go +++ b/otelcol/configprovider.go @@ -132,11 +132,19 @@ func (cm *configProvider) GetConfmap(ctx context.Context) (*confmap.Conf, error) } func newDefaultConfigProviderSettings(uris []string) ConfigProviderSettings { + converterSet := confmap.ConverterSettings{} + providerSet := confmap.ProviderSettings{} return ConfigProviderSettings{ ResolverSettings: confmap.ResolverSettings{ - URIs: uris, - Providers: makeMapProvidersMap(fileprovider.New(), envprovider.New(), yamlprovider.New(), httpprovider.New(), httpsprovider.New()), - Converters: []confmap.Converter{expandconverter.New()}, + URIs: uris, + Providers: makeMapProvidersMap( + fileprovider.NewWithSettings(providerSet), + envprovider.NewWithSettings(providerSet), + yamlprovider.NewWithSettings(providerSet), + httpprovider.NewWithSettings(providerSet), + httpsprovider.NewWithSettings(providerSet), + ), + Converters: []confmap.Converter{expandconverter.New(converterSet)}, }, } } diff --git a/otelcol/flags.go b/otelcol/flags.go index a2d0885f53e..06f9989adb3 100644 --- a/otelcol/flags.go +++ b/otelcol/flags.go @@ -12,8 +12,7 @@ import ( ) const ( - configFlag = "config" - featureGatesFlag = "feature-gates" + configFlag = "config" ) type configFlagValue struct { @@ -50,9 +49,7 @@ func flags(reg *featuregate.Registry) *flag.FlagSet { return nil }) - flagSet.Var(featuregate.NewFlag(reg), featureGatesFlag, - "Comma-delimited list of feature gate identifiers. Prefix with '-' to disable the feature. '+' or no prefix will enable the feature.") - + reg.RegisterFlags(flagSet) return flagSet } diff --git a/otelcol/go.mod b/otelcol/go.mod index e2b9dfee6ca..78caf027f15 100644 --- a/otelcol/go.mod +++ b/otelcol/go.mod @@ -1,97 +1,99 @@ module go.opentelemetry.io/collector/otelcol -go 1.20 +go 1.21 require ( - github.com/spf13/cobra v1.7.0 + github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.85.0 - go.opentelemetry.io/collector/config/configtelemetry v0.85.0 - go.opentelemetry.io/collector/confmap v0.85.0 - go.opentelemetry.io/collector/connector v0.85.0 - go.opentelemetry.io/collector/exporter v0.85.0 - go.opentelemetry.io/collector/extension v0.85.0 - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0014 - go.opentelemetry.io/collector/processor v0.85.0 - go.opentelemetry.io/collector/receiver v0.85.0 - go.opentelemetry.io/collector/service v0.0.0-20230915215502-07938f20fcc7 + go.opentelemetry.io/collector/component v0.96.0 + go.opentelemetry.io/collector/config/configtelemetry v0.96.0 + go.opentelemetry.io/collector/confmap v0.96.0 + go.opentelemetry.io/collector/confmap/converter/expandconverter v0.96.0 + go.opentelemetry.io/collector/confmap/provider/envprovider v0.96.0 + go.opentelemetry.io/collector/confmap/provider/fileprovider v0.96.0 + go.opentelemetry.io/collector/confmap/provider/httpprovider v0.96.0 + go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.96.0 + go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.96.0 + go.opentelemetry.io/collector/connector v0.96.0 + go.opentelemetry.io/collector/exporter v0.96.0 + go.opentelemetry.io/collector/extension v0.96.0 + go.opentelemetry.io/collector/featuregate v1.3.0 + go.opentelemetry.io/collector/processor v0.96.0 + go.opentelemetry.io/collector/receiver v0.96.0 + go.opentelemetry.io/collector/service v0.96.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 - golang.org/x/sys v0.12.0 - google.golang.org/grpc v1.58.1 + go.uber.org/zap v1.27.0 + golang.org/x/sys v0.17.0 + google.golang.org/grpc v1.62.0 gopkg.in/yaml.v3 v3.0.1 ) require ( - contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/uuid v1.3.1 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect + github.com/hashicorp/go-version v1.6.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.0.1 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/prometheus/client_golang v1.16.0 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect - github.com/prometheus/statsd_exporter v0.22.7 // indirect - github.com/shirou/gopsutil/v3 v3.23.8 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/shirou/gopsutil/v3 v3.24.1 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.85.0 // indirect - go.opentelemetry.io/collector/consumer v0.85.0 // indirect - go.opentelemetry.io/collector/pdata v1.0.0-rcv0014 // indirect - go.opentelemetry.io/collector/semconv v0.85.0 // indirect - go.opentelemetry.io/contrib/propagators/b3 v1.19.0 // indirect - go.opentelemetry.io/otel v1.18.0 // indirect - go.opentelemetry.io/otel/bridge/opencensus v0.41.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.41.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.41.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.41.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.18.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.18.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.18.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.41.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.41.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.18.0 // indirect - go.opentelemetry.io/otel/metric v1.18.0 // indirect - go.opentelemetry.io/otel/sdk v1.18.0 // indirect - go.opentelemetry.io/otel/sdk/metric v0.41.0 // indirect - go.opentelemetry.io/otel/trace v1.18.0 // indirect - go.opentelemetry.io/proto/otlp v1.0.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/text v0.13.0 // indirect + go.opentelemetry.io/collector v0.96.0 // indirect + go.opentelemetry.io/collector/consumer v0.96.0 // indirect + go.opentelemetry.io/collector/pdata v1.3.0 // indirect + go.opentelemetry.io/collector/semconv v0.96.0 // indirect + go.opentelemetry.io/contrib/config v0.4.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.24.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/bridge/opencensus v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect + go.opentelemetry.io/proto/otlp v1.1.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/text v0.14.0 // indirect gonum.org/v1/gonum v0.14.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/protobuf v1.32.0 // indirect ) replace go.opentelemetry.io/collector => ../ @@ -112,6 +114,18 @@ replace go.opentelemetry.io/collector/exporter => ../exporter replace go.opentelemetry.io/collector/confmap => ../confmap +replace go.opentelemetry.io/collector/confmap/converter/expandconverter => ../confmap/converter/expandconverter + +replace go.opentelemetry.io/collector/confmap/provider/envprovider => ../confmap/provider/envprovider + +replace go.opentelemetry.io/collector/confmap/provider/fileprovider => ../confmap/provider/fileprovider + +replace go.opentelemetry.io/collector/confmap/provider/httpprovider => ../confmap/provider/httpprovider + +replace go.opentelemetry.io/collector/confmap/provider/httpsprovider => ../confmap/provider/httpsprovider + +replace go.opentelemetry.io/collector/confmap/provider/yamlprovider => ../confmap/provider/yamlprovider + replace go.opentelemetry.io/collector/config/configtelemetry => ../config/configtelemetry replace go.opentelemetry.io/collector/processor => ../processor @@ -125,3 +139,5 @@ replace go.opentelemetry.io/collector/receiver => ../receiver replace go.opentelemetry.io/collector/featuregate => ../featuregate replace go.opentelemetry.io/collector/config/confignet => ../config/confignet + +replace go.opentelemetry.io/collector/config/configretry => ../config/configretry diff --git a/otelcol/go.sum b/otelcol/go.sum index cfe49b1fc62..c0bb0cbd6fd 100644 --- a/otelcol/go.sum +++ b/otelcol/go.sum @@ -1,63 +1,15 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= 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= @@ -65,468 +17,217 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= -github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +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/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= -github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +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/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 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/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= -github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/shirou/gopsutil/v3 v3.23.8 h1:xnATPiybo6GgdRoC4YoGnxXZFRc3dqQTGi73oLvvBrE= -github.com/shirou/gopsutil/v3 v3.23.8/go.mod h1:7hmCaBn+2ZwaZOr6jmPBZDfawwMGuo1id3C6aM8EDqQ= +github.com/shirou/gopsutil/v3 v3.24.1 h1:R3t6ondCEvmARp3wxODhXMTLC/klMa87h2PHUw5m7QI= +github.com/shirou/gopsutil/v3 v3.24.1/go.mod h1:UU7a2MSBQa+kW1uuDq8DeEBS8kmrnQwsv2b5O513rwU= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 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/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/propagators/b3 v1.19.0 h1:ulz44cpm6V5oAeg5Aw9HyqGFMS6XM7untlMEhD7YzzA= -go.opentelemetry.io/contrib/propagators/b3 v1.19.0/go.mod h1:OzCmE2IVS+asTI+odXQstRGVfXQ4bXv9nMBRK0nNyqQ= -go.opentelemetry.io/contrib/zpages v0.44.0 h1:9J/cxTTWhM6kzgdaBt6NiXS2HUreXn/eW2M+vzHgDAQ= -go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= -go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/bridge/opencensus v0.41.0 h1:VBpeaTbrvLFHvRtsyCJXjsTaicBNrAFdmctiN1k6WNI= -go.opentelemetry.io/otel/bridge/opencensus v0.41.0/go.mod h1:yCQB5IKRhgjlbTLc91+ixcZc2/8BncGGJ+CS3dZJwtY= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.41.0 h1:k0k7hFNDd8K4iOMJXj7s8sHaC4mhTlAeppRmZXLgZ6k= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.41.0/go.mod h1:hG4Fj/y8TR/tlEDREo8tWstl9fO9gcFkn4xrx0Io8xU= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.41.0 h1:HgbDTD8pioFdY3NRc/YCvsWjqQPtweGyXxa32LgnTOw= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.41.0/go.mod h1:tmvt/yK5Es5d6lHYWerLSOna8lCEfrBVX/a9M0ggqss= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.41.0 h1:iV3BOgW4fry1Riw9dwypigqlIYWXvSRVT2RJmblzo40= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.41.0/go.mod h1:7PGzqlKrxIRmbj5tlNW0nTkYZ5fHXDgk6Fy8/KjR0CI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.18.0 h1:IAtl+7gua134xcV3NieDhJHjjOVeJhXAnYf/0hswjUY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.18.0/go.mod h1:w+pXobnBzh95MNIkeIuAKcHe/Uu/CX2PKIvBP6ipKRA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.18.0 h1:yE32ay7mJG2leczfREEhoW3VfSZIvHaB+gvVo1o8DQ8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.18.0/go.mod h1:G17FHPDLt74bCI7tJ4CMitEk4BXTYG4FW6XUpkPBXa4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.18.0 h1:6pu8ttx76BxHf+xz/H77AUZkPF3cwWzXqAUsXhVKI18= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.18.0/go.mod h1:IOmXxPrxoxFMXdNy7lfDmE8MzE61YPcurbUm0SMjerI= -go.opentelemetry.io/otel/exporters/prometheus v0.41.0 h1:A3/bhjP5SmELy8dcpK+uttHeh9Qrh+YnS16/VzrztRQ= -go.opentelemetry.io/otel/exporters/prometheus v0.41.0/go.mod h1:mKuXEMi9suyyNJQ99SZCO0mpWGFe0MIALtjd3r6uo7Q= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.41.0 h1:XzjGkawtAXs20Y+s6k1GNDMBsMDOV28TOT8cxmE42qM= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.41.0/go.mod h1:HAomEgjcKZk3VJ+HHdHLnhZXeGqdzPxxNTdKYRopUXY= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.18.0 h1:hSWWvDjXHVLq9DkmB+77fl8v7+t+yYiS+eNkiplDK54= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.18.0/go.mod h1:zG7KQql1WjZCaUJd+L/ReSYx4bjbYJxg5ws9ws+mYes= -go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= -go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= -go.opentelemetry.io/otel/sdk v1.18.0 h1:e3bAB0wB3MljH38sHzpV/qWrOTCFrdZF2ct9F8rBkcY= -go.opentelemetry.io/otel/sdk v1.18.0/go.mod h1:1RCygWV7plY2KmdskZEDDBs4tJeHG92MdHZIluiYs/M= -go.opentelemetry.io/otel/sdk/metric v0.41.0 h1:c3sAt9/pQ5fSIUfl0gPtClV3HhE18DCVzByD33R/zsk= -go.opentelemetry.io/otel/sdk/metric v0.41.0/go.mod h1:PmOmSt+iOklKtIg5O4Vz9H/ttcRFSNTgii+E1KGyn1w= -go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= -go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= -go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= -go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= +go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= +go.opentelemetry.io/contrib/propagators/b3 v1.24.0 h1:n4xwCdTx3pZqZs2CjS/CUZAs03y3dZcGhC/FepKtEUY= +go.opentelemetry.io/contrib/propagators/b3 v1.24.0/go.mod h1:k5wRxKRU2uXx2F8uNJ4TaonuEO/V7/5xoz7kdsDACT8= +go.opentelemetry.io/contrib/zpages v0.49.0 h1:Wk217PkNBxcKWnIQpwtbZZE286K4ZY9uajnM5woSeLU= +go.opentelemetry.io/contrib/zpages v0.49.0/go.mod h1:6alLi5mmkZWbAtZMRPd1ffIgkTcsU9OTHQF2NbSOhrQ= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/bridge/opencensus v1.24.0 h1:Vlhy5ee5k5R0zASpH+9AgHiJH7xnKACI3XopO1tUZfY= +go.opentelemetry.io/otel/bridge/opencensus v1.24.0/go.mod h1:jRjVXV/X38jyrnHtvMGN8+9cejZB21JvXAAvooF2s+Q= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.24.0 h1:f2jriWfOdldanBwS9jNBdeOKAQN7b4ugAMaNu1/1k9g= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.24.0/go.mod h1:B+bcQI1yTY+N0vqMpoZbEN7+XU4tNM0DmUiOwebFJWI= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.24.0 h1:mM8nKi6/iFQ0iqst80wDHU2ge198Ye/TfN0WBS5U24Y= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.24.0/go.mod h1:0PrIIzDteLSmNyxqcGYRL4mDIo8OTuBAOI/Bn1URxac= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 h1:Mw5xcxMwlqoJd97vwPxA8isEaIoxsta9/Q51+TTJLGE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0/go.mod h1:CQNu9bj7o7mC6U7+CA/schKEYakYXWr79ucDHTMGhCM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.24.0 h1:JYE2HM7pZbOt5Jhk8ndWZTUWYOVift2cHjXVMkPdmdc= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.24.0/go.mod h1:yMb/8c6hVsnma0RpsBMNo0fEiQKeclawtgaIaOp2MLY= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 h1:s0PHtIkN+3xrbDOpt2M8OTG92cWqUESvzh2MxiR5xY8= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0/go.mod h1:hZlFbDbRt++MMPCCfSJfmhkGIWnX1h3XjkfxZUjLrIA= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/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-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.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/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -534,77 +235,24 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= gonum.org/v1/gonum v0.14.0/go.mod h1:AoWeoz0becf9QMWtE8iWXNXc27fK4fNeHNf/oMejGfU= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 h1:Z0hjGZePRE0ZBWotvtrwxFNrNE9CUAGtplaDK5NNI/g= -google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 h1:FmF5cCW94Ij59cfpoLiwTgodWmm60eEV0CjlsVg2fuw= -google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= -google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -613,37 +261,16 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/otelcol/internal/configunmarshaler/configs.go b/otelcol/internal/configunmarshaler/configs.go index 83996d5f015..ab226d3b670 100644 --- a/otelcol/internal/configunmarshaler/configs.go +++ b/otelcol/internal/configunmarshaler/configs.go @@ -23,7 +23,7 @@ func NewConfigs[F component.Factory](factories map[component.Type]F) *Configs[F] func (c *Configs[F]) Unmarshal(conf *confmap.Conf) error { rawCfgs := make(map[component.ID]map[string]any) - if err := conf.Unmarshal(&rawCfgs, confmap.WithErrorUnused()); err != nil { + if err := conf.Unmarshal(&rawCfgs); err != nil { return err } diff --git a/otelcol/internal/configunmarshaler/configs_test.go b/otelcol/internal/configunmarshaler/configs_test.go index bc869456455..f6cd2865281 100644 --- a/otelcol/internal/configunmarshaler/configs_test.go +++ b/otelcol/internal/configunmarshaler/configs_test.go @@ -18,6 +18,8 @@ import ( "go.opentelemetry.io/collector/receiver/receivertest" ) +var nopType = component.MustNewType("nop") + var testKinds = []struct { kind string factories map[component.Type]component.Factory @@ -25,31 +27,31 @@ var testKinds = []struct { { kind: "receiver", factories: map[component.Type]component.Factory{ - "nop": receivertest.NewNopFactory(), + nopType: receivertest.NewNopFactory(), }, }, { kind: "processor", factories: map[component.Type]component.Factory{ - "nop": processortest.NewNopFactory(), + nopType: processortest.NewNopFactory(), }, }, { kind: "exporter", factories: map[component.Type]component.Factory{ - "nop": exportertest.NewNopFactory(), + nopType: exportertest.NewNopFactory(), }, }, { kind: "connector", factories: map[component.Type]component.Factory{ - "nop": connectortest.NewNopFactory(), + nopType: connectortest.NewNopFactory(), }, }, { kind: "extension", factories: map[component.Type]component.Factory{ - "nop": extensiontest.NewNopFactory(), + nopType: extensiontest.NewNopFactory(), }, }, } @@ -65,8 +67,8 @@ func TestUnmarshal(t *testing.T) { require.NoError(t, cfgs.Unmarshal(conf)) assert.Equal(t, map[component.ID]component.Config{ - component.NewID("nop"): tk.factories["nop"].CreateDefaultConfig(), - component.NewIDWithName("nop", "my"+tk.kind): tk.factories["nop"].CreateDefaultConfig(), + component.NewID(nopType): tk.factories[nopType].CreateDefaultConfig(), + component.NewIDWithName(nopType, "my"+tk.kind): tk.factories[nopType].CreateDefaultConfig(), }, cfgs.Configs()) }) } diff --git a/otelcol/internal/configunmarshaler/package_test.go b/otelcol/internal/configunmarshaler/package_test.go new file mode 100644 index 00000000000..740d7d943dc --- /dev/null +++ b/otelcol/internal/configunmarshaler/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package configunmarshaler + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/otelcol/internal/grpclog/package_test.go b/otelcol/internal/grpclog/package_test.go new file mode 100644 index 00000000000..c21c7a4dd4a --- /dev/null +++ b/otelcol/internal/grpclog/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package grpclog + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/otelcol/otelcoltest/config.go b/otelcol/otelcoltest/config.go index 74cdb18f260..fc2957d893a 100644 --- a/otelcol/otelcoltest/config.go +++ b/otelcol/otelcoltest/config.go @@ -20,9 +20,14 @@ func LoadConfig(fileName string, factories otelcol.Factories) (*otelcol.Config, // Read yaml config from file provider, err := otelcol.NewConfigProvider(otelcol.ConfigProviderSettings{ ResolverSettings: confmap.ResolverSettings{ - URIs: []string{fileName}, - Providers: makeMapProvidersMap(fileprovider.New(), envprovider.New(), yamlprovider.New(), httpprovider.New()), - Converters: []confmap.Converter{expandconverter.New()}, + URIs: []string{fileName}, + Providers: makeMapProvidersMap( + fileprovider.NewWithSettings(confmap.ProviderSettings{}), + envprovider.NewWithSettings(confmap.ProviderSettings{}), + yamlprovider.NewWithSettings(confmap.ProviderSettings{}), + httpprovider.NewWithSettings(confmap.ProviderSettings{}), + ), + Converters: []confmap.Converter{expandconverter.New(confmap.ConverterSettings{})}, }, }) if err != nil { diff --git a/otelcol/otelcoltest/config_test.go b/otelcol/otelcoltest/config_test.go index 1ab8ad1304d..71502de536e 100644 --- a/otelcol/otelcoltest/config_test.go +++ b/otelcol/otelcoltest/config_test.go @@ -23,39 +23,39 @@ func TestLoadConfig(t *testing.T) { // Verify extensions. require.Len(t, cfg.Extensions, 2) - assert.Contains(t, cfg.Extensions, component.NewID("nop")) - assert.Contains(t, cfg.Extensions, component.NewIDWithName("nop", "myextension")) + assert.Contains(t, cfg.Extensions, component.MustNewID("nop")) + assert.Contains(t, cfg.Extensions, component.MustNewIDWithName("nop", "myextension")) // Verify receivers require.Len(t, cfg.Receivers, 2) - assert.Contains(t, cfg.Receivers, component.NewID("nop")) - assert.Contains(t, cfg.Receivers, component.NewIDWithName("nop", "myreceiver")) + assert.Contains(t, cfg.Receivers, component.MustNewID("nop")) + assert.Contains(t, cfg.Receivers, component.MustNewIDWithName("nop", "myreceiver")) // Verify exporters assert.Len(t, cfg.Exporters, 2) - assert.Contains(t, cfg.Exporters, component.NewID("nop")) - assert.Contains(t, cfg.Exporters, component.NewIDWithName("nop", "myexporter")) + assert.Contains(t, cfg.Exporters, component.MustNewID("nop")) + assert.Contains(t, cfg.Exporters, component.MustNewIDWithName("nop", "myexporter")) // Verify procs assert.Len(t, cfg.Processors, 2) - assert.Contains(t, cfg.Processors, component.NewID("nop")) - assert.Contains(t, cfg.Processors, component.NewIDWithName("nop", "myprocessor")) + assert.Contains(t, cfg.Processors, component.MustNewID("nop")) + assert.Contains(t, cfg.Processors, component.MustNewIDWithName("nop", "myprocessor")) // Verify connectors assert.Len(t, cfg.Connectors, 1) - assert.Contains(t, cfg.Connectors, component.NewIDWithName("nop", "myconnector")) + assert.Contains(t, cfg.Connectors, component.MustNewIDWithName("nop", "myconnector")) // Verify service. require.Len(t, cfg.Service.Extensions, 1) - assert.Contains(t, cfg.Service.Extensions, component.NewID("nop")) + assert.Contains(t, cfg.Service.Extensions, component.MustNewID("nop")) require.Len(t, cfg.Service.Pipelines, 1) assert.Equal(t, &pipelines.PipelineConfig{ - Receivers: []component.ID{component.NewID("nop")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("nop")}, + Receivers: []component.ID{component.MustNewID("nop")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, - cfg.Service.Pipelines[component.NewID("traces")], + cfg.Service.Pipelines[component.MustNewID("traces")], "Did not load pipeline config correctly") } diff --git a/otelcol/otelcoltest/nop_factories_test.go b/otelcol/otelcoltest/nop_factories_test.go index b70720c026b..1f77ecdd68e 100644 --- a/otelcol/otelcoltest/nop_factories_test.go +++ b/otelcol/otelcoltest/nop_factories_test.go @@ -11,32 +11,34 @@ import ( "go.opentelemetry.io/collector/component" ) +var nopType = component.MustNewType("nop") + func TestNopFactories(t *testing.T) { nopFactories, err := NopFactories() require.NoError(t, err) require.Equal(t, 1, len(nopFactories.Receivers)) - nopReceiverFactory, ok := nopFactories.Receivers["nop"] + nopReceiverFactory, ok := nopFactories.Receivers[nopType] require.True(t, ok) - require.Equal(t, component.Type("nop"), nopReceiverFactory.Type()) + require.Equal(t, nopType, nopReceiverFactory.Type()) require.Equal(t, 1, len(nopFactories.Processors)) - nopProcessorFactory, ok := nopFactories.Processors["nop"] + nopProcessorFactory, ok := nopFactories.Processors[nopType] require.True(t, ok) - require.Equal(t, component.Type("nop"), nopProcessorFactory.Type()) + require.Equal(t, nopType, nopProcessorFactory.Type()) require.Equal(t, 1, len(nopFactories.Exporters)) - nopExporterFactory, ok := nopFactories.Exporters["nop"] + nopExporterFactory, ok := nopFactories.Exporters[nopType] require.True(t, ok) - require.Equal(t, component.Type("nop"), nopExporterFactory.Type()) + require.Equal(t, nopType, nopExporterFactory.Type()) require.Equal(t, 1, len(nopFactories.Extensions)) - nopExtensionFactory, ok := nopFactories.Extensions["nop"] + nopExtensionFactory, ok := nopFactories.Extensions[nopType] require.True(t, ok) - require.Equal(t, component.Type("nop"), nopExtensionFactory.Type()) + require.Equal(t, nopType, nopExtensionFactory.Type()) require.Equal(t, 1, len(nopFactories.Connectors)) - nopConnectorFactory, ok := nopFactories.Connectors["nop"] + nopConnectorFactory, ok := nopFactories.Connectors[nopType] require.True(t, ok) - require.Equal(t, component.Type("nop"), nopConnectorFactory.Type()) + require.Equal(t, nopType, nopConnectorFactory.Type()) } diff --git a/otelcol/otelcoltest/package_test.go b/otelcol/otelcoltest/package_test.go new file mode 100644 index 00000000000..9c8fe3dde5a --- /dev/null +++ b/otelcol/otelcoltest/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otelcoltest + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/otelcol/package_test.go b/otelcol/package_test.go new file mode 100644 index 00000000000..539e88c85c4 --- /dev/null +++ b/otelcol/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otelcol + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/otelcol/testdata/otelcol-statuswatcher.yaml b/otelcol/testdata/otelcol-statuswatcher.yaml new file mode 100644 index 00000000000..2dcc322d341 --- /dev/null +++ b/otelcol/testdata/otelcol-statuswatcher.yaml @@ -0,0 +1,31 @@ +receivers: + nop: + +processors: + nop: + unhealthy: + +exporters: + nop: + +extensions: + statuswatcher: + +service: + telemetry: + metrics: + address: localhost:8888 + extensions: [statuswatcher] + pipelines: + traces: + receivers: [nop] + processors: [nop,unhealthy] + exporters: [nop] + metrics: + receivers: [nop] + processors: [nop,unhealthy] + exporters: [nop] + logs: + receivers: [nop] + processors: [nop,unhealthy] + exporters: [nop] diff --git a/otelcol/unmarshaler.go b/otelcol/unmarshaler.go index 88f25dfc93f..643e396db42 100644 --- a/otelcol/unmarshaler.go +++ b/otelcol/unmarshaler.go @@ -4,6 +4,8 @@ package otelcol // import "go.opentelemetry.io/collector/otelcol" import ( + "time" + "go.uber.org/zap/zapcore" "go.opentelemetry.io/collector/config/configtelemetry" @@ -45,7 +47,9 @@ func unmarshal(v *confmap.Conf, factories Factories) (*configSettings, error) { Development: false, Encoding: "console", Sampling: &telemetry.LogsSamplingConfig{ - Initial: 100, + Enabled: true, + Tick: 10 * time.Second, + Initial: 10, Thereafter: 100, }, OutputPaths: []string{"stderr"}, @@ -62,5 +66,5 @@ func unmarshal(v *confmap.Conf, factories Factories) (*configSettings, error) { }, } - return cfg, v.Unmarshal(&cfg, confmap.WithErrorUnused()) + return cfg, v.Unmarshal(&cfg) } diff --git a/otelcol/unmarshaler_test.go b/otelcol/unmarshaler_test.go index c4ef21906db..18fd5f631db 100644 --- a/otelcol/unmarshaler_test.go +++ b/otelcol/unmarshaler_test.go @@ -5,6 +5,7 @@ package otelcol import ( "testing" + "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -45,7 +46,9 @@ func TestUnmarshalEmptyAllSections(t *testing.T) { Development: zapProdCfg.Development, Encoding: "console", Sampling: &telemetry.LogsSamplingConfig{ - Initial: 100, + Enabled: true, + Tick: 10 * time.Second, + Initial: 10, Thereafter: 100, }, DisableCaller: zapProdCfg.DisableCaller, @@ -132,7 +135,7 @@ func TestPipelineConfigUnmarshalError(t *testing.T) { for _, tt := range testCases { t.Run(tt.name, func(t *testing.T) { pips := new(pipelines.Config) - err := tt.conf.Unmarshal(&pips, confmap.WithErrorUnused()) + err := tt.conf.Unmarshal(&pips) require.Error(t, err) assert.Contains(t, err.Error(), tt.expectError) }) @@ -200,7 +203,7 @@ func TestServiceUnmarshalError(t *testing.T) { for _, tt := range testCases { t.Run(tt.name, func(t *testing.T) { - err := tt.conf.Unmarshal(&service.Config{}, confmap.WithErrorUnused()) + err := tt.conf.Unmarshal(&service.Config{}) require.Error(t, err) assert.Contains(t, err.Error(), tt.expectError) }) diff --git a/pdata/go.mod b/pdata/go.mod index c2a39ce6970..5adab7efc2d 100644 --- a/pdata/go.mod +++ b/pdata/go.mod @@ -1,14 +1,15 @@ module go.opentelemetry.io/collector/pdata -go 1.20 +go 1.21 require ( github.com/gogo/protobuf v1.3.2 github.com/json-iterator/go v1.1.12 github.com/stretchr/testify v1.8.4 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 - google.golang.org/grpc v1.58.1 - google.golang.org/protobuf v1.31.0 + google.golang.org/grpc v1.62.0 + google.golang.org/protobuf v1.32.0 ) require ( @@ -19,10 +20,10 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect + golang.org/x/net v0.20.0 // indirect + golang.org/x/sys v0.16.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/pdata/go.sum b/pdata/go.sum index b2401ef80ca..989737ec2ef 100644 --- a/pdata/go.sum +++ b/pdata/go.sum @@ -8,7 +8,8 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= @@ -38,6 +39,8 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -49,20 +52,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -71,14 +74,14 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= -google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/pdata/internal/cmd/pdatagen/internal/base_fields.go b/pdata/internal/cmd/pdatagen/internal/base_fields.go index de5419c666d..7e0f60dd679 100644 --- a/pdata/internal/cmd/pdatagen/internal/base_fields.go +++ b/pdata/internal/cmd/pdatagen/internal/base_fields.go @@ -12,9 +12,15 @@ import ( const accessorSliceTemplate = `// {{ .fieldName }} returns the {{ .fieldName }} associated with this {{ .structName }}. func (ms {{ .structName }}) {{ .fieldName }}() {{ .packageName }}{{ .returnType }} { {{- if .isCommon }} - return {{ .packageName }}{{ .returnType }}(internal.New{{ .returnType }}(&ms.{{ .origAccessor }}.{{ .fieldName }})) + return {{ .packageName }}{{ .returnType }}(internal.New{{ .returnType }}(&ms.{{ .origAccessor }}.{{ .fieldName }} + {{- if .isBaseStructCommon -}} + , internal.Get{{ .structName }}State(internal.{{ .structName }}(ms)) + {{- else -}} + , ms.state + {{- end -}} + )) {{- else }} - return new{{ .returnType }}(&ms.{{ .origAccessor }}.{{ .fieldName }}) + return new{{ .returnType }}(&ms.{{ .origAccessor }}.{{ .fieldName }}, ms.state) {{- end }} }` @@ -36,14 +42,14 @@ const setTestValueTemplate = `{{ if .isCommon -}} {{- else -}} fillTest{{ .returnType }}(new {{- end -}} - {{ .returnType }}(&tv.orig.{{ .fieldName }}))` + {{ .returnType }}(&tv.orig.{{ .fieldName }}, tv.state))` const accessorsMessageValueTemplate = `// {{ .fieldName }} returns the {{ .lowerFieldName }} associated with this {{ .structName }}. func (ms {{ .structName }}) {{ .fieldName }}() {{ .packageName }}{{ .returnType }} { {{- if .isCommon }} - return {{ .packageName }}{{ .returnType }}(internal.New{{ .returnType }}(&ms.{{ .origAccessor }}.{{ .fieldName }})) + return {{ .packageName }}{{ .returnType }}(internal.New{{ .returnType }}(&ms.{{ .origAccessor }}.{{ .fieldName }}, ms.state)) {{- else }} - return new{{ .returnType }}(&ms.{{ .origAccessor }}.{{ .fieldName }}) + return new{{ .returnType }}(&ms.{{ .origAccessor }}.{{ .fieldName }}, ms.state) {{- end }} }` @@ -65,12 +71,13 @@ func (ms {{ .structName }}) {{ .fieldName }}() {{ .packageName }}{{ .returnType // Set{{ .fieldName }} replaces the {{ .lowerFieldName }} associated with this {{ .structName }}. func (ms {{ .structName }}) Set{{ .fieldName }}(v {{ .returnType }}) { + ms.{{ .stateAccessor }}.AssertMutable() ms.{{ .origAccessor }}.{{ .fieldName }} = v }` const accessorsPrimitiveSliceTemplate = `// {{ .fieldName }} returns the {{ .lowerFieldName }} associated with this {{ .structName }}. func (ms {{ .structName }}) {{ .fieldName }}() {{ .packageName }}{{ .returnType }} { - return {{ .packageName }}{{ .returnType }}(internal.New{{ .returnType }}(&ms.{{ .origAccessor }}.{{ .fieldName }})) + return {{ .packageName }}{{ .returnType }}(internal.New{{ .returnType }}(&ms.{{ .origAccessor }}.{{ .fieldName }}, ms.state)) }` const oneOfTypeAccessorTemplate = `// {{ .typeFuncName }} returns the type of the {{ .lowerOriginFieldName }} for this {{ .structName }}. @@ -78,7 +85,7 @@ const oneOfTypeAccessorTemplate = `// {{ .typeFuncName }} returns the type of th func (ms {{ .structName }}) {{ .typeFuncName }}() {{ .typeName }} { switch ms.{{ .origAccessor }}.{{ .originFieldName }}.(type) { {{- range .values }} - {{ .GenerateTypeSwitchCase $.oneOfField }} + {{ .GenerateTypeSwitchCase $.baseStruct $.oneOfField }} {{- end }} } return {{ .typeName }}Empty @@ -108,7 +115,7 @@ func (ms {{ .structName }}) {{ .fieldName }}() {{ .returnType }} { if !ok { return {{ .returnType }}{} } - return new{{ .returnType }}(v.{{ .fieldName }}) + return new{{ .returnType }}(v.{{ .fieldName }}, ms.state) } // SetEmpty{{ .fieldName }} sets an empty {{ .lowerFieldName }} to this {{ .structName }}. @@ -117,9 +124,10 @@ func (ms {{ .structName }}) {{ .fieldName }}() {{ .returnType }} { // // Calling this function on zero-initialized {{ .structName }} will cause a panic. func (ms {{ .structName }}) SetEmpty{{ .fieldName }}() {{ .returnType }} { + ms.state.AssertMutable() val := &{{ .originFieldPackageName }}.{{ .fieldName }}{} ms.orig.{{ .originOneOfFieldName }} = &{{ .originStructType }}{{ "{" }}{{ .fieldName }}: val} - return new{{ .returnType }}(val) + return new{{ .returnType }}(val, ms.state) }` const accessorsOneOfMessageTestTemplate = `func Test{{ .structName }}_{{ .fieldName }}(t *testing.T) { @@ -127,6 +135,8 @@ const accessorsOneOfMessageTestTemplate = `func Test{{ .structName }}_{{ .fieldN fillTest{{ .returnType }}(ms.SetEmpty{{ .fieldName }}()) assert.Equal(t, {{ .typeName }}, ms.{{ .originOneOfTypeFuncName }}()) assert.Equal(t, generateTest{{ .returnType }}(), ms.{{ .fieldName }}()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { new{{ .structName }}(&{{ .originStructName }}{}, &sharedState).SetEmpty{{ .fieldName }}() }) } func Test{{ .structName }}_CopyTo_{{ .fieldName }}(t *testing.T) { @@ -135,6 +145,8 @@ func Test{{ .structName }}_CopyTo_{{ .fieldName }}(t *testing.T) { dest := New{{ .structName }}() ms.CopyTo(dest) assert.Equal(t, ms, dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(new{{ .structName }}(&{{ .originStructName }}{}, &sharedState)) }) }` const copyToValueOneOfMessageTemplate = ` case {{ .typeName }}: @@ -147,6 +159,7 @@ func (ms {{ .structName }}) {{ .accessorFieldName }}() {{ .returnType }} { // Set{{ .accessorFieldName }} replaces the {{ .lowerFieldName }} associated with this {{ .structName }}. func (ms {{ .structName }}) Set{{ .accessorFieldName }}(v {{ .returnType }}) { + ms.state.AssertMutable() ms.orig.{{ .originOneOfFieldName }} = &{{ .originStructType }}{ {{ .originFieldName }}: v, } @@ -158,6 +171,8 @@ const accessorsOneOfPrimitiveTestTemplate = `func Test{{ .structName }}_{{ .acce ms.Set{{ .accessorFieldName }}({{ .testValue }}) assert.Equal(t, {{ .testValue }}, ms.{{ .accessorFieldName }}()) assert.Equal(t, {{ .typeName }}, ms.{{ .originOneOfTypeFuncName }}()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { new{{ .structName }}(&{{ .originStructName }}{}, &sharedState).Set{{ .accessorFieldName }}({{ .testValue }}) }) }` const accessorsPrimitiveTestTemplate = `func Test{{ .structName }}_{{ .fieldName }}(t *testing.T) { @@ -165,6 +180,8 @@ const accessorsPrimitiveTestTemplate = `func Test{{ .structName }}_{{ .fieldName assert.Equal(t, {{ .defaultVal }}, ms.{{ .fieldName }}()) ms.Set{{ .fieldName }}({{ .testValue }}) assert.Equal(t, {{ .testValue }}, ms.{{ .fieldName }}()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { new{{ .structName }}(&{{ .originStructName }}{}, &sharedState).Set{{ .fieldName }}({{ .testValue }}) }) }` const accessorsPrimitiveTypedTemplate = `// {{ .fieldName }} returns the {{ .lowerFieldName }} associated with this {{ .structName }}. @@ -174,6 +191,7 @@ func (ms {{ .structName }}) {{ .fieldName }}() {{ .packageName }}{{ .returnType // Set{{ .fieldName }} replaces the {{ .lowerFieldName }} associated with this {{ .structName }}. func (ms {{ .structName }}) Set{{ .fieldName }}(v {{ .packageName }}{{ .returnType }}) { + ms.state.AssertMutable() ms.orig.{{ .originFieldName }} = {{ .rawType }}(v) }` @@ -205,11 +223,13 @@ func (ms {{ .structName }}) Has{{ .fieldName }}() bool { // Set{{ .fieldName }} replaces the {{ .lowerFieldName }} associated with this {{ .structName }}. func (ms {{ .structName }}) Set{{ .fieldName }}(v {{ .returnType }}) { + ms.state.AssertMutable() ms.orig.{{ .fieldName }}_ = &{{ .originStructType }}{{ "{" }}{{ .fieldName }}: v} } // Remove{{ .fieldName }} removes the {{ .lowerFieldName }} associated with this {{ .structName }}. func (ms {{ .structName }}) Remove{{ .fieldName }}() { + ms.state.AssertMutable() ms.orig.{{ .fieldName }}_ = nil }` @@ -224,13 +244,13 @@ const accessorsOptionalPrimitiveTestTemplate = `func Test{{ .structName }}_{{ .f }` type baseField interface { - GenerateAccessors(ms baseStruct) string + GenerateAccessors(ms *messageValueStruct) string - GenerateAccessorsTest(ms baseStruct) string + GenerateAccessorsTest(ms *messageValueStruct) string - GenerateSetWithTestValue(ms baseStruct) string + GenerateSetWithTestValue(ms *messageValueStruct) string - GenerateCopyToValue(ms baseStruct) string + GenerateCopyToValue(ms *messageValueStruct) string } type sliceField struct { @@ -238,7 +258,7 @@ type sliceField struct { returnSlice baseSlice } -func (sf *sliceField) GenerateAccessors(ms baseStruct) string { +func (sf *sliceField) GenerateAccessors(ms *messageValueStruct) string { sb := &strings.Builder{} t := template.Must(template.New("accessorSliceTemplate").Parse(accessorSliceTemplate)) if err := t.Execute(sb, sf.templateFields(ms)); err != nil { @@ -247,7 +267,7 @@ func (sf *sliceField) GenerateAccessors(ms baseStruct) string { return sb.String() } -func (sf *sliceField) GenerateAccessorsTest(ms baseStruct) string { +func (sf *sliceField) GenerateAccessorsTest(ms *messageValueStruct) string { sb := &strings.Builder{} t := template.Must(template.New("accessorsSliceTestTemplate").Parse(accessorsSliceTestTemplate)) if err := t.Execute(sb, sf.templateFields(ms)); err != nil { @@ -256,7 +276,7 @@ func (sf *sliceField) GenerateAccessorsTest(ms baseStruct) string { return sb.String() } -func (sf *sliceField) GenerateSetWithTestValue(ms baseStruct) string { +func (sf *sliceField) GenerateSetWithTestValue(ms *messageValueStruct) string { sb := &strings.Builder{} t := template.Must(template.New("setTestValueTemplate").Parse(setTestValueTemplate)) if err := t.Execute(sb, sf.templateFields(ms)); err != nil { @@ -265,24 +285,25 @@ func (sf *sliceField) GenerateSetWithTestValue(ms baseStruct) string { return sb.String() } -func (sf *sliceField) GenerateCopyToValue(_ baseStruct) string { +func (sf *sliceField) GenerateCopyToValue(*messageValueStruct) string { return "\tms." + sf.fieldName + "().CopyTo(dest." + sf.fieldName + "())" } -func (sf *sliceField) templateFields(ms baseStruct) map[string]any { +func (sf *sliceField) templateFields(ms *messageValueStruct) map[string]any { return map[string]any{ "structName": ms.getName(), "fieldName": sf.fieldName, "packageName": func() string { - if sf.returnSlice.getPackageName() != ms.getPackageName() { + if sf.returnSlice.getPackageName() != ms.packageName { return sf.returnSlice.getPackageName() + "." } return "" }(), "returnType": sf.returnSlice.getName(), "origAccessor": origAccessor(ms), + "stateAccessor": stateAccessor(ms), "isCommon": usedByOtherDataTypes(sf.returnSlice.getPackageName()), - "isBaseStructCommon": usedByOtherDataTypes(ms.getPackageName()), + "isBaseStructCommon": usedByOtherDataTypes(ms.packageName), } } @@ -290,10 +311,10 @@ var _ baseField = (*sliceField)(nil) type messageValueField struct { fieldName string - returnMessage baseStruct + returnMessage *messageValueStruct } -func (mf *messageValueField) GenerateAccessors(ms baseStruct) string { +func (mf *messageValueField) GenerateAccessors(ms *messageValueStruct) string { sb := &strings.Builder{} t := template.Must(template.New("accessorsMessageValueTemplate").Parse(accessorsMessageValueTemplate)) if err := t.Execute(sb, mf.templateFields(ms)); err != nil { @@ -302,7 +323,7 @@ func (mf *messageValueField) GenerateAccessors(ms baseStruct) string { return sb.String() } -func (mf *messageValueField) GenerateAccessorsTest(ms baseStruct) string { +func (mf *messageValueField) GenerateAccessorsTest(ms *messageValueStruct) string { sb := &strings.Builder{} t := template.Must(template.New("accessorsMessageValueTestTemplate").Parse(accessorsMessageValueTestTemplate)) if err := t.Execute(sb, mf.templateFields(ms)); err != nil { @@ -311,7 +332,7 @@ func (mf *messageValueField) GenerateAccessorsTest(ms baseStruct) string { return sb.String() } -func (mf *messageValueField) GenerateSetWithTestValue(ms baseStruct) string { +func (mf *messageValueField) GenerateSetWithTestValue(ms *messageValueStruct) string { sb := &strings.Builder{} t := template.Must(template.New("setTestValueTemplate").Parse(setTestValueTemplate)) if err := t.Execute(sb, mf.templateFields(ms)); err != nil { @@ -320,24 +341,25 @@ func (mf *messageValueField) GenerateSetWithTestValue(ms baseStruct) string { return sb.String() } -func (mf *messageValueField) GenerateCopyToValue(_ baseStruct) string { +func (mf *messageValueField) GenerateCopyToValue(*messageValueStruct) string { return "\tms." + mf.fieldName + "().CopyTo(dest." + mf.fieldName + "())" } -func (mf *messageValueField) templateFields(ms baseStruct) map[string]any { +func (mf *messageValueField) templateFields(ms *messageValueStruct) map[string]any { return map[string]any{ - "isCommon": usedByOtherDataTypes(mf.returnMessage.getPackageName()), + "isCommon": usedByOtherDataTypes(mf.returnMessage.packageName), "structName": ms.getName(), "fieldName": mf.fieldName, "lowerFieldName": strings.ToLower(mf.fieldName), "returnType": mf.returnMessage.getName(), "packageName": func() string { - if mf.returnMessage.getPackageName() != ms.getPackageName() { - return mf.returnMessage.getPackageName() + "." + if mf.returnMessage.packageName != ms.packageName { + return mf.returnMessage.packageName + "." } return "" }(), - "origAccessor": origAccessor(ms), + "origAccessor": origAccessor(ms), + "stateAccessor": stateAccessor(ms), } } @@ -350,7 +372,7 @@ type primitiveField struct { testVal string } -func (pf *primitiveField) GenerateAccessors(ms baseStruct) string { +func (pf *primitiveField) GenerateAccessors(ms *messageValueStruct) string { sb := &strings.Builder{} t := template.Must(template.New("accessorsPrimitiveTemplate").Parse(accessorsPrimitiveTemplate)) if err := t.Execute(sb, pf.templateFields(ms)); err != nil { @@ -359,7 +381,7 @@ func (pf *primitiveField) GenerateAccessors(ms baseStruct) string { return sb.String() } -func (pf *primitiveField) GenerateAccessorsTest(ms baseStruct) string { +func (pf *primitiveField) GenerateAccessorsTest(ms *messageValueStruct) string { sb := &strings.Builder{} t := template.Must(template.New("accessorsPrimitiveTestTemplate").Parse(accessorsPrimitiveTestTemplate)) if err := t.Execute(sb, pf.templateFields(ms)); err != nil { @@ -368,24 +390,26 @@ func (pf *primitiveField) GenerateAccessorsTest(ms baseStruct) string { return sb.String() } -func (pf *primitiveField) GenerateSetWithTestValue(_ baseStruct) string { +func (pf *primitiveField) GenerateSetWithTestValue(*messageValueStruct) string { return "\ttv.orig." + pf.fieldName + " = " + pf.testVal } -func (pf *primitiveField) GenerateCopyToValue(_ baseStruct) string { +func (pf *primitiveField) GenerateCopyToValue(*messageValueStruct) string { return "\tdest.Set" + pf.fieldName + "(ms." + pf.fieldName + "())" } -func (pf *primitiveField) templateFields(ms baseStruct) map[string]any { +func (pf *primitiveField) templateFields(ms *messageValueStruct) map[string]any { return map[string]any{ - "structName": ms.getName(), - "packageName": "", - "defaultVal": pf.defaultVal, - "fieldName": pf.fieldName, - "lowerFieldName": strings.ToLower(pf.fieldName), - "testValue": pf.testVal, - "returnType": pf.returnType, - "origAccessor": origAccessor(ms), + "structName": ms.getName(), + "packageName": "", + "defaultVal": pf.defaultVal, + "fieldName": pf.fieldName, + "lowerFieldName": strings.ToLower(pf.fieldName), + "testValue": pf.testVal, + "returnType": pf.returnType, + "origAccessor": origAccessor(ms), + "stateAccessor": stateAccessor(ms), + "originStructName": ms.originFullName, } } @@ -406,7 +430,7 @@ type primitiveTypedField struct { returnType *primitiveType } -func (ptf *primitiveTypedField) GenerateAccessors(ms baseStruct) string { +func (ptf *primitiveTypedField) GenerateAccessors(ms *messageValueStruct) string { sb := &strings.Builder{} t := template.Must(template.New("accessorsPrimitiveTypedTemplate").Parse(accessorsPrimitiveTypedTemplate)) if err := t.Execute(sb, ptf.templateFields(ms)); err != nil { @@ -415,7 +439,7 @@ func (ptf *primitiveTypedField) GenerateAccessors(ms baseStruct) string { return sb.String() } -func (ptf *primitiveTypedField) GenerateAccessorsTest(ms baseStruct) string { +func (ptf *primitiveTypedField) GenerateAccessorsTest(ms *messageValueStruct) string { sb := &strings.Builder{} t := template.Must(template.New("accessorsPrimitiveTypedTestTemplate").Parse(accessorsPrimitiveTypedTestTemplate)) if err := t.Execute(sb, ptf.templateFields(ms)); err != nil { @@ -424,7 +448,7 @@ func (ptf *primitiveTypedField) GenerateAccessorsTest(ms baseStruct) string { return sb.String() } -func (ptf *primitiveTypedField) GenerateSetWithTestValue(_ baseStruct) string { +func (ptf *primitiveTypedField) GenerateSetWithTestValue(*messageValueStruct) string { originFieldName := ptf.fieldName if ptf.originFieldName != "" { originFieldName = ptf.originFieldName @@ -432,16 +456,16 @@ func (ptf *primitiveTypedField) GenerateSetWithTestValue(_ baseStruct) string { return "\ttv.orig." + originFieldName + " = " + ptf.returnType.testVal } -func (ptf *primitiveTypedField) GenerateCopyToValue(_ baseStruct) string { +func (ptf *primitiveTypedField) GenerateCopyToValue(*messageValueStruct) string { return "\tdest.Set" + ptf.fieldName + "(ms." + ptf.fieldName + "())" } -func (ptf *primitiveTypedField) templateFields(ms baseStruct) map[string]any { +func (ptf *primitiveTypedField) templateFields(ms *messageValueStruct) map[string]any { return map[string]any{ "structName": ms.getName(), "defaultVal": ptf.returnType.defaultVal, "packageName": func() string { - if ptf.returnType.packageName != ms.getPackageName() { + if ptf.returnType.packageName != ms.packageName { return ptf.returnType.packageName + "." } return "" @@ -472,7 +496,7 @@ type primitiveSliceField struct { testVal string } -func (psf *primitiveSliceField) GenerateAccessors(ms baseStruct) string { +func (psf *primitiveSliceField) GenerateAccessors(ms *messageValueStruct) string { sb := &strings.Builder{} t := template.Must(template.New("accessorsPrimitiveSliceTemplate").Parse(accessorsPrimitiveSliceTemplate)) if err := t.Execute(sb, psf.templateFields(ms)); err != nil { @@ -481,7 +505,7 @@ func (psf *primitiveSliceField) GenerateAccessors(ms baseStruct) string { return sb.String() } -func (psf *primitiveSliceField) GenerateAccessorsTest(ms baseStruct) string { +func (psf *primitiveSliceField) GenerateAccessorsTest(ms *messageValueStruct) string { sb := &strings.Builder{} t := template.Must(template.New("accessorsPrimitiveSliceTestTemplate").Parse(accessorsPrimitiveSliceTestTemplate)) if err := t.Execute(sb, psf.templateFields(ms)); err != nil { @@ -490,19 +514,19 @@ func (psf *primitiveSliceField) GenerateAccessorsTest(ms baseStruct) string { return sb.String() } -func (psf *primitiveSliceField) GenerateSetWithTestValue(_ baseStruct) string { +func (psf *primitiveSliceField) GenerateSetWithTestValue(*messageValueStruct) string { return "\ttv.orig." + psf.fieldName + " = " + psf.testVal } -func (psf *primitiveSliceField) GenerateCopyToValue(_ baseStruct) string { +func (psf *primitiveSliceField) GenerateCopyToValue(*messageValueStruct) string { return "\tms." + psf.fieldName + "().CopyTo(dest." + psf.fieldName + "())" } -func (psf *primitiveSliceField) templateFields(ms baseStruct) map[string]any { +func (psf *primitiveSliceField) templateFields(ms *messageValueStruct) map[string]any { return map[string]any{ "structName": ms.getName(), "packageName": func() string { - if psf.returnPackageName != ms.getPackageName() { + if psf.returnPackageName != ms.packageName { return psf.returnPackageName + "." } return "" @@ -513,13 +537,13 @@ func (psf *primitiveSliceField) templateFields(ms baseStruct) map[string]any { "lowerFieldName": strings.ToLower(psf.fieldName), "testValue": psf.testVal, "origAccessor": origAccessor(ms), + "stateAccessor": stateAccessor(ms), } } var _ baseField = (*primitiveSliceField)(nil) type oneOfField struct { - originTypePrefix string originFieldName string typeName string testValueIdx int @@ -527,7 +551,7 @@ type oneOfField struct { omitOriginFieldNameInNames bool } -func (of *oneOfField) GenerateAccessors(ms baseStruct) string { +func (of *oneOfField) GenerateAccessors(ms *messageValueStruct) string { sb := &strings.Builder{} t := template.Must(template.New("oneOfTypeAccessorTemplate").Parse(oneOfTypeAccessorTemplate)) if err := t.Execute(sb, of.templateFields(ms)); err != nil { @@ -544,7 +568,7 @@ func (of *oneOfField) typeFuncName() string { return of.originFieldName + typeSuffix } -func (of *oneOfField) GenerateAccessorsTest(ms baseStruct) string { +func (of *oneOfField) GenerateAccessorsTest(ms *messageValueStruct) string { sb := &strings.Builder{} t := template.Must(template.New("oneOfTypeAccessorTestTemplate").Parse(oneOfTypeAccessorTestTemplate)) if err := t.Execute(sb, of.templateFields(ms)); err != nil { @@ -553,11 +577,11 @@ func (of *oneOfField) GenerateAccessorsTest(ms baseStruct) string { return sb.String() } -func (of *oneOfField) GenerateSetWithTestValue(_ baseStruct) string { - return of.values[of.testValueIdx].GenerateSetWithTestValue(of) +func (of *oneOfField) GenerateSetWithTestValue(ms *messageValueStruct) string { + return of.values[of.testValueIdx].GenerateSetWithTestValue(ms, of) } -func (of *oneOfField) GenerateCopyToValue(ms baseStruct) string { +func (of *oneOfField) GenerateCopyToValue(ms *messageValueStruct) string { sb := &bytes.Buffer{} sb.WriteString("\tswitch ms." + of.typeFuncName() + "() {\n") for _, v := range of.values { @@ -567,7 +591,7 @@ func (of *oneOfField) GenerateCopyToValue(ms baseStruct) string { return sb.String() } -func (of *oneOfField) templateFields(ms baseStruct) map[string]any { +func (of *oneOfField) templateFields(ms *messageValueStruct) map[string]any { return map[string]any{ "baseStruct": ms, "oneOfField": of, @@ -577,19 +601,20 @@ func (of *oneOfField) templateFields(ms baseStruct) map[string]any { "originFieldName": of.originFieldName, "lowerOriginFieldName": strings.ToLower(of.originFieldName), "origAccessor": origAccessor(ms), + "stateAccessor": stateAccessor(ms), "values": of.values, - "originTypePrefix": of.originTypePrefix, + "originTypePrefix": ms.originFullName + "_", } } var _ baseField = (*oneOfField)(nil) type oneOfValue interface { - GenerateAccessors(ms baseStruct, of *oneOfField) string - GenerateTests(ms baseStruct, of *oneOfField) string - GenerateSetWithTestValue(of *oneOfField) string - GenerateCopyToValue(ms baseStruct, of *oneOfField, sb *bytes.Buffer) - GenerateTypeSwitchCase(of *oneOfField) string + GenerateAccessors(ms *messageValueStruct, of *oneOfField) string + GenerateTests(ms *messageValueStruct, of *oneOfField) string + GenerateSetWithTestValue(ms *messageValueStruct, of *oneOfField) string + GenerateCopyToValue(ms *messageValueStruct, of *oneOfField, sb *bytes.Buffer) + GenerateTypeSwitchCase(ms *messageValueStruct, of *oneOfField) string } type oneOfPrimitiveValue struct { @@ -600,7 +625,7 @@ type oneOfPrimitiveValue struct { originFieldName string } -func (opv *oneOfPrimitiveValue) GenerateAccessors(ms baseStruct, of *oneOfField) string { +func (opv *oneOfPrimitiveValue) GenerateAccessors(ms *messageValueStruct, of *oneOfField) string { sb := &strings.Builder{} t := template.Must(template.New("accessorsOneOfPrimitiveTemplate").Parse(accessorsOneOfPrimitiveTemplate)) if err := t.Execute(sb, opv.templateFields(ms, of)); err != nil { @@ -609,7 +634,7 @@ func (opv *oneOfPrimitiveValue) GenerateAccessors(ms baseStruct, of *oneOfField) return sb.String() } -func (opv *oneOfPrimitiveValue) GenerateTests(ms baseStruct, of *oneOfField) string { +func (opv *oneOfPrimitiveValue) GenerateTests(ms *messageValueStruct, of *oneOfField) string { sb := &strings.Builder{} t := template.Must(template.New("accessorsOneOfPrimitiveTestTemplate").Parse(accessorsOneOfPrimitiveTestTemplate)) if err := t.Execute(sb, opv.templateFields(ms, of)); err != nil { @@ -626,22 +651,22 @@ func (opv *oneOfPrimitiveValue) accessorFieldName(of *oneOfField) string { return opv.fieldName + of.originFieldName } -func (opv *oneOfPrimitiveValue) GenerateSetWithTestValue(of *oneOfField) string { - return "\ttv.orig." + of.originFieldName + " = &" + of.originTypePrefix + opv.originFieldName + "{" + opv. +func (opv *oneOfPrimitiveValue) GenerateSetWithTestValue(ms *messageValueStruct, of *oneOfField) string { + return "\ttv.orig." + of.originFieldName + " = &" + ms.originFullName + "_" + opv.originFieldName + "{" + opv. originFieldName + ":" + opv.testVal + "}" } -func (opv *oneOfPrimitiveValue) GenerateCopyToValue(_ baseStruct, of *oneOfField, sb *bytes.Buffer) { +func (opv *oneOfPrimitiveValue) GenerateCopyToValue(_ *messageValueStruct, of *oneOfField, sb *bytes.Buffer) { sb.WriteString("\tcase " + of.typeName + opv.fieldName + ":\n") sb.WriteString("\tdest.Set" + opv.accessorFieldName(of) + "(ms." + opv.accessorFieldName(of) + "())\n") } -func (opv *oneOfPrimitiveValue) GenerateTypeSwitchCase(of *oneOfField) string { - return "\tcase *" + of.originTypePrefix + opv.originFieldName + ":\n" + +func (opv *oneOfPrimitiveValue) GenerateTypeSwitchCase(ms *messageValueStruct, of *oneOfField) string { + return "\tcase *" + ms.originFullName + "_" + opv.originFieldName + ":\n" + "\t\treturn " + of.typeName + opv.fieldName } -func (opv *oneOfPrimitiveValue) templateFields(ms baseStruct, of *oneOfField) map[string]any { +func (opv *oneOfPrimitiveValue) templateFields(ms *messageValueStruct, of *oneOfField) map[string]any { return map[string]any{ "structName": ms.getName(), "defaultVal": opv.defaultVal, @@ -654,7 +679,8 @@ func (opv *oneOfPrimitiveValue) templateFields(ms baseStruct, of *oneOfField) ma "returnType": opv.returnType, "originFieldName": opv.originFieldName, "originOneOfFieldName": of.originFieldName, - "originStructType": of.originTypePrefix + opv.originFieldName, + "originStructName": ms.originFullName, + "originStructType": ms.originFullName + "_" + opv.originFieldName, } } @@ -666,7 +692,7 @@ type oneOfMessageValue struct { returnMessage *messageValueStruct } -func (omv *oneOfMessageValue) GenerateAccessors(ms baseStruct, of *oneOfField) string { +func (omv *oneOfMessageValue) GenerateAccessors(ms *messageValueStruct, of *oneOfField) string { sb := &strings.Builder{} t := template.Must(template.New("accessorsOneOfMessageTemplate").Parse(accessorsOneOfMessageTemplate)) if err := t.Execute(sb, omv.templateFields(ms, of)); err != nil { @@ -675,7 +701,7 @@ func (omv *oneOfMessageValue) GenerateAccessors(ms baseStruct, of *oneOfField) s return sb.String() } -func (omv *oneOfMessageValue) GenerateTests(ms baseStruct, of *oneOfField) string { +func (omv *oneOfMessageValue) GenerateTests(ms *messageValueStruct, of *oneOfField) string { sb := &strings.Builder{} t := template.Must(template.New("accessorsOneOfMessageTestTemplate").Parse(accessorsOneOfMessageTestTemplate)) if err := t.Execute(sb, omv.templateFields(ms, of)); err != nil { @@ -685,13 +711,13 @@ func (omv *oneOfMessageValue) GenerateTests(ms baseStruct, of *oneOfField) strin return sb.String() } -func (omv *oneOfMessageValue) GenerateSetWithTestValue(of *oneOfField) string { - return "\ttv.orig." + of.originFieldName + " = &" + of.originTypePrefix + omv.fieldName + "{" + omv. +func (omv *oneOfMessageValue) GenerateSetWithTestValue(ms *messageValueStruct, of *oneOfField) string { + return "\ttv.orig." + of.originFieldName + " = &" + ms.originFullName + "_" + omv.fieldName + "{" + omv. fieldName + ": &" + omv.originFieldPackageName + "." + omv.fieldName + "{}}\n" + - "\tfillTest" + omv.returnMessage.structName + "(new" + omv.fieldName + "(tv.orig.Get" + omv.fieldName + "()))" + "\tfillTest" + omv.returnMessage.structName + "(new" + omv.fieldName + "(tv.orig.Get" + omv.fieldName + "(), tv.state))" } -func (omv *oneOfMessageValue) GenerateCopyToValue(ms baseStruct, of *oneOfField, sb *bytes.Buffer) { +func (omv *oneOfMessageValue) GenerateCopyToValue(ms *messageValueStruct, of *oneOfField, sb *bytes.Buffer) { t := template.Must(template.New("copyToValueOneOfMessageTemplate").Parse(copyToValueOneOfMessageTemplate)) if err := t.Execute(sb, omv.templateFields(ms, of)); err != nil { panic(err) @@ -699,12 +725,12 @@ func (omv *oneOfMessageValue) GenerateCopyToValue(ms baseStruct, of *oneOfField, sb.WriteString("\n") } -func (omv *oneOfMessageValue) GenerateTypeSwitchCase(of *oneOfField) string { - return "\tcase *" + of.originTypePrefix + omv.fieldName + ":\n" + +func (omv *oneOfMessageValue) GenerateTypeSwitchCase(ms *messageValueStruct, of *oneOfField) string { + return "\tcase *" + ms.originFullName + "_" + omv.fieldName + ":\n" + "\t\treturn " + of.typeName + omv.fieldName } -func (omv *oneOfMessageValue) templateFields(ms baseStruct, of *oneOfField) map[string]any { +func (omv *oneOfMessageValue) templateFields(ms *messageValueStruct, of *oneOfField) map[string]any { return map[string]any{ "fieldName": omv.fieldName, "originOneOfFieldName": of.originFieldName, @@ -714,21 +740,21 @@ func (omv *oneOfMessageValue) templateFields(ms baseStruct, of *oneOfField) map[ "originOneOfTypeFuncName": of.typeFuncName(), "lowerFieldName": strings.ToLower(omv.fieldName), "originFieldPackageName": omv.originFieldPackageName, - "originStructType": of.originTypePrefix + omv.fieldName, + "originStructName": ms.originFullName, + "originStructType": ms.originFullName + "_" + omv.fieldName, } } var _ oneOfValue = (*oneOfMessageValue)(nil) type optionalPrimitiveValue struct { - fieldName string - defaultVal string - testVal string - returnType string - originTypePrefix string + fieldName string + defaultVal string + testVal string + returnType string } -func (opv *optionalPrimitiveValue) GenerateAccessors(ms baseStruct) string { +func (opv *optionalPrimitiveValue) GenerateAccessors(ms *messageValueStruct) string { sb := &strings.Builder{} t := template.Must(template.New("accessorsOptionalPrimitiveValueTemplate").Parse(accessorsOptionalPrimitiveValueTemplate)) if err := t.Execute(sb, opv.templateFields(ms)); err != nil { @@ -737,7 +763,7 @@ func (opv *optionalPrimitiveValue) GenerateAccessors(ms baseStruct) string { return sb.String() } -func (opv *optionalPrimitiveValue) GenerateAccessorsTest(ms baseStruct) string { +func (opv *optionalPrimitiveValue) GenerateAccessorsTest(ms *messageValueStruct) string { sb := &strings.Builder{} t := template.Must(template.New("accessorsOptionalPrimitiveTestTemplate").Parse(accessorsOptionalPrimitiveTestTemplate)) if err := t.Execute(sb, opv.templateFields(ms)); err != nil { @@ -747,17 +773,17 @@ func (opv *optionalPrimitiveValue) GenerateAccessorsTest(ms baseStruct) string { return sb.String() } -func (opv *optionalPrimitiveValue) GenerateSetWithTestValue(_ baseStruct) string { - return "\ttv.orig." + opv.fieldName + "_ = &" + opv.originTypePrefix + opv.fieldName + "{" + opv.fieldName + ":" + opv.testVal + "}" +func (opv *optionalPrimitiveValue) GenerateSetWithTestValue(ms *messageValueStruct) string { + return "\ttv.orig." + opv.fieldName + "_ = &" + ms.originFullName + "_" + opv.fieldName + "{" + opv.fieldName + ":" + opv.testVal + "}" } -func (opv *optionalPrimitiveValue) GenerateCopyToValue(_ baseStruct) string { +func (opv *optionalPrimitiveValue) GenerateCopyToValue(*messageValueStruct) string { return "if ms.Has" + opv.fieldName + "(){\n" + "\tdest.Set" + opv.fieldName + "(ms." + opv.fieldName + "())\n" + "}\n" } -func (opv *optionalPrimitiveValue) templateFields(ms baseStruct) map[string]any { +func (opv *optionalPrimitiveValue) templateFields(ms *messageValueStruct) map[string]any { return map[string]any{ "structName": ms.getName(), "packageName": "", @@ -766,15 +792,23 @@ func (opv *optionalPrimitiveValue) templateFields(ms baseStruct) map[string]any "lowerFieldName": strings.ToLower(opv.fieldName), "testValue": opv.testVal, "returnType": opv.returnType, - "originStructType": opv.originTypePrefix + opv.fieldName, + "originStructName": ms.originFullName, + "originStructType": ms.originFullName + "_" + opv.fieldName, } } var _ baseField = (*optionalPrimitiveValue)(nil) -func origAccessor(bs baseStruct) string { - if usedByOtherDataTypes(bs.getPackageName()) { +func origAccessor(bs *messageValueStruct) string { + if usedByOtherDataTypes(bs.packageName) { return "getOrig()" } return "orig" } + +func stateAccessor(bs *messageValueStruct) string { + if usedByOtherDataTypes(bs.packageName) { + return "getState()" + } + return "state" +} diff --git a/pdata/internal/cmd/pdatagen/internal/base_slices.go b/pdata/internal/cmd/pdatagen/internal/base_slices.go index 0521076d881..d556207163a 100644 --- a/pdata/internal/cmd/pdatagen/internal/base_slices.go +++ b/pdata/internal/cmd/pdatagen/internal/base_slices.go @@ -17,17 +17,19 @@ const sliceTemplate = `// {{ .structName }} logically represents a slice of {{ . // Important: zero-initialized instance is not valid for use. type {{ .structName }} struct { orig *[]{{ .originElementType }} + state *internal.State } -func new{{ .structName }}(orig *[]{{ .originElementType }}) {{ .structName }} { - return {{ .structName }}{orig} +func new{{ .structName }}(orig *[]{{ .originElementType }}, state *internal.State) {{ .structName }} { + return {{ .structName }}{orig: orig, state: state} } // New{{ .structName }} creates a {{ .structName }} with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func New{{ .structName }}() {{ .structName }} { orig := []{{ .originElementType }}(nil) - return new{{ .structName }}(&orig) + state := internal.StateMutable + return new{{ .structName }}(&orig, &state) } // Len returns the number of elements in the slice. @@ -60,6 +62,7 @@ func (es {{ .structName }}) At(i int) {{ .elementName }} { // // Here should set all the values for e. // } func (es {{ .structName }}) EnsureCapacity(newCap int) { + es.state.AssertMutable() oldCap := cap(*es.orig) if newCap <= oldCap { return @@ -73,6 +76,7 @@ func (es {{ .structName }}) EnsureCapacity(newCap int) { // AppendEmpty will append to the end of the slice an empty {{ .elementName }}. // It returns the newly added {{ .elementName }}. func (es {{ .structName }}) AppendEmpty() {{ .elementName }} { + es.state.AssertMutable() *es.orig = append(*es.orig, {{ .emptyOriginElement }}) return es.At(es.Len() - 1) } @@ -80,6 +84,8 @@ func (es {{ .structName }}) AppendEmpty() {{ .elementName }} { // MoveAndAppendTo moves all elements from the current slice and appends them to the dest. // The current slice will be cleared. func (es {{ .structName }}) MoveAndAppendTo(dest {{ .structName }}) { + es.state.AssertMutable() + dest.state.AssertMutable() if *dest.orig == nil { // We can simply move the entire vector and avoid any allocations. *dest.orig = *es.orig @@ -92,6 +98,7 @@ func (es {{ .structName }}) MoveAndAppendTo(dest {{ .structName }}) { // RemoveIf calls f sequentially for each element present in the slice. // If f returns true, the element is removed from the slice. func (es {{ .structName }}) RemoveIf(f func({{ .elementName }}) bool) { + es.state.AssertMutable() newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { @@ -105,13 +112,13 @@ func (es {{ .structName }}) RemoveIf(f func({{ .elementName }}) bool) { (*es.orig)[newLen] = (*es.orig)[i] newLen++ } - // TODO: Prevent memory leak by erasing truncated values. *es.orig = (*es.orig)[:newLen] } // CopyTo copies all elements from the current slice overriding the destination. func (es {{ .structName }}) CopyTo(dest {{ .structName }}) { + dest.state.AssertMutable() srcLen := es.Len() destCap := cap(*dest.orig) if srcLen <= destCap { @@ -119,7 +126,7 @@ func (es {{ .structName }}) CopyTo(dest {{ .structName }}) { {{- if eq .type "sliceOfPtrs" }} for i := range *es.orig { - new{{ .elementName }}((*es.orig)[i]).CopyTo(new{{ .elementName }}((*dest.orig)[i])) + new{{ .elementName }}((*es.orig)[i], es.state).CopyTo(new{{ .elementName }}((*dest.orig)[i], dest.state)) } return } @@ -127,7 +134,7 @@ func (es {{ .structName }}) CopyTo(dest {{ .structName }}) { wrappers := make([]*{{ .originName }}, srcLen) for i := range *es.orig { wrappers[i] = &origs[i] - new{{ .elementName }}((*es.orig)[i]).CopyTo(new{{ .elementName }}(wrappers[i])) + new{{ .elementName }}((*es.orig)[i], es.state).CopyTo(new{{ .elementName }}(wrappers[i], dest.state)) } *dest.orig = wrappers @@ -136,7 +143,7 @@ func (es {{ .structName }}) CopyTo(dest {{ .structName }}) { (*dest.orig) = make([]{{ .originElementType }}, srcLen) } for i := range *es.orig { - {{ .newElement }}.CopyTo(new{{ .elementName }}(&(*dest.orig)[i])) + {{ .newElement }}.CopyTo(new{{ .elementName }}(&(*dest.orig)[i], dest.state)) } {{- end }} } @@ -146,6 +153,7 @@ func (es {{ .structName }}) CopyTo(dest {{ .structName }}) { // provided less function so that two instances of {{ .structName }} // can be compared. func (es {{ .structName }}) Sort(less func(a, b {{ .elementName }}) bool) { + es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } {{- end }}` @@ -153,7 +161,8 @@ func (es {{ .structName }}) Sort(less func(a, b {{ .elementName }}) bool) { const sliceTestTemplate = `func Test{{ .structName }}(t *testing.T) { es := New{{ .structName }}() assert.Equal(t, 0, es.Len()) - es = new{{ .structName }}(&[]{{ .originElementType }}{}) + state := internal.StateMutable + es = new{{ .structName }}(&[]{{ .originElementType }}{}, &state) assert.Equal(t, 0, es.Len()) emptyVal := New{{ .elementName }}() @@ -167,6 +176,19 @@ const sliceTestTemplate = `func Test{{ .structName }}(t *testing.T) { assert.Equal(t, 7, es.Len()) } +func Test{{ .structName }}ReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := new{{ .structName }}(&[]{{ .originElementType }}{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := New{{ .structName }}() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + func Test{{ .structName }}_CopyTo(t *testing.T) { dest := New{{ .structName }}() // Test CopyTo to empty @@ -324,11 +346,11 @@ func (ss *sliceOfPtrs) templateFields() map[string]any { "originName": ss.element.originFullName, "originElementType": "*" + ss.element.originFullName, "emptyOriginElement": "&" + ss.element.originFullName + "{}", - "newElement": "new" + ss.element.structName + "((*es.orig)[i])", + "newElement": "new" + ss.element.structName + "((*es.orig)[i], es.state)", } } -func (ss *sliceOfPtrs) generateInternal(_ *bytes.Buffer) {} +func (ss *sliceOfPtrs) generateInternal(*bytes.Buffer) {} var _ baseStruct = (*sliceOfPtrs)(nil) @@ -376,10 +398,10 @@ func (ss *sliceOfValues) templateFields() map[string]any { "originName": ss.element.originFullName, "originElementType": ss.element.originFullName, "emptyOriginElement": ss.element.originFullName + "{}", - "newElement": "new" + ss.element.structName + "(&(*es.orig)[i])", + "newElement": "new" + ss.element.structName + "(&(*es.orig)[i], es.state)", } } -func (ss *sliceOfValues) generateInternal(_ *bytes.Buffer) {} +func (ss *sliceOfValues) generateInternal(*bytes.Buffer) {} var _ baseStruct = (*sliceOfValues)(nil) diff --git a/pdata/internal/cmd/pdatagen/internal/base_structs.go b/pdata/internal/cmd/pdatagen/internal/base_structs.go index d96657028a7..859bb4d7c05 100644 --- a/pdata/internal/cmd/pdatagen/internal/base_structs.go +++ b/pdata/internal/cmd/pdatagen/internal/base_structs.go @@ -21,14 +21,15 @@ type {{ .structName }} internal.{{ .structName }} {{- else }} type {{ .structName }} struct { orig *{{ .originName }} + state *internal.State } {{- end }} -func new{{ .structName }}(orig *{{ .originName }}) {{ .structName }} { +func new{{ .structName }}(orig *{{ .originName }}, state *internal.State) {{ .structName }} { {{- if .isCommon }} - return {{ .structName }}(internal.New{{ .structName }}(orig)) + return {{ .structName }}(internal.New{{ .structName }}(orig, state)) {{- else }} - return {{ .structName }}{orig} + return {{ .structName }}{orig: orig, state: state} {{- end }} } @@ -37,12 +38,15 @@ func new{{ .structName }}(orig *{{ .originName }}) {{ .structName }} { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func New{{ .structName }}() {{ .structName }} { - return new{{ .structName }}(&{{ .originName }}{}) + state := internal.StateMutable + return new{{ .structName }}(&{{ .originName }}{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms {{ .structName }}) MoveTo(dest {{ .structName }}) { + ms.{{- if .isCommon }}getState(){{ else }}state{{ end }}.AssertMutable() + dest.{{- if .isCommon }}getState(){{ else }}state{{ end }}.AssertMutable() *dest.{{ .origAccessor }} = *ms.{{ .origAccessor }} *ms.{{ .origAccessor }} = {{ .originName }}{} } @@ -51,6 +55,10 @@ func (ms {{ .structName }}) MoveTo(dest {{ .structName }}) { func (ms {{ .structName }}) getOrig() *{{ .originName }} { return internal.GetOrig{{ .structName }}(internal.{{ .structName }}(ms)) } + +func (ms {{ .structName }}) getState() *internal.State { + return internal.Get{{ .structName }}State(internal.{{ .structName }}(ms)) +} {{- end }} {{ range .fields -}} @@ -59,9 +67,10 @@ func (ms {{ .structName }}) getOrig() *{{ .originName }} { // CopyTo copies all properties from the current struct overriding the destination. func (ms {{ .structName }}) CopyTo(dest {{ .structName }}) { -{{- range .fields }} -{{ .GenerateCopyToValue $.messageStruct }} -{{- end }} + dest.{{- if .isCommon }}getState(){{ else }}state{{ end }}.AssertMutable() + {{- range .fields }} + {{ .GenerateCopyToValue $.messageStruct }} + {{- end }} }` const messageValueTestTemplate = ` @@ -71,6 +80,9 @@ func Test{{ .structName }}_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, New{{ .structName }}(), ms) assert.Equal(t, {{ .generateTestData }}, dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(new{{ .structName }}(&{{ .originName }}{}, &sharedState)) }) + assert.Panics(t, func() { new{{ .structName }}(&{{ .originName }}{}, &sharedState).MoveTo(dest) }) } func Test{{ .structName }}_CopyTo(t *testing.T) { @@ -81,6 +93,8 @@ func Test{{ .structName }}_CopyTo(t *testing.T) { orig = {{ .generateTestData }} orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(new{{ .structName }}(&{{ .originName }}{}, &sharedState)) }) } {{ range .fields }} @@ -90,8 +104,9 @@ func Test{{ .structName }}_CopyTo(t *testing.T) { const messageValueGenerateTestTemplate = `func {{ upperIfInternal "g" }}enerateTest{{ .structName }}() {{ .structName }} { {{- if .isCommon }} orig := {{ .originName }}{} + state := StateMutable {{- end }} - tv := New{{ .structName }}({{ if .isCommon }}&orig{{ end }}) + tv := New{{ .structName }}({{ if .isCommon }}&orig, &state{{ end }}) {{ upperIfInternal "f" }}illTest{{ .structName }}(tv) return tv } @@ -105,19 +120,23 @@ func {{ upperIfInternal "f" }}illTest{{ .structName }}(tv {{ .structName }}) { const messageValueAliasTemplate = ` type {{ .structName }} struct { orig *{{ .originName }} + state *State } func GetOrig{{ .structName }}(ms {{ .structName }}) *{{ .originName }} { return ms.orig } -func New{{ .structName }}(orig *{{ .originName }}) {{ .structName }} { - return {{ .structName }}{orig: orig} +func Get{{ .structName }}State(ms {{ .structName }}) *State { + return ms.state +} + +func New{{ .structName }}(orig *{{ .originName }}, state *State) {{ .structName }} { + return {{ .structName }}{orig: orig, state: state} }` type baseStruct interface { getName() string - getPackageName() string generateStruct(sb *bytes.Buffer) generateTests(sb *bytes.Buffer) generateTestValueHelpers(sb *bytes.Buffer) @@ -138,10 +157,6 @@ func (ms *messageValueStruct) getName() string { return ms.structName } -func (ms *messageValueStruct) getPackageName() string { - return ms.packageName -} - func (ms *messageValueStruct) generateStruct(sb *bytes.Buffer) { t := template.Must(template.New("messageValueTemplate").Parse(messageValueTemplate)) if err := t.Execute(sb, ms.templateFields()); err != nil { diff --git a/pdata/internal/cmd/pdatagen/internal/packages.go b/pdata/internal/cmd/pdatagen/internal/packages.go index b8c7fab272a..f44b597708a 100644 --- a/pdata/internal/cmd/pdatagen/internal/packages.go +++ b/pdata/internal/cmd/pdatagen/internal/packages.go @@ -119,6 +119,9 @@ func (p *Package) GenerateInternalFiles() error { // Add imports sb.WriteString("import (" + newLine) for _, imp := range p.imports { + if imp == `"go.opentelemetry.io/collector/pdata/internal"` { + continue + } if imp != "" { sb.WriteString("\t" + imp + newLine) } else { diff --git a/pdata/internal/cmd/pdatagen/internal/pmetric_package.go b/pdata/internal/cmd/pdatagen/internal/pmetric_package.go index 88dfc3a4dec..95487c00f8f 100644 --- a/pdata/internal/cmd/pdatagen/internal/pmetric_package.go +++ b/pdata/internal/cmd/pdatagen/internal/pmetric_package.go @@ -118,7 +118,6 @@ var metric = &messageValueStruct{ &oneOfField{ typeName: "MetricType", originFieldName: "Data", - originTypePrefix: "otlpmetrics.Metric_", testValueIdx: 1, // Sum omitOriginFieldNameInNames: true, values: []oneOfValue{ @@ -231,10 +230,9 @@ var numberDataPoint = &messageValueStruct{ startTimeField, timeField, &oneOfField{ - typeName: "NumberDataPointValueType", - originFieldName: "Value", - originTypePrefix: "otlpmetrics.NumberDataPoint_", - testValueIdx: 0, // Double + typeName: "NumberDataPointValueType", + originFieldName: "Value", + testValueIdx: 0, // Double values: []oneOfValue{ &oneOfPrimitiveValue{ fieldName: "Double", @@ -271,25 +269,13 @@ var histogramDataPoint = &messageValueStruct{ startTimeField, timeField, countField, - optionalDoubleSumField, bucketCountsField, explicitBoundsField, exemplarsField, dataPointFlagsField, - &optionalPrimitiveValue{ - fieldName: "Min", - originTypePrefix: "otlpmetrics.HistogramDataPoint_", - returnType: "float64", - defaultVal: "float64(0.0)", - testVal: "float64(9.23)", - }, - &optionalPrimitiveValue{ - fieldName: "Max", - originTypePrefix: "otlpmetrics.HistogramDataPoint_", - returnType: "float64", - defaultVal: "float64(0.0)", - testVal: "float64(182.55)", - }, + sumField, + minField, + maxField, }, } @@ -310,13 +296,6 @@ var exponentialHistogramDataPoint = &messageValueStruct{ startTimeField, timeField, countField, - &optionalPrimitiveValue{ - fieldName: "Sum", - originTypePrefix: "otlpmetrics.ExponentialHistogramDataPoint_", - returnType: "float64", - defaultVal: "float64(0.0)", - testVal: "float64(17.13)", - }, &primitiveField{ fieldName: "Scale", returnType: "int32", @@ -339,19 +318,14 @@ var exponentialHistogramDataPoint = &messageValueStruct{ }, exemplarsField, dataPointFlagsField, - &optionalPrimitiveValue{ - fieldName: "Min", - originTypePrefix: "otlpmetrics.ExponentialHistogramDataPoint_", - returnType: "float64", - defaultVal: "float64(0.0)", - testVal: "float64(9.23)", - }, - &optionalPrimitiveValue{ - fieldName: "Max", - originTypePrefix: "otlpmetrics.ExponentialHistogramDataPoint_", - returnType: "float64", - defaultVal: "float64(0.0)", - testVal: "float64(182.55)", + sumField, + minField, + maxField, + &primitiveField{ + fieldName: "ZeroThreshold", + returnType: "float64", + defaultVal: "float64(0.0)", + testVal: "float64(0.5)", }, }, } @@ -424,10 +398,9 @@ var exemplar = &messageValueStruct{ fields: []baseField{ timeField, &oneOfField{ - typeName: "ExemplarValueType", - originFieldName: "Value", - originTypePrefix: "otlpmetrics.Exemplar_", - testValueIdx: 1, // Int + typeName: "ExemplarValueType", + originFieldName: "Value", + testValueIdx: 1, // Int values: []oneOfValue{ &oneOfPrimitiveValue{ fieldName: "Double", @@ -532,10 +505,22 @@ var aggregationTemporalityField = &primitiveTypedField{ }, } -var optionalDoubleSumField = &optionalPrimitiveValue{ - fieldName: "Sum", - originTypePrefix: "otlpmetrics.HistogramDataPoint_", - returnType: "float64", - defaultVal: "float64(0.0)", - testVal: "float64(17.13)", +var sumField = &optionalPrimitiveValue{ + fieldName: "Sum", + returnType: "float64", + defaultVal: "float64(0.0)", + testVal: "float64(17.13)", +} +var minField = &optionalPrimitiveValue{ + fieldName: "Min", + returnType: "float64", + defaultVal: "float64(0.0)", + testVal: "float64(9.23)", +} + +var maxField = &optionalPrimitiveValue{ + fieldName: "Max", + returnType: "float64", + defaultVal: "float64(0.0)", + testVal: "float64(182.55)", } diff --git a/pdata/internal/cmd/pdatagen/internal/primitive_slice_structs.go b/pdata/internal/cmd/pdatagen/internal/primitive_slice_structs.go index cbca8c08355..6428e545c52 100644 --- a/pdata/internal/cmd/pdatagen/internal/primitive_slice_structs.go +++ b/pdata/internal/cmd/pdatagen/internal/primitive_slice_structs.go @@ -20,10 +20,15 @@ func (ms {{ .structName }}) getOrig() *[]{{ .itemType }} { return internal.GetOrig{{ .structName }}(internal.{{ .structName }}(ms)) } +func (ms {{ .structName }}) getState() *internal.State { + return internal.Get{{ .structName }}State(internal.{{ .structName }}(ms)) +} + // New{{ .structName }} creates a new empty {{ .structName }}. func New{{ .structName }}() {{ .structName }} { orig := []{{ .itemType }}(nil) - return {{ .structName }}(internal.New{{ .structName }}(&orig)) + state := internal.StateMutable + return {{ .structName }}(internal.New{{ .structName }}(&orig, &state)) } // AsRaw returns a copy of the []{{ .itemType }} slice. @@ -33,6 +38,7 @@ func (ms {{ .structName }}) AsRaw() []{{ .itemType }} { // FromRaw copies raw []{{ .itemType }} into the slice {{ .structName }}. func (ms {{ .structName }}) FromRaw(val []{{ .itemType }}) { + ms.getState().AssertMutable() *ms.getOrig() = copy{{ .structName }}(*ms.getOrig(), val) } @@ -51,6 +57,7 @@ func (ms {{ .structName }}) At(i int) {{ .itemType }} { // SetAt sets {{ .itemType }} item at particular index. // Equivalent of {{ .lowerStructName }}[i] = val func (ms {{ .structName }}) SetAt(i int, val {{ .itemType }}) { + ms.getState().AssertMutable() (*ms.getOrig())[i] = val } @@ -61,6 +68,7 @@ func (ms {{ .structName }}) SetAt(i int, val {{ .itemType }}) { // copy(buf, {{ .lowerStructName }}) // {{ .lowerStructName }} = buf func (ms {{ .structName }}) EnsureCapacity(newCap int) { + ms.getState().AssertMutable() oldCap := cap(*ms.getOrig()) if newCap <= oldCap { return @@ -74,18 +82,22 @@ func (ms {{ .structName }}) EnsureCapacity(newCap int) { // Append appends extra elements to {{ .structName }}. // Equivalent of {{ .lowerStructName }} = append({{ .lowerStructName }}, elms...) func (ms {{ .structName }}) Append(elms ...{{ .itemType }}) { + ms.getState().AssertMutable() *ms.getOrig() = append(*ms.getOrig(), elms...) } // MoveTo moves all elements from the current slice overriding the destination and // resetting the current instance to its zero value. func (ms {{ .structName }}) MoveTo(dest {{ .structName }}) { + ms.getState().AssertMutable() + dest.getState().AssertMutable() *dest.getOrig() = *ms.getOrig() *ms.getOrig() = nil } // CopyTo copies all elements from the current slice overriding the destination. func (ms {{ .structName }}) CopyTo(dest {{ .structName }}) { + dest.getState().AssertMutable() *dest.getOrig() = copy{{ .structName }}(*dest.getOrig(), *ms.getOrig()) } @@ -125,6 +137,27 @@ const immutableSliceTestTemplate = `func TestNew{{ .structName }}(t *testing.T) assert.Equal(t, {{ .itemType }}(1), mv.At(0)) } +func Test{{ .structName }}ReadOnly(t *testing.T) { + raw := []{{ .itemType }}{1, 2, 3} + state := internal.StateReadOnly + ms := {{ .structName }}(internal.New{{ .structName }}(&raw, &state)) + + assert.Equal(t, 3, ms.Len()) + assert.Equal(t, {{ .itemType }}(1), ms.At(0)) + assert.Panics(t, func() { ms.Append(1) }) + assert.Panics(t, func() { ms.EnsureCapacity(2) }) + assert.Equal(t, raw, ms.AsRaw()) + assert.Panics(t, func() { ms.FromRaw(raw) }) + + ms2 := New{{ .structName }}() + ms.CopyTo(ms2) + assert.Equal(t, ms.AsRaw(), ms2.AsRaw()) + assert.Panics(t, func() { ms2.CopyTo(ms) }) + + assert.Panics(t, func() { ms.MoveTo(ms2) }) + assert.Panics(t, func() { ms2.MoveTo(ms) }) +} + func Test{{ .structName }}Append(t *testing.T) { ms := New{{ .structName }}() ms.FromRaw([]{{ .itemType }}{1, 2, 3}) @@ -144,14 +177,19 @@ func Test{{ .structName }}EnsureCapacity(t *testing.T) { const primitiveSliceInternalTemplate = ` type {{ .structName }} struct { orig *[]{{ .itemType }} + state *State } func GetOrig{{ .structName }}(ms {{ .structName }}) *[]{{ .itemType }} { return ms.orig } -func New{{ .structName }}(orig *[]{{ .itemType }}) {{ .structName }} { - return {{ .structName }}{orig: orig} +func Get{{ .structName }}State(ms {{ .structName }}) *State { + return ms.state +} + +func New{{ .structName }}(orig *[]{{ .itemType }}, state *State) {{ .structName }} { + return {{ .structName }}{orig: orig, state: state} }` // primitiveSliceStruct generates a struct for a slice of primitive value elements. The structs are always generated diff --git a/pdata/internal/cmd/pdatagen/internal/ptrace_package.go b/pdata/internal/cmd/pdatagen/internal/ptrace_package.go index 74099adfda1..bb4345294d9 100644 --- a/pdata/internal/cmd/pdatagen/internal/ptrace_package.go +++ b/pdata/internal/cmd/pdatagen/internal/ptrace_package.go @@ -83,6 +83,13 @@ var spanSlice = &sliceOfPtrs{ element: span, } +var flagsField = &primitiveField{ + fieldName: "Flags", + returnType: "uint32", + defaultVal: `uint32(0)`, + testVal: `uint32(0xf)`, +} + var span = &messageValueStruct{ structName: "Span", description: "// Span represents a single operation within a trace.\n" + @@ -94,6 +101,7 @@ var span = &messageValueStruct{ traceStateField, parentSpanIDField, nameField, + flagsField, &primitiveTypedField{ fieldName: "Kind", returnType: &primitiveType{ @@ -167,6 +175,7 @@ var spanLink = &messageValueStruct{ traceIDField, spanIDField, traceStateField, + flagsField, attributes, droppedAttributesCount, }, diff --git a/pdata/internal/data/package_test.go b/pdata/internal/data/package_test.go new file mode 100644 index 00000000000..72cf48754c0 --- /dev/null +++ b/pdata/internal/data/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package data + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pdata/internal/data/protogen/logs/v1/logs.pb.go b/pdata/internal/data/protogen/logs/v1/logs.pb.go index 240a4d1905a..65b11fbe286 100644 --- a/pdata/internal/data/protogen/logs/v1/logs.pb.go +++ b/pdata/internal/data/protogen/logs/v1/logs.pb.go @@ -125,9 +125,11 @@ func (SeverityNumber) EnumDescriptor() ([]byte, []int) { return fileDescriptor_d1c030a3ec7e961e, []int{0} } -// LogRecordFlags is defined as a protobuf 'uint32' type and is to be used as -// bit-fields. Each non-zero value defined in this enum is a bit-mask. -// To extract the bit-field, for example, use an expression like: +// LogRecordFlags represents constants used to interpret the +// LogRecord.flags field, which is protobuf 'fixed32' type and is to +// be used as bit-fields. Each non-zero value defined in this enum is +// a bit-mask. To extract the bit-field, for example, use an +// expression like: // // (logRecord.flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK) type LogRecordFlags int32 @@ -225,6 +227,9 @@ type ResourceLogs struct { Resource v1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource"` // A list of ScopeLogs that originate from a resource. ScopeLogs []*ScopeLogs `protobuf:"bytes,2,rep,name=scope_logs,json=scopeLogs,proto3" json:"scope_logs,omitempty"` + // The Schema URL, if known. This is the identifier of the Schema that the resource data + // is recorded in. To learn more about Schema URL see + // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url // This schema_url applies to the data in the "resource" field. It does not apply // to the data in the "scope_logs" field which have their own schema_url field. SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"` @@ -299,6 +304,9 @@ type ScopeLogs struct { Scope v11.InstrumentationScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope"` // A list of log records. LogRecords []*LogRecord `protobuf:"bytes,2,rep,name=log_records,json=logRecords,proto3" json:"log_records,omitempty"` + // The Schema URL, if known. This is the identifier of the Schema that the log data + // is recorded in. To learn more about Schema URL see + // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url // This schema_url applies to all logs in the "logs" field. SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"` } diff --git a/pdata/internal/data/protogen/metrics/v1/metrics.pb.go b/pdata/internal/data/protogen/metrics/v1/metrics.pb.go index 09cd8e712e8..4ef4f4d5f63 100644 --- a/pdata/internal/data/protogen/metrics/v1/metrics.pb.go +++ b/pdata/internal/data/protogen/metrics/v1/metrics.pb.go @@ -223,6 +223,9 @@ type ResourceMetrics struct { Resource v1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource"` // A list of metrics that originate from a resource. ScopeMetrics []*ScopeMetrics `protobuf:"bytes,2,rep,name=scope_metrics,json=scopeMetrics,proto3" json:"scope_metrics,omitempty"` + // The Schema URL, if known. This is the identifier of the Schema that the resource data + // is recorded in. To learn more about Schema URL see + // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url // This schema_url applies to the data in the "resource" field. It does not apply // to the data in the "scope_metrics" field which have their own schema_url field. SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"` @@ -297,6 +300,9 @@ type ScopeMetrics struct { Scope v11.InstrumentationScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope"` // A list of metrics that originate from an instrumentation library. Metrics []*Metric `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"` + // The Schema URL, if known. This is the identifier of the Schema that the metric data + // is recorded in. To learn more about Schema URL see + // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url // This schema_url applies to all metrics in the "metrics" field. SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"` } @@ -443,7 +449,7 @@ func (m *ScopeMetrics) GetSchemaUrl() string { // when the start time is truly unknown, setting StartTimeUnixNano is // strongly encouraged. type Metric struct { - // name of the metric, including its DNS name prefix. It must be unique. + // name of the metric. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // description of the metric, which can be used in documentation. Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` diff --git a/pdata/internal/data/protogen/trace/v1/trace.pb.go b/pdata/internal/data/protogen/trace/v1/trace.pb.go index b48ce226021..71f32df0f70 100644 --- a/pdata/internal/data/protogen/trace/v1/trace.pb.go +++ b/pdata/internal/data/protogen/trace/v1/trace.pb.go @@ -29,6 +29,48 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// SpanFlags represents constants used to interpret the +// Span.flags field, which is protobuf 'fixed32' type and is to +// be used as bit-fields. Each non-zero value defined in this enum is +// a bit-mask. To extract the bit-field, for example, use an +// expression like: +// +// (span.flags & SPAN_FLAGS_TRACE_FLAGS_MASK) +// +// See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions. +// +// Note that Span flags were introduced in version 1.1 of the +// OpenTelemetry protocol. Older Span producers do not set this +// field, consequently consumers should not rely on the absence of a +// particular flag bit to indicate the presence of a particular feature. +type SpanFlags int32 + +const ( + // The zero value for the enum. Should not be used for comparisons. + // Instead use bitwise "and" with the appropriate mask as shown above. + SpanFlags_SPAN_FLAGS_DO_NOT_USE SpanFlags = 0 + // Bits 0-7 are used for trace flags. + SpanFlags_SPAN_FLAGS_TRACE_FLAGS_MASK SpanFlags = 255 +) + +var SpanFlags_name = map[int32]string{ + 0: "SPAN_FLAGS_DO_NOT_USE", + 255: "SPAN_FLAGS_TRACE_FLAGS_MASK", +} + +var SpanFlags_value = map[string]int32{ + "SPAN_FLAGS_DO_NOT_USE": 0, + "SPAN_FLAGS_TRACE_FLAGS_MASK": 255, +} + +func (x SpanFlags) String() string { + return proto.EnumName(SpanFlags_name, int32(x)) +} + +func (SpanFlags) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_5c407ac9c675a601, []int{0} +} + // SpanKind is the type of span. Can be used to specify additional relationships between spans // in addition to a parent/child relationship. type Span_SpanKind int32 @@ -183,6 +225,9 @@ type ResourceSpans struct { Resource v1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource"` // A list of ScopeSpans that originate from a resource. ScopeSpans []*ScopeSpans `protobuf:"bytes,2,rep,name=scope_spans,json=scopeSpans,proto3" json:"scope_spans,omitempty"` + // The Schema URL, if known. This is the identifier of the Schema that the resource data + // is recorded in. To learn more about Schema URL see + // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url // This schema_url applies to the data in the "resource" field. It does not apply // to the data in the "scope_spans" field which have their own schema_url field. SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"` @@ -257,6 +302,9 @@ type ScopeSpans struct { Scope v11.InstrumentationScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope"` // A list of Spans that originate from an instrumentation scope. Spans []*Span `protobuf:"bytes,2,rep,name=spans,proto3" json:"spans,omitempty"` + // The Schema URL, if known. This is the identifier of the Schema that the span data + // is recorded in. To learn more about Schema URL see + // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url // This schema_url applies to all spans and span events in the "spans" field. SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"` } @@ -340,6 +388,21 @@ type Span struct { // The `span_id` of this span's parent span. If this is a root span, then this // field must be empty. The ID is an 8-byte array. ParentSpanId go_opentelemetry_io_collector_pdata_internal_data.SpanID `protobuf:"bytes,4,opt,name=parent_span_id,json=parentSpanId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.SpanID" json:"parent_span_id"` + // Flags, a bit field. 8 least significant bits are the trace + // flags as defined in W3C Trace Context specification. Readers + // MUST not assume that 24 most significant bits will be zero. + // To read the 8-bit W3C trace flag, use `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`. + // + // When creating span messages, if the message is logically forwarded from another source + // with an equivalent flags fields (i.e., usually another OTLP span message), the field SHOULD + // be copied as-is. If creating from a source that does not have an equivalent flags field + // (such as a runtime representation of an OpenTelemetry span), the high 24 bits MUST + // be set to zero. + // + // [Optional]. + // + // See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions. + Flags uint32 `protobuf:"fixed32,16,opt,name=flags,proto3" json:"flags,omitempty"` // A description of the span's operation. // // For example, the name can be a qualified method name or a file name @@ -443,6 +506,13 @@ func (m *Span) GetTraceState() string { return "" } +func (m *Span) GetFlags() uint32 { + if m != nil { + return m.Flags + } + return 0 +} + func (m *Span) GetName() string { if m != nil { return m.Name @@ -617,6 +687,15 @@ type Span_Link struct { // dropped_attributes_count is the number of dropped attributes. If the value is 0, // then no attributes were dropped. DroppedAttributesCount uint32 `protobuf:"varint,5,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"` + // Flags, a bit field. 8 least significant bits are the trace + // flags as defined in W3C Trace Context specification. Readers + // MUST not assume that 24 most significant bits will be zero. + // When creating new spans, the most-significant 24-bits MUST be + // zero. To read the 8-bit W3C trace flag (use flags & + // SPAN_FLAGS_TRACE_FLAGS_MASK). [Optional]. + // + // See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions. + Flags uint32 `protobuf:"fixed32,6,opt,name=flags,proto3" json:"flags,omitempty"` } func (m *Span_Link) Reset() { *m = Span_Link{} } @@ -673,6 +752,13 @@ func (m *Span_Link) GetDroppedAttributesCount() uint32 { return 0 } +func (m *Span_Link) GetFlags() uint32 { + if m != nil { + return m.Flags + } + return 0 +} + // The Status type defines a logical error model that is suitable for different // programming environments, including REST APIs and RPC APIs. type Status struct { @@ -730,6 +816,7 @@ func (m *Status) GetCode() Status_StatusCode { } func init() { + proto.RegisterEnum("opentelemetry.proto.trace.v1.SpanFlags", SpanFlags_name, SpanFlags_value) proto.RegisterEnum("opentelemetry.proto.trace.v1.Span_SpanKind", Span_SpanKind_name, Span_SpanKind_value) proto.RegisterEnum("opentelemetry.proto.trace.v1.Status_StatusCode", Status_StatusCode_name, Status_StatusCode_value) proto.RegisterType((*TracesData)(nil), "opentelemetry.proto.trace.v1.TracesData") @@ -746,70 +833,75 @@ func init() { } var fileDescriptor_5c407ac9c675a601 = []byte{ - // 1007 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0x4f, 0x6f, 0xe3, 0x44, - 0x14, 0xcf, 0xa4, 0x4e, 0xda, 0xbe, 0xb6, 0x59, 0x77, 0xe8, 0x56, 0xa6, 0x5a, 0xd2, 0x28, 0x5a, - 0x89, 0xc0, 0x4a, 0x09, 0xed, 0x5e, 0xca, 0x01, 0xb1, 0x6d, 0x62, 0x24, 0xd3, 0x6e, 0x52, 0x8d, - 0x93, 0x4a, 0x20, 0x24, 0x33, 0x1b, 0x0f, 0xc5, 0x6a, 0x32, 0xb6, 0xec, 0x49, 0xb5, 0x7b, 0xe3, - 0x23, 0x70, 0xe5, 0x13, 0x20, 0xc1, 0x9d, 0x1b, 0xf7, 0x15, 0xa7, 0x3d, 0x22, 0x0e, 0x2b, 0xd4, - 0x5e, 0xe0, 0x5b, 0xa0, 0x99, 0xb1, 0xf3, 0xa7, 0xaa, 0x92, 0xad, 0xc4, 0x5e, 0xf6, 0xd2, 0x4e, - 0xde, 0x7b, 0xbf, 0x3f, 0xef, 0xcd, 0xb3, 0x65, 0xa8, 0x85, 0x11, 0xe3, 0x82, 0x0d,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, 0x5d, 0x6d, 0x04, 0x83, 0xc1, - 0xe9, 0x90, 0x59, 0x05, 0xe5, 0x40, 0x9d, 0xf1, 0xe7, 0x60, 0x5c, 0x04, 0xdc, 0xb7, 0x8a, 0x15, - 0x54, 0x2b, 0x2d, 0x7a, 0x16, 0x25, 0x8f, 0xfa, 0x73, 0x1c, 0x70, 0x9f, 0x28, 0x20, 0x6e, 0xc0, - 0x56, 0x22, 0x68, 0x2c, 0x3c, 0x11, 0x0c, 0x99, 0x37, 0xe2, 0xc1, 0x73, 0x8f, 0x53, 0x1e, 0x5a, - 0xcb, 0x15, 0x54, 0x2b, 0x92, 0x4d, 0x95, 0xeb, 0x06, 0x43, 0xd6, 0xe3, 0xc1, 0xf3, 0x36, 0xe5, - 0x21, 0x7e, 0x04, 0x98, 0x71, 0xff, 0x66, 0xf9, 0x8a, 0x2a, 0xbf, 0xc7, 0xb8, 0x3f, 0x53, 0xfc, - 0x14, 0x80, 0x0a, 0x11, 0x07, 0xcf, 0x46, 0x82, 0x25, 0xd6, 0xaa, 0xda, 0xad, 0x0f, 0x17, 0x2c, - 0xeb, 0x31, 0x7b, 0x71, 0x46, 0x07, 0xa3, 0x6c, 0x41, 0xa7, 0x08, 0xf0, 0x01, 0x58, 0x7e, 0x1c, - 0x46, 0x11, 0xf3, 0xbd, 0x49, 0xd4, 0xeb, 0x87, 0x23, 0x2e, 0x2c, 0xa8, 0xa0, 0xda, 0x06, 0xd9, - 0x4e, 0xf3, 0x87, 0xe3, 0x74, 0x53, 0x66, 0xf1, 0x13, 0x28, 0xb2, 0x4b, 0xc6, 0x45, 0x62, 0xad, - 0xbd, 0xd1, 0x43, 0x2a, 0x27, 0x65, 0x4b, 0x00, 0x49, 0x71, 0xf8, 0x13, 0xd8, 0xca, 0xb4, 0x75, - 0x24, 0xd5, 0x5d, 0x57, 0xba, 0x38, 0xcd, 0x29, 0x4c, 0xaa, 0xf9, 0x19, 0x14, 0x06, 0x01, 0xbf, - 0x48, 0xac, 0x8d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b, 0x98, 0x85, 0xea, 0xef, 0x08, 0x8a, 0x7a, 0xdb, 0xb1, - 0x05, 0xcb, 0x43, 0x96, 0x24, 0xf4, 0x3c, 0x5b, 0xd9, 0xec, 0x27, 0x6e, 0x82, 0xd1, 0x0f, 0x7d, - 0x3d, 0xe3, 0xd2, 0x7e, 0xe3, 0x4d, 0x9e, 0x9d, 0xf4, 0x5f, 0x33, 0xf4, 0x19, 0x51, 0xe0, 0x6a, - 0x1b, 0x60, 0x12, 0xc3, 0xf7, 0x61, 0xd3, 0xed, 0x1e, 0x76, 0x7b, 0xae, 0xd7, 0xec, 0xb4, 0x6c, - 0x39, 0x08, 0xbb, 0x6b, 0xe6, 0x30, 0x86, 0xd2, 0x74, 0xb8, 0x73, 0x6c, 0xa2, 0x9b, 0xa5, 0x36, - 0x21, 0x1d, 0x62, 0xe6, 0xbf, 0x34, 0x56, 0x90, 0x99, 0x3f, 0xfa, 0x15, 0xbd, 0xbc, 0x2a, 0xa3, - 0x57, 0x57, 0x65, 0xf4, 0xf7, 0x55, 0x19, 0xfd, 0x78, 0x5d, 0xce, 0xbd, 0xba, 0x2e, 0xe7, 0xfe, - 0xbc, 0x2e, 0xe7, 0x60, 0x37, 0x08, 0xe7, 0x3a, 0x3d, 0xd2, 0x5f, 0x70, 0xa7, 0x32, 0x78, 0x8a, - 0xbe, 0x6e, 0xde, 0x79, 0x23, 0xf5, 0x57, 0xe2, 0x39, 0xe3, 0xe3, 0x4f, 0xd6, 0x5f, 0xf2, 0x0f, - 0x3a, 0x11, 0xe3, 0xdd, 0x31, 0x85, 0x22, 0xd7, 0x8f, 0x45, 0xfd, 0x6c, 0xef, 0x59, 0x51, 0x21, - 0x1e, 0xff, 0x17, 0x00, 0x00, 0xff, 0xff, 0xbb, 0xe9, 0x90, 0xbc, 0xf8, 0x0a, 0x00, 0x00, + // 1073 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0x38, 0xfe, 0x93, 0xbc, 0x24, 0xee, 0x76, 0x70, 0xa3, 0x25, 0x14, 0xc7, 0xb2, 0x2a, + 0x61, 0x5a, 0xc9, 0x26, 0xe9, 0x25, 0x1c, 0x10, 0x75, 0xec, 0x0d, 0x18, 0x27, 0x76, 0x34, 0x6b, + 0x47, 0x02, 0x21, 0x2d, 0x5b, 0xef, 0xd4, 0xac, 0x62, 0xcf, 0xae, 0x76, 0xc7, 0x51, 0xfb, 0x2d, + 0xb8, 0xf2, 0x09, 0x90, 0x80, 0x33, 0x37, 0xee, 0x15, 0xa7, 0x1e, 0x11, 0x87, 0x0a, 0x25, 0x17, + 0xbe, 0x45, 0xd1, 0xcc, 0xec, 0xda, 0xeb, 0x28, 0x72, 0x1a, 0x89, 0x5e, 0xb8, 0x24, 0x33, 0xef, + 0xcf, 0xef, 0xf7, 0x7b, 0x6f, 0xde, 0x8c, 0x17, 0xaa, 0x9e, 0x4f, 0x19, 0xa7, 0x63, 0x3a, 0xa1, + 0x3c, 0x78, 0x51, 0xf7, 0x03, 0x8f, 0x7b, 0x75, 0x1e, 0xd8, 0x43, 0x5a, 0x3f, 0xdf, 0x55, 0x8b, + 0x9a, 0x34, 0xe2, 0xfb, 0x0b, 0x91, 0xca, 0x58, 0x53, 0x01, 0xe7, 0xbb, 0xdb, 0xc5, 0x91, 0x37, + 0xf2, 0x54, 0xb6, 0x58, 0x29, 0xf7, 0xf6, 0xc3, 0xeb, 0xd0, 0x87, 0xde, 0x64, 0xe2, 0x31, 0x01, + 0xaf, 0x56, 0x51, 0x6c, 0xed, 0xba, 0xd8, 0x80, 0x86, 0xde, 0x34, 0x50, 0x62, 0xe2, 0xb5, 0x8a, + 0xaf, 0x7c, 0x07, 0xd0, 0x17, 0xec, 0x61, 0xcb, 0xe6, 0x36, 0x26, 0x50, 0x88, 0xfd, 0x56, 0xe8, + 0xdb, 0x2c, 0xd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, 0x18, 0x0a, 0x49, 0x73, + 0xaf, 0xa3, 0xa1, 0xab, 0xa1, 0x06, 0x21, 0x3d, 0xa2, 0xa5, 0xbf, 0xca, 0xac, 0x22, 0x2d, 0xfd, + 0xf0, 0x4b, 0x58, 0x13, 0xad, 0x3d, 0x94, 0x3f, 0x0d, 0x71, 0x6f, 0x0f, 0x8f, 0x1a, 0x5f, 0x98, + 0x56, 0xab, 0x67, 0x75, 0x7b, 0x7d, 0x6b, 0x60, 0x1a, 0x5a, 0x0a, 0x97, 0xe1, 0x83, 0x84, 0xab, + 0x4f, 0x1a, 0x4d, 0x23, 0x5a, 0x1f, 0x37, 0xcc, 0x8e, 0xf6, 0x06, 0x1d, 0xfc, 0x82, 0x5e, 0x5e, + 0x94, 0xd0, 0xab, 0x8b, 0x12, 0xfa, 0xfb, 0xa2, 0x84, 0x7e, 0xb8, 0x2c, 0xa5, 0x5e, 0x5d, 0x96, + 0x52, 0x7f, 0x5e, 0x96, 0x52, 0xb0, 0xe3, 0x7a, 0x4b, 0x6b, 0x3e, 0x50, 0xdf, 0x8d, 0x27, 0xc2, + 0x78, 0x82, 0xbe, 0x69, 0xde, 0x7a, 0xe2, 0xd5, 0xb7, 0xe9, 0x88, 0xb2, 0xd9, 0x87, 0xf2, 0xcf, + 0xe9, 0xfb, 0x3d, 0x9f, 0xb2, 0xfe, 0x0c, 0x42, 0x82, 0xab, 0x6b, 0x57, 0x3b, 0xdd, 0x7d, 0x9a, + 0x93, 0x19, 0x8f, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xc0, 0xd4, 0x18, 0xf8, 0x6e, 0x0b, 0x00, + 0x00, } func (m *TracesData) Marshal() (dAtA []byte, err error) { @@ -993,6 +1085,14 @@ func (m *Span) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Flags != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Flags)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x85 + } { size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -1199,6 +1299,12 @@ func (m *Span_Link) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Flags != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Flags)) + i-- + dAtA[i] = 0x35 + } if m.DroppedAttributesCount != 0 { i = encodeVarintTrace(dAtA, i, uint64(m.DroppedAttributesCount)) i-- @@ -1415,6 +1521,9 @@ func (m *Span) Size() (n int) { } l = m.Status.Size() n += 1 + l + sovTrace(uint64(l)) + if m.Flags != 0 { + n += 6 + } return n } @@ -1466,6 +1575,9 @@ func (m *Span_Link) Size() (n int) { if m.DroppedAttributesCount != 0 { n += 1 + sovTrace(uint64(m.DroppedAttributesCount)) } + if m.Flags != 0 { + n += 5 + } return n } @@ -2330,6 +2442,16 @@ func (m *Span) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 16: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) + } + m.Flags = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + m.Flags = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 default: iNdEx = preIndex skippy, err := skipTrace(dAtA[iNdEx:]) @@ -2676,6 +2798,16 @@ func (m *Span_Link) Unmarshal(dAtA []byte) error { break } } + case 6: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) + } + m.Flags = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + m.Flags = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 default: iNdEx = preIndex skippy, err := skipTrace(dAtA[iNdEx:]) diff --git a/pdata/internal/generated_wrapper_byteslice.go b/pdata/internal/generated_wrapper_byteslice.go index 83beaf9c6ab..ea3a3d95cd1 100644 --- a/pdata/internal/generated_wrapper_byteslice.go +++ b/pdata/internal/generated_wrapper_byteslice.go @@ -7,13 +7,18 @@ package internal type ByteSlice struct { - orig *[]byte + orig *[]byte + state *State } func GetOrigByteSlice(ms ByteSlice) *[]byte { return ms.orig } -func NewByteSlice(orig *[]byte) ByteSlice { - return ByteSlice{orig: orig} +func GetByteSliceState(ms ByteSlice) *State { + return ms.state +} + +func NewByteSlice(orig *[]byte, state *State) ByteSlice { + return ByteSlice{orig: orig, state: state} } diff --git a/pdata/internal/generated_wrapper_float64slice.go b/pdata/internal/generated_wrapper_float64slice.go index 1204adf5dd3..88d6c33d78e 100644 --- a/pdata/internal/generated_wrapper_float64slice.go +++ b/pdata/internal/generated_wrapper_float64slice.go @@ -7,13 +7,18 @@ package internal type Float64Slice struct { - orig *[]float64 + orig *[]float64 + state *State } func GetOrigFloat64Slice(ms Float64Slice) *[]float64 { return ms.orig } -func NewFloat64Slice(orig *[]float64) Float64Slice { - return Float64Slice{orig: orig} +func GetFloat64SliceState(ms Float64Slice) *State { + return ms.state +} + +func NewFloat64Slice(orig *[]float64, state *State) Float64Slice { + return Float64Slice{orig: orig, state: state} } diff --git a/pdata/internal/generated_wrapper_instrumentationscope.go b/pdata/internal/generated_wrapper_instrumentationscope.go index 951e60cea12..89b995bc98f 100644 --- a/pdata/internal/generated_wrapper_instrumentationscope.go +++ b/pdata/internal/generated_wrapper_instrumentationscope.go @@ -11,20 +11,26 @@ import ( ) type InstrumentationScope struct { - orig *otlpcommon.InstrumentationScope + orig *otlpcommon.InstrumentationScope + state *State } func GetOrigInstrumentationScope(ms InstrumentationScope) *otlpcommon.InstrumentationScope { return ms.orig } -func NewInstrumentationScope(orig *otlpcommon.InstrumentationScope) InstrumentationScope { - return InstrumentationScope{orig: orig} +func GetInstrumentationScopeState(ms InstrumentationScope) *State { + return ms.state +} + +func NewInstrumentationScope(orig *otlpcommon.InstrumentationScope, state *State) InstrumentationScope { + return InstrumentationScope{orig: orig, state: state} } func GenerateTestInstrumentationScope() InstrumentationScope { orig := otlpcommon.InstrumentationScope{} - tv := NewInstrumentationScope(&orig) + state := StateMutable + tv := NewInstrumentationScope(&orig, &state) FillTestInstrumentationScope(tv) return tv } @@ -32,6 +38,6 @@ func GenerateTestInstrumentationScope() InstrumentationScope { func FillTestInstrumentationScope(tv InstrumentationScope) { tv.orig.Name = "test_name" tv.orig.Version = "test_version" - FillTestMap(NewMap(&tv.orig.Attributes)) + FillTestMap(NewMap(&tv.orig.Attributes, tv.state)) tv.orig.DroppedAttributesCount = uint32(17) } diff --git a/pdata/internal/generated_wrapper_resource.go b/pdata/internal/generated_wrapper_resource.go index 0f91d02ede6..354b2457ba7 100644 --- a/pdata/internal/generated_wrapper_resource.go +++ b/pdata/internal/generated_wrapper_resource.go @@ -11,25 +11,31 @@ import ( ) type Resource struct { - orig *otlpresource.Resource + orig *otlpresource.Resource + state *State } func GetOrigResource(ms Resource) *otlpresource.Resource { return ms.orig } -func NewResource(orig *otlpresource.Resource) Resource { - return Resource{orig: orig} +func GetResourceState(ms Resource) *State { + return ms.state +} + +func NewResource(orig *otlpresource.Resource, state *State) Resource { + return Resource{orig: orig, state: state} } func GenerateTestResource() Resource { orig := otlpresource.Resource{} - tv := NewResource(&orig) + state := StateMutable + tv := NewResource(&orig, &state) FillTestResource(tv) return tv } func FillTestResource(tv Resource) { - FillTestMap(NewMap(&tv.orig.Attributes)) + FillTestMap(NewMap(&tv.orig.Attributes, tv.state)) tv.orig.DroppedAttributesCount = uint32(17) } diff --git a/pdata/internal/generated_wrapper_uint64slice.go b/pdata/internal/generated_wrapper_uint64slice.go index 6190251307a..fed633ae260 100644 --- a/pdata/internal/generated_wrapper_uint64slice.go +++ b/pdata/internal/generated_wrapper_uint64slice.go @@ -7,13 +7,18 @@ package internal type UInt64Slice struct { - orig *[]uint64 + orig *[]uint64 + state *State } func GetOrigUInt64Slice(ms UInt64Slice) *[]uint64 { return ms.orig } -func NewUInt64Slice(orig *[]uint64) UInt64Slice { - return UInt64Slice{orig: orig} +func GetUInt64SliceState(ms UInt64Slice) *State { + return ms.state +} + +func NewUInt64Slice(orig *[]uint64, state *State) UInt64Slice { + return UInt64Slice{orig: orig, state: state} } diff --git a/pdata/internal/json/package_test.go b/pdata/internal/json/package_test.go new file mode 100644 index 00000000000..0a3664f879a --- /dev/null +++ b/pdata/internal/json/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package json + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pdata/internal/otlp/package_test.go b/pdata/internal/otlp/package_test.go new file mode 100644 index 00000000000..0e2ed9911ee --- /dev/null +++ b/pdata/internal/otlp/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otlp + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pdata/internal/state.go b/pdata/internal/state.go new file mode 100644 index 00000000000..f10de5eadf1 --- /dev/null +++ b/pdata/internal/state.go @@ -0,0 +1,22 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package internal // import "go.opentelemetry.io/collector/pdata/internal" + +// State defines an ownership state of pmetric.Metrics, plog.Logs or ptrace.Traces. +type State int32 + +const ( + // StateMutable indicates that the data is exclusive to the current consumer. + StateMutable State = iota + + // StateReadOnly indicates that the data is shared with other consumers. + StateReadOnly +) + +// AssertMutable panics if the state is not StateMutable. +func (state *State) AssertMutable() { + if *state != StateMutable { + panic("invalid access to shared data") + } +} diff --git a/pdata/internal/wrapper_logs.go b/pdata/internal/wrapper_logs.go index b102ff70489..6b6c076cca6 100644 --- a/pdata/internal/wrapper_logs.go +++ b/pdata/internal/wrapper_logs.go @@ -9,15 +9,24 @@ import ( ) type Logs struct { - orig *otlpcollectorlog.ExportLogsServiceRequest + orig *otlpcollectorlog.ExportLogsServiceRequest + state *State } func GetOrigLogs(ms Logs) *otlpcollectorlog.ExportLogsServiceRequest { return ms.orig } -func NewLogs(orig *otlpcollectorlog.ExportLogsServiceRequest) Logs { - return Logs{orig: orig} +func GetLogsState(ms Logs) *State { + return ms.state +} + +func SetLogsState(ms Logs, state State) { + *ms.state = state +} + +func NewLogs(orig *otlpcollectorlog.ExportLogsServiceRequest, state *State) Logs { + return Logs{orig: orig, state: state} } // LogsToProto internal helper to convert Logs to protobuf representation. @@ -28,8 +37,10 @@ func LogsToProto(l Logs) otlplogs.LogsData { } // LogsFromProto internal helper to convert protobuf representation to Logs. +// This function set exclusive state assuming that it's called only once per Logs. func LogsFromProto(orig otlplogs.LogsData) Logs { - return Logs{orig: &otlpcollectorlog.ExportLogsServiceRequest{ + state := StateMutable + return NewLogs(&otlpcollectorlog.ExportLogsServiceRequest{ ResourceLogs: orig.ResourceLogs, - }} + }, &state) } diff --git a/pdata/internal/wrapper_map.go b/pdata/internal/wrapper_map.go index 8eece9e7dbd..23a1c9056c8 100644 --- a/pdata/internal/wrapper_map.go +++ b/pdata/internal/wrapper_map.go @@ -8,20 +8,26 @@ import ( ) type Map struct { - orig *[]otlpcommon.KeyValue + orig *[]otlpcommon.KeyValue + state *State } func GetOrigMap(ms Map) *[]otlpcommon.KeyValue { return ms.orig } -func NewMap(orig *[]otlpcommon.KeyValue) Map { - return Map{orig: orig} +func GetMapState(ms Map) *State { + return ms.state +} + +func NewMap(orig *[]otlpcommon.KeyValue, state *State) Map { + return Map{orig: orig, state: state} } func GenerateTestMap() Map { var orig []otlpcommon.KeyValue - ms := NewMap(&orig) + state := StateMutable + ms := NewMap(&orig, &state) FillTestMap(ms) return ms } diff --git a/pdata/internal/wrapper_metrics.go b/pdata/internal/wrapper_metrics.go index 95b3001e77b..85be497ea5c 100644 --- a/pdata/internal/wrapper_metrics.go +++ b/pdata/internal/wrapper_metrics.go @@ -9,15 +9,24 @@ import ( ) type Metrics struct { - orig *otlpcollectormetrics.ExportMetricsServiceRequest + orig *otlpcollectormetrics.ExportMetricsServiceRequest + state *State } func GetOrigMetrics(ms Metrics) *otlpcollectormetrics.ExportMetricsServiceRequest { return ms.orig } -func NewMetrics(orig *otlpcollectormetrics.ExportMetricsServiceRequest) Metrics { - return Metrics{orig: orig} +func GetMetricsState(ms Metrics) *State { + return ms.state +} + +func SetMetricsState(ms Metrics, state State) { + *ms.state = state +} + +func NewMetrics(orig *otlpcollectormetrics.ExportMetricsServiceRequest, state *State) Metrics { + return Metrics{orig: orig, state: state} } // MetricsToProto internal helper to convert Metrics to protobuf representation. @@ -28,8 +37,10 @@ func MetricsToProto(l Metrics) otlpmetrics.MetricsData { } // MetricsFromProto internal helper to convert protobuf representation to Metrics. +// This function set exclusive state assuming that it's called only once per Metrics. func MetricsFromProto(orig otlpmetrics.MetricsData) Metrics { - return Metrics{orig: &otlpcollectormetrics.ExportMetricsServiceRequest{ + state := StateMutable + return NewMetrics(&otlpcollectormetrics.ExportMetricsServiceRequest{ ResourceMetrics: orig.ResourceMetrics, - }} + }, &state) } diff --git a/pdata/internal/wrapper_slice.go b/pdata/internal/wrapper_slice.go index cfeed739742..2f366199a25 100644 --- a/pdata/internal/wrapper_slice.go +++ b/pdata/internal/wrapper_slice.go @@ -8,20 +8,26 @@ import ( ) type Slice struct { - orig *[]otlpcommon.AnyValue + orig *[]otlpcommon.AnyValue + state *State } func GetOrigSlice(ms Slice) *[]otlpcommon.AnyValue { return ms.orig } -func NewSlice(orig *[]otlpcommon.AnyValue) Slice { - return Slice{orig: orig} +func GetSliceState(ms Slice) *State { + return ms.state +} + +func NewSlice(orig *[]otlpcommon.AnyValue, state *State) Slice { + return Slice{orig: orig, state: state} } func GenerateTestSlice() Slice { orig := []otlpcommon.AnyValue{} - tv := NewSlice(&orig) + state := StateMutable + tv := NewSlice(&orig, &state) FillTestSlice(tv) return tv } @@ -29,6 +35,7 @@ func GenerateTestSlice() Slice { func FillTestSlice(tv Slice) { *tv.orig = make([]otlpcommon.AnyValue, 7) for i := 0; i < 7; i++ { - FillTestValue(NewValue(&(*tv.orig)[i])) + state := StateMutable + FillTestValue(NewValue(&(*tv.orig)[i], &state)) } } diff --git a/pdata/internal/wrapper_traces.go b/pdata/internal/wrapper_traces.go index f8d29dba788..5a4cdadbde0 100644 --- a/pdata/internal/wrapper_traces.go +++ b/pdata/internal/wrapper_traces.go @@ -9,15 +9,24 @@ import ( ) type Traces struct { - orig *otlpcollectortrace.ExportTraceServiceRequest + orig *otlpcollectortrace.ExportTraceServiceRequest + state *State } func GetOrigTraces(ms Traces) *otlpcollectortrace.ExportTraceServiceRequest { return ms.orig } -func NewTraces(orig *otlpcollectortrace.ExportTraceServiceRequest) Traces { - return Traces{orig: orig} +func GetTracesState(ms Traces) *State { + return ms.state +} + +func SetTracesState(ms Traces, state State) { + *ms.state = state +} + +func NewTraces(orig *otlpcollectortrace.ExportTraceServiceRequest, state *State) Traces { + return Traces{orig: orig, state: state} } // TracesToProto internal helper to convert Traces to protobuf representation. @@ -28,8 +37,10 @@ func TracesToProto(l Traces) otlptrace.TracesData { } // TracesFromProto internal helper to convert protobuf representation to Traces. +// This function set exclusive state assuming that it's called only once per Traces. func TracesFromProto(orig otlptrace.TracesData) Traces { - return Traces{orig: &otlpcollectortrace.ExportTraceServiceRequest{ + state := StateMutable + return NewTraces(&otlpcollectortrace.ExportTraceServiceRequest{ ResourceSpans: orig.ResourceSpans, - }} + }, &state) } diff --git a/pdata/internal/wrapper_tracestate.go b/pdata/internal/wrapper_tracestate.go index 3a86a11848b..1a2f79f89d8 100644 --- a/pdata/internal/wrapper_tracestate.go +++ b/pdata/internal/wrapper_tracestate.go @@ -4,20 +4,26 @@ package internal // import "go.opentelemetry.io/collector/pdata/internal" type TraceState struct { - orig *string + orig *string + state *State } func GetOrigTraceState(ms TraceState) *string { return ms.orig } -func NewTraceState(orig *string) TraceState { - return TraceState{orig: orig} +func GetTraceStateState(ms TraceState) *State { + return ms.state +} + +func NewTraceState(orig *string, state *State) TraceState { + return TraceState{orig: orig, state: state} } func GenerateTestTraceState() TraceState { var orig string - ms := NewTraceState(&orig) + state := StateMutable + ms := NewTraceState(&orig, &state) FillTestTraceState(ms) return ms } diff --git a/pdata/internal/wrapper_value.go b/pdata/internal/wrapper_value.go index 9fd9064de67..0d5225052d5 100644 --- a/pdata/internal/wrapper_value.go +++ b/pdata/internal/wrapper_value.go @@ -8,15 +8,20 @@ import ( ) type Value struct { - orig *otlpcommon.AnyValue + orig *otlpcommon.AnyValue + state *State } func GetOrigValue(ms Value) *otlpcommon.AnyValue { return ms.orig } -func NewValue(orig *otlpcommon.AnyValue) Value { - return Value{orig: orig} +func GetValueState(ms Value) *State { + return ms.state +} + +func NewValue(orig *otlpcommon.AnyValue, state *State) Value { + return Value{orig: orig, state: state} } func FillTestValue(dest Value) { @@ -25,7 +30,8 @@ func FillTestValue(dest Value) { func GenerateTestValue() Value { var orig otlpcommon.AnyValue - ms := NewValue(&orig) + state := StateMutable + ms := NewValue(&orig, &state) FillTestValue(ms) return ms } diff --git a/pdata/pcommon/generated_byteslice.go b/pdata/pcommon/generated_byteslice.go index 34126d9d4e2..cbb64987d2b 100644 --- a/pdata/pcommon/generated_byteslice.go +++ b/pdata/pcommon/generated_byteslice.go @@ -21,10 +21,15 @@ func (ms ByteSlice) getOrig() *[]byte { return internal.GetOrigByteSlice(internal.ByteSlice(ms)) } +func (ms ByteSlice) getState() *internal.State { + return internal.GetByteSliceState(internal.ByteSlice(ms)) +} + // NewByteSlice creates a new empty ByteSlice. func NewByteSlice() ByteSlice { orig := []byte(nil) - return ByteSlice(internal.NewByteSlice(&orig)) + state := internal.StateMutable + return ByteSlice(internal.NewByteSlice(&orig, &state)) } // AsRaw returns a copy of the []byte slice. @@ -34,6 +39,7 @@ func (ms ByteSlice) AsRaw() []byte { // FromRaw copies raw []byte into the slice ByteSlice. func (ms ByteSlice) FromRaw(val []byte) { + ms.getState().AssertMutable() *ms.getOrig() = copyByteSlice(*ms.getOrig(), val) } @@ -52,6 +58,7 @@ func (ms ByteSlice) At(i int) byte { // SetAt sets byte item at particular index. // Equivalent of byteSlice[i] = val func (ms ByteSlice) SetAt(i int, val byte) { + ms.getState().AssertMutable() (*ms.getOrig())[i] = val } @@ -62,6 +69,7 @@ func (ms ByteSlice) SetAt(i int, val byte) { // copy(buf, byteSlice) // byteSlice = buf func (ms ByteSlice) EnsureCapacity(newCap int) { + ms.getState().AssertMutable() oldCap := cap(*ms.getOrig()) if newCap <= oldCap { return @@ -75,18 +83,22 @@ func (ms ByteSlice) EnsureCapacity(newCap int) { // Append appends extra elements to ByteSlice. // Equivalent of byteSlice = append(byteSlice, elms...) func (ms ByteSlice) Append(elms ...byte) { + ms.getState().AssertMutable() *ms.getOrig() = append(*ms.getOrig(), elms...) } // MoveTo moves all elements from the current slice overriding the destination and // resetting the current instance to its zero value. func (ms ByteSlice) MoveTo(dest ByteSlice) { + ms.getState().AssertMutable() + dest.getState().AssertMutable() *dest.getOrig() = *ms.getOrig() *ms.getOrig() = nil } // CopyTo copies all elements from the current slice overriding the destination. func (ms ByteSlice) CopyTo(dest ByteSlice) { + dest.getState().AssertMutable() *dest.getOrig() = copyByteSlice(*dest.getOrig(), *ms.getOrig()) } diff --git a/pdata/pcommon/generated_byteslice_test.go b/pdata/pcommon/generated_byteslice_test.go index b45c958bfc4..9594e0d11d5 100644 --- a/pdata/pcommon/generated_byteslice_test.go +++ b/pdata/pcommon/generated_byteslice_test.go @@ -10,6 +10,8 @@ import ( "testing" "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" ) func TestNewByteSlice(t *testing.T) { @@ -43,6 +45,27 @@ func TestNewByteSlice(t *testing.T) { assert.Equal(t, byte(1), mv.At(0)) } +func TestByteSliceReadOnly(t *testing.T) { + raw := []byte{1, 2, 3} + state := internal.StateReadOnly + ms := ByteSlice(internal.NewByteSlice(&raw, &state)) + + assert.Equal(t, 3, ms.Len()) + assert.Equal(t, byte(1), ms.At(0)) + assert.Panics(t, func() { ms.Append(1) }) + assert.Panics(t, func() { ms.EnsureCapacity(2) }) + assert.Equal(t, raw, ms.AsRaw()) + assert.Panics(t, func() { ms.FromRaw(raw) }) + + ms2 := NewByteSlice() + ms.CopyTo(ms2) + assert.Equal(t, ms.AsRaw(), ms2.AsRaw()) + assert.Panics(t, func() { ms2.CopyTo(ms) }) + + assert.Panics(t, func() { ms.MoveTo(ms2) }) + assert.Panics(t, func() { ms2.MoveTo(ms) }) +} + func TestByteSliceAppend(t *testing.T) { ms := NewByteSlice() ms.FromRaw([]byte{1, 2, 3}) diff --git a/pdata/pcommon/generated_float64slice.go b/pdata/pcommon/generated_float64slice.go index 54db0af8fa4..83a07ccf483 100644 --- a/pdata/pcommon/generated_float64slice.go +++ b/pdata/pcommon/generated_float64slice.go @@ -21,10 +21,15 @@ func (ms Float64Slice) getOrig() *[]float64 { return internal.GetOrigFloat64Slice(internal.Float64Slice(ms)) } +func (ms Float64Slice) getState() *internal.State { + return internal.GetFloat64SliceState(internal.Float64Slice(ms)) +} + // NewFloat64Slice creates a new empty Float64Slice. func NewFloat64Slice() Float64Slice { orig := []float64(nil) - return Float64Slice(internal.NewFloat64Slice(&orig)) + state := internal.StateMutable + return Float64Slice(internal.NewFloat64Slice(&orig, &state)) } // AsRaw returns a copy of the []float64 slice. @@ -34,6 +39,7 @@ func (ms Float64Slice) AsRaw() []float64 { // FromRaw copies raw []float64 into the slice Float64Slice. func (ms Float64Slice) FromRaw(val []float64) { + ms.getState().AssertMutable() *ms.getOrig() = copyFloat64Slice(*ms.getOrig(), val) } @@ -52,6 +58,7 @@ func (ms Float64Slice) At(i int) float64 { // SetAt sets float64 item at particular index. // Equivalent of float64Slice[i] = val func (ms Float64Slice) SetAt(i int, val float64) { + ms.getState().AssertMutable() (*ms.getOrig())[i] = val } @@ -62,6 +69,7 @@ func (ms Float64Slice) SetAt(i int, val float64) { // copy(buf, float64Slice) // float64Slice = buf func (ms Float64Slice) EnsureCapacity(newCap int) { + ms.getState().AssertMutable() oldCap := cap(*ms.getOrig()) if newCap <= oldCap { return @@ -75,18 +83,22 @@ func (ms Float64Slice) EnsureCapacity(newCap int) { // Append appends extra elements to Float64Slice. // Equivalent of float64Slice = append(float64Slice, elms...) func (ms Float64Slice) Append(elms ...float64) { + ms.getState().AssertMutable() *ms.getOrig() = append(*ms.getOrig(), elms...) } // MoveTo moves all elements from the current slice overriding the destination and // resetting the current instance to its zero value. func (ms Float64Slice) MoveTo(dest Float64Slice) { + ms.getState().AssertMutable() + dest.getState().AssertMutable() *dest.getOrig() = *ms.getOrig() *ms.getOrig() = nil } // CopyTo copies all elements from the current slice overriding the destination. func (ms Float64Slice) CopyTo(dest Float64Slice) { + dest.getState().AssertMutable() *dest.getOrig() = copyFloat64Slice(*dest.getOrig(), *ms.getOrig()) } diff --git a/pdata/pcommon/generated_float64slice_test.go b/pdata/pcommon/generated_float64slice_test.go index 72653c7281f..7d2dd87bece 100644 --- a/pdata/pcommon/generated_float64slice_test.go +++ b/pdata/pcommon/generated_float64slice_test.go @@ -10,6 +10,8 @@ import ( "testing" "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" ) func TestNewFloat64Slice(t *testing.T) { @@ -43,6 +45,27 @@ func TestNewFloat64Slice(t *testing.T) { assert.Equal(t, float64(1), mv.At(0)) } +func TestFloat64SliceReadOnly(t *testing.T) { + raw := []float64{1, 2, 3} + state := internal.StateReadOnly + ms := Float64Slice(internal.NewFloat64Slice(&raw, &state)) + + assert.Equal(t, 3, ms.Len()) + assert.Equal(t, float64(1), ms.At(0)) + assert.Panics(t, func() { ms.Append(1) }) + assert.Panics(t, func() { ms.EnsureCapacity(2) }) + assert.Equal(t, raw, ms.AsRaw()) + assert.Panics(t, func() { ms.FromRaw(raw) }) + + ms2 := NewFloat64Slice() + ms.CopyTo(ms2) + assert.Equal(t, ms.AsRaw(), ms2.AsRaw()) + assert.Panics(t, func() { ms2.CopyTo(ms) }) + + assert.Panics(t, func() { ms.MoveTo(ms2) }) + assert.Panics(t, func() { ms2.MoveTo(ms) }) +} + func TestFloat64SliceAppend(t *testing.T) { ms := NewFloat64Slice() ms.FromRaw([]float64{1, 2, 3}) diff --git a/pdata/pcommon/generated_instrumentationscope.go b/pdata/pcommon/generated_instrumentationscope.go index 4df1eeaed1d..8a5d23b549f 100644 --- a/pdata/pcommon/generated_instrumentationscope.go +++ b/pdata/pcommon/generated_instrumentationscope.go @@ -20,8 +20,8 @@ import ( // Important: zero-initialized instance is not valid for use. type InstrumentationScope internal.InstrumentationScope -func newInstrumentationScope(orig *otlpcommon.InstrumentationScope) InstrumentationScope { - return InstrumentationScope(internal.NewInstrumentationScope(orig)) +func newInstrumentationScope(orig *otlpcommon.InstrumentationScope, state *internal.State) InstrumentationScope { + return InstrumentationScope(internal.NewInstrumentationScope(orig, state)) } // NewInstrumentationScope creates a new empty InstrumentationScope. @@ -29,12 +29,15 @@ func newInstrumentationScope(orig *otlpcommon.InstrumentationScope) Instrumentat // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewInstrumentationScope() InstrumentationScope { - return newInstrumentationScope(&otlpcommon.InstrumentationScope{}) + state := internal.StateMutable + return newInstrumentationScope(&otlpcommon.InstrumentationScope{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms InstrumentationScope) MoveTo(dest InstrumentationScope) { + ms.getState().AssertMutable() + dest.getState().AssertMutable() *dest.getOrig() = *ms.getOrig() *ms.getOrig() = otlpcommon.InstrumentationScope{} } @@ -43,6 +46,10 @@ func (ms InstrumentationScope) getOrig() *otlpcommon.InstrumentationScope { return internal.GetOrigInstrumentationScope(internal.InstrumentationScope(ms)) } +func (ms InstrumentationScope) getState() *internal.State { + return internal.GetInstrumentationScopeState(internal.InstrumentationScope(ms)) +} + // Name returns the name associated with this InstrumentationScope. func (ms InstrumentationScope) Name() string { return ms.getOrig().Name @@ -50,6 +57,7 @@ func (ms InstrumentationScope) Name() string { // SetName replaces the name associated with this InstrumentationScope. func (ms InstrumentationScope) SetName(v string) { + ms.getState().AssertMutable() ms.getOrig().Name = v } @@ -60,12 +68,13 @@ func (ms InstrumentationScope) Version() string { // SetVersion replaces the version associated with this InstrumentationScope. func (ms InstrumentationScope) SetVersion(v string) { + ms.getState().AssertMutable() ms.getOrig().Version = v } // Attributes returns the Attributes associated with this InstrumentationScope. func (ms InstrumentationScope) Attributes() Map { - return Map(internal.NewMap(&ms.getOrig().Attributes)) + return Map(internal.NewMap(&ms.getOrig().Attributes, internal.GetInstrumentationScopeState(internal.InstrumentationScope(ms)))) } // DroppedAttributesCount returns the droppedattributescount associated with this InstrumentationScope. @@ -75,11 +84,13 @@ func (ms InstrumentationScope) DroppedAttributesCount() uint32 { // SetDroppedAttributesCount replaces the droppedattributescount associated with this InstrumentationScope. func (ms InstrumentationScope) SetDroppedAttributesCount(v uint32) { + ms.getState().AssertMutable() ms.getOrig().DroppedAttributesCount = v } // CopyTo copies all properties from the current struct overriding the destination. func (ms InstrumentationScope) CopyTo(dest InstrumentationScope) { + dest.getState().AssertMutable() dest.SetName(ms.Name()) dest.SetVersion(ms.Version()) ms.Attributes().CopyTo(dest.Attributes()) diff --git a/pdata/pcommon/generated_instrumentationscope_test.go b/pdata/pcommon/generated_instrumentationscope_test.go index 849b75e7bfb..8dc46fe69c4 100644 --- a/pdata/pcommon/generated_instrumentationscope_test.go +++ b/pdata/pcommon/generated_instrumentationscope_test.go @@ -12,6 +12,7 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/pdata/internal" + otlpcommon "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" ) func TestInstrumentationScope_MoveTo(t *testing.T) { @@ -20,6 +21,9 @@ func TestInstrumentationScope_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewInstrumentationScope(), ms) assert.Equal(t, InstrumentationScope(internal.GenerateTestInstrumentationScope()), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newInstrumentationScope(&otlpcommon.InstrumentationScope{}, &sharedState)) }) + assert.Panics(t, func() { newInstrumentationScope(&otlpcommon.InstrumentationScope{}, &sharedState).MoveTo(dest) }) } func TestInstrumentationScope_CopyTo(t *testing.T) { @@ -30,6 +34,8 @@ func TestInstrumentationScope_CopyTo(t *testing.T) { orig = InstrumentationScope(internal.GenerateTestInstrumentationScope()) orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newInstrumentationScope(&otlpcommon.InstrumentationScope{}, &sharedState)) }) } func TestInstrumentationScope_Name(t *testing.T) { @@ -37,6 +43,8 @@ func TestInstrumentationScope_Name(t *testing.T) { assert.Equal(t, "", ms.Name()) ms.SetName("test_name") assert.Equal(t, "test_name", ms.Name()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newInstrumentationScope(&otlpcommon.InstrumentationScope{}, &sharedState).SetName("test_name") }) } func TestInstrumentationScope_Version(t *testing.T) { @@ -44,6 +52,10 @@ func TestInstrumentationScope_Version(t *testing.T) { assert.Equal(t, "", ms.Version()) ms.SetVersion("test_version") assert.Equal(t, "test_version", ms.Version()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + newInstrumentationScope(&otlpcommon.InstrumentationScope{}, &sharedState).SetVersion("test_version") + }) } func TestInstrumentationScope_Attributes(t *testing.T) { @@ -58,4 +70,8 @@ func TestInstrumentationScope_DroppedAttributesCount(t *testing.T) { assert.Equal(t, uint32(0), ms.DroppedAttributesCount()) ms.SetDroppedAttributesCount(uint32(17)) assert.Equal(t, uint32(17), ms.DroppedAttributesCount()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + newInstrumentationScope(&otlpcommon.InstrumentationScope{}, &sharedState).SetDroppedAttributesCount(uint32(17)) + }) } diff --git a/pdata/pcommon/generated_resource.go b/pdata/pcommon/generated_resource.go index c701fb5c55a..12e6cfa7f3b 100644 --- a/pdata/pcommon/generated_resource.go +++ b/pdata/pcommon/generated_resource.go @@ -20,8 +20,8 @@ import ( // Important: zero-initialized instance is not valid for use. type Resource internal.Resource -func newResource(orig *otlpresource.Resource) Resource { - return Resource(internal.NewResource(orig)) +func newResource(orig *otlpresource.Resource, state *internal.State) Resource { + return Resource(internal.NewResource(orig, state)) } // NewResource creates a new empty Resource. @@ -29,12 +29,15 @@ func newResource(orig *otlpresource.Resource) Resource { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewResource() Resource { - return newResource(&otlpresource.Resource{}) + state := internal.StateMutable + return newResource(&otlpresource.Resource{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms Resource) MoveTo(dest Resource) { + ms.getState().AssertMutable() + dest.getState().AssertMutable() *dest.getOrig() = *ms.getOrig() *ms.getOrig() = otlpresource.Resource{} } @@ -43,9 +46,13 @@ func (ms Resource) getOrig() *otlpresource.Resource { return internal.GetOrigResource(internal.Resource(ms)) } +func (ms Resource) getState() *internal.State { + return internal.GetResourceState(internal.Resource(ms)) +} + // Attributes returns the Attributes associated with this Resource. func (ms Resource) Attributes() Map { - return Map(internal.NewMap(&ms.getOrig().Attributes)) + return Map(internal.NewMap(&ms.getOrig().Attributes, internal.GetResourceState(internal.Resource(ms)))) } // DroppedAttributesCount returns the droppedattributescount associated with this Resource. @@ -55,11 +62,13 @@ func (ms Resource) DroppedAttributesCount() uint32 { // SetDroppedAttributesCount replaces the droppedattributescount associated with this Resource. func (ms Resource) SetDroppedAttributesCount(v uint32) { + ms.getState().AssertMutable() ms.getOrig().DroppedAttributesCount = v } // CopyTo copies all properties from the current struct overriding the destination. func (ms Resource) CopyTo(dest Resource) { + dest.getState().AssertMutable() ms.Attributes().CopyTo(dest.Attributes()) dest.SetDroppedAttributesCount(ms.DroppedAttributesCount()) } diff --git a/pdata/pcommon/generated_resource_test.go b/pdata/pcommon/generated_resource_test.go index b806227b617..a7af5300fe8 100644 --- a/pdata/pcommon/generated_resource_test.go +++ b/pdata/pcommon/generated_resource_test.go @@ -12,6 +12,7 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/pdata/internal" + otlpresource "go.opentelemetry.io/collector/pdata/internal/data/protogen/resource/v1" ) func TestResource_MoveTo(t *testing.T) { @@ -20,6 +21,9 @@ func TestResource_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewResource(), ms) assert.Equal(t, Resource(internal.GenerateTestResource()), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newResource(&otlpresource.Resource{}, &sharedState)) }) + assert.Panics(t, func() { newResource(&otlpresource.Resource{}, &sharedState).MoveTo(dest) }) } func TestResource_CopyTo(t *testing.T) { @@ -30,6 +34,8 @@ func TestResource_CopyTo(t *testing.T) { orig = Resource(internal.GenerateTestResource()) orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newResource(&otlpresource.Resource{}, &sharedState)) }) } func TestResource_Attributes(t *testing.T) { @@ -44,4 +50,6 @@ func TestResource_DroppedAttributesCount(t *testing.T) { assert.Equal(t, uint32(0), ms.DroppedAttributesCount()) ms.SetDroppedAttributesCount(uint32(17)) assert.Equal(t, uint32(17), ms.DroppedAttributesCount()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newResource(&otlpresource.Resource{}, &sharedState).SetDroppedAttributesCount(uint32(17)) }) } diff --git a/pdata/pcommon/generated_uint64slice.go b/pdata/pcommon/generated_uint64slice.go index f3656929ccc..1344ca35bcf 100644 --- a/pdata/pcommon/generated_uint64slice.go +++ b/pdata/pcommon/generated_uint64slice.go @@ -21,10 +21,15 @@ func (ms UInt64Slice) getOrig() *[]uint64 { return internal.GetOrigUInt64Slice(internal.UInt64Slice(ms)) } +func (ms UInt64Slice) getState() *internal.State { + return internal.GetUInt64SliceState(internal.UInt64Slice(ms)) +} + // NewUInt64Slice creates a new empty UInt64Slice. func NewUInt64Slice() UInt64Slice { orig := []uint64(nil) - return UInt64Slice(internal.NewUInt64Slice(&orig)) + state := internal.StateMutable + return UInt64Slice(internal.NewUInt64Slice(&orig, &state)) } // AsRaw returns a copy of the []uint64 slice. @@ -34,6 +39,7 @@ func (ms UInt64Slice) AsRaw() []uint64 { // FromRaw copies raw []uint64 into the slice UInt64Slice. func (ms UInt64Slice) FromRaw(val []uint64) { + ms.getState().AssertMutable() *ms.getOrig() = copyUInt64Slice(*ms.getOrig(), val) } @@ -52,6 +58,7 @@ func (ms UInt64Slice) At(i int) uint64 { // SetAt sets uint64 item at particular index. // Equivalent of uInt64Slice[i] = val func (ms UInt64Slice) SetAt(i int, val uint64) { + ms.getState().AssertMutable() (*ms.getOrig())[i] = val } @@ -62,6 +69,7 @@ func (ms UInt64Slice) SetAt(i int, val uint64) { // copy(buf, uInt64Slice) // uInt64Slice = buf func (ms UInt64Slice) EnsureCapacity(newCap int) { + ms.getState().AssertMutable() oldCap := cap(*ms.getOrig()) if newCap <= oldCap { return @@ -75,18 +83,22 @@ func (ms UInt64Slice) EnsureCapacity(newCap int) { // Append appends extra elements to UInt64Slice. // Equivalent of uInt64Slice = append(uInt64Slice, elms...) func (ms UInt64Slice) Append(elms ...uint64) { + ms.getState().AssertMutable() *ms.getOrig() = append(*ms.getOrig(), elms...) } // MoveTo moves all elements from the current slice overriding the destination and // resetting the current instance to its zero value. func (ms UInt64Slice) MoveTo(dest UInt64Slice) { + ms.getState().AssertMutable() + dest.getState().AssertMutable() *dest.getOrig() = *ms.getOrig() *ms.getOrig() = nil } // CopyTo copies all elements from the current slice overriding the destination. func (ms UInt64Slice) CopyTo(dest UInt64Slice) { + dest.getState().AssertMutable() *dest.getOrig() = copyUInt64Slice(*dest.getOrig(), *ms.getOrig()) } diff --git a/pdata/pcommon/generated_uint64slice_test.go b/pdata/pcommon/generated_uint64slice_test.go index e2cc4ccf774..9120f84b5e2 100644 --- a/pdata/pcommon/generated_uint64slice_test.go +++ b/pdata/pcommon/generated_uint64slice_test.go @@ -10,6 +10,8 @@ import ( "testing" "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" ) func TestNewUInt64Slice(t *testing.T) { @@ -43,6 +45,27 @@ func TestNewUInt64Slice(t *testing.T) { assert.Equal(t, uint64(1), mv.At(0)) } +func TestUInt64SliceReadOnly(t *testing.T) { + raw := []uint64{1, 2, 3} + state := internal.StateReadOnly + ms := UInt64Slice(internal.NewUInt64Slice(&raw, &state)) + + assert.Equal(t, 3, ms.Len()) + assert.Equal(t, uint64(1), ms.At(0)) + assert.Panics(t, func() { ms.Append(1) }) + assert.Panics(t, func() { ms.EnsureCapacity(2) }) + assert.Equal(t, raw, ms.AsRaw()) + assert.Panics(t, func() { ms.FromRaw(raw) }) + + ms2 := NewUInt64Slice() + ms.CopyTo(ms2) + assert.Equal(t, ms.AsRaw(), ms2.AsRaw()) + assert.Panics(t, func() { ms2.CopyTo(ms) }) + + assert.Panics(t, func() { ms.MoveTo(ms2) }) + assert.Panics(t, func() { ms2.MoveTo(ms) }) +} + func TestUInt64SliceAppend(t *testing.T) { ms := NewUInt64Slice() ms.FromRaw([]uint64{1, 2, 3}) diff --git a/pdata/pcommon/map.go b/pdata/pcommon/map.go index 8e1b2bbccb6..5bbfab962b0 100644 --- a/pdata/pcommon/map.go +++ b/pdata/pcommon/map.go @@ -11,30 +11,40 @@ import ( ) // Map stores a map of string keys to elements of Value type. +// +// Must use NewMap function to create new instances. +// Important: zero-initialized instance is not valid for use. type Map internal.Map // NewMap creates a Map with 0 elements. func NewMap() Map { orig := []otlpcommon.KeyValue(nil) - return Map(internal.NewMap(&orig)) + state := internal.StateMutable + return Map(internal.NewMap(&orig, &state)) } func (m Map) getOrig() *[]otlpcommon.KeyValue { return internal.GetOrigMap(internal.Map(m)) } -func newMap(orig *[]otlpcommon.KeyValue) Map { - return Map(internal.NewMap(orig)) +func (m Map) getState() *internal.State { + return internal.GetMapState(internal.Map(m)) +} + +func newMap(orig *[]otlpcommon.KeyValue, state *internal.State) Map { + return Map(internal.NewMap(orig, state)) } // Clear erases any existing entries in this Map instance. func (m Map) Clear() { + m.getState().AssertMutable() *m.getOrig() = nil } // EnsureCapacity increases the capacity of this Map instance, if necessary, // to ensure that it can hold at least the number of elements specified by the capacity argument. func (m Map) EnsureCapacity(capacity int) { + m.getState().AssertMutable() oldOrig := *m.getOrig() if capacity <= cap(oldOrig) { return @@ -48,21 +58,22 @@ func (m Map) EnsureCapacity(capacity int) { // It is allowed to modify the returned value using Value.Set* functions. // Such modification will be applied to the value stored in this map. // -// If the key does not exist returns an invalid instance of the KeyValue and false. -// Calling any functions on the returned invalid instance will cause a panic. +// If the key does not exist returns a zero-initialized KeyValue and false. +// Calling any functions on the returned invalid instance may cause a panic. func (m Map) Get(key string) (Value, bool) { for i := range *m.getOrig() { akv := &(*m.getOrig())[i] if akv.Key == key { - return newValue(&akv.Value), true + return newValue(&akv.Value, m.getState()), true } } - return newValue(nil), false + return newValue(nil, m.getState()), false } // Remove removes the entry associated with the key and returns true if the key // was present in the map, otherwise returns false. func (m Map) Remove(key string) bool { + m.getState().AssertMutable() for i := range *m.getOrig() { akv := &(*m.getOrig())[i] if akv.Key == key { @@ -76,10 +87,11 @@ func (m Map) Remove(key string) bool { // RemoveIf removes the entries for which the function in question returns true func (m Map) RemoveIf(f func(string, Value) bool) { + m.getState().AssertMutable() newLen := 0 for i := 0; i < len(*m.getOrig()); i++ { akv := &(*m.getOrig())[i] - if f(akv.Key, newValue(&akv.Value)) { + if f(akv.Key, newValue(&akv.Value, m.getState())) { continue } if newLen == i { @@ -96,18 +108,20 @@ func (m Map) RemoveIf(f func(string, Value) bool) { // PutEmpty inserts or updates an empty value to the map under given key // and return the updated/inserted value. func (m Map) PutEmpty(k string) Value { + m.getState().AssertMutable() if av, existing := m.Get(k); existing { av.getOrig().Value = nil - return newValue(av.getOrig()) + return newValue(av.getOrig(), m.getState()) } *m.getOrig() = append(*m.getOrig(), otlpcommon.KeyValue{Key: k}) - return newValue(&(*m.getOrig())[len(*m.getOrig())-1].Value) + return newValue(&(*m.getOrig())[len(*m.getOrig())-1].Value, m.getState()) } // PutStr performs the Insert or Update action. The Value is // inserted to the map that did not originally have the key. The key/value is // updated to the map where the key already existed. func (m Map) PutStr(k string, v string) { + m.getState().AssertMutable() if av, existing := m.Get(k); existing { av.SetStr(v) } else { @@ -119,6 +133,7 @@ func (m Map) PutStr(k string, v string) { // inserted to the map that did not originally have the key. The key/value is // updated to the map where the key already existed. func (m Map) PutInt(k string, v int64) { + m.getState().AssertMutable() if av, existing := m.Get(k); existing { av.SetInt(v) } else { @@ -130,6 +145,7 @@ func (m Map) PutInt(k string, v int64) { // inserted to the map that did not originally have the key. The key/value is // updated to the map where the key already existed. func (m Map) PutDouble(k string, v float64) { + m.getState().AssertMutable() if av, existing := m.Get(k); existing { av.SetDouble(v) } else { @@ -141,6 +157,7 @@ func (m Map) PutDouble(k string, v float64) { // inserted to the map that did not originally have the key. The key/value is // updated to the map where the key already existed. func (m Map) PutBool(k string, v bool) { + m.getState().AssertMutable() if av, existing := m.Get(k); existing { av.SetBool(v) } else { @@ -150,35 +167,38 @@ func (m Map) PutBool(k string, v bool) { // PutEmptyBytes inserts or updates an empty byte slice under given key and returns it. func (m Map) PutEmptyBytes(k string) ByteSlice { + m.getState().AssertMutable() bv := otlpcommon.AnyValue_BytesValue{} if av, existing := m.Get(k); existing { av.getOrig().Value = &bv } else { *m.getOrig() = append(*m.getOrig(), otlpcommon.KeyValue{Key: k, Value: otlpcommon.AnyValue{Value: &bv}}) } - return ByteSlice(internal.NewByteSlice(&bv.BytesValue)) + return ByteSlice(internal.NewByteSlice(&bv.BytesValue, m.getState())) } // PutEmptyMap inserts or updates an empty map under given key and returns it. func (m Map) PutEmptyMap(k string) Map { + m.getState().AssertMutable() kvl := otlpcommon.AnyValue_KvlistValue{KvlistValue: &otlpcommon.KeyValueList{Values: []otlpcommon.KeyValue(nil)}} if av, existing := m.Get(k); existing { av.getOrig().Value = &kvl } else { *m.getOrig() = append(*m.getOrig(), otlpcommon.KeyValue{Key: k, Value: otlpcommon.AnyValue{Value: &kvl}}) } - return Map(internal.NewMap(&kvl.KvlistValue.Values)) + return Map(internal.NewMap(&kvl.KvlistValue.Values, m.getState())) } // PutEmptySlice inserts or updates an empty slice under given key and returns it. func (m Map) PutEmptySlice(k string) Slice { + m.getState().AssertMutable() vl := otlpcommon.AnyValue_ArrayValue{ArrayValue: &otlpcommon.ArrayValue{Values: []otlpcommon.AnyValue(nil)}} if av, existing := m.Get(k); existing { av.getOrig().Value = &vl } else { *m.getOrig() = append(*m.getOrig(), otlpcommon.KeyValue{Key: k, Value: otlpcommon.AnyValue{Value: &vl}}) } - return Slice(internal.NewSlice(&vl.ArrayValue.Values)) + return Slice(internal.NewSlice(&vl.ArrayValue.Values, m.getState())) } // Len returns the length of this map. @@ -199,7 +219,7 @@ func (m Map) Len() int { func (m Map) Range(f func(k string, v Value) bool) { for i := range *m.getOrig() { kv := &(*m.getOrig())[i] - if !f(kv.Key, Value(internal.NewValue(&kv.Value))) { + if !f(kv.Key, Value(internal.NewValue(&kv.Value, m.getState()))) { break } } @@ -207,6 +227,7 @@ func (m Map) Range(f func(k string, v Value) bool) { // CopyTo copies all elements from the current map overriding the destination. func (m Map) CopyTo(dest Map) { + dest.getState().AssertMutable() newLen := len(*m.getOrig()) oldCap := cap(*dest.getOrig()) if newLen <= oldCap { @@ -216,7 +237,7 @@ func (m Map) CopyTo(dest Map) { akv := &(*m.getOrig())[i] destAkv := &(*dest.getOrig())[i] destAkv.Key = akv.Key - newValue(&akv.Value).CopyTo(newValue(&destAkv.Value)) + newValue(&akv.Value, m.getState()).CopyTo(newValue(&destAkv.Value, dest.getState())) } return } @@ -226,7 +247,7 @@ func (m Map) CopyTo(dest Map) { for i := range *m.getOrig() { akv := &(*m.getOrig())[i] origs[i].Key = akv.Key - newValue(&akv.Value).CopyTo(newValue(&origs[i].Value)) + newValue(&akv.Value, m.getState()).CopyTo(newValue(&origs[i].Value, dest.getState())) } *dest.getOrig() = origs } @@ -243,6 +264,7 @@ func (m Map) AsRaw() map[string]any { // FromRaw overrides this Map instance from a standard go map. func (m Map) FromRaw(rawMap map[string]any) error { + m.getState().AssertMutable() if len(rawMap) == 0 { *m.getOrig() = nil return nil @@ -253,7 +275,7 @@ func (m Map) FromRaw(rawMap map[string]any) error { ix := 0 for k, iv := range rawMap { origs[ix].Key = k - errs = multierr.Append(errs, newValue(&origs[ix].Value).FromRaw(iv)) + errs = multierr.Append(errs, newValue(&origs[ix].Value, m.getState()).FromRaw(iv)) ix++ } *m.getOrig() = origs diff --git a/pdata/pcommon/map_test.go b/pdata/pcommon/map_test.go index 28f5a600906..2e4f864f6bf 100644 --- a/pdata/pcommon/map_test.go +++ b/pdata/pcommon/map_test.go @@ -17,7 +17,8 @@ func TestMap(t *testing.T) { val, exist := NewMap().Get("test_key") assert.False(t, exist) - assert.EqualValues(t, newValue(nil), val) + state := internal.StateMutable + assert.EqualValues(t, newValue(nil, &state), val) putString := NewMap() putString.PutStr("k", "v") @@ -52,6 +53,44 @@ func TestMap(t *testing.T) { assert.EqualValues(t, NewMap(), removeMap) } +func TestMapReadOnly(t *testing.T) { + state := internal.StateReadOnly + m := newMap(&[]otlpcommon.KeyValue{ + {Key: "k1", Value: otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_StringValue{StringValue: "v1"}}}, + }, &state) + + assert.Equal(t, 1, m.Len()) + + v, ok := m.Get("k1") + assert.True(t, ok) + assert.EqualValues(t, "v1", v.Str()) + + m.Range(func(k string, v Value) bool { + assert.Equal(t, "k1", k) + assert.Equal(t, "v1", v.Str()) + return true + }) + + assert.Panics(t, func() { m.PutStr("k2", "v2") }) + assert.Panics(t, func() { m.PutInt("k2", 123) }) + assert.Panics(t, func() { m.PutDouble("k2", 1.23) }) + assert.Panics(t, func() { m.PutBool("k2", true) }) + assert.Panics(t, func() { m.PutEmptyBytes("k2") }) + assert.Panics(t, func() { m.PutEmptyMap("k2") }) + assert.Panics(t, func() { m.PutEmptySlice("k2") }) + assert.Panics(t, func() { m.Remove("k1") }) + assert.Panics(t, func() { m.RemoveIf(func(string, Value) bool { return true }) }) + assert.Panics(t, func() { m.EnsureCapacity(2) }) + + m2 := NewMap() + m.CopyTo(m2) + assert.Equal(t, m2.AsRaw(), m.AsRaw()) + assert.Panics(t, func() { NewMap().CopyTo(m) }) + + assert.Equal(t, map[string]any{"k1": "v1"}, m.AsRaw()) + assert.Panics(t, func() { _ = m.FromRaw(map[string]any{"k1": "v1"}) }) +} + func TestMapPutEmpty(t *testing.T) { m := NewMap() v := m.PutEmpty("k1") @@ -148,7 +187,8 @@ func TestMapWithEmpty(t *testing.T) { Value: otlpcommon.AnyValue{Value: nil}, }, } - sm := newMap(&origWithNil) + state := internal.StateMutable + sm := newMap(&origWithNil, &state) val, exist := sm.Get("test_key") assert.True(t, exist) assert.EqualValues(t, ValueTypeStr, val.Type()) @@ -249,7 +289,7 @@ func TestMapWithEmpty(t *testing.T) { } func TestMapIterationNil(t *testing.T) { - NewMap().Range(func(k string, v Value) bool { + NewMap().Range(func(string, Value) bool { // Fail if any element is returned t.Fail() return true @@ -269,7 +309,7 @@ func TestMap_Range(t *testing.T) { assert.Equal(t, 5, am.Len()) calls := 0 - am.Range(func(k string, v Value) bool { + am.Range(func(string, Value) bool { calls++ return false }) @@ -479,3 +519,30 @@ func generateTestBytesMap(t *testing.T) Map { assert.NoError(t, m.FromRaw(map[string]any{"k": []byte{1, 2, 3, 4, 5}})) return m } + +func TestInvalidMap(t *testing.T) { + v := Map{} + + testFunc := func(string, Value) bool { + return true + } + + assert.Panics(t, func() { v.Clear() }) + assert.Panics(t, func() { v.EnsureCapacity(1) }) + assert.Panics(t, func() { v.Get("foo") }) + assert.Panics(t, func() { v.Remove("foo") }) + assert.Panics(t, func() { v.RemoveIf(testFunc) }) + assert.Panics(t, func() { v.PutEmpty("foo") }) + assert.Panics(t, func() { v.PutStr("foo", "bar") }) + assert.Panics(t, func() { v.PutInt("foo", 1) }) + assert.Panics(t, func() { v.PutDouble("foo", 1.1) }) + assert.Panics(t, func() { v.PutBool("foo", true) }) + assert.Panics(t, func() { v.PutEmptyBytes("foo") }) + assert.Panics(t, func() { v.PutEmptyMap("foo") }) + assert.Panics(t, func() { v.PutEmptySlice("foo") }) + assert.Panics(t, func() { v.Len() }) + assert.Panics(t, func() { v.Range(testFunc) }) + assert.Panics(t, func() { v.CopyTo(NewMap()) }) + assert.Panics(t, func() { v.AsRaw() }) + assert.Panics(t, func() { _ = v.FromRaw(map[string]any{"foo": "bar"}) }) +} diff --git a/pdata/pcommon/package_test.go b/pdata/pcommon/package_test.go new file mode 100644 index 00000000000..fee39a8a49b --- /dev/null +++ b/pdata/pcommon/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package pcommon + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pdata/pcommon/slice.go b/pdata/pcommon/slice.go index 97e0cf777d1..7434f467aed 100644 --- a/pdata/pcommon/slice.go +++ b/pdata/pcommon/slice.go @@ -19,19 +19,24 @@ import ( // Important: zero-initialized instance is not valid for use. type Slice internal.Slice -func newSlice(orig *[]otlpcommon.AnyValue) Slice { - return Slice(internal.NewSlice(orig)) +func newSlice(orig *[]otlpcommon.AnyValue, state *internal.State) Slice { + return Slice(internal.NewSlice(orig, state)) } func (es Slice) getOrig() *[]otlpcommon.AnyValue { return internal.GetOrigSlice(internal.Slice(es)) } +func (es Slice) getState() *internal.State { + return internal.GetSliceState(internal.Slice(es)) +} + // NewSlice creates a Slice with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewSlice() Slice { orig := []otlpcommon.AnyValue(nil) - return Slice(internal.NewSlice(&orig)) + state := internal.StateMutable + return Slice(internal.NewSlice(&orig, &state)) } // Len returns the number of elements in the slice. @@ -50,11 +55,12 @@ func (es Slice) Len() int { // ... // Do something with the element // } func (es Slice) At(ix int) Value { - return newValue(&(*es.getOrig())[ix]) + return newValue(&(*es.getOrig())[ix], es.getState()) } // CopyTo copies all elements from the current slice overriding the destination. func (es Slice) CopyTo(dest Slice) { + dest.getState().AssertMutable() srcLen := es.Len() destCap := cap(*dest.getOrig()) if srcLen <= destCap { @@ -64,7 +70,7 @@ func (es Slice) CopyTo(dest Slice) { } for i := range *es.getOrig() { - newValue(&(*es.getOrig())[i]).CopyTo(newValue(&(*dest.getOrig())[i])) + newValue(&(*es.getOrig())[i], es.getState()).CopyTo(newValue(&(*dest.getOrig())[i], dest.getState())) } } @@ -81,6 +87,7 @@ func (es Slice) CopyTo(dest Slice) { // // Here should set all the values for e. // } func (es Slice) EnsureCapacity(newCap int) { + es.getState().AssertMutable() oldCap := cap(*es.getOrig()) if newCap <= oldCap { return @@ -94,6 +101,7 @@ func (es Slice) EnsureCapacity(newCap int) { // AppendEmpty will append to the end of the slice an empty Value. // It returns the newly added Value. func (es Slice) AppendEmpty() Value { + es.getState().AssertMutable() *es.getOrig() = append(*es.getOrig(), otlpcommon.AnyValue{}) return es.At(es.Len() - 1) } @@ -101,6 +109,8 @@ func (es Slice) AppendEmpty() Value { // MoveAndAppendTo moves all elements from the current slice and appends them to the dest. // The current slice will be cleared. func (es Slice) MoveAndAppendTo(dest Slice) { + es.getState().AssertMutable() + dest.getState().AssertMutable() if *dest.getOrig() == nil { // We can simply move the entire vector and avoid any allocations. *dest.getOrig() = *es.getOrig() @@ -113,6 +123,7 @@ func (es Slice) MoveAndAppendTo(dest Slice) { // RemoveIf calls f sequentially for each element present in the slice. // If f returns true, the element is removed from the slice. func (es Slice) RemoveIf(f func(Value) bool) { + es.getState().AssertMutable() newLen := 0 for i := 0; i < len(*es.getOrig()); i++ { if f(es.At(i)) { @@ -126,7 +137,6 @@ func (es Slice) RemoveIf(f func(Value) bool) { (*es.getOrig())[newLen] = (*es.getOrig())[i] newLen++ } - // TODO: Prevent memory leak by erasing truncated values. *es.getOrig() = (*es.getOrig())[:newLen] } @@ -141,6 +151,7 @@ func (es Slice) AsRaw() []any { // FromRaw copies []any into the Slice. func (es Slice) FromRaw(rawSlice []any) error { + es.getState().AssertMutable() if len(rawSlice) == 0 { *es.getOrig() = nil return nil @@ -148,7 +159,7 @@ func (es Slice) FromRaw(rawSlice []any) error { var errs error origs := make([]otlpcommon.AnyValue, len(rawSlice)) for ix, iv := range rawSlice { - errs = multierr.Append(errs, newValue(&origs[ix]).FromRaw(iv)) + errs = multierr.Append(errs, newValue(&origs[ix], es.getState()).FromRaw(iv)) } *es.getOrig() = origs return errs diff --git a/pdata/pcommon/slice_test.go b/pdata/pcommon/slice_test.go index 181ab8fc433..705f10f88e7 100644 --- a/pdata/pcommon/slice_test.go +++ b/pdata/pcommon/slice_test.go @@ -15,11 +15,12 @@ import ( func TestSlice(t *testing.T) { es := NewSlice() assert.Equal(t, 0, es.Len()) - es = newSlice(&[]otlpcommon.AnyValue{}) + state := internal.StateMutable + es = newSlice(&[]otlpcommon.AnyValue{}, &state) assert.Equal(t, 0, es.Len()) es.EnsureCapacity(7) - emptyVal := newValue(&otlpcommon.AnyValue{}) + emptyVal := newValue(&otlpcommon.AnyValue{}, &state) testVal := Value(internal.GenerateTestValue()) assert.Equal(t, 7, cap(*es.getOrig())) for i := 0; i < es.Len(); i++ { @@ -30,6 +31,29 @@ func TestSlice(t *testing.T) { } } +func TestSliceReadOnly(t *testing.T) { + state := internal.StateReadOnly + es := newSlice(&[]otlpcommon.AnyValue{{Value: &otlpcommon.AnyValue_IntValue{IntValue: 3}}}, &state) + + assert.Equal(t, 1, es.Len()) + assert.Equal(t, int64(3), es.At(0).Int()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + + es2 := NewSlice() + es.CopyTo(es2) + assert.Equal(t, es.AsRaw(), es2.AsRaw()) + assert.Panics(t, func() { es2.CopyTo(es) }) + + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) + + assert.Panics(t, func() { es.RemoveIf(func(Value) bool { return false }) }) + + assert.Equal(t, []any{int64(3)}, es.AsRaw()) + assert.Panics(t, func() { _ = es.FromRaw([]any{3}) }) +} + func TestSlice_CopyTo(t *testing.T) { dest := NewSlice() // Test CopyTo to empty @@ -98,7 +122,7 @@ func TestSlice_MoveAndAppendTo(t *testing.T) { func TestSlice_RemoveIf(t *testing.T) { // Test RemoveIf on empty slice emptySlice := NewSlice() - emptySlice.RemoveIf(func(el Value) bool { + emptySlice.RemoveIf(func(Value) bool { t.Fail() return false }) @@ -106,9 +130,23 @@ func TestSlice_RemoveIf(t *testing.T) { // Test RemoveIf filtered := Slice(internal.GenerateTestSlice()) pos := 0 - filtered.RemoveIf(func(el Value) bool { + filtered.RemoveIf(func(Value) bool { pos++ return pos%3 == 0 }) assert.Equal(t, 5, filtered.Len()) } + +func TestInvalidSlice(t *testing.T) { + es := Slice{} + + assert.Panics(t, func() { es.Len() }) + assert.Panics(t, func() { es.At(0) }) + assert.Panics(t, func() { es.CopyTo(Slice{}) }) + assert.Panics(t, func() { es.EnsureCapacity(1) }) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.MoveAndAppendTo(Slice{}) }) + assert.Panics(t, func() { es.RemoveIf(func(Value) bool { return false }) }) + assert.Panics(t, func() { es.AsRaw() }) + assert.Panics(t, func() { _ = es.FromRaw([]any{3}) }) +} diff --git a/pdata/pcommon/trace_state.go b/pdata/pcommon/trace_state.go index 440b4b1ade5..c8f84217e0d 100644 --- a/pdata/pcommon/trace_state.go +++ b/pdata/pcommon/trace_state.go @@ -8,16 +8,24 @@ import ( ) // TraceState represents the trace state from the w3c-trace-context. +// +// Must use NewTraceState function to create new instances. +// Important: zero-initialized instance is not valid for use. type TraceState internal.TraceState func NewTraceState() TraceState { - return TraceState(internal.NewTraceState(new(string))) + state := internal.StateMutable + return TraceState(internal.NewTraceState(new(string), &state)) } func (ms TraceState) getOrig() *string { return internal.GetOrigTraceState(internal.TraceState(ms)) } +func (ms TraceState) getState() *internal.State { + return internal.GetTraceStateState(internal.TraceState(ms)) +} + // AsRaw returns the string representation of the tracestate in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header func (ms TraceState) AsRaw() string { return *ms.getOrig() @@ -25,17 +33,21 @@ func (ms TraceState) AsRaw() string { // FromRaw copies the string representation in w3c-trace-context format of the tracestate into this TraceState. func (ms TraceState) FromRaw(v string) { + ms.getState().AssertMutable() *ms.getOrig() = v } // MoveTo moves the TraceState instance overriding the destination // and resetting the current instance to its zero value. func (ms TraceState) MoveTo(dest TraceState) { + ms.getState().AssertMutable() + dest.getState().AssertMutable() *dest.getOrig() = *ms.getOrig() *ms.getOrig() = "" } // CopyTo copies the TraceState instance overriding the destination. func (ms TraceState) CopyTo(dest TraceState) { + dest.getState().AssertMutable() *dest.getOrig() = *ms.getOrig() } diff --git a/pdata/pcommon/trace_state_test.go b/pdata/pcommon/trace_state_test.go index 74627a70c39..4e56dffa119 100644 --- a/pdata/pcommon/trace_state_test.go +++ b/pdata/pcommon/trace_state_test.go @@ -35,3 +35,12 @@ func TestTraceState_FromRaw_AsRaw(t *testing.T) { ms.FromRaw("congo=t61rcWkgMzE") assert.Equal(t, "congo=t61rcWkgMzE", ms.AsRaw()) } + +func TestInvalidTraceState(t *testing.T) { + v := TraceState{} + + assert.Panics(t, func() { v.AsRaw() }) + assert.Panics(t, func() { v.FromRaw("") }) + assert.Panics(t, func() { v.MoveTo(TraceState{}) }) + assert.Panics(t, func() { v.CopyTo(TraceState{}) }) +} diff --git a/pdata/pcommon/value.go b/pdata/pcommon/value.go index f59b708695f..77a84e51758 100644 --- a/pdata/pcommon/value.go +++ b/pdata/pcommon/value.go @@ -71,52 +71,66 @@ type Value internal.Value // NewValueEmpty creates a new Value with an empty value. func NewValueEmpty() Value { - return newValue(&otlpcommon.AnyValue{}) + state := internal.StateMutable + return newValue(&otlpcommon.AnyValue{}, &state) } // NewValueStr creates a new Value with the given string value. func NewValueStr(v string) Value { - return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_StringValue{StringValue: v}}) + state := internal.StateMutable + return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_StringValue{StringValue: v}}, &state) } // NewValueInt creates a new Value with the given int64 value. func NewValueInt(v int64) Value { - return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_IntValue{IntValue: v}}) + state := internal.StateMutable + return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_IntValue{IntValue: v}}, &state) } // NewValueDouble creates a new Value with the given float64 value. func NewValueDouble(v float64) Value { - return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_DoubleValue{DoubleValue: v}}) + state := internal.StateMutable + return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_DoubleValue{DoubleValue: v}}, &state) } // NewValueBool creates a new Value with the given bool value. func NewValueBool(v bool) Value { - return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_BoolValue{BoolValue: v}}) + state := internal.StateMutable + return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_BoolValue{BoolValue: v}}, &state) } // NewValueMap creates a new Value of map type. func NewValueMap() Value { - return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_KvlistValue{KvlistValue: &otlpcommon.KeyValueList{}}}) + state := internal.StateMutable + return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_KvlistValue{KvlistValue: &otlpcommon.KeyValueList{}}}, &state) } // NewValueSlice creates a new Value of array type. func NewValueSlice() Value { - return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_ArrayValue{ArrayValue: &otlpcommon.ArrayValue{}}}) + state := internal.StateMutable + return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_ArrayValue{ArrayValue: &otlpcommon.ArrayValue{}}}, &state) } // NewValueBytes creates a new empty Value of byte type. func NewValueBytes() Value { - return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_BytesValue{BytesValue: nil}}) + state := internal.StateMutable + return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_BytesValue{BytesValue: nil}}, &state) } -func newValue(orig *otlpcommon.AnyValue) Value { - return Value(internal.NewValue(orig)) +func newValue(orig *otlpcommon.AnyValue, state *internal.State) Value { + return Value(internal.NewValue(orig, state)) } func (v Value) getOrig() *otlpcommon.AnyValue { return internal.GetOrigValue(internal.Value(v)) } +func (v Value) getState() *internal.State { + return internal.GetValueState(internal.Value(v)) +} + +// FromRaw sets the value from the given raw value. +// Calling this function on zero-initialized Value will cause a panic. func (v Value) FromRaw(iv any) error { switch tv := iv.(type) { case nil: @@ -186,69 +200,59 @@ func (v Value) Type() ValueType { // Str returns the string value associated with this Value. // The shorter name is used instead of String to avoid implementing fmt.Stringer interface. // If the Type() is not ValueTypeStr then returns empty string. -// Calling this function on zero-initialized Value will cause a panic. func (v Value) Str() string { return v.getOrig().GetStringValue() } // Int returns the int64 value associated with this Value. // If the Type() is not ValueTypeInt then returns int64(0). -// Calling this function on zero-initialized Value will cause a panic. func (v Value) Int() int64 { return v.getOrig().GetIntValue() } // Double returns the float64 value associated with this Value. // If the Type() is not ValueTypeDouble then returns float64(0). -// Calling this function on zero-initialized Value will cause a panic. func (v Value) Double() float64 { return v.getOrig().GetDoubleValue() } // Bool returns the bool value associated with this Value. // If the Type() is not ValueTypeBool then returns false. -// Calling this function on zero-initialized Value will cause a panic. func (v Value) Bool() bool { return v.getOrig().GetBoolValue() } // Map returns the map value associated with this Value. -// If the Type() is not ValueTypeMap then returns an invalid map. Note that using -// such map can cause panic. -// -// Calling this function on zero-initialized Value will cause a panic. +// If the function is called on zero-initialized Value or if the Type() is not ValueTypeMap +// then it returns an invalid map. Note that using such map can cause panic. func (v Value) Map() Map { kvlist := v.getOrig().GetKvlistValue() if kvlist == nil { return Map{} } - return newMap(&kvlist.Values) + return newMap(&kvlist.Values, internal.GetValueState(internal.Value(v))) } // Slice returns the slice value associated with this Value. -// If the Type() is not ValueTypeSlice then returns an invalid slice. Note that using -// such slice can cause panic. -// -// Calling this function on zero-initialized Value will cause a panic. +// If the function is called on zero-initialized Value or if the Type() is not ValueTypeSlice +// then returns an invalid slice. Note that using such slice can cause panic. func (v Value) Slice() Slice { arr := v.getOrig().GetArrayValue() if arr == nil { return Slice{} } - return newSlice(&arr.Values) + return newSlice(&arr.Values, internal.GetValueState(internal.Value(v))) } // Bytes returns the ByteSlice value associated with this Value. -// If the Type() is not ValueTypeBytes then returns an invalid ByteSlice object. Note that using -// such slice can cause panic. -// -// Calling this function on zero-initialized Value will cause a panic. +// If the function is called on zero-initialized Value or if the Type() is not ValueTypeBytes +// then returns an invalid ByteSlice object. Note that using such slice can cause panic. func (v Value) Bytes() ByteSlice { bv, ok := v.getOrig().GetValue().(*otlpcommon.AnyValue_BytesValue) if !ok { return ByteSlice{} } - return ByteSlice(internal.NewByteSlice(&bv.BytesValue)) + return ByteSlice(internal.NewByteSlice(&bv.BytesValue, internal.GetValueState(internal.Value(v)))) } // SetStr replaces the string value associated with this Value, @@ -257,6 +261,7 @@ func (v Value) Bytes() ByteSlice { // fmt.Stringer interface by the corresponding getter method. // Calling this function on zero-initialized Value will cause a panic. func (v Value) SetStr(sv string) { + v.getState().AssertMutable() v.getOrig().Value = &otlpcommon.AnyValue_StringValue{StringValue: sv} } @@ -264,6 +269,7 @@ func (v Value) SetStr(sv string) { // it also changes the type to be ValueTypeInt. // Calling this function on zero-initialized Value will cause a panic. func (v Value) SetInt(iv int64) { + v.getState().AssertMutable() v.getOrig().Value = &otlpcommon.AnyValue_IntValue{IntValue: iv} } @@ -271,6 +277,7 @@ func (v Value) SetInt(iv int64) { // it also changes the type to be ValueTypeDouble. // Calling this function on zero-initialized Value will cause a panic. func (v Value) SetDouble(dv float64) { + v.getState().AssertMutable() v.getOrig().Value = &otlpcommon.AnyValue_DoubleValue{DoubleValue: dv} } @@ -278,35 +285,41 @@ func (v Value) SetDouble(dv float64) { // it also changes the type to be ValueTypeBool. // Calling this function on zero-initialized Value will cause a panic. func (v Value) SetBool(bv bool) { + v.getState().AssertMutable() v.getOrig().Value = &otlpcommon.AnyValue_BoolValue{BoolValue: bv} } // SetEmptyBytes sets value to an empty byte slice and returns it. // Calling this function on zero-initialized Value will cause a panic. func (v Value) SetEmptyBytes() ByteSlice { + v.getState().AssertMutable() bv := otlpcommon.AnyValue_BytesValue{BytesValue: nil} v.getOrig().Value = &bv - return ByteSlice(internal.NewByteSlice(&bv.BytesValue)) + return ByteSlice(internal.NewByteSlice(&bv.BytesValue, v.getState())) } // SetEmptyMap sets value to an empty map and returns it. // Calling this function on zero-initialized Value will cause a panic. func (v Value) SetEmptyMap() Map { + v.getState().AssertMutable() kv := &otlpcommon.AnyValue_KvlistValue{KvlistValue: &otlpcommon.KeyValueList{}} v.getOrig().Value = kv - return newMap(&kv.KvlistValue.Values) + return newMap(&kv.KvlistValue.Values, v.getState()) } // SetEmptySlice sets value to an empty slice and returns it. // Calling this function on zero-initialized Value will cause a panic. func (v Value) SetEmptySlice() Slice { + v.getState().AssertMutable() av := &otlpcommon.AnyValue_ArrayValue{ArrayValue: &otlpcommon.ArrayValue{}} v.getOrig().Value = av - return newSlice(&av.ArrayValue.Values) + return newSlice(&av.ArrayValue.Values, v.getState()) } // CopyTo copies the Value instance overriding the destination. +// Calling this function on zero-initialized Value will cause a panic. func (v Value) CopyTo(dest Value) { + dest.getState().AssertMutable() destOrig := dest.getOrig() switch ov := v.getOrig().Value.(type) { case *otlpcommon.AnyValue_KvlistValue: @@ -320,7 +333,7 @@ func (v Value) CopyTo(dest Value) { return } // Deep copy to dest. - newMap(&ov.KvlistValue.Values).CopyTo(newMap(&kv.KvlistValue.Values)) + newMap(&ov.KvlistValue.Values, v.getState()).CopyTo(newMap(&kv.KvlistValue.Values, dest.getState())) case *otlpcommon.AnyValue_ArrayValue: av, ok := destOrig.Value.(*otlpcommon.AnyValue_ArrayValue) if !ok { @@ -332,7 +345,7 @@ func (v Value) CopyTo(dest Value) { return } // Deep copy to dest. - newSlice(&ov.ArrayValue.Values).CopyTo(newSlice(&av.ArrayValue.Values)) + newSlice(&ov.ArrayValue.Values, v.getState()).CopyTo(newSlice(&av.ArrayValue.Values, dest.getState())) case *otlpcommon.AnyValue_BytesValue: bv, ok := destOrig.Value.(*otlpcommon.AnyValue_BytesValue) if !ok { @@ -350,6 +363,7 @@ func (v Value) CopyTo(dest Value) { // AsString converts an OTLP Value object of any type to its equivalent string // representation. This differs from Str which only returns a non-empty value // if the ValueType is ValueTypeStr. +// Calling this function on zero-initialized Value will cause a panic. func (v Value) AsString() string { switch v.Type() { case ValueTypeEmpty: @@ -438,28 +452,32 @@ func (v Value) AsRaw() any { func newKeyValueString(k string, v string) otlpcommon.KeyValue { orig := otlpcommon.KeyValue{Key: k} - akv := newValue(&orig.Value) + state := internal.StateMutable + akv := newValue(&orig.Value, &state) akv.SetStr(v) return orig } func newKeyValueInt(k string, v int64) otlpcommon.KeyValue { orig := otlpcommon.KeyValue{Key: k} - akv := newValue(&orig.Value) + state := internal.StateMutable + akv := newValue(&orig.Value, &state) akv.SetInt(v) return orig } func newKeyValueDouble(k string, v float64) otlpcommon.KeyValue { orig := otlpcommon.KeyValue{Key: k} - akv := newValue(&orig.Value) + state := internal.StateMutable + akv := newValue(&orig.Value, &state) akv.SetDouble(v) return orig } func newKeyValueBool(k string, v bool) otlpcommon.KeyValue { orig := otlpcommon.KeyValue{Key: k} - akv := newValue(&orig.Value) + state := internal.StateMutable + akv := newValue(&orig.Value, &state) akv.SetBool(v) return orig } diff --git a/pdata/pcommon/value_test.go b/pdata/pcommon/value_test.go index 1a4ed8fea4d..920bd0b6e96 100644 --- a/pdata/pcommon/value_test.go +++ b/pdata/pcommon/value_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/pdata/internal" otlpcommon "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" ) @@ -44,6 +45,36 @@ func TestValue(t *testing.T) { assert.EqualValues(t, ValueTypeSlice, v.Type()) } +func TestValueReadOnly(t *testing.T) { + state := internal.StateReadOnly + v := newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_StringValue{StringValue: "v"}}, &state) + + assert.EqualValues(t, ValueTypeStr, v.Type()) + assert.EqualValues(t, "v", v.Str()) + assert.EqualValues(t, 0, v.Int()) + assert.EqualValues(t, 0, v.Double()) + assert.False(t, v.Bool()) + assert.EqualValues(t, ByteSlice{}, v.Bytes()) + assert.EqualValues(t, Map{}, v.Map()) + assert.EqualValues(t, Slice{}, v.Slice()) + + assert.EqualValues(t, "v", v.AsString()) + + assert.Panics(t, func() { v.SetStr("abc") }) + assert.Panics(t, func() { v.SetInt(123) }) + assert.Panics(t, func() { v.SetDouble(3.4) }) + assert.Panics(t, func() { v.SetBool(true) }) + assert.Panics(t, func() { v.SetEmptyBytes() }) + assert.Panics(t, func() { v.SetEmptyMap() }) + assert.Panics(t, func() { v.SetEmptySlice() }) + + v2 := NewValueEmpty() + v.CopyTo(v2) + assert.Equal(t, v.AsRaw(), v2.AsRaw()) + assert.Panics(t, func() { v2.CopyTo(v) }) + +} + func TestValueType(t *testing.T) { assert.EqualValues(t, "Empty", ValueTypeEmpty.String()) assert.EqualValues(t, "Str", ValueTypeStr.String()) @@ -128,7 +159,8 @@ func TestValueMap(t *testing.T) { // Test nil KvlistValue case for Map() func. orig := &otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_KvlistValue{KvlistValue: nil}} - m1 = newValue(orig) + state := internal.StateMutable + m1 = newValue(orig, &state) assert.EqualValues(t, Map{}, m1.Map()) } @@ -165,8 +197,9 @@ func TestValueSlice(t *testing.T) { assert.EqualValues(t, "somestr", v.Str()) // Test nil values case for Slice() func. - a1 = newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_ArrayValue{ArrayValue: nil}}) - assert.EqualValues(t, newSlice(nil), a1.Slice()) + state := internal.StateMutable + a1 = newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_ArrayValue{ArrayValue: nil}}, &state) + assert.EqualValues(t, newSlice(nil, nil), a1.Slice()) } func TestNilOrigSetValue(t *testing.T) { @@ -200,26 +233,28 @@ func TestNilOrigSetValue(t *testing.T) { } func TestValue_CopyTo(t *testing.T) { + state := internal.StateMutable + // Test nil KvlistValue case for Map() func. dest := NewValueEmpty() orig := &otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_KvlistValue{KvlistValue: nil}} - newValue(orig).CopyTo(dest) + newValue(orig, &state).CopyTo(dest) assert.Nil(t, dest.getOrig().Value.(*otlpcommon.AnyValue_KvlistValue).KvlistValue) // Test nil ArrayValue case for Slice() func. dest = NewValueEmpty() orig = &otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_ArrayValue{ArrayValue: nil}} - newValue(orig).CopyTo(dest) + newValue(orig, &state).CopyTo(dest) assert.Nil(t, dest.getOrig().Value.(*otlpcommon.AnyValue_ArrayValue).ArrayValue) // Test copy empty value. orig = &otlpcommon.AnyValue{} - newValue(orig).CopyTo(dest) + newValue(orig, &state).CopyTo(dest) assert.Nil(t, dest.getOrig().Value) av := NewValueEmpty() destVal := otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_IntValue{}} - av.CopyTo(newValue(&destVal)) + av.CopyTo(newValue(&destVal, &state)) assert.EqualValues(t, nil, destVal.Value) } @@ -228,7 +263,8 @@ func TestSliceWithNilValues(t *testing.T) { {}, {Value: &otlpcommon.AnyValue_StringValue{StringValue: "test_value"}}, } - sm := newSlice(&origWithNil) + state := internal.StateMutable + sm := newSlice(&origWithNil, &state) val := sm.At(0) assert.EqualValues(t, ValueTypeEmpty, val.Type()) @@ -520,6 +556,29 @@ func TestNewValueFromRawInvalid(t *testing.T) { assert.EqualError(t, actual.FromRaw(ValueTypeDouble), "") } +func TestInvalidValue(t *testing.T) { + v := Value{} + assert.Equal(t, false, v.Bool()) + assert.Equal(t, int64(0), v.Int()) + assert.Equal(t, float64(0), v.Double()) + assert.Equal(t, "", v.Str()) + assert.Equal(t, ByteSlice{}, v.Bytes()) + assert.Equal(t, Map{}, v.Map()) + assert.Equal(t, Slice{}, v.Slice()) + assert.Panics(t, func() { v.AsString() }) + assert.Panics(t, func() { v.AsRaw() }) + assert.Panics(t, func() { _ = v.FromRaw(1) }) + assert.Panics(t, func() { v.Type() }) + assert.Panics(t, func() { v.SetStr("") }) + assert.Panics(t, func() { v.SetInt(0) }) + assert.Panics(t, func() { v.SetDouble(0) }) + assert.Panics(t, func() { v.SetBool(false) }) + assert.Panics(t, func() { v.SetEmptyBytes() }) + assert.Panics(t, func() { v.SetEmptyMap() }) + assert.Panics(t, func() { v.SetEmptySlice() }) + assert.Panics(t, func() { v.CopyTo(NewValueEmpty()) }) +} + func generateTestValueMap() Value { ret := NewValueMap() attrMap := ret.Map() diff --git a/pdata/plog/generated_logrecord.go b/pdata/plog/generated_logrecord.go index a20f3027b0b..5e9984a244c 100644 --- a/pdata/plog/generated_logrecord.go +++ b/pdata/plog/generated_logrecord.go @@ -21,11 +21,12 @@ import ( // Must use NewLogRecord function to create new instances. // Important: zero-initialized instance is not valid for use. type LogRecord struct { - orig *otlplogs.LogRecord + orig *otlplogs.LogRecord + state *internal.State } -func newLogRecord(orig *otlplogs.LogRecord) LogRecord { - return LogRecord{orig} +func newLogRecord(orig *otlplogs.LogRecord, state *internal.State) LogRecord { + return LogRecord{orig: orig, state: state} } // NewLogRecord creates a new empty LogRecord. @@ -33,12 +34,15 @@ func newLogRecord(orig *otlplogs.LogRecord) LogRecord { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewLogRecord() LogRecord { - return newLogRecord(&otlplogs.LogRecord{}) + state := internal.StateMutable + return newLogRecord(&otlplogs.LogRecord{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms LogRecord) MoveTo(dest LogRecord) { + ms.state.AssertMutable() + dest.state.AssertMutable() *dest.orig = *ms.orig *ms.orig = otlplogs.LogRecord{} } @@ -50,6 +54,7 @@ func (ms LogRecord) ObservedTimestamp() pcommon.Timestamp { // SetObservedTimestamp replaces the observedtimestamp associated with this LogRecord. func (ms LogRecord) SetObservedTimestamp(v pcommon.Timestamp) { + ms.state.AssertMutable() ms.orig.ObservedTimeUnixNano = uint64(v) } @@ -60,6 +65,7 @@ func (ms LogRecord) Timestamp() pcommon.Timestamp { // SetTimestamp replaces the timestamp associated with this LogRecord. func (ms LogRecord) SetTimestamp(v pcommon.Timestamp) { + ms.state.AssertMutable() ms.orig.TimeUnixNano = uint64(v) } @@ -70,6 +76,7 @@ func (ms LogRecord) TraceID() pcommon.TraceID { // SetTraceID replaces the traceid associated with this LogRecord. func (ms LogRecord) SetTraceID(v pcommon.TraceID) { + ms.state.AssertMutable() ms.orig.TraceId = data.TraceID(v) } @@ -80,6 +87,7 @@ func (ms LogRecord) SpanID() pcommon.SpanID { // SetSpanID replaces the spanid associated with this LogRecord. func (ms LogRecord) SetSpanID(v pcommon.SpanID) { + ms.state.AssertMutable() ms.orig.SpanId = data.SpanID(v) } @@ -90,6 +98,7 @@ func (ms LogRecord) Flags() LogRecordFlags { // SetFlags replaces the flags associated with this LogRecord. func (ms LogRecord) SetFlags(v LogRecordFlags) { + ms.state.AssertMutable() ms.orig.Flags = uint32(v) } @@ -100,6 +109,7 @@ func (ms LogRecord) SeverityText() string { // SetSeverityText replaces the severitytext associated with this LogRecord. func (ms LogRecord) SetSeverityText(v string) { + ms.state.AssertMutable() ms.orig.SeverityText = v } @@ -110,17 +120,18 @@ func (ms LogRecord) SeverityNumber() SeverityNumber { // SetSeverityNumber replaces the severitynumber associated with this LogRecord. func (ms LogRecord) SetSeverityNumber(v SeverityNumber) { + ms.state.AssertMutable() ms.orig.SeverityNumber = otlplogs.SeverityNumber(v) } // Body returns the body associated with this LogRecord. func (ms LogRecord) Body() pcommon.Value { - return pcommon.Value(internal.NewValue(&ms.orig.Body)) + return pcommon.Value(internal.NewValue(&ms.orig.Body, ms.state)) } // Attributes returns the Attributes associated with this LogRecord. func (ms LogRecord) Attributes() pcommon.Map { - return pcommon.Map(internal.NewMap(&ms.orig.Attributes)) + return pcommon.Map(internal.NewMap(&ms.orig.Attributes, ms.state)) } // DroppedAttributesCount returns the droppedattributescount associated with this LogRecord. @@ -130,11 +141,13 @@ func (ms LogRecord) DroppedAttributesCount() uint32 { // SetDroppedAttributesCount replaces the droppedattributescount associated with this LogRecord. func (ms LogRecord) SetDroppedAttributesCount(v uint32) { + ms.state.AssertMutable() ms.orig.DroppedAttributesCount = v } // CopyTo copies all properties from the current struct overriding the destination. func (ms LogRecord) CopyTo(dest LogRecord) { + dest.state.AssertMutable() dest.SetObservedTimestamp(ms.ObservedTimestamp()) dest.SetTimestamp(ms.Timestamp()) dest.SetTraceID(ms.TraceID()) diff --git a/pdata/plog/generated_logrecord_test.go b/pdata/plog/generated_logrecord_test.go index 9ff261d1044..81447572ac3 100644 --- a/pdata/plog/generated_logrecord_test.go +++ b/pdata/plog/generated_logrecord_test.go @@ -23,6 +23,9 @@ func TestLogRecord_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewLogRecord(), ms) assert.Equal(t, generateTestLogRecord(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newLogRecord(&otlplogs.LogRecord{}, &sharedState)) }) + assert.Panics(t, func() { newLogRecord(&otlplogs.LogRecord{}, &sharedState).MoveTo(dest) }) } func TestLogRecord_CopyTo(t *testing.T) { @@ -33,6 +36,8 @@ func TestLogRecord_CopyTo(t *testing.T) { orig = generateTestLogRecord() orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newLogRecord(&otlplogs.LogRecord{}, &sharedState)) }) } func TestLogRecord_ObservedTimestamp(t *testing.T) { @@ -80,6 +85,8 @@ func TestLogRecord_SeverityText(t *testing.T) { assert.Equal(t, "", ms.SeverityText()) ms.SetSeverityText("INFO") assert.Equal(t, "INFO", ms.SeverityText()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newLogRecord(&otlplogs.LogRecord{}, &sharedState).SetSeverityText("INFO") }) } func TestLogRecord_SeverityNumber(t *testing.T) { @@ -108,6 +115,8 @@ func TestLogRecord_DroppedAttributesCount(t *testing.T) { assert.Equal(t, uint32(0), ms.DroppedAttributesCount()) ms.SetDroppedAttributesCount(uint32(17)) assert.Equal(t, uint32(17), ms.DroppedAttributesCount()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newLogRecord(&otlplogs.LogRecord{}, &sharedState).SetDroppedAttributesCount(uint32(17)) }) } func generateTestLogRecord() LogRecord { @@ -124,7 +133,7 @@ func fillTestLogRecord(tv LogRecord) { tv.orig.Flags = 1 tv.orig.SeverityText = "INFO" tv.orig.SeverityNumber = otlplogs.SeverityNumber(5) - internal.FillTestValue(internal.NewValue(&tv.orig.Body)) - internal.FillTestMap(internal.NewMap(&tv.orig.Attributes)) + internal.FillTestValue(internal.NewValue(&tv.orig.Body, tv.state)) + internal.FillTestMap(internal.NewMap(&tv.orig.Attributes, tv.state)) tv.orig.DroppedAttributesCount = uint32(17) } diff --git a/pdata/plog/generated_logrecordslice.go b/pdata/plog/generated_logrecordslice.go index 6c564822d6e..a900b4e1c7e 100644 --- a/pdata/plog/generated_logrecordslice.go +++ b/pdata/plog/generated_logrecordslice.go @@ -9,6 +9,7 @@ package plog import ( "sort" + "go.opentelemetry.io/collector/pdata/internal" otlplogs "go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1" ) @@ -20,18 +21,20 @@ import ( // Must use NewLogRecordSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type LogRecordSlice struct { - orig *[]*otlplogs.LogRecord + orig *[]*otlplogs.LogRecord + state *internal.State } -func newLogRecordSlice(orig *[]*otlplogs.LogRecord) LogRecordSlice { - return LogRecordSlice{orig} +func newLogRecordSlice(orig *[]*otlplogs.LogRecord, state *internal.State) LogRecordSlice { + return LogRecordSlice{orig: orig, state: state} } // NewLogRecordSlice creates a LogRecordSlice with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewLogRecordSlice() LogRecordSlice { orig := []*otlplogs.LogRecord(nil) - return newLogRecordSlice(&orig) + state := internal.StateMutable + return newLogRecordSlice(&orig, &state) } // Len returns the number of elements in the slice. @@ -50,7 +53,7 @@ func (es LogRecordSlice) Len() int { // ... // Do something with the element // } func (es LogRecordSlice) At(i int) LogRecord { - return newLogRecord((*es.orig)[i]) + return newLogRecord((*es.orig)[i], es.state) } // EnsureCapacity is an operation that ensures the slice has at least the specified capacity. @@ -66,6 +69,7 @@ func (es LogRecordSlice) At(i int) LogRecord { // // Here should set all the values for e. // } func (es LogRecordSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() oldCap := cap(*es.orig) if newCap <= oldCap { return @@ -79,6 +83,7 @@ func (es LogRecordSlice) EnsureCapacity(newCap int) { // AppendEmpty will append to the end of the slice an empty LogRecord. // It returns the newly added LogRecord. func (es LogRecordSlice) AppendEmpty() LogRecord { + es.state.AssertMutable() *es.orig = append(*es.orig, &otlplogs.LogRecord{}) return es.At(es.Len() - 1) } @@ -86,6 +91,8 @@ func (es LogRecordSlice) AppendEmpty() LogRecord { // MoveAndAppendTo moves all elements from the current slice and appends them to the dest. // The current slice will be cleared. func (es LogRecordSlice) MoveAndAppendTo(dest LogRecordSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() if *dest.orig == nil { // We can simply move the entire vector and avoid any allocations. *dest.orig = *es.orig @@ -98,6 +105,7 @@ func (es LogRecordSlice) MoveAndAppendTo(dest LogRecordSlice) { // RemoveIf calls f sequentially for each element present in the slice. // If f returns true, the element is removed from the slice. func (es LogRecordSlice) RemoveIf(f func(LogRecord) bool) { + es.state.AssertMutable() newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { @@ -111,18 +119,18 @@ func (es LogRecordSlice) RemoveIf(f func(LogRecord) bool) { (*es.orig)[newLen] = (*es.orig)[i] newLen++ } - // TODO: Prevent memory leak by erasing truncated values. *es.orig = (*es.orig)[:newLen] } // CopyTo copies all elements from the current slice overriding the destination. func (es LogRecordSlice) CopyTo(dest LogRecordSlice) { + dest.state.AssertMutable() srcLen := es.Len() destCap := cap(*dest.orig) if srcLen <= destCap { (*dest.orig) = (*dest.orig)[:srcLen:destCap] for i := range *es.orig { - newLogRecord((*es.orig)[i]).CopyTo(newLogRecord((*dest.orig)[i])) + newLogRecord((*es.orig)[i], es.state).CopyTo(newLogRecord((*dest.orig)[i], dest.state)) } return } @@ -130,7 +138,7 @@ func (es LogRecordSlice) CopyTo(dest LogRecordSlice) { wrappers := make([]*otlplogs.LogRecord, srcLen) for i := range *es.orig { wrappers[i] = &origs[i] - newLogRecord((*es.orig)[i]).CopyTo(newLogRecord(wrappers[i])) + newLogRecord((*es.orig)[i], es.state).CopyTo(newLogRecord(wrappers[i], dest.state)) } *dest.orig = wrappers } @@ -139,5 +147,6 @@ func (es LogRecordSlice) CopyTo(dest LogRecordSlice) { // provided less function so that two instances of LogRecordSlice // can be compared. func (es LogRecordSlice) Sort(less func(a, b LogRecord) bool) { + es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } diff --git a/pdata/plog/generated_logrecordslice_test.go b/pdata/plog/generated_logrecordslice_test.go index 183b88601b2..ff47a245987 100644 --- a/pdata/plog/generated_logrecordslice_test.go +++ b/pdata/plog/generated_logrecordslice_test.go @@ -12,13 +12,15 @@ import ( "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/internal" otlplogs "go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1" ) func TestLogRecordSlice(t *testing.T) { es := NewLogRecordSlice() assert.Equal(t, 0, es.Len()) - es = newLogRecordSlice(&[]*otlplogs.LogRecord{}) + state := internal.StateMutable + es = newLogRecordSlice(&[]*otlplogs.LogRecord{}, &state) assert.Equal(t, 0, es.Len()) emptyVal := NewLogRecord() @@ -32,6 +34,19 @@ func TestLogRecordSlice(t *testing.T) { assert.Equal(t, 7, es.Len()) } +func TestLogRecordSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newLogRecordSlice(&[]*otlplogs.LogRecord{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewLogRecordSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + func TestLogRecordSlice_CopyTo(t *testing.T) { dest := NewLogRecordSlice() // Test CopyTo to empty @@ -134,6 +149,6 @@ func fillTestLogRecordSlice(es LogRecordSlice) { *es.orig = make([]*otlplogs.LogRecord, 7) for i := 0; i < 7; i++ { (*es.orig)[i] = &otlplogs.LogRecord{} - fillTestLogRecord(newLogRecord((*es.orig)[i])) + fillTestLogRecord(newLogRecord((*es.orig)[i], es.state)) } } diff --git a/pdata/plog/generated_resourcelogs.go b/pdata/plog/generated_resourcelogs.go index 870d53a6373..1d240e03975 100644 --- a/pdata/plog/generated_resourcelogs.go +++ b/pdata/plog/generated_resourcelogs.go @@ -20,11 +20,12 @@ import ( // Must use NewResourceLogs function to create new instances. // Important: zero-initialized instance is not valid for use. type ResourceLogs struct { - orig *otlplogs.ResourceLogs + orig *otlplogs.ResourceLogs + state *internal.State } -func newResourceLogs(orig *otlplogs.ResourceLogs) ResourceLogs { - return ResourceLogs{orig} +func newResourceLogs(orig *otlplogs.ResourceLogs, state *internal.State) ResourceLogs { + return ResourceLogs{orig: orig, state: state} } // NewResourceLogs creates a new empty ResourceLogs. @@ -32,19 +33,22 @@ func newResourceLogs(orig *otlplogs.ResourceLogs) ResourceLogs { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewResourceLogs() ResourceLogs { - return newResourceLogs(&otlplogs.ResourceLogs{}) + state := internal.StateMutable + return newResourceLogs(&otlplogs.ResourceLogs{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms ResourceLogs) MoveTo(dest ResourceLogs) { + ms.state.AssertMutable() + dest.state.AssertMutable() *dest.orig = *ms.orig *ms.orig = otlplogs.ResourceLogs{} } // Resource returns the resource associated with this ResourceLogs. func (ms ResourceLogs) Resource() pcommon.Resource { - return pcommon.Resource(internal.NewResource(&ms.orig.Resource)) + return pcommon.Resource(internal.NewResource(&ms.orig.Resource, ms.state)) } // SchemaUrl returns the schemaurl associated with this ResourceLogs. @@ -54,16 +58,18 @@ func (ms ResourceLogs) SchemaUrl() string { // SetSchemaUrl replaces the schemaurl associated with this ResourceLogs. func (ms ResourceLogs) SetSchemaUrl(v string) { + ms.state.AssertMutable() ms.orig.SchemaUrl = v } // ScopeLogs returns the ScopeLogs associated with this ResourceLogs. func (ms ResourceLogs) ScopeLogs() ScopeLogsSlice { - return newScopeLogsSlice(&ms.orig.ScopeLogs) + return newScopeLogsSlice(&ms.orig.ScopeLogs, ms.state) } // CopyTo copies all properties from the current struct overriding the destination. func (ms ResourceLogs) CopyTo(dest ResourceLogs) { + dest.state.AssertMutable() ms.Resource().CopyTo(dest.Resource()) dest.SetSchemaUrl(ms.SchemaUrl()) ms.ScopeLogs().CopyTo(dest.ScopeLogs()) diff --git a/pdata/plog/generated_resourcelogs_test.go b/pdata/plog/generated_resourcelogs_test.go index c0c051ba292..8f705a26816 100644 --- a/pdata/plog/generated_resourcelogs_test.go +++ b/pdata/plog/generated_resourcelogs_test.go @@ -12,6 +12,7 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/pdata/internal" + otlplogs "go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1" "go.opentelemetry.io/collector/pdata/pcommon" ) @@ -21,6 +22,9 @@ func TestResourceLogs_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewResourceLogs(), ms) assert.Equal(t, generateTestResourceLogs(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newResourceLogs(&otlplogs.ResourceLogs{}, &sharedState)) }) + assert.Panics(t, func() { newResourceLogs(&otlplogs.ResourceLogs{}, &sharedState).MoveTo(dest) }) } func TestResourceLogs_CopyTo(t *testing.T) { @@ -31,6 +35,8 @@ func TestResourceLogs_CopyTo(t *testing.T) { orig = generateTestResourceLogs() orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newResourceLogs(&otlplogs.ResourceLogs{}, &sharedState)) }) } func TestResourceLogs_Resource(t *testing.T) { @@ -44,6 +50,10 @@ func TestResourceLogs_SchemaUrl(t *testing.T) { assert.Equal(t, "", ms.SchemaUrl()) ms.SetSchemaUrl("https://opentelemetry.io/schemas/1.5.0") assert.Equal(t, "https://opentelemetry.io/schemas/1.5.0", ms.SchemaUrl()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + newResourceLogs(&otlplogs.ResourceLogs{}, &sharedState).SetSchemaUrl("https://opentelemetry.io/schemas/1.5.0") + }) } func TestResourceLogs_ScopeLogs(t *testing.T) { @@ -60,7 +70,7 @@ func generateTestResourceLogs() ResourceLogs { } func fillTestResourceLogs(tv ResourceLogs) { - internal.FillTestResource(internal.NewResource(&tv.orig.Resource)) + internal.FillTestResource(internal.NewResource(&tv.orig.Resource, tv.state)) tv.orig.SchemaUrl = "https://opentelemetry.io/schemas/1.5.0" - fillTestScopeLogsSlice(newScopeLogsSlice(&tv.orig.ScopeLogs)) + fillTestScopeLogsSlice(newScopeLogsSlice(&tv.orig.ScopeLogs, tv.state)) } diff --git a/pdata/plog/generated_resourcelogsslice.go b/pdata/plog/generated_resourcelogsslice.go index 19bd2e58ddc..d2fc54de80b 100644 --- a/pdata/plog/generated_resourcelogsslice.go +++ b/pdata/plog/generated_resourcelogsslice.go @@ -9,6 +9,7 @@ package plog import ( "sort" + "go.opentelemetry.io/collector/pdata/internal" otlplogs "go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1" ) @@ -20,18 +21,20 @@ import ( // Must use NewResourceLogsSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type ResourceLogsSlice struct { - orig *[]*otlplogs.ResourceLogs + orig *[]*otlplogs.ResourceLogs + state *internal.State } -func newResourceLogsSlice(orig *[]*otlplogs.ResourceLogs) ResourceLogsSlice { - return ResourceLogsSlice{orig} +func newResourceLogsSlice(orig *[]*otlplogs.ResourceLogs, state *internal.State) ResourceLogsSlice { + return ResourceLogsSlice{orig: orig, state: state} } // NewResourceLogsSlice creates a ResourceLogsSlice with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewResourceLogsSlice() ResourceLogsSlice { orig := []*otlplogs.ResourceLogs(nil) - return newResourceLogsSlice(&orig) + state := internal.StateMutable + return newResourceLogsSlice(&orig, &state) } // Len returns the number of elements in the slice. @@ -50,7 +53,7 @@ func (es ResourceLogsSlice) Len() int { // ... // Do something with the element // } func (es ResourceLogsSlice) At(i int) ResourceLogs { - return newResourceLogs((*es.orig)[i]) + return newResourceLogs((*es.orig)[i], es.state) } // EnsureCapacity is an operation that ensures the slice has at least the specified capacity. @@ -66,6 +69,7 @@ func (es ResourceLogsSlice) At(i int) ResourceLogs { // // Here should set all the values for e. // } func (es ResourceLogsSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() oldCap := cap(*es.orig) if newCap <= oldCap { return @@ -79,6 +83,7 @@ func (es ResourceLogsSlice) EnsureCapacity(newCap int) { // AppendEmpty will append to the end of the slice an empty ResourceLogs. // It returns the newly added ResourceLogs. func (es ResourceLogsSlice) AppendEmpty() ResourceLogs { + es.state.AssertMutable() *es.orig = append(*es.orig, &otlplogs.ResourceLogs{}) return es.At(es.Len() - 1) } @@ -86,6 +91,8 @@ func (es ResourceLogsSlice) AppendEmpty() ResourceLogs { // MoveAndAppendTo moves all elements from the current slice and appends them to the dest. // The current slice will be cleared. func (es ResourceLogsSlice) MoveAndAppendTo(dest ResourceLogsSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() if *dest.orig == nil { // We can simply move the entire vector and avoid any allocations. *dest.orig = *es.orig @@ -98,6 +105,7 @@ func (es ResourceLogsSlice) MoveAndAppendTo(dest ResourceLogsSlice) { // RemoveIf calls f sequentially for each element present in the slice. // If f returns true, the element is removed from the slice. func (es ResourceLogsSlice) RemoveIf(f func(ResourceLogs) bool) { + es.state.AssertMutable() newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { @@ -111,18 +119,18 @@ func (es ResourceLogsSlice) RemoveIf(f func(ResourceLogs) bool) { (*es.orig)[newLen] = (*es.orig)[i] newLen++ } - // TODO: Prevent memory leak by erasing truncated values. *es.orig = (*es.orig)[:newLen] } // CopyTo copies all elements from the current slice overriding the destination. func (es ResourceLogsSlice) CopyTo(dest ResourceLogsSlice) { + dest.state.AssertMutable() srcLen := es.Len() destCap := cap(*dest.orig) if srcLen <= destCap { (*dest.orig) = (*dest.orig)[:srcLen:destCap] for i := range *es.orig { - newResourceLogs((*es.orig)[i]).CopyTo(newResourceLogs((*dest.orig)[i])) + newResourceLogs((*es.orig)[i], es.state).CopyTo(newResourceLogs((*dest.orig)[i], dest.state)) } return } @@ -130,7 +138,7 @@ func (es ResourceLogsSlice) CopyTo(dest ResourceLogsSlice) { wrappers := make([]*otlplogs.ResourceLogs, srcLen) for i := range *es.orig { wrappers[i] = &origs[i] - newResourceLogs((*es.orig)[i]).CopyTo(newResourceLogs(wrappers[i])) + newResourceLogs((*es.orig)[i], es.state).CopyTo(newResourceLogs(wrappers[i], dest.state)) } *dest.orig = wrappers } @@ -139,5 +147,6 @@ func (es ResourceLogsSlice) CopyTo(dest ResourceLogsSlice) { // provided less function so that two instances of ResourceLogsSlice // can be compared. func (es ResourceLogsSlice) Sort(less func(a, b ResourceLogs) bool) { + es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } diff --git a/pdata/plog/generated_resourcelogsslice_test.go b/pdata/plog/generated_resourcelogsslice_test.go index 3c4d2ba81fc..993a597f119 100644 --- a/pdata/plog/generated_resourcelogsslice_test.go +++ b/pdata/plog/generated_resourcelogsslice_test.go @@ -12,13 +12,15 @@ import ( "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/internal" otlplogs "go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1" ) func TestResourceLogsSlice(t *testing.T) { es := NewResourceLogsSlice() assert.Equal(t, 0, es.Len()) - es = newResourceLogsSlice(&[]*otlplogs.ResourceLogs{}) + state := internal.StateMutable + es = newResourceLogsSlice(&[]*otlplogs.ResourceLogs{}, &state) assert.Equal(t, 0, es.Len()) emptyVal := NewResourceLogs() @@ -32,6 +34,19 @@ func TestResourceLogsSlice(t *testing.T) { assert.Equal(t, 7, es.Len()) } +func TestResourceLogsSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newResourceLogsSlice(&[]*otlplogs.ResourceLogs{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewResourceLogsSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + func TestResourceLogsSlice_CopyTo(t *testing.T) { dest := NewResourceLogsSlice() // Test CopyTo to empty @@ -134,6 +149,6 @@ func fillTestResourceLogsSlice(es ResourceLogsSlice) { *es.orig = make([]*otlplogs.ResourceLogs, 7) for i := 0; i < 7; i++ { (*es.orig)[i] = &otlplogs.ResourceLogs{} - fillTestResourceLogs(newResourceLogs((*es.orig)[i])) + fillTestResourceLogs(newResourceLogs((*es.orig)[i], es.state)) } } diff --git a/pdata/plog/generated_scopelogs.go b/pdata/plog/generated_scopelogs.go index c4d399103b2..6e45a9627f8 100644 --- a/pdata/plog/generated_scopelogs.go +++ b/pdata/plog/generated_scopelogs.go @@ -20,11 +20,12 @@ import ( // Must use NewScopeLogs function to create new instances. // Important: zero-initialized instance is not valid for use. type ScopeLogs struct { - orig *otlplogs.ScopeLogs + orig *otlplogs.ScopeLogs + state *internal.State } -func newScopeLogs(orig *otlplogs.ScopeLogs) ScopeLogs { - return ScopeLogs{orig} +func newScopeLogs(orig *otlplogs.ScopeLogs, state *internal.State) ScopeLogs { + return ScopeLogs{orig: orig, state: state} } // NewScopeLogs creates a new empty ScopeLogs. @@ -32,19 +33,22 @@ func newScopeLogs(orig *otlplogs.ScopeLogs) ScopeLogs { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewScopeLogs() ScopeLogs { - return newScopeLogs(&otlplogs.ScopeLogs{}) + state := internal.StateMutable + return newScopeLogs(&otlplogs.ScopeLogs{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms ScopeLogs) MoveTo(dest ScopeLogs) { + ms.state.AssertMutable() + dest.state.AssertMutable() *dest.orig = *ms.orig *ms.orig = otlplogs.ScopeLogs{} } // Scope returns the scope associated with this ScopeLogs. func (ms ScopeLogs) Scope() pcommon.InstrumentationScope { - return pcommon.InstrumentationScope(internal.NewInstrumentationScope(&ms.orig.Scope)) + return pcommon.InstrumentationScope(internal.NewInstrumentationScope(&ms.orig.Scope, ms.state)) } // SchemaUrl returns the schemaurl associated with this ScopeLogs. @@ -54,16 +58,18 @@ func (ms ScopeLogs) SchemaUrl() string { // SetSchemaUrl replaces the schemaurl associated with this ScopeLogs. func (ms ScopeLogs) SetSchemaUrl(v string) { + ms.state.AssertMutable() ms.orig.SchemaUrl = v } // LogRecords returns the LogRecords associated with this ScopeLogs. func (ms ScopeLogs) LogRecords() LogRecordSlice { - return newLogRecordSlice(&ms.orig.LogRecords) + return newLogRecordSlice(&ms.orig.LogRecords, ms.state) } // CopyTo copies all properties from the current struct overriding the destination. func (ms ScopeLogs) CopyTo(dest ScopeLogs) { + dest.state.AssertMutable() ms.Scope().CopyTo(dest.Scope()) dest.SetSchemaUrl(ms.SchemaUrl()) ms.LogRecords().CopyTo(dest.LogRecords()) diff --git a/pdata/plog/generated_scopelogs_test.go b/pdata/plog/generated_scopelogs_test.go index 5b58c00dd80..181513ffa59 100644 --- a/pdata/plog/generated_scopelogs_test.go +++ b/pdata/plog/generated_scopelogs_test.go @@ -12,6 +12,7 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/pdata/internal" + otlplogs "go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1" "go.opentelemetry.io/collector/pdata/pcommon" ) @@ -21,6 +22,9 @@ func TestScopeLogs_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewScopeLogs(), ms) assert.Equal(t, generateTestScopeLogs(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newScopeLogs(&otlplogs.ScopeLogs{}, &sharedState)) }) + assert.Panics(t, func() { newScopeLogs(&otlplogs.ScopeLogs{}, &sharedState).MoveTo(dest) }) } func TestScopeLogs_CopyTo(t *testing.T) { @@ -31,6 +35,8 @@ func TestScopeLogs_CopyTo(t *testing.T) { orig = generateTestScopeLogs() orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newScopeLogs(&otlplogs.ScopeLogs{}, &sharedState)) }) } func TestScopeLogs_Scope(t *testing.T) { @@ -44,6 +50,10 @@ func TestScopeLogs_SchemaUrl(t *testing.T) { assert.Equal(t, "", ms.SchemaUrl()) ms.SetSchemaUrl("https://opentelemetry.io/schemas/1.5.0") assert.Equal(t, "https://opentelemetry.io/schemas/1.5.0", ms.SchemaUrl()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + newScopeLogs(&otlplogs.ScopeLogs{}, &sharedState).SetSchemaUrl("https://opentelemetry.io/schemas/1.5.0") + }) } func TestScopeLogs_LogRecords(t *testing.T) { @@ -60,7 +70,7 @@ func generateTestScopeLogs() ScopeLogs { } func fillTestScopeLogs(tv ScopeLogs) { - internal.FillTestInstrumentationScope(internal.NewInstrumentationScope(&tv.orig.Scope)) + internal.FillTestInstrumentationScope(internal.NewInstrumentationScope(&tv.orig.Scope, tv.state)) tv.orig.SchemaUrl = "https://opentelemetry.io/schemas/1.5.0" - fillTestLogRecordSlice(newLogRecordSlice(&tv.orig.LogRecords)) + fillTestLogRecordSlice(newLogRecordSlice(&tv.orig.LogRecords, tv.state)) } diff --git a/pdata/plog/generated_scopelogsslice.go b/pdata/plog/generated_scopelogsslice.go index be34e05f135..5bae8d9f9c9 100644 --- a/pdata/plog/generated_scopelogsslice.go +++ b/pdata/plog/generated_scopelogsslice.go @@ -9,6 +9,7 @@ package plog import ( "sort" + "go.opentelemetry.io/collector/pdata/internal" otlplogs "go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1" ) @@ -20,18 +21,20 @@ import ( // Must use NewScopeLogsSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type ScopeLogsSlice struct { - orig *[]*otlplogs.ScopeLogs + orig *[]*otlplogs.ScopeLogs + state *internal.State } -func newScopeLogsSlice(orig *[]*otlplogs.ScopeLogs) ScopeLogsSlice { - return ScopeLogsSlice{orig} +func newScopeLogsSlice(orig *[]*otlplogs.ScopeLogs, state *internal.State) ScopeLogsSlice { + return ScopeLogsSlice{orig: orig, state: state} } // NewScopeLogsSlice creates a ScopeLogsSlice with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewScopeLogsSlice() ScopeLogsSlice { orig := []*otlplogs.ScopeLogs(nil) - return newScopeLogsSlice(&orig) + state := internal.StateMutable + return newScopeLogsSlice(&orig, &state) } // Len returns the number of elements in the slice. @@ -50,7 +53,7 @@ func (es ScopeLogsSlice) Len() int { // ... // Do something with the element // } func (es ScopeLogsSlice) At(i int) ScopeLogs { - return newScopeLogs((*es.orig)[i]) + return newScopeLogs((*es.orig)[i], es.state) } // EnsureCapacity is an operation that ensures the slice has at least the specified capacity. @@ -66,6 +69,7 @@ func (es ScopeLogsSlice) At(i int) ScopeLogs { // // Here should set all the values for e. // } func (es ScopeLogsSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() oldCap := cap(*es.orig) if newCap <= oldCap { return @@ -79,6 +83,7 @@ func (es ScopeLogsSlice) EnsureCapacity(newCap int) { // AppendEmpty will append to the end of the slice an empty ScopeLogs. // It returns the newly added ScopeLogs. func (es ScopeLogsSlice) AppendEmpty() ScopeLogs { + es.state.AssertMutable() *es.orig = append(*es.orig, &otlplogs.ScopeLogs{}) return es.At(es.Len() - 1) } @@ -86,6 +91,8 @@ func (es ScopeLogsSlice) AppendEmpty() ScopeLogs { // MoveAndAppendTo moves all elements from the current slice and appends them to the dest. // The current slice will be cleared. func (es ScopeLogsSlice) MoveAndAppendTo(dest ScopeLogsSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() if *dest.orig == nil { // We can simply move the entire vector and avoid any allocations. *dest.orig = *es.orig @@ -98,6 +105,7 @@ func (es ScopeLogsSlice) MoveAndAppendTo(dest ScopeLogsSlice) { // RemoveIf calls f sequentially for each element present in the slice. // If f returns true, the element is removed from the slice. func (es ScopeLogsSlice) RemoveIf(f func(ScopeLogs) bool) { + es.state.AssertMutable() newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { @@ -111,18 +119,18 @@ func (es ScopeLogsSlice) RemoveIf(f func(ScopeLogs) bool) { (*es.orig)[newLen] = (*es.orig)[i] newLen++ } - // TODO: Prevent memory leak by erasing truncated values. *es.orig = (*es.orig)[:newLen] } // CopyTo copies all elements from the current slice overriding the destination. func (es ScopeLogsSlice) CopyTo(dest ScopeLogsSlice) { + dest.state.AssertMutable() srcLen := es.Len() destCap := cap(*dest.orig) if srcLen <= destCap { (*dest.orig) = (*dest.orig)[:srcLen:destCap] for i := range *es.orig { - newScopeLogs((*es.orig)[i]).CopyTo(newScopeLogs((*dest.orig)[i])) + newScopeLogs((*es.orig)[i], es.state).CopyTo(newScopeLogs((*dest.orig)[i], dest.state)) } return } @@ -130,7 +138,7 @@ func (es ScopeLogsSlice) CopyTo(dest ScopeLogsSlice) { wrappers := make([]*otlplogs.ScopeLogs, srcLen) for i := range *es.orig { wrappers[i] = &origs[i] - newScopeLogs((*es.orig)[i]).CopyTo(newScopeLogs(wrappers[i])) + newScopeLogs((*es.orig)[i], es.state).CopyTo(newScopeLogs(wrappers[i], dest.state)) } *dest.orig = wrappers } @@ -139,5 +147,6 @@ func (es ScopeLogsSlice) CopyTo(dest ScopeLogsSlice) { // provided less function so that two instances of ScopeLogsSlice // can be compared. func (es ScopeLogsSlice) Sort(less func(a, b ScopeLogs) bool) { + es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } diff --git a/pdata/plog/generated_scopelogsslice_test.go b/pdata/plog/generated_scopelogsslice_test.go index a18b1e9e34c..12678c7b4fc 100644 --- a/pdata/plog/generated_scopelogsslice_test.go +++ b/pdata/plog/generated_scopelogsslice_test.go @@ -12,13 +12,15 @@ import ( "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/internal" otlplogs "go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1" ) func TestScopeLogsSlice(t *testing.T) { es := NewScopeLogsSlice() assert.Equal(t, 0, es.Len()) - es = newScopeLogsSlice(&[]*otlplogs.ScopeLogs{}) + state := internal.StateMutable + es = newScopeLogsSlice(&[]*otlplogs.ScopeLogs{}, &state) assert.Equal(t, 0, es.Len()) emptyVal := NewScopeLogs() @@ -32,6 +34,19 @@ func TestScopeLogsSlice(t *testing.T) { assert.Equal(t, 7, es.Len()) } +func TestScopeLogsSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newScopeLogsSlice(&[]*otlplogs.ScopeLogs{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewScopeLogsSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + func TestScopeLogsSlice_CopyTo(t *testing.T) { dest := NewScopeLogsSlice() // Test CopyTo to empty @@ -134,6 +149,6 @@ func fillTestScopeLogsSlice(es ScopeLogsSlice) { *es.orig = make([]*otlplogs.ScopeLogs, 7) for i := 0; i < 7; i++ { (*es.orig)[i] = &otlplogs.ScopeLogs{} - fillTestScopeLogs(newScopeLogs((*es.orig)[i])) + fillTestScopeLogs(newScopeLogs((*es.orig)[i], es.state)) } } diff --git a/pdata/plog/json.go b/pdata/plog/json.go index 1a877c68b30..373985e7090 100644 --- a/pdata/plog/json.go +++ b/pdata/plog/json.go @@ -15,8 +15,10 @@ import ( "go.opentelemetry.io/collector/pdata/internal/otlp" ) +// JSONMarshaler marshals pdata.Logs to JSON bytes using the OTLP/JSON format. type JSONMarshaler struct{} +// MarshalLogs to the OTLP/JSON format. func (*JSONMarshaler) MarshalLogs(ld Logs) ([]byte, error) { buf := bytes.Buffer{} pb := internal.LogsToProto(internal.Logs(ld)) @@ -26,8 +28,10 @@ func (*JSONMarshaler) MarshalLogs(ld Logs) ([]byte, error) { var _ Unmarshaler = (*JSONUnmarshaler)(nil) +// JSONUnmarshaler unmarshals OTLP/JSON formatted-bytes to pdata.Logs. type JSONUnmarshaler struct{} +// UnmarshalLogs from OTLP/JSON format into pdata.Logs. func (*JSONUnmarshaler) UnmarshalLogs(buf []byte) (Logs, error) { iter := jsoniter.ConfigFastest.BorrowIterator(buf) defer jsoniter.ConfigFastest.ReturnIterator(iter) @@ -44,7 +48,7 @@ func (ms Logs) unmarshalJsoniter(iter *jsoniter.Iterator) { iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { switch f { case "resource_logs", "resourceLogs": - iter.ReadArrayCB(func(iterator *jsoniter.Iterator) bool { + iter.ReadArrayCB(func(*jsoniter.Iterator) bool { ms.ResourceLogs().AppendEmpty().unmarshalJsoniter(iter) return true }) diff --git a/pdata/plog/logs.go b/pdata/plog/logs.go index f637077ddb4..490526090f8 100644 --- a/pdata/plog/logs.go +++ b/pdata/plog/logs.go @@ -13,18 +13,28 @@ import ( type Logs internal.Logs func newLogs(orig *otlpcollectorlog.ExportLogsServiceRequest) Logs { - return Logs(internal.NewLogs(orig)) + state := internal.StateMutable + return Logs(internal.NewLogs(orig, &state)) } func (ms Logs) getOrig() *otlpcollectorlog.ExportLogsServiceRequest { return internal.GetOrigLogs(internal.Logs(ms)) } +func (ms Logs) getState() *internal.State { + return internal.GetLogsState(internal.Logs(ms)) +} + // NewLogs creates a new Logs struct. func NewLogs() Logs { return newLogs(&otlpcollectorlog.ExportLogsServiceRequest{}) } +// IsReadOnly returns true if this Logs instance is read-only. +func (ms Logs) IsReadOnly() bool { + return *ms.getState() == internal.StateReadOnly +} + // CopyTo copies the Logs instance overriding the destination. func (ms Logs) CopyTo(dest Logs) { ms.ResourceLogs().CopyTo(dest.ResourceLogs()) @@ -47,5 +57,10 @@ func (ms Logs) LogRecordCount() int { // ResourceLogs returns the ResourceLogsSlice associated with this Logs. func (ms Logs) ResourceLogs() ResourceLogsSlice { - return newResourceLogsSlice(&ms.getOrig().ResourceLogs) + return newResourceLogsSlice(&ms.getOrig().ResourceLogs, internal.GetLogsState(internal.Logs(ms))) +} + +// MarkReadOnly marks the Logs as shared so that no further modifications can be done on it. +func (ms Logs) MarkReadOnly() { + internal.SetLogsState(internal.Logs(ms), internal.StateReadOnly) } diff --git a/pdata/plog/logs_test.go b/pdata/plog/logs_test.go index f2ec1bb78b1..9d3feef4d98 100644 --- a/pdata/plog/logs_test.go +++ b/pdata/plog/logs_test.go @@ -5,6 +5,7 @@ package plog import ( "testing" + "time" gogoproto "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/assert" @@ -13,6 +14,7 @@ import ( otlpcollectorlog "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/logs/v1" otlplogs "go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1" + "go.opentelemetry.io/collector/pdata/pcommon" ) func TestLogRecordCount(t *testing.T) { @@ -112,3 +114,60 @@ func TestLogsCopyTo(t *testing.T) { logs.CopyTo(logsCopy) assert.EqualValues(t, logs, logsCopy) } + +func TestReadOnlyLogsInvalidUsage(t *testing.T) { + logs := NewLogs() + assert.False(t, logs.IsReadOnly()) + res := logs.ResourceLogs().AppendEmpty().Resource() + res.Attributes().PutStr("k1", "v1") + logs.MarkReadOnly() + assert.True(t, logs.IsReadOnly()) + assert.Panics(t, func() { res.Attributes().PutStr("k2", "v2") }) +} + +func BenchmarkLogsUsage(b *testing.B) { + logs := NewLogs() + fillTestResourceLogsSlice(logs.ResourceLogs()) + + ts := pcommon.NewTimestampFromTime(time.Now()) + + b.ReportAllocs() + b.ResetTimer() + + for bb := 0; bb < b.N; bb++ { + for i := 0; i < logs.ResourceLogs().Len(); i++ { + rl := logs.ResourceLogs().At(i) + res := rl.Resource() + res.Attributes().PutStr("foo", "bar") + v, ok := res.Attributes().Get("foo") + assert.True(b, ok) + assert.Equal(b, "bar", v.Str()) + v.SetStr("new-bar") + assert.Equal(b, "new-bar", v.Str()) + res.Attributes().Remove("foo") + for j := 0; j < rl.ScopeLogs().Len(); j++ { + sl := rl.ScopeLogs().At(j) + sl.Scope().SetName("new_test_name") + assert.Equal(b, "new_test_name", sl.Scope().Name()) + for k := 0; k < sl.LogRecords().Len(); k++ { + lr := sl.LogRecords().At(k) + lr.Body().SetStr("new_body") + assert.Equal(b, "new_body", lr.Body().Str()) + lr.SetTimestamp(ts) + assert.Equal(b, ts, lr.Timestamp()) + } + lr := sl.LogRecords().AppendEmpty() + lr.Body().SetStr("another_log_record") + lr.SetTimestamp(ts) + lr.SetObservedTimestamp(ts) + lr.SetSeverityText("info") + lr.SetSeverityNumber(SeverityNumberInfo) + lr.Attributes().PutStr("foo", "bar") + lr.SetSpanID([8]byte{1, 2, 3, 4, 5, 6, 7, 8}) + sl.LogRecords().RemoveIf(func(lr LogRecord) bool { + return lr.Body().Str() == "another_log_record" + }) + } + } + } +} diff --git a/pdata/plog/package_test.go b/pdata/plog/package_test.go new file mode 100644 index 00000000000..16a438ebb3d --- /dev/null +++ b/pdata/plog/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package plog + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pdata/plog/plogotlp/generated_exportpartialsuccess.go b/pdata/plog/plogotlp/generated_exportpartialsuccess.go index 5ab21e08897..bcf420c9120 100644 --- a/pdata/plog/plogotlp/generated_exportpartialsuccess.go +++ b/pdata/plog/plogotlp/generated_exportpartialsuccess.go @@ -7,6 +7,7 @@ package plogotlp import ( + "go.opentelemetry.io/collector/pdata/internal" otlpcollectorlog "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/logs/v1" ) @@ -18,11 +19,12 @@ import ( // Must use NewExportPartialSuccess function to create new instances. // Important: zero-initialized instance is not valid for use. type ExportPartialSuccess struct { - orig *otlpcollectorlog.ExportLogsPartialSuccess + orig *otlpcollectorlog.ExportLogsPartialSuccess + state *internal.State } -func newExportPartialSuccess(orig *otlpcollectorlog.ExportLogsPartialSuccess) ExportPartialSuccess { - return ExportPartialSuccess{orig} +func newExportPartialSuccess(orig *otlpcollectorlog.ExportLogsPartialSuccess, state *internal.State) ExportPartialSuccess { + return ExportPartialSuccess{orig: orig, state: state} } // NewExportPartialSuccess creates a new empty ExportPartialSuccess. @@ -30,12 +32,15 @@ func newExportPartialSuccess(orig *otlpcollectorlog.ExportLogsPartialSuccess) Ex // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewExportPartialSuccess() ExportPartialSuccess { - return newExportPartialSuccess(&otlpcollectorlog.ExportLogsPartialSuccess{}) + state := internal.StateMutable + return newExportPartialSuccess(&otlpcollectorlog.ExportLogsPartialSuccess{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms ExportPartialSuccess) MoveTo(dest ExportPartialSuccess) { + ms.state.AssertMutable() + dest.state.AssertMutable() *dest.orig = *ms.orig *ms.orig = otlpcollectorlog.ExportLogsPartialSuccess{} } @@ -47,6 +52,7 @@ func (ms ExportPartialSuccess) RejectedLogRecords() int64 { // SetRejectedLogRecords replaces the rejectedlogrecords associated with this ExportPartialSuccess. func (ms ExportPartialSuccess) SetRejectedLogRecords(v int64) { + ms.state.AssertMutable() ms.orig.RejectedLogRecords = v } @@ -57,11 +63,13 @@ func (ms ExportPartialSuccess) ErrorMessage() string { // SetErrorMessage replaces the errormessage associated with this ExportPartialSuccess. func (ms ExportPartialSuccess) SetErrorMessage(v string) { + ms.state.AssertMutable() ms.orig.ErrorMessage = v } // CopyTo copies all properties from the current struct overriding the destination. func (ms ExportPartialSuccess) CopyTo(dest ExportPartialSuccess) { + dest.state.AssertMutable() dest.SetRejectedLogRecords(ms.RejectedLogRecords()) dest.SetErrorMessage(ms.ErrorMessage()) } diff --git a/pdata/plog/plogotlp/generated_exportpartialsuccess_test.go b/pdata/plog/plogotlp/generated_exportpartialsuccess_test.go index 9df7e89b7d3..9b0fee581a1 100644 --- a/pdata/plog/plogotlp/generated_exportpartialsuccess_test.go +++ b/pdata/plog/plogotlp/generated_exportpartialsuccess_test.go @@ -10,6 +10,9 @@ import ( "testing" "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpcollectorlog "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/logs/v1" ) func TestExportPartialSuccess_MoveTo(t *testing.T) { @@ -18,6 +21,11 @@ func TestExportPartialSuccess_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewExportPartialSuccess(), ms) assert.Equal(t, generateTestExportPartialSuccess(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newExportPartialSuccess(&otlpcollectorlog.ExportLogsPartialSuccess{}, &sharedState)) }) + assert.Panics(t, func() { + newExportPartialSuccess(&otlpcollectorlog.ExportLogsPartialSuccess{}, &sharedState).MoveTo(dest) + }) } func TestExportPartialSuccess_CopyTo(t *testing.T) { @@ -28,6 +36,8 @@ func TestExportPartialSuccess_CopyTo(t *testing.T) { orig = generateTestExportPartialSuccess() orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newExportPartialSuccess(&otlpcollectorlog.ExportLogsPartialSuccess{}, &sharedState)) }) } func TestExportPartialSuccess_RejectedLogRecords(t *testing.T) { @@ -35,6 +45,10 @@ func TestExportPartialSuccess_RejectedLogRecords(t *testing.T) { assert.Equal(t, int64(0), ms.RejectedLogRecords()) ms.SetRejectedLogRecords(int64(13)) assert.Equal(t, int64(13), ms.RejectedLogRecords()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + newExportPartialSuccess(&otlpcollectorlog.ExportLogsPartialSuccess{}, &sharedState).SetRejectedLogRecords(int64(13)) + }) } func TestExportPartialSuccess_ErrorMessage(t *testing.T) { @@ -42,6 +56,10 @@ func TestExportPartialSuccess_ErrorMessage(t *testing.T) { assert.Equal(t, "", ms.ErrorMessage()) ms.SetErrorMessage("error message") assert.Equal(t, "error message", ms.ErrorMessage()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + newExportPartialSuccess(&otlpcollectorlog.ExportLogsPartialSuccess{}, &sharedState).SetErrorMessage("error message") + }) } func generateTestExportPartialSuccess() ExportPartialSuccess { diff --git a/pdata/plog/plogotlp/grpc.go b/pdata/plog/plogotlp/grpc.go index 4a7e66cb852..35d9fd85fcd 100644 --- a/pdata/plog/plogotlp/grpc.go +++ b/pdata/plog/plogotlp/grpc.go @@ -10,6 +10,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "go.opentelemetry.io/collector/pdata/internal" otlpcollectorlog "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/logs/v1" "go.opentelemetry.io/collector/pdata/internal/otlp" ) @@ -39,7 +40,11 @@ type grpcClient struct { func (c *grpcClient) Export(ctx context.Context, request ExportRequest, opts ...grpc.CallOption) (ExportResponse, error) { rsp, err := c.rawClient.Export(ctx, request.orig, opts...) - return ExportResponse{orig: rsp}, err + if err != nil { + return ExportResponse{}, err + } + state := internal.StateMutable + return ExportResponse{orig: rsp, state: &state}, err } func (c *grpcClient) unexported() {} @@ -79,6 +84,7 @@ type rawLogsServer struct { func (s rawLogsServer) Export(ctx context.Context, request *otlpcollectorlog.ExportLogsServiceRequest) (*otlpcollectorlog.ExportLogsServiceResponse, error) { otlp.MigrateLogs(request.ResourceLogs) - rsp, err := s.srv.Export(ctx, ExportRequest{orig: request}) + state := internal.StateMutable + rsp, err := s.srv.Export(ctx, ExportRequest{orig: request, state: &state}) return rsp.orig, err } diff --git a/pdata/plog/plogotlp/package_test.go b/pdata/plog/plogotlp/package_test.go new file mode 100644 index 00000000000..b8cef1c0a76 --- /dev/null +++ b/pdata/plog/plogotlp/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package plogotlp + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pdata/plog/plogotlp/request.go b/pdata/plog/plogotlp/request.go index 786d83b7c44..0401846ab2e 100644 --- a/pdata/plog/plogotlp/request.go +++ b/pdata/plog/plogotlp/request.go @@ -18,19 +18,27 @@ var jsonUnmarshaler = &plog.JSONUnmarshaler{} // ExportRequest represents the request for gRPC/HTTP client/server. // It's a wrapper for plog.Logs data. type ExportRequest struct { - orig *otlpcollectorlog.ExportLogsServiceRequest + orig *otlpcollectorlog.ExportLogsServiceRequest + state *internal.State } // NewExportRequest returns an empty ExportRequest. func NewExportRequest() ExportRequest { - return ExportRequest{orig: &otlpcollectorlog.ExportLogsServiceRequest{}} + state := internal.StateMutable + return ExportRequest{ + orig: &otlpcollectorlog.ExportLogsServiceRequest{}, + state: &state, + } } // NewExportRequestFromLogs returns a ExportRequest from plog.Logs. // Because ExportRequest is a wrapper for plog.Logs, // any changes to the provided Logs struct will be reflected in the ExportRequest and vice versa. func NewExportRequestFromLogs(ld plog.Logs) ExportRequest { - return ExportRequest{orig: internal.GetOrigLogs(internal.Logs(ld))} + return ExportRequest{ + orig: internal.GetOrigLogs(internal.Logs(ld)), + state: internal.GetLogsState(internal.Logs(ld)), + } } // MarshalProto marshals ExportRequest into proto bytes. @@ -67,5 +75,5 @@ func (ms ExportRequest) UnmarshalJSON(data []byte) error { } func (ms ExportRequest) Logs() plog.Logs { - return plog.Logs(internal.NewLogs(ms.orig)) + return plog.Logs(internal.NewLogs(ms.orig, ms.state)) } diff --git a/pdata/plog/plogotlp/response.go b/pdata/plog/plogotlp/response.go index 439c2560ffa..293d2d2cf84 100644 --- a/pdata/plog/plogotlp/response.go +++ b/pdata/plog/plogotlp/response.go @@ -8,18 +8,24 @@ import ( jsoniter "github.com/json-iterator/go" + "go.opentelemetry.io/collector/pdata/internal" otlpcollectorlog "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/logs/v1" "go.opentelemetry.io/collector/pdata/internal/json" ) // ExportResponse represents the response for gRPC/HTTP client/server. type ExportResponse struct { - orig *otlpcollectorlog.ExportLogsServiceResponse + orig *otlpcollectorlog.ExportLogsServiceResponse + state *internal.State } // NewExportResponse returns an empty ExportResponse. func NewExportResponse() ExportResponse { - return ExportResponse{orig: &otlpcollectorlog.ExportLogsServiceResponse{}} + state := internal.StateMutable + return ExportResponse{ + orig: &otlpcollectorlog.ExportLogsServiceResponse{}, + state: &state, + } } // MarshalProto marshals ExportResponse into proto bytes. @@ -51,7 +57,7 @@ func (ms ExportResponse) UnmarshalJSON(data []byte) error { // PartialSuccess returns the ExportPartialSuccess associated with this ExportResponse. func (ms ExportResponse) PartialSuccess() ExportPartialSuccess { - return newExportPartialSuccess(&ms.orig.PartialSuccess) + return newExportPartialSuccess(&ms.orig.PartialSuccess, ms.state) } func (ms ExportResponse) unmarshalJsoniter(iter *jsoniter.Iterator) { @@ -67,7 +73,7 @@ func (ms ExportResponse) unmarshalJsoniter(iter *jsoniter.Iterator) { } func (ms ExportPartialSuccess) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iterator *jsoniter.Iterator, f string) bool { + iter.ReadObjectCB(func(_ *jsoniter.Iterator, f string) bool { switch f { case "rejected_log_records", "rejectedLogRecords": ms.orig.RejectedLogRecords = json.ReadInt64(iter) diff --git a/pdata/pmetric/generated_exemplar.go b/pdata/pmetric/generated_exemplar.go index 461ddb21056..9937a1b500f 100644 --- a/pdata/pmetric/generated_exemplar.go +++ b/pdata/pmetric/generated_exemplar.go @@ -24,11 +24,12 @@ import ( // Must use NewExemplar function to create new instances. // Important: zero-initialized instance is not valid for use. type Exemplar struct { - orig *otlpmetrics.Exemplar + orig *otlpmetrics.Exemplar + state *internal.State } -func newExemplar(orig *otlpmetrics.Exemplar) Exemplar { - return Exemplar{orig} +func newExemplar(orig *otlpmetrics.Exemplar, state *internal.State) Exemplar { + return Exemplar{orig: orig, state: state} } // NewExemplar creates a new empty Exemplar. @@ -36,12 +37,15 @@ func newExemplar(orig *otlpmetrics.Exemplar) Exemplar { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewExemplar() Exemplar { - return newExemplar(&otlpmetrics.Exemplar{}) + state := internal.StateMutable + return newExemplar(&otlpmetrics.Exemplar{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms Exemplar) MoveTo(dest Exemplar) { + ms.state.AssertMutable() + dest.state.AssertMutable() *dest.orig = *ms.orig *ms.orig = otlpmetrics.Exemplar{} } @@ -53,6 +57,7 @@ func (ms Exemplar) Timestamp() pcommon.Timestamp { // SetTimestamp replaces the timestamp associated with this Exemplar. func (ms Exemplar) SetTimestamp(v pcommon.Timestamp) { + ms.state.AssertMutable() ms.orig.TimeUnixNano = uint64(v) } @@ -75,6 +80,7 @@ func (ms Exemplar) DoubleValue() float64 { // SetDoubleValue replaces the double associated with this Exemplar. func (ms Exemplar) SetDoubleValue(v float64) { + ms.state.AssertMutable() ms.orig.Value = &otlpmetrics.Exemplar_AsDouble{ AsDouble: v, } @@ -87,6 +93,7 @@ func (ms Exemplar) IntValue() int64 { // SetIntValue replaces the int associated with this Exemplar. func (ms Exemplar) SetIntValue(v int64) { + ms.state.AssertMutable() ms.orig.Value = &otlpmetrics.Exemplar_AsInt{ AsInt: v, } @@ -94,7 +101,7 @@ func (ms Exemplar) SetIntValue(v int64) { // FilteredAttributes returns the FilteredAttributes associated with this Exemplar. func (ms Exemplar) FilteredAttributes() pcommon.Map { - return pcommon.Map(internal.NewMap(&ms.orig.FilteredAttributes)) + return pcommon.Map(internal.NewMap(&ms.orig.FilteredAttributes, ms.state)) } // TraceID returns the traceid associated with this Exemplar. @@ -104,6 +111,7 @@ func (ms Exemplar) TraceID() pcommon.TraceID { // SetTraceID replaces the traceid associated with this Exemplar. func (ms Exemplar) SetTraceID(v pcommon.TraceID) { + ms.state.AssertMutable() ms.orig.TraceId = data.TraceID(v) } @@ -114,11 +122,13 @@ func (ms Exemplar) SpanID() pcommon.SpanID { // SetSpanID replaces the spanid associated with this Exemplar. func (ms Exemplar) SetSpanID(v pcommon.SpanID) { + ms.state.AssertMutable() ms.orig.SpanId = data.SpanID(v) } // CopyTo copies all properties from the current struct overriding the destination. func (ms Exemplar) CopyTo(dest Exemplar) { + dest.state.AssertMutable() dest.SetTimestamp(ms.Timestamp()) switch ms.ValueType() { case ExemplarValueTypeDouble: diff --git a/pdata/pmetric/generated_exemplar_test.go b/pdata/pmetric/generated_exemplar_test.go index 5b9868a6752..b9f8ce27c81 100644 --- a/pdata/pmetric/generated_exemplar_test.go +++ b/pdata/pmetric/generated_exemplar_test.go @@ -23,6 +23,9 @@ func TestExemplar_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewExemplar(), ms) assert.Equal(t, generateTestExemplar(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newExemplar(&otlpmetrics.Exemplar{}, &sharedState)) }) + assert.Panics(t, func() { newExemplar(&otlpmetrics.Exemplar{}, &sharedState).MoveTo(dest) }) } func TestExemplar_CopyTo(t *testing.T) { @@ -33,6 +36,8 @@ func TestExemplar_CopyTo(t *testing.T) { orig = generateTestExemplar() orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newExemplar(&otlpmetrics.Exemplar{}, &sharedState)) }) } func TestExemplar_Timestamp(t *testing.T) { @@ -54,6 +59,8 @@ func TestExemplar_DoubleValue(t *testing.T) { ms.SetDoubleValue(float64(17.13)) assert.Equal(t, float64(17.13), ms.DoubleValue()) assert.Equal(t, ExemplarValueTypeDouble, ms.ValueType()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newExemplar(&otlpmetrics.Exemplar{}, &sharedState).SetDoubleValue(float64(17.13)) }) } func TestExemplar_IntValue(t *testing.T) { @@ -62,6 +69,8 @@ func TestExemplar_IntValue(t *testing.T) { ms.SetIntValue(int64(17)) assert.Equal(t, int64(17), ms.IntValue()) assert.Equal(t, ExemplarValueTypeInt, ms.ValueType()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newExemplar(&otlpmetrics.Exemplar{}, &sharedState).SetIntValue(int64(17)) }) } func TestExemplar_FilteredAttributes(t *testing.T) { @@ -96,7 +105,7 @@ func generateTestExemplar() Exemplar { func fillTestExemplar(tv Exemplar) { tv.orig.TimeUnixNano = 1234567890 tv.orig.Value = &otlpmetrics.Exemplar_AsInt{AsInt: int64(17)} - internal.FillTestMap(internal.NewMap(&tv.orig.FilteredAttributes)) + internal.FillTestMap(internal.NewMap(&tv.orig.FilteredAttributes, tv.state)) tv.orig.TraceId = data.TraceID([16]byte{1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1}) tv.orig.SpanId = data.SpanID([8]byte{8, 7, 6, 5, 4, 3, 2, 1}) } diff --git a/pdata/pmetric/generated_exemplarslice.go b/pdata/pmetric/generated_exemplarslice.go index f39db94477b..15d70a6edeb 100644 --- a/pdata/pmetric/generated_exemplarslice.go +++ b/pdata/pmetric/generated_exemplarslice.go @@ -7,6 +7,7 @@ package pmetric import ( + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) @@ -18,18 +19,20 @@ import ( // Must use NewExemplarSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type ExemplarSlice struct { - orig *[]otlpmetrics.Exemplar + orig *[]otlpmetrics.Exemplar + state *internal.State } -func newExemplarSlice(orig *[]otlpmetrics.Exemplar) ExemplarSlice { - return ExemplarSlice{orig} +func newExemplarSlice(orig *[]otlpmetrics.Exemplar, state *internal.State) ExemplarSlice { + return ExemplarSlice{orig: orig, state: state} } // NewExemplarSlice creates a ExemplarSlice with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewExemplarSlice() ExemplarSlice { orig := []otlpmetrics.Exemplar(nil) - return newExemplarSlice(&orig) + state := internal.StateMutable + return newExemplarSlice(&orig, &state) } // Len returns the number of elements in the slice. @@ -48,7 +51,7 @@ func (es ExemplarSlice) Len() int { // ... // Do something with the element // } func (es ExemplarSlice) At(i int) Exemplar { - return newExemplar(&(*es.orig)[i]) + return newExemplar(&(*es.orig)[i], es.state) } // EnsureCapacity is an operation that ensures the slice has at least the specified capacity. @@ -64,6 +67,7 @@ func (es ExemplarSlice) At(i int) Exemplar { // // Here should set all the values for e. // } func (es ExemplarSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() oldCap := cap(*es.orig) if newCap <= oldCap { return @@ -77,6 +81,7 @@ func (es ExemplarSlice) EnsureCapacity(newCap int) { // AppendEmpty will append to the end of the slice an empty Exemplar. // It returns the newly added Exemplar. func (es ExemplarSlice) AppendEmpty() Exemplar { + es.state.AssertMutable() *es.orig = append(*es.orig, otlpmetrics.Exemplar{}) return es.At(es.Len() - 1) } @@ -84,6 +89,8 @@ func (es ExemplarSlice) AppendEmpty() Exemplar { // MoveAndAppendTo moves all elements from the current slice and appends them to the dest. // The current slice will be cleared. func (es ExemplarSlice) MoveAndAppendTo(dest ExemplarSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() if *dest.orig == nil { // We can simply move the entire vector and avoid any allocations. *dest.orig = *es.orig @@ -96,6 +103,7 @@ func (es ExemplarSlice) MoveAndAppendTo(dest ExemplarSlice) { // RemoveIf calls f sequentially for each element present in the slice. // If f returns true, the element is removed from the slice. func (es ExemplarSlice) RemoveIf(f func(Exemplar) bool) { + es.state.AssertMutable() newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { @@ -109,12 +117,12 @@ func (es ExemplarSlice) RemoveIf(f func(Exemplar) bool) { (*es.orig)[newLen] = (*es.orig)[i] newLen++ } - // TODO: Prevent memory leak by erasing truncated values. *es.orig = (*es.orig)[:newLen] } // CopyTo copies all elements from the current slice overriding the destination. func (es ExemplarSlice) CopyTo(dest ExemplarSlice) { + dest.state.AssertMutable() srcLen := es.Len() destCap := cap(*dest.orig) if srcLen <= destCap { @@ -123,6 +131,6 @@ func (es ExemplarSlice) CopyTo(dest ExemplarSlice) { (*dest.orig) = make([]otlpmetrics.Exemplar, srcLen) } for i := range *es.orig { - newExemplar(&(*es.orig)[i]).CopyTo(newExemplar(&(*dest.orig)[i])) + newExemplar(&(*es.orig)[i], es.state).CopyTo(newExemplar(&(*dest.orig)[i], dest.state)) } } diff --git a/pdata/pmetric/generated_exemplarslice_test.go b/pdata/pmetric/generated_exemplarslice_test.go index 3eb96c12b80..7cda639f638 100644 --- a/pdata/pmetric/generated_exemplarslice_test.go +++ b/pdata/pmetric/generated_exemplarslice_test.go @@ -11,13 +11,15 @@ import ( "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) func TestExemplarSlice(t *testing.T) { es := NewExemplarSlice() assert.Equal(t, 0, es.Len()) - es = newExemplarSlice(&[]otlpmetrics.Exemplar{}) + state := internal.StateMutable + es = newExemplarSlice(&[]otlpmetrics.Exemplar{}, &state) assert.Equal(t, 0, es.Len()) emptyVal := NewExemplar() @@ -31,6 +33,19 @@ func TestExemplarSlice(t *testing.T) { assert.Equal(t, 7, es.Len()) } +func TestExemplarSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newExemplarSlice(&[]otlpmetrics.Exemplar{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewExemplarSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + func TestExemplarSlice_CopyTo(t *testing.T) { dest := NewExemplarSlice() // Test CopyTo to empty @@ -117,6 +132,6 @@ func fillTestExemplarSlice(es ExemplarSlice) { *es.orig = make([]otlpmetrics.Exemplar, 7) for i := 0; i < 7; i++ { (*es.orig)[i] = otlpmetrics.Exemplar{} - fillTestExemplar(newExemplar(&(*es.orig)[i])) + fillTestExemplar(newExemplar(&(*es.orig)[i], es.state)) } } diff --git a/pdata/pmetric/generated_exponentialhistogram.go b/pdata/pmetric/generated_exponentialhistogram.go index 5fd275b9554..18ba20d7377 100644 --- a/pdata/pmetric/generated_exponentialhistogram.go +++ b/pdata/pmetric/generated_exponentialhistogram.go @@ -7,6 +7,7 @@ package pmetric import ( + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) @@ -19,11 +20,12 @@ import ( // Must use NewExponentialHistogram function to create new instances. // Important: zero-initialized instance is not valid for use. type ExponentialHistogram struct { - orig *otlpmetrics.ExponentialHistogram + orig *otlpmetrics.ExponentialHistogram + state *internal.State } -func newExponentialHistogram(orig *otlpmetrics.ExponentialHistogram) ExponentialHistogram { - return ExponentialHistogram{orig} +func newExponentialHistogram(orig *otlpmetrics.ExponentialHistogram, state *internal.State) ExponentialHistogram { + return ExponentialHistogram{orig: orig, state: state} } // NewExponentialHistogram creates a new empty ExponentialHistogram. @@ -31,12 +33,15 @@ func newExponentialHistogram(orig *otlpmetrics.ExponentialHistogram) Exponential // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewExponentialHistogram() ExponentialHistogram { - return newExponentialHistogram(&otlpmetrics.ExponentialHistogram{}) + state := internal.StateMutable + return newExponentialHistogram(&otlpmetrics.ExponentialHistogram{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms ExponentialHistogram) MoveTo(dest ExponentialHistogram) { + ms.state.AssertMutable() + dest.state.AssertMutable() *dest.orig = *ms.orig *ms.orig = otlpmetrics.ExponentialHistogram{} } @@ -48,16 +53,18 @@ func (ms ExponentialHistogram) AggregationTemporality() AggregationTemporality { // SetAggregationTemporality replaces the aggregationtemporality associated with this ExponentialHistogram. func (ms ExponentialHistogram) SetAggregationTemporality(v AggregationTemporality) { + ms.state.AssertMutable() ms.orig.AggregationTemporality = otlpmetrics.AggregationTemporality(v) } // DataPoints returns the DataPoints associated with this ExponentialHistogram. func (ms ExponentialHistogram) DataPoints() ExponentialHistogramDataPointSlice { - return newExponentialHistogramDataPointSlice(&ms.orig.DataPoints) + return newExponentialHistogramDataPointSlice(&ms.orig.DataPoints, ms.state) } // CopyTo copies all properties from the current struct overriding the destination. func (ms ExponentialHistogram) CopyTo(dest ExponentialHistogram) { + dest.state.AssertMutable() dest.SetAggregationTemporality(ms.AggregationTemporality()) ms.DataPoints().CopyTo(dest.DataPoints()) } diff --git a/pdata/pmetric/generated_exponentialhistogram_test.go b/pdata/pmetric/generated_exponentialhistogram_test.go index 543e53626cb..cc46edbb536 100644 --- a/pdata/pmetric/generated_exponentialhistogram_test.go +++ b/pdata/pmetric/generated_exponentialhistogram_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) @@ -20,6 +21,9 @@ func TestExponentialHistogram_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewExponentialHistogram(), ms) assert.Equal(t, generateTestExponentialHistogram(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newExponentialHistogram(&otlpmetrics.ExponentialHistogram{}, &sharedState)) }) + assert.Panics(t, func() { newExponentialHistogram(&otlpmetrics.ExponentialHistogram{}, &sharedState).MoveTo(dest) }) } func TestExponentialHistogram_CopyTo(t *testing.T) { @@ -30,6 +34,8 @@ func TestExponentialHistogram_CopyTo(t *testing.T) { orig = generateTestExponentialHistogram() orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newExponentialHistogram(&otlpmetrics.ExponentialHistogram{}, &sharedState)) }) } func TestExponentialHistogram_AggregationTemporality(t *testing.T) { @@ -55,5 +61,5 @@ func generateTestExponentialHistogram() ExponentialHistogram { func fillTestExponentialHistogram(tv ExponentialHistogram) { tv.orig.AggregationTemporality = otlpmetrics.AggregationTemporality(1) - fillTestExponentialHistogramDataPointSlice(newExponentialHistogramDataPointSlice(&tv.orig.DataPoints)) + fillTestExponentialHistogramDataPointSlice(newExponentialHistogramDataPointSlice(&tv.orig.DataPoints, tv.state)) } diff --git a/pdata/pmetric/generated_exponentialhistogramdatapoint.go b/pdata/pmetric/generated_exponentialhistogramdatapoint.go index fcde3a18f30..3d76368b384 100644 --- a/pdata/pmetric/generated_exponentialhistogramdatapoint.go +++ b/pdata/pmetric/generated_exponentialhistogramdatapoint.go @@ -23,11 +23,12 @@ import ( // Must use NewExponentialHistogramDataPoint function to create new instances. // Important: zero-initialized instance is not valid for use. type ExponentialHistogramDataPoint struct { - orig *otlpmetrics.ExponentialHistogramDataPoint + orig *otlpmetrics.ExponentialHistogramDataPoint + state *internal.State } -func newExponentialHistogramDataPoint(orig *otlpmetrics.ExponentialHistogramDataPoint) ExponentialHistogramDataPoint { - return ExponentialHistogramDataPoint{orig} +func newExponentialHistogramDataPoint(orig *otlpmetrics.ExponentialHistogramDataPoint, state *internal.State) ExponentialHistogramDataPoint { + return ExponentialHistogramDataPoint{orig: orig, state: state} } // NewExponentialHistogramDataPoint creates a new empty ExponentialHistogramDataPoint. @@ -35,19 +36,22 @@ func newExponentialHistogramDataPoint(orig *otlpmetrics.ExponentialHistogramData // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewExponentialHistogramDataPoint() ExponentialHistogramDataPoint { - return newExponentialHistogramDataPoint(&otlpmetrics.ExponentialHistogramDataPoint{}) + state := internal.StateMutable + return newExponentialHistogramDataPoint(&otlpmetrics.ExponentialHistogramDataPoint{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms ExponentialHistogramDataPoint) MoveTo(dest ExponentialHistogramDataPoint) { + ms.state.AssertMutable() + dest.state.AssertMutable() *dest.orig = *ms.orig *ms.orig = otlpmetrics.ExponentialHistogramDataPoint{} } // Attributes returns the Attributes associated with this ExponentialHistogramDataPoint. func (ms ExponentialHistogramDataPoint) Attributes() pcommon.Map { - return pcommon.Map(internal.NewMap(&ms.orig.Attributes)) + return pcommon.Map(internal.NewMap(&ms.orig.Attributes, ms.state)) } // StartTimestamp returns the starttimestamp associated with this ExponentialHistogramDataPoint. @@ -57,6 +61,7 @@ func (ms ExponentialHistogramDataPoint) StartTimestamp() pcommon.Timestamp { // SetStartTimestamp replaces the starttimestamp associated with this ExponentialHistogramDataPoint. func (ms ExponentialHistogramDataPoint) SetStartTimestamp(v pcommon.Timestamp) { + ms.state.AssertMutable() ms.orig.StartTimeUnixNano = uint64(v) } @@ -67,6 +72,7 @@ func (ms ExponentialHistogramDataPoint) Timestamp() pcommon.Timestamp { // SetTimestamp replaces the timestamp associated with this ExponentialHistogramDataPoint. func (ms ExponentialHistogramDataPoint) SetTimestamp(v pcommon.Timestamp) { + ms.state.AssertMutable() ms.orig.TimeUnixNano = uint64(v) } @@ -77,30 +83,10 @@ func (ms ExponentialHistogramDataPoint) Count() uint64 { // SetCount replaces the count associated with this ExponentialHistogramDataPoint. func (ms ExponentialHistogramDataPoint) SetCount(v uint64) { + ms.state.AssertMutable() ms.orig.Count = v } -// Sum returns the sum associated with this ExponentialHistogramDataPoint. -func (ms ExponentialHistogramDataPoint) Sum() float64 { - return ms.orig.GetSum() -} - -// HasSum returns true if the ExponentialHistogramDataPoint contains a -// Sum value, false otherwise. -func (ms ExponentialHistogramDataPoint) HasSum() bool { - return ms.orig.Sum_ != nil -} - -// SetSum replaces the sum associated with this ExponentialHistogramDataPoint. -func (ms ExponentialHistogramDataPoint) SetSum(v float64) { - ms.orig.Sum_ = &otlpmetrics.ExponentialHistogramDataPoint_Sum{Sum: v} -} - -// RemoveSum removes the sum associated with this ExponentialHistogramDataPoint. -func (ms ExponentialHistogramDataPoint) RemoveSum() { - ms.orig.Sum_ = nil -} - // Scale returns the scale associated with this ExponentialHistogramDataPoint. func (ms ExponentialHistogramDataPoint) Scale() int32 { return ms.orig.Scale @@ -108,6 +94,7 @@ func (ms ExponentialHistogramDataPoint) Scale() int32 { // SetScale replaces the scale associated with this ExponentialHistogramDataPoint. func (ms ExponentialHistogramDataPoint) SetScale(v int32) { + ms.state.AssertMutable() ms.orig.Scale = v } @@ -118,22 +105,23 @@ func (ms ExponentialHistogramDataPoint) ZeroCount() uint64 { // SetZeroCount replaces the zerocount associated with this ExponentialHistogramDataPoint. func (ms ExponentialHistogramDataPoint) SetZeroCount(v uint64) { + ms.state.AssertMutable() ms.orig.ZeroCount = v } // Positive returns the positive associated with this ExponentialHistogramDataPoint. func (ms ExponentialHistogramDataPoint) Positive() ExponentialHistogramDataPointBuckets { - return newExponentialHistogramDataPointBuckets(&ms.orig.Positive) + return newExponentialHistogramDataPointBuckets(&ms.orig.Positive, ms.state) } // Negative returns the negative associated with this ExponentialHistogramDataPoint. func (ms ExponentialHistogramDataPoint) Negative() ExponentialHistogramDataPointBuckets { - return newExponentialHistogramDataPointBuckets(&ms.orig.Negative) + return newExponentialHistogramDataPointBuckets(&ms.orig.Negative, ms.state) } // Exemplars returns the Exemplars associated with this ExponentialHistogramDataPoint. func (ms ExponentialHistogramDataPoint) Exemplars() ExemplarSlice { - return newExemplarSlice(&ms.orig.Exemplars) + return newExemplarSlice(&ms.orig.Exemplars, ms.state) } // Flags returns the flags associated with this ExponentialHistogramDataPoint. @@ -143,9 +131,33 @@ func (ms ExponentialHistogramDataPoint) Flags() DataPointFlags { // SetFlags replaces the flags associated with this ExponentialHistogramDataPoint. func (ms ExponentialHistogramDataPoint) SetFlags(v DataPointFlags) { + ms.state.AssertMutable() ms.orig.Flags = uint32(v) } +// Sum returns the sum associated with this ExponentialHistogramDataPoint. +func (ms ExponentialHistogramDataPoint) Sum() float64 { + return ms.orig.GetSum() +} + +// HasSum returns true if the ExponentialHistogramDataPoint contains a +// Sum value, false otherwise. +func (ms ExponentialHistogramDataPoint) HasSum() bool { + return ms.orig.Sum_ != nil +} + +// SetSum replaces the sum associated with this ExponentialHistogramDataPoint. +func (ms ExponentialHistogramDataPoint) SetSum(v float64) { + ms.state.AssertMutable() + ms.orig.Sum_ = &otlpmetrics.ExponentialHistogramDataPoint_Sum{Sum: v} +} + +// RemoveSum removes the sum associated with this ExponentialHistogramDataPoint. +func (ms ExponentialHistogramDataPoint) RemoveSum() { + ms.state.AssertMutable() + ms.orig.Sum_ = nil +} + // Min returns the min associated with this ExponentialHistogramDataPoint. func (ms ExponentialHistogramDataPoint) Min() float64 { return ms.orig.GetMin() @@ -159,11 +171,13 @@ func (ms ExponentialHistogramDataPoint) HasMin() bool { // SetMin replaces the min associated with this ExponentialHistogramDataPoint. func (ms ExponentialHistogramDataPoint) SetMin(v float64) { + ms.state.AssertMutable() ms.orig.Min_ = &otlpmetrics.ExponentialHistogramDataPoint_Min{Min: v} } // RemoveMin removes the min associated with this ExponentialHistogramDataPoint. func (ms ExponentialHistogramDataPoint) RemoveMin() { + ms.state.AssertMutable() ms.orig.Min_ = nil } @@ -180,30 +194,44 @@ func (ms ExponentialHistogramDataPoint) HasMax() bool { // SetMax replaces the max associated with this ExponentialHistogramDataPoint. func (ms ExponentialHistogramDataPoint) SetMax(v float64) { + ms.state.AssertMutable() ms.orig.Max_ = &otlpmetrics.ExponentialHistogramDataPoint_Max{Max: v} } // RemoveMax removes the max associated with this ExponentialHistogramDataPoint. func (ms ExponentialHistogramDataPoint) RemoveMax() { + ms.state.AssertMutable() ms.orig.Max_ = nil } +// ZeroThreshold returns the zerothreshold associated with this ExponentialHistogramDataPoint. +func (ms ExponentialHistogramDataPoint) ZeroThreshold() float64 { + return ms.orig.ZeroThreshold +} + +// SetZeroThreshold replaces the zerothreshold associated with this ExponentialHistogramDataPoint. +func (ms ExponentialHistogramDataPoint) SetZeroThreshold(v float64) { + ms.state.AssertMutable() + ms.orig.ZeroThreshold = v +} + // CopyTo copies all properties from the current struct overriding the destination. func (ms ExponentialHistogramDataPoint) CopyTo(dest ExponentialHistogramDataPoint) { + dest.state.AssertMutable() ms.Attributes().CopyTo(dest.Attributes()) dest.SetStartTimestamp(ms.StartTimestamp()) dest.SetTimestamp(ms.Timestamp()) dest.SetCount(ms.Count()) - if ms.HasSum() { - dest.SetSum(ms.Sum()) - } - dest.SetScale(ms.Scale()) dest.SetZeroCount(ms.ZeroCount()) ms.Positive().CopyTo(dest.Positive()) ms.Negative().CopyTo(dest.Negative()) ms.Exemplars().CopyTo(dest.Exemplars()) dest.SetFlags(ms.Flags()) + if ms.HasSum() { + dest.SetSum(ms.Sum()) + } + if ms.HasMin() { dest.SetMin(ms.Min()) } @@ -212,4 +240,5 @@ func (ms ExponentialHistogramDataPoint) CopyTo(dest ExponentialHistogramDataPoin dest.SetMax(ms.Max()) } + dest.SetZeroThreshold(ms.ZeroThreshold()) } diff --git a/pdata/pmetric/generated_exponentialhistogramdatapoint_test.go b/pdata/pmetric/generated_exponentialhistogramdatapoint_test.go index 9192b0f339b..f4347f2e47f 100644 --- a/pdata/pmetric/generated_exponentialhistogramdatapoint_test.go +++ b/pdata/pmetric/generated_exponentialhistogramdatapoint_test.go @@ -22,6 +22,13 @@ func TestExponentialHistogramDataPoint_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewExponentialHistogramDataPoint(), ms) assert.Equal(t, generateTestExponentialHistogramDataPoint(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + ms.MoveTo(newExponentialHistogramDataPoint(&otlpmetrics.ExponentialHistogramDataPoint{}, &sharedState)) + }) + assert.Panics(t, func() { + newExponentialHistogramDataPoint(&otlpmetrics.ExponentialHistogramDataPoint{}, &sharedState).MoveTo(dest) + }) } func TestExponentialHistogramDataPoint_CopyTo(t *testing.T) { @@ -32,6 +39,10 @@ func TestExponentialHistogramDataPoint_CopyTo(t *testing.T) { orig = generateTestExponentialHistogramDataPoint() orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + ms.CopyTo(newExponentialHistogramDataPoint(&otlpmetrics.ExponentialHistogramDataPoint{}, &sharedState)) + }) } func TestExponentialHistogramDataPoint_Attributes(t *testing.T) { @@ -62,16 +73,10 @@ func TestExponentialHistogramDataPoint_Count(t *testing.T) { assert.Equal(t, uint64(0), ms.Count()) ms.SetCount(uint64(17)) assert.Equal(t, uint64(17), ms.Count()) -} - -func TestExponentialHistogramDataPoint_Sum(t *testing.T) { - ms := NewExponentialHistogramDataPoint() - assert.Equal(t, float64(0.0), ms.Sum()) - ms.SetSum(float64(17.13)) - assert.True(t, ms.HasSum()) - assert.Equal(t, float64(17.13), ms.Sum()) - ms.RemoveSum() - assert.False(t, ms.HasSum()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + newExponentialHistogramDataPoint(&otlpmetrics.ExponentialHistogramDataPoint{}, &sharedState).SetCount(uint64(17)) + }) } func TestExponentialHistogramDataPoint_Scale(t *testing.T) { @@ -79,6 +84,10 @@ func TestExponentialHistogramDataPoint_Scale(t *testing.T) { assert.Equal(t, int32(0), ms.Scale()) ms.SetScale(int32(4)) assert.Equal(t, int32(4), ms.Scale()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + newExponentialHistogramDataPoint(&otlpmetrics.ExponentialHistogramDataPoint{}, &sharedState).SetScale(int32(4)) + }) } func TestExponentialHistogramDataPoint_ZeroCount(t *testing.T) { @@ -86,6 +95,10 @@ func TestExponentialHistogramDataPoint_ZeroCount(t *testing.T) { assert.Equal(t, uint64(0), ms.ZeroCount()) ms.SetZeroCount(uint64(201)) assert.Equal(t, uint64(201), ms.ZeroCount()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + newExponentialHistogramDataPoint(&otlpmetrics.ExponentialHistogramDataPoint{}, &sharedState).SetZeroCount(uint64(201)) + }) } func TestExponentialHistogramDataPoint_Positive(t *testing.T) { @@ -115,6 +128,16 @@ func TestExponentialHistogramDataPoint_Flags(t *testing.T) { assert.Equal(t, testValFlags, ms.Flags()) } +func TestExponentialHistogramDataPoint_Sum(t *testing.T) { + ms := NewExponentialHistogramDataPoint() + assert.Equal(t, float64(0.0), ms.Sum()) + ms.SetSum(float64(17.13)) + assert.True(t, ms.HasSum()) + assert.Equal(t, float64(17.13), ms.Sum()) + ms.RemoveSum() + assert.False(t, ms.HasSum()) +} + func TestExponentialHistogramDataPoint_Min(t *testing.T) { ms := NewExponentialHistogramDataPoint() assert.Equal(t, float64(0.0), ms.Min()) @@ -135,6 +158,17 @@ func TestExponentialHistogramDataPoint_Max(t *testing.T) { assert.False(t, ms.HasMax()) } +func TestExponentialHistogramDataPoint_ZeroThreshold(t *testing.T) { + ms := NewExponentialHistogramDataPoint() + assert.Equal(t, float64(0.0), ms.ZeroThreshold()) + ms.SetZeroThreshold(float64(0.5)) + assert.Equal(t, float64(0.5), ms.ZeroThreshold()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + newExponentialHistogramDataPoint(&otlpmetrics.ExponentialHistogramDataPoint{}, &sharedState).SetZeroThreshold(float64(0.5)) + }) +} + func generateTestExponentialHistogramDataPoint() ExponentialHistogramDataPoint { tv := NewExponentialHistogramDataPoint() fillTestExponentialHistogramDataPoint(tv) @@ -142,17 +176,18 @@ func generateTestExponentialHistogramDataPoint() ExponentialHistogramDataPoint { } func fillTestExponentialHistogramDataPoint(tv ExponentialHistogramDataPoint) { - internal.FillTestMap(internal.NewMap(&tv.orig.Attributes)) + internal.FillTestMap(internal.NewMap(&tv.orig.Attributes, tv.state)) tv.orig.StartTimeUnixNano = 1234567890 tv.orig.TimeUnixNano = 1234567890 tv.orig.Count = uint64(17) - tv.orig.Sum_ = &otlpmetrics.ExponentialHistogramDataPoint_Sum{Sum: float64(17.13)} tv.orig.Scale = int32(4) tv.orig.ZeroCount = uint64(201) - fillTestExponentialHistogramDataPointBuckets(newExponentialHistogramDataPointBuckets(&tv.orig.Positive)) - fillTestExponentialHistogramDataPointBuckets(newExponentialHistogramDataPointBuckets(&tv.orig.Negative)) - fillTestExemplarSlice(newExemplarSlice(&tv.orig.Exemplars)) + fillTestExponentialHistogramDataPointBuckets(newExponentialHistogramDataPointBuckets(&tv.orig.Positive, tv.state)) + fillTestExponentialHistogramDataPointBuckets(newExponentialHistogramDataPointBuckets(&tv.orig.Negative, tv.state)) + fillTestExemplarSlice(newExemplarSlice(&tv.orig.Exemplars, tv.state)) tv.orig.Flags = 1 + tv.orig.Sum_ = &otlpmetrics.ExponentialHistogramDataPoint_Sum{Sum: float64(17.13)} tv.orig.Min_ = &otlpmetrics.ExponentialHistogramDataPoint_Min{Min: float64(9.23)} tv.orig.Max_ = &otlpmetrics.ExponentialHistogramDataPoint_Max{Max: float64(182.55)} + tv.orig.ZeroThreshold = float64(0.5) } diff --git a/pdata/pmetric/generated_exponentialhistogramdatapointbuckets.go b/pdata/pmetric/generated_exponentialhistogramdatapointbuckets.go index c0e1532909a..7acfbc627f3 100644 --- a/pdata/pmetric/generated_exponentialhistogramdatapointbuckets.go +++ b/pdata/pmetric/generated_exponentialhistogramdatapointbuckets.go @@ -20,11 +20,12 @@ import ( // Must use NewExponentialHistogramDataPointBuckets function to create new instances. // Important: zero-initialized instance is not valid for use. type ExponentialHistogramDataPointBuckets struct { - orig *otlpmetrics.ExponentialHistogramDataPoint_Buckets + orig *otlpmetrics.ExponentialHistogramDataPoint_Buckets + state *internal.State } -func newExponentialHistogramDataPointBuckets(orig *otlpmetrics.ExponentialHistogramDataPoint_Buckets) ExponentialHistogramDataPointBuckets { - return ExponentialHistogramDataPointBuckets{orig} +func newExponentialHistogramDataPointBuckets(orig *otlpmetrics.ExponentialHistogramDataPoint_Buckets, state *internal.State) ExponentialHistogramDataPointBuckets { + return ExponentialHistogramDataPointBuckets{orig: orig, state: state} } // NewExponentialHistogramDataPointBuckets creates a new empty ExponentialHistogramDataPointBuckets. @@ -32,12 +33,15 @@ func newExponentialHistogramDataPointBuckets(orig *otlpmetrics.ExponentialHistog // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewExponentialHistogramDataPointBuckets() ExponentialHistogramDataPointBuckets { - return newExponentialHistogramDataPointBuckets(&otlpmetrics.ExponentialHistogramDataPoint_Buckets{}) + state := internal.StateMutable + return newExponentialHistogramDataPointBuckets(&otlpmetrics.ExponentialHistogramDataPoint_Buckets{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms ExponentialHistogramDataPointBuckets) MoveTo(dest ExponentialHistogramDataPointBuckets) { + ms.state.AssertMutable() + dest.state.AssertMutable() *dest.orig = *ms.orig *ms.orig = otlpmetrics.ExponentialHistogramDataPoint_Buckets{} } @@ -49,16 +53,18 @@ func (ms ExponentialHistogramDataPointBuckets) Offset() int32 { // SetOffset replaces the offset associated with this ExponentialHistogramDataPointBuckets. func (ms ExponentialHistogramDataPointBuckets) SetOffset(v int32) { + ms.state.AssertMutable() ms.orig.Offset = v } // BucketCounts returns the bucketcounts associated with this ExponentialHistogramDataPointBuckets. func (ms ExponentialHistogramDataPointBuckets) BucketCounts() pcommon.UInt64Slice { - return pcommon.UInt64Slice(internal.NewUInt64Slice(&ms.orig.BucketCounts)) + return pcommon.UInt64Slice(internal.NewUInt64Slice(&ms.orig.BucketCounts, ms.state)) } // CopyTo copies all properties from the current struct overriding the destination. func (ms ExponentialHistogramDataPointBuckets) CopyTo(dest ExponentialHistogramDataPointBuckets) { + dest.state.AssertMutable() dest.SetOffset(ms.Offset()) ms.BucketCounts().CopyTo(dest.BucketCounts()) } diff --git a/pdata/pmetric/generated_exponentialhistogramdatapointbuckets_test.go b/pdata/pmetric/generated_exponentialhistogramdatapointbuckets_test.go index c1119861dbd..faf6e529f33 100644 --- a/pdata/pmetric/generated_exponentialhistogramdatapointbuckets_test.go +++ b/pdata/pmetric/generated_exponentialhistogramdatapointbuckets_test.go @@ -10,6 +10,9 @@ import ( "testing" "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) func TestExponentialHistogramDataPointBuckets_MoveTo(t *testing.T) { @@ -18,6 +21,13 @@ func TestExponentialHistogramDataPointBuckets_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewExponentialHistogramDataPointBuckets(), ms) assert.Equal(t, generateTestExponentialHistogramDataPointBuckets(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + ms.MoveTo(newExponentialHistogramDataPointBuckets(&otlpmetrics.ExponentialHistogramDataPoint_Buckets{}, &sharedState)) + }) + assert.Panics(t, func() { + newExponentialHistogramDataPointBuckets(&otlpmetrics.ExponentialHistogramDataPoint_Buckets{}, &sharedState).MoveTo(dest) + }) } func TestExponentialHistogramDataPointBuckets_CopyTo(t *testing.T) { @@ -28,6 +38,10 @@ func TestExponentialHistogramDataPointBuckets_CopyTo(t *testing.T) { orig = generateTestExponentialHistogramDataPointBuckets() orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + ms.CopyTo(newExponentialHistogramDataPointBuckets(&otlpmetrics.ExponentialHistogramDataPoint_Buckets{}, &sharedState)) + }) } func TestExponentialHistogramDataPointBuckets_Offset(t *testing.T) { @@ -35,6 +49,10 @@ func TestExponentialHistogramDataPointBuckets_Offset(t *testing.T) { assert.Equal(t, int32(0), ms.Offset()) ms.SetOffset(int32(909)) assert.Equal(t, int32(909), ms.Offset()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + newExponentialHistogramDataPointBuckets(&otlpmetrics.ExponentialHistogramDataPoint_Buckets{}, &sharedState).SetOffset(int32(909)) + }) } func TestExponentialHistogramDataPointBuckets_BucketCounts(t *testing.T) { diff --git a/pdata/pmetric/generated_exponentialhistogramdatapointslice.go b/pdata/pmetric/generated_exponentialhistogramdatapointslice.go index f2141d1e5c8..a466a7c185b 100644 --- a/pdata/pmetric/generated_exponentialhistogramdatapointslice.go +++ b/pdata/pmetric/generated_exponentialhistogramdatapointslice.go @@ -9,6 +9,7 @@ package pmetric import ( "sort" + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) @@ -20,18 +21,20 @@ import ( // Must use NewExponentialHistogramDataPointSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type ExponentialHistogramDataPointSlice struct { - orig *[]*otlpmetrics.ExponentialHistogramDataPoint + orig *[]*otlpmetrics.ExponentialHistogramDataPoint + state *internal.State } -func newExponentialHistogramDataPointSlice(orig *[]*otlpmetrics.ExponentialHistogramDataPoint) ExponentialHistogramDataPointSlice { - return ExponentialHistogramDataPointSlice{orig} +func newExponentialHistogramDataPointSlice(orig *[]*otlpmetrics.ExponentialHistogramDataPoint, state *internal.State) ExponentialHistogramDataPointSlice { + return ExponentialHistogramDataPointSlice{orig: orig, state: state} } // NewExponentialHistogramDataPointSlice creates a ExponentialHistogramDataPointSlice with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewExponentialHistogramDataPointSlice() ExponentialHistogramDataPointSlice { orig := []*otlpmetrics.ExponentialHistogramDataPoint(nil) - return newExponentialHistogramDataPointSlice(&orig) + state := internal.StateMutable + return newExponentialHistogramDataPointSlice(&orig, &state) } // Len returns the number of elements in the slice. @@ -50,7 +53,7 @@ func (es ExponentialHistogramDataPointSlice) Len() int { // ... // Do something with the element // } func (es ExponentialHistogramDataPointSlice) At(i int) ExponentialHistogramDataPoint { - return newExponentialHistogramDataPoint((*es.orig)[i]) + return newExponentialHistogramDataPoint((*es.orig)[i], es.state) } // EnsureCapacity is an operation that ensures the slice has at least the specified capacity. @@ -66,6 +69,7 @@ func (es ExponentialHistogramDataPointSlice) At(i int) ExponentialHistogramDataP // // Here should set all the values for e. // } func (es ExponentialHistogramDataPointSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() oldCap := cap(*es.orig) if newCap <= oldCap { return @@ -79,6 +83,7 @@ func (es ExponentialHistogramDataPointSlice) EnsureCapacity(newCap int) { // AppendEmpty will append to the end of the slice an empty ExponentialHistogramDataPoint. // It returns the newly added ExponentialHistogramDataPoint. func (es ExponentialHistogramDataPointSlice) AppendEmpty() ExponentialHistogramDataPoint { + es.state.AssertMutable() *es.orig = append(*es.orig, &otlpmetrics.ExponentialHistogramDataPoint{}) return es.At(es.Len() - 1) } @@ -86,6 +91,8 @@ func (es ExponentialHistogramDataPointSlice) AppendEmpty() ExponentialHistogramD // MoveAndAppendTo moves all elements from the current slice and appends them to the dest. // The current slice will be cleared. func (es ExponentialHistogramDataPointSlice) MoveAndAppendTo(dest ExponentialHistogramDataPointSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() if *dest.orig == nil { // We can simply move the entire vector and avoid any allocations. *dest.orig = *es.orig @@ -98,6 +105,7 @@ func (es ExponentialHistogramDataPointSlice) MoveAndAppendTo(dest ExponentialHis // RemoveIf calls f sequentially for each element present in the slice. // If f returns true, the element is removed from the slice. func (es ExponentialHistogramDataPointSlice) RemoveIf(f func(ExponentialHistogramDataPoint) bool) { + es.state.AssertMutable() newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { @@ -111,18 +119,18 @@ func (es ExponentialHistogramDataPointSlice) RemoveIf(f func(ExponentialHistogra (*es.orig)[newLen] = (*es.orig)[i] newLen++ } - // TODO: Prevent memory leak by erasing truncated values. *es.orig = (*es.orig)[:newLen] } // CopyTo copies all elements from the current slice overriding the destination. func (es ExponentialHistogramDataPointSlice) CopyTo(dest ExponentialHistogramDataPointSlice) { + dest.state.AssertMutable() srcLen := es.Len() destCap := cap(*dest.orig) if srcLen <= destCap { (*dest.orig) = (*dest.orig)[:srcLen:destCap] for i := range *es.orig { - newExponentialHistogramDataPoint((*es.orig)[i]).CopyTo(newExponentialHistogramDataPoint((*dest.orig)[i])) + newExponentialHistogramDataPoint((*es.orig)[i], es.state).CopyTo(newExponentialHistogramDataPoint((*dest.orig)[i], dest.state)) } return } @@ -130,7 +138,7 @@ func (es ExponentialHistogramDataPointSlice) CopyTo(dest ExponentialHistogramDat wrappers := make([]*otlpmetrics.ExponentialHistogramDataPoint, srcLen) for i := range *es.orig { wrappers[i] = &origs[i] - newExponentialHistogramDataPoint((*es.orig)[i]).CopyTo(newExponentialHistogramDataPoint(wrappers[i])) + newExponentialHistogramDataPoint((*es.orig)[i], es.state).CopyTo(newExponentialHistogramDataPoint(wrappers[i], dest.state)) } *dest.orig = wrappers } @@ -139,5 +147,6 @@ func (es ExponentialHistogramDataPointSlice) CopyTo(dest ExponentialHistogramDat // provided less function so that two instances of ExponentialHistogramDataPointSlice // can be compared. func (es ExponentialHistogramDataPointSlice) Sort(less func(a, b ExponentialHistogramDataPoint) bool) { + es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } diff --git a/pdata/pmetric/generated_exponentialhistogramdatapointslice_test.go b/pdata/pmetric/generated_exponentialhistogramdatapointslice_test.go index 6fd8a3f6de0..7c938c6ee22 100644 --- a/pdata/pmetric/generated_exponentialhistogramdatapointslice_test.go +++ b/pdata/pmetric/generated_exponentialhistogramdatapointslice_test.go @@ -12,13 +12,15 @@ import ( "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) func TestExponentialHistogramDataPointSlice(t *testing.T) { es := NewExponentialHistogramDataPointSlice() assert.Equal(t, 0, es.Len()) - es = newExponentialHistogramDataPointSlice(&[]*otlpmetrics.ExponentialHistogramDataPoint{}) + state := internal.StateMutable + es = newExponentialHistogramDataPointSlice(&[]*otlpmetrics.ExponentialHistogramDataPoint{}, &state) assert.Equal(t, 0, es.Len()) emptyVal := NewExponentialHistogramDataPoint() @@ -32,6 +34,19 @@ func TestExponentialHistogramDataPointSlice(t *testing.T) { assert.Equal(t, 7, es.Len()) } +func TestExponentialHistogramDataPointSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newExponentialHistogramDataPointSlice(&[]*otlpmetrics.ExponentialHistogramDataPoint{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewExponentialHistogramDataPointSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + func TestExponentialHistogramDataPointSlice_CopyTo(t *testing.T) { dest := NewExponentialHistogramDataPointSlice() // Test CopyTo to empty @@ -134,6 +149,6 @@ func fillTestExponentialHistogramDataPointSlice(es ExponentialHistogramDataPoint *es.orig = make([]*otlpmetrics.ExponentialHistogramDataPoint, 7) for i := 0; i < 7; i++ { (*es.orig)[i] = &otlpmetrics.ExponentialHistogramDataPoint{} - fillTestExponentialHistogramDataPoint(newExponentialHistogramDataPoint((*es.orig)[i])) + fillTestExponentialHistogramDataPoint(newExponentialHistogramDataPoint((*es.orig)[i], es.state)) } } diff --git a/pdata/pmetric/generated_gauge.go b/pdata/pmetric/generated_gauge.go index 6c74325b6de..ba572f9ca57 100644 --- a/pdata/pmetric/generated_gauge.go +++ b/pdata/pmetric/generated_gauge.go @@ -7,6 +7,7 @@ package pmetric import ( + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) @@ -18,11 +19,12 @@ import ( // Must use NewGauge function to create new instances. // Important: zero-initialized instance is not valid for use. type Gauge struct { - orig *otlpmetrics.Gauge + orig *otlpmetrics.Gauge + state *internal.State } -func newGauge(orig *otlpmetrics.Gauge) Gauge { - return Gauge{orig} +func newGauge(orig *otlpmetrics.Gauge, state *internal.State) Gauge { + return Gauge{orig: orig, state: state} } // NewGauge creates a new empty Gauge. @@ -30,22 +32,26 @@ func newGauge(orig *otlpmetrics.Gauge) Gauge { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewGauge() Gauge { - return newGauge(&otlpmetrics.Gauge{}) + state := internal.StateMutable + return newGauge(&otlpmetrics.Gauge{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms Gauge) MoveTo(dest Gauge) { + ms.state.AssertMutable() + dest.state.AssertMutable() *dest.orig = *ms.orig *ms.orig = otlpmetrics.Gauge{} } // DataPoints returns the DataPoints associated with this Gauge. func (ms Gauge) DataPoints() NumberDataPointSlice { - return newNumberDataPointSlice(&ms.orig.DataPoints) + return newNumberDataPointSlice(&ms.orig.DataPoints, ms.state) } // CopyTo copies all properties from the current struct overriding the destination. func (ms Gauge) CopyTo(dest Gauge) { + dest.state.AssertMutable() ms.DataPoints().CopyTo(dest.DataPoints()) } diff --git a/pdata/pmetric/generated_gauge_test.go b/pdata/pmetric/generated_gauge_test.go index 30b517cd05b..e1506be119b 100644 --- a/pdata/pmetric/generated_gauge_test.go +++ b/pdata/pmetric/generated_gauge_test.go @@ -10,6 +10,9 @@ import ( "testing" "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) func TestGauge_MoveTo(t *testing.T) { @@ -18,6 +21,9 @@ func TestGauge_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewGauge(), ms) assert.Equal(t, generateTestGauge(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newGauge(&otlpmetrics.Gauge{}, &sharedState)) }) + assert.Panics(t, func() { newGauge(&otlpmetrics.Gauge{}, &sharedState).MoveTo(dest) }) } func TestGauge_CopyTo(t *testing.T) { @@ -28,6 +34,8 @@ func TestGauge_CopyTo(t *testing.T) { orig = generateTestGauge() orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newGauge(&otlpmetrics.Gauge{}, &sharedState)) }) } func TestGauge_DataPoints(t *testing.T) { @@ -44,5 +52,5 @@ func generateTestGauge() Gauge { } func fillTestGauge(tv Gauge) { - fillTestNumberDataPointSlice(newNumberDataPointSlice(&tv.orig.DataPoints)) + fillTestNumberDataPointSlice(newNumberDataPointSlice(&tv.orig.DataPoints, tv.state)) } diff --git a/pdata/pmetric/generated_histogram.go b/pdata/pmetric/generated_histogram.go index a32114b86ed..950fb13127e 100644 --- a/pdata/pmetric/generated_histogram.go +++ b/pdata/pmetric/generated_histogram.go @@ -7,6 +7,7 @@ package pmetric import ( + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) @@ -18,11 +19,12 @@ import ( // Must use NewHistogram function to create new instances. // Important: zero-initialized instance is not valid for use. type Histogram struct { - orig *otlpmetrics.Histogram + orig *otlpmetrics.Histogram + state *internal.State } -func newHistogram(orig *otlpmetrics.Histogram) Histogram { - return Histogram{orig} +func newHistogram(orig *otlpmetrics.Histogram, state *internal.State) Histogram { + return Histogram{orig: orig, state: state} } // NewHistogram creates a new empty Histogram. @@ -30,12 +32,15 @@ func newHistogram(orig *otlpmetrics.Histogram) Histogram { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewHistogram() Histogram { - return newHistogram(&otlpmetrics.Histogram{}) + state := internal.StateMutable + return newHistogram(&otlpmetrics.Histogram{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms Histogram) MoveTo(dest Histogram) { + ms.state.AssertMutable() + dest.state.AssertMutable() *dest.orig = *ms.orig *ms.orig = otlpmetrics.Histogram{} } @@ -47,16 +52,18 @@ func (ms Histogram) AggregationTemporality() AggregationTemporality { // SetAggregationTemporality replaces the aggregationtemporality associated with this Histogram. func (ms Histogram) SetAggregationTemporality(v AggregationTemporality) { + ms.state.AssertMutable() ms.orig.AggregationTemporality = otlpmetrics.AggregationTemporality(v) } // DataPoints returns the DataPoints associated with this Histogram. func (ms Histogram) DataPoints() HistogramDataPointSlice { - return newHistogramDataPointSlice(&ms.orig.DataPoints) + return newHistogramDataPointSlice(&ms.orig.DataPoints, ms.state) } // CopyTo copies all properties from the current struct overriding the destination. func (ms Histogram) CopyTo(dest Histogram) { + dest.state.AssertMutable() dest.SetAggregationTemporality(ms.AggregationTemporality()) ms.DataPoints().CopyTo(dest.DataPoints()) } diff --git a/pdata/pmetric/generated_histogram_test.go b/pdata/pmetric/generated_histogram_test.go index b710fddbca0..8eb2dc9dda4 100644 --- a/pdata/pmetric/generated_histogram_test.go +++ b/pdata/pmetric/generated_histogram_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) @@ -20,6 +21,9 @@ func TestHistogram_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewHistogram(), ms) assert.Equal(t, generateTestHistogram(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newHistogram(&otlpmetrics.Histogram{}, &sharedState)) }) + assert.Panics(t, func() { newHistogram(&otlpmetrics.Histogram{}, &sharedState).MoveTo(dest) }) } func TestHistogram_CopyTo(t *testing.T) { @@ -30,6 +34,8 @@ func TestHistogram_CopyTo(t *testing.T) { orig = generateTestHistogram() orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newHistogram(&otlpmetrics.Histogram{}, &sharedState)) }) } func TestHistogram_AggregationTemporality(t *testing.T) { @@ -55,5 +61,5 @@ func generateTestHistogram() Histogram { func fillTestHistogram(tv Histogram) { tv.orig.AggregationTemporality = otlpmetrics.AggregationTemporality(1) - fillTestHistogramDataPointSlice(newHistogramDataPointSlice(&tv.orig.DataPoints)) + fillTestHistogramDataPointSlice(newHistogramDataPointSlice(&tv.orig.DataPoints, tv.state)) } diff --git a/pdata/pmetric/generated_histogramdatapoint.go b/pdata/pmetric/generated_histogramdatapoint.go index 2901f42f986..22dc32344a2 100644 --- a/pdata/pmetric/generated_histogramdatapoint.go +++ b/pdata/pmetric/generated_histogramdatapoint.go @@ -20,11 +20,12 @@ import ( // Must use NewHistogramDataPoint function to create new instances. // Important: zero-initialized instance is not valid for use. type HistogramDataPoint struct { - orig *otlpmetrics.HistogramDataPoint + orig *otlpmetrics.HistogramDataPoint + state *internal.State } -func newHistogramDataPoint(orig *otlpmetrics.HistogramDataPoint) HistogramDataPoint { - return HistogramDataPoint{orig} +func newHistogramDataPoint(orig *otlpmetrics.HistogramDataPoint, state *internal.State) HistogramDataPoint { + return HistogramDataPoint{orig: orig, state: state} } // NewHistogramDataPoint creates a new empty HistogramDataPoint. @@ -32,19 +33,22 @@ func newHistogramDataPoint(orig *otlpmetrics.HistogramDataPoint) HistogramDataPo // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewHistogramDataPoint() HistogramDataPoint { - return newHistogramDataPoint(&otlpmetrics.HistogramDataPoint{}) + state := internal.StateMutable + return newHistogramDataPoint(&otlpmetrics.HistogramDataPoint{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms HistogramDataPoint) MoveTo(dest HistogramDataPoint) { + ms.state.AssertMutable() + dest.state.AssertMutable() *dest.orig = *ms.orig *ms.orig = otlpmetrics.HistogramDataPoint{} } // Attributes returns the Attributes associated with this HistogramDataPoint. func (ms HistogramDataPoint) Attributes() pcommon.Map { - return pcommon.Map(internal.NewMap(&ms.orig.Attributes)) + return pcommon.Map(internal.NewMap(&ms.orig.Attributes, ms.state)) } // StartTimestamp returns the starttimestamp associated with this HistogramDataPoint. @@ -54,6 +58,7 @@ func (ms HistogramDataPoint) StartTimestamp() pcommon.Timestamp { // SetStartTimestamp replaces the starttimestamp associated with this HistogramDataPoint. func (ms HistogramDataPoint) SetStartTimestamp(v pcommon.Timestamp) { + ms.state.AssertMutable() ms.orig.StartTimeUnixNano = uint64(v) } @@ -64,6 +69,7 @@ func (ms HistogramDataPoint) Timestamp() pcommon.Timestamp { // SetTimestamp replaces the timestamp associated with this HistogramDataPoint. func (ms HistogramDataPoint) SetTimestamp(v pcommon.Timestamp) { + ms.state.AssertMutable() ms.orig.TimeUnixNano = uint64(v) } @@ -74,43 +80,23 @@ func (ms HistogramDataPoint) Count() uint64 { // SetCount replaces the count associated with this HistogramDataPoint. func (ms HistogramDataPoint) SetCount(v uint64) { + ms.state.AssertMutable() ms.orig.Count = v } -// Sum returns the sum associated with this HistogramDataPoint. -func (ms HistogramDataPoint) Sum() float64 { - return ms.orig.GetSum() -} - -// HasSum returns true if the HistogramDataPoint contains a -// Sum value, false otherwise. -func (ms HistogramDataPoint) HasSum() bool { - return ms.orig.Sum_ != nil -} - -// SetSum replaces the sum associated with this HistogramDataPoint. -func (ms HistogramDataPoint) SetSum(v float64) { - ms.orig.Sum_ = &otlpmetrics.HistogramDataPoint_Sum{Sum: v} -} - -// RemoveSum removes the sum associated with this HistogramDataPoint. -func (ms HistogramDataPoint) RemoveSum() { - ms.orig.Sum_ = nil -} - // BucketCounts returns the bucketcounts associated with this HistogramDataPoint. func (ms HistogramDataPoint) BucketCounts() pcommon.UInt64Slice { - return pcommon.UInt64Slice(internal.NewUInt64Slice(&ms.orig.BucketCounts)) + return pcommon.UInt64Slice(internal.NewUInt64Slice(&ms.orig.BucketCounts, ms.state)) } // ExplicitBounds returns the explicitbounds associated with this HistogramDataPoint. func (ms HistogramDataPoint) ExplicitBounds() pcommon.Float64Slice { - return pcommon.Float64Slice(internal.NewFloat64Slice(&ms.orig.ExplicitBounds)) + return pcommon.Float64Slice(internal.NewFloat64Slice(&ms.orig.ExplicitBounds, ms.state)) } // Exemplars returns the Exemplars associated with this HistogramDataPoint. func (ms HistogramDataPoint) Exemplars() ExemplarSlice { - return newExemplarSlice(&ms.orig.Exemplars) + return newExemplarSlice(&ms.orig.Exemplars, ms.state) } // Flags returns the flags associated with this HistogramDataPoint. @@ -120,9 +106,33 @@ func (ms HistogramDataPoint) Flags() DataPointFlags { // SetFlags replaces the flags associated with this HistogramDataPoint. func (ms HistogramDataPoint) SetFlags(v DataPointFlags) { + ms.state.AssertMutable() ms.orig.Flags = uint32(v) } +// Sum returns the sum associated with this HistogramDataPoint. +func (ms HistogramDataPoint) Sum() float64 { + return ms.orig.GetSum() +} + +// HasSum returns true if the HistogramDataPoint contains a +// Sum value, false otherwise. +func (ms HistogramDataPoint) HasSum() bool { + return ms.orig.Sum_ != nil +} + +// SetSum replaces the sum associated with this HistogramDataPoint. +func (ms HistogramDataPoint) SetSum(v float64) { + ms.state.AssertMutable() + ms.orig.Sum_ = &otlpmetrics.HistogramDataPoint_Sum{Sum: v} +} + +// RemoveSum removes the sum associated with this HistogramDataPoint. +func (ms HistogramDataPoint) RemoveSum() { + ms.state.AssertMutable() + ms.orig.Sum_ = nil +} + // Min returns the min associated with this HistogramDataPoint. func (ms HistogramDataPoint) Min() float64 { return ms.orig.GetMin() @@ -136,11 +146,13 @@ func (ms HistogramDataPoint) HasMin() bool { // SetMin replaces the min associated with this HistogramDataPoint. func (ms HistogramDataPoint) SetMin(v float64) { + ms.state.AssertMutable() ms.orig.Min_ = &otlpmetrics.HistogramDataPoint_Min{Min: v} } // RemoveMin removes the min associated with this HistogramDataPoint. func (ms HistogramDataPoint) RemoveMin() { + ms.state.AssertMutable() ms.orig.Min_ = nil } @@ -157,28 +169,31 @@ func (ms HistogramDataPoint) HasMax() bool { // SetMax replaces the max associated with this HistogramDataPoint. func (ms HistogramDataPoint) SetMax(v float64) { + ms.state.AssertMutable() ms.orig.Max_ = &otlpmetrics.HistogramDataPoint_Max{Max: v} } // RemoveMax removes the max associated with this HistogramDataPoint. func (ms HistogramDataPoint) RemoveMax() { + ms.state.AssertMutable() ms.orig.Max_ = nil } // CopyTo copies all properties from the current struct overriding the destination. func (ms HistogramDataPoint) CopyTo(dest HistogramDataPoint) { + dest.state.AssertMutable() ms.Attributes().CopyTo(dest.Attributes()) dest.SetStartTimestamp(ms.StartTimestamp()) dest.SetTimestamp(ms.Timestamp()) dest.SetCount(ms.Count()) - if ms.HasSum() { - dest.SetSum(ms.Sum()) - } - ms.BucketCounts().CopyTo(dest.BucketCounts()) ms.ExplicitBounds().CopyTo(dest.ExplicitBounds()) ms.Exemplars().CopyTo(dest.Exemplars()) dest.SetFlags(ms.Flags()) + if ms.HasSum() { + dest.SetSum(ms.Sum()) + } + if ms.HasMin() { dest.SetMin(ms.Min()) } diff --git a/pdata/pmetric/generated_histogramdatapoint_test.go b/pdata/pmetric/generated_histogramdatapoint_test.go index 9abc137c174..716cebd4cbf 100644 --- a/pdata/pmetric/generated_histogramdatapoint_test.go +++ b/pdata/pmetric/generated_histogramdatapoint_test.go @@ -22,6 +22,9 @@ func TestHistogramDataPoint_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewHistogramDataPoint(), ms) assert.Equal(t, generateTestHistogramDataPoint(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newHistogramDataPoint(&otlpmetrics.HistogramDataPoint{}, &sharedState)) }) + assert.Panics(t, func() { newHistogramDataPoint(&otlpmetrics.HistogramDataPoint{}, &sharedState).MoveTo(dest) }) } func TestHistogramDataPoint_CopyTo(t *testing.T) { @@ -32,6 +35,8 @@ func TestHistogramDataPoint_CopyTo(t *testing.T) { orig = generateTestHistogramDataPoint() orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newHistogramDataPoint(&otlpmetrics.HistogramDataPoint{}, &sharedState)) }) } func TestHistogramDataPoint_Attributes(t *testing.T) { @@ -62,16 +67,8 @@ func TestHistogramDataPoint_Count(t *testing.T) { assert.Equal(t, uint64(0), ms.Count()) ms.SetCount(uint64(17)) assert.Equal(t, uint64(17), ms.Count()) -} - -func TestHistogramDataPoint_Sum(t *testing.T) { - ms := NewHistogramDataPoint() - assert.Equal(t, float64(0.0), ms.Sum()) - ms.SetSum(float64(17.13)) - assert.True(t, ms.HasSum()) - assert.Equal(t, float64(17.13), ms.Sum()) - ms.RemoveSum() - assert.False(t, ms.HasSum()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newHistogramDataPoint(&otlpmetrics.HistogramDataPoint{}, &sharedState).SetCount(uint64(17)) }) } func TestHistogramDataPoint_BucketCounts(t *testing.T) { @@ -103,6 +100,16 @@ func TestHistogramDataPoint_Flags(t *testing.T) { assert.Equal(t, testValFlags, ms.Flags()) } +func TestHistogramDataPoint_Sum(t *testing.T) { + ms := NewHistogramDataPoint() + assert.Equal(t, float64(0.0), ms.Sum()) + ms.SetSum(float64(17.13)) + assert.True(t, ms.HasSum()) + assert.Equal(t, float64(17.13), ms.Sum()) + ms.RemoveSum() + assert.False(t, ms.HasSum()) +} + func TestHistogramDataPoint_Min(t *testing.T) { ms := NewHistogramDataPoint() assert.Equal(t, float64(0.0), ms.Min()) @@ -130,15 +137,15 @@ func generateTestHistogramDataPoint() HistogramDataPoint { } func fillTestHistogramDataPoint(tv HistogramDataPoint) { - internal.FillTestMap(internal.NewMap(&tv.orig.Attributes)) + internal.FillTestMap(internal.NewMap(&tv.orig.Attributes, tv.state)) tv.orig.StartTimeUnixNano = 1234567890 tv.orig.TimeUnixNano = 1234567890 tv.orig.Count = uint64(17) - tv.orig.Sum_ = &otlpmetrics.HistogramDataPoint_Sum{Sum: float64(17.13)} tv.orig.BucketCounts = []uint64{1, 2, 3} tv.orig.ExplicitBounds = []float64{1, 2, 3} - fillTestExemplarSlice(newExemplarSlice(&tv.orig.Exemplars)) + fillTestExemplarSlice(newExemplarSlice(&tv.orig.Exemplars, tv.state)) tv.orig.Flags = 1 + tv.orig.Sum_ = &otlpmetrics.HistogramDataPoint_Sum{Sum: float64(17.13)} tv.orig.Min_ = &otlpmetrics.HistogramDataPoint_Min{Min: float64(9.23)} tv.orig.Max_ = &otlpmetrics.HistogramDataPoint_Max{Max: float64(182.55)} } diff --git a/pdata/pmetric/generated_histogramdatapointslice.go b/pdata/pmetric/generated_histogramdatapointslice.go index 27a018ed89b..7ee6ef737f8 100644 --- a/pdata/pmetric/generated_histogramdatapointslice.go +++ b/pdata/pmetric/generated_histogramdatapointslice.go @@ -9,6 +9,7 @@ package pmetric import ( "sort" + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) @@ -20,18 +21,20 @@ import ( // Must use NewHistogramDataPointSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type HistogramDataPointSlice struct { - orig *[]*otlpmetrics.HistogramDataPoint + orig *[]*otlpmetrics.HistogramDataPoint + state *internal.State } -func newHistogramDataPointSlice(orig *[]*otlpmetrics.HistogramDataPoint) HistogramDataPointSlice { - return HistogramDataPointSlice{orig} +func newHistogramDataPointSlice(orig *[]*otlpmetrics.HistogramDataPoint, state *internal.State) HistogramDataPointSlice { + return HistogramDataPointSlice{orig: orig, state: state} } // NewHistogramDataPointSlice creates a HistogramDataPointSlice with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewHistogramDataPointSlice() HistogramDataPointSlice { orig := []*otlpmetrics.HistogramDataPoint(nil) - return newHistogramDataPointSlice(&orig) + state := internal.StateMutable + return newHistogramDataPointSlice(&orig, &state) } // Len returns the number of elements in the slice. @@ -50,7 +53,7 @@ func (es HistogramDataPointSlice) Len() int { // ... // Do something with the element // } func (es HistogramDataPointSlice) At(i int) HistogramDataPoint { - return newHistogramDataPoint((*es.orig)[i]) + return newHistogramDataPoint((*es.orig)[i], es.state) } // EnsureCapacity is an operation that ensures the slice has at least the specified capacity. @@ -66,6 +69,7 @@ func (es HistogramDataPointSlice) At(i int) HistogramDataPoint { // // Here should set all the values for e. // } func (es HistogramDataPointSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() oldCap := cap(*es.orig) if newCap <= oldCap { return @@ -79,6 +83,7 @@ func (es HistogramDataPointSlice) EnsureCapacity(newCap int) { // AppendEmpty will append to the end of the slice an empty HistogramDataPoint. // It returns the newly added HistogramDataPoint. func (es HistogramDataPointSlice) AppendEmpty() HistogramDataPoint { + es.state.AssertMutable() *es.orig = append(*es.orig, &otlpmetrics.HistogramDataPoint{}) return es.At(es.Len() - 1) } @@ -86,6 +91,8 @@ func (es HistogramDataPointSlice) AppendEmpty() HistogramDataPoint { // MoveAndAppendTo moves all elements from the current slice and appends them to the dest. // The current slice will be cleared. func (es HistogramDataPointSlice) MoveAndAppendTo(dest HistogramDataPointSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() if *dest.orig == nil { // We can simply move the entire vector and avoid any allocations. *dest.orig = *es.orig @@ -98,6 +105,7 @@ func (es HistogramDataPointSlice) MoveAndAppendTo(dest HistogramDataPointSlice) // RemoveIf calls f sequentially for each element present in the slice. // If f returns true, the element is removed from the slice. func (es HistogramDataPointSlice) RemoveIf(f func(HistogramDataPoint) bool) { + es.state.AssertMutable() newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { @@ -111,18 +119,18 @@ func (es HistogramDataPointSlice) RemoveIf(f func(HistogramDataPoint) bool) { (*es.orig)[newLen] = (*es.orig)[i] newLen++ } - // TODO: Prevent memory leak by erasing truncated values. *es.orig = (*es.orig)[:newLen] } // CopyTo copies all elements from the current slice overriding the destination. func (es HistogramDataPointSlice) CopyTo(dest HistogramDataPointSlice) { + dest.state.AssertMutable() srcLen := es.Len() destCap := cap(*dest.orig) if srcLen <= destCap { (*dest.orig) = (*dest.orig)[:srcLen:destCap] for i := range *es.orig { - newHistogramDataPoint((*es.orig)[i]).CopyTo(newHistogramDataPoint((*dest.orig)[i])) + newHistogramDataPoint((*es.orig)[i], es.state).CopyTo(newHistogramDataPoint((*dest.orig)[i], dest.state)) } return } @@ -130,7 +138,7 @@ func (es HistogramDataPointSlice) CopyTo(dest HistogramDataPointSlice) { wrappers := make([]*otlpmetrics.HistogramDataPoint, srcLen) for i := range *es.orig { wrappers[i] = &origs[i] - newHistogramDataPoint((*es.orig)[i]).CopyTo(newHistogramDataPoint(wrappers[i])) + newHistogramDataPoint((*es.orig)[i], es.state).CopyTo(newHistogramDataPoint(wrappers[i], dest.state)) } *dest.orig = wrappers } @@ -139,5 +147,6 @@ func (es HistogramDataPointSlice) CopyTo(dest HistogramDataPointSlice) { // provided less function so that two instances of HistogramDataPointSlice // can be compared. func (es HistogramDataPointSlice) Sort(less func(a, b HistogramDataPoint) bool) { + es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } diff --git a/pdata/pmetric/generated_histogramdatapointslice_test.go b/pdata/pmetric/generated_histogramdatapointslice_test.go index 390b7277d7c..bcf4305b993 100644 --- a/pdata/pmetric/generated_histogramdatapointslice_test.go +++ b/pdata/pmetric/generated_histogramdatapointslice_test.go @@ -12,13 +12,15 @@ import ( "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) func TestHistogramDataPointSlice(t *testing.T) { es := NewHistogramDataPointSlice() assert.Equal(t, 0, es.Len()) - es = newHistogramDataPointSlice(&[]*otlpmetrics.HistogramDataPoint{}) + state := internal.StateMutable + es = newHistogramDataPointSlice(&[]*otlpmetrics.HistogramDataPoint{}, &state) assert.Equal(t, 0, es.Len()) emptyVal := NewHistogramDataPoint() @@ -32,6 +34,19 @@ func TestHistogramDataPointSlice(t *testing.T) { assert.Equal(t, 7, es.Len()) } +func TestHistogramDataPointSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newHistogramDataPointSlice(&[]*otlpmetrics.HistogramDataPoint{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewHistogramDataPointSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + func TestHistogramDataPointSlice_CopyTo(t *testing.T) { dest := NewHistogramDataPointSlice() // Test CopyTo to empty @@ -134,6 +149,6 @@ func fillTestHistogramDataPointSlice(es HistogramDataPointSlice) { *es.orig = make([]*otlpmetrics.HistogramDataPoint, 7) for i := 0; i < 7; i++ { (*es.orig)[i] = &otlpmetrics.HistogramDataPoint{} - fillTestHistogramDataPoint(newHistogramDataPoint((*es.orig)[i])) + fillTestHistogramDataPoint(newHistogramDataPoint((*es.orig)[i], es.state)) } } diff --git a/pdata/pmetric/generated_metric.go b/pdata/pmetric/generated_metric.go index aba0d8e04df..839628520df 100644 --- a/pdata/pmetric/generated_metric.go +++ b/pdata/pmetric/generated_metric.go @@ -7,6 +7,7 @@ package pmetric import ( + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) @@ -19,11 +20,12 @@ import ( // Must use NewMetric function to create new instances. // Important: zero-initialized instance is not valid for use. type Metric struct { - orig *otlpmetrics.Metric + orig *otlpmetrics.Metric + state *internal.State } -func newMetric(orig *otlpmetrics.Metric) Metric { - return Metric{orig} +func newMetric(orig *otlpmetrics.Metric, state *internal.State) Metric { + return Metric{orig: orig, state: state} } // NewMetric creates a new empty Metric. @@ -31,12 +33,15 @@ func newMetric(orig *otlpmetrics.Metric) Metric { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewMetric() Metric { - return newMetric(&otlpmetrics.Metric{}) + state := internal.StateMutable + return newMetric(&otlpmetrics.Metric{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms Metric) MoveTo(dest Metric) { + ms.state.AssertMutable() + dest.state.AssertMutable() *dest.orig = *ms.orig *ms.orig = otlpmetrics.Metric{} } @@ -48,6 +53,7 @@ func (ms Metric) Name() string { // SetName replaces the name associated with this Metric. func (ms Metric) SetName(v string) { + ms.state.AssertMutable() ms.orig.Name = v } @@ -58,6 +64,7 @@ func (ms Metric) Description() string { // SetDescription replaces the description associated with this Metric. func (ms Metric) SetDescription(v string) { + ms.state.AssertMutable() ms.orig.Description = v } @@ -68,6 +75,7 @@ func (ms Metric) Unit() string { // SetUnit replaces the unit associated with this Metric. func (ms Metric) SetUnit(v string) { + ms.state.AssertMutable() ms.orig.Unit = v } @@ -100,7 +108,7 @@ func (ms Metric) Gauge() Gauge { if !ok { return Gauge{} } - return newGauge(v.Gauge) + return newGauge(v.Gauge, ms.state) } // SetEmptyGauge sets an empty gauge to this Metric. @@ -109,9 +117,10 @@ func (ms Metric) Gauge() Gauge { // // Calling this function on zero-initialized Metric will cause a panic. func (ms Metric) SetEmptyGauge() Gauge { + ms.state.AssertMutable() val := &otlpmetrics.Gauge{} ms.orig.Data = &otlpmetrics.Metric_Gauge{Gauge: val} - return newGauge(val) + return newGauge(val, ms.state) } // Sum returns the sum associated with this Metric. @@ -125,7 +134,7 @@ func (ms Metric) Sum() Sum { if !ok { return Sum{} } - return newSum(v.Sum) + return newSum(v.Sum, ms.state) } // SetEmptySum sets an empty sum to this Metric. @@ -134,9 +143,10 @@ func (ms Metric) Sum() Sum { // // Calling this function on zero-initialized Metric will cause a panic. func (ms Metric) SetEmptySum() Sum { + ms.state.AssertMutable() val := &otlpmetrics.Sum{} ms.orig.Data = &otlpmetrics.Metric_Sum{Sum: val} - return newSum(val) + return newSum(val, ms.state) } // Histogram returns the histogram associated with this Metric. @@ -150,7 +160,7 @@ func (ms Metric) Histogram() Histogram { if !ok { return Histogram{} } - return newHistogram(v.Histogram) + return newHistogram(v.Histogram, ms.state) } // SetEmptyHistogram sets an empty histogram to this Metric. @@ -159,9 +169,10 @@ func (ms Metric) Histogram() Histogram { // // Calling this function on zero-initialized Metric will cause a panic. func (ms Metric) SetEmptyHistogram() Histogram { + ms.state.AssertMutable() val := &otlpmetrics.Histogram{} ms.orig.Data = &otlpmetrics.Metric_Histogram{Histogram: val} - return newHistogram(val) + return newHistogram(val, ms.state) } // ExponentialHistogram returns the exponentialhistogram associated with this Metric. @@ -175,7 +186,7 @@ func (ms Metric) ExponentialHistogram() ExponentialHistogram { if !ok { return ExponentialHistogram{} } - return newExponentialHistogram(v.ExponentialHistogram) + return newExponentialHistogram(v.ExponentialHistogram, ms.state) } // SetEmptyExponentialHistogram sets an empty exponentialhistogram to this Metric. @@ -184,9 +195,10 @@ func (ms Metric) ExponentialHistogram() ExponentialHistogram { // // Calling this function on zero-initialized Metric will cause a panic. func (ms Metric) SetEmptyExponentialHistogram() ExponentialHistogram { + ms.state.AssertMutable() val := &otlpmetrics.ExponentialHistogram{} ms.orig.Data = &otlpmetrics.Metric_ExponentialHistogram{ExponentialHistogram: val} - return newExponentialHistogram(val) + return newExponentialHistogram(val, ms.state) } // Summary returns the summary associated with this Metric. @@ -200,7 +212,7 @@ func (ms Metric) Summary() Summary { if !ok { return Summary{} } - return newSummary(v.Summary) + return newSummary(v.Summary, ms.state) } // SetEmptySummary sets an empty summary to this Metric. @@ -209,13 +221,15 @@ func (ms Metric) Summary() Summary { // // Calling this function on zero-initialized Metric will cause a panic. func (ms Metric) SetEmptySummary() Summary { + ms.state.AssertMutable() val := &otlpmetrics.Summary{} ms.orig.Data = &otlpmetrics.Metric_Summary{Summary: val} - return newSummary(val) + return newSummary(val, ms.state) } // CopyTo copies all properties from the current struct overriding the destination. func (ms Metric) CopyTo(dest Metric) { + dest.state.AssertMutable() dest.SetName(ms.Name()) dest.SetDescription(ms.Description()) dest.SetUnit(ms.Unit()) diff --git a/pdata/pmetric/generated_metric_test.go b/pdata/pmetric/generated_metric_test.go index 3dfdedd8627..920891b6096 100644 --- a/pdata/pmetric/generated_metric_test.go +++ b/pdata/pmetric/generated_metric_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) @@ -20,6 +21,9 @@ func TestMetric_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewMetric(), ms) assert.Equal(t, generateTestMetric(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newMetric(&otlpmetrics.Metric{}, &sharedState)) }) + assert.Panics(t, func() { newMetric(&otlpmetrics.Metric{}, &sharedState).MoveTo(dest) }) } func TestMetric_CopyTo(t *testing.T) { @@ -30,6 +34,8 @@ func TestMetric_CopyTo(t *testing.T) { orig = generateTestMetric() orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newMetric(&otlpmetrics.Metric{}, &sharedState)) }) } func TestMetric_Name(t *testing.T) { @@ -37,6 +43,8 @@ func TestMetric_Name(t *testing.T) { assert.Equal(t, "", ms.Name()) ms.SetName("test_name") assert.Equal(t, "test_name", ms.Name()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newMetric(&otlpmetrics.Metric{}, &sharedState).SetName("test_name") }) } func TestMetric_Description(t *testing.T) { @@ -44,6 +52,8 @@ func TestMetric_Description(t *testing.T) { assert.Equal(t, "", ms.Description()) ms.SetDescription("test_description") assert.Equal(t, "test_description", ms.Description()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newMetric(&otlpmetrics.Metric{}, &sharedState).SetDescription("test_description") }) } func TestMetric_Unit(t *testing.T) { @@ -51,6 +61,8 @@ func TestMetric_Unit(t *testing.T) { assert.Equal(t, "", ms.Unit()) ms.SetUnit("1") assert.Equal(t, "1", ms.Unit()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newMetric(&otlpmetrics.Metric{}, &sharedState).SetUnit("1") }) } func TestMetric_Type(t *testing.T) { @@ -63,6 +75,8 @@ func TestMetric_Gauge(t *testing.T) { fillTestGauge(ms.SetEmptyGauge()) assert.Equal(t, MetricTypeGauge, ms.Type()) assert.Equal(t, generateTestGauge(), ms.Gauge()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newMetric(&otlpmetrics.Metric{}, &sharedState).SetEmptyGauge() }) } func TestMetric_CopyTo_Gauge(t *testing.T) { @@ -71,6 +85,8 @@ func TestMetric_CopyTo_Gauge(t *testing.T) { dest := NewMetric() ms.CopyTo(dest) assert.Equal(t, ms, dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newMetric(&otlpmetrics.Metric{}, &sharedState)) }) } func TestMetric_Sum(t *testing.T) { @@ -78,6 +94,8 @@ func TestMetric_Sum(t *testing.T) { fillTestSum(ms.SetEmptySum()) assert.Equal(t, MetricTypeSum, ms.Type()) assert.Equal(t, generateTestSum(), ms.Sum()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newMetric(&otlpmetrics.Metric{}, &sharedState).SetEmptySum() }) } func TestMetric_CopyTo_Sum(t *testing.T) { @@ -86,6 +104,8 @@ func TestMetric_CopyTo_Sum(t *testing.T) { dest := NewMetric() ms.CopyTo(dest) assert.Equal(t, ms, dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newMetric(&otlpmetrics.Metric{}, &sharedState)) }) } func TestMetric_Histogram(t *testing.T) { @@ -93,6 +113,8 @@ func TestMetric_Histogram(t *testing.T) { fillTestHistogram(ms.SetEmptyHistogram()) assert.Equal(t, MetricTypeHistogram, ms.Type()) assert.Equal(t, generateTestHistogram(), ms.Histogram()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newMetric(&otlpmetrics.Metric{}, &sharedState).SetEmptyHistogram() }) } func TestMetric_CopyTo_Histogram(t *testing.T) { @@ -101,6 +123,8 @@ func TestMetric_CopyTo_Histogram(t *testing.T) { dest := NewMetric() ms.CopyTo(dest) assert.Equal(t, ms, dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newMetric(&otlpmetrics.Metric{}, &sharedState)) }) } func TestMetric_ExponentialHistogram(t *testing.T) { @@ -108,6 +132,8 @@ func TestMetric_ExponentialHistogram(t *testing.T) { fillTestExponentialHistogram(ms.SetEmptyExponentialHistogram()) assert.Equal(t, MetricTypeExponentialHistogram, ms.Type()) assert.Equal(t, generateTestExponentialHistogram(), ms.ExponentialHistogram()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newMetric(&otlpmetrics.Metric{}, &sharedState).SetEmptyExponentialHistogram() }) } func TestMetric_CopyTo_ExponentialHistogram(t *testing.T) { @@ -116,6 +142,8 @@ func TestMetric_CopyTo_ExponentialHistogram(t *testing.T) { dest := NewMetric() ms.CopyTo(dest) assert.Equal(t, ms, dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newMetric(&otlpmetrics.Metric{}, &sharedState)) }) } func TestMetric_Summary(t *testing.T) { @@ -123,6 +151,8 @@ func TestMetric_Summary(t *testing.T) { fillTestSummary(ms.SetEmptySummary()) assert.Equal(t, MetricTypeSummary, ms.Type()) assert.Equal(t, generateTestSummary(), ms.Summary()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newMetric(&otlpmetrics.Metric{}, &sharedState).SetEmptySummary() }) } func TestMetric_CopyTo_Summary(t *testing.T) { @@ -131,6 +161,8 @@ func TestMetric_CopyTo_Summary(t *testing.T) { dest := NewMetric() ms.CopyTo(dest) assert.Equal(t, ms, dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newMetric(&otlpmetrics.Metric{}, &sharedState)) }) } func generateTestMetric() Metric { @@ -144,5 +176,5 @@ func fillTestMetric(tv Metric) { tv.orig.Description = "test_description" tv.orig.Unit = "1" tv.orig.Data = &otlpmetrics.Metric_Sum{Sum: &otlpmetrics.Sum{}} - fillTestSum(newSum(tv.orig.GetSum())) + fillTestSum(newSum(tv.orig.GetSum(), tv.state)) } diff --git a/pdata/pmetric/generated_metricslice.go b/pdata/pmetric/generated_metricslice.go index a4e3b7940cf..13f05a0ecbc 100644 --- a/pdata/pmetric/generated_metricslice.go +++ b/pdata/pmetric/generated_metricslice.go @@ -9,6 +9,7 @@ package pmetric import ( "sort" + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) @@ -20,18 +21,20 @@ import ( // Must use NewMetricSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type MetricSlice struct { - orig *[]*otlpmetrics.Metric + orig *[]*otlpmetrics.Metric + state *internal.State } -func newMetricSlice(orig *[]*otlpmetrics.Metric) MetricSlice { - return MetricSlice{orig} +func newMetricSlice(orig *[]*otlpmetrics.Metric, state *internal.State) MetricSlice { + return MetricSlice{orig: orig, state: state} } // NewMetricSlice creates a MetricSlice with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewMetricSlice() MetricSlice { orig := []*otlpmetrics.Metric(nil) - return newMetricSlice(&orig) + state := internal.StateMutable + return newMetricSlice(&orig, &state) } // Len returns the number of elements in the slice. @@ -50,7 +53,7 @@ func (es MetricSlice) Len() int { // ... // Do something with the element // } func (es MetricSlice) At(i int) Metric { - return newMetric((*es.orig)[i]) + return newMetric((*es.orig)[i], es.state) } // EnsureCapacity is an operation that ensures the slice has at least the specified capacity. @@ -66,6 +69,7 @@ func (es MetricSlice) At(i int) Metric { // // Here should set all the values for e. // } func (es MetricSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() oldCap := cap(*es.orig) if newCap <= oldCap { return @@ -79,6 +83,7 @@ func (es MetricSlice) EnsureCapacity(newCap int) { // AppendEmpty will append to the end of the slice an empty Metric. // It returns the newly added Metric. func (es MetricSlice) AppendEmpty() Metric { + es.state.AssertMutable() *es.orig = append(*es.orig, &otlpmetrics.Metric{}) return es.At(es.Len() - 1) } @@ -86,6 +91,8 @@ func (es MetricSlice) AppendEmpty() Metric { // MoveAndAppendTo moves all elements from the current slice and appends them to the dest. // The current slice will be cleared. func (es MetricSlice) MoveAndAppendTo(dest MetricSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() if *dest.orig == nil { // We can simply move the entire vector and avoid any allocations. *dest.orig = *es.orig @@ -98,6 +105,7 @@ func (es MetricSlice) MoveAndAppendTo(dest MetricSlice) { // RemoveIf calls f sequentially for each element present in the slice. // If f returns true, the element is removed from the slice. func (es MetricSlice) RemoveIf(f func(Metric) bool) { + es.state.AssertMutable() newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { @@ -111,18 +119,18 @@ func (es MetricSlice) RemoveIf(f func(Metric) bool) { (*es.orig)[newLen] = (*es.orig)[i] newLen++ } - // TODO: Prevent memory leak by erasing truncated values. *es.orig = (*es.orig)[:newLen] } // CopyTo copies all elements from the current slice overriding the destination. func (es MetricSlice) CopyTo(dest MetricSlice) { + dest.state.AssertMutable() srcLen := es.Len() destCap := cap(*dest.orig) if srcLen <= destCap { (*dest.orig) = (*dest.orig)[:srcLen:destCap] for i := range *es.orig { - newMetric((*es.orig)[i]).CopyTo(newMetric((*dest.orig)[i])) + newMetric((*es.orig)[i], es.state).CopyTo(newMetric((*dest.orig)[i], dest.state)) } return } @@ -130,7 +138,7 @@ func (es MetricSlice) CopyTo(dest MetricSlice) { wrappers := make([]*otlpmetrics.Metric, srcLen) for i := range *es.orig { wrappers[i] = &origs[i] - newMetric((*es.orig)[i]).CopyTo(newMetric(wrappers[i])) + newMetric((*es.orig)[i], es.state).CopyTo(newMetric(wrappers[i], dest.state)) } *dest.orig = wrappers } @@ -139,5 +147,6 @@ func (es MetricSlice) CopyTo(dest MetricSlice) { // provided less function so that two instances of MetricSlice // can be compared. func (es MetricSlice) Sort(less func(a, b Metric) bool) { + es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } diff --git a/pdata/pmetric/generated_metricslice_test.go b/pdata/pmetric/generated_metricslice_test.go index 49470381cca..cb89ca8beab 100644 --- a/pdata/pmetric/generated_metricslice_test.go +++ b/pdata/pmetric/generated_metricslice_test.go @@ -12,13 +12,15 @@ import ( "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) func TestMetricSlice(t *testing.T) { es := NewMetricSlice() assert.Equal(t, 0, es.Len()) - es = newMetricSlice(&[]*otlpmetrics.Metric{}) + state := internal.StateMutable + es = newMetricSlice(&[]*otlpmetrics.Metric{}, &state) assert.Equal(t, 0, es.Len()) emptyVal := NewMetric() @@ -32,6 +34,19 @@ func TestMetricSlice(t *testing.T) { assert.Equal(t, 7, es.Len()) } +func TestMetricSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newMetricSlice(&[]*otlpmetrics.Metric{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewMetricSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + func TestMetricSlice_CopyTo(t *testing.T) { dest := NewMetricSlice() // Test CopyTo to empty @@ -134,6 +149,6 @@ func fillTestMetricSlice(es MetricSlice) { *es.orig = make([]*otlpmetrics.Metric, 7) for i := 0; i < 7; i++ { (*es.orig)[i] = &otlpmetrics.Metric{} - fillTestMetric(newMetric((*es.orig)[i])) + fillTestMetric(newMetric((*es.orig)[i], es.state)) } } diff --git a/pdata/pmetric/generated_numberdatapoint.go b/pdata/pmetric/generated_numberdatapoint.go index 67caecd618e..bc47c4747d1 100644 --- a/pdata/pmetric/generated_numberdatapoint.go +++ b/pdata/pmetric/generated_numberdatapoint.go @@ -20,11 +20,12 @@ import ( // Must use NewNumberDataPoint function to create new instances. // Important: zero-initialized instance is not valid for use. type NumberDataPoint struct { - orig *otlpmetrics.NumberDataPoint + orig *otlpmetrics.NumberDataPoint + state *internal.State } -func newNumberDataPoint(orig *otlpmetrics.NumberDataPoint) NumberDataPoint { - return NumberDataPoint{orig} +func newNumberDataPoint(orig *otlpmetrics.NumberDataPoint, state *internal.State) NumberDataPoint { + return NumberDataPoint{orig: orig, state: state} } // NewNumberDataPoint creates a new empty NumberDataPoint. @@ -32,19 +33,22 @@ func newNumberDataPoint(orig *otlpmetrics.NumberDataPoint) NumberDataPoint { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewNumberDataPoint() NumberDataPoint { - return newNumberDataPoint(&otlpmetrics.NumberDataPoint{}) + state := internal.StateMutable + return newNumberDataPoint(&otlpmetrics.NumberDataPoint{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms NumberDataPoint) MoveTo(dest NumberDataPoint) { + ms.state.AssertMutable() + dest.state.AssertMutable() *dest.orig = *ms.orig *ms.orig = otlpmetrics.NumberDataPoint{} } // Attributes returns the Attributes associated with this NumberDataPoint. func (ms NumberDataPoint) Attributes() pcommon.Map { - return pcommon.Map(internal.NewMap(&ms.orig.Attributes)) + return pcommon.Map(internal.NewMap(&ms.orig.Attributes, ms.state)) } // StartTimestamp returns the starttimestamp associated with this NumberDataPoint. @@ -54,6 +58,7 @@ func (ms NumberDataPoint) StartTimestamp() pcommon.Timestamp { // SetStartTimestamp replaces the starttimestamp associated with this NumberDataPoint. func (ms NumberDataPoint) SetStartTimestamp(v pcommon.Timestamp) { + ms.state.AssertMutable() ms.orig.StartTimeUnixNano = uint64(v) } @@ -64,6 +69,7 @@ func (ms NumberDataPoint) Timestamp() pcommon.Timestamp { // SetTimestamp replaces the timestamp associated with this NumberDataPoint. func (ms NumberDataPoint) SetTimestamp(v pcommon.Timestamp) { + ms.state.AssertMutable() ms.orig.TimeUnixNano = uint64(v) } @@ -86,6 +92,7 @@ func (ms NumberDataPoint) DoubleValue() float64 { // SetDoubleValue replaces the double associated with this NumberDataPoint. func (ms NumberDataPoint) SetDoubleValue(v float64) { + ms.state.AssertMutable() ms.orig.Value = &otlpmetrics.NumberDataPoint_AsDouble{ AsDouble: v, } @@ -98,6 +105,7 @@ func (ms NumberDataPoint) IntValue() int64 { // SetIntValue replaces the int associated with this NumberDataPoint. func (ms NumberDataPoint) SetIntValue(v int64) { + ms.state.AssertMutable() ms.orig.Value = &otlpmetrics.NumberDataPoint_AsInt{ AsInt: v, } @@ -105,7 +113,7 @@ func (ms NumberDataPoint) SetIntValue(v int64) { // Exemplars returns the Exemplars associated with this NumberDataPoint. func (ms NumberDataPoint) Exemplars() ExemplarSlice { - return newExemplarSlice(&ms.orig.Exemplars) + return newExemplarSlice(&ms.orig.Exemplars, ms.state) } // Flags returns the flags associated with this NumberDataPoint. @@ -115,11 +123,13 @@ func (ms NumberDataPoint) Flags() DataPointFlags { // SetFlags replaces the flags associated with this NumberDataPoint. func (ms NumberDataPoint) SetFlags(v DataPointFlags) { + ms.state.AssertMutable() ms.orig.Flags = uint32(v) } // CopyTo copies all properties from the current struct overriding the destination. func (ms NumberDataPoint) CopyTo(dest NumberDataPoint) { + dest.state.AssertMutable() ms.Attributes().CopyTo(dest.Attributes()) dest.SetStartTimestamp(ms.StartTimestamp()) dest.SetTimestamp(ms.Timestamp()) diff --git a/pdata/pmetric/generated_numberdatapoint_test.go b/pdata/pmetric/generated_numberdatapoint_test.go index c54c8adffc3..2c7cedd7ff6 100644 --- a/pdata/pmetric/generated_numberdatapoint_test.go +++ b/pdata/pmetric/generated_numberdatapoint_test.go @@ -22,6 +22,9 @@ func TestNumberDataPoint_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewNumberDataPoint(), ms) assert.Equal(t, generateTestNumberDataPoint(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newNumberDataPoint(&otlpmetrics.NumberDataPoint{}, &sharedState)) }) + assert.Panics(t, func() { newNumberDataPoint(&otlpmetrics.NumberDataPoint{}, &sharedState).MoveTo(dest) }) } func TestNumberDataPoint_CopyTo(t *testing.T) { @@ -32,6 +35,8 @@ func TestNumberDataPoint_CopyTo(t *testing.T) { orig = generateTestNumberDataPoint() orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newNumberDataPoint(&otlpmetrics.NumberDataPoint{}, &sharedState)) }) } func TestNumberDataPoint_Attributes(t *testing.T) { @@ -68,6 +73,10 @@ func TestNumberDataPoint_DoubleValue(t *testing.T) { ms.SetDoubleValue(float64(17.13)) assert.Equal(t, float64(17.13), ms.DoubleValue()) assert.Equal(t, NumberDataPointValueTypeDouble, ms.ValueType()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + newNumberDataPoint(&otlpmetrics.NumberDataPoint{}, &sharedState).SetDoubleValue(float64(17.13)) + }) } func TestNumberDataPoint_IntValue(t *testing.T) { @@ -76,6 +85,8 @@ func TestNumberDataPoint_IntValue(t *testing.T) { ms.SetIntValue(int64(17)) assert.Equal(t, int64(17), ms.IntValue()) assert.Equal(t, NumberDataPointValueTypeInt, ms.ValueType()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newNumberDataPoint(&otlpmetrics.NumberDataPoint{}, &sharedState).SetIntValue(int64(17)) }) } func TestNumberDataPoint_Exemplars(t *testing.T) { @@ -100,10 +111,10 @@ func generateTestNumberDataPoint() NumberDataPoint { } func fillTestNumberDataPoint(tv NumberDataPoint) { - internal.FillTestMap(internal.NewMap(&tv.orig.Attributes)) + internal.FillTestMap(internal.NewMap(&tv.orig.Attributes, tv.state)) tv.orig.StartTimeUnixNano = 1234567890 tv.orig.TimeUnixNano = 1234567890 tv.orig.Value = &otlpmetrics.NumberDataPoint_AsDouble{AsDouble: float64(17.13)} - fillTestExemplarSlice(newExemplarSlice(&tv.orig.Exemplars)) + fillTestExemplarSlice(newExemplarSlice(&tv.orig.Exemplars, tv.state)) tv.orig.Flags = 1 } diff --git a/pdata/pmetric/generated_numberdatapointslice.go b/pdata/pmetric/generated_numberdatapointslice.go index 777a7209424..57cdd11743e 100644 --- a/pdata/pmetric/generated_numberdatapointslice.go +++ b/pdata/pmetric/generated_numberdatapointslice.go @@ -9,6 +9,7 @@ package pmetric import ( "sort" + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) @@ -20,18 +21,20 @@ import ( // Must use NewNumberDataPointSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type NumberDataPointSlice struct { - orig *[]*otlpmetrics.NumberDataPoint + orig *[]*otlpmetrics.NumberDataPoint + state *internal.State } -func newNumberDataPointSlice(orig *[]*otlpmetrics.NumberDataPoint) NumberDataPointSlice { - return NumberDataPointSlice{orig} +func newNumberDataPointSlice(orig *[]*otlpmetrics.NumberDataPoint, state *internal.State) NumberDataPointSlice { + return NumberDataPointSlice{orig: orig, state: state} } // NewNumberDataPointSlice creates a NumberDataPointSlice with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewNumberDataPointSlice() NumberDataPointSlice { orig := []*otlpmetrics.NumberDataPoint(nil) - return newNumberDataPointSlice(&orig) + state := internal.StateMutable + return newNumberDataPointSlice(&orig, &state) } // Len returns the number of elements in the slice. @@ -50,7 +53,7 @@ func (es NumberDataPointSlice) Len() int { // ... // Do something with the element // } func (es NumberDataPointSlice) At(i int) NumberDataPoint { - return newNumberDataPoint((*es.orig)[i]) + return newNumberDataPoint((*es.orig)[i], es.state) } // EnsureCapacity is an operation that ensures the slice has at least the specified capacity. @@ -66,6 +69,7 @@ func (es NumberDataPointSlice) At(i int) NumberDataPoint { // // Here should set all the values for e. // } func (es NumberDataPointSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() oldCap := cap(*es.orig) if newCap <= oldCap { return @@ -79,6 +83,7 @@ func (es NumberDataPointSlice) EnsureCapacity(newCap int) { // AppendEmpty will append to the end of the slice an empty NumberDataPoint. // It returns the newly added NumberDataPoint. func (es NumberDataPointSlice) AppendEmpty() NumberDataPoint { + es.state.AssertMutable() *es.orig = append(*es.orig, &otlpmetrics.NumberDataPoint{}) return es.At(es.Len() - 1) } @@ -86,6 +91,8 @@ func (es NumberDataPointSlice) AppendEmpty() NumberDataPoint { // MoveAndAppendTo moves all elements from the current slice and appends them to the dest. // The current slice will be cleared. func (es NumberDataPointSlice) MoveAndAppendTo(dest NumberDataPointSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() if *dest.orig == nil { // We can simply move the entire vector and avoid any allocations. *dest.orig = *es.orig @@ -98,6 +105,7 @@ func (es NumberDataPointSlice) MoveAndAppendTo(dest NumberDataPointSlice) { // RemoveIf calls f sequentially for each element present in the slice. // If f returns true, the element is removed from the slice. func (es NumberDataPointSlice) RemoveIf(f func(NumberDataPoint) bool) { + es.state.AssertMutable() newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { @@ -111,18 +119,18 @@ func (es NumberDataPointSlice) RemoveIf(f func(NumberDataPoint) bool) { (*es.orig)[newLen] = (*es.orig)[i] newLen++ } - // TODO: Prevent memory leak by erasing truncated values. *es.orig = (*es.orig)[:newLen] } // CopyTo copies all elements from the current slice overriding the destination. func (es NumberDataPointSlice) CopyTo(dest NumberDataPointSlice) { + dest.state.AssertMutable() srcLen := es.Len() destCap := cap(*dest.orig) if srcLen <= destCap { (*dest.orig) = (*dest.orig)[:srcLen:destCap] for i := range *es.orig { - newNumberDataPoint((*es.orig)[i]).CopyTo(newNumberDataPoint((*dest.orig)[i])) + newNumberDataPoint((*es.orig)[i], es.state).CopyTo(newNumberDataPoint((*dest.orig)[i], dest.state)) } return } @@ -130,7 +138,7 @@ func (es NumberDataPointSlice) CopyTo(dest NumberDataPointSlice) { wrappers := make([]*otlpmetrics.NumberDataPoint, srcLen) for i := range *es.orig { wrappers[i] = &origs[i] - newNumberDataPoint((*es.orig)[i]).CopyTo(newNumberDataPoint(wrappers[i])) + newNumberDataPoint((*es.orig)[i], es.state).CopyTo(newNumberDataPoint(wrappers[i], dest.state)) } *dest.orig = wrappers } @@ -139,5 +147,6 @@ func (es NumberDataPointSlice) CopyTo(dest NumberDataPointSlice) { // provided less function so that two instances of NumberDataPointSlice // can be compared. func (es NumberDataPointSlice) Sort(less func(a, b NumberDataPoint) bool) { + es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } diff --git a/pdata/pmetric/generated_numberdatapointslice_test.go b/pdata/pmetric/generated_numberdatapointslice_test.go index aeda43533f8..6bc35ff03c2 100644 --- a/pdata/pmetric/generated_numberdatapointslice_test.go +++ b/pdata/pmetric/generated_numberdatapointslice_test.go @@ -12,13 +12,15 @@ import ( "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) func TestNumberDataPointSlice(t *testing.T) { es := NewNumberDataPointSlice() assert.Equal(t, 0, es.Len()) - es = newNumberDataPointSlice(&[]*otlpmetrics.NumberDataPoint{}) + state := internal.StateMutable + es = newNumberDataPointSlice(&[]*otlpmetrics.NumberDataPoint{}, &state) assert.Equal(t, 0, es.Len()) emptyVal := NewNumberDataPoint() @@ -32,6 +34,19 @@ func TestNumberDataPointSlice(t *testing.T) { assert.Equal(t, 7, es.Len()) } +func TestNumberDataPointSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newNumberDataPointSlice(&[]*otlpmetrics.NumberDataPoint{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewNumberDataPointSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + func TestNumberDataPointSlice_CopyTo(t *testing.T) { dest := NewNumberDataPointSlice() // Test CopyTo to empty @@ -134,6 +149,6 @@ func fillTestNumberDataPointSlice(es NumberDataPointSlice) { *es.orig = make([]*otlpmetrics.NumberDataPoint, 7) for i := 0; i < 7; i++ { (*es.orig)[i] = &otlpmetrics.NumberDataPoint{} - fillTestNumberDataPoint(newNumberDataPoint((*es.orig)[i])) + fillTestNumberDataPoint(newNumberDataPoint((*es.orig)[i], es.state)) } } diff --git a/pdata/pmetric/generated_resourcemetrics.go b/pdata/pmetric/generated_resourcemetrics.go index 520de76c9c3..43622f3f806 100644 --- a/pdata/pmetric/generated_resourcemetrics.go +++ b/pdata/pmetric/generated_resourcemetrics.go @@ -20,11 +20,12 @@ import ( // Must use NewResourceMetrics function to create new instances. // Important: zero-initialized instance is not valid for use. type ResourceMetrics struct { - orig *otlpmetrics.ResourceMetrics + orig *otlpmetrics.ResourceMetrics + state *internal.State } -func newResourceMetrics(orig *otlpmetrics.ResourceMetrics) ResourceMetrics { - return ResourceMetrics{orig} +func newResourceMetrics(orig *otlpmetrics.ResourceMetrics, state *internal.State) ResourceMetrics { + return ResourceMetrics{orig: orig, state: state} } // NewResourceMetrics creates a new empty ResourceMetrics. @@ -32,19 +33,22 @@ func newResourceMetrics(orig *otlpmetrics.ResourceMetrics) ResourceMetrics { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewResourceMetrics() ResourceMetrics { - return newResourceMetrics(&otlpmetrics.ResourceMetrics{}) + state := internal.StateMutable + return newResourceMetrics(&otlpmetrics.ResourceMetrics{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms ResourceMetrics) MoveTo(dest ResourceMetrics) { + ms.state.AssertMutable() + dest.state.AssertMutable() *dest.orig = *ms.orig *ms.orig = otlpmetrics.ResourceMetrics{} } // Resource returns the resource associated with this ResourceMetrics. func (ms ResourceMetrics) Resource() pcommon.Resource { - return pcommon.Resource(internal.NewResource(&ms.orig.Resource)) + return pcommon.Resource(internal.NewResource(&ms.orig.Resource, ms.state)) } // SchemaUrl returns the schemaurl associated with this ResourceMetrics. @@ -54,16 +58,18 @@ func (ms ResourceMetrics) SchemaUrl() string { // SetSchemaUrl replaces the schemaurl associated with this ResourceMetrics. func (ms ResourceMetrics) SetSchemaUrl(v string) { + ms.state.AssertMutable() ms.orig.SchemaUrl = v } // ScopeMetrics returns the ScopeMetrics associated with this ResourceMetrics. func (ms ResourceMetrics) ScopeMetrics() ScopeMetricsSlice { - return newScopeMetricsSlice(&ms.orig.ScopeMetrics) + return newScopeMetricsSlice(&ms.orig.ScopeMetrics, ms.state) } // CopyTo copies all properties from the current struct overriding the destination. func (ms ResourceMetrics) CopyTo(dest ResourceMetrics) { + dest.state.AssertMutable() ms.Resource().CopyTo(dest.Resource()) dest.SetSchemaUrl(ms.SchemaUrl()) ms.ScopeMetrics().CopyTo(dest.ScopeMetrics()) diff --git a/pdata/pmetric/generated_resourcemetrics_test.go b/pdata/pmetric/generated_resourcemetrics_test.go index d7bba42cc98..7bdfec11beb 100644 --- a/pdata/pmetric/generated_resourcemetrics_test.go +++ b/pdata/pmetric/generated_resourcemetrics_test.go @@ -12,6 +12,7 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/pdata/internal" + otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" "go.opentelemetry.io/collector/pdata/pcommon" ) @@ -21,6 +22,9 @@ func TestResourceMetrics_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewResourceMetrics(), ms) assert.Equal(t, generateTestResourceMetrics(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newResourceMetrics(&otlpmetrics.ResourceMetrics{}, &sharedState)) }) + assert.Panics(t, func() { newResourceMetrics(&otlpmetrics.ResourceMetrics{}, &sharedState).MoveTo(dest) }) } func TestResourceMetrics_CopyTo(t *testing.T) { @@ -31,6 +35,8 @@ func TestResourceMetrics_CopyTo(t *testing.T) { orig = generateTestResourceMetrics() orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newResourceMetrics(&otlpmetrics.ResourceMetrics{}, &sharedState)) }) } func TestResourceMetrics_Resource(t *testing.T) { @@ -44,6 +50,10 @@ func TestResourceMetrics_SchemaUrl(t *testing.T) { assert.Equal(t, "", ms.SchemaUrl()) ms.SetSchemaUrl("https://opentelemetry.io/schemas/1.5.0") assert.Equal(t, "https://opentelemetry.io/schemas/1.5.0", ms.SchemaUrl()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + newResourceMetrics(&otlpmetrics.ResourceMetrics{}, &sharedState).SetSchemaUrl("https://opentelemetry.io/schemas/1.5.0") + }) } func TestResourceMetrics_ScopeMetrics(t *testing.T) { @@ -60,7 +70,7 @@ func generateTestResourceMetrics() ResourceMetrics { } func fillTestResourceMetrics(tv ResourceMetrics) { - internal.FillTestResource(internal.NewResource(&tv.orig.Resource)) + internal.FillTestResource(internal.NewResource(&tv.orig.Resource, tv.state)) tv.orig.SchemaUrl = "https://opentelemetry.io/schemas/1.5.0" - fillTestScopeMetricsSlice(newScopeMetricsSlice(&tv.orig.ScopeMetrics)) + fillTestScopeMetricsSlice(newScopeMetricsSlice(&tv.orig.ScopeMetrics, tv.state)) } diff --git a/pdata/pmetric/generated_resourcemetricsslice.go b/pdata/pmetric/generated_resourcemetricsslice.go index 4f089354bda..55217ea27d5 100644 --- a/pdata/pmetric/generated_resourcemetricsslice.go +++ b/pdata/pmetric/generated_resourcemetricsslice.go @@ -9,6 +9,7 @@ package pmetric import ( "sort" + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) @@ -20,18 +21,20 @@ import ( // Must use NewResourceMetricsSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type ResourceMetricsSlice struct { - orig *[]*otlpmetrics.ResourceMetrics + orig *[]*otlpmetrics.ResourceMetrics + state *internal.State } -func newResourceMetricsSlice(orig *[]*otlpmetrics.ResourceMetrics) ResourceMetricsSlice { - return ResourceMetricsSlice{orig} +func newResourceMetricsSlice(orig *[]*otlpmetrics.ResourceMetrics, state *internal.State) ResourceMetricsSlice { + return ResourceMetricsSlice{orig: orig, state: state} } // NewResourceMetricsSlice creates a ResourceMetricsSlice with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewResourceMetricsSlice() ResourceMetricsSlice { orig := []*otlpmetrics.ResourceMetrics(nil) - return newResourceMetricsSlice(&orig) + state := internal.StateMutable + return newResourceMetricsSlice(&orig, &state) } // Len returns the number of elements in the slice. @@ -50,7 +53,7 @@ func (es ResourceMetricsSlice) Len() int { // ... // Do something with the element // } func (es ResourceMetricsSlice) At(i int) ResourceMetrics { - return newResourceMetrics((*es.orig)[i]) + return newResourceMetrics((*es.orig)[i], es.state) } // EnsureCapacity is an operation that ensures the slice has at least the specified capacity. @@ -66,6 +69,7 @@ func (es ResourceMetricsSlice) At(i int) ResourceMetrics { // // Here should set all the values for e. // } func (es ResourceMetricsSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() oldCap := cap(*es.orig) if newCap <= oldCap { return @@ -79,6 +83,7 @@ func (es ResourceMetricsSlice) EnsureCapacity(newCap int) { // AppendEmpty will append to the end of the slice an empty ResourceMetrics. // It returns the newly added ResourceMetrics. func (es ResourceMetricsSlice) AppendEmpty() ResourceMetrics { + es.state.AssertMutable() *es.orig = append(*es.orig, &otlpmetrics.ResourceMetrics{}) return es.At(es.Len() - 1) } @@ -86,6 +91,8 @@ func (es ResourceMetricsSlice) AppendEmpty() ResourceMetrics { // MoveAndAppendTo moves all elements from the current slice and appends them to the dest. // The current slice will be cleared. func (es ResourceMetricsSlice) MoveAndAppendTo(dest ResourceMetricsSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() if *dest.orig == nil { // We can simply move the entire vector and avoid any allocations. *dest.orig = *es.orig @@ -98,6 +105,7 @@ func (es ResourceMetricsSlice) MoveAndAppendTo(dest ResourceMetricsSlice) { // RemoveIf calls f sequentially for each element present in the slice. // If f returns true, the element is removed from the slice. func (es ResourceMetricsSlice) RemoveIf(f func(ResourceMetrics) bool) { + es.state.AssertMutable() newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { @@ -111,18 +119,18 @@ func (es ResourceMetricsSlice) RemoveIf(f func(ResourceMetrics) bool) { (*es.orig)[newLen] = (*es.orig)[i] newLen++ } - // TODO: Prevent memory leak by erasing truncated values. *es.orig = (*es.orig)[:newLen] } // CopyTo copies all elements from the current slice overriding the destination. func (es ResourceMetricsSlice) CopyTo(dest ResourceMetricsSlice) { + dest.state.AssertMutable() srcLen := es.Len() destCap := cap(*dest.orig) if srcLen <= destCap { (*dest.orig) = (*dest.orig)[:srcLen:destCap] for i := range *es.orig { - newResourceMetrics((*es.orig)[i]).CopyTo(newResourceMetrics((*dest.orig)[i])) + newResourceMetrics((*es.orig)[i], es.state).CopyTo(newResourceMetrics((*dest.orig)[i], dest.state)) } return } @@ -130,7 +138,7 @@ func (es ResourceMetricsSlice) CopyTo(dest ResourceMetricsSlice) { wrappers := make([]*otlpmetrics.ResourceMetrics, srcLen) for i := range *es.orig { wrappers[i] = &origs[i] - newResourceMetrics((*es.orig)[i]).CopyTo(newResourceMetrics(wrappers[i])) + newResourceMetrics((*es.orig)[i], es.state).CopyTo(newResourceMetrics(wrappers[i], dest.state)) } *dest.orig = wrappers } @@ -139,5 +147,6 @@ func (es ResourceMetricsSlice) CopyTo(dest ResourceMetricsSlice) { // provided less function so that two instances of ResourceMetricsSlice // can be compared. func (es ResourceMetricsSlice) Sort(less func(a, b ResourceMetrics) bool) { + es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } diff --git a/pdata/pmetric/generated_resourcemetricsslice_test.go b/pdata/pmetric/generated_resourcemetricsslice_test.go index acf358f91bd..869f7a37503 100644 --- a/pdata/pmetric/generated_resourcemetricsslice_test.go +++ b/pdata/pmetric/generated_resourcemetricsslice_test.go @@ -12,13 +12,15 @@ import ( "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) func TestResourceMetricsSlice(t *testing.T) { es := NewResourceMetricsSlice() assert.Equal(t, 0, es.Len()) - es = newResourceMetricsSlice(&[]*otlpmetrics.ResourceMetrics{}) + state := internal.StateMutable + es = newResourceMetricsSlice(&[]*otlpmetrics.ResourceMetrics{}, &state) assert.Equal(t, 0, es.Len()) emptyVal := NewResourceMetrics() @@ -32,6 +34,19 @@ func TestResourceMetricsSlice(t *testing.T) { assert.Equal(t, 7, es.Len()) } +func TestResourceMetricsSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newResourceMetricsSlice(&[]*otlpmetrics.ResourceMetrics{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewResourceMetricsSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + func TestResourceMetricsSlice_CopyTo(t *testing.T) { dest := NewResourceMetricsSlice() // Test CopyTo to empty @@ -134,6 +149,6 @@ func fillTestResourceMetricsSlice(es ResourceMetricsSlice) { *es.orig = make([]*otlpmetrics.ResourceMetrics, 7) for i := 0; i < 7; i++ { (*es.orig)[i] = &otlpmetrics.ResourceMetrics{} - fillTestResourceMetrics(newResourceMetrics((*es.orig)[i])) + fillTestResourceMetrics(newResourceMetrics((*es.orig)[i], es.state)) } } diff --git a/pdata/pmetric/generated_scopemetrics.go b/pdata/pmetric/generated_scopemetrics.go index f4ea50a31f8..1151c36dae3 100644 --- a/pdata/pmetric/generated_scopemetrics.go +++ b/pdata/pmetric/generated_scopemetrics.go @@ -20,11 +20,12 @@ import ( // Must use NewScopeMetrics function to create new instances. // Important: zero-initialized instance is not valid for use. type ScopeMetrics struct { - orig *otlpmetrics.ScopeMetrics + orig *otlpmetrics.ScopeMetrics + state *internal.State } -func newScopeMetrics(orig *otlpmetrics.ScopeMetrics) ScopeMetrics { - return ScopeMetrics{orig} +func newScopeMetrics(orig *otlpmetrics.ScopeMetrics, state *internal.State) ScopeMetrics { + return ScopeMetrics{orig: orig, state: state} } // NewScopeMetrics creates a new empty ScopeMetrics. @@ -32,19 +33,22 @@ func newScopeMetrics(orig *otlpmetrics.ScopeMetrics) ScopeMetrics { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewScopeMetrics() ScopeMetrics { - return newScopeMetrics(&otlpmetrics.ScopeMetrics{}) + state := internal.StateMutable + return newScopeMetrics(&otlpmetrics.ScopeMetrics{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms ScopeMetrics) MoveTo(dest ScopeMetrics) { + ms.state.AssertMutable() + dest.state.AssertMutable() *dest.orig = *ms.orig *ms.orig = otlpmetrics.ScopeMetrics{} } // Scope returns the scope associated with this ScopeMetrics. func (ms ScopeMetrics) Scope() pcommon.InstrumentationScope { - return pcommon.InstrumentationScope(internal.NewInstrumentationScope(&ms.orig.Scope)) + return pcommon.InstrumentationScope(internal.NewInstrumentationScope(&ms.orig.Scope, ms.state)) } // SchemaUrl returns the schemaurl associated with this ScopeMetrics. @@ -54,16 +58,18 @@ func (ms ScopeMetrics) SchemaUrl() string { // SetSchemaUrl replaces the schemaurl associated with this ScopeMetrics. func (ms ScopeMetrics) SetSchemaUrl(v string) { + ms.state.AssertMutable() ms.orig.SchemaUrl = v } // Metrics returns the Metrics associated with this ScopeMetrics. func (ms ScopeMetrics) Metrics() MetricSlice { - return newMetricSlice(&ms.orig.Metrics) + return newMetricSlice(&ms.orig.Metrics, ms.state) } // CopyTo copies all properties from the current struct overriding the destination. func (ms ScopeMetrics) CopyTo(dest ScopeMetrics) { + dest.state.AssertMutable() ms.Scope().CopyTo(dest.Scope()) dest.SetSchemaUrl(ms.SchemaUrl()) ms.Metrics().CopyTo(dest.Metrics()) diff --git a/pdata/pmetric/generated_scopemetrics_test.go b/pdata/pmetric/generated_scopemetrics_test.go index 4734e7efc50..451c4743657 100644 --- a/pdata/pmetric/generated_scopemetrics_test.go +++ b/pdata/pmetric/generated_scopemetrics_test.go @@ -12,6 +12,7 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/pdata/internal" + otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" "go.opentelemetry.io/collector/pdata/pcommon" ) @@ -21,6 +22,9 @@ func TestScopeMetrics_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewScopeMetrics(), ms) assert.Equal(t, generateTestScopeMetrics(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newScopeMetrics(&otlpmetrics.ScopeMetrics{}, &sharedState)) }) + assert.Panics(t, func() { newScopeMetrics(&otlpmetrics.ScopeMetrics{}, &sharedState).MoveTo(dest) }) } func TestScopeMetrics_CopyTo(t *testing.T) { @@ -31,6 +35,8 @@ func TestScopeMetrics_CopyTo(t *testing.T) { orig = generateTestScopeMetrics() orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newScopeMetrics(&otlpmetrics.ScopeMetrics{}, &sharedState)) }) } func TestScopeMetrics_Scope(t *testing.T) { @@ -44,6 +50,10 @@ func TestScopeMetrics_SchemaUrl(t *testing.T) { assert.Equal(t, "", ms.SchemaUrl()) ms.SetSchemaUrl("https://opentelemetry.io/schemas/1.5.0") assert.Equal(t, "https://opentelemetry.io/schemas/1.5.0", ms.SchemaUrl()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + newScopeMetrics(&otlpmetrics.ScopeMetrics{}, &sharedState).SetSchemaUrl("https://opentelemetry.io/schemas/1.5.0") + }) } func TestScopeMetrics_Metrics(t *testing.T) { @@ -60,7 +70,7 @@ func generateTestScopeMetrics() ScopeMetrics { } func fillTestScopeMetrics(tv ScopeMetrics) { - internal.FillTestInstrumentationScope(internal.NewInstrumentationScope(&tv.orig.Scope)) + internal.FillTestInstrumentationScope(internal.NewInstrumentationScope(&tv.orig.Scope, tv.state)) tv.orig.SchemaUrl = "https://opentelemetry.io/schemas/1.5.0" - fillTestMetricSlice(newMetricSlice(&tv.orig.Metrics)) + fillTestMetricSlice(newMetricSlice(&tv.orig.Metrics, tv.state)) } diff --git a/pdata/pmetric/generated_scopemetricsslice.go b/pdata/pmetric/generated_scopemetricsslice.go index 90cc4979e53..a86eb0b4815 100644 --- a/pdata/pmetric/generated_scopemetricsslice.go +++ b/pdata/pmetric/generated_scopemetricsslice.go @@ -9,6 +9,7 @@ package pmetric import ( "sort" + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) @@ -20,18 +21,20 @@ import ( // Must use NewScopeMetricsSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type ScopeMetricsSlice struct { - orig *[]*otlpmetrics.ScopeMetrics + orig *[]*otlpmetrics.ScopeMetrics + state *internal.State } -func newScopeMetricsSlice(orig *[]*otlpmetrics.ScopeMetrics) ScopeMetricsSlice { - return ScopeMetricsSlice{orig} +func newScopeMetricsSlice(orig *[]*otlpmetrics.ScopeMetrics, state *internal.State) ScopeMetricsSlice { + return ScopeMetricsSlice{orig: orig, state: state} } // NewScopeMetricsSlice creates a ScopeMetricsSlice with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewScopeMetricsSlice() ScopeMetricsSlice { orig := []*otlpmetrics.ScopeMetrics(nil) - return newScopeMetricsSlice(&orig) + state := internal.StateMutable + return newScopeMetricsSlice(&orig, &state) } // Len returns the number of elements in the slice. @@ -50,7 +53,7 @@ func (es ScopeMetricsSlice) Len() int { // ... // Do something with the element // } func (es ScopeMetricsSlice) At(i int) ScopeMetrics { - return newScopeMetrics((*es.orig)[i]) + return newScopeMetrics((*es.orig)[i], es.state) } // EnsureCapacity is an operation that ensures the slice has at least the specified capacity. @@ -66,6 +69,7 @@ func (es ScopeMetricsSlice) At(i int) ScopeMetrics { // // Here should set all the values for e. // } func (es ScopeMetricsSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() oldCap := cap(*es.orig) if newCap <= oldCap { return @@ -79,6 +83,7 @@ func (es ScopeMetricsSlice) EnsureCapacity(newCap int) { // AppendEmpty will append to the end of the slice an empty ScopeMetrics. // It returns the newly added ScopeMetrics. func (es ScopeMetricsSlice) AppendEmpty() ScopeMetrics { + es.state.AssertMutable() *es.orig = append(*es.orig, &otlpmetrics.ScopeMetrics{}) return es.At(es.Len() - 1) } @@ -86,6 +91,8 @@ func (es ScopeMetricsSlice) AppendEmpty() ScopeMetrics { // MoveAndAppendTo moves all elements from the current slice and appends them to the dest. // The current slice will be cleared. func (es ScopeMetricsSlice) MoveAndAppendTo(dest ScopeMetricsSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() if *dest.orig == nil { // We can simply move the entire vector and avoid any allocations. *dest.orig = *es.orig @@ -98,6 +105,7 @@ func (es ScopeMetricsSlice) MoveAndAppendTo(dest ScopeMetricsSlice) { // RemoveIf calls f sequentially for each element present in the slice. // If f returns true, the element is removed from the slice. func (es ScopeMetricsSlice) RemoveIf(f func(ScopeMetrics) bool) { + es.state.AssertMutable() newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { @@ -111,18 +119,18 @@ func (es ScopeMetricsSlice) RemoveIf(f func(ScopeMetrics) bool) { (*es.orig)[newLen] = (*es.orig)[i] newLen++ } - // TODO: Prevent memory leak by erasing truncated values. *es.orig = (*es.orig)[:newLen] } // CopyTo copies all elements from the current slice overriding the destination. func (es ScopeMetricsSlice) CopyTo(dest ScopeMetricsSlice) { + dest.state.AssertMutable() srcLen := es.Len() destCap := cap(*dest.orig) if srcLen <= destCap { (*dest.orig) = (*dest.orig)[:srcLen:destCap] for i := range *es.orig { - newScopeMetrics((*es.orig)[i]).CopyTo(newScopeMetrics((*dest.orig)[i])) + newScopeMetrics((*es.orig)[i], es.state).CopyTo(newScopeMetrics((*dest.orig)[i], dest.state)) } return } @@ -130,7 +138,7 @@ func (es ScopeMetricsSlice) CopyTo(dest ScopeMetricsSlice) { wrappers := make([]*otlpmetrics.ScopeMetrics, srcLen) for i := range *es.orig { wrappers[i] = &origs[i] - newScopeMetrics((*es.orig)[i]).CopyTo(newScopeMetrics(wrappers[i])) + newScopeMetrics((*es.orig)[i], es.state).CopyTo(newScopeMetrics(wrappers[i], dest.state)) } *dest.orig = wrappers } @@ -139,5 +147,6 @@ func (es ScopeMetricsSlice) CopyTo(dest ScopeMetricsSlice) { // provided less function so that two instances of ScopeMetricsSlice // can be compared. func (es ScopeMetricsSlice) Sort(less func(a, b ScopeMetrics) bool) { + es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } diff --git a/pdata/pmetric/generated_scopemetricsslice_test.go b/pdata/pmetric/generated_scopemetricsslice_test.go index f6a4c3f5960..b0903bc256e 100644 --- a/pdata/pmetric/generated_scopemetricsslice_test.go +++ b/pdata/pmetric/generated_scopemetricsslice_test.go @@ -12,13 +12,15 @@ import ( "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) func TestScopeMetricsSlice(t *testing.T) { es := NewScopeMetricsSlice() assert.Equal(t, 0, es.Len()) - es = newScopeMetricsSlice(&[]*otlpmetrics.ScopeMetrics{}) + state := internal.StateMutable + es = newScopeMetricsSlice(&[]*otlpmetrics.ScopeMetrics{}, &state) assert.Equal(t, 0, es.Len()) emptyVal := NewScopeMetrics() @@ -32,6 +34,19 @@ func TestScopeMetricsSlice(t *testing.T) { assert.Equal(t, 7, es.Len()) } +func TestScopeMetricsSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newScopeMetricsSlice(&[]*otlpmetrics.ScopeMetrics{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewScopeMetricsSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + func TestScopeMetricsSlice_CopyTo(t *testing.T) { dest := NewScopeMetricsSlice() // Test CopyTo to empty @@ -134,6 +149,6 @@ func fillTestScopeMetricsSlice(es ScopeMetricsSlice) { *es.orig = make([]*otlpmetrics.ScopeMetrics, 7) for i := 0; i < 7; i++ { (*es.orig)[i] = &otlpmetrics.ScopeMetrics{} - fillTestScopeMetrics(newScopeMetrics((*es.orig)[i])) + fillTestScopeMetrics(newScopeMetrics((*es.orig)[i], es.state)) } } diff --git a/pdata/pmetric/generated_sum.go b/pdata/pmetric/generated_sum.go index 13cfe7d3f75..7def0749aa5 100644 --- a/pdata/pmetric/generated_sum.go +++ b/pdata/pmetric/generated_sum.go @@ -7,6 +7,7 @@ package pmetric import ( + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) @@ -18,11 +19,12 @@ import ( // Must use NewSum function to create new instances. // Important: zero-initialized instance is not valid for use. type Sum struct { - orig *otlpmetrics.Sum + orig *otlpmetrics.Sum + state *internal.State } -func newSum(orig *otlpmetrics.Sum) Sum { - return Sum{orig} +func newSum(orig *otlpmetrics.Sum, state *internal.State) Sum { + return Sum{orig: orig, state: state} } // NewSum creates a new empty Sum. @@ -30,12 +32,15 @@ func newSum(orig *otlpmetrics.Sum) Sum { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewSum() Sum { - return newSum(&otlpmetrics.Sum{}) + state := internal.StateMutable + return newSum(&otlpmetrics.Sum{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms Sum) MoveTo(dest Sum) { + ms.state.AssertMutable() + dest.state.AssertMutable() *dest.orig = *ms.orig *ms.orig = otlpmetrics.Sum{} } @@ -47,6 +52,7 @@ func (ms Sum) AggregationTemporality() AggregationTemporality { // SetAggregationTemporality replaces the aggregationtemporality associated with this Sum. func (ms Sum) SetAggregationTemporality(v AggregationTemporality) { + ms.state.AssertMutable() ms.orig.AggregationTemporality = otlpmetrics.AggregationTemporality(v) } @@ -57,16 +63,18 @@ func (ms Sum) IsMonotonic() bool { // SetIsMonotonic replaces the ismonotonic associated with this Sum. func (ms Sum) SetIsMonotonic(v bool) { + ms.state.AssertMutable() ms.orig.IsMonotonic = v } // DataPoints returns the DataPoints associated with this Sum. func (ms Sum) DataPoints() NumberDataPointSlice { - return newNumberDataPointSlice(&ms.orig.DataPoints) + return newNumberDataPointSlice(&ms.orig.DataPoints, ms.state) } // CopyTo copies all properties from the current struct overriding the destination. func (ms Sum) CopyTo(dest Sum) { + dest.state.AssertMutable() dest.SetAggregationTemporality(ms.AggregationTemporality()) dest.SetIsMonotonic(ms.IsMonotonic()) ms.DataPoints().CopyTo(dest.DataPoints()) diff --git a/pdata/pmetric/generated_sum_test.go b/pdata/pmetric/generated_sum_test.go index f2590feea06..98f3574b10f 100644 --- a/pdata/pmetric/generated_sum_test.go +++ b/pdata/pmetric/generated_sum_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) @@ -20,6 +21,9 @@ func TestSum_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewSum(), ms) assert.Equal(t, generateTestSum(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newSum(&otlpmetrics.Sum{}, &sharedState)) }) + assert.Panics(t, func() { newSum(&otlpmetrics.Sum{}, &sharedState).MoveTo(dest) }) } func TestSum_CopyTo(t *testing.T) { @@ -30,6 +34,8 @@ func TestSum_CopyTo(t *testing.T) { orig = generateTestSum() orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newSum(&otlpmetrics.Sum{}, &sharedState)) }) } func TestSum_AggregationTemporality(t *testing.T) { @@ -45,6 +51,8 @@ func TestSum_IsMonotonic(t *testing.T) { assert.Equal(t, false, ms.IsMonotonic()) ms.SetIsMonotonic(true) assert.Equal(t, true, ms.IsMonotonic()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newSum(&otlpmetrics.Sum{}, &sharedState).SetIsMonotonic(true) }) } func TestSum_DataPoints(t *testing.T) { @@ -63,5 +71,5 @@ func generateTestSum() Sum { func fillTestSum(tv Sum) { tv.orig.AggregationTemporality = otlpmetrics.AggregationTemporality(1) tv.orig.IsMonotonic = true - fillTestNumberDataPointSlice(newNumberDataPointSlice(&tv.orig.DataPoints)) + fillTestNumberDataPointSlice(newNumberDataPointSlice(&tv.orig.DataPoints, tv.state)) } diff --git a/pdata/pmetric/generated_summary.go b/pdata/pmetric/generated_summary.go index bea3b764b5d..64fbffbefd3 100644 --- a/pdata/pmetric/generated_summary.go +++ b/pdata/pmetric/generated_summary.go @@ -7,6 +7,7 @@ package pmetric import ( + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) @@ -18,11 +19,12 @@ import ( // Must use NewSummary function to create new instances. // Important: zero-initialized instance is not valid for use. type Summary struct { - orig *otlpmetrics.Summary + orig *otlpmetrics.Summary + state *internal.State } -func newSummary(orig *otlpmetrics.Summary) Summary { - return Summary{orig} +func newSummary(orig *otlpmetrics.Summary, state *internal.State) Summary { + return Summary{orig: orig, state: state} } // NewSummary creates a new empty Summary. @@ -30,22 +32,26 @@ func newSummary(orig *otlpmetrics.Summary) Summary { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewSummary() Summary { - return newSummary(&otlpmetrics.Summary{}) + state := internal.StateMutable + return newSummary(&otlpmetrics.Summary{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms Summary) MoveTo(dest Summary) { + ms.state.AssertMutable() + dest.state.AssertMutable() *dest.orig = *ms.orig *ms.orig = otlpmetrics.Summary{} } // DataPoints returns the DataPoints associated with this Summary. func (ms Summary) DataPoints() SummaryDataPointSlice { - return newSummaryDataPointSlice(&ms.orig.DataPoints) + return newSummaryDataPointSlice(&ms.orig.DataPoints, ms.state) } // CopyTo copies all properties from the current struct overriding the destination. func (ms Summary) CopyTo(dest Summary) { + dest.state.AssertMutable() ms.DataPoints().CopyTo(dest.DataPoints()) } diff --git a/pdata/pmetric/generated_summary_test.go b/pdata/pmetric/generated_summary_test.go index 2f81ead8807..c592870ef8b 100644 --- a/pdata/pmetric/generated_summary_test.go +++ b/pdata/pmetric/generated_summary_test.go @@ -10,6 +10,9 @@ import ( "testing" "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) func TestSummary_MoveTo(t *testing.T) { @@ -18,6 +21,9 @@ func TestSummary_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewSummary(), ms) assert.Equal(t, generateTestSummary(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newSummary(&otlpmetrics.Summary{}, &sharedState)) }) + assert.Panics(t, func() { newSummary(&otlpmetrics.Summary{}, &sharedState).MoveTo(dest) }) } func TestSummary_CopyTo(t *testing.T) { @@ -28,6 +34,8 @@ func TestSummary_CopyTo(t *testing.T) { orig = generateTestSummary() orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newSummary(&otlpmetrics.Summary{}, &sharedState)) }) } func TestSummary_DataPoints(t *testing.T) { @@ -44,5 +52,5 @@ func generateTestSummary() Summary { } func fillTestSummary(tv Summary) { - fillTestSummaryDataPointSlice(newSummaryDataPointSlice(&tv.orig.DataPoints)) + fillTestSummaryDataPointSlice(newSummaryDataPointSlice(&tv.orig.DataPoints, tv.state)) } diff --git a/pdata/pmetric/generated_summarydatapoint.go b/pdata/pmetric/generated_summarydatapoint.go index 51177d69cbd..0f0f6dd1e99 100644 --- a/pdata/pmetric/generated_summarydatapoint.go +++ b/pdata/pmetric/generated_summarydatapoint.go @@ -20,11 +20,12 @@ import ( // Must use NewSummaryDataPoint function to create new instances. // Important: zero-initialized instance is not valid for use. type SummaryDataPoint struct { - orig *otlpmetrics.SummaryDataPoint + orig *otlpmetrics.SummaryDataPoint + state *internal.State } -func newSummaryDataPoint(orig *otlpmetrics.SummaryDataPoint) SummaryDataPoint { - return SummaryDataPoint{orig} +func newSummaryDataPoint(orig *otlpmetrics.SummaryDataPoint, state *internal.State) SummaryDataPoint { + return SummaryDataPoint{orig: orig, state: state} } // NewSummaryDataPoint creates a new empty SummaryDataPoint. @@ -32,19 +33,22 @@ func newSummaryDataPoint(orig *otlpmetrics.SummaryDataPoint) SummaryDataPoint { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewSummaryDataPoint() SummaryDataPoint { - return newSummaryDataPoint(&otlpmetrics.SummaryDataPoint{}) + state := internal.StateMutable + return newSummaryDataPoint(&otlpmetrics.SummaryDataPoint{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms SummaryDataPoint) MoveTo(dest SummaryDataPoint) { + ms.state.AssertMutable() + dest.state.AssertMutable() *dest.orig = *ms.orig *ms.orig = otlpmetrics.SummaryDataPoint{} } // Attributes returns the Attributes associated with this SummaryDataPoint. func (ms SummaryDataPoint) Attributes() pcommon.Map { - return pcommon.Map(internal.NewMap(&ms.orig.Attributes)) + return pcommon.Map(internal.NewMap(&ms.orig.Attributes, ms.state)) } // StartTimestamp returns the starttimestamp associated with this SummaryDataPoint. @@ -54,6 +58,7 @@ func (ms SummaryDataPoint) StartTimestamp() pcommon.Timestamp { // SetStartTimestamp replaces the starttimestamp associated with this SummaryDataPoint. func (ms SummaryDataPoint) SetStartTimestamp(v pcommon.Timestamp) { + ms.state.AssertMutable() ms.orig.StartTimeUnixNano = uint64(v) } @@ -64,6 +69,7 @@ func (ms SummaryDataPoint) Timestamp() pcommon.Timestamp { // SetTimestamp replaces the timestamp associated with this SummaryDataPoint. func (ms SummaryDataPoint) SetTimestamp(v pcommon.Timestamp) { + ms.state.AssertMutable() ms.orig.TimeUnixNano = uint64(v) } @@ -74,6 +80,7 @@ func (ms SummaryDataPoint) Count() uint64 { // SetCount replaces the count associated with this SummaryDataPoint. func (ms SummaryDataPoint) SetCount(v uint64) { + ms.state.AssertMutable() ms.orig.Count = v } @@ -84,12 +91,13 @@ func (ms SummaryDataPoint) Sum() float64 { // SetSum replaces the sum associated with this SummaryDataPoint. func (ms SummaryDataPoint) SetSum(v float64) { + ms.state.AssertMutable() ms.orig.Sum = v } // QuantileValues returns the QuantileValues associated with this SummaryDataPoint. func (ms SummaryDataPoint) QuantileValues() SummaryDataPointValueAtQuantileSlice { - return newSummaryDataPointValueAtQuantileSlice(&ms.orig.QuantileValues) + return newSummaryDataPointValueAtQuantileSlice(&ms.orig.QuantileValues, ms.state) } // Flags returns the flags associated with this SummaryDataPoint. @@ -99,11 +107,13 @@ func (ms SummaryDataPoint) Flags() DataPointFlags { // SetFlags replaces the flags associated with this SummaryDataPoint. func (ms SummaryDataPoint) SetFlags(v DataPointFlags) { + ms.state.AssertMutable() ms.orig.Flags = uint32(v) } // CopyTo copies all properties from the current struct overriding the destination. func (ms SummaryDataPoint) CopyTo(dest SummaryDataPoint) { + dest.state.AssertMutable() ms.Attributes().CopyTo(dest.Attributes()) dest.SetStartTimestamp(ms.StartTimestamp()) dest.SetTimestamp(ms.Timestamp()) diff --git a/pdata/pmetric/generated_summarydatapoint_test.go b/pdata/pmetric/generated_summarydatapoint_test.go index b82d6104991..fce1e638d41 100644 --- a/pdata/pmetric/generated_summarydatapoint_test.go +++ b/pdata/pmetric/generated_summarydatapoint_test.go @@ -12,6 +12,7 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/pdata/internal" + otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" "go.opentelemetry.io/collector/pdata/pcommon" ) @@ -21,6 +22,9 @@ func TestSummaryDataPoint_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewSummaryDataPoint(), ms) assert.Equal(t, generateTestSummaryDataPoint(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newSummaryDataPoint(&otlpmetrics.SummaryDataPoint{}, &sharedState)) }) + assert.Panics(t, func() { newSummaryDataPoint(&otlpmetrics.SummaryDataPoint{}, &sharedState).MoveTo(dest) }) } func TestSummaryDataPoint_CopyTo(t *testing.T) { @@ -31,6 +35,8 @@ func TestSummaryDataPoint_CopyTo(t *testing.T) { orig = generateTestSummaryDataPoint() orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newSummaryDataPoint(&otlpmetrics.SummaryDataPoint{}, &sharedState)) }) } func TestSummaryDataPoint_Attributes(t *testing.T) { @@ -61,6 +67,8 @@ func TestSummaryDataPoint_Count(t *testing.T) { assert.Equal(t, uint64(0), ms.Count()) ms.SetCount(uint64(17)) assert.Equal(t, uint64(17), ms.Count()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newSummaryDataPoint(&otlpmetrics.SummaryDataPoint{}, &sharedState).SetCount(uint64(17)) }) } func TestSummaryDataPoint_Sum(t *testing.T) { @@ -68,6 +76,8 @@ func TestSummaryDataPoint_Sum(t *testing.T) { assert.Equal(t, float64(0.0), ms.Sum()) ms.SetSum(float64(17.13)) assert.Equal(t, float64(17.13), ms.Sum()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newSummaryDataPoint(&otlpmetrics.SummaryDataPoint{}, &sharedState).SetSum(float64(17.13)) }) } func TestSummaryDataPoint_QuantileValues(t *testing.T) { @@ -92,11 +102,11 @@ func generateTestSummaryDataPoint() SummaryDataPoint { } func fillTestSummaryDataPoint(tv SummaryDataPoint) { - internal.FillTestMap(internal.NewMap(&tv.orig.Attributes)) + internal.FillTestMap(internal.NewMap(&tv.orig.Attributes, tv.state)) tv.orig.StartTimeUnixNano = 1234567890 tv.orig.TimeUnixNano = 1234567890 tv.orig.Count = uint64(17) tv.orig.Sum = float64(17.13) - fillTestSummaryDataPointValueAtQuantileSlice(newSummaryDataPointValueAtQuantileSlice(&tv.orig.QuantileValues)) + fillTestSummaryDataPointValueAtQuantileSlice(newSummaryDataPointValueAtQuantileSlice(&tv.orig.QuantileValues, tv.state)) tv.orig.Flags = 1 } diff --git a/pdata/pmetric/generated_summarydatapointslice.go b/pdata/pmetric/generated_summarydatapointslice.go index 57e895e3265..f915500963f 100644 --- a/pdata/pmetric/generated_summarydatapointslice.go +++ b/pdata/pmetric/generated_summarydatapointslice.go @@ -9,6 +9,7 @@ package pmetric import ( "sort" + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) @@ -20,18 +21,20 @@ import ( // Must use NewSummaryDataPointSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type SummaryDataPointSlice struct { - orig *[]*otlpmetrics.SummaryDataPoint + orig *[]*otlpmetrics.SummaryDataPoint + state *internal.State } -func newSummaryDataPointSlice(orig *[]*otlpmetrics.SummaryDataPoint) SummaryDataPointSlice { - return SummaryDataPointSlice{orig} +func newSummaryDataPointSlice(orig *[]*otlpmetrics.SummaryDataPoint, state *internal.State) SummaryDataPointSlice { + return SummaryDataPointSlice{orig: orig, state: state} } // NewSummaryDataPointSlice creates a SummaryDataPointSlice with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewSummaryDataPointSlice() SummaryDataPointSlice { orig := []*otlpmetrics.SummaryDataPoint(nil) - return newSummaryDataPointSlice(&orig) + state := internal.StateMutable + return newSummaryDataPointSlice(&orig, &state) } // Len returns the number of elements in the slice. @@ -50,7 +53,7 @@ func (es SummaryDataPointSlice) Len() int { // ... // Do something with the element // } func (es SummaryDataPointSlice) At(i int) SummaryDataPoint { - return newSummaryDataPoint((*es.orig)[i]) + return newSummaryDataPoint((*es.orig)[i], es.state) } // EnsureCapacity is an operation that ensures the slice has at least the specified capacity. @@ -66,6 +69,7 @@ func (es SummaryDataPointSlice) At(i int) SummaryDataPoint { // // Here should set all the values for e. // } func (es SummaryDataPointSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() oldCap := cap(*es.orig) if newCap <= oldCap { return @@ -79,6 +83,7 @@ func (es SummaryDataPointSlice) EnsureCapacity(newCap int) { // AppendEmpty will append to the end of the slice an empty SummaryDataPoint. // It returns the newly added SummaryDataPoint. func (es SummaryDataPointSlice) AppendEmpty() SummaryDataPoint { + es.state.AssertMutable() *es.orig = append(*es.orig, &otlpmetrics.SummaryDataPoint{}) return es.At(es.Len() - 1) } @@ -86,6 +91,8 @@ func (es SummaryDataPointSlice) AppendEmpty() SummaryDataPoint { // MoveAndAppendTo moves all elements from the current slice and appends them to the dest. // The current slice will be cleared. func (es SummaryDataPointSlice) MoveAndAppendTo(dest SummaryDataPointSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() if *dest.orig == nil { // We can simply move the entire vector and avoid any allocations. *dest.orig = *es.orig @@ -98,6 +105,7 @@ func (es SummaryDataPointSlice) MoveAndAppendTo(dest SummaryDataPointSlice) { // RemoveIf calls f sequentially for each element present in the slice. // If f returns true, the element is removed from the slice. func (es SummaryDataPointSlice) RemoveIf(f func(SummaryDataPoint) bool) { + es.state.AssertMutable() newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { @@ -111,18 +119,18 @@ func (es SummaryDataPointSlice) RemoveIf(f func(SummaryDataPoint) bool) { (*es.orig)[newLen] = (*es.orig)[i] newLen++ } - // TODO: Prevent memory leak by erasing truncated values. *es.orig = (*es.orig)[:newLen] } // CopyTo copies all elements from the current slice overriding the destination. func (es SummaryDataPointSlice) CopyTo(dest SummaryDataPointSlice) { + dest.state.AssertMutable() srcLen := es.Len() destCap := cap(*dest.orig) if srcLen <= destCap { (*dest.orig) = (*dest.orig)[:srcLen:destCap] for i := range *es.orig { - newSummaryDataPoint((*es.orig)[i]).CopyTo(newSummaryDataPoint((*dest.orig)[i])) + newSummaryDataPoint((*es.orig)[i], es.state).CopyTo(newSummaryDataPoint((*dest.orig)[i], dest.state)) } return } @@ -130,7 +138,7 @@ func (es SummaryDataPointSlice) CopyTo(dest SummaryDataPointSlice) { wrappers := make([]*otlpmetrics.SummaryDataPoint, srcLen) for i := range *es.orig { wrappers[i] = &origs[i] - newSummaryDataPoint((*es.orig)[i]).CopyTo(newSummaryDataPoint(wrappers[i])) + newSummaryDataPoint((*es.orig)[i], es.state).CopyTo(newSummaryDataPoint(wrappers[i], dest.state)) } *dest.orig = wrappers } @@ -139,5 +147,6 @@ func (es SummaryDataPointSlice) CopyTo(dest SummaryDataPointSlice) { // provided less function so that two instances of SummaryDataPointSlice // can be compared. func (es SummaryDataPointSlice) Sort(less func(a, b SummaryDataPoint) bool) { + es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } diff --git a/pdata/pmetric/generated_summarydatapointslice_test.go b/pdata/pmetric/generated_summarydatapointslice_test.go index 3c917e4bfb4..10a12b45e5a 100644 --- a/pdata/pmetric/generated_summarydatapointslice_test.go +++ b/pdata/pmetric/generated_summarydatapointslice_test.go @@ -12,13 +12,15 @@ import ( "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) func TestSummaryDataPointSlice(t *testing.T) { es := NewSummaryDataPointSlice() assert.Equal(t, 0, es.Len()) - es = newSummaryDataPointSlice(&[]*otlpmetrics.SummaryDataPoint{}) + state := internal.StateMutable + es = newSummaryDataPointSlice(&[]*otlpmetrics.SummaryDataPoint{}, &state) assert.Equal(t, 0, es.Len()) emptyVal := NewSummaryDataPoint() @@ -32,6 +34,19 @@ func TestSummaryDataPointSlice(t *testing.T) { assert.Equal(t, 7, es.Len()) } +func TestSummaryDataPointSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newSummaryDataPointSlice(&[]*otlpmetrics.SummaryDataPoint{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewSummaryDataPointSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + func TestSummaryDataPointSlice_CopyTo(t *testing.T) { dest := NewSummaryDataPointSlice() // Test CopyTo to empty @@ -134,6 +149,6 @@ func fillTestSummaryDataPointSlice(es SummaryDataPointSlice) { *es.orig = make([]*otlpmetrics.SummaryDataPoint, 7) for i := 0; i < 7; i++ { (*es.orig)[i] = &otlpmetrics.SummaryDataPoint{} - fillTestSummaryDataPoint(newSummaryDataPoint((*es.orig)[i])) + fillTestSummaryDataPoint(newSummaryDataPoint((*es.orig)[i], es.state)) } } diff --git a/pdata/pmetric/generated_summarydatapointvalueatquantile.go b/pdata/pmetric/generated_summarydatapointvalueatquantile.go index c32d24d1d11..b4e1fe08f7b 100644 --- a/pdata/pmetric/generated_summarydatapointvalueatquantile.go +++ b/pdata/pmetric/generated_summarydatapointvalueatquantile.go @@ -7,6 +7,7 @@ package pmetric import ( + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) @@ -18,11 +19,12 @@ import ( // Must use NewSummaryDataPointValueAtQuantile function to create new instances. // Important: zero-initialized instance is not valid for use. type SummaryDataPointValueAtQuantile struct { - orig *otlpmetrics.SummaryDataPoint_ValueAtQuantile + orig *otlpmetrics.SummaryDataPoint_ValueAtQuantile + state *internal.State } -func newSummaryDataPointValueAtQuantile(orig *otlpmetrics.SummaryDataPoint_ValueAtQuantile) SummaryDataPointValueAtQuantile { - return SummaryDataPointValueAtQuantile{orig} +func newSummaryDataPointValueAtQuantile(orig *otlpmetrics.SummaryDataPoint_ValueAtQuantile, state *internal.State) SummaryDataPointValueAtQuantile { + return SummaryDataPointValueAtQuantile{orig: orig, state: state} } // NewSummaryDataPointValueAtQuantile creates a new empty SummaryDataPointValueAtQuantile. @@ -30,12 +32,15 @@ func newSummaryDataPointValueAtQuantile(orig *otlpmetrics.SummaryDataPoint_Value // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewSummaryDataPointValueAtQuantile() SummaryDataPointValueAtQuantile { - return newSummaryDataPointValueAtQuantile(&otlpmetrics.SummaryDataPoint_ValueAtQuantile{}) + state := internal.StateMutable + return newSummaryDataPointValueAtQuantile(&otlpmetrics.SummaryDataPoint_ValueAtQuantile{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms SummaryDataPointValueAtQuantile) MoveTo(dest SummaryDataPointValueAtQuantile) { + ms.state.AssertMutable() + dest.state.AssertMutable() *dest.orig = *ms.orig *ms.orig = otlpmetrics.SummaryDataPoint_ValueAtQuantile{} } @@ -47,6 +52,7 @@ func (ms SummaryDataPointValueAtQuantile) Quantile() float64 { // SetQuantile replaces the quantile associated with this SummaryDataPointValueAtQuantile. func (ms SummaryDataPointValueAtQuantile) SetQuantile(v float64) { + ms.state.AssertMutable() ms.orig.Quantile = v } @@ -57,11 +63,13 @@ func (ms SummaryDataPointValueAtQuantile) Value() float64 { // SetValue replaces the value associated with this SummaryDataPointValueAtQuantile. func (ms SummaryDataPointValueAtQuantile) SetValue(v float64) { + ms.state.AssertMutable() ms.orig.Value = v } // CopyTo copies all properties from the current struct overriding the destination. func (ms SummaryDataPointValueAtQuantile) CopyTo(dest SummaryDataPointValueAtQuantile) { + dest.state.AssertMutable() dest.SetQuantile(ms.Quantile()) dest.SetValue(ms.Value()) } diff --git a/pdata/pmetric/generated_summarydatapointvalueatquantile_test.go b/pdata/pmetric/generated_summarydatapointvalueatquantile_test.go index 7b0510c5da1..2dd02c799cf 100644 --- a/pdata/pmetric/generated_summarydatapointvalueatquantile_test.go +++ b/pdata/pmetric/generated_summarydatapointvalueatquantile_test.go @@ -10,6 +10,9 @@ import ( "testing" "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) func TestSummaryDataPointValueAtQuantile_MoveTo(t *testing.T) { @@ -18,6 +21,13 @@ func TestSummaryDataPointValueAtQuantile_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewSummaryDataPointValueAtQuantile(), ms) assert.Equal(t, generateTestSummaryDataPointValueAtQuantile(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + ms.MoveTo(newSummaryDataPointValueAtQuantile(&otlpmetrics.SummaryDataPoint_ValueAtQuantile{}, &sharedState)) + }) + assert.Panics(t, func() { + newSummaryDataPointValueAtQuantile(&otlpmetrics.SummaryDataPoint_ValueAtQuantile{}, &sharedState).MoveTo(dest) + }) } func TestSummaryDataPointValueAtQuantile_CopyTo(t *testing.T) { @@ -28,6 +38,10 @@ func TestSummaryDataPointValueAtQuantile_CopyTo(t *testing.T) { orig = generateTestSummaryDataPointValueAtQuantile() orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + ms.CopyTo(newSummaryDataPointValueAtQuantile(&otlpmetrics.SummaryDataPoint_ValueAtQuantile{}, &sharedState)) + }) } func TestSummaryDataPointValueAtQuantile_Quantile(t *testing.T) { @@ -35,6 +49,10 @@ func TestSummaryDataPointValueAtQuantile_Quantile(t *testing.T) { assert.Equal(t, float64(0.0), ms.Quantile()) ms.SetQuantile(float64(17.13)) assert.Equal(t, float64(17.13), ms.Quantile()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + newSummaryDataPointValueAtQuantile(&otlpmetrics.SummaryDataPoint_ValueAtQuantile{}, &sharedState).SetQuantile(float64(17.13)) + }) } func TestSummaryDataPointValueAtQuantile_Value(t *testing.T) { @@ -42,6 +60,10 @@ func TestSummaryDataPointValueAtQuantile_Value(t *testing.T) { assert.Equal(t, float64(0.0), ms.Value()) ms.SetValue(float64(17.13)) assert.Equal(t, float64(17.13), ms.Value()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + newSummaryDataPointValueAtQuantile(&otlpmetrics.SummaryDataPoint_ValueAtQuantile{}, &sharedState).SetValue(float64(17.13)) + }) } func generateTestSummaryDataPointValueAtQuantile() SummaryDataPointValueAtQuantile { diff --git a/pdata/pmetric/generated_summarydatapointvalueatquantileslice.go b/pdata/pmetric/generated_summarydatapointvalueatquantileslice.go index 3c424944b6a..ed899050ac6 100644 --- a/pdata/pmetric/generated_summarydatapointvalueatquantileslice.go +++ b/pdata/pmetric/generated_summarydatapointvalueatquantileslice.go @@ -9,6 +9,7 @@ package pmetric import ( "sort" + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) @@ -20,18 +21,20 @@ import ( // Must use NewSummaryDataPointValueAtQuantileSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type SummaryDataPointValueAtQuantileSlice struct { - orig *[]*otlpmetrics.SummaryDataPoint_ValueAtQuantile + orig *[]*otlpmetrics.SummaryDataPoint_ValueAtQuantile + state *internal.State } -func newSummaryDataPointValueAtQuantileSlice(orig *[]*otlpmetrics.SummaryDataPoint_ValueAtQuantile) SummaryDataPointValueAtQuantileSlice { - return SummaryDataPointValueAtQuantileSlice{orig} +func newSummaryDataPointValueAtQuantileSlice(orig *[]*otlpmetrics.SummaryDataPoint_ValueAtQuantile, state *internal.State) SummaryDataPointValueAtQuantileSlice { + return SummaryDataPointValueAtQuantileSlice{orig: orig, state: state} } // NewSummaryDataPointValueAtQuantileSlice creates a SummaryDataPointValueAtQuantileSlice with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewSummaryDataPointValueAtQuantileSlice() SummaryDataPointValueAtQuantileSlice { orig := []*otlpmetrics.SummaryDataPoint_ValueAtQuantile(nil) - return newSummaryDataPointValueAtQuantileSlice(&orig) + state := internal.StateMutable + return newSummaryDataPointValueAtQuantileSlice(&orig, &state) } // Len returns the number of elements in the slice. @@ -50,7 +53,7 @@ func (es SummaryDataPointValueAtQuantileSlice) Len() int { // ... // Do something with the element // } func (es SummaryDataPointValueAtQuantileSlice) At(i int) SummaryDataPointValueAtQuantile { - return newSummaryDataPointValueAtQuantile((*es.orig)[i]) + return newSummaryDataPointValueAtQuantile((*es.orig)[i], es.state) } // EnsureCapacity is an operation that ensures the slice has at least the specified capacity. @@ -66,6 +69,7 @@ func (es SummaryDataPointValueAtQuantileSlice) At(i int) SummaryDataPointValueAt // // Here should set all the values for e. // } func (es SummaryDataPointValueAtQuantileSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() oldCap := cap(*es.orig) if newCap <= oldCap { return @@ -79,6 +83,7 @@ func (es SummaryDataPointValueAtQuantileSlice) EnsureCapacity(newCap int) { // AppendEmpty will append to the end of the slice an empty SummaryDataPointValueAtQuantile. // It returns the newly added SummaryDataPointValueAtQuantile. func (es SummaryDataPointValueAtQuantileSlice) AppendEmpty() SummaryDataPointValueAtQuantile { + es.state.AssertMutable() *es.orig = append(*es.orig, &otlpmetrics.SummaryDataPoint_ValueAtQuantile{}) return es.At(es.Len() - 1) } @@ -86,6 +91,8 @@ func (es SummaryDataPointValueAtQuantileSlice) AppendEmpty() SummaryDataPointVal // MoveAndAppendTo moves all elements from the current slice and appends them to the dest. // The current slice will be cleared. func (es SummaryDataPointValueAtQuantileSlice) MoveAndAppendTo(dest SummaryDataPointValueAtQuantileSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() if *dest.orig == nil { // We can simply move the entire vector and avoid any allocations. *dest.orig = *es.orig @@ -98,6 +105,7 @@ func (es SummaryDataPointValueAtQuantileSlice) MoveAndAppendTo(dest SummaryDataP // RemoveIf calls f sequentially for each element present in the slice. // If f returns true, the element is removed from the slice. func (es SummaryDataPointValueAtQuantileSlice) RemoveIf(f func(SummaryDataPointValueAtQuantile) bool) { + es.state.AssertMutable() newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { @@ -111,18 +119,18 @@ func (es SummaryDataPointValueAtQuantileSlice) RemoveIf(f func(SummaryDataPointV (*es.orig)[newLen] = (*es.orig)[i] newLen++ } - // TODO: Prevent memory leak by erasing truncated values. *es.orig = (*es.orig)[:newLen] } // CopyTo copies all elements from the current slice overriding the destination. func (es SummaryDataPointValueAtQuantileSlice) CopyTo(dest SummaryDataPointValueAtQuantileSlice) { + dest.state.AssertMutable() srcLen := es.Len() destCap := cap(*dest.orig) if srcLen <= destCap { (*dest.orig) = (*dest.orig)[:srcLen:destCap] for i := range *es.orig { - newSummaryDataPointValueAtQuantile((*es.orig)[i]).CopyTo(newSummaryDataPointValueAtQuantile((*dest.orig)[i])) + newSummaryDataPointValueAtQuantile((*es.orig)[i], es.state).CopyTo(newSummaryDataPointValueAtQuantile((*dest.orig)[i], dest.state)) } return } @@ -130,7 +138,7 @@ func (es SummaryDataPointValueAtQuantileSlice) CopyTo(dest SummaryDataPointValue wrappers := make([]*otlpmetrics.SummaryDataPoint_ValueAtQuantile, srcLen) for i := range *es.orig { wrappers[i] = &origs[i] - newSummaryDataPointValueAtQuantile((*es.orig)[i]).CopyTo(newSummaryDataPointValueAtQuantile(wrappers[i])) + newSummaryDataPointValueAtQuantile((*es.orig)[i], es.state).CopyTo(newSummaryDataPointValueAtQuantile(wrappers[i], dest.state)) } *dest.orig = wrappers } @@ -139,5 +147,6 @@ func (es SummaryDataPointValueAtQuantileSlice) CopyTo(dest SummaryDataPointValue // provided less function so that two instances of SummaryDataPointValueAtQuantileSlice // can be compared. func (es SummaryDataPointValueAtQuantileSlice) Sort(less func(a, b SummaryDataPointValueAtQuantile) bool) { + es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } diff --git a/pdata/pmetric/generated_summarydatapointvalueatquantileslice_test.go b/pdata/pmetric/generated_summarydatapointvalueatquantileslice_test.go index 20f7c439efe..5ad949f10d1 100644 --- a/pdata/pmetric/generated_summarydatapointvalueatquantileslice_test.go +++ b/pdata/pmetric/generated_summarydatapointvalueatquantileslice_test.go @@ -12,13 +12,15 @@ import ( "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) func TestSummaryDataPointValueAtQuantileSlice(t *testing.T) { es := NewSummaryDataPointValueAtQuantileSlice() assert.Equal(t, 0, es.Len()) - es = newSummaryDataPointValueAtQuantileSlice(&[]*otlpmetrics.SummaryDataPoint_ValueAtQuantile{}) + state := internal.StateMutable + es = newSummaryDataPointValueAtQuantileSlice(&[]*otlpmetrics.SummaryDataPoint_ValueAtQuantile{}, &state) assert.Equal(t, 0, es.Len()) emptyVal := NewSummaryDataPointValueAtQuantile() @@ -32,6 +34,19 @@ func TestSummaryDataPointValueAtQuantileSlice(t *testing.T) { assert.Equal(t, 7, es.Len()) } +func TestSummaryDataPointValueAtQuantileSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newSummaryDataPointValueAtQuantileSlice(&[]*otlpmetrics.SummaryDataPoint_ValueAtQuantile{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewSummaryDataPointValueAtQuantileSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + func TestSummaryDataPointValueAtQuantileSlice_CopyTo(t *testing.T) { dest := NewSummaryDataPointValueAtQuantileSlice() // Test CopyTo to empty @@ -134,6 +149,6 @@ func fillTestSummaryDataPointValueAtQuantileSlice(es SummaryDataPointValueAtQuan *es.orig = make([]*otlpmetrics.SummaryDataPoint_ValueAtQuantile, 7) for i := 0; i < 7; i++ { (*es.orig)[i] = &otlpmetrics.SummaryDataPoint_ValueAtQuantile{} - fillTestSummaryDataPointValueAtQuantile(newSummaryDataPointValueAtQuantile((*es.orig)[i])) + fillTestSummaryDataPointValueAtQuantile(newSummaryDataPointValueAtQuantile((*es.orig)[i], es.state)) } } diff --git a/pdata/pmetric/json.go b/pdata/pmetric/json.go index 3df234c2000..c8b76b0e6ec 100644 --- a/pdata/pmetric/json.go +++ b/pdata/pmetric/json.go @@ -17,8 +17,10 @@ import ( var _ Marshaler = (*JSONMarshaler)(nil) +// JSONMarshaler marshals pdata.Metrics to JSON bytes using the OTLP/JSON format. type JSONMarshaler struct{} +// MarshalMetrics to the OTLP/JSON format. func (*JSONMarshaler) MarshalMetrics(md Metrics) ([]byte, error) { buf := bytes.Buffer{} pb := internal.MetricsToProto(internal.Metrics(md)) @@ -26,8 +28,10 @@ func (*JSONMarshaler) MarshalMetrics(md Metrics) ([]byte, error) { return buf.Bytes(), err } +// JSONUnmarshaler unmarshals OTLP/JSON formatted-bytes to pdata.Metrics. type JSONUnmarshaler struct{} +// UnmarshalMetrics from OTLP/JSON format into pdata.Metrics. func (*JSONUnmarshaler) UnmarshalMetrics(buf []byte) (Metrics, error) { iter := jsoniter.ConfigFastest.BorrowIterator(buf) defer jsoniter.ConfigFastest.ReturnIterator(iter) @@ -44,7 +48,7 @@ func (ms Metrics) unmarshalJsoniter(iter *jsoniter.Iterator) { iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { switch f { case "resource_metrics", "resourceMetrics": - iter.ReadArrayCB(func(iterator *jsoniter.Iterator) bool { + iter.ReadArrayCB(func(*jsoniter.Iterator) bool { ms.ResourceMetrics().AppendEmpty().unmarshalJsoniter(iter) return true }) diff --git a/pdata/pmetric/metrics.go b/pdata/pmetric/metrics.go index d72997a1bc4..91195ca4dfa 100644 --- a/pdata/pmetric/metrics.go +++ b/pdata/pmetric/metrics.go @@ -13,18 +13,28 @@ import ( type Metrics internal.Metrics func newMetrics(orig *otlpcollectormetrics.ExportMetricsServiceRequest) Metrics { - return Metrics(internal.NewMetrics(orig)) + state := internal.StateMutable + return Metrics(internal.NewMetrics(orig, &state)) } func (ms Metrics) getOrig() *otlpcollectormetrics.ExportMetricsServiceRequest { return internal.GetOrigMetrics(internal.Metrics(ms)) } +func (ms Metrics) getState() *internal.State { + return internal.GetMetricsState(internal.Metrics(ms)) +} + // NewMetrics creates a new Metrics struct. func NewMetrics() Metrics { return newMetrics(&otlpcollectormetrics.ExportMetricsServiceRequest{}) } +// IsReadOnly returns true if this Metrics instance is read-only. +func (ms Metrics) IsReadOnly() bool { + return *ms.getState() == internal.StateReadOnly +} + // CopyTo copies the Metrics instance overriding the destination. func (ms Metrics) CopyTo(dest Metrics) { ms.ResourceMetrics().CopyTo(dest.ResourceMetrics()) @@ -32,7 +42,7 @@ func (ms Metrics) CopyTo(dest Metrics) { // ResourceMetrics returns the ResourceMetricsSlice associated with this Metrics. func (ms Metrics) ResourceMetrics() ResourceMetricsSlice { - return newResourceMetricsSlice(&ms.getOrig().ResourceMetrics) + return newResourceMetricsSlice(&ms.getOrig().ResourceMetrics, internal.GetMetricsState(internal.Metrics(ms))) } // MetricCount calculates the total number of metrics. @@ -78,3 +88,8 @@ func (ms Metrics) DataPointCount() (dataPointCount int) { } return } + +// MarkReadOnly marks the Metrics as shared so that no further modifications can be done on it. +func (ms Metrics) MarkReadOnly() { + internal.SetMetricsState(internal.Metrics(ms), internal.StateReadOnly) +} diff --git a/pdata/pmetric/metrics_test.go b/pdata/pmetric/metrics_test.go index 811123aa00f..3c059643a84 100644 --- a/pdata/pmetric/metrics_test.go +++ b/pdata/pmetric/metrics_test.go @@ -5,6 +5,7 @@ package pmetric import ( "testing" + "time" gogoproto "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/assert" @@ -635,6 +636,16 @@ func TestMetricsCopyTo(t *testing.T) { assert.EqualValues(t, metrics, metricsCopy) } +func TestReadOnlyMetricsInvalidUsage(t *testing.T) { + metrics := NewMetrics() + assert.False(t, metrics.IsReadOnly()) + res := metrics.ResourceMetrics().AppendEmpty().Resource() + res.Attributes().PutStr("k1", "v1") + metrics.MarkReadOnly() + assert.True(t, metrics.IsReadOnly()) + assert.Panics(t, func() { res.Attributes().PutStr("k2", "v2") }) +} + func BenchmarkOtlpToFromInternal_PassThrough(b *testing.B) { req := &otlpcollectormetrics.ExportMetricsServiceRequest{ ResourceMetrics: []*otlpmetrics.ResourceMetrics{ @@ -931,3 +942,57 @@ func generateMetricsEmptyDataPoints() Metrics { }, }) } + +func BenchmarkMetricsUsage(b *testing.B) { + metrics := NewMetrics() + fillTestResourceMetricsSlice(metrics.ResourceMetrics()) + + ts := pcommon.NewTimestampFromTime(time.Now()) + + b.ReportAllocs() + b.ResetTimer() + + for bb := 0; bb < b.N; bb++ { + for i := 0; i < metrics.ResourceMetrics().Len(); i++ { + rm := metrics.ResourceMetrics().At(i) + res := rm.Resource() + res.Attributes().PutStr("foo", "bar") + v, ok := res.Attributes().Get("foo") + assert.True(b, ok) + assert.Equal(b, "bar", v.Str()) + v.SetStr("new-bar") + assert.Equal(b, "new-bar", v.Str()) + res.Attributes().Remove("foo") + for j := 0; j < rm.ScopeMetrics().Len(); j++ { + sm := rm.ScopeMetrics().At(j) + for k := 0; k < sm.Metrics().Len(); k++ { + m := sm.Metrics().At(k) + m.SetName("new_metric_name") + assert.Equal(b, "new_metric_name", m.Name()) + assert.Equal(b, MetricTypeSum, m.Type()) + m.Sum().SetAggregationTemporality(AggregationTemporalityCumulative) + assert.Equal(b, AggregationTemporalityCumulative, m.Sum().AggregationTemporality()) + m.Sum().SetIsMonotonic(true) + assert.True(b, m.Sum().IsMonotonic()) + for l := 0; l < m.Sum().DataPoints().Len(); l++ { + dp := m.Sum().DataPoints().At(l) + dp.SetIntValue(123) + assert.Equal(b, int64(123), dp.IntValue()) + assert.Equal(b, NumberDataPointValueTypeInt, dp.ValueType()) + dp.SetStartTimestamp(ts) + assert.Equal(b, ts, dp.StartTimestamp()) + } + dp := m.Sum().DataPoints().AppendEmpty() + dp.Attributes().PutStr("foo", "bar") + dp.SetDoubleValue(123) + dp.SetStartTimestamp(ts) + dp.SetTimestamp(ts) + m.Sum().DataPoints().RemoveIf(func(dp NumberDataPoint) bool { + _, ok := dp.Attributes().Get("foo") + return ok + }) + } + } + } + } +} diff --git a/pdata/pmetric/package_test.go b/pdata/pmetric/package_test.go new file mode 100644 index 00000000000..c07f77b2217 --- /dev/null +++ b/pdata/pmetric/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package pmetric + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pdata/pmetric/pmetricotlp/generated_exportpartialsuccess.go b/pdata/pmetric/pmetricotlp/generated_exportpartialsuccess.go index d528e6e8f46..60aa6a03e95 100644 --- a/pdata/pmetric/pmetricotlp/generated_exportpartialsuccess.go +++ b/pdata/pmetric/pmetricotlp/generated_exportpartialsuccess.go @@ -7,6 +7,7 @@ package pmetricotlp import ( + "go.opentelemetry.io/collector/pdata/internal" otlpcollectormetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/metrics/v1" ) @@ -18,11 +19,12 @@ import ( // Must use NewExportPartialSuccess function to create new instances. // Important: zero-initialized instance is not valid for use. type ExportPartialSuccess struct { - orig *otlpcollectormetrics.ExportMetricsPartialSuccess + orig *otlpcollectormetrics.ExportMetricsPartialSuccess + state *internal.State } -func newExportPartialSuccess(orig *otlpcollectormetrics.ExportMetricsPartialSuccess) ExportPartialSuccess { - return ExportPartialSuccess{orig} +func newExportPartialSuccess(orig *otlpcollectormetrics.ExportMetricsPartialSuccess, state *internal.State) ExportPartialSuccess { + return ExportPartialSuccess{orig: orig, state: state} } // NewExportPartialSuccess creates a new empty ExportPartialSuccess. @@ -30,12 +32,15 @@ func newExportPartialSuccess(orig *otlpcollectormetrics.ExportMetricsPartialSucc // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewExportPartialSuccess() ExportPartialSuccess { - return newExportPartialSuccess(&otlpcollectormetrics.ExportMetricsPartialSuccess{}) + state := internal.StateMutable + return newExportPartialSuccess(&otlpcollectormetrics.ExportMetricsPartialSuccess{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms ExportPartialSuccess) MoveTo(dest ExportPartialSuccess) { + ms.state.AssertMutable() + dest.state.AssertMutable() *dest.orig = *ms.orig *ms.orig = otlpcollectormetrics.ExportMetricsPartialSuccess{} } @@ -47,6 +52,7 @@ func (ms ExportPartialSuccess) RejectedDataPoints() int64 { // SetRejectedDataPoints replaces the rejecteddatapoints associated with this ExportPartialSuccess. func (ms ExportPartialSuccess) SetRejectedDataPoints(v int64) { + ms.state.AssertMutable() ms.orig.RejectedDataPoints = v } @@ -57,11 +63,13 @@ func (ms ExportPartialSuccess) ErrorMessage() string { // SetErrorMessage replaces the errormessage associated with this ExportPartialSuccess. func (ms ExportPartialSuccess) SetErrorMessage(v string) { + ms.state.AssertMutable() ms.orig.ErrorMessage = v } // CopyTo copies all properties from the current struct overriding the destination. func (ms ExportPartialSuccess) CopyTo(dest ExportPartialSuccess) { + dest.state.AssertMutable() dest.SetRejectedDataPoints(ms.RejectedDataPoints()) dest.SetErrorMessage(ms.ErrorMessage()) } diff --git a/pdata/pmetric/pmetricotlp/generated_exportpartialsuccess_test.go b/pdata/pmetric/pmetricotlp/generated_exportpartialsuccess_test.go index a351ba048fa..e6345f60413 100644 --- a/pdata/pmetric/pmetricotlp/generated_exportpartialsuccess_test.go +++ b/pdata/pmetric/pmetricotlp/generated_exportpartialsuccess_test.go @@ -10,6 +10,9 @@ import ( "testing" "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpcollectormetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/metrics/v1" ) func TestExportPartialSuccess_MoveTo(t *testing.T) { @@ -18,6 +21,13 @@ func TestExportPartialSuccess_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewExportPartialSuccess(), ms) assert.Equal(t, generateTestExportPartialSuccess(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + ms.MoveTo(newExportPartialSuccess(&otlpcollectormetrics.ExportMetricsPartialSuccess{}, &sharedState)) + }) + assert.Panics(t, func() { + newExportPartialSuccess(&otlpcollectormetrics.ExportMetricsPartialSuccess{}, &sharedState).MoveTo(dest) + }) } func TestExportPartialSuccess_CopyTo(t *testing.T) { @@ -28,6 +38,10 @@ func TestExportPartialSuccess_CopyTo(t *testing.T) { orig = generateTestExportPartialSuccess() orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + ms.CopyTo(newExportPartialSuccess(&otlpcollectormetrics.ExportMetricsPartialSuccess{}, &sharedState)) + }) } func TestExportPartialSuccess_RejectedDataPoints(t *testing.T) { @@ -35,6 +49,10 @@ func TestExportPartialSuccess_RejectedDataPoints(t *testing.T) { assert.Equal(t, int64(0), ms.RejectedDataPoints()) ms.SetRejectedDataPoints(int64(13)) assert.Equal(t, int64(13), ms.RejectedDataPoints()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + newExportPartialSuccess(&otlpcollectormetrics.ExportMetricsPartialSuccess{}, &sharedState).SetRejectedDataPoints(int64(13)) + }) } func TestExportPartialSuccess_ErrorMessage(t *testing.T) { @@ -42,6 +60,10 @@ func TestExportPartialSuccess_ErrorMessage(t *testing.T) { assert.Equal(t, "", ms.ErrorMessage()) ms.SetErrorMessage("error message") assert.Equal(t, "error message", ms.ErrorMessage()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + newExportPartialSuccess(&otlpcollectormetrics.ExportMetricsPartialSuccess{}, &sharedState).SetErrorMessage("error message") + }) } func generateTestExportPartialSuccess() ExportPartialSuccess { diff --git a/pdata/pmetric/pmetricotlp/grpc.go b/pdata/pmetric/pmetricotlp/grpc.go index be9d946b3c8..98d864d7371 100644 --- a/pdata/pmetric/pmetricotlp/grpc.go +++ b/pdata/pmetric/pmetricotlp/grpc.go @@ -10,6 +10,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "go.opentelemetry.io/collector/pdata/internal" otlpcollectormetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/metrics/v1" "go.opentelemetry.io/collector/pdata/internal/otlp" ) @@ -39,7 +40,11 @@ type grpcClient struct { func (c *grpcClient) Export(ctx context.Context, request ExportRequest, opts ...grpc.CallOption) (ExportResponse, error) { rsp, err := c.rawClient.Export(ctx, request.orig, opts...) - return ExportResponse{orig: rsp}, err + if err != nil { + return ExportResponse{}, err + } + state := internal.StateMutable + return ExportResponse{orig: rsp, state: &state}, err } func (c *grpcClient) unexported() {} @@ -79,6 +84,7 @@ type rawMetricsServer struct { func (s rawMetricsServer) Export(ctx context.Context, request *otlpcollectormetrics.ExportMetricsServiceRequest) (*otlpcollectormetrics.ExportMetricsServiceResponse, error) { otlp.MigrateMetrics(request.ResourceMetrics) - rsp, err := s.srv.Export(ctx, ExportRequest{orig: request}) + state := internal.StateMutable + rsp, err := s.srv.Export(ctx, ExportRequest{orig: request, state: &state}) return rsp.orig, err } diff --git a/pdata/pmetric/pmetricotlp/package_test.go b/pdata/pmetric/pmetricotlp/package_test.go new file mode 100644 index 00000000000..f8191b76d55 --- /dev/null +++ b/pdata/pmetric/pmetricotlp/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package pmetricotlp + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pdata/pmetric/pmetricotlp/request.go b/pdata/pmetric/pmetricotlp/request.go index 060b6e5bb07..4cca31a609f 100644 --- a/pdata/pmetric/pmetricotlp/request.go +++ b/pdata/pmetric/pmetricotlp/request.go @@ -17,19 +17,27 @@ var jsonUnmarshaler = &pmetric.JSONUnmarshaler{} // ExportRequest represents the request for gRPC/HTTP client/server. // It's a wrapper for pmetric.Metrics data. type ExportRequest struct { - orig *otlpcollectormetrics.ExportMetricsServiceRequest + orig *otlpcollectormetrics.ExportMetricsServiceRequest + state *internal.State } // NewExportRequest returns an empty ExportRequest. func NewExportRequest() ExportRequest { - return ExportRequest{orig: &otlpcollectormetrics.ExportMetricsServiceRequest{}} + state := internal.StateMutable + return ExportRequest{ + orig: &otlpcollectormetrics.ExportMetricsServiceRequest{}, + state: &state, + } } // NewExportRequestFromMetrics returns a ExportRequest from pmetric.Metrics. // Because ExportRequest is a wrapper for pmetric.Metrics, // any changes to the provided Metrics struct will be reflected in the ExportRequest and vice versa. func NewExportRequestFromMetrics(md pmetric.Metrics) ExportRequest { - return ExportRequest{orig: internal.GetOrigMetrics(internal.Metrics(md))} + return ExportRequest{ + orig: internal.GetOrigMetrics(internal.Metrics(md)), + state: internal.GetMetricsState(internal.Metrics(md)), + } } // MarshalProto marshals ExportRequest into proto bytes. @@ -62,5 +70,5 @@ func (ms ExportRequest) UnmarshalJSON(data []byte) error { } func (ms ExportRequest) Metrics() pmetric.Metrics { - return pmetric.Metrics(internal.NewMetrics(ms.orig)) + return pmetric.Metrics(internal.NewMetrics(ms.orig, ms.state)) } diff --git a/pdata/pmetric/pmetricotlp/response.go b/pdata/pmetric/pmetricotlp/response.go index 4e9d6bfe169..5942568ddb6 100644 --- a/pdata/pmetric/pmetricotlp/response.go +++ b/pdata/pmetric/pmetricotlp/response.go @@ -8,18 +8,24 @@ import ( jsoniter "github.com/json-iterator/go" + "go.opentelemetry.io/collector/pdata/internal" otlpcollectormetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/metrics/v1" "go.opentelemetry.io/collector/pdata/internal/json" ) // ExportResponse represents the response for gRPC/HTTP client/server. type ExportResponse struct { - orig *otlpcollectormetrics.ExportMetricsServiceResponse + orig *otlpcollectormetrics.ExportMetricsServiceResponse + state *internal.State } // NewExportResponse returns an empty ExportResponse. func NewExportResponse() ExportResponse { - return ExportResponse{orig: &otlpcollectormetrics.ExportMetricsServiceResponse{}} + state := internal.StateMutable + return ExportResponse{ + orig: &otlpcollectormetrics.ExportMetricsServiceResponse{}, + state: &state, + } } // MarshalProto marshals ExportResponse into proto bytes. @@ -51,7 +57,7 @@ func (ms ExportResponse) UnmarshalJSON(data []byte) error { // PartialSuccess returns the ExportLogsPartialSuccess associated with this ExportResponse. func (ms ExportResponse) PartialSuccess() ExportPartialSuccess { - return newExportPartialSuccess(&ms.orig.PartialSuccess) + return newExportPartialSuccess(&ms.orig.PartialSuccess, ms.state) } func (ms ExportResponse) unmarshalJsoniter(iter *jsoniter.Iterator) { @@ -67,7 +73,7 @@ func (ms ExportResponse) unmarshalJsoniter(iter *jsoniter.Iterator) { } func (ms ExportPartialSuccess) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iterator *jsoniter.Iterator, f string) bool { + iter.ReadObjectCB(func(_ *jsoniter.Iterator, f string) bool { switch f { case "rejected_data_points", "rejectedDataPoints": ms.orig.RejectedDataPoints = json.ReadInt64(iter) diff --git a/pdata/ptrace/generated_resourcespans.go b/pdata/ptrace/generated_resourcespans.go index b86cca53402..fc2ed01dbbc 100644 --- a/pdata/ptrace/generated_resourcespans.go +++ b/pdata/ptrace/generated_resourcespans.go @@ -20,11 +20,12 @@ import ( // Must use NewResourceSpans function to create new instances. // Important: zero-initialized instance is not valid for use. type ResourceSpans struct { - orig *otlptrace.ResourceSpans + orig *otlptrace.ResourceSpans + state *internal.State } -func newResourceSpans(orig *otlptrace.ResourceSpans) ResourceSpans { - return ResourceSpans{orig} +func newResourceSpans(orig *otlptrace.ResourceSpans, state *internal.State) ResourceSpans { + return ResourceSpans{orig: orig, state: state} } // NewResourceSpans creates a new empty ResourceSpans. @@ -32,19 +33,22 @@ func newResourceSpans(orig *otlptrace.ResourceSpans) ResourceSpans { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewResourceSpans() ResourceSpans { - return newResourceSpans(&otlptrace.ResourceSpans{}) + state := internal.StateMutable + return newResourceSpans(&otlptrace.ResourceSpans{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms ResourceSpans) MoveTo(dest ResourceSpans) { + ms.state.AssertMutable() + dest.state.AssertMutable() *dest.orig = *ms.orig *ms.orig = otlptrace.ResourceSpans{} } // Resource returns the resource associated with this ResourceSpans. func (ms ResourceSpans) Resource() pcommon.Resource { - return pcommon.Resource(internal.NewResource(&ms.orig.Resource)) + return pcommon.Resource(internal.NewResource(&ms.orig.Resource, ms.state)) } // SchemaUrl returns the schemaurl associated with this ResourceSpans. @@ -54,16 +58,18 @@ func (ms ResourceSpans) SchemaUrl() string { // SetSchemaUrl replaces the schemaurl associated with this ResourceSpans. func (ms ResourceSpans) SetSchemaUrl(v string) { + ms.state.AssertMutable() ms.orig.SchemaUrl = v } // ScopeSpans returns the ScopeSpans associated with this ResourceSpans. func (ms ResourceSpans) ScopeSpans() ScopeSpansSlice { - return newScopeSpansSlice(&ms.orig.ScopeSpans) + return newScopeSpansSlice(&ms.orig.ScopeSpans, ms.state) } // CopyTo copies all properties from the current struct overriding the destination. func (ms ResourceSpans) CopyTo(dest ResourceSpans) { + dest.state.AssertMutable() ms.Resource().CopyTo(dest.Resource()) dest.SetSchemaUrl(ms.SchemaUrl()) ms.ScopeSpans().CopyTo(dest.ScopeSpans()) diff --git a/pdata/ptrace/generated_resourcespans_test.go b/pdata/ptrace/generated_resourcespans_test.go index 0fb248b3aba..2300c04f63e 100644 --- a/pdata/ptrace/generated_resourcespans_test.go +++ b/pdata/ptrace/generated_resourcespans_test.go @@ -12,6 +12,7 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/pdata/internal" + otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" "go.opentelemetry.io/collector/pdata/pcommon" ) @@ -21,6 +22,9 @@ func TestResourceSpans_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewResourceSpans(), ms) assert.Equal(t, generateTestResourceSpans(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newResourceSpans(&otlptrace.ResourceSpans{}, &sharedState)) }) + assert.Panics(t, func() { newResourceSpans(&otlptrace.ResourceSpans{}, &sharedState).MoveTo(dest) }) } func TestResourceSpans_CopyTo(t *testing.T) { @@ -31,6 +35,8 @@ func TestResourceSpans_CopyTo(t *testing.T) { orig = generateTestResourceSpans() orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newResourceSpans(&otlptrace.ResourceSpans{}, &sharedState)) }) } func TestResourceSpans_Resource(t *testing.T) { @@ -44,6 +50,10 @@ func TestResourceSpans_SchemaUrl(t *testing.T) { assert.Equal(t, "", ms.SchemaUrl()) ms.SetSchemaUrl("https://opentelemetry.io/schemas/1.5.0") assert.Equal(t, "https://opentelemetry.io/schemas/1.5.0", ms.SchemaUrl()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + newResourceSpans(&otlptrace.ResourceSpans{}, &sharedState).SetSchemaUrl("https://opentelemetry.io/schemas/1.5.0") + }) } func TestResourceSpans_ScopeSpans(t *testing.T) { @@ -60,7 +70,7 @@ func generateTestResourceSpans() ResourceSpans { } func fillTestResourceSpans(tv ResourceSpans) { - internal.FillTestResource(internal.NewResource(&tv.orig.Resource)) + internal.FillTestResource(internal.NewResource(&tv.orig.Resource, tv.state)) tv.orig.SchemaUrl = "https://opentelemetry.io/schemas/1.5.0" - fillTestScopeSpansSlice(newScopeSpansSlice(&tv.orig.ScopeSpans)) + fillTestScopeSpansSlice(newScopeSpansSlice(&tv.orig.ScopeSpans, tv.state)) } diff --git a/pdata/ptrace/generated_resourcespansslice.go b/pdata/ptrace/generated_resourcespansslice.go index 5c625fb781f..da79ef4a342 100644 --- a/pdata/ptrace/generated_resourcespansslice.go +++ b/pdata/ptrace/generated_resourcespansslice.go @@ -9,6 +9,7 @@ package ptrace import ( "sort" + "go.opentelemetry.io/collector/pdata/internal" otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" ) @@ -20,18 +21,20 @@ import ( // Must use NewResourceSpansSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type ResourceSpansSlice struct { - orig *[]*otlptrace.ResourceSpans + orig *[]*otlptrace.ResourceSpans + state *internal.State } -func newResourceSpansSlice(orig *[]*otlptrace.ResourceSpans) ResourceSpansSlice { - return ResourceSpansSlice{orig} +func newResourceSpansSlice(orig *[]*otlptrace.ResourceSpans, state *internal.State) ResourceSpansSlice { + return ResourceSpansSlice{orig: orig, state: state} } // NewResourceSpansSlice creates a ResourceSpansSlice with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewResourceSpansSlice() ResourceSpansSlice { orig := []*otlptrace.ResourceSpans(nil) - return newResourceSpansSlice(&orig) + state := internal.StateMutable + return newResourceSpansSlice(&orig, &state) } // Len returns the number of elements in the slice. @@ -50,7 +53,7 @@ func (es ResourceSpansSlice) Len() int { // ... // Do something with the element // } func (es ResourceSpansSlice) At(i int) ResourceSpans { - return newResourceSpans((*es.orig)[i]) + return newResourceSpans((*es.orig)[i], es.state) } // EnsureCapacity is an operation that ensures the slice has at least the specified capacity. @@ -66,6 +69,7 @@ func (es ResourceSpansSlice) At(i int) ResourceSpans { // // Here should set all the values for e. // } func (es ResourceSpansSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() oldCap := cap(*es.orig) if newCap <= oldCap { return @@ -79,6 +83,7 @@ func (es ResourceSpansSlice) EnsureCapacity(newCap int) { // AppendEmpty will append to the end of the slice an empty ResourceSpans. // It returns the newly added ResourceSpans. func (es ResourceSpansSlice) AppendEmpty() ResourceSpans { + es.state.AssertMutable() *es.orig = append(*es.orig, &otlptrace.ResourceSpans{}) return es.At(es.Len() - 1) } @@ -86,6 +91,8 @@ func (es ResourceSpansSlice) AppendEmpty() ResourceSpans { // MoveAndAppendTo moves all elements from the current slice and appends them to the dest. // The current slice will be cleared. func (es ResourceSpansSlice) MoveAndAppendTo(dest ResourceSpansSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() if *dest.orig == nil { // We can simply move the entire vector and avoid any allocations. *dest.orig = *es.orig @@ -98,6 +105,7 @@ func (es ResourceSpansSlice) MoveAndAppendTo(dest ResourceSpansSlice) { // RemoveIf calls f sequentially for each element present in the slice. // If f returns true, the element is removed from the slice. func (es ResourceSpansSlice) RemoveIf(f func(ResourceSpans) bool) { + es.state.AssertMutable() newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { @@ -111,18 +119,18 @@ func (es ResourceSpansSlice) RemoveIf(f func(ResourceSpans) bool) { (*es.orig)[newLen] = (*es.orig)[i] newLen++ } - // TODO: Prevent memory leak by erasing truncated values. *es.orig = (*es.orig)[:newLen] } // CopyTo copies all elements from the current slice overriding the destination. func (es ResourceSpansSlice) CopyTo(dest ResourceSpansSlice) { + dest.state.AssertMutable() srcLen := es.Len() destCap := cap(*dest.orig) if srcLen <= destCap { (*dest.orig) = (*dest.orig)[:srcLen:destCap] for i := range *es.orig { - newResourceSpans((*es.orig)[i]).CopyTo(newResourceSpans((*dest.orig)[i])) + newResourceSpans((*es.orig)[i], es.state).CopyTo(newResourceSpans((*dest.orig)[i], dest.state)) } return } @@ -130,7 +138,7 @@ func (es ResourceSpansSlice) CopyTo(dest ResourceSpansSlice) { wrappers := make([]*otlptrace.ResourceSpans, srcLen) for i := range *es.orig { wrappers[i] = &origs[i] - newResourceSpans((*es.orig)[i]).CopyTo(newResourceSpans(wrappers[i])) + newResourceSpans((*es.orig)[i], es.state).CopyTo(newResourceSpans(wrappers[i], dest.state)) } *dest.orig = wrappers } @@ -139,5 +147,6 @@ func (es ResourceSpansSlice) CopyTo(dest ResourceSpansSlice) { // provided less function so that two instances of ResourceSpansSlice // can be compared. func (es ResourceSpansSlice) Sort(less func(a, b ResourceSpans) bool) { + es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } diff --git a/pdata/ptrace/generated_resourcespansslice_test.go b/pdata/ptrace/generated_resourcespansslice_test.go index db8e3b1c7e4..aa7bdf738a9 100644 --- a/pdata/ptrace/generated_resourcespansslice_test.go +++ b/pdata/ptrace/generated_resourcespansslice_test.go @@ -12,13 +12,15 @@ import ( "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/internal" otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" ) func TestResourceSpansSlice(t *testing.T) { es := NewResourceSpansSlice() assert.Equal(t, 0, es.Len()) - es = newResourceSpansSlice(&[]*otlptrace.ResourceSpans{}) + state := internal.StateMutable + es = newResourceSpansSlice(&[]*otlptrace.ResourceSpans{}, &state) assert.Equal(t, 0, es.Len()) emptyVal := NewResourceSpans() @@ -32,6 +34,19 @@ func TestResourceSpansSlice(t *testing.T) { assert.Equal(t, 7, es.Len()) } +func TestResourceSpansSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newResourceSpansSlice(&[]*otlptrace.ResourceSpans{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewResourceSpansSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + func TestResourceSpansSlice_CopyTo(t *testing.T) { dest := NewResourceSpansSlice() // Test CopyTo to empty @@ -134,6 +149,6 @@ func fillTestResourceSpansSlice(es ResourceSpansSlice) { *es.orig = make([]*otlptrace.ResourceSpans, 7) for i := 0; i < 7; i++ { (*es.orig)[i] = &otlptrace.ResourceSpans{} - fillTestResourceSpans(newResourceSpans((*es.orig)[i])) + fillTestResourceSpans(newResourceSpans((*es.orig)[i], es.state)) } } diff --git a/pdata/ptrace/generated_scopespans.go b/pdata/ptrace/generated_scopespans.go index 81926f24004..6ea0d82fd68 100644 --- a/pdata/ptrace/generated_scopespans.go +++ b/pdata/ptrace/generated_scopespans.go @@ -20,11 +20,12 @@ import ( // Must use NewScopeSpans function to create new instances. // Important: zero-initialized instance is not valid for use. type ScopeSpans struct { - orig *otlptrace.ScopeSpans + orig *otlptrace.ScopeSpans + state *internal.State } -func newScopeSpans(orig *otlptrace.ScopeSpans) ScopeSpans { - return ScopeSpans{orig} +func newScopeSpans(orig *otlptrace.ScopeSpans, state *internal.State) ScopeSpans { + return ScopeSpans{orig: orig, state: state} } // NewScopeSpans creates a new empty ScopeSpans. @@ -32,19 +33,22 @@ func newScopeSpans(orig *otlptrace.ScopeSpans) ScopeSpans { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewScopeSpans() ScopeSpans { - return newScopeSpans(&otlptrace.ScopeSpans{}) + state := internal.StateMutable + return newScopeSpans(&otlptrace.ScopeSpans{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms ScopeSpans) MoveTo(dest ScopeSpans) { + ms.state.AssertMutable() + dest.state.AssertMutable() *dest.orig = *ms.orig *ms.orig = otlptrace.ScopeSpans{} } // Scope returns the scope associated with this ScopeSpans. func (ms ScopeSpans) Scope() pcommon.InstrumentationScope { - return pcommon.InstrumentationScope(internal.NewInstrumentationScope(&ms.orig.Scope)) + return pcommon.InstrumentationScope(internal.NewInstrumentationScope(&ms.orig.Scope, ms.state)) } // SchemaUrl returns the schemaurl associated with this ScopeSpans. @@ -54,16 +58,18 @@ func (ms ScopeSpans) SchemaUrl() string { // SetSchemaUrl replaces the schemaurl associated with this ScopeSpans. func (ms ScopeSpans) SetSchemaUrl(v string) { + ms.state.AssertMutable() ms.orig.SchemaUrl = v } // Spans returns the Spans associated with this ScopeSpans. func (ms ScopeSpans) Spans() SpanSlice { - return newSpanSlice(&ms.orig.Spans) + return newSpanSlice(&ms.orig.Spans, ms.state) } // CopyTo copies all properties from the current struct overriding the destination. func (ms ScopeSpans) CopyTo(dest ScopeSpans) { + dest.state.AssertMutable() ms.Scope().CopyTo(dest.Scope()) dest.SetSchemaUrl(ms.SchemaUrl()) ms.Spans().CopyTo(dest.Spans()) diff --git a/pdata/ptrace/generated_scopespans_test.go b/pdata/ptrace/generated_scopespans_test.go index c470e8f11fc..21b665aed27 100644 --- a/pdata/ptrace/generated_scopespans_test.go +++ b/pdata/ptrace/generated_scopespans_test.go @@ -12,6 +12,7 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/pdata/internal" + otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" "go.opentelemetry.io/collector/pdata/pcommon" ) @@ -21,6 +22,9 @@ func TestScopeSpans_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewScopeSpans(), ms) assert.Equal(t, generateTestScopeSpans(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newScopeSpans(&otlptrace.ScopeSpans{}, &sharedState)) }) + assert.Panics(t, func() { newScopeSpans(&otlptrace.ScopeSpans{}, &sharedState).MoveTo(dest) }) } func TestScopeSpans_CopyTo(t *testing.T) { @@ -31,6 +35,8 @@ func TestScopeSpans_CopyTo(t *testing.T) { orig = generateTestScopeSpans() orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newScopeSpans(&otlptrace.ScopeSpans{}, &sharedState)) }) } func TestScopeSpans_Scope(t *testing.T) { @@ -44,6 +50,10 @@ func TestScopeSpans_SchemaUrl(t *testing.T) { assert.Equal(t, "", ms.SchemaUrl()) ms.SetSchemaUrl("https://opentelemetry.io/schemas/1.5.0") assert.Equal(t, "https://opentelemetry.io/schemas/1.5.0", ms.SchemaUrl()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + newScopeSpans(&otlptrace.ScopeSpans{}, &sharedState).SetSchemaUrl("https://opentelemetry.io/schemas/1.5.0") + }) } func TestScopeSpans_Spans(t *testing.T) { @@ -60,7 +70,7 @@ func generateTestScopeSpans() ScopeSpans { } func fillTestScopeSpans(tv ScopeSpans) { - internal.FillTestInstrumentationScope(internal.NewInstrumentationScope(&tv.orig.Scope)) + internal.FillTestInstrumentationScope(internal.NewInstrumentationScope(&tv.orig.Scope, tv.state)) tv.orig.SchemaUrl = "https://opentelemetry.io/schemas/1.5.0" - fillTestSpanSlice(newSpanSlice(&tv.orig.Spans)) + fillTestSpanSlice(newSpanSlice(&tv.orig.Spans, tv.state)) } diff --git a/pdata/ptrace/generated_scopespansslice.go b/pdata/ptrace/generated_scopespansslice.go index 622d29be2c9..8fd0b4b8e99 100644 --- a/pdata/ptrace/generated_scopespansslice.go +++ b/pdata/ptrace/generated_scopespansslice.go @@ -9,6 +9,7 @@ package ptrace import ( "sort" + "go.opentelemetry.io/collector/pdata/internal" otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" ) @@ -20,18 +21,20 @@ import ( // Must use NewScopeSpansSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type ScopeSpansSlice struct { - orig *[]*otlptrace.ScopeSpans + orig *[]*otlptrace.ScopeSpans + state *internal.State } -func newScopeSpansSlice(orig *[]*otlptrace.ScopeSpans) ScopeSpansSlice { - return ScopeSpansSlice{orig} +func newScopeSpansSlice(orig *[]*otlptrace.ScopeSpans, state *internal.State) ScopeSpansSlice { + return ScopeSpansSlice{orig: orig, state: state} } // NewScopeSpansSlice creates a ScopeSpansSlice with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewScopeSpansSlice() ScopeSpansSlice { orig := []*otlptrace.ScopeSpans(nil) - return newScopeSpansSlice(&orig) + state := internal.StateMutable + return newScopeSpansSlice(&orig, &state) } // Len returns the number of elements in the slice. @@ -50,7 +53,7 @@ func (es ScopeSpansSlice) Len() int { // ... // Do something with the element // } func (es ScopeSpansSlice) At(i int) ScopeSpans { - return newScopeSpans((*es.orig)[i]) + return newScopeSpans((*es.orig)[i], es.state) } // EnsureCapacity is an operation that ensures the slice has at least the specified capacity. @@ -66,6 +69,7 @@ func (es ScopeSpansSlice) At(i int) ScopeSpans { // // Here should set all the values for e. // } func (es ScopeSpansSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() oldCap := cap(*es.orig) if newCap <= oldCap { return @@ -79,6 +83,7 @@ func (es ScopeSpansSlice) EnsureCapacity(newCap int) { // AppendEmpty will append to the end of the slice an empty ScopeSpans. // It returns the newly added ScopeSpans. func (es ScopeSpansSlice) AppendEmpty() ScopeSpans { + es.state.AssertMutable() *es.orig = append(*es.orig, &otlptrace.ScopeSpans{}) return es.At(es.Len() - 1) } @@ -86,6 +91,8 @@ func (es ScopeSpansSlice) AppendEmpty() ScopeSpans { // MoveAndAppendTo moves all elements from the current slice and appends them to the dest. // The current slice will be cleared. func (es ScopeSpansSlice) MoveAndAppendTo(dest ScopeSpansSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() if *dest.orig == nil { // We can simply move the entire vector and avoid any allocations. *dest.orig = *es.orig @@ -98,6 +105,7 @@ func (es ScopeSpansSlice) MoveAndAppendTo(dest ScopeSpansSlice) { // RemoveIf calls f sequentially for each element present in the slice. // If f returns true, the element is removed from the slice. func (es ScopeSpansSlice) RemoveIf(f func(ScopeSpans) bool) { + es.state.AssertMutable() newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { @@ -111,18 +119,18 @@ func (es ScopeSpansSlice) RemoveIf(f func(ScopeSpans) bool) { (*es.orig)[newLen] = (*es.orig)[i] newLen++ } - // TODO: Prevent memory leak by erasing truncated values. *es.orig = (*es.orig)[:newLen] } // CopyTo copies all elements from the current slice overriding the destination. func (es ScopeSpansSlice) CopyTo(dest ScopeSpansSlice) { + dest.state.AssertMutable() srcLen := es.Len() destCap := cap(*dest.orig) if srcLen <= destCap { (*dest.orig) = (*dest.orig)[:srcLen:destCap] for i := range *es.orig { - newScopeSpans((*es.orig)[i]).CopyTo(newScopeSpans((*dest.orig)[i])) + newScopeSpans((*es.orig)[i], es.state).CopyTo(newScopeSpans((*dest.orig)[i], dest.state)) } return } @@ -130,7 +138,7 @@ func (es ScopeSpansSlice) CopyTo(dest ScopeSpansSlice) { wrappers := make([]*otlptrace.ScopeSpans, srcLen) for i := range *es.orig { wrappers[i] = &origs[i] - newScopeSpans((*es.orig)[i]).CopyTo(newScopeSpans(wrappers[i])) + newScopeSpans((*es.orig)[i], es.state).CopyTo(newScopeSpans(wrappers[i], dest.state)) } *dest.orig = wrappers } @@ -139,5 +147,6 @@ func (es ScopeSpansSlice) CopyTo(dest ScopeSpansSlice) { // provided less function so that two instances of ScopeSpansSlice // can be compared. func (es ScopeSpansSlice) Sort(less func(a, b ScopeSpans) bool) { + es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } diff --git a/pdata/ptrace/generated_scopespansslice_test.go b/pdata/ptrace/generated_scopespansslice_test.go index 950e481913c..1c3fa931bf1 100644 --- a/pdata/ptrace/generated_scopespansslice_test.go +++ b/pdata/ptrace/generated_scopespansslice_test.go @@ -12,13 +12,15 @@ import ( "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/internal" otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" ) func TestScopeSpansSlice(t *testing.T) { es := NewScopeSpansSlice() assert.Equal(t, 0, es.Len()) - es = newScopeSpansSlice(&[]*otlptrace.ScopeSpans{}) + state := internal.StateMutable + es = newScopeSpansSlice(&[]*otlptrace.ScopeSpans{}, &state) assert.Equal(t, 0, es.Len()) emptyVal := NewScopeSpans() @@ -32,6 +34,19 @@ func TestScopeSpansSlice(t *testing.T) { assert.Equal(t, 7, es.Len()) } +func TestScopeSpansSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newScopeSpansSlice(&[]*otlptrace.ScopeSpans{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewScopeSpansSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + func TestScopeSpansSlice_CopyTo(t *testing.T) { dest := NewScopeSpansSlice() // Test CopyTo to empty @@ -134,6 +149,6 @@ func fillTestScopeSpansSlice(es ScopeSpansSlice) { *es.orig = make([]*otlptrace.ScopeSpans, 7) for i := 0; i < 7; i++ { (*es.orig)[i] = &otlptrace.ScopeSpans{} - fillTestScopeSpans(newScopeSpans((*es.orig)[i])) + fillTestScopeSpans(newScopeSpans((*es.orig)[i], es.state)) } } diff --git a/pdata/ptrace/generated_span.go b/pdata/ptrace/generated_span.go index 6b76b7efd40..56a701974c4 100644 --- a/pdata/ptrace/generated_span.go +++ b/pdata/ptrace/generated_span.go @@ -22,11 +22,12 @@ import ( // Must use NewSpan function to create new instances. // Important: zero-initialized instance is not valid for use. type Span struct { - orig *otlptrace.Span + orig *otlptrace.Span + state *internal.State } -func newSpan(orig *otlptrace.Span) Span { - return Span{orig} +func newSpan(orig *otlptrace.Span, state *internal.State) Span { + return Span{orig: orig, state: state} } // NewSpan creates a new empty Span. @@ -34,12 +35,15 @@ func newSpan(orig *otlptrace.Span) Span { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewSpan() Span { - return newSpan(&otlptrace.Span{}) + state := internal.StateMutable + return newSpan(&otlptrace.Span{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms Span) MoveTo(dest Span) { + ms.state.AssertMutable() + dest.state.AssertMutable() *dest.orig = *ms.orig *ms.orig = otlptrace.Span{} } @@ -51,6 +55,7 @@ func (ms Span) TraceID() pcommon.TraceID { // SetTraceID replaces the traceid associated with this Span. func (ms Span) SetTraceID(v pcommon.TraceID) { + ms.state.AssertMutable() ms.orig.TraceId = data.TraceID(v) } @@ -61,12 +66,13 @@ func (ms Span) SpanID() pcommon.SpanID { // SetSpanID replaces the spanid associated with this Span. func (ms Span) SetSpanID(v pcommon.SpanID) { + ms.state.AssertMutable() ms.orig.SpanId = data.SpanID(v) } // TraceState returns the tracestate associated with this Span. func (ms Span) TraceState() pcommon.TraceState { - return pcommon.TraceState(internal.NewTraceState(&ms.orig.TraceState)) + return pcommon.TraceState(internal.NewTraceState(&ms.orig.TraceState, ms.state)) } // ParentSpanID returns the parentspanid associated with this Span. @@ -76,6 +82,7 @@ func (ms Span) ParentSpanID() pcommon.SpanID { // SetParentSpanID replaces the parentspanid associated with this Span. func (ms Span) SetParentSpanID(v pcommon.SpanID) { + ms.state.AssertMutable() ms.orig.ParentSpanId = data.SpanID(v) } @@ -86,9 +93,21 @@ func (ms Span) Name() string { // SetName replaces the name associated with this Span. func (ms Span) SetName(v string) { + ms.state.AssertMutable() ms.orig.Name = v } +// Flags returns the flags associated with this Span. +func (ms Span) Flags() uint32 { + return ms.orig.Flags +} + +// SetFlags replaces the flags associated with this Span. +func (ms Span) SetFlags(v uint32) { + ms.state.AssertMutable() + ms.orig.Flags = v +} + // Kind returns the kind associated with this Span. func (ms Span) Kind() SpanKind { return SpanKind(ms.orig.Kind) @@ -96,6 +115,7 @@ func (ms Span) Kind() SpanKind { // SetKind replaces the kind associated with this Span. func (ms Span) SetKind(v SpanKind) { + ms.state.AssertMutable() ms.orig.Kind = otlptrace.Span_SpanKind(v) } @@ -106,6 +126,7 @@ func (ms Span) StartTimestamp() pcommon.Timestamp { // SetStartTimestamp replaces the starttimestamp associated with this Span. func (ms Span) SetStartTimestamp(v pcommon.Timestamp) { + ms.state.AssertMutable() ms.orig.StartTimeUnixNano = uint64(v) } @@ -116,12 +137,13 @@ func (ms Span) EndTimestamp() pcommon.Timestamp { // SetEndTimestamp replaces the endtimestamp associated with this Span. func (ms Span) SetEndTimestamp(v pcommon.Timestamp) { + ms.state.AssertMutable() ms.orig.EndTimeUnixNano = uint64(v) } // Attributes returns the Attributes associated with this Span. func (ms Span) Attributes() pcommon.Map { - return pcommon.Map(internal.NewMap(&ms.orig.Attributes)) + return pcommon.Map(internal.NewMap(&ms.orig.Attributes, ms.state)) } // DroppedAttributesCount returns the droppedattributescount associated with this Span. @@ -131,12 +153,13 @@ func (ms Span) DroppedAttributesCount() uint32 { // SetDroppedAttributesCount replaces the droppedattributescount associated with this Span. func (ms Span) SetDroppedAttributesCount(v uint32) { + ms.state.AssertMutable() ms.orig.DroppedAttributesCount = v } // Events returns the Events associated with this Span. func (ms Span) Events() SpanEventSlice { - return newSpanEventSlice(&ms.orig.Events) + return newSpanEventSlice(&ms.orig.Events, ms.state) } // DroppedEventsCount returns the droppedeventscount associated with this Span. @@ -146,12 +169,13 @@ func (ms Span) DroppedEventsCount() uint32 { // SetDroppedEventsCount replaces the droppedeventscount associated with this Span. func (ms Span) SetDroppedEventsCount(v uint32) { + ms.state.AssertMutable() ms.orig.DroppedEventsCount = v } // Links returns the Links associated with this Span. func (ms Span) Links() SpanLinkSlice { - return newSpanLinkSlice(&ms.orig.Links) + return newSpanLinkSlice(&ms.orig.Links, ms.state) } // DroppedLinksCount returns the droppedlinkscount associated with this Span. @@ -161,21 +185,24 @@ func (ms Span) DroppedLinksCount() uint32 { // SetDroppedLinksCount replaces the droppedlinkscount associated with this Span. func (ms Span) SetDroppedLinksCount(v uint32) { + ms.state.AssertMutable() ms.orig.DroppedLinksCount = v } // Status returns the status associated with this Span. func (ms Span) Status() Status { - return newStatus(&ms.orig.Status) + return newStatus(&ms.orig.Status, ms.state) } // CopyTo copies all properties from the current struct overriding the destination. func (ms Span) CopyTo(dest Span) { + dest.state.AssertMutable() dest.SetTraceID(ms.TraceID()) dest.SetSpanID(ms.SpanID()) ms.TraceState().CopyTo(dest.TraceState()) dest.SetParentSpanID(ms.ParentSpanID()) dest.SetName(ms.Name()) + dest.SetFlags(ms.Flags()) dest.SetKind(ms.Kind()) dest.SetStartTimestamp(ms.StartTimestamp()) dest.SetEndTimestamp(ms.EndTimestamp()) diff --git a/pdata/ptrace/generated_span_test.go b/pdata/ptrace/generated_span_test.go index b971dd3294a..1038d583066 100644 --- a/pdata/ptrace/generated_span_test.go +++ b/pdata/ptrace/generated_span_test.go @@ -23,6 +23,9 @@ func TestSpan_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewSpan(), ms) assert.Equal(t, generateTestSpan(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newSpan(&otlptrace.Span{}, &sharedState)) }) + assert.Panics(t, func() { newSpan(&otlptrace.Span{}, &sharedState).MoveTo(dest) }) } func TestSpan_CopyTo(t *testing.T) { @@ -33,6 +36,8 @@ func TestSpan_CopyTo(t *testing.T) { orig = generateTestSpan() orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newSpan(&otlptrace.Span{}, &sharedState)) }) } func TestSpan_TraceID(t *testing.T) { @@ -70,6 +75,17 @@ func TestSpan_Name(t *testing.T) { assert.Equal(t, "", ms.Name()) ms.SetName("test_name") assert.Equal(t, "test_name", ms.Name()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newSpan(&otlptrace.Span{}, &sharedState).SetName("test_name") }) +} + +func TestSpan_Flags(t *testing.T) { + ms := NewSpan() + assert.Equal(t, uint32(0), ms.Flags()) + ms.SetFlags(uint32(0xf)) + assert.Equal(t, uint32(0xf), ms.Flags()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newSpan(&otlptrace.Span{}, &sharedState).SetFlags(uint32(0xf)) }) } func TestSpan_Kind(t *testing.T) { @@ -108,6 +124,8 @@ func TestSpan_DroppedAttributesCount(t *testing.T) { assert.Equal(t, uint32(0), ms.DroppedAttributesCount()) ms.SetDroppedAttributesCount(uint32(17)) assert.Equal(t, uint32(17), ms.DroppedAttributesCount()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newSpan(&otlptrace.Span{}, &sharedState).SetDroppedAttributesCount(uint32(17)) }) } func TestSpan_Events(t *testing.T) { @@ -122,6 +140,8 @@ func TestSpan_DroppedEventsCount(t *testing.T) { assert.Equal(t, uint32(0), ms.DroppedEventsCount()) ms.SetDroppedEventsCount(uint32(17)) assert.Equal(t, uint32(17), ms.DroppedEventsCount()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newSpan(&otlptrace.Span{}, &sharedState).SetDroppedEventsCount(uint32(17)) }) } func TestSpan_Links(t *testing.T) { @@ -136,6 +156,8 @@ func TestSpan_DroppedLinksCount(t *testing.T) { assert.Equal(t, uint32(0), ms.DroppedLinksCount()) ms.SetDroppedLinksCount(uint32(17)) assert.Equal(t, uint32(17), ms.DroppedLinksCount()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newSpan(&otlptrace.Span{}, &sharedState).SetDroppedLinksCount(uint32(17)) }) } func TestSpan_Status(t *testing.T) { @@ -153,17 +175,18 @@ func generateTestSpan() Span { func fillTestSpan(tv Span) { tv.orig.TraceId = data.TraceID([16]byte{1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1}) tv.orig.SpanId = data.SpanID([8]byte{8, 7, 6, 5, 4, 3, 2, 1}) - internal.FillTestTraceState(internal.NewTraceState(&tv.orig.TraceState)) + internal.FillTestTraceState(internal.NewTraceState(&tv.orig.TraceState, tv.state)) tv.orig.ParentSpanId = data.SpanID([8]byte{8, 7, 6, 5, 4, 3, 2, 1}) tv.orig.Name = "test_name" + tv.orig.Flags = uint32(0xf) tv.orig.Kind = otlptrace.Span_SpanKind(3) tv.orig.StartTimeUnixNano = 1234567890 tv.orig.EndTimeUnixNano = 1234567890 - internal.FillTestMap(internal.NewMap(&tv.orig.Attributes)) + internal.FillTestMap(internal.NewMap(&tv.orig.Attributes, tv.state)) tv.orig.DroppedAttributesCount = uint32(17) - fillTestSpanEventSlice(newSpanEventSlice(&tv.orig.Events)) + fillTestSpanEventSlice(newSpanEventSlice(&tv.orig.Events, tv.state)) tv.orig.DroppedEventsCount = uint32(17) - fillTestSpanLinkSlice(newSpanLinkSlice(&tv.orig.Links)) + fillTestSpanLinkSlice(newSpanLinkSlice(&tv.orig.Links, tv.state)) tv.orig.DroppedLinksCount = uint32(17) - fillTestStatus(newStatus(&tv.orig.Status)) + fillTestStatus(newStatus(&tv.orig.Status, tv.state)) } diff --git a/pdata/ptrace/generated_spanevent.go b/pdata/ptrace/generated_spanevent.go index 06da71a3425..a35c88ae93d 100644 --- a/pdata/ptrace/generated_spanevent.go +++ b/pdata/ptrace/generated_spanevent.go @@ -21,11 +21,12 @@ import ( // Must use NewSpanEvent function to create new instances. // Important: zero-initialized instance is not valid for use. type SpanEvent struct { - orig *otlptrace.Span_Event + orig *otlptrace.Span_Event + state *internal.State } -func newSpanEvent(orig *otlptrace.Span_Event) SpanEvent { - return SpanEvent{orig} +func newSpanEvent(orig *otlptrace.Span_Event, state *internal.State) SpanEvent { + return SpanEvent{orig: orig, state: state} } // NewSpanEvent creates a new empty SpanEvent. @@ -33,12 +34,15 @@ func newSpanEvent(orig *otlptrace.Span_Event) SpanEvent { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewSpanEvent() SpanEvent { - return newSpanEvent(&otlptrace.Span_Event{}) + state := internal.StateMutable + return newSpanEvent(&otlptrace.Span_Event{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms SpanEvent) MoveTo(dest SpanEvent) { + ms.state.AssertMutable() + dest.state.AssertMutable() *dest.orig = *ms.orig *ms.orig = otlptrace.Span_Event{} } @@ -50,6 +54,7 @@ func (ms SpanEvent) Timestamp() pcommon.Timestamp { // SetTimestamp replaces the timestamp associated with this SpanEvent. func (ms SpanEvent) SetTimestamp(v pcommon.Timestamp) { + ms.state.AssertMutable() ms.orig.TimeUnixNano = uint64(v) } @@ -60,12 +65,13 @@ func (ms SpanEvent) Name() string { // SetName replaces the name associated with this SpanEvent. func (ms SpanEvent) SetName(v string) { + ms.state.AssertMutable() ms.orig.Name = v } // Attributes returns the Attributes associated with this SpanEvent. func (ms SpanEvent) Attributes() pcommon.Map { - return pcommon.Map(internal.NewMap(&ms.orig.Attributes)) + return pcommon.Map(internal.NewMap(&ms.orig.Attributes, ms.state)) } // DroppedAttributesCount returns the droppedattributescount associated with this SpanEvent. @@ -75,11 +81,13 @@ func (ms SpanEvent) DroppedAttributesCount() uint32 { // SetDroppedAttributesCount replaces the droppedattributescount associated with this SpanEvent. func (ms SpanEvent) SetDroppedAttributesCount(v uint32) { + ms.state.AssertMutable() ms.orig.DroppedAttributesCount = v } // CopyTo copies all properties from the current struct overriding the destination. func (ms SpanEvent) CopyTo(dest SpanEvent) { + dest.state.AssertMutable() dest.SetTimestamp(ms.Timestamp()) dest.SetName(ms.Name()) ms.Attributes().CopyTo(dest.Attributes()) diff --git a/pdata/ptrace/generated_spanevent_test.go b/pdata/ptrace/generated_spanevent_test.go index af403e1fc24..24ad7de4d1c 100644 --- a/pdata/ptrace/generated_spanevent_test.go +++ b/pdata/ptrace/generated_spanevent_test.go @@ -12,6 +12,7 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/pdata/internal" + otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" "go.opentelemetry.io/collector/pdata/pcommon" ) @@ -21,6 +22,9 @@ func TestSpanEvent_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewSpanEvent(), ms) assert.Equal(t, generateTestSpanEvent(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newSpanEvent(&otlptrace.Span_Event{}, &sharedState)) }) + assert.Panics(t, func() { newSpanEvent(&otlptrace.Span_Event{}, &sharedState).MoveTo(dest) }) } func TestSpanEvent_CopyTo(t *testing.T) { @@ -31,6 +35,8 @@ func TestSpanEvent_CopyTo(t *testing.T) { orig = generateTestSpanEvent() orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newSpanEvent(&otlptrace.Span_Event{}, &sharedState)) }) } func TestSpanEvent_Timestamp(t *testing.T) { @@ -46,6 +52,8 @@ func TestSpanEvent_Name(t *testing.T) { assert.Equal(t, "", ms.Name()) ms.SetName("test_name") assert.Equal(t, "test_name", ms.Name()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newSpanEvent(&otlptrace.Span_Event{}, &sharedState).SetName("test_name") }) } func TestSpanEvent_Attributes(t *testing.T) { @@ -60,6 +68,8 @@ func TestSpanEvent_DroppedAttributesCount(t *testing.T) { assert.Equal(t, uint32(0), ms.DroppedAttributesCount()) ms.SetDroppedAttributesCount(uint32(17)) assert.Equal(t, uint32(17), ms.DroppedAttributesCount()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newSpanEvent(&otlptrace.Span_Event{}, &sharedState).SetDroppedAttributesCount(uint32(17)) }) } func generateTestSpanEvent() SpanEvent { @@ -71,6 +81,6 @@ func generateTestSpanEvent() SpanEvent { func fillTestSpanEvent(tv SpanEvent) { tv.orig.TimeUnixNano = 1234567890 tv.orig.Name = "test_name" - internal.FillTestMap(internal.NewMap(&tv.orig.Attributes)) + internal.FillTestMap(internal.NewMap(&tv.orig.Attributes, tv.state)) tv.orig.DroppedAttributesCount = uint32(17) } diff --git a/pdata/ptrace/generated_spaneventslice.go b/pdata/ptrace/generated_spaneventslice.go index d78c8ee1735..ffde17c83a2 100644 --- a/pdata/ptrace/generated_spaneventslice.go +++ b/pdata/ptrace/generated_spaneventslice.go @@ -9,6 +9,7 @@ package ptrace import ( "sort" + "go.opentelemetry.io/collector/pdata/internal" otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" ) @@ -20,18 +21,20 @@ import ( // Must use NewSpanEventSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type SpanEventSlice struct { - orig *[]*otlptrace.Span_Event + orig *[]*otlptrace.Span_Event + state *internal.State } -func newSpanEventSlice(orig *[]*otlptrace.Span_Event) SpanEventSlice { - return SpanEventSlice{orig} +func newSpanEventSlice(orig *[]*otlptrace.Span_Event, state *internal.State) SpanEventSlice { + return SpanEventSlice{orig: orig, state: state} } // NewSpanEventSlice creates a SpanEventSlice with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewSpanEventSlice() SpanEventSlice { orig := []*otlptrace.Span_Event(nil) - return newSpanEventSlice(&orig) + state := internal.StateMutable + return newSpanEventSlice(&orig, &state) } // Len returns the number of elements in the slice. @@ -50,7 +53,7 @@ func (es SpanEventSlice) Len() int { // ... // Do something with the element // } func (es SpanEventSlice) At(i int) SpanEvent { - return newSpanEvent((*es.orig)[i]) + return newSpanEvent((*es.orig)[i], es.state) } // EnsureCapacity is an operation that ensures the slice has at least the specified capacity. @@ -66,6 +69,7 @@ func (es SpanEventSlice) At(i int) SpanEvent { // // Here should set all the values for e. // } func (es SpanEventSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() oldCap := cap(*es.orig) if newCap <= oldCap { return @@ -79,6 +83,7 @@ func (es SpanEventSlice) EnsureCapacity(newCap int) { // AppendEmpty will append to the end of the slice an empty SpanEvent. // It returns the newly added SpanEvent. func (es SpanEventSlice) AppendEmpty() SpanEvent { + es.state.AssertMutable() *es.orig = append(*es.orig, &otlptrace.Span_Event{}) return es.At(es.Len() - 1) } @@ -86,6 +91,8 @@ func (es SpanEventSlice) AppendEmpty() SpanEvent { // MoveAndAppendTo moves all elements from the current slice and appends them to the dest. // The current slice will be cleared. func (es SpanEventSlice) MoveAndAppendTo(dest SpanEventSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() if *dest.orig == nil { // We can simply move the entire vector and avoid any allocations. *dest.orig = *es.orig @@ -98,6 +105,7 @@ func (es SpanEventSlice) MoveAndAppendTo(dest SpanEventSlice) { // RemoveIf calls f sequentially for each element present in the slice. // If f returns true, the element is removed from the slice. func (es SpanEventSlice) RemoveIf(f func(SpanEvent) bool) { + es.state.AssertMutable() newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { @@ -111,18 +119,18 @@ func (es SpanEventSlice) RemoveIf(f func(SpanEvent) bool) { (*es.orig)[newLen] = (*es.orig)[i] newLen++ } - // TODO: Prevent memory leak by erasing truncated values. *es.orig = (*es.orig)[:newLen] } // CopyTo copies all elements from the current slice overriding the destination. func (es SpanEventSlice) CopyTo(dest SpanEventSlice) { + dest.state.AssertMutable() srcLen := es.Len() destCap := cap(*dest.orig) if srcLen <= destCap { (*dest.orig) = (*dest.orig)[:srcLen:destCap] for i := range *es.orig { - newSpanEvent((*es.orig)[i]).CopyTo(newSpanEvent((*dest.orig)[i])) + newSpanEvent((*es.orig)[i], es.state).CopyTo(newSpanEvent((*dest.orig)[i], dest.state)) } return } @@ -130,7 +138,7 @@ func (es SpanEventSlice) CopyTo(dest SpanEventSlice) { wrappers := make([]*otlptrace.Span_Event, srcLen) for i := range *es.orig { wrappers[i] = &origs[i] - newSpanEvent((*es.orig)[i]).CopyTo(newSpanEvent(wrappers[i])) + newSpanEvent((*es.orig)[i], es.state).CopyTo(newSpanEvent(wrappers[i], dest.state)) } *dest.orig = wrappers } @@ -139,5 +147,6 @@ func (es SpanEventSlice) CopyTo(dest SpanEventSlice) { // provided less function so that two instances of SpanEventSlice // can be compared. func (es SpanEventSlice) Sort(less func(a, b SpanEvent) bool) { + es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } diff --git a/pdata/ptrace/generated_spaneventslice_test.go b/pdata/ptrace/generated_spaneventslice_test.go index 76161623897..86da67e1332 100644 --- a/pdata/ptrace/generated_spaneventslice_test.go +++ b/pdata/ptrace/generated_spaneventslice_test.go @@ -12,13 +12,15 @@ import ( "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/internal" otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" ) func TestSpanEventSlice(t *testing.T) { es := NewSpanEventSlice() assert.Equal(t, 0, es.Len()) - es = newSpanEventSlice(&[]*otlptrace.Span_Event{}) + state := internal.StateMutable + es = newSpanEventSlice(&[]*otlptrace.Span_Event{}, &state) assert.Equal(t, 0, es.Len()) emptyVal := NewSpanEvent() @@ -32,6 +34,19 @@ func TestSpanEventSlice(t *testing.T) { assert.Equal(t, 7, es.Len()) } +func TestSpanEventSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newSpanEventSlice(&[]*otlptrace.Span_Event{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewSpanEventSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + func TestSpanEventSlice_CopyTo(t *testing.T) { dest := NewSpanEventSlice() // Test CopyTo to empty @@ -134,6 +149,6 @@ func fillTestSpanEventSlice(es SpanEventSlice) { *es.orig = make([]*otlptrace.Span_Event, 7) for i := 0; i < 7; i++ { (*es.orig)[i] = &otlptrace.Span_Event{} - fillTestSpanEvent(newSpanEvent((*es.orig)[i])) + fillTestSpanEvent(newSpanEvent((*es.orig)[i], es.state)) } } diff --git a/pdata/ptrace/generated_spanlink.go b/pdata/ptrace/generated_spanlink.go index 89454fb8fcb..3121e263e23 100644 --- a/pdata/ptrace/generated_spanlink.go +++ b/pdata/ptrace/generated_spanlink.go @@ -23,11 +23,12 @@ import ( // Must use NewSpanLink function to create new instances. // Important: zero-initialized instance is not valid for use. type SpanLink struct { - orig *otlptrace.Span_Link + orig *otlptrace.Span_Link + state *internal.State } -func newSpanLink(orig *otlptrace.Span_Link) SpanLink { - return SpanLink{orig} +func newSpanLink(orig *otlptrace.Span_Link, state *internal.State) SpanLink { + return SpanLink{orig: orig, state: state} } // NewSpanLink creates a new empty SpanLink. @@ -35,12 +36,15 @@ func newSpanLink(orig *otlptrace.Span_Link) SpanLink { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewSpanLink() SpanLink { - return newSpanLink(&otlptrace.Span_Link{}) + state := internal.StateMutable + return newSpanLink(&otlptrace.Span_Link{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms SpanLink) MoveTo(dest SpanLink) { + ms.state.AssertMutable() + dest.state.AssertMutable() *dest.orig = *ms.orig *ms.orig = otlptrace.Span_Link{} } @@ -52,6 +56,7 @@ func (ms SpanLink) TraceID() pcommon.TraceID { // SetTraceID replaces the traceid associated with this SpanLink. func (ms SpanLink) SetTraceID(v pcommon.TraceID) { + ms.state.AssertMutable() ms.orig.TraceId = data.TraceID(v) } @@ -62,17 +67,29 @@ func (ms SpanLink) SpanID() pcommon.SpanID { // SetSpanID replaces the spanid associated with this SpanLink. func (ms SpanLink) SetSpanID(v pcommon.SpanID) { + ms.state.AssertMutable() ms.orig.SpanId = data.SpanID(v) } // TraceState returns the tracestate associated with this SpanLink. func (ms SpanLink) TraceState() pcommon.TraceState { - return pcommon.TraceState(internal.NewTraceState(&ms.orig.TraceState)) + return pcommon.TraceState(internal.NewTraceState(&ms.orig.TraceState, ms.state)) +} + +// Flags returns the flags associated with this SpanLink. +func (ms SpanLink) Flags() uint32 { + return ms.orig.Flags +} + +// SetFlags replaces the flags associated with this SpanLink. +func (ms SpanLink) SetFlags(v uint32) { + ms.state.AssertMutable() + ms.orig.Flags = v } // Attributes returns the Attributes associated with this SpanLink. func (ms SpanLink) Attributes() pcommon.Map { - return pcommon.Map(internal.NewMap(&ms.orig.Attributes)) + return pcommon.Map(internal.NewMap(&ms.orig.Attributes, ms.state)) } // DroppedAttributesCount returns the droppedattributescount associated with this SpanLink. @@ -82,14 +99,17 @@ func (ms SpanLink) DroppedAttributesCount() uint32 { // SetDroppedAttributesCount replaces the droppedattributescount associated with this SpanLink. func (ms SpanLink) SetDroppedAttributesCount(v uint32) { + ms.state.AssertMutable() ms.orig.DroppedAttributesCount = v } // CopyTo copies all properties from the current struct overriding the destination. func (ms SpanLink) CopyTo(dest SpanLink) { + dest.state.AssertMutable() dest.SetTraceID(ms.TraceID()) dest.SetSpanID(ms.SpanID()) ms.TraceState().CopyTo(dest.TraceState()) + dest.SetFlags(ms.Flags()) ms.Attributes().CopyTo(dest.Attributes()) dest.SetDroppedAttributesCount(ms.DroppedAttributesCount()) } diff --git a/pdata/ptrace/generated_spanlink_test.go b/pdata/ptrace/generated_spanlink_test.go index b0bbb58a78a..89d60df56d1 100644 --- a/pdata/ptrace/generated_spanlink_test.go +++ b/pdata/ptrace/generated_spanlink_test.go @@ -13,6 +13,7 @@ import ( "go.opentelemetry.io/collector/pdata/internal" "go.opentelemetry.io/collector/pdata/internal/data" + otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" "go.opentelemetry.io/collector/pdata/pcommon" ) @@ -22,6 +23,9 @@ func TestSpanLink_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewSpanLink(), ms) assert.Equal(t, generateTestSpanLink(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newSpanLink(&otlptrace.Span_Link{}, &sharedState)) }) + assert.Panics(t, func() { newSpanLink(&otlptrace.Span_Link{}, &sharedState).MoveTo(dest) }) } func TestSpanLink_CopyTo(t *testing.T) { @@ -32,6 +36,8 @@ func TestSpanLink_CopyTo(t *testing.T) { orig = generateTestSpanLink() orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newSpanLink(&otlptrace.Span_Link{}, &sharedState)) }) } func TestSpanLink_TraceID(t *testing.T) { @@ -56,6 +62,15 @@ func TestSpanLink_TraceState(t *testing.T) { assert.Equal(t, pcommon.TraceState(internal.GenerateTestTraceState()), ms.TraceState()) } +func TestSpanLink_Flags(t *testing.T) { + ms := NewSpanLink() + assert.Equal(t, uint32(0), ms.Flags()) + ms.SetFlags(uint32(0xf)) + assert.Equal(t, uint32(0xf), ms.Flags()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newSpanLink(&otlptrace.Span_Link{}, &sharedState).SetFlags(uint32(0xf)) }) +} + func TestSpanLink_Attributes(t *testing.T) { ms := NewSpanLink() assert.Equal(t, pcommon.NewMap(), ms.Attributes()) @@ -68,6 +83,8 @@ func TestSpanLink_DroppedAttributesCount(t *testing.T) { assert.Equal(t, uint32(0), ms.DroppedAttributesCount()) ms.SetDroppedAttributesCount(uint32(17)) assert.Equal(t, uint32(17), ms.DroppedAttributesCount()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newSpanLink(&otlptrace.Span_Link{}, &sharedState).SetDroppedAttributesCount(uint32(17)) }) } func generateTestSpanLink() SpanLink { @@ -79,7 +96,8 @@ func generateTestSpanLink() SpanLink { func fillTestSpanLink(tv SpanLink) { tv.orig.TraceId = data.TraceID([16]byte{1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1}) tv.orig.SpanId = data.SpanID([8]byte{8, 7, 6, 5, 4, 3, 2, 1}) - internal.FillTestTraceState(internal.NewTraceState(&tv.orig.TraceState)) - internal.FillTestMap(internal.NewMap(&tv.orig.Attributes)) + internal.FillTestTraceState(internal.NewTraceState(&tv.orig.TraceState, tv.state)) + tv.orig.Flags = uint32(0xf) + internal.FillTestMap(internal.NewMap(&tv.orig.Attributes, tv.state)) tv.orig.DroppedAttributesCount = uint32(17) } diff --git a/pdata/ptrace/generated_spanlinkslice.go b/pdata/ptrace/generated_spanlinkslice.go index 19d75a4807b..164038b8bed 100644 --- a/pdata/ptrace/generated_spanlinkslice.go +++ b/pdata/ptrace/generated_spanlinkslice.go @@ -9,6 +9,7 @@ package ptrace import ( "sort" + "go.opentelemetry.io/collector/pdata/internal" otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" ) @@ -20,18 +21,20 @@ import ( // Must use NewSpanLinkSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type SpanLinkSlice struct { - orig *[]*otlptrace.Span_Link + orig *[]*otlptrace.Span_Link + state *internal.State } -func newSpanLinkSlice(orig *[]*otlptrace.Span_Link) SpanLinkSlice { - return SpanLinkSlice{orig} +func newSpanLinkSlice(orig *[]*otlptrace.Span_Link, state *internal.State) SpanLinkSlice { + return SpanLinkSlice{orig: orig, state: state} } // NewSpanLinkSlice creates a SpanLinkSlice with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewSpanLinkSlice() SpanLinkSlice { orig := []*otlptrace.Span_Link(nil) - return newSpanLinkSlice(&orig) + state := internal.StateMutable + return newSpanLinkSlice(&orig, &state) } // Len returns the number of elements in the slice. @@ -50,7 +53,7 @@ func (es SpanLinkSlice) Len() int { // ... // Do something with the element // } func (es SpanLinkSlice) At(i int) SpanLink { - return newSpanLink((*es.orig)[i]) + return newSpanLink((*es.orig)[i], es.state) } // EnsureCapacity is an operation that ensures the slice has at least the specified capacity. @@ -66,6 +69,7 @@ func (es SpanLinkSlice) At(i int) SpanLink { // // Here should set all the values for e. // } func (es SpanLinkSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() oldCap := cap(*es.orig) if newCap <= oldCap { return @@ -79,6 +83,7 @@ func (es SpanLinkSlice) EnsureCapacity(newCap int) { // AppendEmpty will append to the end of the slice an empty SpanLink. // It returns the newly added SpanLink. func (es SpanLinkSlice) AppendEmpty() SpanLink { + es.state.AssertMutable() *es.orig = append(*es.orig, &otlptrace.Span_Link{}) return es.At(es.Len() - 1) } @@ -86,6 +91,8 @@ func (es SpanLinkSlice) AppendEmpty() SpanLink { // MoveAndAppendTo moves all elements from the current slice and appends them to the dest. // The current slice will be cleared. func (es SpanLinkSlice) MoveAndAppendTo(dest SpanLinkSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() if *dest.orig == nil { // We can simply move the entire vector and avoid any allocations. *dest.orig = *es.orig @@ -98,6 +105,7 @@ func (es SpanLinkSlice) MoveAndAppendTo(dest SpanLinkSlice) { // RemoveIf calls f sequentially for each element present in the slice. // If f returns true, the element is removed from the slice. func (es SpanLinkSlice) RemoveIf(f func(SpanLink) bool) { + es.state.AssertMutable() newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { @@ -111,18 +119,18 @@ func (es SpanLinkSlice) RemoveIf(f func(SpanLink) bool) { (*es.orig)[newLen] = (*es.orig)[i] newLen++ } - // TODO: Prevent memory leak by erasing truncated values. *es.orig = (*es.orig)[:newLen] } // CopyTo copies all elements from the current slice overriding the destination. func (es SpanLinkSlice) CopyTo(dest SpanLinkSlice) { + dest.state.AssertMutable() srcLen := es.Len() destCap := cap(*dest.orig) if srcLen <= destCap { (*dest.orig) = (*dest.orig)[:srcLen:destCap] for i := range *es.orig { - newSpanLink((*es.orig)[i]).CopyTo(newSpanLink((*dest.orig)[i])) + newSpanLink((*es.orig)[i], es.state).CopyTo(newSpanLink((*dest.orig)[i], dest.state)) } return } @@ -130,7 +138,7 @@ func (es SpanLinkSlice) CopyTo(dest SpanLinkSlice) { wrappers := make([]*otlptrace.Span_Link, srcLen) for i := range *es.orig { wrappers[i] = &origs[i] - newSpanLink((*es.orig)[i]).CopyTo(newSpanLink(wrappers[i])) + newSpanLink((*es.orig)[i], es.state).CopyTo(newSpanLink(wrappers[i], dest.state)) } *dest.orig = wrappers } @@ -139,5 +147,6 @@ func (es SpanLinkSlice) CopyTo(dest SpanLinkSlice) { // provided less function so that two instances of SpanLinkSlice // can be compared. func (es SpanLinkSlice) Sort(less func(a, b SpanLink) bool) { + es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } diff --git a/pdata/ptrace/generated_spanlinkslice_test.go b/pdata/ptrace/generated_spanlinkslice_test.go index 3ab05bfa547..9ad8f4dc276 100644 --- a/pdata/ptrace/generated_spanlinkslice_test.go +++ b/pdata/ptrace/generated_spanlinkslice_test.go @@ -12,13 +12,15 @@ import ( "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/internal" otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" ) func TestSpanLinkSlice(t *testing.T) { es := NewSpanLinkSlice() assert.Equal(t, 0, es.Len()) - es = newSpanLinkSlice(&[]*otlptrace.Span_Link{}) + state := internal.StateMutable + es = newSpanLinkSlice(&[]*otlptrace.Span_Link{}, &state) assert.Equal(t, 0, es.Len()) emptyVal := NewSpanLink() @@ -32,6 +34,19 @@ func TestSpanLinkSlice(t *testing.T) { assert.Equal(t, 7, es.Len()) } +func TestSpanLinkSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newSpanLinkSlice(&[]*otlptrace.Span_Link{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewSpanLinkSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + func TestSpanLinkSlice_CopyTo(t *testing.T) { dest := NewSpanLinkSlice() // Test CopyTo to empty @@ -134,6 +149,6 @@ func fillTestSpanLinkSlice(es SpanLinkSlice) { *es.orig = make([]*otlptrace.Span_Link, 7) for i := 0; i < 7; i++ { (*es.orig)[i] = &otlptrace.Span_Link{} - fillTestSpanLink(newSpanLink((*es.orig)[i])) + fillTestSpanLink(newSpanLink((*es.orig)[i], es.state)) } } diff --git a/pdata/ptrace/generated_spanslice.go b/pdata/ptrace/generated_spanslice.go index 5b39aacb073..654a547523f 100644 --- a/pdata/ptrace/generated_spanslice.go +++ b/pdata/ptrace/generated_spanslice.go @@ -9,6 +9,7 @@ package ptrace import ( "sort" + "go.opentelemetry.io/collector/pdata/internal" otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" ) @@ -20,18 +21,20 @@ import ( // Must use NewSpanSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type SpanSlice struct { - orig *[]*otlptrace.Span + orig *[]*otlptrace.Span + state *internal.State } -func newSpanSlice(orig *[]*otlptrace.Span) SpanSlice { - return SpanSlice{orig} +func newSpanSlice(orig *[]*otlptrace.Span, state *internal.State) SpanSlice { + return SpanSlice{orig: orig, state: state} } // NewSpanSlice creates a SpanSlice with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewSpanSlice() SpanSlice { orig := []*otlptrace.Span(nil) - return newSpanSlice(&orig) + state := internal.StateMutable + return newSpanSlice(&orig, &state) } // Len returns the number of elements in the slice. @@ -50,7 +53,7 @@ func (es SpanSlice) Len() int { // ... // Do something with the element // } func (es SpanSlice) At(i int) Span { - return newSpan((*es.orig)[i]) + return newSpan((*es.orig)[i], es.state) } // EnsureCapacity is an operation that ensures the slice has at least the specified capacity. @@ -66,6 +69,7 @@ func (es SpanSlice) At(i int) Span { // // Here should set all the values for e. // } func (es SpanSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() oldCap := cap(*es.orig) if newCap <= oldCap { return @@ -79,6 +83,7 @@ func (es SpanSlice) EnsureCapacity(newCap int) { // AppendEmpty will append to the end of the slice an empty Span. // It returns the newly added Span. func (es SpanSlice) AppendEmpty() Span { + es.state.AssertMutable() *es.orig = append(*es.orig, &otlptrace.Span{}) return es.At(es.Len() - 1) } @@ -86,6 +91,8 @@ func (es SpanSlice) AppendEmpty() Span { // MoveAndAppendTo moves all elements from the current slice and appends them to the dest. // The current slice will be cleared. func (es SpanSlice) MoveAndAppendTo(dest SpanSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() if *dest.orig == nil { // We can simply move the entire vector and avoid any allocations. *dest.orig = *es.orig @@ -98,6 +105,7 @@ func (es SpanSlice) MoveAndAppendTo(dest SpanSlice) { // RemoveIf calls f sequentially for each element present in the slice. // If f returns true, the element is removed from the slice. func (es SpanSlice) RemoveIf(f func(Span) bool) { + es.state.AssertMutable() newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { @@ -111,18 +119,18 @@ func (es SpanSlice) RemoveIf(f func(Span) bool) { (*es.orig)[newLen] = (*es.orig)[i] newLen++ } - // TODO: Prevent memory leak by erasing truncated values. *es.orig = (*es.orig)[:newLen] } // CopyTo copies all elements from the current slice overriding the destination. func (es SpanSlice) CopyTo(dest SpanSlice) { + dest.state.AssertMutable() srcLen := es.Len() destCap := cap(*dest.orig) if srcLen <= destCap { (*dest.orig) = (*dest.orig)[:srcLen:destCap] for i := range *es.orig { - newSpan((*es.orig)[i]).CopyTo(newSpan((*dest.orig)[i])) + newSpan((*es.orig)[i], es.state).CopyTo(newSpan((*dest.orig)[i], dest.state)) } return } @@ -130,7 +138,7 @@ func (es SpanSlice) CopyTo(dest SpanSlice) { wrappers := make([]*otlptrace.Span, srcLen) for i := range *es.orig { wrappers[i] = &origs[i] - newSpan((*es.orig)[i]).CopyTo(newSpan(wrappers[i])) + newSpan((*es.orig)[i], es.state).CopyTo(newSpan(wrappers[i], dest.state)) } *dest.orig = wrappers } @@ -139,5 +147,6 @@ func (es SpanSlice) CopyTo(dest SpanSlice) { // provided less function so that two instances of SpanSlice // can be compared. func (es SpanSlice) Sort(less func(a, b Span) bool) { + es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } diff --git a/pdata/ptrace/generated_spanslice_test.go b/pdata/ptrace/generated_spanslice_test.go index 0417d2cbd25..1ae585b996f 100644 --- a/pdata/ptrace/generated_spanslice_test.go +++ b/pdata/ptrace/generated_spanslice_test.go @@ -12,13 +12,15 @@ import ( "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/internal" otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" ) func TestSpanSlice(t *testing.T) { es := NewSpanSlice() assert.Equal(t, 0, es.Len()) - es = newSpanSlice(&[]*otlptrace.Span{}) + state := internal.StateMutable + es = newSpanSlice(&[]*otlptrace.Span{}, &state) assert.Equal(t, 0, es.Len()) emptyVal := NewSpan() @@ -32,6 +34,19 @@ func TestSpanSlice(t *testing.T) { assert.Equal(t, 7, es.Len()) } +func TestSpanSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newSpanSlice(&[]*otlptrace.Span{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewSpanSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + func TestSpanSlice_CopyTo(t *testing.T) { dest := NewSpanSlice() // Test CopyTo to empty @@ -134,6 +149,6 @@ func fillTestSpanSlice(es SpanSlice) { *es.orig = make([]*otlptrace.Span, 7) for i := 0; i < 7; i++ { (*es.orig)[i] = &otlptrace.Span{} - fillTestSpan(newSpan((*es.orig)[i])) + fillTestSpan(newSpan((*es.orig)[i], es.state)) } } diff --git a/pdata/ptrace/generated_status.go b/pdata/ptrace/generated_status.go index c0850997b22..2b3e66a92d0 100644 --- a/pdata/ptrace/generated_status.go +++ b/pdata/ptrace/generated_status.go @@ -7,6 +7,7 @@ package ptrace import ( + "go.opentelemetry.io/collector/pdata/internal" otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" ) @@ -19,11 +20,12 @@ import ( // Must use NewStatus function to create new instances. // Important: zero-initialized instance is not valid for use. type Status struct { - orig *otlptrace.Status + orig *otlptrace.Status + state *internal.State } -func newStatus(orig *otlptrace.Status) Status { - return Status{orig} +func newStatus(orig *otlptrace.Status, state *internal.State) Status { + return Status{orig: orig, state: state} } // NewStatus creates a new empty Status. @@ -31,12 +33,15 @@ func newStatus(orig *otlptrace.Status) Status { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewStatus() Status { - return newStatus(&otlptrace.Status{}) + state := internal.StateMutable + return newStatus(&otlptrace.Status{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms Status) MoveTo(dest Status) { + ms.state.AssertMutable() + dest.state.AssertMutable() *dest.orig = *ms.orig *ms.orig = otlptrace.Status{} } @@ -48,6 +53,7 @@ func (ms Status) Code() StatusCode { // SetCode replaces the code associated with this Status. func (ms Status) SetCode(v StatusCode) { + ms.state.AssertMutable() ms.orig.Code = otlptrace.Status_StatusCode(v) } @@ -58,11 +64,13 @@ func (ms Status) Message() string { // SetMessage replaces the message associated with this Status. func (ms Status) SetMessage(v string) { + ms.state.AssertMutable() ms.orig.Message = v } // CopyTo copies all properties from the current struct overriding the destination. func (ms Status) CopyTo(dest Status) { + dest.state.AssertMutable() dest.SetCode(ms.Code()) dest.SetMessage(ms.Message()) } diff --git a/pdata/ptrace/generated_status_test.go b/pdata/ptrace/generated_status_test.go index b3a960f62f1..97d158ef4b3 100644 --- a/pdata/ptrace/generated_status_test.go +++ b/pdata/ptrace/generated_status_test.go @@ -10,6 +10,9 @@ import ( "testing" "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" ) func TestStatus_MoveTo(t *testing.T) { @@ -18,6 +21,9 @@ func TestStatus_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewStatus(), ms) assert.Equal(t, generateTestStatus(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newStatus(&otlptrace.Status{}, &sharedState)) }) + assert.Panics(t, func() { newStatus(&otlptrace.Status{}, &sharedState).MoveTo(dest) }) } func TestStatus_CopyTo(t *testing.T) { @@ -28,6 +34,8 @@ func TestStatus_CopyTo(t *testing.T) { orig = generateTestStatus() orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newStatus(&otlptrace.Status{}, &sharedState)) }) } func TestStatus_Code(t *testing.T) { @@ -43,6 +51,8 @@ func TestStatus_Message(t *testing.T) { assert.Equal(t, "", ms.Message()) ms.SetMessage("cancelled") assert.Equal(t, "cancelled", ms.Message()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newStatus(&otlptrace.Status{}, &sharedState).SetMessage("cancelled") }) } func generateTestStatus() Status { diff --git a/pdata/ptrace/json.go b/pdata/ptrace/json.go index 682eeed1ca5..64bd273ba96 100644 --- a/pdata/ptrace/json.go +++ b/pdata/ptrace/json.go @@ -15,8 +15,10 @@ import ( "go.opentelemetry.io/collector/pdata/internal/otlp" ) +// JSONMarshaler marshals pdata.Traces to JSON bytes using the OTLP/JSON format. type JSONMarshaler struct{} +// MarshalTraces to the OTLP/JSON format. func (*JSONMarshaler) MarshalTraces(td Traces) ([]byte, error) { buf := bytes.Buffer{} pb := internal.TracesToProto(internal.Traces(td)) @@ -24,8 +26,10 @@ func (*JSONMarshaler) MarshalTraces(td Traces) ([]byte, error) { return buf.Bytes(), err } +// JSONUnmarshaler unmarshals OTLP/JSON formatted-bytes to pdata.Traces. type JSONUnmarshaler struct{} +// UnmarshalTraces from OTLP/JSON format into pdata.Traces. func (*JSONUnmarshaler) UnmarshalTraces(buf []byte) (Traces, error) { iter := jsoniter.ConfigFastest.BorrowIterator(buf) defer jsoniter.ConfigFastest.ReturnIterator(iter) diff --git a/pdata/ptrace/package_test.go b/pdata/ptrace/package_test.go new file mode 100644 index 00000000000..6a79f065692 --- /dev/null +++ b/pdata/ptrace/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ptrace + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pdata/ptrace/ptraceotlp/generated_exportpartialsuccess.go b/pdata/ptrace/ptraceotlp/generated_exportpartialsuccess.go index 5fb974d187c..50cf0c805e8 100644 --- a/pdata/ptrace/ptraceotlp/generated_exportpartialsuccess.go +++ b/pdata/ptrace/ptraceotlp/generated_exportpartialsuccess.go @@ -7,6 +7,7 @@ package ptraceotlp import ( + "go.opentelemetry.io/collector/pdata/internal" otlpcollectortrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/trace/v1" ) @@ -18,11 +19,12 @@ import ( // Must use NewExportPartialSuccess function to create new instances. // Important: zero-initialized instance is not valid for use. type ExportPartialSuccess struct { - orig *otlpcollectortrace.ExportTracePartialSuccess + orig *otlpcollectortrace.ExportTracePartialSuccess + state *internal.State } -func newExportPartialSuccess(orig *otlpcollectortrace.ExportTracePartialSuccess) ExportPartialSuccess { - return ExportPartialSuccess{orig} +func newExportPartialSuccess(orig *otlpcollectortrace.ExportTracePartialSuccess, state *internal.State) ExportPartialSuccess { + return ExportPartialSuccess{orig: orig, state: state} } // NewExportPartialSuccess creates a new empty ExportPartialSuccess. @@ -30,12 +32,15 @@ func newExportPartialSuccess(orig *otlpcollectortrace.ExportTracePartialSuccess) // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewExportPartialSuccess() ExportPartialSuccess { - return newExportPartialSuccess(&otlpcollectortrace.ExportTracePartialSuccess{}) + state := internal.StateMutable + return newExportPartialSuccess(&otlpcollectortrace.ExportTracePartialSuccess{}, &state) } // MoveTo moves all properties from the current struct overriding the destination and // resetting the current instance to its zero value func (ms ExportPartialSuccess) MoveTo(dest ExportPartialSuccess) { + ms.state.AssertMutable() + dest.state.AssertMutable() *dest.orig = *ms.orig *ms.orig = otlpcollectortrace.ExportTracePartialSuccess{} } @@ -47,6 +52,7 @@ func (ms ExportPartialSuccess) RejectedSpans() int64 { // SetRejectedSpans replaces the rejectedspans associated with this ExportPartialSuccess. func (ms ExportPartialSuccess) SetRejectedSpans(v int64) { + ms.state.AssertMutable() ms.orig.RejectedSpans = v } @@ -57,11 +63,13 @@ func (ms ExportPartialSuccess) ErrorMessage() string { // SetErrorMessage replaces the errormessage associated with this ExportPartialSuccess. func (ms ExportPartialSuccess) SetErrorMessage(v string) { + ms.state.AssertMutable() ms.orig.ErrorMessage = v } // CopyTo copies all properties from the current struct overriding the destination. func (ms ExportPartialSuccess) CopyTo(dest ExportPartialSuccess) { + dest.state.AssertMutable() dest.SetRejectedSpans(ms.RejectedSpans()) dest.SetErrorMessage(ms.ErrorMessage()) } diff --git a/pdata/ptrace/ptraceotlp/generated_exportpartialsuccess_test.go b/pdata/ptrace/ptraceotlp/generated_exportpartialsuccess_test.go index a32ade473c3..927f0897e1b 100644 --- a/pdata/ptrace/ptraceotlp/generated_exportpartialsuccess_test.go +++ b/pdata/ptrace/ptraceotlp/generated_exportpartialsuccess_test.go @@ -10,6 +10,9 @@ import ( "testing" "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpcollectortrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/trace/v1" ) func TestExportPartialSuccess_MoveTo(t *testing.T) { @@ -18,6 +21,13 @@ func TestExportPartialSuccess_MoveTo(t *testing.T) { ms.MoveTo(dest) assert.Equal(t, NewExportPartialSuccess(), ms) assert.Equal(t, generateTestExportPartialSuccess(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + ms.MoveTo(newExportPartialSuccess(&otlpcollectortrace.ExportTracePartialSuccess{}, &sharedState)) + }) + assert.Panics(t, func() { + newExportPartialSuccess(&otlpcollectortrace.ExportTracePartialSuccess{}, &sharedState).MoveTo(dest) + }) } func TestExportPartialSuccess_CopyTo(t *testing.T) { @@ -28,6 +38,10 @@ func TestExportPartialSuccess_CopyTo(t *testing.T) { orig = generateTestExportPartialSuccess() orig.CopyTo(ms) assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + ms.CopyTo(newExportPartialSuccess(&otlpcollectortrace.ExportTracePartialSuccess{}, &sharedState)) + }) } func TestExportPartialSuccess_RejectedSpans(t *testing.T) { @@ -35,6 +49,10 @@ func TestExportPartialSuccess_RejectedSpans(t *testing.T) { assert.Equal(t, int64(0), ms.RejectedSpans()) ms.SetRejectedSpans(int64(13)) assert.Equal(t, int64(13), ms.RejectedSpans()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + newExportPartialSuccess(&otlpcollectortrace.ExportTracePartialSuccess{}, &sharedState).SetRejectedSpans(int64(13)) + }) } func TestExportPartialSuccess_ErrorMessage(t *testing.T) { @@ -42,6 +60,10 @@ func TestExportPartialSuccess_ErrorMessage(t *testing.T) { assert.Equal(t, "", ms.ErrorMessage()) ms.SetErrorMessage("error message") assert.Equal(t, "error message", ms.ErrorMessage()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + newExportPartialSuccess(&otlpcollectortrace.ExportTracePartialSuccess{}, &sharedState).SetErrorMessage("error message") + }) } func generateTestExportPartialSuccess() ExportPartialSuccess { diff --git a/pdata/ptrace/ptraceotlp/grpc.go b/pdata/ptrace/ptraceotlp/grpc.go index fec514eb62c..b768b08e67a 100644 --- a/pdata/ptrace/ptraceotlp/grpc.go +++ b/pdata/ptrace/ptraceotlp/grpc.go @@ -10,6 +10,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "go.opentelemetry.io/collector/pdata/internal" otlpcollectortrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/trace/v1" "go.opentelemetry.io/collector/pdata/internal/otlp" ) @@ -40,7 +41,11 @@ type grpcClient struct { // Export implements the Client interface. func (c *grpcClient) Export(ctx context.Context, request ExportRequest, opts ...grpc.CallOption) (ExportResponse, error) { rsp, err := c.rawClient.Export(ctx, request.orig, opts...) - return ExportResponse{orig: rsp}, err + if err != nil { + return ExportResponse{}, err + } + state := internal.StateMutable + return ExportResponse{orig: rsp, state: &state}, err } func (c *grpcClient) unexported() {} @@ -80,6 +85,7 @@ type rawTracesServer struct { func (s rawTracesServer) Export(ctx context.Context, request *otlpcollectortrace.ExportTraceServiceRequest) (*otlpcollectortrace.ExportTraceServiceResponse, error) { otlp.MigrateTraces(request.ResourceSpans) - rsp, err := s.srv.Export(ctx, ExportRequest{orig: request}) + state := internal.StateMutable + rsp, err := s.srv.Export(ctx, ExportRequest{orig: request, state: &state}) return rsp.orig, err } diff --git a/pdata/ptrace/ptraceotlp/package_test.go b/pdata/ptrace/ptraceotlp/package_test.go new file mode 100644 index 00000000000..4b8a352c461 --- /dev/null +++ b/pdata/ptrace/ptraceotlp/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ptraceotlp + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/pdata/ptrace/ptraceotlp/request.go b/pdata/ptrace/ptraceotlp/request.go index ae9f57100f7..0bdafc8a3af 100644 --- a/pdata/ptrace/ptraceotlp/request.go +++ b/pdata/ptrace/ptraceotlp/request.go @@ -18,19 +18,27 @@ var jsonUnmarshaler = &ptrace.JSONUnmarshaler{} // ExportRequest represents the request for gRPC/HTTP client/server. // It's a wrapper for ptrace.Traces data. type ExportRequest struct { - orig *otlpcollectortrace.ExportTraceServiceRequest + orig *otlpcollectortrace.ExportTraceServiceRequest + state *internal.State } // NewExportRequest returns an empty ExportRequest. func NewExportRequest() ExportRequest { - return ExportRequest{orig: &otlpcollectortrace.ExportTraceServiceRequest{}} + state := internal.StateMutable + return ExportRequest{ + orig: &otlpcollectortrace.ExportTraceServiceRequest{}, + state: &state, + } } // NewExportRequestFromTraces returns a ExportRequest from ptrace.Traces. // Because ExportRequest is a wrapper for ptrace.Traces, // any changes to the provided Traces struct will be reflected in the ExportRequest and vice versa. func NewExportRequestFromTraces(td ptrace.Traces) ExportRequest { - return ExportRequest{orig: internal.GetOrigTraces(internal.Traces(td))} + return ExportRequest{ + orig: internal.GetOrigTraces(internal.Traces(td)), + state: internal.GetTracesState(internal.Traces(td)), + } } // MarshalProto marshals ExportRequest into proto bytes. @@ -67,5 +75,5 @@ func (ms ExportRequest) UnmarshalJSON(data []byte) error { } func (ms ExportRequest) Traces() ptrace.Traces { - return ptrace.Traces(internal.NewTraces(ms.orig)) + return ptrace.Traces(internal.NewTraces(ms.orig, ms.state)) } diff --git a/pdata/ptrace/ptraceotlp/response.go b/pdata/ptrace/ptraceotlp/response.go index 3301131fd0a..78096bff77c 100644 --- a/pdata/ptrace/ptraceotlp/response.go +++ b/pdata/ptrace/ptraceotlp/response.go @@ -8,18 +8,24 @@ import ( jsoniter "github.com/json-iterator/go" + "go.opentelemetry.io/collector/pdata/internal" otlpcollectortrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/trace/v1" "go.opentelemetry.io/collector/pdata/internal/json" ) // ExportResponse represents the response for gRPC/HTTP client/server. type ExportResponse struct { - orig *otlpcollectortrace.ExportTraceServiceResponse + orig *otlpcollectortrace.ExportTraceServiceResponse + state *internal.State } // NewExportResponse returns an empty ExportResponse. func NewExportResponse() ExportResponse { - return ExportResponse{orig: &otlpcollectortrace.ExportTraceServiceResponse{}} + state := internal.StateMutable + return ExportResponse{ + orig: &otlpcollectortrace.ExportTraceServiceResponse{}, + state: &state, + } } // MarshalProto marshals ExportResponse into proto bytes. @@ -64,11 +70,11 @@ func (ms ExportResponse) unmarshalJsoniter(iter *jsoniter.Iterator) { // PartialSuccess returns the ExportLogsPartialSuccess associated with this ExportResponse. func (ms ExportResponse) PartialSuccess() ExportPartialSuccess { - return newExportPartialSuccess(&ms.orig.PartialSuccess) + return newExportPartialSuccess(&ms.orig.PartialSuccess, ms.state) } func (ms ExportPartialSuccess) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iterator *jsoniter.Iterator, f string) bool { + iter.ReadObjectCB(func(_ *jsoniter.Iterator, f string) bool { switch f { case "rejected_spans", "rejectedSpans": ms.orig.RejectedSpans = json.ReadInt64(iter) diff --git a/pdata/ptrace/traces.go b/pdata/ptrace/traces.go index 8f1f1c7fe8a..a4b71e17853 100644 --- a/pdata/ptrace/traces.go +++ b/pdata/ptrace/traces.go @@ -13,18 +13,28 @@ import ( type Traces internal.Traces func newTraces(orig *otlpcollectortrace.ExportTraceServiceRequest) Traces { - return Traces(internal.NewTraces(orig)) + state := internal.StateMutable + return Traces(internal.NewTraces(orig, &state)) } func (ms Traces) getOrig() *otlpcollectortrace.ExportTraceServiceRequest { return internal.GetOrigTraces(internal.Traces(ms)) } +func (ms Traces) getState() *internal.State { + return internal.GetTracesState(internal.Traces(ms)) +} + // NewTraces creates a new Traces struct. func NewTraces() Traces { return newTraces(&otlpcollectortrace.ExportTraceServiceRequest{}) } +// IsReadOnly returns true if this Traces instance is read-only. +func (ms Traces) IsReadOnly() bool { + return *ms.getState() == internal.StateReadOnly +} + // CopyTo copies the Traces instance overriding the destination. func (ms Traces) CopyTo(dest Traces) { ms.ResourceSpans().CopyTo(dest.ResourceSpans()) @@ -46,5 +56,10 @@ func (ms Traces) SpanCount() int { // ResourceSpans returns the ResourceSpansSlice associated with this Metrics. func (ms Traces) ResourceSpans() ResourceSpansSlice { - return newResourceSpansSlice(&ms.getOrig().ResourceSpans) + return newResourceSpansSlice(&ms.getOrig().ResourceSpans, internal.GetTracesState(internal.Traces(ms))) +} + +// MarkReadOnly marks the Traces as shared so that no further modifications can be done on it. +func (ms Traces) MarkReadOnly() { + internal.SetTracesState(internal.Traces(ms), internal.StateReadOnly) } diff --git a/pdata/ptrace/traces_test.go b/pdata/ptrace/traces_test.go index 6145ca7b995..8884349485f 100644 --- a/pdata/ptrace/traces_test.go +++ b/pdata/ptrace/traces_test.go @@ -5,6 +5,7 @@ package ptrace import ( "testing" + "time" gogoproto "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/assert" @@ -13,6 +14,7 @@ import ( otlpcollectortrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/trace/v1" otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" + "go.opentelemetry.io/collector/pdata/pcommon" ) func TestSpanCount(t *testing.T) { @@ -113,3 +115,66 @@ func TestTracesCopyTo(t *testing.T) { traces.CopyTo(tracesCopy) assert.EqualValues(t, traces, tracesCopy) } + +func TestReadOnlyTracesInvalidUsage(t *testing.T) { + traces := NewTraces() + assert.False(t, traces.IsReadOnly()) + res := traces.ResourceSpans().AppendEmpty().Resource() + res.Attributes().PutStr("k1", "v1") + traces.MarkReadOnly() + assert.True(t, traces.IsReadOnly()) + assert.Panics(t, func() { res.Attributes().PutStr("k2", "v2") }) +} + +func BenchmarkTracesUsage(b *testing.B) { + traces := NewTraces() + fillTestResourceSpansSlice(traces.ResourceSpans()) + ts := pcommon.NewTimestampFromTime(time.Now()) + + b.ReportAllocs() + b.ResetTimer() + + for bb := 0; bb < b.N; bb++ { + for i := 0; i < traces.ResourceSpans().Len(); i++ { + rs := traces.ResourceSpans().At(i) + res := rs.Resource() + res.Attributes().PutStr("foo", "bar") + v, ok := res.Attributes().Get("foo") + assert.True(b, ok) + assert.Equal(b, "bar", v.Str()) + v.SetStr("new-bar") + assert.Equal(b, "new-bar", v.Str()) + res.Attributes().Remove("foo") + for j := 0; j < rs.ScopeSpans().Len(); j++ { + iss := rs.ScopeSpans().At(j) + iss.Scope().SetName("new_test_name") + assert.Equal(b, "new_test_name", iss.Scope().Name()) + for k := 0; k < iss.Spans().Len(); k++ { + s := iss.Spans().At(k) + s.SetName("new_span") + assert.Equal(b, "new_span", s.Name()) + s.SetStartTimestamp(ts) + assert.Equal(b, ts, s.StartTimestamp()) + s.SetEndTimestamp(ts) + assert.Equal(b, ts, s.EndTimestamp()) + s.SetTraceID([16]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}) + assert.Equal(b, pcommon.TraceID([16]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}), s.TraceID()) + s.SetSpanID([8]byte{1, 2, 3, 4, 5, 6, 7, 8}) + assert.Equal(b, pcommon.SpanID([8]byte{1, 2, 3, 4, 5, 6, 7, 8}), s.SpanID()) + } + s := iss.Spans().AppendEmpty() + s.SetName("another_span") + s.SetStartTimestamp(ts) + s.SetEndTimestamp(ts) + s.SetTraceID([16]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}) + s.SetParentSpanID([8]byte{1, 2, 3, 4, 5, 6, 7, 8}) + s.SetSpanID([8]byte{1, 2, 3, 4, 5, 6, 7, 8}) + s.Attributes().PutStr("foo1", "bar1") + s.Attributes().PutStr("foo2", "bar2") + iss.Spans().RemoveIf(func(lr Span) bool { + return lr.Name() == "another_span" + }) + } + } + } +} diff --git a/processor/README.md b/processor/README.md index 8345f235837..f52dbc10374 100644 --- a/processor/README.md +++ b/processor/README.md @@ -21,26 +21,18 @@ The [contrib repository](https://github.com/open-telemetry/opentelemetry-collect ## Recommended Processors -By default, no processors are enabled. Depending on the data source, it may be recommended that multiple processors be enabled. Processors must be -enabled for every data source: Not all processors support all data sources. +By default, no processors are enabled. Depending on the data source, it may be +recommended that multiple processors be enabled. Processors must be enabled +for every data source and not all processors support all data sources. In addition, it is important to note that the order of processors matters. The order in each section below is the best practice. Refer to the individual processor documentation for more information. -### Traces - 1. [memory_limiter](memorylimiterprocessor/README.md) -2. *any sampling processors* +2. Any sampling or initial filtering processors 3. Any processor relying on sending source from `Context` (e.g. `k8sattributes`) 3. [batch](batchprocessor/README.md) -4. *any other processors* - -### Metrics - -1. [memory_limiter](memorylimiterprocessor/README.md) -2. Any processor relying on sending source from `Context` (e.g. `k8sattributes`) -3. [batch](batchprocessor/README.md) -4. *any other processors* +4. Any other processors ## Data Ownership @@ -114,4 +106,4 @@ data cloning described in Exclusive Ownership section. ## Ordering Processors The order processors are specified in a pipeline is important as this is the -order in which each processor is applied to traces and metrics. +order in which each processor is applied. diff --git a/processor/batchprocessor/README.md b/processor/batchprocessor/README.md index c63566d05bd..85ae733d28a 100644 --- a/processor/batchprocessor/README.md +++ b/processor/batchprocessor/README.md @@ -1,12 +1,16 @@ # Batch Processor -| Status | | -| ------------------------ | --------------------- | -| Stability | traces [beta] | -| | metrics [beta] | -| | logs [beta] | -| Supported pipeline types | traces, metrics, logs | -| Distributions | [core], [contrib] | + +| Status | | +| ------------- |-----------| +| Stability | [beta]: traces, metrics, logs | +| Distributions | [core], [contrib] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aprocessor%2Fbatch%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aprocessor%2Fbatch) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aprocessor%2Fbatch%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aprocessor%2Fbatch) | + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib + The batch processor accepts spans, metrics, or logs and places them into batches. Batching helps better compress the data and reduce the number of @@ -109,7 +113,3 @@ metadata-key values. The number of batch processors currently in use is exported as the `otelcol_processor_batch_metadata_cardinality` metric. - -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta -[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol diff --git a/processor/batchprocessor/batch_processor.go b/processor/batchprocessor/batch_processor.go index cb258867fb4..4853eef524a 100644 --- a/processor/batchprocessor/batch_processor.go +++ b/processor/batchprocessor/batch_processor.go @@ -110,7 +110,7 @@ var _ consumer.Metrics = (*batchProcessor)(nil) var _ consumer.Logs = (*batchProcessor)(nil) // newBatchProcessor returns a new batch processor component. -func newBatchProcessor(set processor.CreateSettings, cfg *Config, batchFunc func() batch, useOtel bool) (*batchProcessor, error) { +func newBatchProcessor(set processor.CreateSettings, cfg *Config, batchFunc func() batch) (*batchProcessor, error) { // use lower-case, to be consistent with http/2 headers. mks := make([]string, len(cfg.MetadataKeys)) for i, k := range cfg.MetadataKeys { @@ -136,7 +136,7 @@ func newBatchProcessor(set processor.CreateSettings, cfg *Config, batchFunc func } } - bpt, err := newBatchProcessorTelemetry(set, bp.batcher.currentMetadataCardinality, useOtel) + bpt, err := newBatchProcessorTelemetry(set, bp.batcher.currentMetadataCardinality) if err != nil { return nil, fmt.Errorf("error creating batch processor telemetry: %w", err) } @@ -350,18 +350,18 @@ func (bp *batchProcessor) ConsumeLogs(ctx context.Context, ld plog.Logs) error { } // newBatchTracesProcessor creates a new batch processor that batches traces by size or with timeout -func newBatchTracesProcessor(set processor.CreateSettings, next consumer.Traces, cfg *Config, useOtel bool) (*batchProcessor, error) { - return newBatchProcessor(set, cfg, func() batch { return newBatchTraces(next) }, useOtel) +func newBatchTracesProcessor(set processor.CreateSettings, next consumer.Traces, cfg *Config) (*batchProcessor, error) { + return newBatchProcessor(set, cfg, func() batch { return newBatchTraces(next) }) } // newBatchMetricsProcessor creates a new batch processor that batches metrics by size or with timeout -func newBatchMetricsProcessor(set processor.CreateSettings, next consumer.Metrics, cfg *Config, useOtel bool) (*batchProcessor, error) { - return newBatchProcessor(set, cfg, func() batch { return newBatchMetrics(next) }, useOtel) +func newBatchMetricsProcessor(set processor.CreateSettings, next consumer.Metrics, cfg *Config) (*batchProcessor, error) { + return newBatchProcessor(set, cfg, func() batch { return newBatchMetrics(next) }) } // newBatchLogsProcessor creates a new batch processor that batches logs by size or with timeout -func newBatchLogsProcessor(set processor.CreateSettings, next consumer.Logs, cfg *Config, useOtel bool) (*batchProcessor, error) { - return newBatchProcessor(set, cfg, func() batch { return newBatchLogs(next) }, useOtel) +func newBatchLogsProcessor(set processor.CreateSettings, next consumer.Logs, cfg *Config) (*batchProcessor, error) { + return newBatchProcessor(set, cfg, func() batch { return newBatchLogs(next) }) } type batchTraces struct { diff --git a/processor/batchprocessor/batch_processor_test.go b/processor/batchprocessor/batch_processor_test.go index 11eaa9b071f..a3a618c0f3e 100644 --- a/processor/batchprocessor/batch_processor_test.go +++ b/processor/batchprocessor/batch_processor_test.go @@ -84,7 +84,7 @@ func TestBatchProcessorSpansDelivered(t *testing.T) { cfg.SendBatchSize = 128 creationSet := processortest.NewNopCreateSettings() creationSet.MetricsLevel = configtelemetry.LevelDetailed - batcher, err := newBatchTracesProcessor(creationSet, sink, cfg, false) + batcher, err := newBatchTracesProcessor(creationSet, sink, cfg) require.NoError(t, err) require.NoError(t, batcher.Start(context.Background(), componenttest.NewNopHost())) @@ -127,7 +127,7 @@ func TestBatchProcessorSpansDeliveredEnforceBatchSize(t *testing.T) { cfg.SendBatchMaxSize = 130 creationSet := processortest.NewNopCreateSettings() creationSet.MetricsLevel = configtelemetry.LevelDetailed - batcher, err := newBatchTracesProcessor(creationSet, sink, cfg, false) + batcher, err := newBatchTracesProcessor(creationSet, sink, cfg) require.NoError(t, err) require.NoError(t, batcher.Start(context.Background(), componenttest.NewNopHost())) @@ -168,7 +168,7 @@ func TestBatchProcessorSentBySize(t *testing.T) { telemetryTest(t, testBatchProcessorSentBySize) } -func testBatchProcessorSentBySize(t *testing.T, tel testTelemetry, useOtel bool) { +func testBatchProcessorSentBySize(t *testing.T, tel testTelemetry) { sizer := &ptrace.ProtoMarshaler{} sink := new(consumertest.TracesSink) cfg := createDefaultConfig().(*Config) @@ -177,7 +177,7 @@ func testBatchProcessorSentBySize(t *testing.T, tel testTelemetry, useOtel bool) cfg.Timeout = 500 * time.Millisecond creationSet := tel.NewProcessorCreateSettings() creationSet.MetricsLevel = configtelemetry.LevelDetailed - batcher, err := newBatchTracesProcessor(creationSet, sink, cfg, useOtel) + batcher, err := newBatchTracesProcessor(creationSet, sink, cfg) require.NoError(t, err) require.NoError(t, batcher.Start(context.Background(), componenttest.NewNopHost())) @@ -223,7 +223,7 @@ func TestBatchProcessorSentBySizeWithMaxSize(t *testing.T) { telemetryTest(t, testBatchProcessorSentBySizeWithMaxSize) } -func testBatchProcessorSentBySizeWithMaxSize(t *testing.T, tel testTelemetry, useOtel bool) { +func testBatchProcessorSentBySizeWithMaxSize(t *testing.T, tel testTelemetry) { sink := new(consumertest.TracesSink) cfg := createDefaultConfig().(*Config) sendBatchSize := 20 @@ -233,7 +233,7 @@ func testBatchProcessorSentBySizeWithMaxSize(t *testing.T, tel testTelemetry, us cfg.Timeout = 500 * time.Millisecond creationSet := tel.NewProcessorCreateSettings() creationSet.MetricsLevel = configtelemetry.LevelDetailed - batcher, err := newBatchTracesProcessor(creationSet, sink, cfg, useOtel) + batcher, err := newBatchTracesProcessor(creationSet, sink, cfg) require.NoError(t, err) require.NoError(t, batcher.Start(context.Background(), componenttest.NewNopHost())) @@ -280,7 +280,7 @@ func TestBatchProcessorSentByTimeout(t *testing.T) { creationSet := processortest.NewNopCreateSettings() creationSet.MetricsLevel = configtelemetry.LevelDetailed - batcher, err := newBatchTracesProcessor(creationSet, sink, cfg, false) + batcher, err := newBatchTracesProcessor(creationSet, sink, cfg) require.NoError(t, err) require.NoError(t, batcher.Start(context.Background(), componenttest.NewNopHost())) @@ -327,7 +327,7 @@ func TestBatchProcessorTraceSendWhenClosing(t *testing.T) { creationSet := processortest.NewNopCreateSettings() creationSet.MetricsLevel = configtelemetry.LevelDetailed - batcher, err := newBatchTracesProcessor(creationSet, sink, &cfg, false) + batcher, err := newBatchTracesProcessor(creationSet, sink, &cfg) require.NoError(t, err) require.NoError(t, batcher.Start(context.Background(), componenttest.NewNopHost())) @@ -358,7 +358,7 @@ func TestBatchMetricProcessor_ReceivingData(t *testing.T) { creationSet := processortest.NewNopCreateSettings() creationSet.MetricsLevel = configtelemetry.LevelDetailed - batcher, err := newBatchMetricsProcessor(creationSet, sink, &cfg, false) + batcher, err := newBatchMetricsProcessor(creationSet, sink, &cfg) require.NoError(t, err) require.NoError(t, batcher.Start(context.Background(), componenttest.NewNopHost())) @@ -397,7 +397,7 @@ func TestBatchMetricProcessorBatchSize(t *testing.T) { telemetryTest(t, testBatchMetricProcessorBatchSize) } -func testBatchMetricProcessorBatchSize(t *testing.T, tel testTelemetry, useOtel bool) { +func testBatchMetricProcessorBatchSize(t *testing.T, tel testTelemetry) { sizer := &pmetric.ProtoMarshaler{} // Instantiate the batch processor with low config values to test data @@ -415,7 +415,7 @@ func testBatchMetricProcessorBatchSize(t *testing.T, tel testTelemetry, useOtel creationSet := tel.NewProcessorCreateSettings() creationSet.MetricsLevel = configtelemetry.LevelDetailed - batcher, err := newBatchMetricsProcessor(creationSet, sink, &cfg, useOtel) + batcher, err := newBatchMetricsProcessor(creationSet, sink, &cfg) require.NoError(t, err) require.NoError(t, batcher.Start(context.Background(), componenttest.NewNopHost())) @@ -482,7 +482,7 @@ func TestBatchMetricsProcessor_Timeout(t *testing.T) { creationSet := processortest.NewNopCreateSettings() creationSet.MetricsLevel = configtelemetry.LevelDetailed - batcher, err := newBatchMetricsProcessor(creationSet, sink, &cfg, false) + batcher, err := newBatchMetricsProcessor(creationSet, sink, &cfg) require.NoError(t, err) require.NoError(t, batcher.Start(context.Background(), componenttest.NewNopHost())) @@ -531,7 +531,7 @@ func TestBatchMetricProcessor_Shutdown(t *testing.T) { creationSet := processortest.NewNopCreateSettings() creationSet.MetricsLevel = configtelemetry.LevelDetailed - batcher, err := newBatchMetricsProcessor(creationSet, sink, &cfg, false) + batcher, err := newBatchMetricsProcessor(creationSet, sink, &cfg) require.NoError(t, err) require.NoError(t, batcher.Start(context.Background(), componenttest.NewNopHost())) @@ -630,7 +630,7 @@ func runMetricsProcessorBenchmark(b *testing.B, cfg Config) { creationSet := processortest.NewNopCreateSettings() creationSet.MetricsLevel = configtelemetry.LevelDetailed metricsPerRequest := 1000 - batcher, err := newBatchMetricsProcessor(creationSet, sink, &cfg, false) + batcher, err := newBatchMetricsProcessor(creationSet, sink, &cfg) require.NoError(b, err) require.NoError(b, batcher.Start(ctx, componenttest.NewNopHost())) @@ -677,7 +677,7 @@ func TestBatchLogProcessor_ReceivingData(t *testing.T) { creationSet := processortest.NewNopCreateSettings() creationSet.MetricsLevel = configtelemetry.LevelDetailed - batcher, err := newBatchLogsProcessor(creationSet, sink, &cfg, false) + batcher, err := newBatchLogsProcessor(creationSet, sink, &cfg) require.NoError(t, err) require.NoError(t, batcher.Start(context.Background(), componenttest.NewNopHost())) @@ -716,7 +716,7 @@ func TestBatchLogProcessor_BatchSize(t *testing.T) { telemetryTest(t, testBatchLogProcessorBatchSize) } -func testBatchLogProcessorBatchSize(t *testing.T, tel testTelemetry, useOtel bool) { +func testBatchLogProcessorBatchSize(t *testing.T, tel testTelemetry) { sizer := &plog.ProtoMarshaler{} // Instantiate the batch processor with low config values to test data @@ -732,7 +732,7 @@ func testBatchLogProcessorBatchSize(t *testing.T, tel testTelemetry, useOtel boo creationSet := tel.NewProcessorCreateSettings() creationSet.MetricsLevel = configtelemetry.LevelDetailed - batcher, err := newBatchLogsProcessor(creationSet, sink, &cfg, useOtel) + batcher, err := newBatchLogsProcessor(creationSet, sink, &cfg) require.NoError(t, err) require.NoError(t, batcher.Start(context.Background(), componenttest.NewNopHost())) @@ -780,7 +780,7 @@ func TestBatchLogsProcessor_Timeout(t *testing.T) { creationSet := processortest.NewNopCreateSettings() creationSet.MetricsLevel = configtelemetry.LevelDetailed - batcher, err := newBatchLogsProcessor(creationSet, sink, &cfg, false) + batcher, err := newBatchLogsProcessor(creationSet, sink, &cfg) require.NoError(t, err) require.NoError(t, batcher.Start(context.Background(), componenttest.NewNopHost())) @@ -829,7 +829,7 @@ func TestBatchLogProcessor_Shutdown(t *testing.T) { creationSet := processortest.NewNopCreateSettings() creationSet.MetricsLevel = configtelemetry.LevelDetailed - batcher, err := newBatchLogsProcessor(creationSet, sink, &cfg, false) + batcher, err := newBatchLogsProcessor(creationSet, sink, &cfg) require.NoError(t, err) require.NoError(t, batcher.Start(context.Background(), componenttest.NewNopHost())) @@ -908,7 +908,7 @@ func TestBatchProcessorSpansBatchedByMetadata(t *testing.T) { cfg.MetadataKeys = []string{"token1", "token2"} creationSet := processortest.NewNopCreateSettings() creationSet.MetricsLevel = configtelemetry.LevelDetailed - batcher, err := newBatchTracesProcessor(creationSet, sink, cfg, false) + batcher, err := newBatchTracesProcessor(creationSet, sink, cfg) require.NoError(t, err) require.NoError(t, batcher.Start(context.Background(), componenttest.NewNopHost())) @@ -1001,7 +1001,7 @@ func TestBatchProcessorMetadataCardinalityLimit(t *testing.T) { cfg.MetadataKeys = []string{"token"} cfg.MetadataCardinalityLimit = cardLimit creationSet := processortest.NewNopCreateSettings() - batcher, err := newBatchTracesProcessor(creationSet, sink, cfg, false) + batcher, err := newBatchTracesProcessor(creationSet, sink, cfg) require.NoError(t, err) require.NoError(t, batcher.Start(context.Background(), componenttest.NewNopHost())) @@ -1034,7 +1034,7 @@ func TestBatchProcessorMetadataCardinalityLimit(t *testing.T) { func TestBatchZeroConfig(t *testing.T) { // This is a no-op configuration. No need for a timer, no - // minimum, no mxaimum, just a pass through. + // minimum, no maximum, just a pass through. cfg := Config{} require.NoError(t, cfg.Validate()) @@ -1044,9 +1044,10 @@ func TestBatchZeroConfig(t *testing.T) { sink := new(consumertest.LogsSink) creationSet := processortest.NewNopCreateSettings() creationSet.MetricsLevel = configtelemetry.LevelDetailed - batcher, err := newBatchLogsProcessor(creationSet, sink, &cfg, false) + batcher, err := newBatchLogsProcessor(creationSet, sink, &cfg) require.NoError(t, err) require.NoError(t, batcher.Start(context.Background(), componenttest.NewNopHost())) + defer func() { require.NoError(t, batcher.Shutdown(context.Background())) }() expect := 0 for requestNum := 0; requestNum < requestCount; requestNum++ { @@ -1084,9 +1085,10 @@ func TestBatchSplitOnly(t *testing.T) { sink := new(consumertest.LogsSink) creationSet := processortest.NewNopCreateSettings() creationSet.MetricsLevel = configtelemetry.LevelDetailed - batcher, err := newBatchLogsProcessor(creationSet, sink, &cfg, false) + batcher, err := newBatchLogsProcessor(creationSet, sink, &cfg) require.NoError(t, err) require.NoError(t, batcher.Start(context.Background(), componenttest.NewNopHost())) + defer func() { require.NoError(t, batcher.Shutdown(context.Background())) }() for requestNum := 0; requestNum < requestCount; requestNum++ { ld := testdata.GenerateLogs(logsPerRequest) diff --git a/processor/batchprocessor/factory.go b/processor/batchprocessor/factory.go index b7b57d84111..3af85a816cc 100644 --- a/processor/batchprocessor/factory.go +++ b/processor/batchprocessor/factory.go @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +//go:generate mdatagen metadata.yaml + package batchprocessor // import "go.opentelemetry.io/collector/processor/batchprocessor" import ( @@ -9,14 +11,11 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/internal/obsreportconfig" "go.opentelemetry.io/collector/processor" + "go.opentelemetry.io/collector/processor/batchprocessor/internal/metadata" ) const ( - // The value of "type" key in configuration. - typeStr = "batch" - defaultSendBatchSize = uint32(8192) defaultTimeout = 200 * time.Millisecond @@ -29,11 +28,11 @@ const ( // NewFactory returns a new factory for the Batch processor. func NewFactory() processor.Factory { return processor.NewFactory( - typeStr, + metadata.Type, createDefaultConfig, - processor.WithTraces(createTraces, component.StabilityLevelStable), - processor.WithMetrics(createMetrics, component.StabilityLevelStable), - processor.WithLogs(createLogs, component.StabilityLevelStable)) + processor.WithTraces(createTraces, metadata.TracesStability), + processor.WithMetrics(createMetrics, metadata.MetricsStability), + processor.WithLogs(createLogs, metadata.LogsStability)) } func createDefaultConfig() component.Config { @@ -50,7 +49,7 @@ func createTraces( cfg component.Config, nextConsumer consumer.Traces, ) (processor.Traces, error) { - return newBatchTracesProcessor(set, nextConsumer, cfg.(*Config), obsreportconfig.UseOtelForInternalMetricsfeatureGate.IsEnabled()) + return newBatchTracesProcessor(set, nextConsumer, cfg.(*Config)) } func createMetrics( @@ -59,7 +58,7 @@ func createMetrics( cfg component.Config, nextConsumer consumer.Metrics, ) (processor.Metrics, error) { - return newBatchMetricsProcessor(set, nextConsumer, cfg.(*Config), obsreportconfig.UseOtelForInternalMetricsfeatureGate.IsEnabled()) + return newBatchMetricsProcessor(set, nextConsumer, cfg.(*Config)) } func createLogs( @@ -68,5 +67,5 @@ func createLogs( cfg component.Config, nextConsumer consumer.Logs, ) (processor.Logs, error) { - return newBatchLogsProcessor(set, nextConsumer, cfg.(*Config), obsreportconfig.UseOtelForInternalMetricsfeatureGate.IsEnabled()) + return newBatchLogsProcessor(set, nextConsumer, cfg.(*Config)) } diff --git a/processor/batchprocessor/factory_test.go b/processor/batchprocessor/factory_test.go index 1be144c794a..83371f0c1f1 100644 --- a/processor/batchprocessor/factory_test.go +++ b/processor/batchprocessor/factory_test.go @@ -29,12 +29,15 @@ func TestCreateProcessor(t *testing.T) { tp, err := factory.CreateTracesProcessor(context.Background(), creationSet, cfg, nil) assert.NotNil(t, tp) assert.NoError(t, err, "cannot create trace processor") + assert.NoError(t, tp.Shutdown(context.Background())) mp, err := factory.CreateMetricsProcessor(context.Background(), creationSet, cfg, nil) assert.NotNil(t, mp) assert.NoError(t, err, "cannot create metric processor") + assert.NoError(t, mp.Shutdown(context.Background())) lp, err := factory.CreateLogsProcessor(context.Background(), creationSet, cfg, nil) assert.NotNil(t, lp) assert.NoError(t, err, "cannot create logs processor") + assert.NoError(t, lp.Shutdown(context.Background())) } diff --git a/processor/batchprocessor/go.mod b/processor/batchprocessor/go.mod index c32394b97ec..7dd14964033 100644 --- a/processor/batchprocessor/go.mod +++ b/processor/batchprocessor/go.mod @@ -1,63 +1,55 @@ module go.opentelemetry.io/collector/processor/batchprocessor -go 1.20 +go 1.21 require ( - contrib.go.opencensus.io/exporter/prometheus v0.4.2 - github.com/prometheus/client_golang v1.16.0 - github.com/prometheus/client_model v0.4.0 - github.com/prometheus/common v0.44.0 + github.com/prometheus/client_golang v1.19.0 + github.com/prometheus/client_model v0.6.0 + github.com/prometheus/common v0.48.0 github.com/stretchr/testify v1.8.4 - go.opencensus.io v0.24.0 - go.opentelemetry.io/collector v0.85.0 - go.opentelemetry.io/collector/component v0.85.0 - go.opentelemetry.io/collector/config/configtelemetry v0.85.0 - go.opentelemetry.io/collector/confmap v0.85.0 - go.opentelemetry.io/collector/consumer v0.85.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0014 - go.opentelemetry.io/collector/processor v0.85.0 - go.opentelemetry.io/otel v1.18.0 - go.opentelemetry.io/otel/exporters/prometheus v0.41.0 - go.opentelemetry.io/otel/metric v1.18.0 - go.opentelemetry.io/otel/sdk v1.18.0 - go.opentelemetry.io/otel/sdk/metric v0.41.0 + go.opentelemetry.io/collector v0.96.0 + go.opentelemetry.io/collector/component v0.96.0 + go.opentelemetry.io/collector/config/configtelemetry v0.96.0 + go.opentelemetry.io/collector/confmap v0.96.0 + go.opentelemetry.io/collector/consumer v0.96.0 + go.opentelemetry.io/collector/pdata v1.3.0 + go.opentelemetry.io/collector/processor v0.96.0 + go.opentelemetry.io/otel v1.24.0 + go.opentelemetry.io/otel/exporters/prometheus v0.46.0 + go.opentelemetry.io/otel/metric v1.24.0 + go.opentelemetry.io/otel/sdk v1.24.0 + go.opentelemetry.io/otel/sdk/metric v1.24.0 + go.opentelemetry.io/otel/trace v1.24.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 + go.uber.org/zap v1.27.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.0.1 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect - github.com/prometheus/statsd_exporter v0.22.7 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0014 // indirect - go.opentelemetry.io/otel/trace v1.18.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/grpc v1.58.1 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -69,20 +61,10 @@ replace go.opentelemetry.io/collector/component => ../../component replace go.opentelemetry.io/collector/confmap => ../../confmap -replace go.opentelemetry.io/collector/exporter => ../../exporter - -replace go.opentelemetry.io/collector/extension => ../../extension - replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/pdata => ../../pdata -replace go.opentelemetry.io/collector/receiver => ../../receiver - -replace go.opentelemetry.io/collector/semconv => ../../semconv - -replace go.opentelemetry.io/collector/extension/zpagesextension => ../../extension/zpagesextension - replace go.opentelemetry.io/collector/consumer => ../../consumer retract ( @@ -90,10 +72,4 @@ retract ( v0.69.0 // Release failed, use v0.69.1 ) -replace go.opentelemetry.io/collector/connector => ../../connector - -replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet - replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry - -replace go.opentelemetry.io/collector/service => ../../service diff --git a/processor/batchprocessor/go.sum b/processor/batchprocessor/go.sum index e3381082600..06616cda85d 100644 --- a/processor/batchprocessor/go.sum +++ b/processor/batchprocessor/go.sum @@ -1,581 +1,126 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= 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= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= -github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 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/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= -github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -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/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= -go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= -go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/exporters/prometheus v0.41.0 h1:A3/bhjP5SmELy8dcpK+uttHeh9Qrh+YnS16/VzrztRQ= -go.opentelemetry.io/otel/exporters/prometheus v0.41.0/go.mod h1:mKuXEMi9suyyNJQ99SZCO0mpWGFe0MIALtjd3r6uo7Q= -go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= -go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= -go.opentelemetry.io/otel/sdk v1.18.0 h1:e3bAB0wB3MljH38sHzpV/qWrOTCFrdZF2ct9F8rBkcY= -go.opentelemetry.io/otel/sdk v1.18.0/go.mod h1:1RCygWV7plY2KmdskZEDDBs4tJeHG92MdHZIluiYs/M= -go.opentelemetry.io/otel/sdk/metric v0.41.0 h1:c3sAt9/pQ5fSIUfl0gPtClV3HhE18DCVzByD33R/zsk= -go.opentelemetry.io/otel/sdk/metric v0.41.0/go.mod h1:PmOmSt+iOklKtIg5O4Vz9H/ttcRFSNTgii+E1KGyn1w= -go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= -go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/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-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.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/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= -google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +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= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/processor/batchprocessor/internal/metadata/generated_status.go b/processor/batchprocessor/internal/metadata/generated_status.go new file mode 100644 index 00000000000..b3956d2b0a2 --- /dev/null +++ b/processor/batchprocessor/internal/metadata/generated_status.go @@ -0,0 +1,29 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" +) + +var ( + Type = component.MustNewType("batch") + scopeName = "go.opentelemetry.io/collector/processor/batchprocessor" +) + +const ( + TracesStability = component.StabilityLevelBeta + MetricsStability = component.StabilityLevelBeta + LogsStability = component.StabilityLevelBeta +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter(scopeName) +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer(scopeName) +} diff --git a/processor/batchprocessor/metadata.yaml b/processor/batchprocessor/metadata.yaml new file mode 100644 index 00000000000..f535dc6c6c7 --- /dev/null +++ b/processor/batchprocessor/metadata.yaml @@ -0,0 +1,7 @@ +type: batch + +status: + class: processor + stability: + beta: [traces, metrics, logs] + distributions: [core, contrib] diff --git a/processor/batchprocessor/metrics.go b/processor/batchprocessor/metrics.go index 85b8ad2b37c..d10727813eb 100644 --- a/processor/batchprocessor/metrics.go +++ b/processor/batchprocessor/metrics.go @@ -5,14 +5,9 @@ package batchprocessor // import "go.opentelemetry.io/collector/processor/batchp import ( "context" - "errors" - "go.opencensus.io/stats" - "go.opencensus.io/stats/view" - "go.opencensus.io/tag" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/metric" - sdkmetric "go.opentelemetry.io/otel/sdk/metric" "go.uber.org/multierr" "go.opentelemetry.io/collector/config/configtelemetry" @@ -25,76 +20,17 @@ const ( scopeName = "go.opentelemetry.io/collector/processor/batchprocessor" ) -var ( - processorTagKey = tag.MustNewKey(obsmetrics.ProcessorKey) - statBatchSizeTriggerSend = stats.Int64("batch_size_trigger_send", "Number of times the batch was sent due to a size trigger", stats.UnitDimensionless) - statTimeoutTriggerSend = stats.Int64("timeout_trigger_send", "Number of times the batch was sent due to a timeout trigger", stats.UnitDimensionless) - statBatchSendSize = stats.Int64("batch_send_size", "Number of units in the batch", stats.UnitDimensionless) - statBatchSendSizeBytes = stats.Int64("batch_send_size_bytes", "Number of bytes in batch that was sent", stats.UnitBytes) -) - type trigger int const ( + typeStr = "batch" triggerTimeout trigger = iota triggerBatchSize ) -func init() { - // TODO: Find a way to handle the error. - _ = view.Register(metricViews()...) -} - -// MetricViews returns the metrics views related to batching -func metricViews() []*view.View { - processorTagKeys := []tag.Key{processorTagKey} - - countBatchSizeTriggerSendView := &view.View{ - Name: processorhelper.BuildCustomMetricName(typeStr, statBatchSizeTriggerSend.Name()), - Measure: statBatchSizeTriggerSend, - Description: statBatchSizeTriggerSend.Description(), - TagKeys: processorTagKeys, - Aggregation: view.Sum(), - } - - countTimeoutTriggerSendView := &view.View{ - Name: processorhelper.BuildCustomMetricName(typeStr, statTimeoutTriggerSend.Name()), - Measure: statTimeoutTriggerSend, - Description: statTimeoutTriggerSend.Description(), - TagKeys: processorTagKeys, - Aggregation: view.Sum(), - } - - distributionBatchSendSizeView := &view.View{ - Name: processorhelper.BuildCustomMetricName(typeStr, statBatchSendSize.Name()), - Measure: statBatchSendSize, - Description: statBatchSendSize.Description(), - TagKeys: processorTagKeys, - Aggregation: view.Distribution(10, 25, 50, 75, 100, 250, 500, 750, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 20000, 30000, 50000, 100000), - } - - distributionBatchSendSizeBytesView := &view.View{ - Name: processorhelper.BuildCustomMetricName(typeStr, statBatchSendSizeBytes.Name()), - Measure: statBatchSendSizeBytes, - Description: statBatchSendSizeBytes.Description(), - TagKeys: processorTagKeys, - Aggregation: view.Distribution(10, 25, 50, 75, 100, 250, 500, 750, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 20000, 30000, 50000, - 100_000, 200_000, 300_000, 400_000, 500_000, 600_000, 700_000, 800_000, 900_000, - 1000_000, 2000_000, 3000_000, 4000_000, 5000_000, 6000_000, 7000_000, 8000_000, 9000_000), - } - - return []*view.View{ - countBatchSizeTriggerSendView, - countTimeoutTriggerSendView, - distributionBatchSendSizeView, - distributionBatchSendSizeBytesView, - } -} - type batchProcessorTelemetry struct { level configtelemetry.Level detailed bool - useOtel bool exportCtx context.Context @@ -106,25 +42,15 @@ type batchProcessorTelemetry struct { batchMetadataCardinality metric.Int64ObservableUpDownCounter } -func newBatchProcessorTelemetry(set processor.CreateSettings, currentMetadataCardinality func() int, useOtel bool) (*batchProcessorTelemetry, error) { - exportCtx, err := tag.New(context.Background(), tag.Insert(processorTagKey, set.ID.String())) - if err != nil { - return nil, err - } - +func newBatchProcessorTelemetry(set processor.CreateSettings, currentMetadataCardinality func() int) (*batchProcessorTelemetry, error) { bpt := &batchProcessorTelemetry{ - useOtel: useOtel, processorAttr: []attribute.KeyValue{attribute.String(obsmetrics.ProcessorKey, set.ID.String())}, - exportCtx: exportCtx, + exportCtx: context.Background(), level: set.MetricsLevel, detailed: set.MetricsLevel == configtelemetry.LevelDetailed, } - // ignore instrument name error as per workaround in https://github.com/open-telemetry/opentelemetry-collector/issues/8346 - // if err != nil { - // return nil, err - // } - if err = bpt.createOtelMetrics(set.MeterProvider, currentMetadataCardinality); err != nil && !errors.Is(err, sdkmetric.ErrInstrumentName) { + if err := bpt.createOtelMetrics(set.MeterProvider, currentMetadataCardinality); err != nil { return nil, err } @@ -132,10 +58,6 @@ func newBatchProcessorTelemetry(set processor.CreateSettings, currentMetadataCar } func (bpt *batchProcessorTelemetry) createOtelMetrics(mp metric.MeterProvider, currentMetadataCardinality func() int) error { - if !bpt.useOtel { - return nil - } - var errors, err error meter := mp.Meter(scopeName) @@ -182,29 +104,6 @@ func (bpt *batchProcessorTelemetry) createOtelMetrics(mp metric.MeterProvider, c } func (bpt *batchProcessorTelemetry) record(trigger trigger, sent, bytes int64) { - if bpt.useOtel { - bpt.recordWithOtel(trigger, sent, bytes) - } else { - bpt.recordWithOC(trigger, sent, bytes) - } -} - -func (bpt *batchProcessorTelemetry) recordWithOC(trigger trigger, sent, bytes int64) { - var triggerMeasure *stats.Int64Measure - switch trigger { - case triggerBatchSize: - triggerMeasure = statBatchSizeTriggerSend - case triggerTimeout: - triggerMeasure = statTimeoutTriggerSend - } - - stats.Record(bpt.exportCtx, triggerMeasure.M(1), statBatchSendSize.M(sent)) - if bpt.detailed { - stats.Record(bpt.exportCtx, statBatchSendSizeBytes.M(bytes)) - } -} - -func (bpt *batchProcessorTelemetry) recordWithOtel(trigger trigger, sent, bytes int64) { switch trigger { case triggerBatchSize: bpt.batchSizeTriggerSend.Add(bpt.exportCtx, 1, metric.WithAttributes(bpt.processorAttr...)) diff --git a/processor/batchprocessor/metrics_test.go b/processor/batchprocessor/metrics_test.go index 2546f0094b8..47345e99d57 100644 --- a/processor/batchprocessor/metrics_test.go +++ b/processor/batchprocessor/metrics_test.go @@ -11,14 +11,12 @@ import ( "net/http/httptest" "testing" - ocprom "contrib.go.opencensus.io/exporter/prometheus" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" io_prometheus_client "github.com/prometheus/client_model/go" "github.com/prometheus/common/expfmt" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opencensus.io/stats/view" otelprom "go.opentelemetry.io/otel/exporters/prometheus" sdkmetric "go.opentelemetry.io/otel/sdk/metric" "go.opentelemetry.io/otel/sdk/resource" @@ -29,23 +27,8 @@ import ( "go.opentelemetry.io/collector/processor/processortest" ) -func TestBatchProcessorMetrics(t *testing.T) { - viewNames := []string{ - "batch_size_trigger_send", - "timeout_trigger_send", - "batch_send_size", - "batch_send_size_bytes", - } - views := metricViews() - for i, viewName := range viewNames { - assert.Equal(t, "processor/batch/"+viewName, views[i].Name) - } -} - type testTelemetry struct { - meter view.Meter promHandler http.Handler - useOtel bool meterProvider *sdkmetric.MeterProvider } @@ -63,52 +46,28 @@ type expectedMetrics struct { timeoutTrigger float64 } -func telemetryTest(t *testing.T, testFunc func(t *testing.T, tel testTelemetry, useOtel bool)) { - t.Run("WithOC", func(t *testing.T) { - testFunc(t, setupTelemetry(t, false), false) - }) - +func telemetryTest(t *testing.T, testFunc func(t *testing.T, tel testTelemetry)) { t.Run("WithOTel", func(t *testing.T) { - testFunc(t, setupTelemetry(t, true), true) + testFunc(t, setupTelemetry(t)) }) } -func setupTelemetry(t *testing.T, useOtel bool) testTelemetry { - // Unregister the views first since they are registered by the init, this way we reset them. - views := metricViews() - view.Unregister(views...) - require.NoError(t, view.Register(views...)) - - telemetry := testTelemetry{ - meter: view.NewMeter(), - useOtel: useOtel, - } - - if useOtel { - promReg := prometheus.NewRegistry() - exporter, err := otelprom.New(otelprom.WithRegisterer(promReg), otelprom.WithoutUnits(), otelprom.WithoutScopeInfo()) - require.NoError(t, err) +func setupTelemetry(t *testing.T) testTelemetry { + telemetry := testTelemetry{} - telemetry.meterProvider = sdkmetric.NewMeterProvider( - sdkmetric.WithResource(resource.Empty()), - sdkmetric.WithReader(exporter), - sdkmetric.WithView(batchViews()...), - ) - - telemetry.promHandler = promhttp.HandlerFor(promReg, promhttp.HandlerOpts{}) - - t.Cleanup(func() { assert.NoError(t, telemetry.meterProvider.Shutdown(context.Background())) }) - } else { - promReg := prometheus.NewRegistry() + promReg := prometheus.NewRegistry() + exporter, err := otelprom.New(otelprom.WithRegisterer(promReg), otelprom.WithoutUnits(), otelprom.WithoutScopeInfo(), otelprom.WithoutCounterSuffixes()) + require.NoError(t, err) - ocExporter, err := ocprom.NewExporter(ocprom.Options{Registry: promReg}) - require.NoError(t, err) + telemetry.meterProvider = sdkmetric.NewMeterProvider( + sdkmetric.WithResource(resource.Empty()), + sdkmetric.WithReader(exporter), + sdkmetric.WithView(batchViews()...), + ) - telemetry.promHandler = ocExporter + telemetry.promHandler = promhttp.HandlerFor(promReg, promhttp.HandlerOpts{}) - view.RegisterExporter(ocExporter) - t.Cleanup(func() { view.UnregisterExporter(ocExporter) }) - } + t.Cleanup(func() { assert.NoError(t, telemetry.meterProvider.Shutdown(context.Background())) }) return telemetry } @@ -116,17 +75,12 @@ func setupTelemetry(t *testing.T, useOtel bool) testTelemetry { func (tt *testTelemetry) NewProcessorCreateSettings() processor.CreateSettings { settings := processortest.NewNopCreateSettings() settings.MeterProvider = tt.meterProvider - settings.ID = component.NewID(typeStr) + settings.ID = component.MustNewID("batch") return settings } func (tt *testTelemetry) assertMetrics(t *testing.T, expected expectedMetrics) { - for _, v := range metricViews() { - // Forces a flush for the opencensus view data. - _, _ = view.RetrieveData(v.Name) - } - req, err := http.NewRequest(http.MethodGet, "/metrics", nil) require.NoError(t, err) @@ -195,18 +149,13 @@ func (tt *testTelemetry) assertBoundaries(t *testing.T, expected []float64, hist for i := range expected { if math.Abs(expected[i]-got[i]) > 0.00001 { - assert.Failf(t, "unexpected boundary", "boundary for metric '%s' did no match, expected '%f' got '%f'", metric, expected[i], got[i]) + assert.Failf(t, "unexpected boundary", "boundary for metric '%s' did not match, expected '%f' got '%f'", metric, expected[i], got[i]) } } } func (tt *testTelemetry) getMetric(t *testing.T, name string, mtype io_prometheus_client.MetricType, got map[string]*io_prometheus_client.MetricFamily) *io_prometheus_client.Metric { - if tt.useOtel && mtype == io_prometheus_client.MetricType_COUNTER { - // OTel Go suffixes counters with `_total` - name += "_total" - } - metricFamily, ok := got[name] require.True(t, ok, "expected metric '%s' not found", name) require.Equal(t, mtype, metricFamily.GetType()) @@ -232,7 +181,7 @@ func getSingleMetric(metric *io_prometheus_client.MetricFamily) (*io_prometheus_ func assertFloat(t *testing.T, expected, got float64, metric string) { if math.Abs(expected-got) > 0.00001 { - assert.Failf(t, "unexpected metric value", "value for metric '%s' did no match, expected '%f' got '%f'", metric, expected, got) + assert.Failf(t, "unexpected metric value", "value for metric '%s' did not match, expected '%f' got '%f'", metric, expected, got) } } diff --git a/processor/batchprocessor/package_test.go b/processor/batchprocessor/package_test.go new file mode 100644 index 00000000000..58d64e47b57 --- /dev/null +++ b/processor/batchprocessor/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package batchprocessor + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/processor/batchprocessor/splitlogs_test.go b/processor/batchprocessor/splitlogs_test.go index 62c1b878337..d112cd1069e 100644 --- a/processor/batchprocessor/splitlogs_test.go +++ b/processor/batchprocessor/splitlogs_test.go @@ -19,7 +19,7 @@ func TestSplitLogs_noop(t *testing.T) { assert.Equal(t, td, split) i := 0 - td.ResourceLogs().At(0).ScopeLogs().At(0).LogRecords().RemoveIf(func(_ plog.LogRecord) bool { + td.ResourceLogs().At(0).ScopeLogs().At(0).LogRecords().RemoveIf(func(plog.LogRecord) bool { i++ return i > 5 }) diff --git a/processor/batchprocessor/splitmetrics_test.go b/processor/batchprocessor/splitmetrics_test.go index dea4b6f2d6c..e81cc73b5db 100644 --- a/processor/batchprocessor/splitmetrics_test.go +++ b/processor/batchprocessor/splitmetrics_test.go @@ -19,7 +19,7 @@ func TestSplitMetrics_noop(t *testing.T) { assert.Equal(t, td, split) i := 0 - td.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().RemoveIf(func(_ pmetric.Metric) bool { + td.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().RemoveIf(func(pmetric.Metric) bool { i++ return i > 5 }) diff --git a/processor/batchprocessor/splittraces_test.go b/processor/batchprocessor/splittraces_test.go index 94f115801dd..5316aab66a2 100644 --- a/processor/batchprocessor/splittraces_test.go +++ b/processor/batchprocessor/splittraces_test.go @@ -19,7 +19,7 @@ func TestSplitTraces_noop(t *testing.T) { assert.Equal(t, td, split) i := 0 - td.ResourceSpans().At(0).ScopeSpans().At(0).Spans().RemoveIf(func(_ ptrace.Span) bool { + td.ResourceSpans().At(0).ScopeSpans().At(0).Spans().RemoveIf(func(ptrace.Span) bool { i++ return i > 5 }) diff --git a/processor/go.mod b/processor/go.mod index afc84145c6e..ebb68ddd8da 100644 --- a/processor/go.mod +++ b/processor/go.mod @@ -1,64 +1,54 @@ module go.opentelemetry.io/collector/processor -go 1.20 +go 1.21 require ( github.com/stretchr/testify v1.8.4 - go.opencensus.io v0.24.0 - go.opentelemetry.io/collector v0.85.0 - go.opentelemetry.io/collector/component v0.85.0 - go.opentelemetry.io/collector/config/configtelemetry v0.85.0 - go.opentelemetry.io/collector/consumer v0.85.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0014 - go.opentelemetry.io/otel v1.18.0 - go.opentelemetry.io/otel/metric v1.18.0 - go.opentelemetry.io/otel/sdk/metric v0.41.0 - go.opentelemetry.io/otel/trace v1.18.0 + go.opentelemetry.io/collector v0.96.0 + go.opentelemetry.io/collector/component v0.96.0 + go.opentelemetry.io/collector/config/configtelemetry v0.96.0 + go.opentelemetry.io/collector/consumer v0.96.0 + go.opentelemetry.io/collector/pdata v1.3.0 + go.opentelemetry.io/otel v1.24.0 + go.opentelemetry.io/otel/metric v1.24.0 + go.opentelemetry.io/otel/trace v1.24.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 + go.uber.org/zap v1.27.0 ) require ( - contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.0.1 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.16.0 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect - github.com/prometheus/statsd_exporter v0.22.7 // indirect - go.opentelemetry.io/collector/confmap v0.85.0 // indirect - go.opentelemetry.io/collector/exporter v0.85.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0014 // indirect - go.opentelemetry.io/collector/receiver v0.85.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.41.0 // indirect - go.opentelemetry.io/otel/sdk v1.18.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/grpc v1.58.1 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/confmap v0.96.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -70,24 +60,8 @@ replace go.opentelemetry.io/collector/confmap => ../confmap replace go.opentelemetry.io/collector/consumer => ../consumer -replace go.opentelemetry.io/collector/exporter => ../exporter - -replace go.opentelemetry.io/collector/extension => ../extension - -replace go.opentelemetry.io/collector/extension/zpagesextension => ../extension/zpagesextension - replace go.opentelemetry.io/collector/featuregate => ../featuregate replace go.opentelemetry.io/collector/pdata => ../pdata -replace go.opentelemetry.io/collector/receiver => ../receiver - -replace go.opentelemetry.io/collector/semconv => ../semconv - -replace go.opentelemetry.io/collector/connector => ../connector - -replace go.opentelemetry.io/collector/config/confignet => ../config/confignet - replace go.opentelemetry.io/collector/config/configtelemetry => ../config/configtelemetry - -replace go.opentelemetry.io/collector/service => ../service diff --git a/processor/go.sum b/processor/go.sum index 15d68a28c23..06616cda85d 100644 --- a/processor/go.sum +++ b/processor/go.sum @@ -1,582 +1,126 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= 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= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= -github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 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/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= -github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -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/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= -go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= -go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/exporters/prometheus v0.41.0 h1:A3/bhjP5SmELy8dcpK+uttHeh9Qrh+YnS16/VzrztRQ= -go.opentelemetry.io/otel/exporters/prometheus v0.41.0/go.mod h1:mKuXEMi9suyyNJQ99SZCO0mpWGFe0MIALtjd3r6uo7Q= -go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= -go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= -go.opentelemetry.io/otel/sdk v1.18.0 h1:e3bAB0wB3MljH38sHzpV/qWrOTCFrdZF2ct9F8rBkcY= -go.opentelemetry.io/otel/sdk v1.18.0/go.mod h1:1RCygWV7plY2KmdskZEDDBs4tJeHG92MdHZIluiYs/M= -go.opentelemetry.io/otel/sdk/metric v0.41.0 h1:c3sAt9/pQ5fSIUfl0gPtClV3HhE18DCVzByD33R/zsk= -go.opentelemetry.io/otel/sdk/metric v0.41.0/go.mod h1:PmOmSt+iOklKtIg5O4Vz9H/ttcRFSNTgii+E1KGyn1w= -go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= -go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/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-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.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/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= -google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +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= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/processor/memorylimiterprocessor/README.md b/processor/memorylimiterprocessor/README.md index e0e4f22a22e..6f5e51da789 100644 --- a/processor/memorylimiterprocessor/README.md +++ b/processor/memorylimiterprocessor/README.md @@ -1,68 +1,85 @@ # Memory Limiter Processor -| Status | | -| ------------------------ | --------------------- | -| Stability | [beta] | -| Supported pipeline types | traces, metrics, logs | -| Distributions | [core], [contrib] | + +| Status | | +| ------------- |-----------| +| Stability | [beta]: traces, metrics, logs | +| Distributions | [core], [contrib] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aprocessor%2Fmemorylimiter%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aprocessor%2Fmemorylimiter) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aprocessor%2Fmemorylimiter%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aprocessor%2Fmemorylimiter) | + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib + + +## Overview The memory limiter processor is used to prevent out of memory situations on the collector. Given that the amount and type of data the collector processes is -environment specific and resource utilization of the collector is also dependent +environment-specific and resource utilization of the collector is also dependent on the configured processors, it is important to put checks in place regarding memory usage. - -The memory_limiter processor allows to perform periodic checks of memory -usage if it exceeds defined limits will begin refusing data and forcing GC to reduce -memory consumption. -The memory_limiter uses soft and hard memory limits. Hard limit is always above or equal -the soft limit. +## Functionality + +The memory limiter processor performs periodic checks of memory +usage and will begin refusing data and forcing GC to reduce +memory consumption when defined limits have been exceeded. -When the memory usage exceeds the soft limit the processor will enter the memory limited -mode and will start refusing the data by returning errors to the preceding component +The processor uses soft and hard memory limits. The hard limit is defined via the +`limit_mib` configuration option, and is always above or equal +to the soft limit. The difference between the soft limit and hard limit is defined via +the `spike_limit_mib` configuration option. + +The processor will enter memory limited mode and will start refusing the data when +memory usage exceeds the soft limit. This is done by returning errors to the preceding component in the pipeline that made the ConsumeLogs/Trace/Metrics function call. -The preceding component should be normally a receiver. In memory limited mode the error returned by ConsumeLogs/Trace/Metrics function is a non-permanent error. When receivers see this error they are expected to retry sending -the same data. The receivers may also apply a backpressure to their data sources -in order to slow down the inflow of data into the Collector and allow the memory usage -to go below the limits. +the same data. The receivers may also apply backpressure to their own data sources +in order to slow the inflow of data into the Collector, and to allow memory usage +to go below the set limits. ->Warning: if the component preceding the memory limiter in the pipeline does not correctly -retry and send the data again after ConsumeLogs/Trace/Metrics functions return then that -data will be permanently lost. We consider such components incorrectly implemented. +> Warning: Data will be permanently lost if the component preceding the memory limiter +> in the telemetry pipeline does not correctly retry sending data after it has +> been refused by the memory limiter. +> We consider such components to be incorrectly implemented. -When the memory usage is above the hard limit in addition to refusing the data the -processor will forcedly perform garbage collection in order to try to free memory. +When the memory usage is above the hard limit the processor will additionally +force garbage collection to be performed. -When the memory usage drop below the soft limit, the normal operation is resumed (data -will no longer be refused and no forced garbage collection will be performed). +Normal operation is resumed when memory usage drops below the soft limit, meaning data +will no longer be refused and the processor won't force garbage collection to +be performed. -The difference between the soft limit and hard limits is defined via `spike_limit_mib` -configuration option. The value of this option should be selected in a way that ensures -that between the memory check intervals the memory usage cannot increase by more than this -value (otherwise memory usage may exceed the hard limit - even if temporarily). -A good starting point for `spike_limit_mib` is 20% of the hard limit. Bigger -`spike_limit_mib` values may be necessary for spiky traffic or for longer check intervals. +## Best Practices Note that while the processor can help mitigate out of memory situations, it is not a replacement for properly sizing and configuring the collector. Keep in mind that if the soft limit is crossed, the collector will return errors to all receive operations until enough memory is freed. This may -eventually result in dropped data since the receivers may not be able to hold back -and retry the data indefinitely. +eventually result in dropped data since the receivers may not be able to +retry the data indefinitely. + +It is highly recommended to configure the `GOMEMLIMIT` +[environment variable](https://pkg.go.dev/runtime#hdr-Environment_Variables) as well +as the `memory_limiter` processor on every collector. `GOMEMLIMIT` should be set to +80% of the hard memory limit of your collector. For the `memory_limiter` processor, the +best practice is to add it as the first processor in a pipeline. This is to ensure that backpressure +can be sent to applicable receivers and minimize the likelihood of dropped data when the +`memory_limiter` gets triggered. + +The value of the `spike_limit_mib` configuration option should be selected in a way +that ensures that memory usage cannot increase by more than this value within a single +memory check interval. Otherwise, memory usage may exceed the hard limit, even if temporarily. +A good starting point for `spike_limit_mib` is 20% of the hard limit. Bigger +`spike_limit_mib` values may be necessary for spiky traffic or for longer check intervals. + -It is highly recommended to configure `ballastextension` as well as the -`memory_limiter` processor on every collector. The ballast should be configured to -be 1/3 to 1/2 of the memory allocated to the collector. The memory_limiter -processor should be the first processor defined in the pipeline (immediately after -the receivers). This is to ensure that backpressure can be sent to applicable -receivers and minimize the likelihood of dropped data when the memory_limiter gets -triggered. +## Configuration -Please refer to [config.go](./config.go) for the config spec. +Please refer to [memorylimiter.go](../../internal/memorylimiter/memorylimiter.go) for the config spec. The following configuration options **must be changed**: - `check_interval` (default = 0s): Time between measurements of memory @@ -107,9 +124,6 @@ processors: spike_limit_percentage: 30 ``` -Refer to [config.yaml](./testdata/config.yaml) for detailed +Refer to [config.yaml](../../internal/memorylimiter/testdata/config.yaml) for detailed examples on using the processor. -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta -[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol diff --git a/processor/memorylimiterprocessor/config.go b/processor/memorylimiterprocessor/config.go index e16ebeb67ee..8d7f28e14e5 100644 --- a/processor/memorylimiterprocessor/config.go +++ b/processor/memorylimiterprocessor/config.go @@ -1,43 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Package memorylimiterprocessor provides a processor for OpenTelemetry Service pipeline -// that refuses data on the pipeline according to the current state of memory usage. package memorylimiterprocessor // import "go.opentelemetry.io/collector/processor/memorylimiterprocessor" +import "go.opentelemetry.io/collector/internal/memorylimiter" -import ( - "time" - - "go.opentelemetry.io/collector/component" -) - -// Config defines configuration for memory memoryLimiter processor. -type Config struct { - // CheckInterval is the time between measurements of memory usage for the - // purposes of avoiding going over the limits. Defaults to zero, so no - // checks will be performed. - CheckInterval time.Duration `mapstructure:"check_interval"` - - // MemoryLimitMiB is the maximum amount of memory, in MiB, targeted to be - // allocated by the process. - MemoryLimitMiB uint32 `mapstructure:"limit_mib"` - - // MemorySpikeLimitMiB is the maximum, in MiB, spike expected between the - // measurements of memory usage. - MemorySpikeLimitMiB uint32 `mapstructure:"spike_limit_mib"` - - // MemoryLimitPercentage is the maximum amount of memory, in %, targeted to be - // allocated by the process. The fixed memory settings MemoryLimitMiB has a higher precedence. - MemoryLimitPercentage uint32 `mapstructure:"limit_percentage"` - - // MemorySpikePercentage is the maximum, in percents against the total memory, - // spike expected between the measurements of memory usage. - MemorySpikePercentage uint32 `mapstructure:"spike_limit_percentage"` -} - -var _ component.Config = (*Config)(nil) - -// Validate checks if the processor configuration is valid -func (cfg *Config) Validate() error { - return nil -} +type Config = memorylimiter.Config diff --git a/processor/memorylimiterprocessor/config_test.go b/processor/memorylimiterprocessor/config_test.go deleted file mode 100644 index 076d037dba0..00000000000 --- a/processor/memorylimiterprocessor/config_test.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package memorylimiterprocessor - -import ( - "path/filepath" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/confmap" - "go.opentelemetry.io/collector/confmap/confmaptest" -) - -func TestUnmarshalDefaultConfig(t *testing.T) { - factory := NewFactory() - cfg := factory.CreateDefaultConfig() - assert.NoError(t, component.UnmarshalConfig(confmap.New(), cfg)) - assert.Equal(t, factory.CreateDefaultConfig(), cfg) -} - -func TestUnmarshalConfig(t *testing.T) { - cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) - require.NoError(t, err) - factory := NewFactory() - cfg := factory.CreateDefaultConfig() - assert.NoError(t, component.UnmarshalConfig(cm, cfg)) - assert.Equal(t, - &Config{ - CheckInterval: 5 * time.Second, - MemoryLimitMiB: 4000, - MemorySpikeLimitMiB: 500, - }, cfg) -} diff --git a/processor/memorylimiterprocessor/factory.go b/processor/memorylimiterprocessor/factory.go index 6f345a14c6a..67ae80c996b 100644 --- a/processor/memorylimiterprocessor/factory.go +++ b/processor/memorylimiterprocessor/factory.go @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +//go:generate mdatagen metadata.yaml + package memorylimiterprocessor // import "go.opentelemetry.io/collector/processor/memorylimiterprocessor" import ( @@ -10,34 +12,30 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/processor" + "go.opentelemetry.io/collector/processor/memorylimiterprocessor/internal/metadata" "go.opentelemetry.io/collector/processor/processorhelper" ) -const ( - // The value of "type" Attribute Key in configuration. - typeStr = "memory_limiter" -) - var processorCapabilities = consumer.Capabilities{MutatesData: false} type factory struct { // memoryLimiters stores memoryLimiter instances with unique configs that multiple processors can reuse. // This avoids running multiple memory checks (ie: GC) for every processor using the same processor config. - memoryLimiters map[component.Config]*memoryLimiter + memoryLimiters map[component.Config]*memoryLimiterProcessor lock sync.Mutex } // NewFactory returns a new factory for the Memory Limiter processor. func NewFactory() processor.Factory { f := &factory{ - memoryLimiters: map[component.Config]*memoryLimiter{}, + memoryLimiters: map[component.Config]*memoryLimiterProcessor{}, } return processor.NewFactory( - typeStr, + metadata.Type, createDefaultConfig, - processor.WithTraces(f.createTracesProcessor, component.StabilityLevelBeta), - processor.WithMetrics(f.createMetricsProcessor, component.StabilityLevelBeta), - processor.WithLogs(f.createLogsProcessor, component.StabilityLevelBeta)) + processor.WithTraces(f.createTracesProcessor, metadata.TracesStability), + processor.WithMetrics(f.createMetricsProcessor, metadata.MetricsStability), + processor.WithLogs(f.createLogsProcessor, metadata.LogsStability)) } // CreateDefaultConfig creates the default configuration for processor. Notice @@ -99,7 +97,7 @@ func (f *factory) createLogsProcessor( // getMemoryLimiter checks if we have a cached memoryLimiter with a specific config, // otherwise initialize and add one to the store. -func (f *factory) getMemoryLimiter(set processor.CreateSettings, cfg component.Config) (*memoryLimiter, error) { +func (f *factory) getMemoryLimiter(set processor.CreateSettings, cfg component.Config) (*memoryLimiterProcessor, error) { f.lock.Lock() defer f.lock.Unlock() @@ -107,7 +105,7 @@ func (f *factory) getMemoryLimiter(set processor.CreateSettings, cfg component.C return memLimiter, nil } - memLimiter, err := newMemoryLimiter(set, cfg.(*Config)) + memLimiter, err := newMemoryLimiterProcessor(set, cfg.(*Config)) if err != nil { return nil, err } diff --git a/processor/memorylimiterprocessor/factory_test.go b/processor/memorylimiterprocessor/factory_test.go index e7a274dba06..b8cca4c6d20 100644 --- a/processor/memorylimiterprocessor/factory_test.go +++ b/processor/memorylimiterprocessor/factory_test.go @@ -13,6 +13,7 @@ import ( "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/internal/memorylimiter" "go.opentelemetry.io/collector/processor/processortest" ) @@ -31,38 +32,25 @@ func TestCreateProcessor(t *testing.T) { cfg := factory.CreateDefaultConfig() - // This processor can't be created with the default config. - tp, err := factory.CreateTracesProcessor(context.Background(), processortest.NewNopCreateSettings(), cfg, consumertest.NewNop()) - assert.Nil(t, tp) - assert.Error(t, err, "created processor with invalid settings") - - mp, err := factory.CreateMetricsProcessor(context.Background(), processortest.NewNopCreateSettings(), cfg, consumertest.NewNop()) - assert.Nil(t, mp) - assert.Error(t, err, "created processor with invalid settings") - - lp, err := factory.CreateLogsProcessor(context.Background(), processortest.NewNopCreateSettings(), cfg, consumertest.NewNop()) - assert.Nil(t, lp) - assert.Error(t, err, "created processor with invalid settings") - // Create processor with a valid config. pCfg := cfg.(*Config) pCfg.MemoryLimitMiB = 5722 pCfg.MemorySpikeLimitMiB = 1907 pCfg.CheckInterval = 100 * time.Millisecond - tp, err = factory.CreateTracesProcessor(context.Background(), processortest.NewNopCreateSettings(), cfg, consumertest.NewNop()) + tp, err := factory.CreateTracesProcessor(context.Background(), processortest.NewNopCreateSettings(), cfg, consumertest.NewNop()) assert.NoError(t, err) assert.NotNil(t, tp) // test if we can shutdown a monitoring routine that has not started - assert.ErrorIs(t, tp.Shutdown(context.Background()), errShutdownNotStarted) + assert.ErrorIs(t, tp.Shutdown(context.Background()), memorylimiter.ErrShutdownNotStarted) assert.NoError(t, tp.Start(context.Background(), componenttest.NewNopHost())) - mp, err = factory.CreateMetricsProcessor(context.Background(), processortest.NewNopCreateSettings(), cfg, consumertest.NewNop()) + mp, err := factory.CreateMetricsProcessor(context.Background(), processortest.NewNopCreateSettings(), cfg, consumertest.NewNop()) assert.NoError(t, err) assert.NotNil(t, mp) assert.NoError(t, mp.Start(context.Background(), componenttest.NewNopHost())) - lp, err = factory.CreateLogsProcessor(context.Background(), processortest.NewNopCreateSettings(), cfg, consumertest.NewNop()) + lp, err := factory.CreateLogsProcessor(context.Background(), processortest.NewNopCreateSettings(), cfg, consumertest.NewNop()) assert.NoError(t, err) assert.NotNil(t, lp) assert.NoError(t, lp.Start(context.Background(), componenttest.NewNopHost())) @@ -71,11 +59,11 @@ func TestCreateProcessor(t *testing.T) { assert.NoError(t, tp.Shutdown(context.Background())) assert.NoError(t, mp.Shutdown(context.Background())) // verify that no monitoring routine is running - assert.Error(t, tp.Shutdown(context.Background())) + assert.ErrorIs(t, tp.Shutdown(context.Background()), memorylimiter.ErrShutdownNotStarted) // start and shutdown a new monitoring routine assert.NoError(t, lp.Start(context.Background(), componenttest.NewNopHost())) assert.NoError(t, lp.Shutdown(context.Background())) // calling it again should throw an error - assert.ErrorIs(t, lp.Shutdown(context.Background()), errShutdownNotStarted) + assert.ErrorIs(t, lp.Shutdown(context.Background()), memorylimiter.ErrShutdownNotStarted) } diff --git a/processor/memorylimiterprocessor/go.mod b/processor/memorylimiterprocessor/go.mod index 07dd7ceb11c..a82f08150c3 100644 --- a/processor/memorylimiterprocessor/go.mod +++ b/processor/memorylimiterprocessor/go.mod @@ -1,56 +1,62 @@ module go.opentelemetry.io/collector/processor/memorylimiterprocessor -go 1.20 +go 1.21 require ( github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.85.0 - go.opentelemetry.io/collector/component v0.85.0 - go.opentelemetry.io/collector/config/configtelemetry v0.85.0 - go.opentelemetry.io/collector/confmap v0.85.0 - go.opentelemetry.io/collector/consumer v0.85.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0014 - go.opentelemetry.io/collector/processor v0.85.0 - go.uber.org/zap v1.26.0 + go.opentelemetry.io/collector v0.96.0 + go.opentelemetry.io/collector/component v0.96.0 + go.opentelemetry.io/collector/consumer v0.96.0 + go.opentelemetry.io/collector/pdata v1.3.0 + go.opentelemetry.io/collector/processor v0.96.0 + go.opentelemetry.io/otel/metric v1.24.0 + go.opentelemetry.io/otel/trace v1.24.0 + go.uber.org/goleak v1.3.0 ) require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.0.1 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/shirou/gopsutil/v3 v3.23.8 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/shirou/gopsutil/v3 v3.24.1 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0014 // indirect - go.opentelemetry.io/otel v1.18.0 // indirect - go.opentelemetry.io/otel/metric v1.18.0 // indirect - go.opentelemetry.io/otel/sdk v1.18.0 // indirect - go.opentelemetry.io/otel/sdk/metric v0.41.0 // indirect - go.opentelemetry.io/otel/trace v1.18.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect + go.opentelemetry.io/collector/confmap v0.96.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/grpc v1.58.1 // indirect - google.golang.org/protobuf v1.31.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -62,20 +68,10 @@ replace go.opentelemetry.io/collector/component => ../../component replace go.opentelemetry.io/collector/confmap => ../../confmap -replace go.opentelemetry.io/collector/exporter => ../../exporter - -replace go.opentelemetry.io/collector/extension => ../../extension - replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/pdata => ../../pdata -replace go.opentelemetry.io/collector/receiver => ../../receiver - -replace go.opentelemetry.io/collector/semconv => ../../semconv - -replace go.opentelemetry.io/collector/extension/zpagesextension => ../../extension/zpagesextension - replace go.opentelemetry.io/collector/consumer => ../../consumer retract ( @@ -83,10 +79,4 @@ retract ( v0.69.0 // Release failed, use v0.69.1 ) -replace go.opentelemetry.io/collector/connector => ../../connector - -replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet - replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry - -replace go.opentelemetry.io/collector/service => ../../service diff --git a/processor/memorylimiterprocessor/go.sum b/processor/memorylimiterprocessor/go.sum index 22c6f66a665..7a84d36f2e3 100644 --- a/processor/memorylimiterprocessor/go.sum +++ b/processor/memorylimiterprocessor/go.sum @@ -1,57 +1,30 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -60,17 +33,16 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= -github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -82,15 +54,18 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/shirou/gopsutil/v3 v3.23.8 h1:xnATPiybo6GgdRoC4YoGnxXZFRc3dqQTGi73oLvvBrE= -github.com/shirou/gopsutil/v3 v3.23.8/go.mod h1:7hmCaBn+2ZwaZOr6jmPBZDfawwMGuo1id3C6aM8EDqQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/shirou/gopsutil/v3 v3.24.1 h1:R3t6ondCEvmARp3wxODhXMTLC/klMa87h2PHUw5m7QI= +github.com/shirou/gopsutil/v3 v3.24.1/go.mod h1:UU7a2MSBQa+kW1uuDq8DeEBS8kmrnQwsv2b5O513rwU= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -99,7 +74,6 @@ github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpE github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 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/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= @@ -110,51 +84,38 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= -go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= -go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/exporters/prometheus v0.41.0 h1:A3/bhjP5SmELy8dcpK+uttHeh9Qrh+YnS16/VzrztRQ= -go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= -go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= -go.opentelemetry.io/otel/sdk v1.18.0 h1:e3bAB0wB3MljH38sHzpV/qWrOTCFrdZF2ct9F8rBkcY= -go.opentelemetry.io/otel/sdk v1.18.0/go.mod h1:1RCygWV7plY2KmdskZEDDBs4tJeHG92MdHZIluiYs/M= -go.opentelemetry.io/otel/sdk/metric v0.41.0 h1:c3sAt9/pQ5fSIUfl0gPtClV3HhE18DCVzByD33R/zsk= -go.opentelemetry.io/otel/sdk/metric v0.41.0/go.mod h1:PmOmSt+iOklKtIg5O4Vz9H/ttcRFSNTgii+E1KGyn1w= -go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= -go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -162,17 +123,14 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -180,38 +138,17 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= -google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/processor/memorylimiterprocessor/internal/metadata/generated_status.go b/processor/memorylimiterprocessor/internal/metadata/generated_status.go new file mode 100644 index 00000000000..0b2058d89df --- /dev/null +++ b/processor/memorylimiterprocessor/internal/metadata/generated_status.go @@ -0,0 +1,29 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" +) + +var ( + Type = component.MustNewType("memory_limiter") + scopeName = "go.opentelemetry.io/collector/processor/memorylimiterprocessor" +) + +const ( + TracesStability = component.StabilityLevelBeta + MetricsStability = component.StabilityLevelBeta + LogsStability = component.StabilityLevelBeta +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter(scopeName) +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer(scopeName) +} diff --git a/processor/memorylimiterprocessor/memorylimiter.go b/processor/memorylimiterprocessor/memorylimiter.go index 0520e13339a..6d7368bfb6a 100644 --- a/processor/memorylimiterprocessor/memorylimiter.go +++ b/processor/memorylimiterprocessor/memorylimiter.go @@ -5,17 +5,9 @@ package memorylimiterprocessor // import "go.opentelemetry.io/collector/processo import ( "context" - "errors" - "fmt" - "runtime" - "sync" - "sync/atomic" - "time" - - "go.uber.org/zap" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/internal/iruntime" + "go.opentelemetry.io/collector/internal/memorylimiter" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" @@ -23,87 +15,17 @@ import ( "go.opentelemetry.io/collector/processor/processorhelper" ) -const ( - mibBytes = 1024 * 1024 -) - -var ( - // errDataRefused will be returned to callers of ConsumeTraceData to indicate - // that data is being refused due to high memory usage. - errDataRefused = errors.New("data refused due to high memory usage") - - // Construction errors - - errCheckIntervalOutOfRange = errors.New( - "checkInterval must be greater than zero") - - errLimitOutOfRange = errors.New( - "memAllocLimit or memoryLimitPercentage must be greater than zero") - - errMemSpikeLimitOutOfRange = errors.New( - "memSpikeLimit must be smaller than memAllocLimit") - - errPercentageLimitOutOfRange = errors.New( - "memoryLimitPercentage and memorySpikePercentage must be greater than zero and less than or equal to hundred", - ) - - errShutdownNotStarted = errors.New("no existing monitoring routine is running") -) - -// make it overridable by tests -var getMemoryFn = iruntime.TotalMemory - -type memoryLimiter struct { - usageChecker memUsageChecker - - memCheckWait time.Duration - ballastSize uint64 - - // mustRefuse is used to indicate when data should be refused. - mustRefuse *atomic.Bool - - ticker *time.Ticker - - lastGCDone time.Time - - // The function to read the mem values is set as a reference to help with - // testing different values. - readMemStatsFn func(m *runtime.MemStats) - - // Fields used for logging. - logger *zap.Logger - configMismatchedLogged bool - - obsrep *processorhelper.ObsReport - - refCounterLock sync.Mutex - refCounter int +type memoryLimiterProcessor struct { + memlimiter *memorylimiter.MemoryLimiter + obsrep *processorhelper.ObsReport } -// Minimum interval between forced GC when in soft limited mode. We don't want to -// do GCs too frequently since it is a CPU-heavy operation. -const minGCIntervalWhenSoftLimited = 10 * time.Second - // newMemoryLimiter returns a new memorylimiter processor. -func newMemoryLimiter(set processor.CreateSettings, cfg *Config) (*memoryLimiter, error) { - if cfg.CheckInterval <= 0 { - return nil, errCheckIntervalOutOfRange - } - if cfg.MemoryLimitMiB == 0 && cfg.MemoryLimitPercentage == 0 { - return nil, errLimitOutOfRange - } - - logger := set.Logger - usageChecker, err := getMemUsageChecker(cfg, logger) +func newMemoryLimiterProcessor(set processor.CreateSettings, cfg *Config) (*memoryLimiterProcessor, error) { + ml, err := memorylimiter.NewMemoryLimiter(cfg, set.Logger) if err != nil { return nil, err } - - logger.Info("Memory limiter configured", - zap.Uint64("limit_mib", usageChecker.memAllocLimit/mibBytes), - zap.Uint64("spike_limit_mib", usageChecker.memSpikeLimit/mibBytes), - zap.Duration("check_interval", cfg.CheckInterval)) - obsrep, err := processorhelper.NewObsReport(processorhelper.ObsReportSettings{ ProcessorID: set.ID, ProcessorCreateSettings: set, @@ -112,230 +34,72 @@ func newMemoryLimiter(set processor.CreateSettings, cfg *Config) (*memoryLimiter return nil, err } - ml := &memoryLimiter{ - usageChecker: *usageChecker, - memCheckWait: cfg.CheckInterval, - ticker: time.NewTicker(cfg.CheckInterval), - readMemStatsFn: runtime.ReadMemStats, - logger: logger, - mustRefuse: &atomic.Bool{}, - obsrep: obsrep, + p := &memoryLimiterProcessor{ + memlimiter: ml, + obsrep: obsrep, } - return ml, nil -} - -func getMemUsageChecker(cfg *Config, logger *zap.Logger) (*memUsageChecker, error) { - memAllocLimit := uint64(cfg.MemoryLimitMiB) * mibBytes - memSpikeLimit := uint64(cfg.MemorySpikeLimitMiB) * mibBytes - if cfg.MemoryLimitMiB != 0 { - return newFixedMemUsageChecker(memAllocLimit, memSpikeLimit) - } - totalMemory, err := getMemoryFn() - if err != nil { - return nil, fmt.Errorf("failed to get total memory, use fixed memory settings (limit_mib): %w", err) - } - logger.Info("Using percentage memory limiter", - zap.Uint64("total_memory_mib", totalMemory/mibBytes), - zap.Uint32("limit_percentage", cfg.MemoryLimitPercentage), - zap.Uint32("spike_limit_percentage", cfg.MemorySpikePercentage)) - return newPercentageMemUsageChecker(totalMemory, uint64(cfg.MemoryLimitPercentage), uint64(cfg.MemorySpikePercentage)) + return p, nil } -func (ml *memoryLimiter) start(_ context.Context, host component.Host) error { - extensions := host.GetExtensions() - for _, extension := range extensions { - if ext, ok := extension.(interface{ GetBallastSize() uint64 }); ok { - ml.ballastSize = ext.GetBallastSize() - break - } - } - ml.startMonitoring() - return nil +func (p *memoryLimiterProcessor) start(ctx context.Context, host component.Host) error { + return p.memlimiter.Start(ctx, host) } -func (ml *memoryLimiter) shutdown(context.Context) error { - ml.refCounterLock.Lock() - defer ml.refCounterLock.Unlock() - - if ml.refCounter == 0 { - return errShutdownNotStarted - } else if ml.refCounter == 1 { - ml.ticker.Stop() - } - ml.refCounter-- - return nil +func (p *memoryLimiterProcessor) shutdown(ctx context.Context) error { + return p.memlimiter.Shutdown(ctx) } -func (ml *memoryLimiter) processTraces(ctx context.Context, td ptrace.Traces) (ptrace.Traces, error) { +func (p *memoryLimiterProcessor) processTraces(ctx context.Context, td ptrace.Traces) (ptrace.Traces, error) { numSpans := td.SpanCount() - if ml.mustRefuse.Load() { + if p.memlimiter.MustRefuse() { // TODO: actually to be 100% sure that this is "refused" and not "dropped" // it is necessary to check the pipeline to see if this is directly connected // to a receiver (ie.: a receiver is on the call stack). For now it // assumes that the pipeline is properly configured and a receiver is on the // callstack and that the receiver will correctly retry the refused data again. - ml.obsrep.TracesRefused(ctx, numSpans) - - return td, errDataRefused + p.obsrep.TracesRefused(ctx, numSpans) + return td, memorylimiter.ErrDataRefused } // Even if the next consumer returns error record the data as accepted by // this processor. - ml.obsrep.TracesAccepted(ctx, numSpans) + p.obsrep.TracesAccepted(ctx, numSpans) return td, nil } -func (ml *memoryLimiter) processMetrics(ctx context.Context, md pmetric.Metrics) (pmetric.Metrics, error) { +func (p *memoryLimiterProcessor) processMetrics(ctx context.Context, md pmetric.Metrics) (pmetric.Metrics, error) { numDataPoints := md.DataPointCount() - if ml.mustRefuse.Load() { + if p.memlimiter.MustRefuse() { // TODO: actually to be 100% sure that this is "refused" and not "dropped" // it is necessary to check the pipeline to see if this is directly connected // to a receiver (ie.: a receiver is on the call stack). For now it // assumes that the pipeline is properly configured and a receiver is on the // callstack. - ml.obsrep.MetricsRefused(ctx, numDataPoints) - return md, errDataRefused + p.obsrep.MetricsRefused(ctx, numDataPoints) + return md, memorylimiter.ErrDataRefused } // Even if the next consumer returns error record the data as accepted by // this processor. - ml.obsrep.MetricsAccepted(ctx, numDataPoints) + p.obsrep.MetricsAccepted(ctx, numDataPoints) return md, nil } -func (ml *memoryLimiter) processLogs(ctx context.Context, ld plog.Logs) (plog.Logs, error) { +func (p *memoryLimiterProcessor) processLogs(ctx context.Context, ld plog.Logs) (plog.Logs, error) { numRecords := ld.LogRecordCount() - if ml.mustRefuse.Load() { + if p.memlimiter.MustRefuse() { // TODO: actually to be 100% sure that this is "refused" and not "dropped" // it is necessary to check the pipeline to see if this is directly connected // to a receiver (ie.: a receiver is on the call stack). For now it // assumes that the pipeline is properly configured and a receiver is on the // callstack. - ml.obsrep.LogsRefused(ctx, numRecords) - - return ld, errDataRefused + p.obsrep.LogsRefused(ctx, numRecords) + return ld, memorylimiter.ErrDataRefused } // Even if the next consumer returns error record the data as accepted by // this processor. - ml.obsrep.LogsAccepted(ctx, numRecords) + p.obsrep.LogsAccepted(ctx, numRecords) return ld, nil } - -func (ml *memoryLimiter) readMemStats() *runtime.MemStats { - ms := &runtime.MemStats{} - ml.readMemStatsFn(ms) - // If proper configured ms.Alloc should be at least ml.ballastSize but since - // a misconfiguration is possible check for that here. - if ms.Alloc >= ml.ballastSize { - ms.Alloc -= ml.ballastSize - } else if !ml.configMismatchedLogged { - // This indicates misconfiguration. Log it once. - ml.configMismatchedLogged = true - ml.logger.Warn(`"size_mib" in ballast extension is likely incorrectly configured.`) - } - - return ms -} - -// startMonitoring starts a single ticker'd goroutine per instance -// that will check memory usage every checkInterval period. -func (ml *memoryLimiter) startMonitoring() { - ml.refCounterLock.Lock() - defer ml.refCounterLock.Unlock() - - ml.refCounter++ - if ml.refCounter == 1 { - go func() { - for range ml.ticker.C { - ml.checkMemLimits() - } - }() - } -} - -func memstatToZapField(ms *runtime.MemStats) zap.Field { - return zap.Uint64("cur_mem_mib", ms.Alloc/mibBytes) -} - -func (ml *memoryLimiter) doGCandReadMemStats() *runtime.MemStats { - runtime.GC() - ml.lastGCDone = time.Now() - ms := ml.readMemStats() - ml.logger.Info("Memory usage after GC.", memstatToZapField(ms)) - return ms -} - -func (ml *memoryLimiter) checkMemLimits() { - ms := ml.readMemStats() - - ml.logger.Debug("Currently used memory.", memstatToZapField(ms)) - - if ml.usageChecker.aboveHardLimit(ms) { - ml.logger.Warn("Memory usage is above hard limit. Forcing a GC.", memstatToZapField(ms)) - ms = ml.doGCandReadMemStats() - } - - // Remember current state. - wasRefusing := ml.mustRefuse.Load() - - // Check if the memory usage is above the soft limit. - mustRefuse := ml.usageChecker.aboveSoftLimit(ms) - - if wasRefusing && !mustRefuse { - // Was previously refusing but enough memory is available now, no need to limit. - ml.logger.Info("Memory usage back within limits. Resuming normal operation.", memstatToZapField(ms)) - } - - if !wasRefusing && mustRefuse { - // We are above soft limit, do a GC if it wasn't done recently and see if - // it brings memory usage below the soft limit. - if time.Since(ml.lastGCDone) > minGCIntervalWhenSoftLimited { - ml.logger.Info("Memory usage is above soft limit. Forcing a GC.", memstatToZapField(ms)) - ms = ml.doGCandReadMemStats() - // Check the limit again to see if GC helped. - mustRefuse = ml.usageChecker.aboveSoftLimit(ms) - } - - if mustRefuse { - ml.logger.Warn("Memory usage is above soft limit. Refusing data.", memstatToZapField(ms)) - } - } - - ml.mustRefuse.Store(mustRefuse) -} - -type memUsageChecker struct { - memAllocLimit uint64 - memSpikeLimit uint64 -} - -func (d memUsageChecker) aboveSoftLimit(ms *runtime.MemStats) bool { - return ms.Alloc >= d.memAllocLimit-d.memSpikeLimit -} - -func (d memUsageChecker) aboveHardLimit(ms *runtime.MemStats) bool { - return ms.Alloc >= d.memAllocLimit -} - -func newFixedMemUsageChecker(memAllocLimit, memSpikeLimit uint64) (*memUsageChecker, error) { - if memSpikeLimit >= memAllocLimit { - return nil, errMemSpikeLimitOutOfRange - } - if memSpikeLimit == 0 { - // If spike limit is unspecified use 20% of mem limit. - memSpikeLimit = memAllocLimit / 5 - } - return &memUsageChecker{ - memAllocLimit: memAllocLimit, - memSpikeLimit: memSpikeLimit, - }, nil -} - -func newPercentageMemUsageChecker(totalMemory uint64, percentageLimit, percentageSpike uint64) (*memUsageChecker, error) { - if percentageLimit > 100 || percentageLimit <= 0 || percentageSpike > 100 || percentageSpike <= 0 { - return nil, errPercentageLimitOutOfRange - } - return newFixedMemUsageChecker(percentageLimit*totalMemory/100, percentageSpike*totalMemory/100) -} diff --git a/processor/memorylimiterprocessor/memorylimiter_test.go b/processor/memorylimiterprocessor/memorylimiter_test.go index c13e1b90b8b..626bf877d7c 100644 --- a/processor/memorylimiterprocessor/memorylimiter_test.go +++ b/processor/memorylimiterprocessor/memorylimiter_test.go @@ -6,20 +6,17 @@ package memorylimiterprocessor import ( "context" "runtime" - "sync/atomic" "testing" "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.uber.org/zap" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configtelemetry" - "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/internal/iruntime" + "go.opentelemetry.io/collector/internal/memorylimiter" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" @@ -29,420 +26,6 @@ import ( "go.opentelemetry.io/collector/processor/processortest" ) -func TestNew(t *testing.T) { - type args struct { - nextConsumer consumer.Traces - checkInterval time.Duration - memoryLimitMiB uint32 - memorySpikeLimitMiB uint32 - } - sink := new(consumertest.TracesSink) - tests := []struct { - name string - args args - wantErr error - }{ - { - name: "zero_checkInterval", - args: args{ - nextConsumer: sink, - }, - wantErr: errCheckIntervalOutOfRange, - }, - { - name: "zero_memAllocLimit", - args: args{ - nextConsumer: sink, - checkInterval: 100 * time.Millisecond, - }, - wantErr: errLimitOutOfRange, - }, - { - name: "memSpikeLimit_gt_memAllocLimit", - args: args{ - nextConsumer: sink, - checkInterval: 100 * time.Millisecond, - memoryLimitMiB: 1, - memorySpikeLimitMiB: 2, - }, - wantErr: errMemSpikeLimitOutOfRange, - }, - { - name: "success", - args: args{ - nextConsumer: sink, - checkInterval: 100 * time.Millisecond, - memoryLimitMiB: 1024, - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - cfg := createDefaultConfig().(*Config) - cfg.CheckInterval = tt.args.checkInterval - cfg.MemoryLimitMiB = tt.args.memoryLimitMiB - cfg.MemorySpikeLimitMiB = tt.args.memorySpikeLimitMiB - got, err := newMemoryLimiter(processortest.NewNopCreateSettings(), cfg) - if tt.wantErr != nil { - assert.ErrorIs(t, err, tt.wantErr) - return - } - assert.NoError(t, err) - assert.NoError(t, got.start(context.Background(), componenttest.NewNopHost())) - assert.NoError(t, got.shutdown(context.Background())) - }) - } -} - -// TestMetricsMemoryPressureResponse manipulates results from querying memory and -// check expected side effects. -func TestMetricsMemoryPressureResponse(t *testing.T) { - var currentMemAlloc uint64 - ml := &memoryLimiter{ - usageChecker: memUsageChecker{ - memAllocLimit: 1024, - }, - mustRefuse: &atomic.Bool{}, - readMemStatsFn: func(ms *runtime.MemStats) { - ms.Alloc = currentMemAlloc - }, - obsrep: newObsReport(t), - logger: zap.NewNop(), - } - mp, err := processorhelper.NewMetricsProcessor( - context.Background(), - processortest.NewNopCreateSettings(), - &Config{}, - consumertest.NewNop(), - ml.processMetrics, - processorhelper.WithCapabilities(processorCapabilities), - processorhelper.WithShutdown(ml.shutdown)) - require.NoError(t, err) - - ctx := context.Background() - md := pmetric.NewMetrics() - - // Below memAllocLimit. - currentMemAlloc = 800 - ml.checkMemLimits() - assert.NoError(t, mp.ConsumeMetrics(ctx, md)) - - // Above memAllocLimit. - currentMemAlloc = 1800 - ml.checkMemLimits() - assert.Equal(t, errDataRefused, mp.ConsumeMetrics(ctx, md)) - - // Check ballast effect - ml.ballastSize = 1000 - - // Below memAllocLimit accounting for ballast. - currentMemAlloc = 800 + ml.ballastSize - ml.checkMemLimits() - assert.NoError(t, mp.ConsumeMetrics(ctx, md)) - - // Above memAllocLimit even accountiing for ballast. - currentMemAlloc = 1800 + ml.ballastSize - ml.checkMemLimits() - assert.Equal(t, errDataRefused, mp.ConsumeMetrics(ctx, md)) - - // Restore ballast to default. - ml.ballastSize = 0 - - // Check spike limit - ml.usageChecker.memSpikeLimit = 512 - - // Below memSpikeLimit. - currentMemAlloc = 500 - ml.checkMemLimits() - assert.NoError(t, mp.ConsumeMetrics(ctx, md)) - - // Above memSpikeLimit. - currentMemAlloc = 550 - ml.checkMemLimits() - assert.Equal(t, errDataRefused, mp.ConsumeMetrics(ctx, md)) - -} - -// TestTraceMemoryPressureResponse manipulates results from querying memory and -// check expected side effects. -func TestTraceMemoryPressureResponse(t *testing.T) { - var currentMemAlloc uint64 - ml := &memoryLimiter{ - usageChecker: memUsageChecker{ - memAllocLimit: 1024, - }, - mustRefuse: &atomic.Bool{}, - readMemStatsFn: func(ms *runtime.MemStats) { - ms.Alloc = currentMemAlloc - }, - obsrep: newObsReport(t), - logger: zap.NewNop(), - } - tp, err := processorhelper.NewTracesProcessor( - context.Background(), - processortest.NewNopCreateSettings(), - &Config{}, - consumertest.NewNop(), - ml.processTraces, - processorhelper.WithCapabilities(processorCapabilities), - processorhelper.WithShutdown(ml.shutdown)) - require.NoError(t, err) - - ctx := context.Background() - td := ptrace.NewTraces() - - // Below memAllocLimit. - currentMemAlloc = 800 - ml.checkMemLimits() - assert.NoError(t, tp.ConsumeTraces(ctx, td)) - - // Above memAllocLimit. - currentMemAlloc = 1800 - ml.checkMemLimits() - assert.Equal(t, errDataRefused, tp.ConsumeTraces(ctx, td)) - - // Check ballast effect - ml.ballastSize = 1000 - - // Below memAllocLimit accounting for ballast. - currentMemAlloc = 800 + ml.ballastSize - ml.checkMemLimits() - assert.NoError(t, tp.ConsumeTraces(ctx, td)) - - // Above memAllocLimit even accountiing for ballast. - currentMemAlloc = 1800 + ml.ballastSize - ml.checkMemLimits() - assert.Equal(t, errDataRefused, tp.ConsumeTraces(ctx, td)) - - // Restore ballast to default. - ml.ballastSize = 0 - - // Check spike limit - ml.usageChecker.memSpikeLimit = 512 - - // Below memSpikeLimit. - currentMemAlloc = 500 - ml.checkMemLimits() - assert.NoError(t, tp.ConsumeTraces(ctx, td)) - - // Above memSpikeLimit. - currentMemAlloc = 550 - ml.checkMemLimits() - assert.Equal(t, errDataRefused, tp.ConsumeTraces(ctx, td)) - -} - -// TestLogMemoryPressureResponse manipulates results from querying memory and -// check expected side effects. -func TestLogMemoryPressureResponse(t *testing.T) { - var currentMemAlloc uint64 - ml := &memoryLimiter{ - usageChecker: memUsageChecker{ - memAllocLimit: 1024, - }, - mustRefuse: &atomic.Bool{}, - readMemStatsFn: func(ms *runtime.MemStats) { - ms.Alloc = currentMemAlloc - }, - obsrep: newObsReport(t), - logger: zap.NewNop(), - } - lp, err := processorhelper.NewLogsProcessor( - context.Background(), - processortest.NewNopCreateSettings(), - &Config{}, - consumertest.NewNop(), - ml.processLogs, - processorhelper.WithCapabilities(processorCapabilities), - processorhelper.WithShutdown(ml.shutdown)) - require.NoError(t, err) - - ctx := context.Background() - ld := plog.NewLogs() - - // Below memAllocLimit. - currentMemAlloc = 800 - ml.checkMemLimits() - assert.NoError(t, lp.ConsumeLogs(ctx, ld)) - - // Above memAllocLimit. - currentMemAlloc = 1800 - ml.checkMemLimits() - assert.Equal(t, errDataRefused, lp.ConsumeLogs(ctx, ld)) - - // Check ballast effect - ml.ballastSize = 1000 - - // Below memAllocLimit accounting for ballast. - currentMemAlloc = 800 + ml.ballastSize - ml.checkMemLimits() - assert.NoError(t, lp.ConsumeLogs(ctx, ld)) - - // Above memAllocLimit even accountiing for ballast. - currentMemAlloc = 1800 + ml.ballastSize - ml.checkMemLimits() - assert.Equal(t, errDataRefused, lp.ConsumeLogs(ctx, ld)) - - // Restore ballast to default. - ml.ballastSize = 0 - - // Check spike limit - ml.usageChecker.memSpikeLimit = 512 - - // Below memSpikeLimit. - currentMemAlloc = 500 - ml.checkMemLimits() - assert.NoError(t, lp.ConsumeLogs(ctx, ld)) - - // Above memSpikeLimit. - currentMemAlloc = 550 - ml.checkMemLimits() - assert.Equal(t, errDataRefused, lp.ConsumeLogs(ctx, ld)) -} - -func TestGetDecision(t *testing.T) { - t.Run("fixed_limit", func(t *testing.T) { - d, err := getMemUsageChecker(&Config{MemoryLimitMiB: 100, MemorySpikeLimitMiB: 20}, zap.NewNop()) - require.NoError(t, err) - assert.Equal(t, &memUsageChecker{ - memAllocLimit: 100 * mibBytes, - memSpikeLimit: 20 * mibBytes, - }, d) - }) - t.Run("fixed_limit_error", func(t *testing.T) { - d, err := getMemUsageChecker(&Config{MemoryLimitMiB: 20, MemorySpikeLimitMiB: 100}, zap.NewNop()) - require.Error(t, err) - assert.Nil(t, d) - }) - - t.Cleanup(func() { - getMemoryFn = iruntime.TotalMemory - }) - getMemoryFn = func() (uint64, error) { - return 100 * mibBytes, nil - } - t.Run("percentage_limit", func(t *testing.T) { - d, err := getMemUsageChecker(&Config{MemoryLimitPercentage: 50, MemorySpikePercentage: 10}, zap.NewNop()) - require.NoError(t, err) - assert.Equal(t, &memUsageChecker{ - memAllocLimit: 50 * mibBytes, - memSpikeLimit: 10 * mibBytes, - }, d) - }) - t.Run("percentage_limit_error", func(t *testing.T) { - d, err := getMemUsageChecker(&Config{MemoryLimitPercentage: 101, MemorySpikePercentage: 10}, zap.NewNop()) - require.Error(t, err) - assert.Nil(t, d) - d, err = getMemUsageChecker(&Config{MemoryLimitPercentage: 99, MemorySpikePercentage: 101}, zap.NewNop()) - require.Error(t, err) - assert.Nil(t, d) - }) -} - -func TestRefuseDecision(t *testing.T) { - decison1000Limit30Spike30, err := newPercentageMemUsageChecker(1000, 60, 30) - require.NoError(t, err) - decison1000Limit60Spike50, err := newPercentageMemUsageChecker(1000, 60, 50) - require.NoError(t, err) - decison1000Limit40Spike20, err := newPercentageMemUsageChecker(1000, 40, 20) - require.NoError(t, err) - decison1000Limit40Spike60, err := newPercentageMemUsageChecker(1000, 40, 60) - require.Error(t, err) - assert.Nil(t, decison1000Limit40Spike60) - - tests := []struct { - name string - usageChecker memUsageChecker - ms *runtime.MemStats - shouldRefuse bool - }{ - { - name: "should refuse over limit", - usageChecker: *decison1000Limit30Spike30, - ms: &runtime.MemStats{Alloc: 600}, - shouldRefuse: true, - }, - { - name: "should not refuse", - usageChecker: *decison1000Limit30Spike30, - ms: &runtime.MemStats{Alloc: 100}, - shouldRefuse: false, - }, - { - name: "should not refuse spike, fixed usageChecker", - usageChecker: memUsageChecker{ - memAllocLimit: 600, - memSpikeLimit: 500, - }, - ms: &runtime.MemStats{Alloc: 300}, - shouldRefuse: true, - }, - { - name: "should refuse, spike, percentage usageChecker", - usageChecker: *decison1000Limit60Spike50, - ms: &runtime.MemStats{Alloc: 300}, - shouldRefuse: true, - }, - { - name: "should refuse, spike, percentage usageChecker", - usageChecker: *decison1000Limit40Spike20, - ms: &runtime.MemStats{Alloc: 250}, - shouldRefuse: true, - }, - } - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - shouldRefuse := test.usageChecker.aboveSoftLimit(test.ms) - assert.Equal(t, test.shouldRefuse, shouldRefuse) - }) - } -} - -func TestBallastSize(t *testing.T) { - cfg := createDefaultConfig().(*Config) - cfg.CheckInterval = 10 * time.Second - cfg.MemoryLimitMiB = 1024 - got, err := newMemoryLimiter(processortest.NewNopCreateSettings(), cfg) - require.NoError(t, err) - require.NoError(t, got.start(context.Background(), &host{ballastSize: 113})) - assert.Equal(t, uint64(113), got.ballastSize) - require.NoError(t, got.shutdown(context.Background())) -} - -type host struct { - ballastSize uint64 - component.Host -} - -func (h *host) GetExtensions() map[component.ID]component.Component { - ret := make(map[component.ID]component.Component) - ret[component.NewID("ballast")] = &ballastExtension{ballastSize: h.ballastSize} - return ret -} - -type ballastExtension struct { - ballastSize uint64 - component.StartFunc - component.ShutdownFunc -} - -func (be *ballastExtension) GetBallastSize() uint64 { - return be.ballastSize -} - -func newObsReport(t *testing.T) *processorhelper.ObsReport { - set := processorhelper.ObsReportSettings{ - ProcessorID: component.NewID(typeStr), - ProcessorCreateSettings: processortest.NewNopCreateSettings(), - } - set.ProcessorCreateSettings.MetricsLevel = configtelemetry.LevelNone - - proc, err := processorhelper.NewObsReport(set) - require.NoError(t, err) - - return proc -} - func TestNoDataLoss(t *testing.T) { // Create an exporter. exporter := internal.NewMockExporter() @@ -470,7 +53,7 @@ func TestNoDataLoss(t *testing.T) { set := processortest.NewNopCreateSettings() - limiter, err := newMemoryLimiter(set, cfg) + limiter, err := newMemoryLimiterProcessor(set, cfg) require.NoError(t, err) processor, err := processorhelper.NewLogsProcessor(context.Background(), processor.CreateSettings{}, cfg, exporter, @@ -525,3 +108,379 @@ func TestNoDataLoss(t *testing.T) { err = processor.Shutdown(context.Background()) require.NoError(t, err) } + +// TestMetricsMemoryPressureResponse manipulates results from querying memory and +// check expected side effects. +func TestMetricsMemoryPressureResponse(t *testing.T) { + md := pmetric.NewMetrics() + ctx := context.Background() + + tests := []struct { + name string + mlCfg *Config + ballastSize uint64 + memAlloc uint64 + expectError bool + }{ + { + name: "Below memAllocLimit", + mlCfg: &Config{ + CheckInterval: time.Second, + MemoryLimitPercentage: 50, + MemorySpikePercentage: 1, + }, + ballastSize: 0, + memAlloc: 800, + expectError: false, + }, + { + name: "Above memAllocLimit", + mlCfg: &Config{ + CheckInterval: time.Second, + MemoryLimitPercentage: 50, + MemorySpikePercentage: 1, + }, + ballastSize: 0, + memAlloc: 1800, + expectError: true, + }, + { + name: "Below memAllocLimit accounting for ballast", + mlCfg: &Config{ + CheckInterval: time.Second, + MemoryLimitPercentage: 50, + MemorySpikePercentage: 1, + }, + ballastSize: 1000, + memAlloc: 800, + expectError: false, + }, + { + name: "Above memAllocLimit even accounting for ballast", + mlCfg: &Config{ + CheckInterval: time.Second, + MemoryLimitPercentage: 50, + MemorySpikePercentage: 1, + }, + ballastSize: 1000, + memAlloc: 1800, + expectError: true, + }, + { + name: "Below memSpikeLimit", + mlCfg: &Config{ + CheckInterval: time.Second, + MemoryLimitPercentage: 50, + MemorySpikePercentage: 10, + }, + ballastSize: 0, + memAlloc: 800, + expectError: false, + }, + { + name: "Above memSpikeLimit", + mlCfg: &Config{ + CheckInterval: time.Second, + MemoryLimitPercentage: 50, + MemorySpikePercentage: 11, + }, + ballastSize: 0, + memAlloc: 800, + expectError: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + memorylimiter.GetMemoryFn = totalMemory + memorylimiter.ReadMemStatsFn = func(ms *runtime.MemStats) { + ms.Alloc = tt.memAlloc + tt.ballastSize + } + + ml, err := newMemoryLimiterProcessor(processortest.NewNopCreateSettings(), tt.mlCfg) + require.NoError(t, err) + mp, err := processorhelper.NewMetricsProcessor( + context.Background(), + processortest.NewNopCreateSettings(), + tt.mlCfg, + consumertest.NewNop(), + ml.processMetrics, + processorhelper.WithCapabilities(processorCapabilities), + processorhelper.WithStart(ml.start), + processorhelper.WithShutdown(ml.shutdown)) + require.NoError(t, err) + + assert.NoError(t, mp.Start(ctx, &host{ballastSize: tt.ballastSize})) + ml.memlimiter.CheckMemLimits() + err = mp.ConsumeMetrics(ctx, md) + if tt.expectError { + assert.Equal(t, memorylimiter.ErrDataRefused, err) + } else { + assert.NoError(t, err) + } + assert.NoError(t, mp.Shutdown(ctx)) + }) + } + t.Cleanup(func() { + memorylimiter.GetMemoryFn = iruntime.TotalMemory + memorylimiter.ReadMemStatsFn = runtime.ReadMemStats + }) +} + +// TestTraceMemoryPressureResponse manipulates results from querying memory and +// check expected side effects. +func TestTraceMemoryPressureResponse(t *testing.T) { + td := ptrace.NewTraces() + ctx := context.Background() + + tests := []struct { + name string + mlCfg *Config + ballastSize uint64 + memAlloc uint64 + expectError bool + }{ + { + name: "Below memAllocLimit", + mlCfg: &Config{ + CheckInterval: time.Second, + MemoryLimitPercentage: 50, + MemorySpikePercentage: 1, + }, + ballastSize: 0, + memAlloc: 800, + expectError: false, + }, + { + name: "Above memAllocLimit", + mlCfg: &Config{ + CheckInterval: time.Second, + MemoryLimitPercentage: 50, + MemorySpikePercentage: 1, + }, + ballastSize: 0, + memAlloc: 1800, + expectError: true, + }, + { + name: "Below memAllocLimit accounting for ballast", + mlCfg: &Config{ + CheckInterval: time.Second, + MemoryLimitPercentage: 50, + MemorySpikePercentage: 1, + }, + ballastSize: 1000, + memAlloc: 800, + expectError: false, + }, + { + name: "Above memAllocLimit even accounting for ballast", + mlCfg: &Config{ + CheckInterval: time.Second, + MemoryLimitPercentage: 50, + MemorySpikePercentage: 1, + }, + ballastSize: 1000, + memAlloc: 1800, + expectError: true, + }, + { + name: "Below memSpikeLimit", + mlCfg: &Config{ + CheckInterval: time.Second, + MemoryLimitPercentage: 50, + MemorySpikePercentage: 10, + }, + ballastSize: 0, + memAlloc: 800, + expectError: false, + }, + { + name: "Above memSpikeLimit", + mlCfg: &Config{ + CheckInterval: time.Second, + MemoryLimitPercentage: 50, + MemorySpikePercentage: 11, + }, + ballastSize: 0, + memAlloc: 800, + expectError: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + memorylimiter.GetMemoryFn = totalMemory + memorylimiter.ReadMemStatsFn = func(ms *runtime.MemStats) { + ms.Alloc = tt.memAlloc + tt.ballastSize + } + + ml, err := newMemoryLimiterProcessor(processortest.NewNopCreateSettings(), tt.mlCfg) + require.NoError(t, err) + tp, err := processorhelper.NewTracesProcessor( + context.Background(), + processortest.NewNopCreateSettings(), + tt.mlCfg, + consumertest.NewNop(), + ml.processTraces, + processorhelper.WithCapabilities(processorCapabilities), + processorhelper.WithStart(ml.start), + processorhelper.WithShutdown(ml.shutdown)) + require.NoError(t, err) + + assert.NoError(t, tp.Start(ctx, &host{ballastSize: tt.ballastSize})) + ml.memlimiter.CheckMemLimits() + err = tp.ConsumeTraces(ctx, td) + if tt.expectError { + assert.Equal(t, memorylimiter.ErrDataRefused, err) + } else { + assert.NoError(t, err) + } + assert.NoError(t, tp.Shutdown(ctx)) + }) + } + t.Cleanup(func() { + memorylimiter.GetMemoryFn = iruntime.TotalMemory + memorylimiter.ReadMemStatsFn = runtime.ReadMemStats + }) +} + +// TestLogMemoryPressureResponse manipulates results from querying memory and +// check expected side effects. +func TestLogMemoryPressureResponse(t *testing.T) { + ld := plog.NewLogs() + ctx := context.Background() + + tests := []struct { + name string + mlCfg *Config + ballastSize uint64 + memAlloc uint64 + expectError bool + }{ + { + name: "Below memAllocLimit", + mlCfg: &Config{ + CheckInterval: time.Second, + MemoryLimitPercentage: 50, + MemorySpikePercentage: 1, + }, + ballastSize: 0, + memAlloc: 800, + expectError: false, + }, + { + name: "Above memAllocLimit", + mlCfg: &Config{ + CheckInterval: time.Second, + MemoryLimitPercentage: 50, + MemorySpikePercentage: 1, + }, + ballastSize: 0, + memAlloc: 1800, + expectError: true, + }, + { + name: "Below memAllocLimit accounting for ballast", + mlCfg: &Config{ + CheckInterval: time.Second, + MemoryLimitPercentage: 50, + MemorySpikePercentage: 1, + }, + ballastSize: 1000, + memAlloc: 800, + expectError: false, + }, + { + name: "Above memAllocLimit even accounting for ballast", + mlCfg: &Config{ + CheckInterval: time.Second, + MemoryLimitPercentage: 50, + MemorySpikePercentage: 1, + }, + ballastSize: 1000, + memAlloc: 1800, + expectError: true, + }, + { + name: "Below memSpikeLimit", + mlCfg: &Config{ + CheckInterval: time.Second, + MemoryLimitPercentage: 50, + MemorySpikePercentage: 10, + }, + ballastSize: 0, + memAlloc: 800, + expectError: false, + }, + { + name: "Above memSpikeLimit", + mlCfg: &Config{ + CheckInterval: time.Second, + MemoryLimitPercentage: 50, + MemorySpikePercentage: 11, + }, + ballastSize: 0, + memAlloc: 800, + expectError: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + memorylimiter.GetMemoryFn = totalMemory + memorylimiter.ReadMemStatsFn = func(ms *runtime.MemStats) { + ms.Alloc = tt.memAlloc + tt.ballastSize + } + + ml, err := newMemoryLimiterProcessor(processortest.NewNopCreateSettings(), tt.mlCfg) + require.NoError(t, err) + tp, err := processorhelper.NewLogsProcessor( + context.Background(), + processortest.NewNopCreateSettings(), + tt.mlCfg, + consumertest.NewNop(), + ml.processLogs, + processorhelper.WithCapabilities(processorCapabilities), + processorhelper.WithStart(ml.start), + processorhelper.WithShutdown(ml.shutdown)) + require.NoError(t, err) + + assert.NoError(t, tp.Start(ctx, &host{ballastSize: tt.ballastSize})) + ml.memlimiter.CheckMemLimits() + err = tp.ConsumeLogs(ctx, ld) + if tt.expectError { + assert.Equal(t, memorylimiter.ErrDataRefused, err) + } else { + assert.NoError(t, err) + } + assert.NoError(t, tp.Shutdown(ctx)) + }) + } + t.Cleanup(func() { + memorylimiter.GetMemoryFn = iruntime.TotalMemory + memorylimiter.ReadMemStatsFn = runtime.ReadMemStats + }) +} + +type host struct { + ballastSize uint64 + component.Host +} + +func (h *host) GetExtensions() map[component.ID]component.Component { + ret := make(map[component.ID]component.Component) + ret[component.MustNewID("ballast")] = &ballastExtension{ballastSize: h.ballastSize} + return ret +} + +type ballastExtension struct { + ballastSize uint64 + component.StartFunc + component.ShutdownFunc +} + +func (be *ballastExtension) GetBallastSize() uint64 { + return be.ballastSize +} + +func totalMemory() (uint64, error) { + return uint64(2048), nil +} diff --git a/processor/memorylimiterprocessor/metadata.yaml b/processor/memorylimiterprocessor/metadata.yaml new file mode 100644 index 00000000000..bc9e1829149 --- /dev/null +++ b/processor/memorylimiterprocessor/metadata.yaml @@ -0,0 +1,7 @@ +type: memory_limiter + +status: + class: processor + stability: + beta: [traces, metrics, logs] + distributions: [core, contrib] diff --git a/processor/memorylimiterprocessor/package_test.go b/processor/memorylimiterprocessor/package_test.go new file mode 100644 index 00000000000..77bee80493d --- /dev/null +++ b/processor/memorylimiterprocessor/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package memorylimiterprocessor + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/processor/package_test.go b/processor/package_test.go new file mode 100644 index 00000000000..b6dea1fee4c --- /dev/null +++ b/processor/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package processor + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/processor/processor.go b/processor/processor.go index 5bb3f5953cb..98feba69a57 100644 --- a/processor/processor.go +++ b/processor/processor.go @@ -5,6 +5,7 @@ package processor // import "go.opentelemetry.io/collector/processor" import ( "context" + "errors" "fmt" "go.uber.org/zap" @@ -13,6 +14,10 @@ import ( "go.opentelemetry.io/collector/consumer" ) +var ( + errNilNextConsumer = errors.New("nil next Consumer") +) + // Traces is a processor that can consume traces. type Traces interface { component.Component @@ -229,6 +234,9 @@ func NewBuilder(cfgs map[component.ID]component.Config, factories map[component. // CreateTraces creates a Traces processor based on the settings and config. func (b *Builder) CreateTraces(ctx context.Context, set CreateSettings, next consumer.Traces) (Traces, error) { + if next == nil { + return nil, errNilNextConsumer + } cfg, existsCfg := b.cfgs[set.ID] if !existsCfg { return nil, fmt.Errorf("processor %q is not configured", set.ID) @@ -245,6 +253,9 @@ func (b *Builder) CreateTraces(ctx context.Context, set CreateSettings, next con // CreateMetrics creates a Metrics processor based on the settings and config. func (b *Builder) CreateMetrics(ctx context.Context, set CreateSettings, next consumer.Metrics) (Metrics, error) { + if next == nil { + return nil, errNilNextConsumer + } cfg, existsCfg := b.cfgs[set.ID] if !existsCfg { return nil, fmt.Errorf("processor %q is not configured", set.ID) @@ -261,6 +272,9 @@ func (b *Builder) CreateMetrics(ctx context.Context, set CreateSettings, next co // CreateLogs creates a Logs processor based on the settings and config. func (b *Builder) CreateLogs(ctx context.Context, set CreateSettings, next consumer.Logs) (Logs, error) { + if next == nil { + return nil, errNilNextConsumer + } cfg, existsCfg := b.cfgs[set.ID] if !existsCfg { return nil, fmt.Errorf("processor %q is not configured", set.ID) diff --git a/processor/processor_test.go b/processor/processor_test.go index 11d70512186..83207ba6955 100644 --- a/processor/processor_test.go +++ b/processor/processor_test.go @@ -17,43 +17,43 @@ import ( ) func TestNewFactory(t *testing.T) { - const typeStr = "test" + var testType = component.MustNewType("test") defaultCfg := struct{}{} factory := NewFactory( - typeStr, + testType, func() component.Config { return &defaultCfg }) - assert.EqualValues(t, typeStr, factory.Type()) + assert.EqualValues(t, testType, factory.Type()) assert.EqualValues(t, &defaultCfg, factory.CreateDefaultConfig()) - _, err := factory.CreateTracesProcessor(context.Background(), CreateSettings{}, &defaultCfg, nil) + _, err := factory.CreateTracesProcessor(context.Background(), CreateSettings{}, &defaultCfg, consumertest.NewNop()) assert.Error(t, err) - _, err = factory.CreateMetricsProcessor(context.Background(), CreateSettings{}, &defaultCfg, nil) + _, err = factory.CreateMetricsProcessor(context.Background(), CreateSettings{}, &defaultCfg, consumertest.NewNop()) assert.Error(t, err) - _, err = factory.CreateLogsProcessor(context.Background(), CreateSettings{}, &defaultCfg, nil) + _, err = factory.CreateLogsProcessor(context.Background(), CreateSettings{}, &defaultCfg, consumertest.NewNop()) assert.Error(t, err) } func TestNewFactoryWithOptions(t *testing.T) { - const typeStr = "test" + var testType = component.MustNewType("test") defaultCfg := struct{}{} factory := NewFactory( - typeStr, + testType, func() component.Config { return &defaultCfg }, WithTraces(createTraces, component.StabilityLevelAlpha), WithMetrics(createMetrics, component.StabilityLevelBeta), WithLogs(createLogs, component.StabilityLevelUnmaintained)) - assert.EqualValues(t, typeStr, factory.Type()) + assert.EqualValues(t, testType, factory.Type()) assert.EqualValues(t, &defaultCfg, factory.CreateDefaultConfig()) assert.Equal(t, component.StabilityLevelAlpha, factory.TracesProcessorStability()) - _, err := factory.CreateTracesProcessor(context.Background(), CreateSettings{}, &defaultCfg, nil) + _, err := factory.CreateTracesProcessor(context.Background(), CreateSettings{}, &defaultCfg, consumertest.NewNop()) assert.NoError(t, err) assert.Equal(t, component.StabilityLevelBeta, factory.MetricsProcessorStability()) - _, err = factory.CreateMetricsProcessor(context.Background(), CreateSettings{}, &defaultCfg, nil) + _, err = factory.CreateMetricsProcessor(context.Background(), CreateSettings{}, &defaultCfg, consumertest.NewNop()) assert.NoError(t, err) assert.Equal(t, component.StabilityLevelUnmaintained, factory.LogsProcessorStability()) - _, err = factory.CreateLogsProcessor(context.Background(), CreateSettings{}, &defaultCfg, nil) + _, err = factory.CreateLogsProcessor(context.Background(), CreateSettings{}, &defaultCfg, consumertest.NewNop()) assert.NoError(t, err) } @@ -64,8 +64,8 @@ func TestMakeFactoryMap(t *testing.T) { out map[component.Type]Factory } - p1 := NewFactory("p1", nil) - p2 := NewFactory("p2", nil) + p1 := NewFactory(component.MustNewType("p1"), nil) + p2 := NewFactory(component.MustNewType("p2"), nil) testCases := []testCase{ { name: "different names", @@ -77,7 +77,7 @@ func TestMakeFactoryMap(t *testing.T) { }, { name: "same name", - in: []Factory{p1, p2, NewFactory("p1", nil)}, + in: []Factory{p1, p2, NewFactory(component.MustNewType("p1"), nil)}, }, } @@ -98,9 +98,9 @@ func TestMakeFactoryMap(t *testing.T) { func TestBuilder(t *testing.T) { defaultCfg := struct{}{} factories, err := MakeFactoryMap([]Factory{ - NewFactory("err", nil), + NewFactory(component.MustNewType("err"), nil), NewFactory( - "all", + component.MustNewType("all"), func() component.Config { return &defaultCfg }, WithTraces(createTraces, component.StabilityLevelDevelopment), WithMetrics(createMetrics, component.StabilityLevelAlpha), @@ -110,27 +110,50 @@ func TestBuilder(t *testing.T) { require.NoError(t, err) testCases := []struct { - name string - id component.ID - err string + name string + id component.ID + err string + nextTraces consumer.Traces + nextLogs consumer.Logs + nextMetrics consumer.Metrics }{ { - name: "unknown", - id: component.NewID("unknown"), - err: "processor factory not available for: \"unknown\"", + name: "unknown", + id: component.MustNewID("unknown"), + err: "processor factory not available for: \"unknown\"", + nextTraces: consumertest.NewNop(), + nextLogs: consumertest.NewNop(), + nextMetrics: consumertest.NewNop(), + }, + { + name: "err", + id: component.MustNewID("err"), + err: "telemetry type is not supported", + nextTraces: consumertest.NewNop(), + nextLogs: consumertest.NewNop(), + nextMetrics: consumertest.NewNop(), }, { - name: "err", - id: component.NewID("err"), - err: "telemetry type is not supported", + name: "all", + id: component.MustNewID("all"), + nextTraces: consumertest.NewNop(), + nextLogs: consumertest.NewNop(), + nextMetrics: consumertest.NewNop(), }, { - name: "all", - id: component.NewID("all"), + name: "all/named", + id: component.MustNewIDWithName("all", "named"), + nextTraces: consumertest.NewNop(), + nextLogs: consumertest.NewNop(), + nextMetrics: consumertest.NewNop(), }, { - name: "all/named", - id: component.NewIDWithName("all", "named"), + name: "no next consumer", + id: component.MustNewID("unknown"), + err: "nil next Consumer", + nextTraces: nil, + nextLogs: nil, + nextMetrics: nil, }, } @@ -139,7 +162,7 @@ func TestBuilder(t *testing.T) { cfgs := map[component.ID]component.Config{tt.id: defaultCfg} b := NewBuilder(cfgs, factories) - te, err := b.CreateTraces(context.Background(), createSettings(tt.id), nil) + te, err := b.CreateTraces(context.Background(), createSettings(tt.id), tt.nextTraces) if tt.err != "" { assert.EqualError(t, err, tt.err) assert.Nil(t, te) @@ -148,7 +171,7 @@ func TestBuilder(t *testing.T) { assert.Equal(t, nopInstance, te) } - me, err := b.CreateMetrics(context.Background(), createSettings(tt.id), nil) + me, err := b.CreateMetrics(context.Background(), createSettings(tt.id), tt.nextMetrics) if tt.err != "" { assert.EqualError(t, err, tt.err) assert.Nil(t, me) @@ -157,7 +180,7 @@ func TestBuilder(t *testing.T) { assert.Equal(t, nopInstance, me) } - le, err := b.CreateLogs(context.Background(), createSettings(tt.id), nil) + le, err := b.CreateLogs(context.Background(), createSettings(tt.id), tt.nextLogs) if tt.err != "" { assert.EqualError(t, err, tt.err) assert.Nil(t, le) @@ -173,7 +196,7 @@ func TestBuilderMissingConfig(t *testing.T) { defaultCfg := struct{}{} factories, err := MakeFactoryMap([]Factory{ NewFactory( - "all", + component.MustNewType("all"), func() component.Config { return &defaultCfg }, WithTraces(createTraces, component.StabilityLevelDevelopment), WithMetrics(createMetrics, component.StabilityLevelAlpha), @@ -184,30 +207,30 @@ func TestBuilderMissingConfig(t *testing.T) { require.NoError(t, err) bErr := NewBuilder(map[component.ID]component.Config{}, factories) - missingID := component.NewIDWithName("all", "missing") + missingID := component.MustNewIDWithName("all", "missing") - te, err := bErr.CreateTraces(context.Background(), createSettings(missingID), nil) + te, err := bErr.CreateTraces(context.Background(), createSettings(missingID), consumertest.NewNop()) assert.EqualError(t, err, "processor \"all/missing\" is not configured") assert.Nil(t, te) - me, err := bErr.CreateMetrics(context.Background(), createSettings(missingID), nil) + me, err := bErr.CreateMetrics(context.Background(), createSettings(missingID), consumertest.NewNop()) assert.EqualError(t, err, "processor \"all/missing\" is not configured") assert.Nil(t, me) - le, err := bErr.CreateLogs(context.Background(), createSettings(missingID), nil) + le, err := bErr.CreateLogs(context.Background(), createSettings(missingID), consumertest.NewNop()) assert.EqualError(t, err, "processor \"all/missing\" is not configured") assert.Nil(t, le) } func TestBuilderFactory(t *testing.T) { - factories, err := MakeFactoryMap([]Factory{NewFactory("foo", nil)}...) + factories, err := MakeFactoryMap([]Factory{NewFactory(component.MustNewType("foo"), nil)}...) require.NoError(t, err) - cfgs := map[component.ID]component.Config{component.NewID("foo"): struct{}{}} + cfgs := map[component.ID]component.Config{component.MustNewID("foo"): struct{}{}} b := NewBuilder(cfgs, factories) - assert.NotNil(t, b.Factory(component.NewID("foo").Type())) - assert.Nil(t, b.Factory(component.NewID("bar").Type())) + assert.NotNil(t, b.Factory(component.MustNewID("foo").Type())) + assert.Nil(t, b.Factory(component.MustNewID("bar").Type())) } var nopInstance = &nopProcessor{ diff --git a/processor/processorhelper/logs.go b/processor/processorhelper/logs.go index b392702584a..ade2f45a385 100644 --- a/processor/processorhelper/logs.go +++ b/processor/processorhelper/logs.go @@ -39,10 +39,6 @@ func NewLogsProcessor( return nil, errors.New("nil logsFunc") } - if nextConsumer == nil { - return nil, component.ErrNilNextConsumer - } - eventOptions := spanAttributes(set.ID) bs := fromOptions(options) logsConsumer, err := consumer.NewLogs(func(ctx context.Context, ld plog.Logs) error { diff --git a/processor/processorhelper/logs_test.go b/processor/processorhelper/logs_test.go index 383459dc689..0fe43773309 100644 --- a/processor/processorhelper/logs_test.go +++ b/processor/processorhelper/logs_test.go @@ -47,9 +47,6 @@ func TestNewLogsProcessor_WithOptions(t *testing.T) { func TestNewLogsProcessor_NilRequiredFields(t *testing.T) { _, err := NewLogsProcessor(context.Background(), processortest.NewNopCreateSettings(), &testLogsCfg, consumertest.NewNop(), nil) assert.Error(t, err) - - _, err = NewLogsProcessor(context.Background(), processortest.NewNopCreateSettings(), &testLogsCfg, nil, newTestLProcessor(nil)) - assert.Equal(t, component.ErrNilNextConsumer, err) } func TestNewLogsProcessor_ProcessLogError(t *testing.T) { diff --git a/processor/processorhelper/metrics.go b/processor/processorhelper/metrics.go index 08168c460d5..ac3802722d0 100644 --- a/processor/processorhelper/metrics.go +++ b/processor/processorhelper/metrics.go @@ -39,10 +39,6 @@ func NewMetricsProcessor( return nil, errors.New("nil metricsFunc") } - if nextConsumer == nil { - return nil, component.ErrNilNextConsumer - } - eventOptions := spanAttributes(set.ID) bs := fromOptions(options) metricsConsumer, err := consumer.NewMetrics(func(ctx context.Context, md pmetric.Metrics) error { diff --git a/processor/processorhelper/metrics_test.go b/processor/processorhelper/metrics_test.go index 19bd1b159a0..b965c4d45c3 100644 --- a/processor/processorhelper/metrics_test.go +++ b/processor/processorhelper/metrics_test.go @@ -47,9 +47,6 @@ func TestNewMetricsProcessor_WithOptions(t *testing.T) { func TestNewMetricsProcessor_NilRequiredFields(t *testing.T) { _, err := NewMetricsProcessor(context.Background(), processortest.NewNopCreateSettings(), &testMetricsCfg, consumertest.NewNop(), nil) assert.Error(t, err) - - _, err = NewMetricsProcessor(context.Background(), processortest.NewNopCreateSettings(), &testMetricsCfg, nil, newTestMProcessor(nil)) - assert.Equal(t, component.ErrNilNextConsumer, err) } func TestNewMetricsProcessor_ProcessMetricsError(t *testing.T) { diff --git a/processor/processorhelper/obsreport.go b/processor/processorhelper/obsreport.go index 66b53eb0f9f..9d1188f1408 100644 --- a/processor/processorhelper/obsreport.go +++ b/processor/processorhelper/obsreport.go @@ -5,20 +5,15 @@ package processorhelper // import "go.opentelemetry.io/collector/processor/proce import ( "context" - "errors" "strings" - "go.opencensus.io/stats" - "go.opencensus.io/tag" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/metric" - sdkmetric "go.opentelemetry.io/otel/sdk/metric" "go.uber.org/multierr" "go.uber.org/zap" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" - "go.opentelemetry.io/collector/internal/obsreportconfig" "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" "go.opentelemetry.io/collector/processor" ) @@ -43,13 +38,11 @@ func BuildCustomMetricName(configType, metric string) string { // ObsReport is a helper to add observability to a processor. type ObsReport struct { - level configtelemetry.Level - mutators []tag.Mutator + level configtelemetry.Level logger *zap.Logger - useOtelForMetrics bool - otelAttrs []attribute.KeyValue + otelAttrs []attribute.KeyValue acceptedSpansCounter metric.Int64Counter refusedSpansCounter metric.Int64Counter @@ -70,25 +63,19 @@ type ObsReportSettings struct { // NewObsReport creates a new Processor. func NewObsReport(cfg ObsReportSettings) (*ObsReport, error) { - return newObsReport(cfg, obsreportconfig.UseOtelForInternalMetricsfeatureGate.IsEnabled()) + return newObsReport(cfg) } -func newObsReport(cfg ObsReportSettings, useOtel bool) (*ObsReport, error) { +func newObsReport(cfg ObsReportSettings) (*ObsReport, error) { report := &ObsReport{ - level: cfg.ProcessorCreateSettings.MetricsLevel, - mutators: []tag.Mutator{tag.Upsert(obsmetrics.TagKeyProcessor, cfg.ProcessorID.String(), tag.WithTTL(tag.TTLNoPropagation))}, - logger: cfg.ProcessorCreateSettings.Logger, - useOtelForMetrics: useOtel, + level: cfg.ProcessorCreateSettings.MetricsLevel, + logger: cfg.ProcessorCreateSettings.Logger, otelAttrs: []attribute.KeyValue{ attribute.String(obsmetrics.ProcessorKey, cfg.ProcessorID.String()), }, } - // ignore instrument name error as per workaround in https://github.com/open-telemetry/opentelemetry-collector/issues/8346 - // if err := proc.createOtelMetrics(cfg); err != nil { - // return nil, err - // } - if err := report.createOtelMetrics(cfg); err != nil && !errors.Is(err, sdkmetric.ErrInstrumentName) { + if err := report.createOtelMetrics(cfg); err != nil { return nil, err } @@ -96,9 +83,6 @@ func newObsReport(cfg ObsReportSettings, useOtel bool) (*ObsReport, error) { } func (or *ObsReport) createOtelMetrics(cfg ObsReportSettings) error { - if !or.useOtelForMetrics { - return nil - } meter := cfg.ProcessorCreateSettings.MeterProvider.Meter(processorScope) var errors, err error @@ -168,7 +152,7 @@ func (or *ObsReport) createOtelMetrics(cfg ObsReportSettings) error { return errors } -func (or *ObsReport) recordWithOtel(ctx context.Context, dataType component.DataType, accepted, refused, dropped int64) { +func (or *ObsReport) recordData(ctx context.Context, dataType component.DataType, accepted, refused, dropped int64) { var acceptedCount, refusedCount, droppedCount metric.Int64Counter switch dataType { case component.DataTypeTraces: @@ -190,42 +174,6 @@ func (or *ObsReport) recordWithOtel(ctx context.Context, dataType component.Data droppedCount.Add(ctx, dropped, metric.WithAttributes(or.otelAttrs...)) } -func (or *ObsReport) recordWithOC(ctx context.Context, dataType component.DataType, accepted, refused, dropped int64) { - var acceptedMeasure, refusedMeasure, droppedMeasure *stats.Int64Measure - - switch dataType { - case component.DataTypeTraces: - acceptedMeasure = obsmetrics.ProcessorAcceptedSpans - refusedMeasure = obsmetrics.ProcessorRefusedSpans - droppedMeasure = obsmetrics.ProcessorDroppedSpans - case component.DataTypeMetrics: - acceptedMeasure = obsmetrics.ProcessorAcceptedMetricPoints - refusedMeasure = obsmetrics.ProcessorRefusedMetricPoints - droppedMeasure = obsmetrics.ProcessorDroppedMetricPoints - case component.DataTypeLogs: - acceptedMeasure = obsmetrics.ProcessorAcceptedLogRecords - refusedMeasure = obsmetrics.ProcessorRefusedLogRecords - droppedMeasure = obsmetrics.ProcessorDroppedLogRecords - } - - // ignore the error for now; should not happen - _ = stats.RecordWithTags( - ctx, - or.mutators, - acceptedMeasure.M(accepted), - refusedMeasure.M(refused), - droppedMeasure.M(dropped), - ) -} - -func (or *ObsReport) recordData(ctx context.Context, dataType component.DataType, accepted, refused, dropped int64) { - if or.useOtelForMetrics { - or.recordWithOtel(ctx, dataType, accepted, refused, dropped) - } else { - or.recordWithOC(ctx, dataType, accepted, refused, dropped) - } -} - // TracesAccepted reports that the trace data was accepted. func (or *ObsReport) TracesAccepted(ctx context.Context, numSpans int) { if or.level != configtelemetry.LevelNone { diff --git a/processor/processorhelper/obsreport_test.go b/processor/processorhelper/obsreport_test.go index cd0ea4a8f26..2cd4500e299 100644 --- a/processor/processorhelper/obsreport_test.go +++ b/processor/processorhelper/obsreport_test.go @@ -11,23 +11,23 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/obsreport/obsreporttest" - "go.opentelemetry.io/collector/processor/processortest" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/processor" ) var ( - processorID = component.NewID("fakeProcessor") + processorID = component.MustNewID("fakeProcessor") ) func TestProcessorTraceData(t *testing.T) { - testTelemetry(t, processorID, func(t *testing.T, tt obsreporttest.TestTelemetry, useOtel bool) { + testTelemetry(t, processorID, func(t *testing.T, tt componenttest.TestTelemetry) { const acceptedSpans = 27 const refusedSpans = 19 const droppedSpans = 13 obsrep, err := newObsReport(ObsReportSettings{ ProcessorID: processorID, - ProcessorCreateSettings: processortest.NewCreateSettings(processorID, tt.TelemetrySettings), - }, useOtel) + ProcessorCreateSettings: processor.CreateSettings{ID: processorID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, + }) require.NoError(t, err) obsrep.TracesAccepted(context.Background(), acceptedSpans) obsrep.TracesRefused(context.Background(), refusedSpans) @@ -38,15 +38,15 @@ func TestProcessorTraceData(t *testing.T) { } func TestProcessorMetricsData(t *testing.T) { - testTelemetry(t, processorID, func(t *testing.T, tt obsreporttest.TestTelemetry, useOtel bool) { + testTelemetry(t, processorID, func(t *testing.T, tt componenttest.TestTelemetry) { const acceptedPoints = 29 const refusedPoints = 11 const droppedPoints = 17 obsrep, err := newObsReport(ObsReportSettings{ ProcessorID: processorID, - ProcessorCreateSettings: processortest.NewCreateSettings(processorID, tt.TelemetrySettings), - }, useOtel) + ProcessorCreateSettings: processor.CreateSettings{ID: processorID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, + }) require.NoError(t, err) obsrep.MetricsAccepted(context.Background(), acceptedPoints) obsrep.MetricsRefused(context.Background(), refusedPoints) @@ -79,15 +79,15 @@ func TestBuildProcessorCustomMetricName(t *testing.T) { } func TestProcessorLogRecords(t *testing.T) { - testTelemetry(t, processorID, func(t *testing.T, tt obsreporttest.TestTelemetry, useOtel bool) { + testTelemetry(t, processorID, func(t *testing.T, tt componenttest.TestTelemetry) { const acceptedRecords = 29 const refusedRecords = 11 const droppedRecords = 17 obsrep, err := newObsReport(ObsReportSettings{ ProcessorID: processorID, - ProcessorCreateSettings: processortest.NewCreateSettings(processorID, tt.TelemetrySettings), - }, useOtel) + ProcessorCreateSettings: processor.CreateSettings{ID: processorID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, + }) require.NoError(t, err) obsrep.LogsAccepted(context.Background(), acceptedRecords) obsrep.LogsRefused(context.Background(), refusedRecords) @@ -97,20 +97,87 @@ func TestProcessorLogRecords(t *testing.T) { }) } -func testTelemetry(t *testing.T, id component.ID, testFunc func(t *testing.T, tt obsreporttest.TestTelemetry, useOtel bool)) { - t.Run("WithOC", func(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(id) - require.NoError(t, err) - t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) +func TestCheckProcessorTracesViews(t *testing.T) { + tt, err := componenttest.SetupTelemetry(processorID) + require.NoError(t, err) + t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) + + por, err := NewObsReport(ObsReportSettings{ + ProcessorID: processorID, + ProcessorCreateSettings: processor.CreateSettings{ID: processorID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, + }) + assert.NoError(t, err) + + por.TracesAccepted(context.Background(), 7) + por.TracesRefused(context.Background(), 8) + por.TracesDropped(context.Background(), 9) + + assert.NoError(t, tt.CheckProcessorTraces(7, 8, 9)) + assert.Error(t, tt.CheckProcessorTraces(0, 0, 0)) + assert.Error(t, tt.CheckProcessorTraces(7, 0, 0)) + assert.Error(t, tt.CheckProcessorTraces(7, 8, 0)) + assert.Error(t, tt.CheckProcessorTraces(7, 0, 9)) + assert.Error(t, tt.CheckProcessorTraces(0, 8, 0)) + assert.Error(t, tt.CheckProcessorTraces(0, 8, 9)) + assert.Error(t, tt.CheckProcessorTraces(0, 0, 9)) +} + +func TestCheckProcessorMetricsViews(t *testing.T) { + tt, err := componenttest.SetupTelemetry(processorID) + require.NoError(t, err) + t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - testFunc(t, tt, false) + por, err := NewObsReport(ObsReportSettings{ + ProcessorID: processorID, + ProcessorCreateSettings: processor.CreateSettings{ID: processorID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, }) + assert.NoError(t, err) + + por.MetricsAccepted(context.Background(), 7) + por.MetricsRefused(context.Background(), 8) + por.MetricsDropped(context.Background(), 9) + + assert.NoError(t, tt.CheckProcessorMetrics(7, 8, 9)) + assert.Error(t, tt.CheckProcessorMetrics(0, 0, 0)) + assert.Error(t, tt.CheckProcessorMetrics(7, 0, 0)) + assert.Error(t, tt.CheckProcessorMetrics(7, 8, 0)) + assert.Error(t, tt.CheckProcessorMetrics(7, 0, 9)) + assert.Error(t, tt.CheckProcessorMetrics(0, 8, 0)) + assert.Error(t, tt.CheckProcessorMetrics(0, 8, 9)) + assert.Error(t, tt.CheckProcessorMetrics(0, 0, 9)) +} + +func TestCheckProcessorLogViews(t *testing.T) { + tt, err := componenttest.SetupTelemetry(processorID) + require.NoError(t, err) + t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) + + por, err := NewObsReport(ObsReportSettings{ + ProcessorID: processorID, + ProcessorCreateSettings: processor.CreateSettings{ID: processorID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, + }) + assert.NoError(t, err) + + por.LogsAccepted(context.Background(), 7) + por.LogsRefused(context.Background(), 8) + por.LogsDropped(context.Background(), 9) + + assert.NoError(t, tt.CheckProcessorLogs(7, 8, 9)) + assert.Error(t, tt.CheckProcessorLogs(0, 0, 0)) + assert.Error(t, tt.CheckProcessorLogs(7, 0, 0)) + assert.Error(t, tt.CheckProcessorLogs(7, 8, 0)) + assert.Error(t, tt.CheckProcessorLogs(7, 0, 9)) + assert.Error(t, tt.CheckProcessorLogs(0, 8, 0)) + assert.Error(t, tt.CheckProcessorLogs(0, 8, 9)) + assert.Error(t, tt.CheckProcessorLogs(0, 0, 9)) +} +func testTelemetry(t *testing.T, id component.ID, testFunc func(t *testing.T, tt componenttest.TestTelemetry)) { t.Run("WithOTel", func(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(id) + tt, err := componenttest.SetupTelemetry(id) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - testFunc(t, tt, true) + testFunc(t, tt) }) } diff --git a/processor/processorhelper/package_test.go b/processor/processorhelper/package_test.go new file mode 100644 index 00000000000..e9823cee56e --- /dev/null +++ b/processor/processorhelper/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package processorhelper + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/processor/processorhelper/traces.go b/processor/processorhelper/traces.go index 703fa98e076..578f65c7efa 100644 --- a/processor/processorhelper/traces.go +++ b/processor/processorhelper/traces.go @@ -39,10 +39,6 @@ func NewTracesProcessor( return nil, errors.New("nil tracesFunc") } - if nextConsumer == nil { - return nil, component.ErrNilNextConsumer - } - eventOptions := spanAttributes(set.ID) bs := fromOptions(options) traceConsumer, err := consumer.NewTraces(func(ctx context.Context, td ptrace.Traces) error { diff --git a/processor/processorhelper/traces_test.go b/processor/processorhelper/traces_test.go index 1ba4f6d1951..f2a59473a44 100644 --- a/processor/processorhelper/traces_test.go +++ b/processor/processorhelper/traces_test.go @@ -47,9 +47,6 @@ func TestNewTracesProcessor_WithOptions(t *testing.T) { func TestNewTracesProcessor_NilRequiredFields(t *testing.T) { _, err := NewTracesProcessor(context.Background(), processortest.NewNopCreateSettings(), &testTracesCfg, consumertest.NewNop(), nil) assert.Error(t, err) - - _, err = NewTracesProcessor(context.Background(), processortest.NewNopCreateSettings(), &testTracesCfg, nil, newTestTProcessor(nil)) - assert.Equal(t, component.ErrNilNextConsumer, err) } func TestNewTracesProcessor_ProcessTraceError(t *testing.T) { diff --git a/processor/processortest/nop_processor.go b/processor/processortest/nop_processor.go index 3ff229f182f..0651bc5b6ba 100644 --- a/processor/processortest/nop_processor.go +++ b/processor/processortest/nop_processor.go @@ -13,11 +13,12 @@ import ( "go.opentelemetry.io/collector/processor" ) -const typeStr = "nop" +var nopType = component.MustNewType("nop") -// NewNopCreateSettings returns a new nop settings for Create* functions. +// NewNopCreateSettings returns a new nop settings for Create*Processor functions. func NewNopCreateSettings() processor.CreateSettings { return processor.CreateSettings{ + ID: component.NewID(nopType), TelemetrySettings: componenttest.NewNopTelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo(), } @@ -26,7 +27,7 @@ func NewNopCreateSettings() processor.CreateSettings { // NewNopFactory returns a component.ProcessorFactory that constructs nop processors. func NewNopFactory() processor.Factory { return processor.NewFactory( - "nop", + nopType, func() component.Config { return &nopConfig{} }, processor.WithTraces(createTracesProcessor, component.StabilityLevelStable), processor.WithMetrics(createMetricsProcessor, component.StabilityLevelStable), @@ -52,25 +53,17 @@ var nopInstance = &nopProcessor{ Consumer: consumertest.NewNop(), } -// nopProcessor stores consumed traces and metrics for testing purposes. +// nopProcessor acts as a processor for testing purposes. type nopProcessor struct { component.StartFunc component.ShutdownFunc consumertest.Consumer } -// NewNopBuilder returns a processor.Builder that constructs nop receivers. +// NewNopBuilder returns a processor.Builder that constructs nop processors. func NewNopBuilder() *processor.Builder { nopFactory := NewNopFactory() return processor.NewBuilder( - map[component.ID]component.Config{component.NewID(typeStr): nopFactory.CreateDefaultConfig()}, - map[component.Type]processor.Factory{typeStr: nopFactory}) -} - -func NewCreateSettings(id component.ID, set component.TelemetrySettings) processor.CreateSettings { - return processor.CreateSettings{ - ID: id, - TelemetrySettings: set, - BuildInfo: component.NewDefaultBuildInfo(), - } + map[component.ID]component.Config{component.NewID(nopType): nopFactory.CreateDefaultConfig()}, + map[component.Type]processor.Factory{nopType: nopFactory}) } diff --git a/processor/processortest/nop_processor_test.go b/processor/processortest/nop_processor_test.go index 44f581bd2eb..77e9131ed62 100644 --- a/processor/processortest/nop_processor_test.go +++ b/processor/processortest/nop_processor_test.go @@ -22,7 +22,7 @@ import ( func TestNewNopFactory(t *testing.T) { factory := NewNopFactory() require.NotNil(t, factory) - assert.Equal(t, component.Type("nop"), factory.Type()) + assert.Equal(t, component.MustNewType("nop"), factory.Type()) cfg := factory.CreateDefaultConfig() assert.Equal(t, &nopConfig{}, cfg) @@ -55,7 +55,7 @@ func TestNewNopBuilder(t *testing.T) { factory := NewNopFactory() cfg := factory.CreateDefaultConfig() set := NewNopCreateSettings() - set.ID = component.NewID(typeStr) + set.ID = component.NewID(nopType) traces, err := factory.CreateTracesProcessor(context.Background(), set, cfg, consumertest.NewNop()) require.NoError(t, err) diff --git a/processor/processortest/package_test.go b/processor/processortest/package_test.go new file mode 100644 index 00000000000..892271a45a5 --- /dev/null +++ b/processor/processortest/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package processortest + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/processor/processortest/shutdown_verifier.go b/processor/processortest/shutdown_verifier.go index d37b3515f84..e0c3becac24 100644 --- a/processor/processortest/shutdown_verifier.go +++ b/processor/processortest/shutdown_verifier.go @@ -22,12 +22,10 @@ func verifyTracesDoesNotProduceAfterShutdown(t *testing.T, factory processor.Fac // Create a proc and output its produce to a sink. nextSink := new(consumertest.TracesSink) proc, err := factory.CreateTracesProcessor(context.Background(), NewNopCreateSettings(), cfg, nextSink) - if err != nil { - if errors.Is(err, component.ErrDataTypeIsNotSupported) { - return - } - require.NoError(t, err) + if errors.Is(err, component.ErrDataTypeIsNotSupported) { + return } + require.NoError(t, err) assert.NoError(t, proc.Start(context.Background(), componenttest.NewNopHost())) // Send some traces to the proc. @@ -44,9 +42,57 @@ func verifyTracesDoesNotProduceAfterShutdown(t *testing.T, factory processor.Fac assert.EqualValues(t, generatedCount, nextSink.SpanCount()) } +func verifyLogsDoesNotProduceAfterShutdown(t *testing.T, factory processor.Factory, cfg component.Config) { + // Create a proc and output its produce to a sink. + nextSink := new(consumertest.LogsSink) + proc, err := factory.CreateLogsProcessor(context.Background(), NewNopCreateSettings(), cfg, nextSink) + if errors.Is(err, component.ErrDataTypeIsNotSupported) { + return + } + require.NoError(t, err) + assert.NoError(t, proc.Start(context.Background(), componenttest.NewNopHost())) + + // Send some logs to the proc. + const generatedCount = 10 + for i := 0; i < generatedCount; i++ { + require.NoError(t, proc.ConsumeLogs(context.Background(), testdata.GenerateLogs(1))) + } + + // Now shutdown the proc. + assert.NoError(t, proc.Shutdown(context.Background())) + + // The Shutdown() is done. It means the proc must have sent everything we + // gave it to the next sink. + assert.EqualValues(t, generatedCount, nextSink.LogRecordCount()) +} + +func verifyMetricsDoesNotProduceAfterShutdown(t *testing.T, factory processor.Factory, cfg component.Config) { + // Create a proc and output its produce to a sink. + nextSink := new(consumertest.MetricsSink) + proc, err := factory.CreateMetricsProcessor(context.Background(), NewNopCreateSettings(), cfg, nextSink) + if errors.Is(err, component.ErrDataTypeIsNotSupported) { + return + } + require.NoError(t, err) + assert.NoError(t, proc.Start(context.Background(), componenttest.NewNopHost())) + + // Send some metrics to the proc. testdata.GenerateMetrics creates metrics with 2 data points each. + const generatedCount = 10 + for i := 0; i < generatedCount; i++ { + require.NoError(t, proc.ConsumeMetrics(context.Background(), testdata.GenerateMetrics(1))) + } + + // Now shutdown the proc. + assert.NoError(t, proc.Shutdown(context.Background())) + + // The Shutdown() is done. It means the proc must have sent everything we + // gave it to the next sink. + assert.EqualValues(t, generatedCount*2, nextSink.DataPointCount()) +} + // VerifyShutdown verifies the processor doesn't produce telemetry data after shutdown. func VerifyShutdown(t *testing.T, factory processor.Factory, cfg component.Config) { verifyTracesDoesNotProduceAfterShutdown(t, factory, cfg) - // TODO: add metrics and logs verification. - // TODO: add other shutdown verifications. + verifyLogsDoesNotProduceAfterShutdown(t, factory, cfg) + verifyMetricsDoesNotProduceAfterShutdown(t, factory, cfg) } diff --git a/processor/processortest/shutdown_verifier_test.go b/processor/processortest/shutdown_verifier_test.go new file mode 100644 index 00000000000..70ae639068f --- /dev/null +++ b/processor/processortest/shutdown_verifier_test.go @@ -0,0 +1,103 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package processortest + +import ( + "context" + "testing" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/processor" +) + +func TestShutdownVerifier(t *testing.T) { + f := processor.NewFactory( + component.MustNewType("passthrough"), + func() component.Config { return struct{}{} }, + processor.WithTraces(createPassthroughTracesProcessor, component.StabilityLevelStable), + processor.WithMetrics(createPassthroughMetricsProcessor, component.StabilityLevelStable), + processor.WithLogs(createPassthroughLogsProcessor, component.StabilityLevelStable), + ) + VerifyShutdown(t, f, &struct{}{}) +} + +func TestShutdownVerifierLogsOnly(t *testing.T) { + f := processor.NewFactory( + component.MustNewType("passthrough"), + func() component.Config { return struct{}{} }, + processor.WithLogs(createPassthroughLogsProcessor, component.StabilityLevelStable), + ) + VerifyShutdown(t, f, &struct{}{}) +} + +func TestShutdownVerifierMetricsOnly(t *testing.T) { + f := processor.NewFactory( + component.MustNewType("passthrough"), + func() component.Config { return struct{}{} }, + processor.WithMetrics(createPassthroughMetricsProcessor, component.StabilityLevelStable), + ) + VerifyShutdown(t, f, &struct{}{}) +} + +func TestShutdownVerifierTracesOnly(t *testing.T) { + f := processor.NewFactory( + component.MustNewType("passthrough"), + func() component.Config { return struct{}{} }, + processor.WithTraces(createPassthroughTracesProcessor, component.StabilityLevelStable), + ) + VerifyShutdown(t, f, &struct{}{}) +} + +type passthroughProcessor struct { + processor.Traces + nextLogs consumer.Logs + nextMetrics consumer.Metrics + nextTraces consumer.Traces +} + +func (passthroughProcessor) Start(context.Context, component.Host) error { + return nil +} + +func (passthroughProcessor) Shutdown(context.Context) error { + return nil +} + +func (passthroughProcessor) Capabilities() consumer.Capabilities { + return consumer.Capabilities{} +} + +func createPassthroughLogsProcessor(_ context.Context, _ processor.CreateSettings, _ component.Config, logs consumer.Logs) (processor.Logs, error) { + return passthroughProcessor{ + nextLogs: logs, + }, nil +} + +func createPassthroughMetricsProcessor(_ context.Context, _ processor.CreateSettings, _ component.Config, metrics consumer.Metrics) (processor.Metrics, error) { + return passthroughProcessor{ + nextMetrics: metrics, + }, nil +} + +func createPassthroughTracesProcessor(_ context.Context, _ processor.CreateSettings, _ component.Config, traces consumer.Traces) (processor.Traces, error) { + return passthroughProcessor{ + nextTraces: traces, + }, nil +} + +func (p passthroughProcessor) ConsumeTraces(ctx context.Context, td ptrace.Traces) error { + return p.nextTraces.ConsumeTraces(ctx, td) +} + +func (p passthroughProcessor) ConsumeMetrics(ctx context.Context, md pmetric.Metrics) error { + return p.nextMetrics.ConsumeMetrics(ctx, md) +} + +func (p passthroughProcessor) ConsumeLogs(ctx context.Context, ld plog.Logs) error { + return p.nextLogs.ConsumeLogs(ctx, ld) +} diff --git a/processor/processortest/unhealthy_processor.go b/processor/processortest/unhealthy_processor.go new file mode 100644 index 00000000000..196787de97c --- /dev/null +++ b/processor/processortest/unhealthy_processor.go @@ -0,0 +1,70 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package processortest // import "go.opentelemetry.io/collector/processor/processortest" + +import ( + "context" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/processor" +) + +// NewUnhealthyProcessorCreateSettings returns a new nop settings for Create*Processor functions. +func NewUnhealthyProcessorCreateSettings() processor.CreateSettings { + return processor.CreateSettings{ + TelemetrySettings: componenttest.NewNopTelemetrySettings(), + BuildInfo: component.NewDefaultBuildInfo(), + } +} + +// NewUnhealthyProcessorFactory returns a component.ProcessorFactory that constructs nop processors. +func NewUnhealthyProcessorFactory() processor.Factory { + return processor.NewFactory( + component.MustNewType("unhealthy"), + func() component.Config { + return &struct{}{} + }, + processor.WithTraces(createUnhealthyTracesProcessor, component.StabilityLevelStable), + processor.WithMetrics(createUnhealthyMetricsProcessor, component.StabilityLevelStable), + processor.WithLogs(createUnhealthyLogsProcessor, component.StabilityLevelStable), + ) +} + +func createUnhealthyTracesProcessor(_ context.Context, set processor.CreateSettings, _ component.Config, _ consumer.Traces) (processor.Traces, error) { + return &unhealthyProcessor{ + Consumer: consumertest.NewNop(), + telemetry: set.TelemetrySettings, + }, nil +} + +func createUnhealthyMetricsProcessor(_ context.Context, set processor.CreateSettings, _ component.Config, _ consumer.Metrics) (processor.Metrics, error) { + return &unhealthyProcessor{ + Consumer: consumertest.NewNop(), + telemetry: set.TelemetrySettings, + }, nil +} + +func createUnhealthyLogsProcessor(_ context.Context, set processor.CreateSettings, _ component.Config, _ consumer.Logs) (processor.Logs, error) { + return &unhealthyProcessor{ + Consumer: consumertest.NewNop(), + telemetry: set.TelemetrySettings, + }, nil +} + +type unhealthyProcessor struct { + component.StartFunc + component.ShutdownFunc + consumertest.Consumer + telemetry component.TelemetrySettings +} + +func (p unhealthyProcessor) Start(context.Context, component.Host) error { + go func() { + p.telemetry.ReportStatus(component.NewStatusEvent(component.StatusRecoverableError)) + }() + return nil +} diff --git a/processor/processortest/unhealthy_processor_test.go b/processor/processortest/unhealthy_processor_test.go new file mode 100644 index 00000000000..f00c4236a19 --- /dev/null +++ b/processor/processortest/unhealthy_processor_test.go @@ -0,0 +1,49 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package processortest + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestNewUnhealthyProcessorFactory(t *testing.T) { + factory := NewUnhealthyProcessorFactory() + require.NotNil(t, factory) + assert.Equal(t, component.MustNewType("unhealthy"), factory.Type()) + cfg := factory.CreateDefaultConfig() + assert.Equal(t, &struct{}{}, cfg) + + traces, err := factory.CreateTracesProcessor(context.Background(), NewUnhealthyProcessorCreateSettings(), cfg, consumertest.NewNop()) + require.NoError(t, err) + assert.Equal(t, consumer.Capabilities{MutatesData: false}, traces.Capabilities()) + assert.NoError(t, traces.Start(context.Background(), componenttest.NewNopHost())) + assert.NoError(t, traces.ConsumeTraces(context.Background(), ptrace.NewTraces())) + assert.NoError(t, traces.Shutdown(context.Background())) + + metrics, err := factory.CreateMetricsProcessor(context.Background(), NewUnhealthyProcessorCreateSettings(), cfg, consumertest.NewNop()) + require.NoError(t, err) + assert.Equal(t, consumer.Capabilities{MutatesData: false}, metrics.Capabilities()) + assert.NoError(t, metrics.Start(context.Background(), componenttest.NewNopHost())) + assert.NoError(t, metrics.ConsumeMetrics(context.Background(), pmetric.NewMetrics())) + assert.NoError(t, metrics.Shutdown(context.Background())) + + logs, err := factory.CreateLogsProcessor(context.Background(), NewUnhealthyProcessorCreateSettings(), cfg, consumertest.NewNop()) + require.NoError(t, err) + assert.Equal(t, consumer.Capabilities{MutatesData: false}, logs.Capabilities()) + assert.NoError(t, logs.Start(context.Background(), componenttest.NewNopHost())) + assert.NoError(t, logs.ConsumeLogs(context.Background(), plog.NewLogs())) + assert.NoError(t, logs.Shutdown(context.Background())) +} diff --git a/receiver/README.md b/receiver/README.md index 5c5555525f6..ee2b74a8c9c 100644 --- a/receiver/README.md +++ b/receiver/README.md @@ -2,24 +2,16 @@ A receiver is how data gets into the OpenTelemetry Collector. Generally, a receiver accepts data in a specified format, translates it into the internal -format and passes it to [processors](../processor/README.md) and -[exporters](../exporter/README.md) defined in the applicable -pipelines. +format and passes it to [processors](../processor/README.md) and [exporters](../exporter/README.md) defined +in the applicable pipelines. -Available trace receivers (sorted alphabetically): - -- [OTLP Receiver](otlpreceiver/README.md) - -Available metric receivers (sorted alphabetically): - -- [OTLP Receiver](otlpreceiver/README.md) - -Available log receivers (sorted alphabetically): +This repository hosts the following receiver available in traces, metrics +and logs pipelines: - [OTLP Receiver](otlpreceiver/README.md) The [contrib repository](https://github.com/open-telemetry/opentelemetry-collector-contrib) - has more receivers that can be added to custom builds of the collector. +has more receivers available in its builds. ## Configuring Receivers diff --git a/receiver/go.mod b/receiver/go.mod index 7fea3d1f124..468ae1f821d 100644 --- a/receiver/go.mod +++ b/receiver/go.mod @@ -1,64 +1,54 @@ module go.opentelemetry.io/collector/receiver -go 1.20 +go 1.21 require ( github.com/stretchr/testify v1.8.4 - go.opencensus.io v0.24.0 - go.opentelemetry.io/collector v0.85.0 - go.opentelemetry.io/collector/component v0.85.0 - go.opentelemetry.io/collector/config/configtelemetry v0.85.0 - go.opentelemetry.io/collector/consumer v0.85.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0014 - go.opentelemetry.io/otel v1.18.0 - go.opentelemetry.io/otel/metric v1.18.0 - go.opentelemetry.io/otel/sdk v1.18.0 - go.opentelemetry.io/otel/sdk/metric v0.41.0 - go.opentelemetry.io/otel/trace v1.18.0 + go.opentelemetry.io/collector v0.96.0 + go.opentelemetry.io/collector/component v0.96.0 + go.opentelemetry.io/collector/config/configtelemetry v0.96.0 + go.opentelemetry.io/collector/consumer v0.96.0 + go.opentelemetry.io/collector/pdata v1.3.0 + go.opentelemetry.io/otel v1.24.0 + go.opentelemetry.io/otel/metric v1.24.0 + go.opentelemetry.io/otel/sdk v1.24.0 + go.opentelemetry.io/otel/trace v1.24.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 + go.uber.org/zap v1.27.0 ) require ( - contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.0.1 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.16.0 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect - github.com/prometheus/statsd_exporter v0.22.7 // indirect - go.opentelemetry.io/collector/confmap v0.85.0 // indirect - go.opentelemetry.io/collector/exporter v0.85.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0014 // indirect - go.opentelemetry.io/collector/processor v0.85.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.41.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/grpc v1.58.1 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/confmap v0.96.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -70,26 +60,10 @@ replace go.opentelemetry.io/collector/confmap => ../confmap replace go.opentelemetry.io/collector/consumer => ../consumer -replace go.opentelemetry.io/collector/exporter => ../exporter - -replace go.opentelemetry.io/collector/extension => ../extension - -replace go.opentelemetry.io/collector/extension/zpagesextension => ../extension/zpagesextension - replace go.opentelemetry.io/collector/featuregate => ../featuregate replace go.opentelemetry.io/collector/pdata => ../pdata -replace go.opentelemetry.io/collector/processor => ../processor - -replace go.opentelemetry.io/collector/semconv => ../semconv - retract v0.76.0 // Depends on retracted pdata v1.0.0-rc10 module -replace go.opentelemetry.io/collector/connector => ../connector - -replace go.opentelemetry.io/collector/config/confignet => ../config/confignet - replace go.opentelemetry.io/collector/config/configtelemetry => ../config/configtelemetry - -replace go.opentelemetry.io/collector/service => ../service diff --git a/receiver/go.sum b/receiver/go.sum index 15d68a28c23..06616cda85d 100644 --- a/receiver/go.sum +++ b/receiver/go.sum @@ -1,582 +1,126 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= 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= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= -github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 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/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= -github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -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/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= -go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= -go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/exporters/prometheus v0.41.0 h1:A3/bhjP5SmELy8dcpK+uttHeh9Qrh+YnS16/VzrztRQ= -go.opentelemetry.io/otel/exporters/prometheus v0.41.0/go.mod h1:mKuXEMi9suyyNJQ99SZCO0mpWGFe0MIALtjd3r6uo7Q= -go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= -go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= -go.opentelemetry.io/otel/sdk v1.18.0 h1:e3bAB0wB3MljH38sHzpV/qWrOTCFrdZF2ct9F8rBkcY= -go.opentelemetry.io/otel/sdk v1.18.0/go.mod h1:1RCygWV7plY2KmdskZEDDBs4tJeHG92MdHZIluiYs/M= -go.opentelemetry.io/otel/sdk/metric v0.41.0 h1:c3sAt9/pQ5fSIUfl0gPtClV3HhE18DCVzByD33R/zsk= -go.opentelemetry.io/otel/sdk/metric v0.41.0/go.mod h1:PmOmSt+iOklKtIg5O4Vz9H/ttcRFSNTgii+E1KGyn1w= -go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= -go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/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-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.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/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= -google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +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= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/receiver/otlpreceiver/README.md b/receiver/otlpreceiver/README.md index 603e320def3..0d6e5ef5a2c 100644 --- a/receiver/otlpreceiver/README.md +++ b/receiver/otlpreceiver/README.md @@ -1,12 +1,18 @@ # OTLP Receiver -| Status | | -| ------------------------ | --------------------- | -| Stability | traces [stable] | -| | metrics [stable] | -| | logs [beta] | -| Supported pipeline types | traces, metrics, logs | -| Distributions | [core], [contrib] | + +| Status | | +| ------------- |-----------| +| Stability | [beta]: logs | +| | [stable]: traces, metrics | +| Distributions | [core], [contrib] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Areceiver%2Fotlp%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Areceiver%2Fotlp) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Areceiver%2Fotlp%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Areceiver%2Fotlp) | + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[stable]: https://github.com/open-telemetry/opentelemetry-collector#stable +[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib + Receives data via gRPC or HTTP using [OTLP]( https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/otlp.md) @@ -30,7 +36,9 @@ The following settings are configurable: - `endpoint` (default = 0.0.0.0:4317 for grpc protocol, 0.0.0.0:4318 http protocol): host:port to which the receiver is going to receive data. The valid syntax is - described at https://github.com/grpc/grpc/blob/master/doc/naming.md. + described at https://github.com/grpc/grpc/blob/master/doc/naming.md. The + `component.UseLocalHostAsDefaultHost` feature gate changes these to localhost:4317 and + localhost:4318 respectively. This will become the default in a future release. ## Advanced Configuration diff --git a/receiver/otlpreceiver/config.go b/receiver/otlpreceiver/config.go index 2234e2532d9..8e512f5a278 100644 --- a/receiver/otlpreceiver/config.go +++ b/receiver/otlpreceiver/config.go @@ -22,7 +22,7 @@ const ( ) type HTTPConfig struct { - *confighttp.HTTPServerSettings `mapstructure:",squash"` + *confighttp.ServerConfig `mapstructure:",squash"` // The URL path to receive traces on. If omitted "/v1/traces" will be used. TracesURLPath string `mapstructure:"traces_url_path,omitempty"` @@ -36,8 +36,8 @@ type HTTPConfig struct { // Protocols is the configuration for the supported protocols. type Protocols struct { - GRPC *configgrpc.GRPCServerSettings `mapstructure:"grpc"` - HTTP *HTTPConfig `mapstructure:"http"` + GRPC *configgrpc.ServerConfig `mapstructure:"grpc"` + HTTP *HTTPConfig `mapstructure:"http"` } // Config defines configuration for OTLP receiver. @@ -60,7 +60,7 @@ func (cfg *Config) Validate() error { // Unmarshal a confmap.Conf into the config struct. func (cfg *Config) Unmarshal(conf *confmap.Conf) error { // first load the config normally - err := conf.Unmarshal(cfg, confmap.WithErrorUnused()) + err := conf.Unmarshal(cfg) if err != nil { return err } diff --git a/receiver/otlpreceiver/config.md b/receiver/otlpreceiver/config.md index 3f5ac4b9e1c..df6cf931a12 100644 --- a/receiver/otlpreceiver/config.md +++ b/receiver/otlpreceiver/config.md @@ -75,10 +75,10 @@ Config defines configuration for OTLP receiver. |-----------------------|-----------------------------------------------------------|--------------|-----------------------------------------------------------------------------------------------------------------------------------------| | endpoint | string | 0.0.0.0:4318 | Endpoint configures the listening address for the server. | | tls | [configtls-TLSServerSetting](#configtls-tlsserversetting) | | TLSSetting struct exposes TLS client configuration. | -| cors | [confighttp-CORSSettings](#confighttp-corssettings) | | CORSSettings configures a receiver for HTTP cross-origin resource sharing (CORS). | +| cors | [confighttp-CORSConfig](#confighttp-corsconfig) | | CORSConfig configures a receiver for HTTP cross-origin resource sharing (CORS). | | max_request_body_size | int | 0 | MaxRequestBodySize configures the maximum allowed body size in bytes for a single request. The default `0` means there's no restriction | -### confighttp-CORSSettings +### confighttp-CORSConfig | Name | Type | Default | Docs | |-----------------|----------|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| diff --git a/receiver/otlpreceiver/config_test.go b/receiver/otlpreceiver/config_test.go index 43e4fb2aa8b..031d8943cc3 100644 --- a/receiver/otlpreceiver/config_test.go +++ b/receiver/otlpreceiver/config_test.go @@ -86,13 +86,13 @@ func TestUnmarshalConfig(t *testing.T) { assert.Equal(t, &Config{ Protocols: Protocols{ - GRPC: &configgrpc.GRPCServerSettings{ - NetAddr: confignet.NetAddr{ + GRPC: &configgrpc.ServerConfig{ + NetAddr: confignet.AddrConfig{ Endpoint: "0.0.0.0:4317", Transport: "tcp", }, - TLSSetting: &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: &configtls.ServerConfig{ + TLSSetting: configtls.Config{ CertFile: "test.crt", KeyFile: "test.key", }, @@ -116,15 +116,15 @@ func TestUnmarshalConfig(t *testing.T) { }, }, HTTP: &HTTPConfig{ - HTTPServerSettings: &confighttp.HTTPServerSettings{ + ServerConfig: &confighttp.ServerConfig{ Endpoint: "0.0.0.0:4318", - TLSSetting: &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: &configtls.ServerConfig{ + TLSSetting: configtls.Config{ CertFile: "test.crt", KeyFile: "test.key", }, }, - CORS: &confighttp.CORSSettings{ + CORS: &confighttp.CORSConfig{ AllowedOrigins: []string{"https://*.test.com", "https://test.com"}, MaxAge: 7200, }, @@ -147,15 +147,15 @@ func TestUnmarshalConfigUnix(t *testing.T) { assert.Equal(t, &Config{ Protocols: Protocols{ - GRPC: &configgrpc.GRPCServerSettings{ - NetAddr: confignet.NetAddr{ + GRPC: &configgrpc.ServerConfig{ + NetAddr: confignet.AddrConfig{ Endpoint: "/tmp/grpc_otlp.sock", Transport: "unix", }, ReadBufferSize: 512 * 1024, }, HTTP: &HTTPConfig{ - HTTPServerSettings: &confighttp.HTTPServerSettings{ + ServerConfig: &confighttp.ServerConfig{ Endpoint: "/tmp/http_otlp.sock", }, TracesURLPath: defaultTracesURLPath, diff --git a/receiver/otlpreceiver/doc.go b/receiver/otlpreceiver/doc.go index 78378a5c082..f0974c12e2a 100644 --- a/receiver/otlpreceiver/doc.go +++ b/receiver/otlpreceiver/doc.go @@ -1,5 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +//go:generate mdatagen metadata.yaml + // Package otlpreceiver receives data in OTLP format. package otlpreceiver // import "go.opentelemetry.io/collector/receiver/otlpreceiver" diff --git a/receiver/otlpreceiver/encoder.go b/receiver/otlpreceiver/encoder.go index ca661b9c2e1..d37437c7ca9 100644 --- a/receiver/otlpreceiver/encoder.go +++ b/receiver/otlpreceiver/encoder.go @@ -21,9 +21,9 @@ const ( ) var ( - pbEncoder = &protoEncoder{} - jsEncoder = &jsonEncoder{} - jsonMarshaler = &jsonpb.Marshaler{} + pbEncoder = &protoEncoder{} + jsEncoder = &jsonEncoder{} + jsonPbMarshaler = &jsonpb.Marshaler{} ) type encoder interface { @@ -114,7 +114,7 @@ func (jsonEncoder) marshalLogsResponse(resp plogotlp.ExportResponse) ([]byte, er func (jsonEncoder) marshalStatus(resp *spb.Status) ([]byte, error) { buf := new(bytes.Buffer) - err := jsonMarshaler.Marshal(buf, resp) + err := jsonPbMarshaler.Marshal(buf, resp) return buf.Bytes(), err } diff --git a/receiver/otlpreceiver/factory.go b/receiver/otlpreceiver/factory.go index 11cf3dc6668..3e1df39032b 100644 --- a/receiver/otlpreceiver/factory.go +++ b/receiver/otlpreceiver/factory.go @@ -11,15 +11,15 @@ import ( "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/internal/localhostgate" "go.opentelemetry.io/collector/internal/sharedcomponent" "go.opentelemetry.io/collector/receiver" + "go.opentelemetry.io/collector/receiver/otlpreceiver/internal/metadata" ) const ( - typeStr = "otlp" - - defaultGRPCEndpoint = "0.0.0.0:4317" - defaultHTTPEndpoint = "0.0.0.0:4318" + grpcPort = 4317 + httpPort = 4318 defaultTracesURLPath = "/v1/traces" defaultMetricsURLPath = "/v1/metrics" @@ -29,28 +29,29 @@ const ( // NewFactory creates a new OTLP receiver factory. func NewFactory() receiver.Factory { return receiver.NewFactory( - typeStr, + metadata.Type, createDefaultConfig, - receiver.WithTraces(createTraces, component.StabilityLevelStable), - receiver.WithMetrics(createMetrics, component.StabilityLevelStable), - receiver.WithLogs(createLog, component.StabilityLevelBeta)) + receiver.WithTraces(createTraces, metadata.TracesStability), + receiver.WithMetrics(createMetrics, metadata.MetricsStability), + receiver.WithLogs(createLog, metadata.LogsStability), + ) } // createDefaultConfig creates the default configuration for receiver. func createDefaultConfig() component.Config { return &Config{ Protocols: Protocols{ - GRPC: &configgrpc.GRPCServerSettings{ - NetAddr: confignet.NetAddr{ - Endpoint: defaultGRPCEndpoint, + GRPC: &configgrpc.ServerConfig{ + NetAddr: confignet.AddrConfig{ + Endpoint: localhostgate.EndpointForPort(grpcPort), Transport: "tcp", }, // We almost write 0 bytes, so no need to tune WriteBufferSize. ReadBufferSize: 512 * 1024, }, HTTP: &HTTPConfig{ - HTTPServerSettings: &confighttp.HTTPServerSettings{ - Endpoint: defaultHTTPEndpoint, + ServerConfig: &confighttp.ServerConfig{ + Endpoint: localhostgate.EndpointForPort(httpPort), }, TracesURLPath: defaultTracesURLPath, MetricsURLPath: defaultMetricsURLPath, @@ -68,16 +69,18 @@ func createTraces( nextConsumer consumer.Traces, ) (receiver.Traces, error) { oCfg := cfg.(*Config) - r, err := receivers.GetOrAdd(oCfg, func() (*otlpReceiver, error) { - return newOtlpReceiver(oCfg, set) - }) + r, err := receivers.LoadOrStore( + oCfg, + func() (*otlpReceiver, error) { + return newOtlpReceiver(oCfg, &set) + }, + &set.TelemetrySettings, + ) if err != nil { return nil, err } - if err = r.Unwrap().registerTraceConsumer(nextConsumer); err != nil { - return nil, err - } + r.Unwrap().registerTraceConsumer(nextConsumer) return r, nil } @@ -89,16 +92,18 @@ func createMetrics( consumer consumer.Metrics, ) (receiver.Metrics, error) { oCfg := cfg.(*Config) - r, err := receivers.GetOrAdd(oCfg, func() (*otlpReceiver, error) { - return newOtlpReceiver(oCfg, set) - }) + r, err := receivers.LoadOrStore( + oCfg, + func() (*otlpReceiver, error) { + return newOtlpReceiver(oCfg, &set) + }, + &set.TelemetrySettings, + ) if err != nil { return nil, err } - if err = r.Unwrap().registerMetricsConsumer(consumer); err != nil { - return nil, err - } + r.Unwrap().registerMetricsConsumer(consumer) return r, nil } @@ -110,16 +115,18 @@ func createLog( consumer consumer.Logs, ) (receiver.Logs, error) { oCfg := cfg.(*Config) - r, err := receivers.GetOrAdd(oCfg, func() (*otlpReceiver, error) { - return newOtlpReceiver(oCfg, set) - }) + r, err := receivers.LoadOrStore( + oCfg, + func() (*otlpReceiver, error) { + return newOtlpReceiver(oCfg, &set) + }, + &set.TelemetrySettings, + ) if err != nil { return nil, err } - if err = r.Unwrap().registerLogsConsumer(consumer); err != nil { - return nil, err - } + r.Unwrap().registerLogsConsumer(consumer) return r, nil } @@ -129,4 +136,4 @@ func createLog( // create separate objects, they must use one otlpReceiver object per configuration. // When the receiver is shutdown it should be removed from this map so the same configuration // can be recreated successfully. -var receivers = sharedcomponent.NewSharedComponents[*Config, *otlpReceiver]() +var receivers = sharedcomponent.NewMap[*Config, *otlpReceiver]() diff --git a/receiver/otlpreceiver/factory_test.go b/receiver/otlpreceiver/factory_test.go index 829c8934e5d..21a3a051f27 100644 --- a/receiver/otlpreceiver/factory_test.go +++ b/receiver/otlpreceiver/factory_test.go @@ -27,7 +27,7 @@ func TestCreateDefaultConfig(t *testing.T) { assert.NoError(t, componenttest.CheckConfigStruct(cfg)) } -func TestCreateReceiver(t *testing.T) { +func TestCreateSameReceiver(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig().(*Config) cfg.GRPC.NetAddr.Endpoint = testutil.GetAvailableLocalAddress(t) @@ -41,18 +41,25 @@ func TestCreateReceiver(t *testing.T) { mReceiver, err := factory.CreateMetricsReceiver(context.Background(), creationSet, cfg, consumertest.NewNop()) assert.NotNil(t, mReceiver) assert.NoError(t, err) + + lReceiver, err := factory.CreateMetricsReceiver(context.Background(), creationSet, cfg, consumertest.NewNop()) + assert.NotNil(t, lReceiver) + assert.NoError(t, err) + + assert.Same(t, tReceiver, mReceiver) + assert.Same(t, tReceiver, lReceiver) } func TestCreateTracesReceiver(t *testing.T) { factory := NewFactory() - defaultGRPCSettings := &configgrpc.GRPCServerSettings{ - NetAddr: confignet.NetAddr{ + defaultGRPCSettings := &configgrpc.ServerConfig{ + NetAddr: confignet.AddrConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), Transport: "tcp", }, } defaultHTTPSettings := &HTTPConfig{ - HTTPServerSettings: &confighttp.HTTPServerSettings{ + ServerConfig: &confighttp.ServerConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), }, TracesURLPath: defaultTracesURLPath, @@ -61,9 +68,11 @@ func TestCreateTracesReceiver(t *testing.T) { } tests := []struct { - name string - cfg *Config - wantErr bool + name string + cfg *Config + wantStartErr bool + wantErr bool + sink consumer.Traces }{ { name: "default", @@ -73,13 +82,14 @@ func TestCreateTracesReceiver(t *testing.T) { HTTP: defaultHTTPSettings, }, }, + sink: consumertest.NewNop(), }, { name: "invalid_grpc_port", cfg: &Config{ Protocols: Protocols{ - GRPC: &configgrpc.GRPCServerSettings{ - NetAddr: confignet.NetAddr{ + GRPC: &configgrpc.ServerConfig{ + NetAddr: confignet.AddrConfig{ Endpoint: "localhost:112233", Transport: "tcp", }, @@ -87,7 +97,8 @@ func TestCreateTracesReceiver(t *testing.T) { HTTP: defaultHTTPSettings, }, }, - wantErr: true, + wantStartErr: true, + sink: consumertest.NewNop(), }, { name: "invalid_http_port", @@ -95,27 +106,36 @@ func TestCreateTracesReceiver(t *testing.T) { Protocols: Protocols{ GRPC: defaultGRPCSettings, HTTP: &HTTPConfig{ - HTTPServerSettings: &confighttp.HTTPServerSettings{ + ServerConfig: &confighttp.ServerConfig{ Endpoint: "localhost:112233", }, TracesURLPath: defaultTracesURLPath, }, }, }, - wantErr: true, + wantStartErr: true, + sink: consumertest.NewNop(), + }, + { + name: "no_http_or_grcp_config", + cfg: &Config{ + Protocols: Protocols{}, + }, + sink: consumertest.NewNop(), }, } ctx := context.Background() creationSet := receivertest.NewNopCreateSettings() for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - sink := new(consumertest.TracesSink) - tr, err := factory.CreateTracesReceiver(ctx, creationSet, tt.cfg, sink) - assert.NoError(t, err) - require.NotNil(t, tr) + tr, err := factory.CreateTracesReceiver(ctx, creationSet, tt.cfg, tt.sink) if tt.wantErr { + assert.Error(t, err) + return + } + assert.NoError(t, err) + if tt.wantStartErr { assert.Error(t, tr.Start(context.Background(), componenttest.NewNopHost())) - assert.NoError(t, tr.Shutdown(context.Background())) } else { assert.NoError(t, tr.Start(context.Background(), componenttest.NewNopHost())) assert.NoError(t, tr.Shutdown(context.Background())) @@ -126,14 +146,14 @@ func TestCreateTracesReceiver(t *testing.T) { func TestCreateMetricReceiver(t *testing.T) { factory := NewFactory() - defaultGRPCSettings := &configgrpc.GRPCServerSettings{ - NetAddr: confignet.NetAddr{ + defaultGRPCSettings := &configgrpc.ServerConfig{ + NetAddr: confignet.AddrConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), Transport: "tcp", }, } defaultHTTPSettings := &HTTPConfig{ - HTTPServerSettings: &confighttp.HTTPServerSettings{ + ServerConfig: &confighttp.ServerConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), }, TracesURLPath: defaultTracesURLPath, @@ -142,9 +162,11 @@ func TestCreateMetricReceiver(t *testing.T) { } tests := []struct { - name string - cfg *Config - wantErr bool + name string + cfg *Config + wantStartErr bool + wantErr bool + sink consumer.Metrics }{ { name: "default", @@ -154,13 +176,14 @@ func TestCreateMetricReceiver(t *testing.T) { HTTP: defaultHTTPSettings, }, }, + sink: consumertest.NewNop(), }, { name: "invalid_grpc_address", cfg: &Config{ Protocols: Protocols{ - GRPC: &configgrpc.GRPCServerSettings{ - NetAddr: confignet.NetAddr{ + GRPC: &configgrpc.ServerConfig{ + NetAddr: confignet.AddrConfig{ Endpoint: "327.0.0.1:1122", Transport: "tcp", }, @@ -168,7 +191,8 @@ func TestCreateMetricReceiver(t *testing.T) { HTTP: defaultHTTPSettings, }, }, - wantErr: true, + wantStartErr: true, + sink: consumertest.NewNop(), }, { name: "invalid_http_address", @@ -176,25 +200,35 @@ func TestCreateMetricReceiver(t *testing.T) { Protocols: Protocols{ GRPC: defaultGRPCSettings, HTTP: &HTTPConfig{ - HTTPServerSettings: &confighttp.HTTPServerSettings{ + ServerConfig: &confighttp.ServerConfig{ Endpoint: "327.0.0.1:1122", }, MetricsURLPath: defaultMetricsURLPath, }, }, }, - wantErr: true, + wantStartErr: true, + sink: consumertest.NewNop(), + }, + { + name: "no_http_or_grcp_config", + cfg: &Config{ + Protocols: Protocols{}, + }, + sink: consumertest.NewNop(), }, } ctx := context.Background() creationSet := receivertest.NewNopCreateSettings() for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - sink := new(consumertest.MetricsSink) - mr, err := factory.CreateMetricsReceiver(ctx, creationSet, tt.cfg, sink) - assert.NoError(t, err) - require.NotNil(t, mr) + mr, err := factory.CreateMetricsReceiver(ctx, creationSet, tt.cfg, tt.sink) if tt.wantErr { + assert.Error(t, err) + return + } + assert.NoError(t, err) + if tt.wantStartErr { assert.Error(t, mr.Start(context.Background(), componenttest.NewNopHost())) } else { require.NoError(t, mr.Start(context.Background(), componenttest.NewNopHost())) @@ -206,14 +240,14 @@ func TestCreateMetricReceiver(t *testing.T) { func TestCreateLogReceiver(t *testing.T) { factory := NewFactory() - defaultGRPCSettings := &configgrpc.GRPCServerSettings{ - NetAddr: confignet.NetAddr{ + defaultGRPCSettings := &configgrpc.ServerConfig{ + NetAddr: confignet.AddrConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), Transport: "tcp", }, } defaultHTTPSettings := &HTTPConfig{ - HTTPServerSettings: &confighttp.HTTPServerSettings{ + ServerConfig: &confighttp.ServerConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), }, TracesURLPath: defaultTracesURLPath, @@ -236,14 +270,14 @@ func TestCreateLogReceiver(t *testing.T) { HTTP: defaultHTTPSettings, }, }, - sink: new(consumertest.LogsSink), + sink: consumertest.NewNop(), }, { name: "invalid_grpc_address", cfg: &Config{ Protocols: Protocols{ - GRPC: &configgrpc.GRPCServerSettings{ - NetAddr: confignet.NetAddr{ + GRPC: &configgrpc.ServerConfig{ + NetAddr: confignet.AddrConfig{ Endpoint: "327.0.0.1:1122", Transport: "tcp", }, @@ -252,7 +286,7 @@ func TestCreateLogReceiver(t *testing.T) { }, }, wantStartErr: true, - sink: new(consumertest.LogsSink), + sink: consumertest.NewNop(), }, { name: "invalid_http_address", @@ -260,7 +294,7 @@ func TestCreateLogReceiver(t *testing.T) { Protocols: Protocols{ GRPC: defaultGRPCSettings, HTTP: &HTTPConfig{ - HTTPServerSettings: &confighttp.HTTPServerSettings{ + ServerConfig: &confighttp.ServerConfig{ Endpoint: "327.0.0.1:1122", }, LogsURLPath: defaultLogsURLPath, @@ -268,30 +302,14 @@ func TestCreateLogReceiver(t *testing.T) { }, }, wantStartErr: true, - sink: new(consumertest.LogsSink), - }, - { - name: "no_next_consumer", - cfg: &Config{ - Protocols: Protocols{ - GRPC: defaultGRPCSettings, - HTTP: &HTTPConfig{ - HTTPServerSettings: &confighttp.HTTPServerSettings{ - Endpoint: "127.0.0.1:1122", - }, - }, - }, - }, - wantErr: true, - sink: nil, + sink: consumertest.NewNop(), }, { name: "no_http_or_grcp_config", cfg: &Config{ Protocols: Protocols{}, }, - wantErr: false, - sink: new(consumertest.LogsSink), + sink: consumertest.NewNop(), }, } ctx := context.Background() @@ -304,11 +322,8 @@ func TestCreateLogReceiver(t *testing.T) { return } assert.NoError(t, err) - require.NotNil(t, mr) - if tt.wantStartErr { assert.Error(t, mr.Start(context.Background(), componenttest.NewNopHost())) - assert.NoError(t, mr.Shutdown(context.Background())) } else { require.NoError(t, mr.Start(context.Background(), componenttest.NewNopHost())) assert.NoError(t, mr.Shutdown(context.Background())) diff --git a/receiver/otlpreceiver/go.mod b/receiver/otlpreceiver/go.mod index 9c0850d2eec..0ff401c1840 100644 --- a/receiver/otlpreceiver/go.mod +++ b/receiver/otlpreceiver/go.mod @@ -1,86 +1,84 @@ module go.opentelemetry.io/collector/receiver/otlpreceiver -go 1.20 +go 1.21 require ( github.com/gogo/protobuf v1.3.2 - github.com/klauspost/compress v1.17.0 + github.com/klauspost/compress v1.17.7 github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.85.0 - go.opentelemetry.io/collector/component v0.85.0 - go.opentelemetry.io/collector/config/configgrpc v0.85.0 - go.opentelemetry.io/collector/config/confighttp v0.85.0 - go.opentelemetry.io/collector/config/confignet v0.85.0 - go.opentelemetry.io/collector/config/configtelemetry v0.85.0 - go.opentelemetry.io/collector/config/configtls v0.85.0 - go.opentelemetry.io/collector/confmap v0.85.0 - go.opentelemetry.io/collector/consumer v0.85.0 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0014 - go.opentelemetry.io/collector/receiver v0.85.0 - go.opentelemetry.io/collector/semconv v0.85.0 - go.uber.org/zap v1.26.0 - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 - google.golang.org/grpc v1.58.1 - google.golang.org/protobuf v1.31.0 + go.opentelemetry.io/collector v0.96.0 + go.opentelemetry.io/collector/component v0.96.0 + go.opentelemetry.io/collector/config/configgrpc v0.96.0 + go.opentelemetry.io/collector/config/confighttp v0.96.0 + go.opentelemetry.io/collector/config/confignet v0.96.0 + go.opentelemetry.io/collector/config/configtls v0.96.0 + go.opentelemetry.io/collector/confmap v0.96.0 + go.opentelemetry.io/collector/consumer v0.96.0 + go.opentelemetry.io/collector/pdata v1.3.0 + go.opentelemetry.io/collector/receiver v0.96.0 + go.opentelemetry.io/otel/metric v1.24.0 + go.opentelemetry.io/otel/trace v1.24.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 + google.golang.org/grpc v1.62.0 + google.golang.org/protobuf v1.32.0 ) require ( - cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 // indirect - contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/felixge/httpsnoop v1.0.3 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect + github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.0.1 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/mostynb/go-grpc-compression v1.2.1 // indirect + github.com/mostynb/go-grpc-compression v1.2.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.16.0 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect - github.com/prometheus/statsd_exporter v0.22.7 // indirect - github.com/rs/cors v1.10.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.85.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.85.0 // indirect - go.opentelemetry.io/collector/config/configopaque v0.85.0 // indirect - go.opentelemetry.io/collector/config/internal v0.85.0 // indirect - go.opentelemetry.io/collector/exporter v0.85.0 // indirect - go.opentelemetry.io/collector/extension v0.85.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.85.0 // indirect - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0014 // indirect - go.opentelemetry.io/collector/processor v0.85.0 // indirect - go.opentelemetry.io/collector/service v0.0.0-20230915215502-07938f20fcc7 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.44.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0 // indirect - go.opentelemetry.io/otel v1.18.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.41.0 // indirect - go.opentelemetry.io/otel/metric v1.18.0 // indirect - go.opentelemetry.io/otel/sdk v1.18.0 // indirect - go.opentelemetry.io/otel/sdk/metric v0.41.0 // indirect - go.opentelemetry.io/otel/trace v1.18.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/rs/cors v1.10.1 // indirect + go.opentelemetry.io/collector/config/configauth v0.96.0 // indirect + go.opentelemetry.io/collector/config/configcompression v0.96.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.3.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect + go.opentelemetry.io/collector/config/internal v0.96.0 // indirect + go.opentelemetry.io/collector/extension v0.96.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.96.0 // indirect + go.opentelemetry.io/collector/featuregate v1.3.0 // indirect + go.opentelemetry.io/contrib/config v0.4.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect + go.opentelemetry.io/proto/otlp v1.1.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -108,10 +106,6 @@ replace go.opentelemetry.io/collector/config/internal => ../../config/internal replace go.opentelemetry.io/collector/confmap => ../../confmap -replace go.opentelemetry.io/collector/connector => ../../connector - -replace go.opentelemetry.io/collector/exporter => ../../exporter - replace go.opentelemetry.io/collector/extension => ../../extension replace go.opentelemetry.io/collector/extension/auth => ../../extension/auth @@ -120,16 +114,8 @@ replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/pdata => ../../pdata -replace go.opentelemetry.io/collector/processor => ../../processor - replace go.opentelemetry.io/collector/receiver => ../ -replace go.opentelemetry.io/collector/semconv => ../../semconv - -replace go.opentelemetry.io/collector/service => ../../service - -replace go.opentelemetry.io/collector/extension/zpagesextension => ../../extension/zpagesextension - replace go.opentelemetry.io/collector/consumer => ../../consumer retract ( diff --git a/receiver/otlpreceiver/go.sum b/receiver/otlpreceiver/go.sum index 81ac3062768..6dc69bb0e99 100644 --- a/receiver/otlpreceiver/go.sum +++ b/receiver/otlpreceiver/go.sum @@ -1,607 +1,176 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0 h1:Dg9iHVQfrhq82rUNu9ZxUDrJLaxFUe/HlCVaLyRruq8= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.21.0 h1:JNBsyXVoOoNJtTQcnEY5uYpZIbeCTYIeDe0Xh1bySMk= +cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= +cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 h1:aRVqY1p2IJaBGStWMsQMpkAa83cPkCDLl80eOj0Rbz4= cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68/go.mod h1:1a3eRNYX12fs5UABBIXS8HXVvQbX9hRB/RkEBPORpe8= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= 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= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= -github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= -github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= -github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= +github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= -github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mostynb/go-grpc-compression v1.2.1 h1:16tdYxBZSD8p9AUmvw4F7Nyc2T4/eE7XsIXrgxSEcJI= -github.com/mostynb/go-grpc-compression v1.2.1/go.mod h1:oidYvYyefMmhcuvU8fLJ8FfZyTyVzJ6SkmD5fIKgRe8= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/mostynb/go-grpc-compression v1.2.2 h1:XaDbnRvt2+1vgr0b/l0qh4mJAfIxE0bKXtz2Znl3GGI= +github.com/mostynb/go-grpc-compression v1.2.2/go.mod h1:GOCr2KBxXcblCuczg3YdLQlcin1/NfyDA348ckuCH6w= 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/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= -github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rs/cors v1.10.0 h1:62NOS1h+r8p1mW6FM0FSB0exioXLhd/sh15KpjWBZ+8= -github.com/rs/cors v1.10.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= +github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -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/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= -go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.44.0 h1:b8xjZxHbLrXAum4SxJd1Rlm7Y/fKaB+6ACI7/e5EfSA= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.44.0/go.mod h1:1ei0a32xOGkFoySu7y1DAHfcuIhC0pNZpvY2huXuMy4= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0 h1:KfYpVmrjI7JuToy5k8XV3nkapjWx48k4E4JOtVstzQI= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0/go.mod h1:SeQhzAEccGVZVEy7aH87Nh0km+utSpo1pTv6eMMop48= -go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= -go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/exporters/prometheus v0.41.0 h1:A3/bhjP5SmELy8dcpK+uttHeh9Qrh+YnS16/VzrztRQ= -go.opentelemetry.io/otel/exporters/prometheus v0.41.0/go.mod h1:mKuXEMi9suyyNJQ99SZCO0mpWGFe0MIALtjd3r6uo7Q= -go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= -go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= -go.opentelemetry.io/otel/sdk v1.18.0 h1:e3bAB0wB3MljH38sHzpV/qWrOTCFrdZF2ct9F8rBkcY= -go.opentelemetry.io/otel/sdk v1.18.0/go.mod h1:1RCygWV7plY2KmdskZEDDBs4tJeHG92MdHZIluiYs/M= -go.opentelemetry.io/otel/sdk/metric v0.41.0 h1:c3sAt9/pQ5fSIUfl0gPtClV3HhE18DCVzByD33R/zsk= -go.opentelemetry.io/otel/sdk/metric v0.41.0/go.mod h1:PmOmSt+iOklKtIg5O4Vz9H/ttcRFSNTgii+E1KGyn1w= -go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= -go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= +go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 h1:UNQQKPfTDe1J81ViolILjTKPr9WetKW6uei2hFgJmFs= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 h1:Mw5xcxMwlqoJd97vwPxA8isEaIoxsta9/Q51+TTJLGE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0/go.mod h1:CQNu9bj7o7mC6U7+CA/schKEYakYXWr79ucDHTMGhCM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 h1:s0PHtIkN+3xrbDOpt2M8OTG92cWqUESvzh2MxiR5xY8= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0/go.mod h1:hZlFbDbRt++MMPCCfSJfmhkGIWnX1h3XjkfxZUjLrIA= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= +golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/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-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.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/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= -google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +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= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/receiver/otlpreceiver/internal/errors/errors.go b/receiver/otlpreceiver/internal/errors/errors.go new file mode 100644 index 00000000000..ee9d79e1c7c --- /dev/null +++ b/receiver/otlpreceiver/internal/errors/errors.go @@ -0,0 +1,26 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package errors // import "go.opentelemetry.io/collector/receiver/otlpreceiver/internal/errors" + +import ( + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "go.opentelemetry.io/collector/consumer/consumererror" +) + +func GetStatusFromError(err error) error { + s, ok := status.FromError(err) + if !ok { + // Default to a retryable error + // https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specification.md#failures + code := codes.Unavailable + if consumererror.IsPermanent(err) { + // If an error is permanent but doesn't have an attached gRPC status, assume it is server-side. + code = codes.Internal + } + s = status.New(code, err.Error()) + } + return s.Err() +} diff --git a/receiver/otlpreceiver/internal/errors/errors_test.go b/receiver/otlpreceiver/internal/errors/errors_test.go new file mode 100644 index 00000000000..c75b5bf041f --- /dev/null +++ b/receiver/otlpreceiver/internal/errors/errors_test.go @@ -0,0 +1,45 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package errors // import "go.opentelemetry.io/collector/receiver/otlpreceiver/internal/util" + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "go.opentelemetry.io/collector/consumer/consumererror" +) + +func Test_GetStatusFromError(t *testing.T) { + tests := []struct { + name string + input error + expected *status.Status + }{ + { + name: "Status", + input: status.Error(codes.Aborted, "test"), + expected: status.New(codes.Aborted, "test"), + }, + { + name: "Permanent Error", + input: consumererror.NewPermanent(fmt.Errorf("test")), + expected: status.New(codes.Internal, "Permanent error: test"), + }, + { + name: "Non-Permanent Error", + input: fmt.Errorf("test"), + expected: status.New(codes.Unavailable, "test"), + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + result := GetStatusFromError(tt.input) + assert.Equal(t, tt.expected.Err(), result) + }) + } +} diff --git a/receiver/otlpreceiver/internal/logs/otlp.go b/receiver/otlpreceiver/internal/logs/otlp.go index faf92372d51..3088043267c 100644 --- a/receiver/otlpreceiver/internal/logs/otlp.go +++ b/receiver/otlpreceiver/internal/logs/otlp.go @@ -8,6 +8,7 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/pdata/plog/plogotlp" + "go.opentelemetry.io/collector/receiver/otlpreceiver/internal/errors" "go.opentelemetry.io/collector/receiver/receiverhelper" ) @@ -40,5 +41,15 @@ func (r *Receiver) Export(ctx context.Context, req plogotlp.ExportRequest) (plog err := r.nextConsumer.ConsumeLogs(ctx, ld) r.obsreport.EndLogsOp(ctx, dataFormatProtobuf, numSpans, err) - return plogotlp.NewExportResponse(), err + // Use appropriate status codes for permanent/non-permanent errors + // If we return the error straightaway, then the grpc implementation will set status code to Unknown + // Refer: https://github.com/grpc/grpc-go/blob/v1.59.0/server.go#L1345 + // So, convert the error to appropriate grpc status and return the error + // NonPermanent errors will be converted to codes.Unavailable (equivalent to HTTP 503) + // Permanent errors will be converted to codes.InvalidArgument (equivalent to HTTP 400) + if err != nil { + return plogotlp.NewExportResponse(), errors.GetStatusFromError(err) + } + + return plogotlp.NewExportResponse(), nil } diff --git a/receiver/otlpreceiver/internal/logs/otlp_test.go b/receiver/otlpreceiver/internal/logs/otlp_test.go index beb64c159e1..b2d3178d011 100644 --- a/receiver/otlpreceiver/internal/logs/otlp_test.go +++ b/receiver/otlpreceiver/internal/logs/otlp_test.go @@ -12,10 +12,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/grpc" + "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials/insecure" + "google.golang.org/grpc/status" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/plog/plogotlp" @@ -47,13 +50,25 @@ func TestExport_EmptyRequest(t *testing.T) { assert.NotNil(t, resp, "The response is missing") } -func TestExport_ErrorConsumer(t *testing.T) { +func TestExport_NonPermanentErrorConsumer(t *testing.T) { ld := testdata.GenerateLogs(1) req := plogotlp.NewExportRequestFromLogs(ld) logClient := makeLogsServiceClient(t, consumertest.NewErr(errors.New("my error"))) resp, err := logClient.Export(context.Background(), req) - assert.EqualError(t, err, "rpc error: code = Unknown desc = my error") + assert.EqualError(t, err, "rpc error: code = Unavailable desc = my error") + assert.IsType(t, status.Error(codes.Unknown, ""), err) + assert.Equal(t, plogotlp.ExportResponse{}, resp) +} + +func TestExport_PermanentErrorConsumer(t *testing.T) { + ld := testdata.GenerateLogs(1) + req := plogotlp.NewExportRequestFromLogs(ld) + + logClient := makeLogsServiceClient(t, consumertest.NewErr(consumererror.NewPermanent(errors.New("my error")))) + resp, err := logClient.Export(context.Background(), req) + assert.EqualError(t, err, "rpc error: code = Internal desc = Permanent error: my error") + assert.IsType(t, status.Error(codes.Unknown, ""), err) assert.Equal(t, plogotlp.ExportResponse{}, resp) } @@ -77,7 +92,7 @@ func otlpReceiverOnGRPCServer(t *testing.T, lc consumer.Logs) net.Addr { }) set := receivertest.NewNopCreateSettings() - set.ID = component.NewIDWithName("otlp", "log") + set.ID = component.MustNewIDWithName("otlp", "log") obsreport, err := receiverhelper.NewObsReport(receiverhelper.ObsReportSettings{ ReceiverID: set.ID, Transport: "grpc", diff --git a/receiver/otlpreceiver/internal/logs/package_test.go b/receiver/otlpreceiver/internal/logs/package_test.go new file mode 100644 index 00000000000..1158f120b28 --- /dev/null +++ b/receiver/otlpreceiver/internal/logs/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package logs + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/receiver/otlpreceiver/internal/metadata/generated_status.go b/receiver/otlpreceiver/internal/metadata/generated_status.go new file mode 100644 index 00000000000..aa5483d7b5a --- /dev/null +++ b/receiver/otlpreceiver/internal/metadata/generated_status.go @@ -0,0 +1,29 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" +) + +var ( + Type = component.MustNewType("otlp") + scopeName = "go.opentelemetry.io/collector/receiver/otlpreceiver" +) + +const ( + LogsStability = component.StabilityLevelBeta + TracesStability = component.StabilityLevelStable + MetricsStability = component.StabilityLevelStable +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter(scopeName) +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer(scopeName) +} diff --git a/receiver/otlpreceiver/internal/metrics/otlp.go b/receiver/otlpreceiver/internal/metrics/otlp.go index 59330dcc318..e06e2fd6d94 100644 --- a/receiver/otlpreceiver/internal/metrics/otlp.go +++ b/receiver/otlpreceiver/internal/metrics/otlp.go @@ -8,6 +8,7 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp" + "go.opentelemetry.io/collector/receiver/otlpreceiver/internal/errors" "go.opentelemetry.io/collector/receiver/receiverhelper" ) @@ -40,5 +41,15 @@ func (r *Receiver) Export(ctx context.Context, req pmetricotlp.ExportRequest) (p err := r.nextConsumer.ConsumeMetrics(ctx, md) r.obsreport.EndMetricsOp(ctx, dataFormatProtobuf, dataPointCount, err) - return pmetricotlp.NewExportResponse(), err + // Use appropriate status codes for permanent/non-permanent errors + // If we return the error straightaway, then the grpc implementation will set status code to Unknown + // Refer: https://github.com/grpc/grpc-go/blob/v1.59.0/server.go#L1345 + // So, convert the error to appropriate grpc status and return the error + // NonPermanent errors will be converted to codes.Unavailable (equivalent to HTTP 503) + // Permanent errors will be converted to codes.InvalidArgument (equivalent to HTTP 400) + if err != nil { + return pmetricotlp.NewExportResponse(), errors.GetStatusFromError(err) + } + + return pmetricotlp.NewExportResponse(), nil } diff --git a/receiver/otlpreceiver/internal/metrics/otlp_test.go b/receiver/otlpreceiver/internal/metrics/otlp_test.go index d8691daaba1..babc366119f 100644 --- a/receiver/otlpreceiver/internal/metrics/otlp_test.go +++ b/receiver/otlpreceiver/internal/metrics/otlp_test.go @@ -12,10 +12,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/grpc" + "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials/insecure" + "google.golang.org/grpc/status" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp" @@ -47,13 +50,25 @@ func TestExport_EmptyRequest(t *testing.T) { require.NotNil(t, resp) } -func TestExport_ErrorConsumer(t *testing.T) { +func TestExport_NonPermanentErrorConsumer(t *testing.T) { md := testdata.GenerateMetrics(1) req := pmetricotlp.NewExportRequestFromMetrics(md) metricsClient := makeMetricsServiceClient(t, consumertest.NewErr(errors.New("my error"))) resp, err := metricsClient.Export(context.Background(), req) - assert.EqualError(t, err, "rpc error: code = Unknown desc = my error") + assert.EqualError(t, err, "rpc error: code = Unavailable desc = my error") + assert.IsType(t, status.Error(codes.Unknown, ""), err) + assert.Equal(t, pmetricotlp.ExportResponse{}, resp) +} + +func TestExport_PermanentErrorConsumer(t *testing.T) { + ld := testdata.GenerateMetrics(1) + req := pmetricotlp.NewExportRequestFromMetrics(ld) + + metricsClient := makeMetricsServiceClient(t, consumertest.NewErr(consumererror.NewPermanent(errors.New("my error")))) + resp, err := metricsClient.Export(context.Background(), req) + assert.EqualError(t, err, "rpc error: code = Internal desc = Permanent error: my error") + assert.IsType(t, status.Error(codes.Unknown, ""), err) assert.Equal(t, pmetricotlp.ExportResponse{}, resp) } @@ -78,7 +93,7 @@ func otlpReceiverOnGRPCServer(t *testing.T, mc consumer.Metrics) net.Addr { }) set := receivertest.NewNopCreateSettings() - set.ID = component.NewIDWithName("otlp", "metrics") + set.ID = component.MustNewIDWithName("otlp", "metrics") obsreport, err := receiverhelper.NewObsReport(receiverhelper.ObsReportSettings{ ReceiverID: set.ID, Transport: "grpc", diff --git a/receiver/otlpreceiver/internal/metrics/package_test.go b/receiver/otlpreceiver/internal/metrics/package_test.go new file mode 100644 index 00000000000..b8f16a8085e --- /dev/null +++ b/receiver/otlpreceiver/internal/metrics/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package metrics + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/receiver/otlpreceiver/internal/trace/otlp.go b/receiver/otlpreceiver/internal/trace/otlp.go index d14779e712b..615b597f05e 100644 --- a/receiver/otlpreceiver/internal/trace/otlp.go +++ b/receiver/otlpreceiver/internal/trace/otlp.go @@ -8,6 +8,7 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp" + "go.opentelemetry.io/collector/receiver/otlpreceiver/internal/errors" "go.opentelemetry.io/collector/receiver/receiverhelper" ) @@ -41,5 +42,15 @@ func (r *Receiver) Export(ctx context.Context, req ptraceotlp.ExportRequest) (pt err := r.nextConsumer.ConsumeTraces(ctx, td) r.obsreport.EndTracesOp(ctx, dataFormatProtobuf, numSpans, err) - return ptraceotlp.NewExportResponse(), err + // Use appropriate status codes for permanent/non-permanent errors + // If we return the error straightaway, then the grpc implementation will set status code to Unknown + // Refer: https://github.com/grpc/grpc-go/blob/v1.59.0/server.go#L1345 + // So, convert the error to appropriate grpc status and return the error + // NonPermanent errors will be converted to codes.Unavailable (equivalent to HTTP 503) + // Permanent errors will be converted to codes.InvalidArgument (equivalent to HTTP 400) + if err != nil { + return ptraceotlp.NewExportResponse(), errors.GetStatusFromError(err) + } + + return ptraceotlp.NewExportResponse(), nil } diff --git a/receiver/otlpreceiver/internal/trace/otlp_test.go b/receiver/otlpreceiver/internal/trace/otlp_test.go index fcb7611c75f..58bfc61f4fc 100644 --- a/receiver/otlpreceiver/internal/trace/otlp_test.go +++ b/receiver/otlpreceiver/internal/trace/otlp_test.go @@ -12,10 +12,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/grpc" + "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials/insecure" + "google.golang.org/grpc/status" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp" @@ -45,13 +48,24 @@ func TestExport_EmptyRequest(t *testing.T) { assert.NotNil(t, resp, "The response is missing") } -func TestExport_ErrorConsumer(t *testing.T) { +func TestExport_NonPermanentErrorConsumer(t *testing.T) { td := testdata.GenerateTraces(1) req := ptraceotlp.NewExportRequestFromTraces(td) traceClient := makeTraceServiceClient(t, consumertest.NewErr(errors.New("my error"))) resp, err := traceClient.Export(context.Background(), req) - assert.EqualError(t, err, "rpc error: code = Unknown desc = my error") + assert.EqualError(t, err, "rpc error: code = Unavailable desc = my error") + assert.IsType(t, status.Error(codes.Unknown, ""), err) + assert.Equal(t, ptraceotlp.ExportResponse{}, resp) +} +func TestExport_PermanentErrorConsumer(t *testing.T) { + ld := testdata.GenerateTraces(1) + req := ptraceotlp.NewExportRequestFromTraces(ld) + + traceClient := makeTraceServiceClient(t, consumertest.NewErr(consumererror.NewPermanent(errors.New("my error")))) + resp, err := traceClient.Export(context.Background(), req) + assert.EqualError(t, err, "rpc error: code = Internal desc = Permanent error: my error") + assert.IsType(t, status.Error(codes.Unknown, ""), err) assert.Equal(t, ptraceotlp.ExportResponse{}, resp) } @@ -75,7 +89,7 @@ func otlpReceiverOnGRPCServer(t *testing.T, tc consumer.Traces) net.Addr { }) set := receivertest.NewNopCreateSettings() - set.ID = component.NewIDWithName("otlp", "trace") + set.ID = component.MustNewIDWithName("otlp", "trace") obsreport, err := receiverhelper.NewObsReport(receiverhelper.ObsReportSettings{ ReceiverID: set.ID, Transport: "grpc", diff --git a/receiver/otlpreceiver/internal/trace/package_test.go b/receiver/otlpreceiver/internal/trace/package_test.go new file mode 100644 index 00000000000..ac6d5ff970c --- /dev/null +++ b/receiver/otlpreceiver/internal/trace/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package trace + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/receiver/otlpreceiver/metadata.yaml b/receiver/otlpreceiver/metadata.yaml new file mode 100644 index 00000000000..c3036a3341d --- /dev/null +++ b/receiver/otlpreceiver/metadata.yaml @@ -0,0 +1,8 @@ +type: otlp + +status: + class: receiver + stability: + stable: [traces, metrics] + beta: [logs] + distributions: [core, contrib] diff --git a/receiver/otlpreceiver/otlp.go b/receiver/otlpreceiver/otlp.go index faf9a68fe04..91936bfb6a5 100644 --- a/receiver/otlpreceiver/otlp.go +++ b/receiver/otlpreceiver/otlp.go @@ -6,7 +6,6 @@ package otlpreceiver // import "go.opentelemetry.io/collector/receiver/otlprecei import ( "context" "errors" - "fmt" "net" "net/http" "sync" @@ -15,7 +14,6 @@ import ( "google.golang.org/grpc" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configgrpc" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/pdata/plog/plogotlp" @@ -32,37 +30,36 @@ import ( type otlpReceiver struct { cfg *Config serverGRPC *grpc.Server - httpMux *http.ServeMux serverHTTP *http.Server - tracesReceiver *trace.Receiver - metricsReceiver *metrics.Receiver - logsReceiver *logs.Receiver - shutdownWG sync.WaitGroup + nextTraces consumer.Traces + nextMetrics consumer.Metrics + nextLogs consumer.Logs + shutdownWG sync.WaitGroup obsrepGRPC *receiverhelper.ObsReport obsrepHTTP *receiverhelper.ObsReport - settings receiver.CreateSettings + settings *receiver.CreateSettings } // newOtlpReceiver just creates the OpenTelemetry receiver services. It is the caller's // responsibility to invoke the respective Start*Reception methods as well // as the various Stop*Reception methods to end it. -func newOtlpReceiver(cfg *Config, set receiver.CreateSettings) (*otlpReceiver, error) { +func newOtlpReceiver(cfg *Config, set *receiver.CreateSettings) (*otlpReceiver, error) { r := &otlpReceiver{ - cfg: cfg, - settings: set, - } - if cfg.HTTP != nil { - r.httpMux = http.NewServeMux() + cfg: cfg, + nextTraces: nil, + nextMetrics: nil, + nextLogs: nil, + settings: set, } var err error r.obsrepGRPC, err = receiverhelper.NewObsReport(receiverhelper.ObsReportSettings{ ReceiverID: set.ID, Transport: "grpc", - ReceiverCreateSettings: set, + ReceiverCreateSettings: *set, }) if err != nil { return nil, err @@ -70,7 +67,7 @@ func newOtlpReceiver(cfg *Config, set receiver.CreateSettings) (*otlpReceiver, e r.obsrepHTTP, err = receiverhelper.NewObsReport(receiverhelper.ObsReportSettings{ ReceiverID: set.ID, Transport: "http", - ReceiverCreateSettings: set, + ReceiverCreateSettings: *set, }) if err != nil { return nil, err @@ -79,91 +76,110 @@ func newOtlpReceiver(cfg *Config, set receiver.CreateSettings) (*otlpReceiver, e return r, nil } -func (r *otlpReceiver) startGRPCServer(cfg *configgrpc.GRPCServerSettings, host component.Host) error { - r.settings.Logger.Info("Starting GRPC server", zap.String("endpoint", cfg.NetAddr.Endpoint)) +func (r *otlpReceiver) startGRPCServer(host component.Host) error { + // If GRPC is not enabled, nothing to start. + if r.cfg.GRPC == nil { + return nil + } - gln, err := cfg.ToListener() - if err != nil { + var err error + if r.serverGRPC, err = r.cfg.GRPC.ToServerContext(context.Background(), host, r.settings.TelemetrySettings); err != nil { + return err + } + + if r.nextTraces != nil { + ptraceotlp.RegisterGRPCServer(r.serverGRPC, trace.New(r.nextTraces, r.obsrepGRPC)) + } + + if r.nextMetrics != nil { + pmetricotlp.RegisterGRPCServer(r.serverGRPC, metrics.New(r.nextMetrics, r.obsrepGRPC)) + } + + if r.nextLogs != nil { + plogotlp.RegisterGRPCServer(r.serverGRPC, logs.New(r.nextLogs, r.obsrepGRPC)) + } + + r.settings.Logger.Info("Starting GRPC server", zap.String("endpoint", r.cfg.GRPC.NetAddr.Endpoint)) + var gln net.Listener + if gln, err = r.cfg.GRPC.NetAddr.Listen(context.Background()); err != nil { return err } + r.shutdownWG.Add(1) go func() { defer r.shutdownWG.Done() if errGrpc := r.serverGRPC.Serve(gln); errGrpc != nil && !errors.Is(errGrpc, grpc.ErrServerStopped) { - host.ReportFatalError(errGrpc) + r.settings.ReportStatus(component.NewFatalErrorEvent(errGrpc)) } }() return nil } -func (r *otlpReceiver) startHTTPServer(cfg *confighttp.HTTPServerSettings, host component.Host) error { - r.settings.Logger.Info("Starting HTTP server", zap.String("endpoint", cfg.Endpoint)) +func (r *otlpReceiver) startHTTPServer(host component.Host) error { + // If HTTP is not enabled, nothing to start. + if r.cfg.HTTP == nil { + return nil + } + + httpMux := http.NewServeMux() + if r.nextTraces != nil { + httpTracesReceiver := trace.New(r.nextTraces, r.obsrepHTTP) + httpMux.HandleFunc(r.cfg.HTTP.TracesURLPath, func(resp http.ResponseWriter, req *http.Request) { + handleTraces(resp, req, httpTracesReceiver) + }) + } + + if r.nextMetrics != nil { + httpMetricsReceiver := metrics.New(r.nextMetrics, r.obsrepHTTP) + httpMux.HandleFunc(r.cfg.HTTP.MetricsURLPath, func(resp http.ResponseWriter, req *http.Request) { + handleMetrics(resp, req, httpMetricsReceiver) + }) + } + + if r.nextLogs != nil { + httpLogsReceiver := logs.New(r.nextLogs, r.obsrepHTTP) + httpMux.HandleFunc(r.cfg.HTTP.LogsURLPath, func(resp http.ResponseWriter, req *http.Request) { + handleLogs(resp, req, httpLogsReceiver) + }) + } + + var err error + if r.serverHTTP, err = r.cfg.HTTP.ToServer(host, r.settings.TelemetrySettings, httpMux, confighttp.WithErrorHandler(errorHandler)); err != nil { + return err + } + + r.settings.Logger.Info("Starting HTTP server", zap.String("endpoint", r.cfg.HTTP.ServerConfig.Endpoint)) var hln net.Listener - hln, err := cfg.ToListener() - if err != nil { + if hln, err = r.cfg.HTTP.ServerConfig.ToListener(); err != nil { return err } + r.shutdownWG.Add(1) go func() { defer r.shutdownWG.Done() if errHTTP := r.serverHTTP.Serve(hln); errHTTP != nil && !errors.Is(errHTTP, http.ErrServerClosed) { - host.ReportFatalError(errHTTP) + r.settings.ReportStatus(component.NewFatalErrorEvent(errHTTP)) } }() return nil } -func (r *otlpReceiver) startProtocolServers(host component.Host) error { - var err error - if r.cfg.GRPC != nil { - r.serverGRPC, err = r.cfg.GRPC.ToServer(host, r.settings.TelemetrySettings) - if err != nil { - return err - } - - if r.tracesReceiver != nil { - ptraceotlp.RegisterGRPCServer(r.serverGRPC, r.tracesReceiver) - } - - if r.metricsReceiver != nil { - pmetricotlp.RegisterGRPCServer(r.serverGRPC, r.metricsReceiver) - } - - if r.logsReceiver != nil { - plogotlp.RegisterGRPCServer(r.serverGRPC, r.logsReceiver) - } - - err = r.startGRPCServer(r.cfg.GRPC, host) - if err != nil { - return err - } +// Start runs the trace receiver on the gRPC server. Currently +// it also enables the metrics receiver too. +func (r *otlpReceiver) Start(ctx context.Context, host component.Host) error { + if err := r.startGRPCServer(host); err != nil { + return err } - if r.cfg.HTTP != nil { - r.serverHTTP, err = r.cfg.HTTP.ToServer( - host, - r.settings.TelemetrySettings, - r.httpMux, - confighttp.WithErrorHandler(errorHandler), - ) - if err != nil { - return err - } - - err = r.startHTTPServer(r.cfg.HTTP.HTTPServerSettings, host) - if err != nil { - return err - } + if err := r.startHTTPServer(host); err != nil { + // It's possible that a valid GRPC server configuration was specified, + // but an invalid HTTP configuration. If that's the case, the successfully + // started GRPC server must be shutdown to ensure no goroutines are leaked. + return errors.Join(err, r.Shutdown(ctx)) } - return err -} - -// Start runs the trace receiver on the gRPC server. Currently -// it also enables the metrics receiver too. -func (r *otlpReceiver) Start(_ context.Context, host component.Host) error { - return r.startProtocolServers(host) + return nil } // Shutdown is a method to turn off receiving. @@ -182,87 +198,14 @@ func (r *otlpReceiver) Shutdown(ctx context.Context) error { return err } -func (r *otlpReceiver) registerTraceConsumer(tc consumer.Traces) error { - if tc == nil { - return component.ErrNilNextConsumer - } - r.tracesReceiver = trace.New(tc, r.obsrepGRPC) - httpTracesReceiver := trace.New(tc, r.obsrepHTTP) - if r.httpMux != nil { - r.httpMux.HandleFunc(r.cfg.HTTP.TracesURLPath, func(resp http.ResponseWriter, req *http.Request) { - if req.Method != http.MethodPost { - handleUnmatchedMethod(resp) - return - } - switch getMimeTypeFromContentType(req.Header.Get("Content-Type")) { - case pbContentType: - handleTraces(resp, req, httpTracesReceiver, pbEncoder) - case jsonContentType: - handleTraces(resp, req, httpTracesReceiver, jsEncoder) - default: - handleUnmatchedContentType(resp) - } - }) - } - return nil -} - -func (r *otlpReceiver) registerMetricsConsumer(mc consumer.Metrics) error { - if mc == nil { - return component.ErrNilNextConsumer - } - r.metricsReceiver = metrics.New(mc, r.obsrepGRPC) - httpMetricsReceiver := metrics.New(mc, r.obsrepHTTP) - if r.httpMux != nil { - r.httpMux.HandleFunc(r.cfg.HTTP.MetricsURLPath, func(resp http.ResponseWriter, req *http.Request) { - if req.Method != http.MethodPost { - handleUnmatchedMethod(resp) - return - } - switch getMimeTypeFromContentType(req.Header.Get("Content-Type")) { - case pbContentType: - handleMetrics(resp, req, httpMetricsReceiver, pbEncoder) - case jsonContentType: - handleMetrics(resp, req, httpMetricsReceiver, jsEncoder) - default: - handleUnmatchedContentType(resp) - } - }) - } - return nil -} - -func (r *otlpReceiver) registerLogsConsumer(lc consumer.Logs) error { - if lc == nil { - return component.ErrNilNextConsumer - } - r.logsReceiver = logs.New(lc, r.obsrepGRPC) - httpLogsReceiver := logs.New(lc, r.obsrepHTTP) - if r.httpMux != nil { - r.httpMux.HandleFunc(r.cfg.HTTP.LogsURLPath, func(resp http.ResponseWriter, req *http.Request) { - if req.Method != http.MethodPost { - handleUnmatchedMethod(resp) - return - } - switch getMimeTypeFromContentType(req.Header.Get("Content-Type")) { - case pbContentType: - handleLogs(resp, req, httpLogsReceiver, pbEncoder) - case jsonContentType: - handleLogs(resp, req, httpLogsReceiver, jsEncoder) - default: - handleUnmatchedContentType(resp) - } - }) - } - return nil +func (r *otlpReceiver) registerTraceConsumer(tc consumer.Traces) { + r.nextTraces = tc } -func handleUnmatchedMethod(resp http.ResponseWriter) { - status := http.StatusMethodNotAllowed - writeResponse(resp, "text/plain", status, []byte(fmt.Sprintf("%v method not allowed, supported: [POST]", status))) +func (r *otlpReceiver) registerMetricsConsumer(mc consumer.Metrics) { + r.nextMetrics = mc } -func handleUnmatchedContentType(resp http.ResponseWriter) { - status := http.StatusUnsupportedMediaType - writeResponse(resp, "text/plain", status, []byte(fmt.Sprintf("%v unsupported media type, supported: [%s, %s]", status, jsonContentType, pbContentType))) +func (r *otlpReceiver) registerLogsConsumer(lc consumer.Logs) { + r.nextLogs = lc } diff --git a/receiver/otlpreceiver/otlp_test.go b/receiver/otlpreceiver/otlp_test.go index bc7cd3738b7..85b261cd6af 100644 --- a/receiver/otlpreceiver/otlp_test.go +++ b/receiver/otlpreceiver/otlp_test.go @@ -13,6 +13,7 @@ import ( "io" "net" "net/http" + "strings" "sync" "testing" "time" @@ -32,100 +33,22 @@ import ( "go.opentelemetry.io/collector/config/configgrpc" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/confignet" - "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/internal/testutil" - "go.opentelemetry.io/collector/obsreport/obsreporttest" + "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" "go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp" - "go.opentelemetry.io/collector/receiver" "go.opentelemetry.io/collector/receiver/receivertest" - semconv "go.opentelemetry.io/collector/semconv/v1.5.0" ) const otlpReceiverName = "receiver_test" -var otlpReceiverID = component.NewIDWithName(typeStr, otlpReceiverName) - -var traceJSON = []byte(` - { - "resource_spans": [ - { - "resource": { - "attributes": [ - { - "key": "host.name", - "value": { "stringValue": "testHost" } - } - ] - }, - "scope_spans": [ - { - "spans": [ - { - "trace_id": "5B8EFFF798038103D269B633813FC60C", - "span_id": "EEE19B7EC3C1B174", - "parent_span_id": "EEE19B7EC3C1B173", - "name": "testSpan", - "start_time_unix_nano": 1544712660300000000, - "end_time_unix_nano": 1544712660600000000, - "kind": 2, - "attributes": [ - { - "key": "attr1", - "value": { "intValue": 55 } - } - ] - }, - { - "trace_id": "5B8EFFF798038103D269B633813FC60C", - "span_id": "EEE19B7EC3C1B173", - "name": "testSpan", - "start_time_unix_nano": 1544712660000000000, - "end_time_unix_nano": 1544712661000000000, - "kind": "SPAN_KIND_CLIENT", - "attributes": [ - { - "key": "attr1", - "value": { "intValue": 55 } - } - ] - } - ] - } - ] - } - ] - }`) - -var traceOtlp = func() ptrace.Traces { - td := ptrace.NewTraces() - rs := td.ResourceSpans().AppendEmpty() - rs.Resource().Attributes().PutStr(semconv.AttributeHostName, "testHost") - spans := rs.ScopeSpans().AppendEmpty().Spans() - span1 := spans.AppendEmpty() - span1.SetTraceID([16]byte{0x5B, 0x8E, 0xFF, 0xF7, 0x98, 0x3, 0x81, 0x3, 0xD2, 0x69, 0xB6, 0x33, 0x81, 0x3F, 0xC6, 0xC}) - span1.SetSpanID([8]byte{0xEE, 0xE1, 0x9B, 0x7E, 0xC3, 0xC1, 0xB1, 0x74}) - span1.SetParentSpanID([8]byte{0xEE, 0xE1, 0x9B, 0x7E, 0xC3, 0xC1, 0xB1, 0x73}) - span1.SetName("testSpan") - span1.SetStartTimestamp(1544712660300000000) - span1.SetEndTimestamp(1544712660600000000) - span1.SetKind(ptrace.SpanKindServer) - span1.Attributes().PutInt("attr1", 55) - span2 := spans.AppendEmpty() - span2.SetTraceID([16]byte{0x5B, 0x8E, 0xFF, 0xF7, 0x98, 0x3, 0x81, 0x3, 0xD2, 0x69, 0xB6, 0x33, 0x81, 0x3F, 0xC6, 0xC}) - span2.SetSpanID([8]byte{0xEE, 0xE1, 0x9B, 0x7E, 0xC3, 0xC1, 0xB1, 0x73}) - span2.SetName("testSpan") - span2.SetStartTimestamp(1544712660000000000) - span2.SetEndTimestamp(1544712661000000000) - span2.SetKind(ptrace.SpanKindClient) - span2.Attributes().PutInt("attr1", 55) - return td -}() +var otlpReceiverID = component.MustNewIDWithName("otlp", otlpReceiverName) func TestJsonHttp(t *testing.T) { tests := []struct { @@ -169,78 +92,49 @@ func TestJsonHttp(t *testing.T) { name: "GRPCError", encoding: "", contentType: "application/json", - err: status.New(codes.Internal, "").Err(), + err: status.New(codes.Unavailable, "").Err(), }, } addr := testutil.GetAvailableLocalAddress(t) - tracesURLPath := "/v1/traceingest" - metricsURLPath := "/v1/metricingest" - logsURLPath := "/v1/logingest" + sink := newErrOrSinkConsumer() + recv := newHTTPReceiver(t, componenttest.NewNopTelemetrySettings(), addr, sink) + require.NoError(t, recv.Start(context.Background(), componenttest.NewNopHost()), "Failed to start trace receiver") + t.Cleanup(func() { require.NoError(t, recv.Shutdown(context.Background())) }) - // Set the buffer count to 1 to make it flush the test span immediately. - sink := &errOrSinkConsumer{TracesSink: new(consumertest.TracesSink)} - ocr := newHTTPReceiver(t, addr, tracesURLPath, metricsURLPath, logsURLPath, sink, nil) - - require.NoError(t, ocr.Start(context.Background(), componenttest.NewNopHost()), "Failed to start trace receiver") - t.Cleanup(func() { require.NoError(t, ocr.Shutdown(context.Background())) }) - - // TODO(nilebox): make starting server deterministic - // Wait for the servers to start - <-time.After(10 * time.Millisecond) - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - url := fmt.Sprintf("http://%s%s", addr, tracesURLPath) + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { sink.Reset() - testHTTPJSONRequest(t, url, sink, test.encoding, test.contentType, test.err) + sink.SetConsumeError(tt.err) + + for _, dr := range generateDataRequests(t) { + url := "http://" + addr + dr.path + respBytes := doHTTPRequest(t, url, tt.encoding, tt.contentType, dr.jsonBytes, tt.err != nil) + if tt.err == nil { + tr := ptraceotlp.NewExportResponse() + assert.NoError(t, tr.UnmarshalJSON(respBytes), "Unable to unmarshal response to Response") + sink.checkData(t, dr.data, 1) + } else { + errStatus := &spb.Status{} + assert.NoError(t, json.Unmarshal(respBytes, errStatus)) + if s, ok := status.FromError(tt.err); ok { + assert.True(t, proto.Equal(errStatus, s.Proto())) + } else { + fmt.Println(errStatus) + assert.True(t, proto.Equal(errStatus, &spb.Status{Code: int32(codes.Unavailable), Message: "my error"})) + } + sink.checkData(t, dr.data, 0) + } + } }) } } func TestHandleInvalidRequests(t *testing.T) { - endpoint := testutil.GetAvailableLocalAddress(t) - cfg := &Config{ - Protocols: Protocols{ - HTTP: &HTTPConfig{ - HTTPServerSettings: &confighttp.HTTPServerSettings{ - Endpoint: endpoint, - }, - TracesURLPath: defaultTracesURLPath, - MetricsURLPath: defaultMetricsURLPath, - LogsURLPath: defaultLogsURLPath, - }, - }, - } - - // Traces - tr, err := NewFactory().CreateTracesReceiver( - context.Background(), - receivertest.NewNopCreateSettings(), - cfg, - consumertest.NewNop()) - require.NoError(t, err) - assert.NotNil(t, tr) - require.NoError(t, tr.Start(context.Background(), componenttest.NewNopHost())) - - // Metrics - mr, err := NewFactory().CreateMetricsReceiver( - context.Background(), - receivertest.NewNopCreateSettings(), - cfg, - consumertest.NewNop()) - require.NoError(t, err) - assert.NotNil(t, tr) - require.NoError(t, mr.Start(context.Background(), componenttest.NewNopHost())) - - // Logs - lr, err := NewFactory().CreateLogsReceiver( - context.Background(), - receivertest.NewNopCreateSettings(), - cfg, - consumertest.NewNop()) - require.NoError(t, err) - assert.NotNil(t, tr) - require.NoError(t, lr.Start(context.Background(), componenttest.NewNopHost())) + addr := testutil.GetAvailableLocalAddress(t) + sink := newErrOrSinkConsumer() + recv := newHTTPReceiver(t, componenttest.NewNopTelemetrySettings(), addr, sink) + require.NoError(t, recv.Start(context.Background(), componenttest.NewNopHost()), "Failed to start trace receiver") + t.Cleanup(func() { require.NoError(t, recv.Shutdown(context.Background())) }) tests := []struct { name string @@ -252,8 +146,8 @@ func TestHandleInvalidRequests(t *testing.T) { expectedResponseBody string }{ { - name: "POST /v1/traces, no content type", - uri: "/v1/traces", + name: "no content type", + uri: defaultTracesURLPath, method: http.MethodPost, contentType: "", @@ -261,8 +155,8 @@ func TestHandleInvalidRequests(t *testing.T) { expectedResponseBody: "415 unsupported media type, supported: [application/json, application/x-protobuf]", }, { - name: "POST /v1/traces, invalid content type", - uri: "/v1/traces", + name: "invalid content type", + uri: defaultTracesURLPath, method: http.MethodPost, contentType: "invalid", @@ -270,8 +164,15 @@ func TestHandleInvalidRequests(t *testing.T) { expectedResponseBody: "415 unsupported media type, supported: [application/json, application/x-protobuf]", }, { - name: "PATCH /v1/traces", - uri: "/v1/traces", + name: "invalid request", + uri: defaultTracesURLPath, + method: http.MethodPost, + contentType: "application/json", + + expectedStatus: http.StatusBadRequest, + }, + { + uri: defaultTracesURLPath, method: http.MethodPatch, contentType: "application/json", @@ -279,8 +180,7 @@ func TestHandleInvalidRequests(t *testing.T) { expectedResponseBody: "405 method not allowed, supported: [POST]", }, { - name: "GET /v1/traces", - uri: "/v1/traces", + uri: defaultTracesURLPath, method: http.MethodGet, contentType: "application/json", @@ -288,8 +188,8 @@ func TestHandleInvalidRequests(t *testing.T) { expectedResponseBody: "405 method not allowed, supported: [POST]", }, { - name: "POST /v1/metrics, no content type", - uri: "/v1/metrics", + name: "no content type", + uri: defaultMetricsURLPath, method: http.MethodPost, contentType: "", @@ -297,8 +197,8 @@ func TestHandleInvalidRequests(t *testing.T) { expectedResponseBody: "415 unsupported media type, supported: [application/json, application/x-protobuf]", }, { - name: "POST /v1/metrics, no content type", - uri: "/v1/metrics", + name: "invalid content type", + uri: defaultMetricsURLPath, method: http.MethodPost, contentType: "invalid", @@ -306,8 +206,15 @@ func TestHandleInvalidRequests(t *testing.T) { expectedResponseBody: "415 unsupported media type, supported: [application/json, application/x-protobuf]", }, { - name: "PATCH /v1/metrics", - uri: "/v1/metrics", + name: "invalid request", + uri: defaultMetricsURLPath, + method: http.MethodPost, + contentType: "application/json", + + expectedStatus: http.StatusBadRequest, + }, + { + uri: defaultMetricsURLPath, method: http.MethodPatch, contentType: "application/json", @@ -315,8 +222,7 @@ func TestHandleInvalidRequests(t *testing.T) { expectedResponseBody: "405 method not allowed, supported: [POST]", }, { - name: "GET /v1/metrics", - uri: "/v1/metrics", + uri: defaultMetricsURLPath, method: http.MethodGet, contentType: "application/json", @@ -324,8 +230,8 @@ func TestHandleInvalidRequests(t *testing.T) { expectedResponseBody: "405 method not allowed, supported: [POST]", }, { - name: "POST /v1/logs, no content type", - uri: "/v1/logs", + name: "no content type", + uri: defaultLogsURLPath, method: http.MethodPost, contentType: "", @@ -333,8 +239,8 @@ func TestHandleInvalidRequests(t *testing.T) { expectedResponseBody: "415 unsupported media type, supported: [application/json, application/x-protobuf]", }, { - name: "POST /v1/logs, no content type", - uri: "/v1/logs", + name: "invalid content type", + uri: defaultLogsURLPath, method: http.MethodPost, contentType: "invalid", @@ -342,8 +248,15 @@ func TestHandleInvalidRequests(t *testing.T) { expectedResponseBody: "415 unsupported media type, supported: [application/json, application/x-protobuf]", }, { - name: "PATCH /v1/logs", - uri: "/v1/logs", + name: "invalid request", + uri: defaultLogsURLPath, + method: http.MethodPost, + contentType: "application/json", + + expectedStatus: http.StatusBadRequest, + }, + { + uri: defaultLogsURLPath, method: http.MethodPatch, contentType: "application/json", @@ -351,8 +264,7 @@ func TestHandleInvalidRequests(t *testing.T) { expectedResponseBody: "405 method not allowed, supported: [POST]", }, { - name: "GET /v1/logs", - uri: "/v1/logs", + uri: defaultLogsURLPath, method: http.MethodGet, contentType: "application/json", @@ -361,79 +273,31 @@ func TestHandleInvalidRequests(t *testing.T) { }, } - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - url := fmt.Sprintf("http://%s%s", endpoint, test.uri) - req, err2 := http.NewRequest(test.method, url, bytes.NewReader([]byte(`{}`))) - require.NoError(t, err2) - req.Header.Set("Content-Type", test.contentType) + for _, tt := range tests { + t.Run(tt.method+" "+tt.uri+" "+tt.name, func(t *testing.T) { + url := "http://" + addr + tt.uri + req, err := http.NewRequest(tt.method, url, bytes.NewReader([]byte(`1234`))) + require.NoError(t, err) + req.Header.Set("Content-Type", tt.contentType) - client := &http.Client{} - resp, err2 := client.Do(req) - require.NoError(t, err2) + resp, err := http.DefaultClient.Do(req) + require.NoError(t, err) - body, err2 := io.ReadAll(resp.Body) - require.NoError(t, err2) + body, err := io.ReadAll(resp.Body) + require.NoError(t, err) - require.Equal(t, resp.Header.Get("Content-Type"), "text/plain") - require.Equal(t, resp.StatusCode, test.expectedStatus) - require.EqualValues(t, body, test.expectedResponseBody) + if tt.name == "invalid request" { + assert.Equal(t, "application/json", resp.Header.Get("Content-Type")) + assert.Equal(t, tt.expectedStatus, resp.StatusCode) + return + } + assert.Equal(t, "text/plain", resp.Header.Get("Content-Type")) + assert.Equal(t, tt.expectedStatus, resp.StatusCode) + assert.Equal(t, tt.expectedResponseBody, string(body)) }) } - err = tr.Shutdown(context.Background()) - require.NoError(t, err) -} - -func testHTTPJSONRequest(t *testing.T, url string, sink *errOrSinkConsumer, encoding string, contentType string, expectedErr error) { - var buf *bytes.Buffer - var err error - switch encoding { - case "gzip": - buf, err = compressGzip(traceJSON) - require.NoError(t, err, "Error while gzip compressing trace: %v", err) - case "zstd": - buf, err = compressZstd(traceJSON) - require.NoError(t, err, "Error while zstd compressing trace: %v", err) - case "": - buf = bytes.NewBuffer(traceJSON) - default: - t.Fatalf("Unsupported compression type %v", encoding) - } - sink.SetConsumeError(expectedErr) - req, err := http.NewRequest(http.MethodPost, url, buf) - require.NoError(t, err, "Error creating trace POST request: %v", err) - req.Header.Set("Content-Type", contentType) - req.Header.Set("Content-Encoding", encoding) - - client := &http.Client{} - resp, err := client.Do(req) - require.NoError(t, err, "Error posting trace to http server: %v", err) - - respBytes, err := io.ReadAll(resp.Body) - require.NoError(t, err) - require.NoError(t, resp.Body.Close()) - - allTraces := sink.AllTraces() - if expectedErr == nil { - assert.Equal(t, 200, resp.StatusCode) - tr := ptraceotlp.NewExportResponse() - assert.NoError(t, tr.UnmarshalJSON(respBytes), "Unable to unmarshal response to Response") - - require.Len(t, allTraces, 1) - assert.EqualValues(t, allTraces[0], traceOtlp) - } else { - errStatus := &spb.Status{} - assert.NoError(t, json.Unmarshal(respBytes, errStatus)) - if s, ok := status.FromError(expectedErr); ok { - assert.Equal(t, http.StatusInternalServerError, resp.StatusCode) - assert.True(t, proto.Equal(errStatus, s.Proto())) - } else { - assert.Equal(t, http.StatusInternalServerError, resp.StatusCode) - assert.True(t, proto.Equal(errStatus, &spb.Status{Code: int32(codes.Unknown), Message: "my error"})) - } - require.Len(t, allTraces, 0) - } + require.NoError(t, recv.Shutdown(context.Background())) } func TestProtoHttp(t *testing.T) { @@ -462,110 +326,45 @@ func TestProtoHttp(t *testing.T) { { name: "GRPCError", encoding: "", - err: status.New(codes.Internal, "").Err(), + err: status.New(codes.Unavailable, "").Err(), }, } addr := testutil.GetAvailableLocalAddress(t) // Set the buffer count to 1 to make it flush the test span immediately. - tSink := &errOrSinkConsumer{TracesSink: new(consumertest.TracesSink)} - ocr := newHTTPReceiver(t, addr, defaultTracesURLPath, defaultMetricsURLPath, defaultLogsURLPath, tSink, consumertest.NewNop()) - - require.NoError(t, ocr.Start(context.Background(), componenttest.NewNopHost()), "Failed to start trace receiver") - t.Cleanup(func() { require.NoError(t, ocr.Shutdown(context.Background())) }) + sink := newErrOrSinkConsumer() + recv := newHTTPReceiver(t, componenttest.NewNopTelemetrySettings(), addr, sink) - // TODO(nilebox): make starting server deterministic - // Wait for the servers to start - <-time.After(10 * time.Millisecond) - - td := testdata.GenerateTraces(1) - marshaler := &ptrace.ProtoMarshaler{} - traceBytes, err := marshaler.MarshalTraces(td) - require.NoError(t, err) + require.NoError(t, recv.Start(context.Background(), componenttest.NewNopHost()), "Failed to start trace receiver") + t.Cleanup(func() { require.NoError(t, recv.Shutdown(context.Background())) }) - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - url := fmt.Sprintf("http://%s%s", addr, defaultTracesURLPath) - tSink.Reset() - testHTTPProtobufRequest(t, url, tSink, test.encoding, traceBytes, test.err, td) + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + sink.Reset() + sink.SetConsumeError(tt.err) + + for _, dr := range generateDataRequests(t) { + url := "http://" + addr + dr.path + respBytes := doHTTPRequest(t, url, tt.encoding, "application/x-protobuf", dr.protoBytes, tt.err != nil) + if tt.err == nil { + tr := ptraceotlp.NewExportResponse() + assert.NoError(t, tr.UnmarshalProto(respBytes)) + sink.checkData(t, dr.data, 1) + } else { + errStatus := &spb.Status{} + assert.NoError(t, proto.Unmarshal(respBytes, errStatus)) + if s, ok := status.FromError(tt.err); ok { + assert.True(t, proto.Equal(errStatus, s.Proto())) + } else { + assert.True(t, proto.Equal(errStatus, &spb.Status{Code: int32(codes.Unavailable), Message: "my error"})) + } + sink.checkData(t, dr.data, 0) + } + } }) } } -func createHTTPProtobufRequest( - t *testing.T, - url string, - encoding string, - traceBytes []byte, -) *http.Request { - var buf *bytes.Buffer - var err error - switch encoding { - case "gzip": - buf, err = compressGzip(traceBytes) - require.NoError(t, err, "Error while gzip compressing trace: %v", err) - case "zstd": - buf, err = compressZstd(traceBytes) - require.NoError(t, err, "Error while zstd compressing trace: %v", err) - case "": - buf = bytes.NewBuffer(traceBytes) - default: - t.Fatalf("Unsupported compression type %v", encoding) - } - req, err := http.NewRequest(http.MethodPost, url, buf) - require.NoError(t, err, "Error creating trace POST request: %v", err) - req.Header.Set("Content-Type", "application/x-protobuf") - req.Header.Set("Content-Encoding", encoding) - return req -} - -func testHTTPProtobufRequest( - t *testing.T, - url string, - tSink *errOrSinkConsumer, - encoding string, - traceBytes []byte, - expectedErr error, - wantData ptrace.Traces, -) { - tSink.SetConsumeError(expectedErr) - - req := createHTTPProtobufRequest(t, url, encoding, traceBytes) - - client := &http.Client{} - resp, err := client.Do(req) - require.NoError(t, err, "Error posting trace to grpc-gateway server: %v", err) - - respBytes, err := io.ReadAll(resp.Body) - require.NoError(t, err, "Error reading response from trace grpc-gateway") - require.NoError(t, resp.Body.Close(), "Error closing response body") - - assert.Equal(t, "application/x-protobuf", resp.Header.Get("Content-Type"), "Unexpected response Content-Type") - - allTraces := tSink.AllTraces() - - if expectedErr == nil { - require.Equal(t, 200, resp.StatusCode, "Unexpected return status") - - tr := ptraceotlp.NewExportResponse() - assert.NoError(t, tr.UnmarshalProto(respBytes), "Unable to unmarshal response to Response") - - require.Len(t, allTraces, 1) - assert.EqualValues(t, allTraces[0], wantData) - } else { - errStatus := &spb.Status{} - assert.NoError(t, proto.Unmarshal(respBytes, errStatus)) - if s, ok := status.FromError(expectedErr); ok { - assert.Equal(t, http.StatusInternalServerError, resp.StatusCode) - assert.True(t, proto.Equal(errStatus, s.Proto())) - } else { - assert.Equal(t, http.StatusInternalServerError, resp.StatusCode) - assert.True(t, proto.Equal(errStatus, &spb.Status{Code: int32(codes.Unknown), Message: "my error"})) - } - require.Len(t, allTraces, 0) - } -} - func TestOTLPReceiverInvalidContentEncoding(t *testing.T) { tests := []struct { name string @@ -615,18 +414,13 @@ func TestOTLPReceiverInvalidContentEncoding(t *testing.T) { addr := testutil.GetAvailableLocalAddress(t) // Set the buffer count to 1 to make it flush the test span immediately. - tSink := new(consumertest.TracesSink) - mSink := new(consumertest.MetricsSink) - ocr := newHTTPReceiver(t, addr, defaultTracesURLPath, defaultMetricsURLPath, defaultLogsURLPath, tSink, mSink) + recv := newHTTPReceiver(t, componenttest.NewNopTelemetrySettings(), addr, consumertest.NewNop()) - require.NoError(t, ocr.Start(context.Background(), componenttest.NewNopHost()), "Failed to start trace receiver") - t.Cleanup(func() { require.NoError(t, ocr.Shutdown(context.Background())) }) + require.NoError(t, recv.Start(context.Background(), componenttest.NewNopHost()), "Failed to start trace receiver") + t.Cleanup(func() { require.NoError(t, recv.Shutdown(context.Background())) }) url := fmt.Sprintf("http://%s%s", addr, defaultTracesURLPath) - // Wait for the servers to start - <-time.After(10 * time.Millisecond) - for _, test := range tests { t.Run(test.name, func(t *testing.T) { body, err := test.reqBodyFunc() @@ -637,8 +431,7 @@ func TestOTLPReceiverInvalidContentEncoding(t *testing.T) { req.Header.Set("Content-Type", test.content) req.Header.Set("Content-Encoding", test.encoding) - client := &http.Client{} - resp, err := client.Do(req) + resp, err := http.DefaultClient.Do(req) require.NoError(t, err, "Error posting trace to grpc-gateway server: %v", err) respBytes, err := io.ReadAll(resp.Body) @@ -662,7 +455,7 @@ func TestGRPCNewPortAlreadyUsed(t *testing.T) { assert.NoError(t, ln.Close()) }) - r := newGRPCReceiver(t, addr, consumertest.NewNop(), consumertest.NewNop()) + r := newGRPCReceiver(t, componenttest.NewNopTelemetrySettings(), addr, consumertest.NewNop()) require.NotNil(t, r) require.Error(t, r.Start(context.Background(), componenttest.NewNopHost())) @@ -676,7 +469,7 @@ func TestHTTPNewPortAlreadyUsed(t *testing.T) { assert.NoError(t, ln.Close()) }) - r := newHTTPReceiver(t, addr, defaultTracesURLPath, defaultMetricsURLPath, defaultLogsURLPath, consumertest.NewNop(), consumertest.NewNop()) + r := newHTTPReceiver(t, componenttest.NewNopTelemetrySettings(), addr, consumertest.NewNop()) require.NotNil(t, r) require.Error(t, r.Start(context.Background(), componenttest.NewNopHost())) @@ -691,11 +484,12 @@ func TestHTTPNewPortAlreadyUsed(t *testing.T) { func TestOTLPReceiverGRPCTracesIngestTest(t *testing.T) { type ingestionStateTest struct { okToIngest bool + permanent bool expectedCode codes.Code } expectedReceivedBatches := 2 - expectedIngestionBlockedRPCs := 1 + expectedIngestionBlockedRPCs := 2 ingestionStates := []ingestionStateTest{ { okToIngest: true, @@ -703,7 +497,12 @@ func TestOTLPReceiverGRPCTracesIngestTest(t *testing.T) { }, { okToIngest: false, - expectedCode: codes.Unknown, + expectedCode: codes.Unavailable, + }, + { + okToIngest: false, + expectedCode: codes.Internal, + permanent: true, }, { okToIngest: true, @@ -714,16 +513,16 @@ func TestOTLPReceiverGRPCTracesIngestTest(t *testing.T) { addr := testutil.GetAvailableLocalAddress(t) td := testdata.GenerateTraces(1) - tt, err := obsreporttest.SetupTelemetry(otlpReceiverID) + tt, err := componenttest.SetupTelemetry(otlpReceiverID) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) sink := &errOrSinkConsumer{TracesSink: new(consumertest.TracesSink)} - ocr := newGRPCReceiver(t, addr, sink, nil) - require.NotNil(t, ocr) - require.NoError(t, ocr.Start(context.Background(), componenttest.NewNopHost())) - t.Cleanup(func() { require.NoError(t, ocr.Shutdown(context.Background())) }) + recv := newGRPCReceiver(t, tt.TelemetrySettings(), addr, sink) + require.NotNil(t, recv) + require.NoError(t, recv.Start(context.Background(), componenttest.NewNopHost())) + t.Cleanup(func() { require.NoError(t, recv.Shutdown(context.Background())) }) cc, err := grpc.Dial(addr, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) require.NoError(t, err) @@ -735,7 +534,11 @@ func TestOTLPReceiverGRPCTracesIngestTest(t *testing.T) { if ingestionState.okToIngest { sink.SetConsumeError(nil) } else { - sink.SetConsumeError(errors.New("consumer error")) + if ingestionState.permanent { + sink.SetConsumeError(consumererror.NewPermanent(errors.New("consumer error"))) + } else { + sink.SetConsumeError(errors.New("consumer error")) + } } _, err = ptraceotlp.NewGRPCClient(cc).Export(context.Background(), ptraceotlp.NewExportRequestFromTraces(td)) @@ -770,7 +573,7 @@ func TestOTLPReceiverHTTPTracesIngestTest(t *testing.T) { }, { okToIngest: false, - expectedCode: codes.Unknown, + expectedCode: codes.Unavailable, }, { okToIngest: true, @@ -781,16 +584,16 @@ func TestOTLPReceiverHTTPTracesIngestTest(t *testing.T) { addr := testutil.GetAvailableLocalAddress(t) td := testdata.GenerateTraces(1) - tt, err := obsreporttest.SetupTelemetry(otlpReceiverID) + tt, err := componenttest.SetupTelemetry(otlpReceiverID) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) sink := &errOrSinkConsumer{TracesSink: new(consumertest.TracesSink)} - ocr := newHTTPReceiver(t, addr, defaultTracesURLPath, defaultMetricsURLPath, defaultLogsURLPath, sink, nil) - require.NotNil(t, ocr) - require.NoError(t, ocr.Start(context.Background(), componenttest.NewNopHost())) - t.Cleanup(func() { require.NoError(t, ocr.Shutdown(context.Background())) }) + recv := newHTTPReceiver(t, tt.TelemetrySettings(), addr, sink) + require.NotNil(t, recv) + require.NoError(t, recv.Start(context.Background(), componenttest.NewNopHost())) + t.Cleanup(func() { require.NoError(t, recv.Shutdown(context.Background())) }) for _, ingestionState := range ingestionStates { if ingestionState.okToIngest { @@ -830,13 +633,13 @@ func TestOTLPReceiverHTTPTracesIngestTest(t *testing.T) { func TestGRPCInvalidTLSCredentials(t *testing.T) { cfg := &Config{ Protocols: Protocols{ - GRPC: &configgrpc.GRPCServerSettings{ - NetAddr: confignet.NetAddr{ + GRPC: &configgrpc.ServerConfig{ + NetAddr: confignet.AddrConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), Transport: "tcp", }, - TLSSetting: &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: &configtls.ServerConfig{ + TLSSetting: configtls.Config{ CertFile: "willfail", }, }, @@ -859,16 +662,13 @@ func TestGRPCInvalidTLSCredentials(t *testing.T) { func TestGRPCMaxRecvSize(t *testing.T) { addr := testutil.GetAvailableLocalAddress(t) - sink := new(consumertest.TracesSink) + sink := newErrOrSinkConsumer() - factory := NewFactory() - cfg := factory.CreateDefaultConfig().(*Config) + cfg := createDefaultConfig().(*Config) cfg.GRPC.NetAddr.Endpoint = addr cfg.HTTP = nil - ocr := newReceiver(t, factory, cfg, otlpReceiverID, sink, nil) - - require.NotNil(t, ocr) - require.NoError(t, ocr.Start(context.Background(), componenttest.NewNopHost())) + recv := newReceiver(t, componenttest.NewNopTelemetrySettings(), cfg, otlpReceiverID, sink) + require.NoError(t, recv.Start(context.Background(), componenttest.NewNopHost())) cc, err := grpc.Dial(addr, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) require.NoError(t, err) @@ -876,14 +676,12 @@ func TestGRPCMaxRecvSize(t *testing.T) { td := testdata.GenerateTraces(50000) require.Error(t, exportTraces(cc, td)) assert.NoError(t, cc.Close()) - require.NoError(t, ocr.Shutdown(context.Background())) + require.NoError(t, recv.Shutdown(context.Background())) cfg.GRPC.MaxRecvMsgSizeMiB = 100 - ocr = newReceiver(t, factory, cfg, otlpReceiverID, sink, nil) - - require.NotNil(t, ocr) - require.NoError(t, ocr.Start(context.Background(), componenttest.NewNopHost())) - t.Cleanup(func() { require.NoError(t, ocr.Shutdown(context.Background())) }) + recv = newReceiver(t, componenttest.NewNopTelemetrySettings(), cfg, otlpReceiverID, sink) + require.NoError(t, recv.Start(context.Background(), componenttest.NewNopHost())) + t.Cleanup(func() { require.NoError(t, recv.Shutdown(context.Background())) }) cc, err = grpc.Dial(addr, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) require.NoError(t, err) @@ -901,10 +699,10 @@ func TestHTTPInvalidTLSCredentials(t *testing.T) { cfg := &Config{ Protocols: Protocols{ HTTP: &HTTPConfig{ - HTTPServerSettings: &confighttp.HTTPServerSettings{ + ServerConfig: &confighttp.ServerConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), - TLSSetting: &configtls.TLSServerSetting{ - TLSSetting: configtls.TLSSetting{ + TLSSetting: &configtls.ServerConfig{ + TLSSetting: configtls.Config{ CertFile: "willfail", }, }, @@ -928,14 +726,14 @@ func TestHTTPInvalidTLSCredentials(t *testing.T) { `failed to load TLS config: failed to load TLS cert and key: for auth via TLS, provide both certificate and key, or neither`) } -func testHTTPMaxRequestBodySizeJSON(t *testing.T, payload []byte, size int, expectedStatusCode int) { - endpoint := testutil.GetAvailableLocalAddress(t) - url := fmt.Sprintf("http://%s/v1/traces", endpoint) +func testHTTPMaxRequestBodySize(t *testing.T, path string, contentType string, payload []byte, size int, expectedStatusCode int) { + addr := testutil.GetAvailableLocalAddress(t) + url := "http://" + addr + path cfg := &Config{ Protocols: Protocols{ HTTP: &HTTPConfig{ - HTTPServerSettings: &confighttp.HTTPServerSettings{ - Endpoint: endpoint, + ServerConfig: &confighttp.ServerConfig{ + Endpoint: addr, MaxRequestBodySize: int64(size), }, TracesURLPath: defaultTracesURLPath, @@ -945,103 +743,193 @@ func testHTTPMaxRequestBodySizeJSON(t *testing.T, payload []byte, size int, expe }, } - r, err := NewFactory().CreateTracesReceiver( - context.Background(), - receivertest.NewNopCreateSettings(), - cfg, - consumertest.NewNop()) - require.NoError(t, err) - assert.NotNil(t, r) - require.NoError(t, r.Start(context.Background(), componenttest.NewNopHost())) + recv := newReceiver(t, componenttest.NewNopTelemetrySettings(), cfg, otlpReceiverID, consumertest.NewNop()) + require.NoError(t, recv.Start(context.Background(), componenttest.NewNopHost())) - req, err := http.NewRequest(http.MethodPost, url, bytes.NewReader(payload)) - require.NoError(t, err) - req.Header.Set("Content-Type", "application/json") - client := &http.Client{} - resp, err := client.Do(req) + req := createHTTPRequest(t, url, "", contentType, payload) + resp, err := http.DefaultClient.Do(req) require.NoError(t, err) _, err = io.ReadAll(resp.Body) require.NoError(t, err) require.Equal(t, expectedStatusCode, resp.StatusCode) - err = r.Shutdown(context.Background()) - require.NoError(t, err) + require.NoError(t, recv.Shutdown(context.Background())) } -func TestHTTPMaxRequestBodySize_OK(t *testing.T) { - testHTTPMaxRequestBodySizeJSON(t, traceJSON, len(traceJSON), 200) -} +func TestHTTPMaxRequestBodySize(t *testing.T) { + dataReqs := generateDataRequests(t) + + for _, dr := range dataReqs { + testHTTPMaxRequestBodySize(t, dr.path, "application/json", dr.jsonBytes, len(dr.jsonBytes), 200) + testHTTPMaxRequestBodySize(t, dr.path, "application/json", dr.jsonBytes, len(dr.jsonBytes)-1, 400) -func TestHTTPMaxRequestBodySize_TooLarge(t *testing.T) { - testHTTPMaxRequestBodySizeJSON(t, traceJSON, len(traceJSON)-1, 400) + testHTTPMaxRequestBodySize(t, dr.path, "application/x-protobuf", dr.protoBytes, len(dr.protoBytes), 200) + testHTTPMaxRequestBodySize(t, dr.path, "application/x-protobuf", dr.protoBytes, len(dr.protoBytes)-1, 400) + } } -func newGRPCReceiver(t *testing.T, endpoint string, tc consumer.Traces, mc consumer.Metrics) component.Component { - factory := NewFactory() - cfg := factory.CreateDefaultConfig().(*Config) +func newGRPCReceiver(t *testing.T, settings component.TelemetrySettings, endpoint string, c consumertest.Consumer) component.Component { + cfg := createDefaultConfig().(*Config) cfg.GRPC.NetAddr.Endpoint = endpoint cfg.HTTP = nil - return newReceiver(t, factory, cfg, otlpReceiverID, tc, mc) + return newReceiver(t, settings, cfg, otlpReceiverID, c) } -func newHTTPReceiver(t *testing.T, endpoint string, tracesURLPath string, metricsURLPath string, logsURLPath string, tc consumer.Traces, mc consumer.Metrics) component.Component { - factory := NewFactory() - cfg := factory.CreateDefaultConfig().(*Config) +func newHTTPReceiver(t *testing.T, settings component.TelemetrySettings, endpoint string, c consumertest.Consumer) component.Component { + cfg := createDefaultConfig().(*Config) cfg.HTTP.Endpoint = endpoint - cfg.HTTP.TracesURLPath = tracesURLPath - cfg.HTTP.MetricsURLPath = metricsURLPath - cfg.HTTP.LogsURLPath = logsURLPath cfg.GRPC = nil - return newReceiver(t, factory, cfg, otlpReceiverID, tc, mc) + return newReceiver(t, settings, cfg, otlpReceiverID, c) } -func newReceiver(t *testing.T, factory receiver.Factory, cfg *Config, id component.ID, tc consumer.Traces, mc consumer.Metrics) component.Component { +func newReceiver(t *testing.T, settings component.TelemetrySettings, cfg *Config, id component.ID, c consumertest.Consumer) component.Component { set := receivertest.NewNopCreateSettings() - set.TelemetrySettings.MetricsLevel = configtelemetry.LevelNormal + set.TelemetrySettings = settings set.ID = id - var r component.Component - var err error - if tc != nil { - r, err = factory.CreateTracesReceiver(context.Background(), set, cfg, tc) - require.NoError(t, err) + r, err := newOtlpReceiver(cfg, &set) + require.NoError(t, err) + r.registerTraceConsumer(c) + r.registerMetricsConsumer(c) + r.registerLogsConsumer(c) + return r +} + +type dataRequest struct { + data any + path string + jsonBytes []byte + protoBytes []byte +} + +func generateDataRequests(t *testing.T) []dataRequest { + return []dataRequest{generateTracesRequest(t), generateMetricsRequests(t), generateLogsRequest(t)} +} + +func generateTracesRequest(t *testing.T) dataRequest { + protoMarshaler := &ptrace.ProtoMarshaler{} + jsonMarshaler := &ptrace.JSONMarshaler{} + + td := testdata.GenerateTraces(2) + traceProto, err := protoMarshaler.MarshalTraces(td) + require.NoError(t, err) + + traceJSON, err := jsonMarshaler.MarshalTraces(td) + require.NoError(t, err) + + return dataRequest{data: td, path: defaultTracesURLPath, jsonBytes: traceJSON, protoBytes: traceProto} +} + +func generateMetricsRequests(t *testing.T) dataRequest { + protoMarshaler := &pmetric.ProtoMarshaler{} + jsonMarshaler := &pmetric.JSONMarshaler{} + + md := testdata.GenerateMetrics(2) + metricProto, err := protoMarshaler.MarshalMetrics(md) + require.NoError(t, err) + + metricJSON, err := jsonMarshaler.MarshalMetrics(md) + require.NoError(t, err) + + return dataRequest{data: md, path: defaultMetricsURLPath, jsonBytes: metricJSON, protoBytes: metricProto} +} + +func generateLogsRequest(t *testing.T) dataRequest { + protoMarshaler := &plog.ProtoMarshaler{} + jsonMarshaler := &plog.JSONMarshaler{} + + ld := testdata.GenerateLogs(2) + logProto, err := protoMarshaler.MarshalLogs(ld) + require.NoError(t, err) + + logJSON, err := jsonMarshaler.MarshalLogs(ld) + require.NoError(t, err) + + return dataRequest{data: ld, path: defaultLogsURLPath, jsonBytes: logJSON, protoBytes: logProto} +} + +func doHTTPRequest( + t *testing.T, + url string, + encoding string, + contentType string, + data []byte, + expectErr bool, +) []byte { + req := createHTTPRequest(t, url, encoding, contentType, data) + resp, err := http.DefaultClient.Do(req) + require.NoError(t, err) + + respBytes, err := io.ReadAll(resp.Body) + require.NoError(t, err) + + require.NoError(t, resp.Body.Close()) + // For cases like "application/json; charset=utf-8", the response will be only "application/json" + require.True(t, strings.HasPrefix(strings.ToLower(contentType), resp.Header.Get("Content-Type"))) + + if !expectErr { + require.Equal(t, http.StatusOK, resp.StatusCode) + } else { + require.Equal(t, http.StatusInternalServerError, resp.StatusCode) } - if mc != nil { - r, err = factory.CreateMetricsReceiver(context.Background(), set, cfg, mc) - require.NoError(t, err) + + return respBytes +} + +func createHTTPRequest( + t *testing.T, + url string, + encoding string, + contentType string, + data []byte, +) *http.Request { + var buf *bytes.Buffer + switch encoding { + case "gzip": + buf = compressGzip(t, data) + case "zstd": + buf = compressZstd(t, data) + case "": + buf = bytes.NewBuffer(data) + default: + t.Fatalf("Unsupported compression type %v", encoding) } - return r + + req, err := http.NewRequest(http.MethodPost, url, buf) + require.NoError(t, err) + req.Header.Set("Content-Type", contentType) + req.Header.Set("Content-Encoding", encoding) + + return req } -func compressGzip(body []byte) (*bytes.Buffer, error) { +func compressGzip(t *testing.T, body []byte) *bytes.Buffer { var buf bytes.Buffer gw := gzip.NewWriter(&buf) - defer gw.Close() + defer func() { + require.NoError(t, gw.Close()) + }() _, err := gw.Write(body) - if err != nil { - return nil, err - } + require.NoError(t, err) - return &buf, nil + return &buf } -func compressZstd(body []byte) (*bytes.Buffer, error) { +func compressZstd(t *testing.T, body []byte) *bytes.Buffer { var buf bytes.Buffer zw, err := zstd.NewWriter(&buf) - if err != nil { - return nil, err - } + require.NoError(t, err) - defer zw.Close() + defer func() { + require.NoError(t, zw.Close()) + }() _, err = zw.Write(body) - if err != nil { - return nil, err - } + require.NoError(t, err) - return &buf, nil + return &buf } type senderFunc func(td ptrace.Traces) @@ -1070,7 +958,9 @@ func TestShutdown(t *testing.T) { conn, err := grpc.Dial(endpointGrpc, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) require.NoError(t, err) - defer conn.Close() + t.Cleanup(func() { + require.NoError(t, conn.Close()) + }) doneSignalGrpc := make(chan bool) doneSignalHTTP := make(chan bool) @@ -1084,12 +974,10 @@ func TestShutdown(t *testing.T) { marshaler := &ptrace.ProtoMarshaler{} traceBytes, err2 := marshaler.MarshalTraces(td) require.NoError(t, err2) - url := fmt.Sprintf("http://%s/v1/traces", endpointHTTP) - req := createHTTPProtobufRequest(t, url, "", traceBytes) - client := &http.Client{} - resp, err2 := client.Do(req) - if err2 == nil { - resp.Body.Close() + url := "http://" + endpointHTTP + defaultTracesURLPath + req := createHTTPRequest(t, url, "", "application/x-protobuf", traceBytes) + if resp, errResp := http.DefaultClient.Do(req); errResp == nil { + require.NoError(t, resp.Body.Close()) } } @@ -1106,8 +994,7 @@ func TestShutdown(t *testing.T) { // Now shutdown the receiver, while continuing sending traces to it. ctx, cancelFn := context.WithTimeout(context.Background(), 10*time.Second) defer cancelFn() - err = r.Shutdown(ctx) - assert.NoError(t, err) + assert.NoError(t, r.Shutdown(ctx)) // Remember how many spans the sink received. This number should not change after this // point because after Shutdown() returns the component is not allowed to produce @@ -1125,7 +1012,7 @@ func TestShutdown(t *testing.T) { // The last, additional trace should not be received by sink, so the number of spans in // the sink should not change. - assert.EqualValues(t, sinkSpanCountAfterShutdown, nextSink.SpanCount()) + assert.Equal(t, sinkSpanCountAfterShutdown, nextSink.SpanCount()) } func generateTraces(senderFn senderFunc, doneSignal chan bool) { @@ -1157,12 +1044,22 @@ func exportTraces(cc *grpc.ClientConn, td ptrace.Traces) error { } type errOrSinkConsumer struct { + consumertest.Consumer *consumertest.TracesSink *consumertest.MetricsSink + *consumertest.LogsSink mu sync.Mutex consumeError error // to be returned by ConsumeTraces, if set } +func newErrOrSinkConsumer() *errOrSinkConsumer { + return &errOrSinkConsumer{ + TracesSink: new(consumertest.TracesSink), + MetricsSink: new(consumertest.MetricsSink), + LogsSink: new(consumertest.LogsSink), + } +} + // SetConsumeError sets an error that will be returned by the Consume function. func (esc *errOrSinkConsumer) SetConsumeError(err error) { esc.mu.Lock() @@ -1198,16 +1095,49 @@ func (esc *errOrSinkConsumer) ConsumeMetrics(ctx context.Context, md pmetric.Met return esc.MetricsSink.ConsumeMetrics(ctx, md) } +// ConsumeMetrics stores metrics to this sink. +func (esc *errOrSinkConsumer) ConsumeLogs(ctx context.Context, ld plog.Logs) error { + esc.mu.Lock() + defer esc.mu.Unlock() + + if esc.consumeError != nil { + return esc.consumeError + } + + return esc.LogsSink.ConsumeLogs(ctx, ld) +} + // Reset deletes any stored in the sinks, resets error to nil. func (esc *errOrSinkConsumer) Reset() { esc.mu.Lock() defer esc.mu.Unlock() esc.consumeError = nil - if esc.TracesSink != nil { - esc.TracesSink.Reset() - } - if esc.MetricsSink != nil { - esc.MetricsSink.Reset() + esc.TracesSink.Reset() + esc.MetricsSink.Reset() + esc.LogsSink.Reset() +} + +// Reset deletes any stored in the sinks, resets error to nil. +func (esc *errOrSinkConsumer) checkData(t *testing.T, data any, len int) { + switch data.(type) { + case ptrace.Traces: + allTraces := esc.TracesSink.AllTraces() + require.Len(t, allTraces, len) + if len > 0 { + require.Equal(t, allTraces[0], data) + } + case pmetric.Metrics: + allMetrics := esc.MetricsSink.AllMetrics() + require.Len(t, allMetrics, len) + if len > 0 { + require.Equal(t, allMetrics[0], data) + } + case plog.Logs: + allLogs := esc.LogsSink.AllLogs() + require.Len(t, allLogs, len) + if len > 0 { + require.Equal(t, allLogs[0], data) + } } } diff --git a/receiver/otlpreceiver/otlphttp.go b/receiver/otlpreceiver/otlphttp.go index 641335a482c..dca42737052 100644 --- a/receiver/otlpreceiver/otlphttp.go +++ b/receiver/otlpreceiver/otlphttp.go @@ -4,6 +4,7 @@ package otlpreceiver // import "go.opentelemetry.io/collector/receiver/otlpreceiver" import ( + "fmt" "io" "mime" "net/http" @@ -22,92 +23,124 @@ var fallbackMsg = []byte(`{"code": 13, "message": "failed to marshal error messa const fallbackContentType = "application/json" -func handleTraces(resp http.ResponseWriter, req *http.Request, tracesReceiver *trace.Receiver, encoder encoder) { - body, ok := readAndCloseBody(resp, req, encoder) +func handleTraces(resp http.ResponseWriter, req *http.Request, tracesReceiver *trace.Receiver) { + enc, ok := readContentType(resp, req) if !ok { return } - otlpReq, err := encoder.unmarshalTracesRequest(body) + body, ok := readAndCloseBody(resp, req, enc) + if !ok { + return + } + + otlpReq, err := enc.unmarshalTracesRequest(body) if err != nil { - writeError(resp, encoder, err, http.StatusBadRequest) + writeError(resp, enc, err, http.StatusBadRequest) return } otlpResp, err := tracesReceiver.Export(req.Context(), otlpReq) if err != nil { - writeError(resp, encoder, err, http.StatusInternalServerError) + writeError(resp, enc, err, http.StatusInternalServerError) return } - msg, err := encoder.marshalTracesResponse(otlpResp) + msg, err := enc.marshalTracesResponse(otlpResp) if err != nil { - writeError(resp, encoder, err, http.StatusInternalServerError) + writeError(resp, enc, err, http.StatusInternalServerError) return } - writeResponse(resp, encoder.contentType(), http.StatusOK, msg) + writeResponse(resp, enc.contentType(), http.StatusOK, msg) } -func handleMetrics(resp http.ResponseWriter, req *http.Request, metricsReceiver *metrics.Receiver, encoder encoder) { - body, ok := readAndCloseBody(resp, req, encoder) +func handleMetrics(resp http.ResponseWriter, req *http.Request, metricsReceiver *metrics.Receiver) { + enc, ok := readContentType(resp, req) if !ok { return } - otlpReq, err := encoder.unmarshalMetricsRequest(body) + body, ok := readAndCloseBody(resp, req, enc) + if !ok { + return + } + + otlpReq, err := enc.unmarshalMetricsRequest(body) if err != nil { - writeError(resp, encoder, err, http.StatusBadRequest) + writeError(resp, enc, err, http.StatusBadRequest) return } otlpResp, err := metricsReceiver.Export(req.Context(), otlpReq) if err != nil { - writeError(resp, encoder, err, http.StatusInternalServerError) + writeError(resp, enc, err, http.StatusInternalServerError) return } - msg, err := encoder.marshalMetricsResponse(otlpResp) + msg, err := enc.marshalMetricsResponse(otlpResp) if err != nil { - writeError(resp, encoder, err, http.StatusInternalServerError) + writeError(resp, enc, err, http.StatusInternalServerError) return } - writeResponse(resp, encoder.contentType(), http.StatusOK, msg) + writeResponse(resp, enc.contentType(), http.StatusOK, msg) } -func handleLogs(resp http.ResponseWriter, req *http.Request, logsReceiver *logs.Receiver, encoder encoder) { - body, ok := readAndCloseBody(resp, req, encoder) +func handleLogs(resp http.ResponseWriter, req *http.Request, logsReceiver *logs.Receiver) { + enc, ok := readContentType(resp, req) + if !ok { + return + } + + body, ok := readAndCloseBody(resp, req, enc) if !ok { return } - otlpReq, err := encoder.unmarshalLogsRequest(body) + otlpReq, err := enc.unmarshalLogsRequest(body) if err != nil { - writeError(resp, encoder, err, http.StatusBadRequest) + writeError(resp, enc, err, http.StatusBadRequest) return } otlpResp, err := logsReceiver.Export(req.Context(), otlpReq) if err != nil { - writeError(resp, encoder, err, http.StatusInternalServerError) + writeError(resp, enc, err, http.StatusInternalServerError) return } - msg, err := encoder.marshalLogsResponse(otlpResp) + msg, err := enc.marshalLogsResponse(otlpResp) if err != nil { - writeError(resp, encoder, err, http.StatusInternalServerError) + writeError(resp, enc, err, http.StatusInternalServerError) return } - writeResponse(resp, encoder.contentType(), http.StatusOK, msg) + writeResponse(resp, enc.contentType(), http.StatusOK, msg) } -func readAndCloseBody(resp http.ResponseWriter, req *http.Request, encoder encoder) ([]byte, bool) { +func readContentType(resp http.ResponseWriter, req *http.Request) (encoder, bool) { + if req.Method != http.MethodPost { + handleUnmatchedMethod(resp) + return nil, false + } + + switch getMimeTypeFromContentType(req.Header.Get("Content-Type")) { + case pbContentType: + return pbEncoder, true + case jsonContentType: + return jsEncoder, true + default: + handleUnmatchedContentType(resp) + return nil, false + } +} + +func readAndCloseBody(resp http.ResponseWriter, req *http.Request, enc encoder) ([]byte, bool) { body, err := io.ReadAll(req.Body) if err != nil { - writeError(resp, encoder, err, http.StatusBadRequest) + writeError(resp, enc, err, http.StatusBadRequest) return nil, false } if err = req.Body.Close(); err != nil { - writeError(resp, encoder, err, http.StatusBadRequest) + writeError(resp, enc, err, http.StatusBadRequest) return nil, false } return body, true @@ -137,14 +170,14 @@ func errorHandler(w http.ResponseWriter, r *http.Request, errMsg string, statusC writeResponse(w, fallbackContentType, http.StatusInternalServerError, fallbackMsg) } -func writeStatusResponse(w http.ResponseWriter, encoder encoder, statusCode int, rsp *spb.Status) { - msg, err := encoder.marshalStatus(rsp) +func writeStatusResponse(w http.ResponseWriter, enc encoder, statusCode int, rsp *spb.Status) { + msg, err := enc.marshalStatus(rsp) if err != nil { writeResponse(w, fallbackContentType, http.StatusInternalServerError, fallbackMsg) return } - writeResponse(w, encoder.contentType(), statusCode, msg) + writeResponse(w, enc.contentType(), statusCode, msg) } func writeResponse(w http.ResponseWriter, contentType string, statusCode int, msg []byte) { @@ -168,3 +201,13 @@ func getMimeTypeFromContentType(contentType string) string { } return mediatype } + +func handleUnmatchedMethod(resp http.ResponseWriter) { + status := http.StatusMethodNotAllowed + writeResponse(resp, "text/plain", status, []byte(fmt.Sprintf("%v method not allowed, supported: [POST]", status))) +} + +func handleUnmatchedContentType(resp http.ResponseWriter) { + status := http.StatusUnsupportedMediaType + writeResponse(resp, "text/plain", status, []byte(fmt.Sprintf("%v unsupported media type, supported: [%s, %s]", status, jsonContentType, pbContentType))) +} diff --git a/receiver/otlpreceiver/package_test.go b/receiver/otlpreceiver/package_test.go new file mode 100644 index 00000000000..9d49b5c8f7b --- /dev/null +++ b/receiver/otlpreceiver/package_test.go @@ -0,0 +1,17 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otlpreceiver + +import ( + "testing" + + "go.uber.org/goleak" +) + +// The IgnoreTopFunction call prevents catching the leak generated by opencensus +// defaultWorker.Start which at this time is part of the package's init call. +// See https://github.com/open-telemetry/opentelemetry-collector/issues/9165#issuecomment-1874836336 for more context. +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) +} diff --git a/receiver/package_test.go b/receiver/package_test.go new file mode 100644 index 00000000000..09e3e768e60 --- /dev/null +++ b/receiver/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package receiver + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/receiver/receiver.go b/receiver/receiver.go index bb525a1e03c..3b0f0ac8371 100644 --- a/receiver/receiver.go +++ b/receiver/receiver.go @@ -5,6 +5,7 @@ package receiver // import "go.opentelemetry.io/collector/receiver" import ( "context" + "errors" "fmt" "go.uber.org/zap" @@ -13,6 +14,10 @@ import ( "go.opentelemetry.io/collector/consumer" ) +var ( + errNilNextConsumer = errors.New("nil next Consumer") +) + // Traces receiver receives traces. // Its purpose is to translate data from any format to the collector's internal trace format. // TracesReceiver feeds a consumer.Traces with data. @@ -60,7 +65,7 @@ type Factory interface { // CreateTracesReceiver creates a TracesReceiver based on this config. // If the receiver type does not support tracing or if the config is not valid - // an error will be returned instead. + // an error will be returned instead. `nextConsumer` is never nil. CreateTracesReceiver(ctx context.Context, set CreateSettings, cfg component.Config, nextConsumer consumer.Traces) (Traces, error) // TracesReceiverStability gets the stability level of the TracesReceiver. @@ -68,7 +73,7 @@ type Factory interface { // CreateMetricsReceiver creates a MetricsReceiver based on this config. // If the receiver type does not support metrics or if the config is not valid - // an error will be returned instead. + // an error will be returned instead. `nextConsumer` is never nil. CreateMetricsReceiver(ctx context.Context, set CreateSettings, cfg component.Config, nextConsumer consumer.Metrics) (Metrics, error) // MetricsReceiverStability gets the stability level of the MetricsReceiver. @@ -76,7 +81,7 @@ type Factory interface { // CreateLogsReceiver creates a LogsReceiver based on this config. // If the receiver type does not support the data type or if the config is not valid - // an error will be returned instead. + // an error will be returned instead. `nextConsumer` is never nil. CreateLogsReceiver(ctx context.Context, set CreateSettings, cfg component.Config, nextConsumer consumer.Logs) (Logs, error) // LogsReceiverStability gets the stability level of the LogsReceiver. @@ -236,6 +241,9 @@ func NewBuilder(cfgs map[component.ID]component.Config, factories map[component. // CreateTraces creates a Traces receiver based on the settings and config. func (b *Builder) CreateTraces(ctx context.Context, set CreateSettings, next consumer.Traces) (Traces, error) { + if next == nil { + return nil, errNilNextConsumer + } cfg, existsCfg := b.cfgs[set.ID] if !existsCfg { return nil, fmt.Errorf("receiver %q is not configured", set.ID) @@ -252,6 +260,9 @@ func (b *Builder) CreateTraces(ctx context.Context, set CreateSettings, next con // CreateMetrics creates a Metrics receiver based on the settings and config. func (b *Builder) CreateMetrics(ctx context.Context, set CreateSettings, next consumer.Metrics) (Metrics, error) { + if next == nil { + return nil, errNilNextConsumer + } cfg, existsCfg := b.cfgs[set.ID] if !existsCfg { return nil, fmt.Errorf("receiver %q is not configured", set.ID) @@ -268,6 +279,9 @@ func (b *Builder) CreateMetrics(ctx context.Context, set CreateSettings, next co // CreateLogs creates a Logs receiver based on the settings and config. func (b *Builder) CreateLogs(ctx context.Context, set CreateSettings, next consumer.Logs) (Logs, error) { + if next == nil { + return nil, errNilNextConsumer + } cfg, existsCfg := b.cfgs[set.ID] if !existsCfg { return nil, fmt.Errorf("receiver %q is not configured", set.ID) diff --git a/receiver/receiver_test.go b/receiver/receiver_test.go index d04dd88247d..00b93dba549 100644 --- a/receiver/receiver_test.go +++ b/receiver/receiver_test.go @@ -17,31 +17,31 @@ import ( ) func TestNewFactory(t *testing.T) { - const typeStr = "test" + var testType = component.MustNewType("test") defaultCfg := struct{}{} factory := NewFactory( - typeStr, + testType, func() component.Config { return &defaultCfg }) - assert.EqualValues(t, typeStr, factory.Type()) + assert.EqualValues(t, testType, factory.Type()) assert.EqualValues(t, &defaultCfg, factory.CreateDefaultConfig()) - _, err := factory.CreateTracesReceiver(context.Background(), CreateSettings{}, &defaultCfg, nil) + _, err := factory.CreateTracesReceiver(context.Background(), CreateSettings{}, &defaultCfg, consumertest.NewNop()) assert.Error(t, err) - _, err = factory.CreateMetricsReceiver(context.Background(), CreateSettings{}, &defaultCfg, nil) + _, err = factory.CreateMetricsReceiver(context.Background(), CreateSettings{}, &defaultCfg, consumertest.NewNop()) assert.Error(t, err) - _, err = factory.CreateLogsReceiver(context.Background(), CreateSettings{}, &defaultCfg, nil) + _, err = factory.CreateLogsReceiver(context.Background(), CreateSettings{}, &defaultCfg, consumertest.NewNop()) assert.Error(t, err) } func TestNewFactoryWithOptions(t *testing.T) { - const typeStr = "test" + var testType = component.MustNewType("test") defaultCfg := struct{}{} factory := NewFactory( - typeStr, + testType, func() component.Config { return &defaultCfg }, WithTraces(createTraces, component.StabilityLevelDeprecated), WithMetrics(createMetrics, component.StabilityLevelAlpha), WithLogs(createLogs, component.StabilityLevelStable)) - assert.EqualValues(t, typeStr, factory.Type()) + assert.EqualValues(t, testType, factory.Type()) assert.EqualValues(t, &defaultCfg, factory.CreateDefaultConfig()) assert.Equal(t, component.StabilityLevelDeprecated, factory.TracesReceiverStability()) @@ -64,8 +64,8 @@ func TestMakeFactoryMap(t *testing.T) { out map[component.Type]Factory } - p1 := NewFactory("p1", nil) - p2 := NewFactory("p2", nil) + p1 := NewFactory(component.MustNewType("p1"), nil) + p2 := NewFactory(component.MustNewType("p2"), nil) testCases := []testCase{ { name: "different names", @@ -77,7 +77,7 @@ func TestMakeFactoryMap(t *testing.T) { }, { name: "same name", - in: []Factory{p1, p2, NewFactory("p1", nil)}, + in: []Factory{p1, p2, NewFactory(component.MustNewType("p1"), nil)}, }, } @@ -98,9 +98,9 @@ func TestMakeFactoryMap(t *testing.T) { func TestBuilder(t *testing.T) { defaultCfg := struct{}{} factories, err := MakeFactoryMap([]Factory{ - NewFactory("err", nil), + NewFactory(component.MustNewType("err"), nil), NewFactory( - "all", + component.MustNewType("all"), func() component.Config { return &defaultCfg }, WithTraces(createTraces, component.StabilityLevelDevelopment), WithMetrics(createMetrics, component.StabilityLevelAlpha), @@ -110,27 +110,50 @@ func TestBuilder(t *testing.T) { require.NoError(t, err) testCases := []struct { - name string - id component.ID - err string + name string + id component.ID + err string + nextTraces consumer.Traces + nextLogs consumer.Logs + nextMetrics consumer.Metrics }{ { - name: "unknown", - id: component.NewID("unknown"), - err: "receiver factory not available for: \"unknown\"", + name: "unknown", + id: component.MustNewID("unknown"), + err: "receiver factory not available for: \"unknown\"", + nextTraces: consumertest.NewNop(), + nextLogs: consumertest.NewNop(), + nextMetrics: consumertest.NewNop(), + }, + { + name: "err", + id: component.MustNewID("err"), + err: "telemetry type is not supported", + nextTraces: consumertest.NewNop(), + nextLogs: consumertest.NewNop(), + nextMetrics: consumertest.NewNop(), }, { - name: "err", - id: component.NewID("err"), - err: "telemetry type is not supported", + name: "all", + id: component.MustNewID("all"), + nextTraces: consumertest.NewNop(), + nextLogs: consumertest.NewNop(), + nextMetrics: consumertest.NewNop(), }, { - name: "all", - id: component.NewID("all"), + name: "all/named", + id: component.MustNewIDWithName("all", "named"), + nextTraces: consumertest.NewNop(), + nextLogs: consumertest.NewNop(), + nextMetrics: consumertest.NewNop(), }, { - name: "all/named", - id: component.NewIDWithName("all", "named"), + name: "no next consumer", + id: component.MustNewID("unknown"), + err: "nil next Consumer", + nextTraces: nil, + nextLogs: nil, + nextMetrics: nil, }, } @@ -139,7 +162,7 @@ func TestBuilder(t *testing.T) { cfgs := map[component.ID]component.Config{tt.id: defaultCfg} b := NewBuilder(cfgs, factories) - te, err := b.CreateTraces(context.Background(), createSettings(tt.id), nil) + te, err := b.CreateTraces(context.Background(), createSettings(tt.id), tt.nextTraces) if tt.err != "" { assert.EqualError(t, err, tt.err) assert.Nil(t, te) @@ -148,7 +171,7 @@ func TestBuilder(t *testing.T) { assert.Equal(t, nopInstance, te) } - me, err := b.CreateMetrics(context.Background(), createSettings(tt.id), nil) + me, err := b.CreateMetrics(context.Background(), createSettings(tt.id), tt.nextMetrics) if tt.err != "" { assert.EqualError(t, err, tt.err) assert.Nil(t, me) @@ -157,7 +180,7 @@ func TestBuilder(t *testing.T) { assert.Equal(t, nopInstance, me) } - le, err := b.CreateLogs(context.Background(), createSettings(tt.id), nil) + le, err := b.CreateLogs(context.Background(), createSettings(tt.id), tt.nextLogs) if tt.err != "" { assert.EqualError(t, err, tt.err) assert.Nil(t, le) @@ -173,7 +196,7 @@ func TestBuilderMissingConfig(t *testing.T) { defaultCfg := struct{}{} factories, err := MakeFactoryMap([]Factory{ NewFactory( - "all", + component.MustNewType("all"), func() component.Config { return &defaultCfg }, WithTraces(createTraces, component.StabilityLevelDevelopment), WithMetrics(createMetrics, component.StabilityLevelAlpha), @@ -184,30 +207,30 @@ func TestBuilderMissingConfig(t *testing.T) { require.NoError(t, err) bErr := NewBuilder(map[component.ID]component.Config{}, factories) - missingID := component.NewIDWithName("all", "missing") + missingID := component.MustNewIDWithName("all", "missing") - te, err := bErr.CreateTraces(context.Background(), createSettings(missingID), nil) + te, err := bErr.CreateTraces(context.Background(), createSettings(missingID), consumertest.NewNop()) assert.EqualError(t, err, "receiver \"all/missing\" is not configured") assert.Nil(t, te) - me, err := bErr.CreateMetrics(context.Background(), createSettings(missingID), nil) + me, err := bErr.CreateMetrics(context.Background(), createSettings(missingID), consumertest.NewNop()) assert.EqualError(t, err, "receiver \"all/missing\" is not configured") assert.Nil(t, me) - le, err := bErr.CreateLogs(context.Background(), createSettings(missingID), nil) + le, err := bErr.CreateLogs(context.Background(), createSettings(missingID), consumertest.NewNop()) assert.EqualError(t, err, "receiver \"all/missing\" is not configured") assert.Nil(t, le) } func TestBuilderFactory(t *testing.T) { - factories, err := MakeFactoryMap([]Factory{NewFactory("foo", nil)}...) + factories, err := MakeFactoryMap([]Factory{NewFactory(component.MustNewType("foo"), nil)}...) require.NoError(t, err) - cfgs := map[component.ID]component.Config{component.NewID("foo"): struct{}{}} + cfgs := map[component.ID]component.Config{component.MustNewID("foo"): struct{}{}} b := NewBuilder(cfgs, factories) - assert.NotNil(t, b.Factory(component.NewID("foo").Type())) - assert.Nil(t, b.Factory(component.NewID("bar").Type())) + assert.NotNil(t, b.Factory(component.MustNewID("foo").Type())) + assert.Nil(t, b.Factory(component.MustNewID("bar").Type())) } var nopInstance = &nopReceiver{ diff --git a/receiver/receiverhelper/obsreport.go b/receiver/receiverhelper/obsreport.go index edea46ebcfe..d70f6789157 100644 --- a/receiver/receiverhelper/obsreport.go +++ b/receiver/receiverhelper/obsreport.go @@ -5,21 +5,16 @@ package receiverhelper // import "go.opentelemetry.io/collector/receiver/receive import ( "context" - "errors" - "go.opencensus.io/stats" - "go.opencensus.io/tag" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/metric" - sdkmetric "go.opentelemetry.io/otel/sdk/metric" "go.opentelemetry.io/otel/trace" "go.uber.org/multierr" "go.uber.org/zap" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" - "go.opentelemetry.io/collector/internal/obsreportconfig" "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" "go.opentelemetry.io/collector/receiver" ) @@ -34,13 +29,11 @@ type ObsReport struct { spanNamePrefix string transport string longLivedCtx bool - mutators []tag.Mutator tracer trace.Tracer meter metric.Meter logger *zap.Logger - useOtelForMetrics bool - otelAttrs []attribute.KeyValue + otelAttrs []attribute.KeyValue acceptedSpansCounter metric.Int64Counter refusedSpansCounter metric.Int64Counter @@ -65,35 +58,26 @@ type ObsReportSettings struct { // NewObsReport creates a new ObsReport. func NewObsReport(cfg ObsReportSettings) (*ObsReport, error) { - return newReceiver(cfg, obsreportconfig.UseOtelForInternalMetricsfeatureGate.IsEnabled()) + return newReceiver(cfg) } -func newReceiver(cfg ObsReportSettings, useOtel bool) (*ObsReport, error) { +func newReceiver(cfg ObsReportSettings) (*ObsReport, error) { rec := &ObsReport{ level: cfg.ReceiverCreateSettings.TelemetrySettings.MetricsLevel, spanNamePrefix: obsmetrics.ReceiverPrefix + cfg.ReceiverID.String(), transport: cfg.Transport, longLivedCtx: cfg.LongLivedCtx, - mutators: []tag.Mutator{ - tag.Upsert(obsmetrics.TagKeyReceiver, cfg.ReceiverID.String(), tag.WithTTL(tag.TTLNoPropagation)), - tag.Upsert(obsmetrics.TagKeyTransport, cfg.Transport, tag.WithTTL(tag.TTLNoPropagation)), - }, - tracer: cfg.ReceiverCreateSettings.TracerProvider.Tracer(cfg.ReceiverID.String()), - meter: cfg.ReceiverCreateSettings.MeterProvider.Meter(receiverScope), - logger: cfg.ReceiverCreateSettings.Logger, + tracer: cfg.ReceiverCreateSettings.TracerProvider.Tracer(cfg.ReceiverID.String()), + meter: cfg.ReceiverCreateSettings.MeterProvider.Meter(receiverScope), + logger: cfg.ReceiverCreateSettings.Logger, - useOtelForMetrics: useOtel, otelAttrs: []attribute.KeyValue{ attribute.String(obsmetrics.ReceiverKey, cfg.ReceiverID.String()), attribute.String(obsmetrics.TransportKey, cfg.Transport), }, } - // ignore instrument name error as per workaround in https://github.com/open-telemetry/opentelemetry-collector/issues/8346 - // if err := rec.createOtelMetrics(); err != nil { - // return nil, err - // } - if err := rec.createOtelMetrics(); err != nil && !errors.Is(err, sdkmetric.ErrInstrumentName) { + if err := rec.createOtelMetrics(); err != nil { return nil, err } @@ -101,10 +85,6 @@ func newReceiver(cfg ObsReportSettings, useOtel bool) (*ObsReport, error) { } func (rec *ObsReport) createOtelMetrics() error { - if !rec.useOtelForMetrics { - return nil - } - var errors, err error rec.acceptedSpansCounter, err = rec.meter.Int64Counter( @@ -209,11 +189,11 @@ func (rec *ObsReport) EndMetricsOp( // startOp creates the span used to trace the operation. Returning // the updated context with the created span. func (rec *ObsReport) startOp(receiverCtx context.Context, operationSuffix string) context.Context { - ctx, _ := tag.New(receiverCtx, rec.mutators...) + var ctx context.Context var span trace.Span spanName := rec.spanNamePrefix + operationSuffix if !rec.longLivedCtx { - ctx, span = rec.tracer.Start(ctx, spanName) + ctx, span = rec.tracer.Start(receiverCtx, spanName) } else { // Since the receiverCtx is long lived do not use it to start the span. // This way this trace ends when the EndTracesOp is called. @@ -222,7 +202,7 @@ func (rec *ObsReport) startOp(receiverCtx context.Context, operationSuffix strin SpanContext: trace.SpanContextFromContext(receiverCtx), })) - ctx = trace.ContextWithSpan(ctx, span) + ctx = trace.ContextWithSpan(receiverCtx, span) } if rec.transport != "" { @@ -280,14 +260,6 @@ func (rec *ObsReport) endOp( } func (rec *ObsReport) recordMetrics(receiverCtx context.Context, dataType component.DataType, numAccepted, numRefused int) { - if rec.useOtelForMetrics { - rec.recordWithOtel(receiverCtx, dataType, numAccepted, numRefused) - } else { - rec.recordWithOC(receiverCtx, dataType, numAccepted, numRefused) - } -} - -func (rec *ObsReport) recordWithOtel(receiverCtx context.Context, dataType component.DataType, numAccepted, numRefused int) { var acceptedMeasure, refusedMeasure metric.Int64Counter switch dataType { case component.DataTypeTraces: @@ -304,23 +276,3 @@ func (rec *ObsReport) recordWithOtel(receiverCtx context.Context, dataType compo acceptedMeasure.Add(receiverCtx, int64(numAccepted), metric.WithAttributes(rec.otelAttrs...)) refusedMeasure.Add(receiverCtx, int64(numRefused), metric.WithAttributes(rec.otelAttrs...)) } - -func (rec *ObsReport) recordWithOC(receiverCtx context.Context, dataType component.DataType, numAccepted, numRefused int) { - var acceptedMeasure, refusedMeasure *stats.Int64Measure - switch dataType { - case component.DataTypeTraces: - acceptedMeasure = obsmetrics.ReceiverAcceptedSpans - refusedMeasure = obsmetrics.ReceiverRefusedSpans - case component.DataTypeMetrics: - acceptedMeasure = obsmetrics.ReceiverAcceptedMetricPoints - refusedMeasure = obsmetrics.ReceiverRefusedMetricPoints - case component.DataTypeLogs: - acceptedMeasure = obsmetrics.ReceiverAcceptedLogRecords - refusedMeasure = obsmetrics.ReceiverRefusedLogRecords - } - - stats.Record( - receiverCtx, - acceptedMeasure.M(int64(numAccepted)), - refusedMeasure.M(int64(numRefused))) -} diff --git a/receiver/receiverhelper/obsreport_test.go b/receiver/receiverhelper/obsreport_test.go index 941d66ee621..3a417e176aa 100644 --- a/receiver/receiverhelper/obsreport_test.go +++ b/receiver/receiverhelper/obsreport_test.go @@ -14,9 +14,9 @@ import ( "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" - "go.opentelemetry.io/collector/obsreport/obsreporttest" - "go.opentelemetry.io/collector/receiver/receivertest" + "go.opentelemetry.io/collector/receiver" ) const ( @@ -25,7 +25,7 @@ const ( ) var ( - receiverID = component.NewID("fakeReceiver") + receiverID = component.MustNewID("fakeReceiver") errFake = errors.New("errFake") ) @@ -36,8 +36,8 @@ type testParams struct { } func TestReceiveTraceDataOp(t *testing.T) { - testTelemetry(t, receiverID, func(t *testing.T, tt obsreporttest.TestTelemetry, useOtel bool) { - parentCtx, parentSpan := tt.TracerProvider.Tracer("test").Start(context.Background(), t.Name()) + testTelemetry(t, receiverID, func(t *testing.T, tt componenttest.TestTelemetry) { + parentCtx, parentSpan := tt.TelemetrySettings().TracerProvider.Tracer("test").Start(context.Background(), t.Name()) defer parentSpan.End() params := []testParams{ @@ -48,8 +48,8 @@ func TestReceiveTraceDataOp(t *testing.T) { rec, err := newReceiver(ObsReportSettings{ ReceiverID: receiverID, Transport: transport, - ReceiverCreateSettings: receivertest.NewCreateSettings(receiverID, tt.TelemetrySettings), - }, useOtel) + ReceiverCreateSettings: receiver.CreateSettings{ID: receiverID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, + }) require.NoError(t, err) ctx := rec.StartTracesOp(parentCtx) assert.NotNil(t, ctx) @@ -83,8 +83,8 @@ func TestReceiveTraceDataOp(t *testing.T) { } func TestReceiveLogsOp(t *testing.T) { - testTelemetry(t, receiverID, func(t *testing.T, tt obsreporttest.TestTelemetry, useOtel bool) { - parentCtx, parentSpan := tt.TracerProvider.Tracer("test").Start(context.Background(), t.Name()) + testTelemetry(t, receiverID, func(t *testing.T, tt componenttest.TestTelemetry) { + parentCtx, parentSpan := tt.TelemetrySettings().TracerProvider.Tracer("test").Start(context.Background(), t.Name()) defer parentSpan.End() params := []testParams{ @@ -95,8 +95,8 @@ func TestReceiveLogsOp(t *testing.T) { rec, err := newReceiver(ObsReportSettings{ ReceiverID: receiverID, Transport: transport, - ReceiverCreateSettings: receivertest.NewCreateSettings(receiverID, tt.TelemetrySettings), - }, useOtel) + ReceiverCreateSettings: receiver.CreateSettings{ID: receiverID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, + }) require.NoError(t, err) ctx := rec.StartLogsOp(parentCtx) @@ -131,8 +131,8 @@ func TestReceiveLogsOp(t *testing.T) { } func TestReceiveMetricsOp(t *testing.T) { - testTelemetry(t, receiverID, func(t *testing.T, tt obsreporttest.TestTelemetry, useOtel bool) { - parentCtx, parentSpan := tt.TracerProvider.Tracer("test").Start(context.Background(), t.Name()) + testTelemetry(t, receiverID, func(t *testing.T, tt componenttest.TestTelemetry) { + parentCtx, parentSpan := tt.TelemetrySettings().TracerProvider.Tracer("test").Start(context.Background(), t.Name()) defer parentSpan.End() params := []testParams{ @@ -143,8 +143,8 @@ func TestReceiveMetricsOp(t *testing.T) { rec, err := newReceiver(ObsReportSettings{ ReceiverID: receiverID, Transport: transport, - ReceiverCreateSettings: receivertest.NewCreateSettings(receiverID, tt.TelemetrySettings), - }, useOtel) + ReceiverCreateSettings: receiver.CreateSettings{ID: receiverID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, + }) require.NoError(t, err) ctx := rec.StartMetricsOp(parentCtx) @@ -180,11 +180,11 @@ func TestReceiveMetricsOp(t *testing.T) { } func TestReceiveWithLongLivedCtx(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(receiverID) + tt, err := componenttest.SetupTelemetry(receiverID) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - longLivedCtx, parentSpan := tt.TracerProvider.Tracer("test").Start(context.Background(), t.Name()) + longLivedCtx, parentSpan := tt.TelemetrySettings().TracerProvider.Tracer("test").Start(context.Background(), t.Name()) defer parentSpan.End() params := []testParams{ @@ -198,7 +198,7 @@ func TestReceiveWithLongLivedCtx(t *testing.T) { ReceiverID: receiverID, Transport: transport, LongLivedCtx: true, - ReceiverCreateSettings: receivertest.NewCreateSettings(receiverID, tt.TelemetrySettings), + ReceiverCreateSettings: receiver.CreateSettings{ID: receiverID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, }) require.NoError(t, rerr) ctx := rec.StartTracesOp(longLivedCtx) @@ -233,20 +233,75 @@ func TestReceiveWithLongLivedCtx(t *testing.T) { } } -func testTelemetry(t *testing.T, id component.ID, testFunc func(t *testing.T, tt obsreporttest.TestTelemetry, useOtel bool)) { - t.Run("WithOC", func(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(id) - require.NoError(t, err) - t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) +func TestCheckReceiverTracesViews(t *testing.T) { + tt, err := componenttest.SetupTelemetry(receiverID) + require.NoError(t, err) + t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) + + rec, err := NewObsReport(ObsReportSettings{ + ReceiverID: receiverID, + Transport: transport, + ReceiverCreateSettings: receiver.CreateSettings{ID: receiverID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, + }) + require.NoError(t, err) + ctx := rec.StartTracesOp(context.Background()) + require.NotNil(t, ctx) + rec.EndTracesOp(ctx, format, 7, nil) + + assert.NoError(t, tt.CheckReceiverTraces(transport, 7, 0)) + assert.Error(t, tt.CheckReceiverTraces(transport, 7, 7)) + assert.Error(t, tt.CheckReceiverTraces(transport, 0, 0)) + assert.Error(t, tt.CheckReceiverTraces(transport, 0, 7)) +} + +func TestCheckReceiverMetricsViews(t *testing.T) { + tt, err := componenttest.SetupTelemetry(receiverID) + require.NoError(t, err) + t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) + + rec, err := NewObsReport(ObsReportSettings{ + ReceiverID: receiverID, + Transport: transport, + ReceiverCreateSettings: receiver.CreateSettings{ID: receiverID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, + }) + require.NoError(t, err) + ctx := rec.StartMetricsOp(context.Background()) + require.NotNil(t, ctx) + rec.EndMetricsOp(ctx, format, 7, nil) + + assert.NoError(t, tt.CheckReceiverMetrics(transport, 7, 0)) + assert.Error(t, tt.CheckReceiverMetrics(transport, 7, 7)) + assert.Error(t, tt.CheckReceiverMetrics(transport, 0, 0)) + assert.Error(t, tt.CheckReceiverMetrics(transport, 0, 7)) +} - testFunc(t, tt, false) +func TestCheckReceiverLogsViews(t *testing.T) { + tt, err := componenttest.SetupTelemetry(receiverID) + require.NoError(t, err) + t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) + + rec, err := NewObsReport(ObsReportSettings{ + ReceiverID: receiverID, + Transport: transport, + ReceiverCreateSettings: receiver.CreateSettings{ID: receiverID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, }) + require.NoError(t, err) + ctx := rec.StartLogsOp(context.Background()) + require.NotNil(t, ctx) + rec.EndLogsOp(ctx, format, 7, nil) + + assert.NoError(t, tt.CheckReceiverLogs(transport, 7, 0)) + assert.Error(t, tt.CheckReceiverLogs(transport, 7, 7)) + assert.Error(t, tt.CheckReceiverLogs(transport, 0, 0)) + assert.Error(t, tt.CheckReceiverLogs(transport, 0, 7)) +} +func testTelemetry(t *testing.T, id component.ID, testFunc func(t *testing.T, tt componenttest.TestTelemetry)) { t.Run("WithOTel", func(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(id) + tt, err := componenttest.SetupTelemetry(id) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - testFunc(t, tt, true) + testFunc(t, tt) }) } diff --git a/receiver/receiverhelper/package_test.go b/receiver/receiverhelper/package_test.go new file mode 100644 index 00000000000..7b9bf829fc9 --- /dev/null +++ b/receiver/receiverhelper/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package receiverhelper + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/receiver/receivertest/contract_checker.go b/receiver/receivertest/contract_checker.go index 7bd71d4c3a9..37dd68b7f80 100644 --- a/receiver/receivertest/contract_checker.go +++ b/receiver/receivertest/contract_checker.go @@ -22,6 +22,7 @@ import ( "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" "go.opentelemetry.io/collector/receiver" ) @@ -78,7 +79,7 @@ func CheckConsumeContract(params CheckConsumeContractParams) { { name: "always_succeed", // Always succeed. We expect all data to be delivered as is. - decisionFunc: func(ids idSet) error { return nil }, + decisionFunc: func(idSet) error { return nil }, }, { name: "random_non_permanent_error", @@ -96,7 +97,7 @@ func CheckConsumeContract(params CheckConsumeContractParams) { for _, scenario := range scenarios { params.T.Run( - scenario.name, func(t *testing.T) { + scenario.name, func(*testing.T) { checkConsumeContractScenario(params, scenario.decisionFunc) }, ) @@ -104,7 +105,7 @@ func CheckConsumeContract(params CheckConsumeContractParams) { } func checkConsumeContractScenario(params CheckConsumeContractParams, decisionFunc func(ids idSet) error) { - consumer := &mockConsumer{t: params.T, consumeDecisionFunc: decisionFunc} + consumer := &mockConsumer{t: params.T, consumeDecisionFunc: decisionFunc, acceptedIDs: make(idSet), droppedIDs: make(idSet)} ctx := context.Background() // Create and start the receiver. @@ -116,8 +117,7 @@ func checkConsumeContractScenario(params CheckConsumeContractParams, decisionFun case component.DataTypeTraces: receiver, err = params.Factory.CreateTracesReceiver(ctx, NewNopCreateSettings(), params.Config, consumer) case component.DataTypeMetrics: - // TODO: add metrics support to mockConsumer so that this case can be also implemented. - require.FailNow(params.T, "DataTypeMetrics is not implemented") + receiver, err = params.Factory.CreateMetricsReceiver(ctx, NewNopCreateSettings(), params.Config, consumer) default: require.FailNow(params.T, "must specify a valid DataType to test for") } @@ -129,7 +129,7 @@ func checkConsumeContractScenario(params CheckConsumeContractParams, decisionFun // Begin generating data to the receiver. - var generatedIds idSet + generatedIDs := make(idSet) var generatedIndex int64 var mux sync.Mutex var wg sync.WaitGroup @@ -151,7 +151,7 @@ func checkConsumeContractScenario(params CheckConsumeContractParams, decisionFun require.Greater(params.T, len(ids), 0) mux.Lock() - duplicates := generatedIds.mergeSlice(ids) + duplicates := generatedIDs.mergeSlice(ids) mux.Unlock() // Check that the generator works correctly. There may not be any duplicates in the @@ -172,7 +172,7 @@ func checkConsumeContractScenario(params CheckConsumeContractParams, decisionFun assert.Failf(params.T, "found duplicate elements in received and dropped data", "keys=%v", duplicates) } // Compare accepted+dropped with generated. Once they are equal it means all data is seen by the consumer. - missingInOther, onlyInOther := generatedIds.compare(acceptedAndDropped) + missingInOther, onlyInOther := generatedIDs.compare(acceptedAndDropped) return len(missingInOther) == 0 && len(onlyInOther) == 0 }, 5*time.Second, 10*time.Millisecond) @@ -184,7 +184,7 @@ func checkConsumeContractScenario(params CheckConsumeContractParams, decisionFun // Make sure generated and accepted+dropped are exactly the same. - missingInOther, onlyInOther := generatedIds.compare(acceptedAndDropped) + missingInOther, onlyInOther := generatedIDs.compare(acceptedAndDropped) if len(missingInOther) != 0 { assert.Failf(params.T, "found elements sent that were not delivered", "keys=%v", missingInOther) } @@ -198,9 +198,9 @@ func checkConsumeContractScenario(params CheckConsumeContractParams, decisionFun // Print some stats to help debug test failures. fmt.Printf( "Sent %d, accepted=%d, expected dropped=%d, non-permanent errors retried=%d\n", - len(generatedIds), - len(consumer.acceptedIds), - len(consumer.droppedIds), + len(generatedIDs), + len(consumer.acceptedIDs), + len(consumer.droppedIDs), consumer.nonPermanentFailures, ) } @@ -224,30 +224,24 @@ func (ds idSet) compare(other idSet) (missingInOther, onlyInOther []UniqueIDAttr } // merge another set into this one and return a list of duplicate ids. -func (ds *idSet) merge(other idSet) (duplicates []UniqueIDAttrVal) { - if *ds == nil { - *ds = map[UniqueIDAttrVal]bool{} - } +func (ds idSet) merge(other idSet) (duplicates []UniqueIDAttrVal) { for k, v := range other { - if _, ok := (*ds)[k]; ok { + if _, ok := ds[k]; ok { duplicates = append(duplicates, k) } else { - (*ds)[k] = v + ds[k] = v } } return } -// merge another set into this one and return a list of duplicate ids. -func (ds *idSet) mergeSlice(other []UniqueIDAttrVal) (duplicates []UniqueIDAttrVal) { - if *ds == nil { - *ds = map[UniqueIDAttrVal]bool{} - } +// mergeSlice merges another set into this one and return a list of duplicate ids. +func (ds idSet) mergeSlice(other []UniqueIDAttrVal) (duplicates []UniqueIDAttrVal) { for _, id := range other { - if _, ok := (*ds)[id]; ok { + if _, ok := ds[id]; ok { duplicates = append(duplicates, id) } else { - (*ds)[id] = true + ds[id] = true } } return @@ -255,9 +249,9 @@ func (ds *idSet) mergeSlice(other []UniqueIDAttrVal) (duplicates []UniqueIDAttrV // union computes the union of this and another sets. A new set if created to return the result. // Also returns a list of any duplicate ids found. -func (ds *idSet) union(other idSet) (union idSet, duplicates []UniqueIDAttrVal) { +func (ds idSet) union(other idSet) (union idSet, duplicates []UniqueIDAttrVal) { union = map[UniqueIDAttrVal]bool{} - for k, v := range *ds { + for k, v := range ds { union[k] = v } for k, v := range other { @@ -282,7 +276,7 @@ var errPermanent = errors.New("permanent error") // randomNonPermanentErrorConsumeDecision is a decision function that succeeds approximately // half of the time and fails with a non-permanent error the rest of the time. -func randomNonPermanentErrorConsumeDecision(_ idSet) error { +func randomNonPermanentErrorConsumeDecision(idSet) error { if rand.Float32() < 0.5 { return errNonPermanent } @@ -291,7 +285,7 @@ func randomNonPermanentErrorConsumeDecision(_ idSet) error { // randomPermanentErrorConsumeDecision is a decision function that succeeds approximately // half of the time and fails with a permanent error the rest of the time. -func randomPermanentErrorConsumeDecision(_ idSet) error { +func randomPermanentErrorConsumeDecision(idSet) error { if rand.Float32() < 0.5 { return consumererror.NewPermanent(errPermanent) } @@ -301,7 +295,7 @@ func randomPermanentErrorConsumeDecision(_ idSet) error { // randomErrorsConsumeDecision is a decision function that succeeds approximately // a third of the time, fails with a permanent error the third of the time and fails with // a non-permanent error the rest of the time. -func randomErrorsConsumeDecision(_ idSet) error { +func randomErrorsConsumeDecision(idSet) error { r := rand.Float64() third := 1.0 / 3.0 if r < third { @@ -321,8 +315,8 @@ type mockConsumer struct { t *testing.T consumeDecisionFunc consumeDecisionFunc mux sync.Mutex - acceptedIds idSet - droppedIds idSet + acceptedIDs idSet + droppedIDs idSet nonPermanentFailures int } @@ -390,7 +384,76 @@ func idSetFromLogs(data plog.Logs) (idSet, error) { return ds, nil } -// TODO: Implement mockConsumer.ConsumeMetrics() +func (m *mockConsumer) ConsumeMetrics(_ context.Context, data pmetric.Metrics) error { + ids, err := idSetFromMetrics(data) + require.NoError(m.t, err) + return m.consume(ids) +} + +// idSetFromLogs computes an idSet from given pmetric.Metrics. The idSet will contain ids of all metric data points. +func idSetFromMetrics(data pmetric.Metrics) (idSet, error) { + ds := map[UniqueIDAttrVal]bool{} + rss := data.ResourceMetrics() + for i := 0; i < rss.Len(); i++ { + ils := rss.At(i).ScopeMetrics() + for j := 0; j < ils.Len(); j++ { + ss := ils.At(j).Metrics() + for k := 0; k < ss.Len(); k++ { + elem := ss.At(k) + switch elem.Type() { + case pmetric.MetricTypeGauge: + for l := 0; l < elem.Gauge().DataPoints().Len(); l++ { + dp := elem.Gauge().DataPoints().At(l) + if err := idSetFromDataPoint(ds, dp.Attributes()); err != nil { + return ds, err + } + } + case pmetric.MetricTypeSum: + for l := 0; l < elem.Sum().DataPoints().Len(); l++ { + dp := elem.Sum().DataPoints().At(l) + if err := idSetFromDataPoint(ds, dp.Attributes()); err != nil { + return ds, err + } + } + case pmetric.MetricTypeSummary: + for l := 0; l < elem.Summary().DataPoints().Len(); l++ { + dp := elem.Summary().DataPoints().At(l) + if err := idSetFromDataPoint(ds, dp.Attributes()); err != nil { + return ds, err + } + } + case pmetric.MetricTypeHistogram: + for l := 0; l < elem.Histogram().DataPoints().Len(); l++ { + dp := elem.Histogram().DataPoints().At(l) + if err := idSetFromDataPoint(ds, dp.Attributes()); err != nil { + return ds, err + } + } + case pmetric.MetricTypeExponentialHistogram: + for l := 0; l < elem.ExponentialHistogram().DataPoints().Len(); l++ { + dp := elem.ExponentialHistogram().DataPoints().At(l) + if err := idSetFromDataPoint(ds, dp.Attributes()); err != nil { + return ds, err + } + } + } + } + } + } + return ds, nil +} + +func idSetFromDataPoint(ds map[UniqueIDAttrVal]bool, attributes pcommon.Map) error { + key, exists := attributes.Get(UniqueIDAttrName) + if !exists { + return fmt.Errorf("invalid data element, attribute %q is missing", UniqueIDAttrName) + } + if key.Type() != pcommon.ValueTypeStr { + return fmt.Errorf("invalid data element, attribute %q is wrong type %v", UniqueIDAttrName, key.Type()) + } + ds[UniqueIDAttrVal(key.Str())] = true + return nil +} // consume the elements with the specified ids, regardless of the element data type. func (m *mockConsumer) consume(ids idSet) error { @@ -404,7 +467,7 @@ func (m *mockConsumer) consume(ids idSet) error { if consumererror.IsPermanent(err) { // It is a permanent error, which means we need to drop the data. // Remember the ids of dropped elements. - duplicates := m.droppedIds.merge(ids) + duplicates := m.droppedIDs.merge(ids) require.Empty(m.t, duplicates, "elements that were dropped previously were sent again") } else { // It is a non-permanent error. Don't add it to the drop list. Remember the number of @@ -416,7 +479,7 @@ func (m *mockConsumer) consume(ids idSet) error { } // The decision is a success. Remember the ids of the data in the accepted list. - duplicates := m.acceptedIds.merge(ids) + duplicates := m.acceptedIDs.merge(ids) require.Empty(m.t, duplicates, "elements that were accepted previously were sent again") return nil } @@ -426,7 +489,7 @@ func (m *mockConsumer) consume(ids idSet) error { func (m *mockConsumer) acceptedAndDropped() (acceptedAndDropped idSet, duplicates []UniqueIDAttrVal) { m.mux.Lock() defer m.mux.Unlock() - return m.acceptedIds.union(m.droppedIds) + return m.acceptedIDs.union(m.droppedIDs) } func CreateOneLogWithID(id UniqueIDAttrVal) plog.Logs { @@ -437,3 +500,62 @@ func CreateOneLogWithID(id UniqueIDAttrVal) plog.Logs { ) return data } + +func CreateGaugeMetricWithID(id UniqueIDAttrVal) pmetric.Metrics { + data := pmetric.NewMetrics() + gauge := data.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty().Metrics() + gauge.AppendEmpty().SetEmptyGauge().DataPoints().AppendEmpty().Attributes().PutStr( + UniqueIDAttrName, + string(id), + ) + return data +} + +func CreateSumMetricWithID(id UniqueIDAttrVal) pmetric.Metrics { + data := pmetric.NewMetrics() + sum := data.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty().Metrics() + sum.AppendEmpty().SetEmptySum().DataPoints().AppendEmpty().Attributes().PutStr( + UniqueIDAttrName, + string(id), + ) + return data +} + +func CreateSummaryMetricWithID(id UniqueIDAttrVal) pmetric.Metrics { + data := pmetric.NewMetrics() + summary := data.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty().Metrics() + summary.AppendEmpty().SetEmptySummary().DataPoints().AppendEmpty().Attributes().PutStr( + UniqueIDAttrName, + string(id), + ) + return data +} + +func CreateHistogramMetricWithID(id UniqueIDAttrVal) pmetric.Metrics { + data := pmetric.NewMetrics() + histogram := data.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty().Metrics() + histogram.AppendEmpty().SetEmptyHistogram().DataPoints().AppendEmpty().Attributes().PutStr( + UniqueIDAttrName, + string(id), + ) + return data +} + +func CreateExponentialHistogramMetricWithID(id UniqueIDAttrVal) pmetric.Metrics { + data := pmetric.NewMetrics() + exponentialHistogram := data.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty().Metrics() + exponentialHistogram.AppendEmpty().SetEmptyExponentialHistogram().DataPoints().AppendEmpty().Attributes().PutStr( + UniqueIDAttrName, + string(id), + ) + return data +} + +func CreateOneSpanWithID(id UniqueIDAttrVal) ptrace.Traces { + data := ptrace.NewTraces() + data.ResourceSpans().AppendEmpty().ScopeSpans().AppendEmpty().Spans().AppendEmpty().Attributes().PutStr( + UniqueIDAttrName, + string(id), + ) + return data +} diff --git a/receiver/receivertest/contract_checker_test.go b/receiver/receivertest/contract_checker_test.go index 2212d0b6196..57906308400 100644 --- a/receiver/receivertest/contract_checker_test.go +++ b/receiver/receivertest/contract_checker_test.go @@ -9,10 +9,15 @@ import ( "sync/atomic" "testing" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumererror" + "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" "go.opentelemetry.io/collector/receiver" ) @@ -20,21 +25,61 @@ import ( // We declare a trivial example receiver, a data generator and then use them in TestConsumeContract(). type exampleReceiver struct { - nextConsumer consumer.Logs + nextLogsConsumer consumer.Logs + nextTracesConsumer consumer.Traces + nextMetricsConsumer consumer.Metrics } -func (s *exampleReceiver) Start(_ context.Context, _ component.Host) error { +func (s *exampleReceiver) Start(context.Context, component.Host) error { return nil } -func (s *exampleReceiver) Shutdown(_ context.Context) error { +func (s *exampleReceiver) Shutdown(context.Context) error { return nil } -func (s *exampleReceiver) Receive(data plog.Logs) { +func (s *exampleReceiver) ReceiveLogs(data plog.Logs) { + // This very simple implementation demonstrates how a single items receiving should happen. + for { + err := s.nextLogsConsumer.ConsumeLogs(context.Background(), data) + if err != nil { + // The next consumer returned an error. + if !consumererror.IsPermanent(err) { + // It is not a permanent error, so we must retry sending it again. In network-based + // receivers instead we can ask our sender to re-retry the same data again later. + // We may also pause here a bit if we don't want to hammer the next consumer. + continue + } + } + // If we are hear either the ConsumeLogs returned success or it returned a permanent error. + // In either case we don't need to retry the same data, we are done. + return + } +} + +func (s *exampleReceiver) ReceiveMetrics(data pmetric.Metrics) { + // This very simple implementation demonstrates how a single items receiving should happen. + for { + err := s.nextMetricsConsumer.ConsumeMetrics(context.Background(), data) + if err != nil { + // The next consumer returned an error. + if !consumererror.IsPermanent(err) { + // It is not a permanent error, so we must retry sending it again. In network-based + // receivers instead we can ask our sender to re-retry the same data again later. + // We may also pause here a bit if we don't want to hammer the next consumer. + continue + } + } + // If we are hear either the ConsumeLogs returned success or it returned a permanent error. + // In either case we don't need to retry the same data, we are done. + return + } +} + +func (s *exampleReceiver) ReceiveTraces(data ptrace.Traces) { // This very simple implementation demonstrates how a single items receiving should happen. for { - err := s.nextConsumer.ConsumeLogs(context.Background(), data) + err := s.nextTracesConsumer.ConsumeTraces(context.Background(), data) if err != nil { // The next consumer returned an error. if !consumererror.IsPermanent(err) { @@ -52,30 +97,95 @@ func (s *exampleReceiver) Receive(data plog.Logs) { // A config for exampleReceiver. type exampleReceiverConfig struct { - generator *exampleGenerator + generator Generator } // A generator that can send data to exampleReceiver. -type exampleGenerator struct { +type exampleLogGenerator struct { t *testing.T receiver *exampleReceiver sequenceNum int64 } -func (g *exampleGenerator) Start() { +func (g *exampleLogGenerator) Start() { g.sequenceNum = 0 } -func (g *exampleGenerator) Stop() {} +func (g *exampleLogGenerator) Stop() {} -func (g *exampleGenerator) Generate() []UniqueIDAttrVal { +func (g *exampleLogGenerator) Generate() []UniqueIDAttrVal { // Make sure the id is atomically incremented. Generate() may be called concurrently. id := UniqueIDAttrVal(strconv.FormatInt(atomic.AddInt64(&g.sequenceNum, 1), 10)) data := CreateOneLogWithID(id) // Send the generated data to the receiver. - g.receiver.Receive(data) + g.receiver.ReceiveLogs(data) + + // And return the ids for bookkeeping by the test. + return []UniqueIDAttrVal{id} +} + +// A generator that can send data to exampleReceiver. +type exampleTraceGenerator struct { + t *testing.T + receiver *exampleReceiver + sequenceNum int64 +} + +func (g *exampleTraceGenerator) Start() { + g.sequenceNum = 0 +} + +func (g *exampleTraceGenerator) Stop() {} + +func (g *exampleTraceGenerator) Generate() []UniqueIDAttrVal { + // Make sure the id is atomically incremented. Generate() may be called concurrently. + id := UniqueIDAttrVal(strconv.FormatInt(atomic.AddInt64(&g.sequenceNum, 1), 10)) + + data := CreateOneSpanWithID(id) + + // Send the generated data to the receiver. + g.receiver.ReceiveTraces(data) + + // And return the ids for bookkeeping by the test. + return []UniqueIDAttrVal{id} +} + +// A generator that can send data to exampleReceiver. +type exampleMetricGenerator struct { + t *testing.T + receiver *exampleReceiver + sequenceNum int64 +} + +func (g *exampleMetricGenerator) Start() { + g.sequenceNum = 0 +} + +func (g *exampleMetricGenerator) Stop() {} + +func (g *exampleMetricGenerator) Generate() []UniqueIDAttrVal { + // Make sure the id is atomically incremented. Generate() may be called concurrently. + next := atomic.AddInt64(&g.sequenceNum, 1) + id := UniqueIDAttrVal(strconv.FormatInt(next, 10)) + + var data pmetric.Metrics + switch next % 5 { + case 0: + data = CreateGaugeMetricWithID(id) + case 1: + data = CreateSumMetricWithID(id) + case 2: + data = CreateSummaryMetricWithID(id) + case 3: + data = CreateHistogramMetricWithID(id) + case 4: + data = CreateExponentialHistogramMetricWithID(id) + } + + // Send the generated data to the receiver. + g.receiver.ReceiveMetrics(data) // And return the ids for bookkeeping by the test. return []UniqueIDAttrVal{id} @@ -83,22 +193,36 @@ func (g *exampleGenerator) Generate() []UniqueIDAttrVal { func newExampleFactory() receiver.Factory { return receiver.NewFactory( - "example_receiver", + component.MustNewType("example_receiver"), func() component.Config { return &exampleReceiverConfig{} }, receiver.WithLogs(createLog, component.StabilityLevelBeta), + receiver.WithMetrics(createMetric, component.StabilityLevelBeta), + receiver.WithTraces(createTrace, component.StabilityLevelBeta), ) } +func createTrace(_ context.Context, _ receiver.CreateSettings, cfg component.Config, consumer consumer.Traces) (receiver.Traces, error) { + rcv := &exampleReceiver{nextTracesConsumer: consumer} + cfg.(*exampleReceiverConfig).generator.(*exampleTraceGenerator).receiver = rcv + return rcv, nil +} + +func createMetric(_ context.Context, _ receiver.CreateSettings, cfg component.Config, consumer consumer.Metrics) (receiver.Metrics, error) { + rcv := &exampleReceiver{nextMetricsConsumer: consumer} + cfg.(*exampleReceiverConfig).generator.(*exampleMetricGenerator).receiver = rcv + return rcv, nil +} + func createLog( _ context.Context, _ receiver.CreateSettings, cfg component.Config, consumer consumer.Logs, ) (receiver.Logs, error) { - rcv := &exampleReceiver{nextConsumer: consumer} - cfg.(*exampleReceiverConfig).generator.receiver = rcv + rcv := &exampleReceiver{nextLogsConsumer: consumer} + cfg.(*exampleReceiverConfig).generator.(*exampleLogGenerator).receiver = rcv return rcv, nil } @@ -109,7 +233,7 @@ func TestConsumeContract(t *testing.T) { // Number of log records to send per scenario. const logsPerTest = 100 - generator := &exampleGenerator{t: t} + generator := &exampleLogGenerator{t: t} cfg := &exampleReceiverConfig{generator: generator} params := CheckConsumeContractParams{ @@ -124,3 +248,115 @@ func TestConsumeContract(t *testing.T) { // Run the contract checker. This will trigger test failures if any problems are found. CheckConsumeContract(params) } + +// TestConsumeMetricsContract is an example of testing of the receiver for the contract between the +// receiver and next consumer. +func TestConsumeMetricsContract(t *testing.T) { + + // Number of metric data points to send per scenario. + const metricsPerTest = 100 + + generator := &exampleMetricGenerator{t: t} + cfg := &exampleReceiverConfig{generator: generator} + + params := CheckConsumeContractParams{ + T: t, + Factory: newExampleFactory(), + DataType: component.DataTypeMetrics, + Config: cfg, + Generator: generator, + GenerateCount: metricsPerTest, + } + + // Run the contract checker. This will trigger test failures if any problems are found. + CheckConsumeContract(params) +} + +// TestConsumeTracesContract is an example of testing of the receiver for the contract between the +// receiver and next consumer. +func TestConsumeTracesContract(t *testing.T) { + + // Number of trace spans to send per scenario. + const spansPerTest = 100 + + generator := &exampleTraceGenerator{t: t} + cfg := &exampleReceiverConfig{generator: generator} + + params := CheckConsumeContractParams{ + T: t, + Factory: newExampleFactory(), + DataType: component.DataTypeTraces, + Config: cfg, + Generator: generator, + GenerateCount: spansPerTest, + } + + // Run the contract checker. This will trigger test failures if any problems are found. + CheckConsumeContract(params) +} + +func TestIDSetFromDataPoint(t *testing.T) { + require.Error(t, idSetFromDataPoint(map[UniqueIDAttrVal]bool{}, pcommon.NewMap())) + m := pcommon.NewMap() + m.PutStr("foo", "bar") + require.Error(t, idSetFromDataPoint(map[UniqueIDAttrVal]bool{}, m)) + m.PutInt(UniqueIDAttrName, 64) + require.Error(t, idSetFromDataPoint(map[UniqueIDAttrVal]bool{}, m)) + m.PutStr(UniqueIDAttrName, "myid") + result := map[UniqueIDAttrVal]bool{} + require.NoError(t, idSetFromDataPoint(result, m)) + require.True(t, result["myid"]) +} + +func TestBadMetricPoint(t *testing.T) { + for _, test := range []struct { + name string + metrics pmetric.Metrics + }{ + { + name: "gauge", + metrics: func() pmetric.Metrics { + m := pmetric.NewMetrics() + m.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty().Metrics().AppendEmpty().SetEmptyGauge().DataPoints().AppendEmpty() + return m + }(), + }, + { + name: "sum", + metrics: func() pmetric.Metrics { + m := pmetric.NewMetrics() + m.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty().Metrics().AppendEmpty().SetEmptySum().DataPoints().AppendEmpty() + return m + }(), + }, + { + name: "summary", + metrics: func() pmetric.Metrics { + m := pmetric.NewMetrics() + m.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty().Metrics().AppendEmpty().SetEmptySummary().DataPoints().AppendEmpty() + return m + }(), + }, + { + name: "histogram", + metrics: func() pmetric.Metrics { + m := pmetric.NewMetrics() + m.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty().Metrics().AppendEmpty().SetEmptyHistogram().DataPoints().AppendEmpty() + return m + }(), + }, + { + name: "exponential histogram", + metrics: func() pmetric.Metrics { + m := pmetric.NewMetrics() + m.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty().Metrics().AppendEmpty().SetEmptyExponentialHistogram().DataPoints().AppendEmpty() + return m + }(), + }, + } { + t.Run(test.name, func(t *testing.T) { + _, err := idSetFromMetrics(test.metrics) + require.Error(t, err) + }) + } +} diff --git a/receiver/receivertest/nop_receiver.go b/receiver/receivertest/nop_receiver.go index e2216f5c4a3..0c7cee87cf3 100644 --- a/receiver/receivertest/nop_receiver.go +++ b/receiver/receivertest/nop_receiver.go @@ -12,11 +12,12 @@ import ( "go.opentelemetry.io/collector/receiver" ) -const typeStr = "nop" +var componentType = component.MustNewType("nop") -// NewNopCreateSettings returns a new nop settings for Create* functions. +// NewNopCreateSettings returns a new nop settings for Create*Receiver functions. func NewNopCreateSettings() receiver.CreateSettings { return receiver.CreateSettings{ + ID: component.NewID(componentType), TelemetrySettings: componenttest.NewNopTelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo(), } @@ -25,7 +26,7 @@ func NewNopCreateSettings() receiver.CreateSettings { // NewNopFactory returns a receiver.Factory that constructs nop receivers. func NewNopFactory() receiver.Factory { return receiver.NewFactory( - "nop", + componentType, func() component.Config { return &nopConfig{} }, receiver.WithTraces(createTraces, component.StabilityLevelStable), receiver.WithMetrics(createMetrics, component.StabilityLevelStable), @@ -48,7 +49,7 @@ type nopConfig struct{} var nopInstance = &nopReceiver{} -// nopReceiver stores consumed traces and metrics for testing purposes. +// nopReceiver acts as a receiver for testing purposes. type nopReceiver struct { component.StartFunc component.ShutdownFunc @@ -58,14 +59,6 @@ type nopReceiver struct { func NewNopBuilder() *receiver.Builder { nopFactory := NewNopFactory() return receiver.NewBuilder( - map[component.ID]component.Config{component.NewID(typeStr): nopFactory.CreateDefaultConfig()}, - map[component.Type]receiver.Factory{typeStr: nopFactory}) -} - -func NewCreateSettings(id component.ID, set component.TelemetrySettings) receiver.CreateSettings { - return receiver.CreateSettings{ - ID: id, - TelemetrySettings: set, - BuildInfo: component.NewDefaultBuildInfo(), - } + map[component.ID]component.Config{component.NewID(componentType): nopFactory.CreateDefaultConfig()}, + map[component.Type]receiver.Factory{componentType: nopFactory}) } diff --git a/receiver/receivertest/nop_receiver_test.go b/receiver/receivertest/nop_receiver_test.go index f2f74d3f17e..d384e6b1fb7 100644 --- a/receiver/receivertest/nop_receiver_test.go +++ b/receiver/receivertest/nop_receiver_test.go @@ -15,10 +15,12 @@ import ( "go.opentelemetry.io/collector/consumer/consumertest" ) +var nopType = component.MustNewType("nop") + func TestNewNopFactory(t *testing.T) { factory := NewNopFactory() require.NotNil(t, factory) - assert.Equal(t, component.Type("nop"), factory.Type()) + assert.Equal(t, nopType, factory.Type()) cfg := factory.CreateDefaultConfig() assert.Equal(t, &nopConfig{}, cfg) @@ -45,7 +47,7 @@ func TestNewNopBuilder(t *testing.T) { factory := NewNopFactory() cfg := factory.CreateDefaultConfig() set := NewNopCreateSettings() - set.ID = component.NewID(typeStr) + set.ID = component.NewID(nopType) traces, err := factory.CreateTracesReceiver(context.Background(), set, cfg, consumertest.NewNop()) require.NoError(t, err) diff --git a/receiver/receivertest/package_test.go b/receiver/receivertest/package_test.go new file mode 100644 index 00000000000..c4702240490 --- /dev/null +++ b/receiver/receivertest/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package receivertest + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/receiver/scrapererror/package_test.go b/receiver/scrapererror/package_test.go new file mode 100644 index 00000000000..b414afd1d34 --- /dev/null +++ b/receiver/scrapererror/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package scrapererror + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/receiver/scrapererror/partialscrapeerror.go b/receiver/scrapererror/partialscrapeerror.go index e1a67fa52b0..cb4c03bab80 100644 --- a/receiver/scrapererror/partialscrapeerror.go +++ b/receiver/scrapererror/partialscrapeerror.go @@ -23,10 +23,6 @@ func NewPartialScrapeError(err error, failed int) PartialScrapeError { // IsPartialScrapeError checks if an error was wrapped with PartialScrapeError. func IsPartialScrapeError(err error) bool { - if err == nil { - return false - } - var partialScrapeErr PartialScrapeError return errors.As(err, &partialScrapeErr) } diff --git a/receiver/scraperhelper/settings.go b/receiver/scraperhelper/config.go similarity index 64% rename from receiver/scraperhelper/settings.go rename to receiver/scraperhelper/config.go index c59ea932583..68f0a56297d 100644 --- a/receiver/scraperhelper/settings.go +++ b/receiver/scraperhelper/config.go @@ -20,8 +20,14 @@ var ( // ScraperControllerSettings defines common settings for a scraper controller // configuration. Scraper controller receivers can embed this struct, instead // of receiver.Settings, and extend it with more fields if needed. -type ScraperControllerSettings struct { - // CollectionInterval sets the how frequently the scraper +// Deprecated: [v0.95.0] Use ControllerConfig instead +type ScraperControllerSettings = ControllerConfig + +// ControllerConfig defines common settings for a scraper controller +// configuration. Scraper controller receivers can embed this struct, instead +// of receiver.Settings, and extend it with more fields if needed. +type ControllerConfig struct { + // CollectionInterval sets how frequently the scraper // should be called and used as the context timeout // to ensure that scrapers don't exceed the interval. CollectionInterval time.Duration `mapstructure:"collection_interval"` @@ -34,15 +40,22 @@ type ScraperControllerSettings struct { // NewDefaultScraperControllerSettings returns default scraper controller // settings with a collection interval of one minute. -func NewDefaultScraperControllerSettings(component.Type) ScraperControllerSettings { - return ScraperControllerSettings{ +// Deprecated: [v0.95.0] Use NewDefaultControllerConfig instead +func NewDefaultScraperControllerSettings(component.Type) ControllerConfig { + return NewDefaultControllerConfig() +} + +// NewDefaultControllerConfig returns default scraper controller +// settings with a collection interval of one minute. +func NewDefaultControllerConfig() ControllerConfig { + return ControllerConfig{ CollectionInterval: time.Minute, InitialDelay: time.Second, Timeout: 0, } } -func (set *ScraperControllerSettings) Validate() (errs error) { +func (set *ControllerConfig) Validate() (errs error) { if set.CollectionInterval <= 0 { errs = multierr.Append(errs, fmt.Errorf(`"collection_interval": %w`, errNonPositiveInterval)) } diff --git a/receiver/scraperhelper/settings_test.go b/receiver/scraperhelper/config_test.go similarity index 84% rename from receiver/scraperhelper/settings_test.go rename to receiver/scraperhelper/config_test.go index 0fa0d57f915..1da08e78006 100644 --- a/receiver/scraperhelper/settings_test.go +++ b/receiver/scraperhelper/config_test.go @@ -15,22 +15,22 @@ func TestScrapeControllerSettings(t *testing.T) { for _, tc := range []struct { name string - set ScraperControllerSettings + set ControllerConfig errVal string }{ { name: "default configuration", - set: NewDefaultScraperControllerSettings(""), + set: NewDefaultControllerConfig(), errVal: "", }, { name: "zero value configuration", - set: ScraperControllerSettings{}, + set: ControllerConfig{}, errVal: `"collection_interval": requires positive value`, }, { name: "invalid timeout", - set: ScraperControllerSettings{ + set: ControllerConfig{ CollectionInterval: time.Minute, Timeout: -1 * time.Minute, }, diff --git a/receiver/scraperhelper/obsreport.go b/receiver/scraperhelper/obsreport.go index 415e090195e..a8ba76b66e7 100644 --- a/receiver/scraperhelper/obsreport.go +++ b/receiver/scraperhelper/obsreport.go @@ -7,19 +7,15 @@ import ( "context" "errors" - "go.opencensus.io/stats" - "go.opencensus.io/tag" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/metric" - sdkmetric "go.opentelemetry.io/otel/sdk/metric" "go.opentelemetry.io/otel/trace" "go.uber.org/multierr" "go.uber.org/zap" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" - "go.opentelemetry.io/collector/internal/obsreportconfig" "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" "go.opentelemetry.io/collector/receiver" "go.opentelemetry.io/collector/receiver/scrapererror" @@ -34,12 +30,10 @@ type ObsReport struct { level configtelemetry.Level receiverID component.ID scraper component.ID - mutators []tag.Mutator tracer trace.Tracer logger *zap.Logger - useOtelForMetrics bool otelAttrs []attribute.KeyValue scrapedMetricsPoints metric.Int64Counter erroredMetricsPoints metric.Int64Counter @@ -54,32 +48,24 @@ type ObsReportSettings struct { // NewObsReport creates a new ObsReport. func NewObsReport(cfg ObsReportSettings) (*ObsReport, error) { - return newScraper(cfg, obsreportconfig.UseOtelForInternalMetricsfeatureGate.IsEnabled()) + return newScraper(cfg) } -func newScraper(cfg ObsReportSettings, useOtel bool) (*ObsReport, error) { +func newScraper(cfg ObsReportSettings) (*ObsReport, error) { scraper := &ObsReport{ level: cfg.ReceiverCreateSettings.TelemetrySettings.MetricsLevel, receiverID: cfg.ReceiverID, scraper: cfg.Scraper, - mutators: []tag.Mutator{ - tag.Upsert(obsmetrics.TagKeyReceiver, cfg.ReceiverID.String(), tag.WithTTL(tag.TTLNoPropagation)), - tag.Upsert(obsmetrics.TagKeyScraper, cfg.Scraper.String(), tag.WithTTL(tag.TTLNoPropagation))}, - tracer: cfg.ReceiverCreateSettings.TracerProvider.Tracer(cfg.Scraper.String()), + tracer: cfg.ReceiverCreateSettings.TracerProvider.Tracer(cfg.Scraper.String()), - logger: cfg.ReceiverCreateSettings.Logger, - useOtelForMetrics: useOtel, + logger: cfg.ReceiverCreateSettings.Logger, otelAttrs: []attribute.KeyValue{ attribute.String(obsmetrics.ReceiverKey, cfg.ReceiverID.String()), attribute.String(obsmetrics.ScraperKey, cfg.Scraper.String()), }, } - // ignore instrument name error as per workaround in https://github.com/open-telemetry/opentelemetry-collector/issues/8346 - // if err := scraper.createOtelMetrics(cfg); err != nil { - // return nil, err - // } - if err := scraper.createOtelMetrics(cfg); err != nil && !errors.Is(err, sdkmetric.ErrInstrumentName) { + if err := scraper.createOtelMetrics(cfg); err != nil { return nil, err } @@ -87,9 +73,6 @@ func newScraper(cfg ObsReportSettings, useOtel bool) (*ObsReport, error) { } func (s *ObsReport) createOtelMetrics(cfg ObsReportSettings) error { - if !s.useOtelForMetrics { - return nil - } meter := cfg.ReceiverCreateSettings.MeterProvider.Meter(scraperScope) var errors, err error @@ -115,8 +98,6 @@ func (s *ObsReport) createOtelMetrics(cfg ObsReportSettings) error { // returned context should be used in other calls to the obsreport functions // dealing with the same scrape operation. func (s *ObsReport) StartMetricsOp(ctx context.Context) context.Context { - ctx, _ = tag.New(ctx, s.mutators...) - spanName := obsmetrics.ScraperPrefix + s.receiverID.String() + obsmetrics.NameSep + s.scraper.String() + obsmetrics.ScraperMetricsOperationSuffix ctx, _ = s.tracer.Start(ctx, spanName) return ctx @@ -149,7 +130,7 @@ func (s *ObsReport) EndMetricsOp( // end span according to errors if span.IsRecording() { span.SetAttributes( - attribute.String(obsmetrics.FormatKey, string(component.DataTypeMetrics)), + attribute.String(obsmetrics.FormatKey, component.DataTypeMetrics.String()), attribute.Int64(obsmetrics.ScrapedMetricPointsKey, int64(numScrapedMetrics)), attribute.Int64(obsmetrics.ErroredMetricPointsKey, int64(numErroredMetrics)), ) @@ -163,13 +144,6 @@ func (s *ObsReport) EndMetricsOp( } func (s *ObsReport) recordMetrics(scraperCtx context.Context, numScrapedMetrics, numErroredMetrics int) { - if s.useOtelForMetrics { - s.scrapedMetricsPoints.Add(scraperCtx, int64(numScrapedMetrics), metric.WithAttributes(s.otelAttrs...)) - s.erroredMetricsPoints.Add(scraperCtx, int64(numErroredMetrics), metric.WithAttributes(s.otelAttrs...)) - } else { // OC for metrics - stats.Record( - scraperCtx, - obsmetrics.ScraperScrapedMetricPoints.M(int64(numScrapedMetrics)), - obsmetrics.ScraperErroredMetricPoints.M(int64(numErroredMetrics))) - } + s.scrapedMetricsPoints.Add(scraperCtx, int64(numScrapedMetrics), metric.WithAttributes(s.otelAttrs...)) + s.erroredMetricsPoints.Add(scraperCtx, int64(numErroredMetrics), metric.WithAttributes(s.otelAttrs...)) } diff --git a/receiver/scraperhelper/obsreport_test.go b/receiver/scraperhelper/obsreport_test.go index 0ca828c77cb..6ccbc8041cd 100644 --- a/receiver/scraperhelper/obsreport_test.go +++ b/receiver/scraperhelper/obsreport_test.go @@ -14,15 +14,15 @@ import ( "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" - "go.opentelemetry.io/collector/obsreport/obsreporttest" - "go.opentelemetry.io/collector/receiver/receivertest" + "go.opentelemetry.io/collector/receiver" "go.opentelemetry.io/collector/receiver/scrapererror" ) var ( - receiverID = component.NewID("fakeReceiver") - scraperID = component.NewID("fakeScraper") + receiverID = component.MustNewID("fakeReceiver") + scraperID = component.MustNewID("fakeScraper") errFake = errors.New("errFake") partialErrFake = scrapererror.NewPartialScrapeError(errFake, 1) @@ -34,8 +34,8 @@ type testParams struct { } func TestScrapeMetricsDataOp(t *testing.T) { - testTelemetry(t, receiverID, func(t *testing.T, tt obsreporttest.TestTelemetry, useOtel bool) { - parentCtx, parentSpan := tt.TracerProvider.Tracer("test").Start(context.Background(), t.Name()) + testTelemetry(t, receiverID, func(t *testing.T, tt componenttest.TestTelemetry) { + parentCtx, parentSpan := tt.TelemetrySettings().TracerProvider.Tracer("test").Start(context.Background(), t.Name()) defer parentSpan.End() params := []testParams{ @@ -47,8 +47,8 @@ func TestScrapeMetricsDataOp(t *testing.T) { scrp, err := newScraper(ObsReportSettings{ ReceiverID: receiverID, Scraper: scraperID, - ReceiverCreateSettings: receivertest.NewCreateSettings(receiverID, tt.TelemetrySettings), - }, useOtel) + ReceiverCreateSettings: receiver.CreateSettings{ID: receiverID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, + }) require.NoError(t, err) ctx := scrp.StartMetricsOp(parentCtx) assert.NotNil(t, ctx) @@ -86,24 +86,37 @@ func TestScrapeMetricsDataOp(t *testing.T) { } } - require.NoError(t, obsreporttest.CheckScraperMetrics(tt, receiverID, scraperID, int64(scrapedMetricPoints), int64(erroredMetricPoints))) + require.NoError(t, tt.CheckScraperMetrics(receiverID, scraperID, int64(scrapedMetricPoints), int64(erroredMetricPoints))) }) } -func testTelemetry(t *testing.T, id component.ID, testFunc func(t *testing.T, tt obsreporttest.TestTelemetry, useOtel bool)) { - t.Run("WithOC", func(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(id) - require.NoError(t, err) - t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) +func TestCheckScraperMetricsViews(t *testing.T) { + tt, err := componenttest.SetupTelemetry(receiverID) + require.NoError(t, err) + t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - testFunc(t, tt, false) + s, err := NewObsReport(ObsReportSettings{ + ReceiverID: receiverID, + Scraper: scraperID, + ReceiverCreateSettings: receiver.CreateSettings{ID: receiverID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, }) + require.NoError(t, err) + ctx := s.StartMetricsOp(context.Background()) + require.NotNil(t, ctx) + s.EndMetricsOp(ctx, 7, nil) + + assert.NoError(t, tt.CheckScraperMetrics(receiverID, scraperID, 7, 0)) + assert.Error(t, tt.CheckScraperMetrics(receiverID, scraperID, 7, 7)) + assert.Error(t, tt.CheckScraperMetrics(receiverID, scraperID, 0, 0)) + assert.Error(t, tt.CheckScraperMetrics(receiverID, scraperID, 0, 7)) +} +func testTelemetry(t *testing.T, id component.ID, testFunc func(t *testing.T, tt componenttest.TestTelemetry)) { t.Run("WithOTel", func(t *testing.T) { - tt, err := obsreporttest.SetupTelemetry(id) + tt, err := componenttest.SetupTelemetry(id) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - testFunc(t, tt, true) + testFunc(t, tt) }) } diff --git a/receiver/scraperhelper/package_test.go b/receiver/scraperhelper/package_test.go new file mode 100644 index 00000000000..a9a536a78d9 --- /dev/null +++ b/receiver/scraperhelper/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package scraperhelper + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/receiver/scraperhelper/scraper.go b/receiver/scraperhelper/scraper.go index 70bfe099d3a..f97eb65a403 100644 --- a/receiver/scraperhelper/scraper.go +++ b/receiver/scraperhelper/scraper.go @@ -67,7 +67,7 @@ func NewScraper(name string, scrape ScrapeFunc, options ...ScraperOption) (Scrap } bs := &baseScraper{ ScrapeFunc: scrape, - id: component.NewID(component.Type(name)), + id: component.NewID(component.MustNewType(name)), } for _, op := range options { op(bs) diff --git a/receiver/scraperhelper/scrapercontroller.go b/receiver/scraperhelper/scrapercontroller.go index fb6da0a3ddf..2f2896f6903 100644 --- a/receiver/scraperhelper/scrapercontroller.go +++ b/receiver/scraperhelper/scrapercontroller.go @@ -65,14 +65,11 @@ type controller struct { // NewScraperControllerReceiver creates a Receiver with the configured options, that can control multiple scrapers. func NewScraperControllerReceiver( - cfg *ScraperControllerSettings, + cfg *ControllerConfig, set receiver.CreateSettings, nextConsumer consumer.Metrics, options ...ScraperControllerOption, ) (component.Component, error) { - if nextConsumer == nil { - return nil, component.ErrNilNextConsumer - } if cfg.CollectionInterval <= 0 { return nil, errors.New("collection_interval must be a positive duration") diff --git a/receiver/scraperhelper/scrapercontroller_test.go b/receiver/scraperhelper/scrapercontroller_test.go index 1340af2bba7..1c41258ff18 100644 --- a/receiver/scraperhelper/scrapercontroller_test.go +++ b/receiver/scraperhelper/scrapercontroller_test.go @@ -17,10 +17,9 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/obsreport/obsreporttest" "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/receiver" "go.opentelemetry.io/collector/receiver/receivertest" "go.opentelemetry.io/collector/receiver/scrapererror" ) @@ -51,7 +50,7 @@ type testScrapeMetrics struct { err error } -func (ts *testScrapeMetrics) scrape(_ context.Context) (pmetric.Metrics, error) { +func (ts *testScrapeMetrics) scrape(context.Context) (pmetric.Metrics, error) { ts.timesScrapeCalled++ ts.ch <- ts.timesScrapeCalled @@ -64,8 +63,8 @@ func (ts *testScrapeMetrics) scrape(_ context.Context) (pmetric.Metrics, error) return md, nil } -func newTestNoDelaySettings() *ScraperControllerSettings { - return &ScraperControllerSettings{ +func newTestNoDelaySettings() *ControllerConfig { + return &ControllerConfig{ CollectionInterval: time.Second, InitialDelay: 0, } @@ -75,8 +74,7 @@ type metricsTestCase struct { name string scrapers int - scraperControllerSettings *ScraperControllerSettings - nilNextConsumer bool + scraperControllerSettings *ControllerConfig scrapeErr error expectedNewErr string expectScraped bool @@ -97,16 +95,10 @@ func TestScrapeController(t *testing.T) { scrapers: 2, expectScraped: true, }, - { - name: "AddMetricsScrapers_NilNextConsumerError", - scrapers: 2, - nilNextConsumer: true, - expectedNewErr: "nil next Consumer", - }, { name: "AddMetricsScrapersWithCollectionInterval_InvalidCollectionIntervalError", scrapers: 2, - scraperControllerSettings: &ScraperControllerSettings{CollectionInterval: -time.Millisecond}, + scraperControllerSettings: &ControllerConfig{CollectionInterval: -time.Millisecond}, expectedNewErr: "collection_interval must be a positive duration", }, { @@ -134,8 +126,8 @@ func TestScrapeController(t *testing.T) { for _, test := range testCases { test := test t.Run(test.name, func(t *testing.T) { - receiverID := component.NewID("receiver") - tt, err := obsreporttest.SetupTelemetry(receiverID) + receiverID := component.MustNewID("receiver") + tt, err := componenttest.SetupTelemetry(receiverID) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) @@ -147,17 +139,13 @@ func TestScrapeController(t *testing.T) { tickerCh := make(chan time.Time) options = append(options, WithTickerChannel(tickerCh)) - var nextConsumer consumer.Metrics sink := new(consumertest.MetricsSink) - if !test.nilNextConsumer { - nextConsumer = sink - } cfg := newTestNoDelaySettings() if test.scraperControllerSettings != nil { cfg = test.scraperControllerSettings } - mr, err := NewScraperControllerReceiver(cfg, receivertest.NewCreateSettings(receiverID, tt.TelemetrySettings), nextConsumer, options...) + mr, err := NewScraperControllerReceiver(cfg, receiver.CreateSettings{ID: receiverID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()}, sink, options...) if test.expectedNewErr != "" { assert.EqualError(t, err, test.expectedNewErr) return @@ -285,7 +273,7 @@ func assertReceiverSpan(t *testing.T, spans []sdktrace.ReadOnlySpan) { assert.True(t, receiverSpan) } -func assertReceiverViews(t *testing.T, tt obsreporttest.TestTelemetry, sink *consumertest.MetricsSink) { +func assertReceiverViews(t *testing.T, tt componenttest.TestTelemetry, sink *consumertest.MetricsSink) { dataPointCount := 0 for _, md := range sink.AllMetrics() { dataPointCount += md.DataPointCount() @@ -313,7 +301,7 @@ func assertScraperSpan(t *testing.T, expectedErr error, spans []sdktrace.ReadOnl assert.True(t, scraperSpan) } -func assertScraperViews(t *testing.T, tt obsreporttest.TestTelemetry, expectedErr error, sink *consumertest.MetricsSink) { +func assertScraperViews(t *testing.T, tt componenttest.TestTelemetry, expectedErr error, sink *consumertest.MetricsSink) { expectedScraped := int64(sink.DataPointCount()) expectedErrored := int64(0) if expectedErr != nil { @@ -326,7 +314,7 @@ func assertScraperViews(t *testing.T, tt obsreporttest.TestTelemetry, expectedEr } } - require.NoError(t, obsreporttest.CheckScraperMetrics(tt, component.NewID("receiver"), component.NewID("scraper"), expectedScraped, expectedErrored)) + require.NoError(t, tt.CheckScraperMetrics(component.MustNewID("receiver"), component.MustNewID("scraper"), expectedScraped, expectedErrored)) } func TestSingleScrapePerInterval(t *testing.T) { @@ -337,7 +325,7 @@ func TestSingleScrapePerInterval(t *testing.T) { tickerCh := make(chan time.Time) - scp, err := NewScraper("", tsm.scrape) + scp, err := NewScraper("scaper", tsm.scrape) assert.NoError(t, err) receiver, err := NewScraperControllerReceiver( @@ -350,6 +338,7 @@ func TestSingleScrapePerInterval(t *testing.T) { require.NoError(t, err) require.NoError(t, receiver.Start(context.Background(), componenttest.NewNopHost())) + defer func() { require.NoError(t, receiver.Shutdown(context.Background())) }() tickerCh <- time.Now() @@ -378,11 +367,11 @@ func TestScrapeControllerStartsOnInit(t *testing.T) { ch: make(chan int, 1), } - scp, err := NewScraper("", tsm.scrape) + scp, err := NewScraper("scraper", tsm.scrape) require.NoError(t, err, "Must not error when creating scraper") r, err := NewScraperControllerReceiver( - &ScraperControllerSettings{ + &ControllerConfig{ CollectionInterval: time.Hour, InitialDelay: 0, }, @@ -408,13 +397,13 @@ func TestScrapeControllerInitialDelay(t *testing.T) { var ( elapsed = make(chan time.Time, 1) - cfg = ScraperControllerSettings{ + cfg = ControllerConfig{ CollectionInterval: time.Second, InitialDelay: 300 * time.Millisecond, } ) - scp, err := NewScraper("timed", func(ctx context.Context) (pmetric.Metrics, error) { + scp, err := NewScraper("timed", func(context.Context) (pmetric.Metrics, error) { elapsed <- time.Now() return pmetric.NewMetrics(), nil }) diff --git a/renovate.json b/renovate.json index df04fb36693..9f645452830 100644 --- a/renovate.json +++ b/renovate.json @@ -1,13 +1,26 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "labels": [ + "renovatebot", "dependencies" ], - "extends": [ - "config:base" - ], + "constraints": { + "go": "1.21" + }, + "extends": ["config:recommended"], "schedule": ["every tuesday"], "packageRules": [ + { + "matchManagers": ["gomod"], + "matchUpdateTypes": ["pin", "pinDigest", "digest", "lockFileMaintenance", "rollback", "bump", "replacement"], + "enabled": false + }, + { + "matchManagers": ["gomod"], + "matchUpdateTypes": ["major"], + "prBodyNotes": [":warning: MAJOR VERSION UPDATE :warning: - please manually update this package"], + "labels": ["dependency-major-update"] + }, { "matchManagers": ["dockerfile"], "groupName": "dockerfile deps" @@ -22,10 +35,28 @@ }, { "matchManagers": ["gomod"], - "matchUpdateTypes": ["minor", "major"] + "matchSourceUrlPrefixes": ["https://go.opentelemetry.io/contrib"], + "groupName": "All go.opentelemetry.io/contrib packages" + }, + { + "matchManagers": ["gomod"], + "matchSourceUrlPrefixes": ["https://go.opentelemetry.io/otel"], + "groupName": "All go.opentelemetry.io/contrib packages" + }, + { + "matchManagers": ["gomod"], + "matchSourceUrlPrefixes": ["https://google.golang.org"], + "groupName": "All google.golang.org packages" + }, + { + "matchManagers": ["gomod"], + "matchSourceUrlPrefixes": ["https://golang.org"], + "groupName": "All golang.org packages" } ], "ignoreDeps": [ "github.com/mattn/go-ieproxy" - ] + ], + "prConcurrentLimit": 200, + "suppressNotifications": ["prEditedNotification"] } diff --git a/semconv/README.md b/semconv/README.md index dcbcc71c797..a453bbafd27 100644 --- a/semconv/README.md +++ b/semconv/README.md @@ -6,17 +6,13 @@ from definitions in the specification. ## Generation To generate the constants you can use the `gensemconv` make target. You must provide the path to the root of a clone of -the `opentelemetry-specification` repository in the `SPECPATH` variable and the version of the conventions to generate +the `semantic-conventions` repository in the `SPECPATH` variable and the version of the conventions to generate in the `SPECTAG` variable. ```console -$ make gensemconv SPECPATH=~/dev/opentelemetry-specification SPECTAG=v1.5.0 -Generating semantic convention constants from specification version v1.5.0 at ~/dev/opentelemetry-specification -semconvgen -o semconv/v1.5.0 -t semconv/template.j2 -s v1.5.0 -i ~/dev/opentelemetry-specification/semantic_conventions/resource -p conventionType=resource -semconvgen -o semconv/v1.5.0 -t semconv/template.j2 -s v1.5.0 -i ~/dev/opentelemetry-specification/semantic_conventions/trace -p conventionType=trace +$ make gensemconv SPECPATH=/tmp/semantic-conventions SPECTAG=v1.22.0 +Generating semantic convention constants from specification version v1.22.0 at /tmp/semantic-conventions +.tools/semconvgen -o semconv/v1.22.0 -t semconv/template.j2 -s v1.22.0 -i /tmp/semantic-conventions/model/. --only=resource -p conventionType=resource -f generated_resource.go +.tools/semconvgen -o semconv/v1.22.0 -t semconv/template.j2 -s v1.22.0 -i /tmp/semantic-conventions/model/. --only=event -p conventionType=event -f generated_event.go +.tools/semconvgen -o semconv/v1.22.0 -t semconv/template.j2 -s v1.22.0 -i /tmp/semantic-conventions/model/. --only=span -p conventionType=trace -f generated_trace.go ``` - -When generating the constants for a new version ot the specification it is important to note that only -`generated_trace.go` and `generated_resource.go` are generated automatically. The `schema.go` and `nonstandard.go` -files should be copied from a prior version's package and updated as appropriate. Most important will be to update -the `SchemaURL` constant in `schema.go`. diff --git a/semconv/go.mod b/semconv/go.mod index d5dd356474c..6f758cc6751 100644 --- a/semconv/go.mod +++ b/semconv/go.mod @@ -1,10 +1,11 @@ module go.opentelemetry.io/collector/semconv -go 1.20 +go 1.21 require ( github.com/hashicorp/go-version v1.6.0 github.com/stretchr/testify v1.8.4 + go.uber.org/goleak v1.3.0 ) require ( diff --git a/semconv/go.sum b/semconv/go.sum index 58b69a26f3e..8ca3cb9177c 100644 --- a/semconv/go.sum +++ b/semconv/go.sum @@ -18,6 +18,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= 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= diff --git a/semconv/package_test.go b/semconv/package_test.go new file mode 100644 index 00000000000..ca832817aef --- /dev/null +++ b/semconv/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package semconv + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/semconv/template.j2 b/semconv/template.j2 index 4d614187849..a91e8a554c4 100644 --- a/semconv/template.j2 +++ b/semconv/template.j2 @@ -36,6 +36,9 @@ Examples: {{ attr.examples | pprint | trim("[]") }} Note: {{ attr.note | render_markdown(paragraph="{0}", code="{0}", link="{1}", emphasis="{0}", strong="{0}") }} {%- endif %} {%- endmacro -%} +{%- macro sentence_case(text) -%} + {{ text[0]|upper}}{{text[1:] }} +{%- endmacro -%} // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 @@ -45,7 +48,7 @@ package semconv {% for semconv in semconvs -%} {%- if semconvs[semconv].attributes | rejectattr("ref") | selectattr("is_local") | sort(attribute=fqn) | length > 0 -%} -// {{ semconvs[semconv].brief }} +// {{ sentence_case(semconvs[semconv].brief | replace("This document defines ", "")) | wordwrap(76, break_long_words=false, break_on_hyphens=false, wrapstring="\n// ") }} const ( {% for attr in semconvs[semconv].attributes if attr.is_local and not attr.ref -%} // {{ godoc(attr) | wordwrap | indent(3) | replace(" ", "\t// ") | replace("// //", "//") }} diff --git a/semconv/v1.21.0/doc.go b/semconv/v1.21.0/doc.go new file mode 100644 index 00000000000..a189e79efbc --- /dev/null +++ b/semconv/v1.21.0/doc.go @@ -0,0 +1,9 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package semconv implements OpenTelemetry semantic conventions. +// +// OpenTelemetry semantic conventions are agreed standardized naming +// patterns for OpenTelemetry things. This package represents the v1.21.0 +// version of the OpenTelemetry semantic conventions. +package semconv // import "go.opentelemetry.io/collector/semconv/v1.21.0" diff --git a/semconv/v1.21.0/generated_event.go b/semconv/v1.21.0/generated_event.go new file mode 100644 index 00000000000..ec6c733ecd4 --- /dev/null +++ b/semconv/v1.21.0/generated_event.go @@ -0,0 +1,119 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv + +// This semantic convention defines the attributes used to represent a feature +// flag evaluation as an event. +const ( + // The unique identifier of the feature flag. + // + // Type: string + // Requirement Level: Required + // Stability: experimental + // Examples: 'logo-color' + AttributeFeatureFlagKey = "feature_flag.key" + // The name of the service provider that performs the flag evaluation. + // + // Type: string + // Requirement Level: Recommended + // Stability: experimental + // Examples: 'Flag Manager' + AttributeFeatureFlagProviderName = "feature_flag.provider_name" + // SHOULD be a semantic identifier for a value. If one is unavailable, a + // stringified version of the value can be used. + // + // Type: string + // Requirement Level: Recommended + // Stability: experimental + // Examples: 'red', 'true', 'on' + // Note: A semantic identifier, commonly referred to as a variant, provides a + // means + // for referring to a value without including the value itself. This can + // provide additional context for understanding the meaning behind a value. + // For example, the variant red maybe be used for the value #c05543.A stringified + // version of the value can be used in situations where a + // semantic identifier is unavailable. String representation of the value + // should be determined by the implementer. + AttributeFeatureFlagVariant = "feature_flag.variant" +) + +// RPC received/sent message. +const ( + // Compressed size of the message in bytes. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + AttributeMessageCompressedSize = "message.compressed_size" + // MUST be calculated as two different counters starting from 1 one for sent + // messages and one for received message. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Note: This way we guarantee that the values will be consistent between + // different implementations. + AttributeMessageID = "message.id" + // Whether this is a received or sent message. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeMessageType = "message.type" + // Uncompressed size of the message in bytes. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + AttributeMessageUncompressedSize = "message.uncompressed_size" +) + +const ( + // sent + AttributeMessageTypeSent = "SENT" + // received + AttributeMessageTypeReceived = "RECEIVED" +) + +// The attributes used to report a single exception associated with a span. +const ( + // SHOULD be set to true if the exception event is recorded at a point where it is + // known that the exception is escaping the scope of the span. + // + // Type: boolean + // Requirement Level: Optional + // Stability: experimental + // Note: An exception is considered to have escaped (or left) the scope of a span, + // if that span is ended while the exception is still logically "in + // flight". + // This may be actually "in flight" in some languages (e.g. if the + // exception + // is passed to a Context manager's __exit__ method in Python) but will + // usually be caught at the point of recording the exception in most languages.It + // is usually not possible to determine at the point where an exception is thrown + // whether it will escape the scope of a span. + // However, it is trivial to know that an exception + // will escape, if one checks for an active exception just before ending the span, + // as done in the example above.It follows that an exception may still escape the + // scope of the span + // even if the exception.escaped attribute was not set or set to false, + // since the event might have been recorded at a time where it was not + // clear whether the exception will escape. + AttributeExceptionEscaped = "exception.escaped" +) + +func GetEventSemanticConventionAttributeNames() []string { + return []string{ + AttributeFeatureFlagKey, + AttributeFeatureFlagProviderName, + AttributeFeatureFlagVariant, + AttributeMessageCompressedSize, + AttributeMessageID, + AttributeMessageType, + AttributeMessageUncompressedSize, + AttributeExceptionEscaped, + } +} diff --git a/semconv/v1.21.0/generated_resource.go b/semconv/v1.21.0/generated_resource.go new file mode 100644 index 00000000000..b1a66142afe --- /dev/null +++ b/semconv/v1.21.0/generated_resource.go @@ -0,0 +1,1342 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv + +// The web browser in which the application represented by the resource is +// running. The `browser.*` attributes MUST be used only for resources that +// represent applications running in a web browser (regardless of whether +// running on a mobile or desktop device). +const ( + // Array of brand name and version separated by a space + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: ' Not A;Brand 99', 'Chromium 99', 'Chrome 99' + // Note: This value is intended to be taken from the UA client hints API + // (navigator.userAgentData.brands). + AttributeBrowserBrands = "browser.brands" + // Preferred language of the user using the browser + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'en', 'en-US', 'fr', 'fr-FR' + // Note: This value is intended to be taken from the Navigator API + // navigator.language. + AttributeBrowserLanguage = "browser.language" + // A boolean that is true if the browser is running on a mobile device + // + // Type: boolean + // Requirement Level: Optional + // Stability: experimental + // Note: This value is intended to be taken from the UA client hints API + // (navigator.userAgentData.mobile). If unavailable, this attribute SHOULD be left + // unset. + AttributeBrowserMobile = "browser.mobile" + // The platform on which the browser is running + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Windows', 'macOS', 'Android' + // Note: This value is intended to be taken from the UA client hints API + // (navigator.userAgentData.platform). If unavailable, the legacy + // navigator.platform API SHOULD NOT be used instead and this attribute SHOULD be + // left unset in order for the values to be consistent. + // The list of possible values is defined in the W3C User-Agent Client Hints + // specification. Note that some (but not all) of these values can overlap with + // values in the os.type and os.name attributes. However, for consistency, the + // values in the browser.platform attribute should capture the exact value that + // the user agent provides. + AttributeBrowserPlatform = "browser.platform" +) + +// A cloud environment (e.g. GCP, Azure, AWS) +const ( + // The cloud account ID the resource is assigned to. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '111111111111', 'opentelemetry' + AttributeCloudAccountID = "cloud.account.id" + // Cloud regions often have multiple, isolated locations known as zones to + // increase availability. Availability zone represents the zone where the resource + // is running. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'us-east-1c' + // Note: Availability zones are called "zones" on Alibaba Cloud and + // Google Cloud. + AttributeCloudAvailabilityZone = "cloud.availability_zone" + // The cloud platform in use. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Note: The prefix of the service SHOULD match the one specified in + // cloud.provider. + AttributeCloudPlatform = "cloud.platform" + // Name of the cloud provider. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeCloudProvider = "cloud.provider" + // The geographical region the resource is running. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'us-central1', 'us-east-1' + // Note: Refer to your provider's docs to see the available regions, for example + // Alibaba Cloud regions, AWS regions, Azure regions, Google Cloud regions, or + // Tencent Cloud regions. + AttributeCloudRegion = "cloud.region" + // Cloud provider-specific native identifier of the monitored cloud resource (e.g. + // an ARN on AWS, a fully qualified resource ID on Azure, a full resource name on + // GCP) + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function', '//run.googl + // eapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID', '/sub + // scriptions//resourceGroups//providers/Microsoft.Web/sites + // //functions/' + // Note: On some cloud providers, it may not be possible to determine the full ID + // at startup, + // so it may be necessary to set cloud.resource_id as a span attribute instead.The + // exact value to use for cloud.resource_id depends on the cloud provider. + // The following well-known definitions MUST be used if you set this attribute and + // they apply:
    + //
  • AWS Lambda: The function ARN. + // Take care not to use the "invoked ARN" directly but replace any + // alias suffix + // with the resolved function version, as the same runtime instance may be + // invokable with + // multiple different aliases.
  • + //
  • GCP: The URI of the resource
  • + //
  • Azure: The Fully Qualified Resource ID of the invoked function, + // not the function app, having the form + // /subscriptions//resourceGroups//providers/Microsoft.Web/s + // ites//functions/. + // This means that a span attribute MUST be used, as an Azure function app can + // host multiple functions that would usually share + // a TracerProvider.
  • + //
+ AttributeCloudResourceID = "cloud.resource_id" +) + +const ( + // Alibaba Cloud Elastic Compute Service + AttributeCloudPlatformAlibabaCloudECS = "alibaba_cloud_ecs" + // Alibaba Cloud Function Compute + AttributeCloudPlatformAlibabaCloudFc = "alibaba_cloud_fc" + // Red Hat OpenShift on Alibaba Cloud + AttributeCloudPlatformAlibabaCloudOpenshift = "alibaba_cloud_openshift" + // AWS Elastic Compute Cloud + AttributeCloudPlatformAWSEC2 = "aws_ec2" + // AWS Elastic Container Service + AttributeCloudPlatformAWSECS = "aws_ecs" + // AWS Elastic Kubernetes Service + AttributeCloudPlatformAWSEKS = "aws_eks" + // AWS Lambda + AttributeCloudPlatformAWSLambda = "aws_lambda" + // AWS Elastic Beanstalk + AttributeCloudPlatformAWSElasticBeanstalk = "aws_elastic_beanstalk" + // AWS App Runner + AttributeCloudPlatformAWSAppRunner = "aws_app_runner" + // Red Hat OpenShift on AWS (ROSA) + AttributeCloudPlatformAWSOpenshift = "aws_openshift" + // Azure Virtual Machines + AttributeCloudPlatformAzureVM = "azure_vm" + // Azure Container Instances + AttributeCloudPlatformAzureContainerInstances = "azure_container_instances" + // Azure Kubernetes Service + AttributeCloudPlatformAzureAKS = "azure_aks" + // Azure Functions + AttributeCloudPlatformAzureFunctions = "azure_functions" + // Azure App Service + AttributeCloudPlatformAzureAppService = "azure_app_service" + // Azure Red Hat OpenShift + AttributeCloudPlatformAzureOpenshift = "azure_openshift" + // Google Bare Metal Solution (BMS) + AttributeCloudPlatformGCPBareMetalSolution = "gcp_bare_metal_solution" + // Google Cloud Compute Engine (GCE) + AttributeCloudPlatformGCPComputeEngine = "gcp_compute_engine" + // Google Cloud Run + AttributeCloudPlatformGCPCloudRun = "gcp_cloud_run" + // Google Cloud Kubernetes Engine (GKE) + AttributeCloudPlatformGCPKubernetesEngine = "gcp_kubernetes_engine" + // Google Cloud Functions (GCF) + AttributeCloudPlatformGCPCloudFunctions = "gcp_cloud_functions" + // Google Cloud App Engine (GAE) + AttributeCloudPlatformGCPAppEngine = "gcp_app_engine" + // Red Hat OpenShift on Google Cloud + AttributeCloudPlatformGCPOpenshift = "gcp_openshift" + // Red Hat OpenShift on IBM Cloud + AttributeCloudPlatformIbmCloudOpenshift = "ibm_cloud_openshift" + // Tencent Cloud Cloud Virtual Machine (CVM) + AttributeCloudPlatformTencentCloudCvm = "tencent_cloud_cvm" + // Tencent Cloud Elastic Kubernetes Service (EKS) + AttributeCloudPlatformTencentCloudEKS = "tencent_cloud_eks" + // Tencent Cloud Serverless Cloud Function (SCF) + AttributeCloudPlatformTencentCloudScf = "tencent_cloud_scf" +) + +const ( + // Alibaba Cloud + AttributeCloudProviderAlibabaCloud = "alibaba_cloud" + // Amazon Web Services + AttributeCloudProviderAWS = "aws" + // Microsoft Azure + AttributeCloudProviderAzure = "azure" + // Google Cloud Platform + AttributeCloudProviderGCP = "gcp" + // Heroku Platform as a Service + AttributeCloudProviderHeroku = "heroku" + // IBM Cloud + AttributeCloudProviderIbmCloud = "ibm_cloud" + // Tencent Cloud + AttributeCloudProviderTencentCloud = "tencent_cloud" +) + +// Resources used by AWS Elastic Container Service (ECS). +const ( + // The ARN of an ECS cluster. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' + AttributeAWSECSClusterARN = "aws.ecs.cluster.arn" + // The Amazon Resource Name (ARN) of an ECS container instance. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'arn:aws:ecs:us- + // west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9' + AttributeAWSECSContainerARN = "aws.ecs.container.arn" + // The launch type for an ECS task. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeAWSECSLaunchtype = "aws.ecs.launchtype" + // The ARN of an ECS task definition. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'arn:aws:ecs:us- + // west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b' + AttributeAWSECSTaskARN = "aws.ecs.task.arn" + // The task definition family this task definition is a member of. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry-family' + AttributeAWSECSTaskFamily = "aws.ecs.task.family" + // The revision for this task definition. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '8', '26' + AttributeAWSECSTaskRevision = "aws.ecs.task.revision" +) + +const ( + // ec2 + AttributeAWSECSLaunchtypeEC2 = "ec2" + // fargate + AttributeAWSECSLaunchtypeFargate = "fargate" +) + +// Resources used by AWS Elastic Kubernetes Service (EKS). +const ( + // The ARN of an EKS cluster. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' + AttributeAWSEKSClusterARN = "aws.eks.cluster.arn" +) + +// Resources specific to Amazon Web Services. +const ( + // The Amazon Resource Name(s) (ARN) of the AWS log group(s). + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*' + // Note: See the log group ARN format documentation. + AttributeAWSLogGroupARNs = "aws.log.group.arns" + // The name(s) of the AWS log group(s) an application is writing to. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: '/aws/lambda/my-function', 'opentelemetry-service' + // Note: Multiple log groups must be supported for cases like multi-container + // applications, where a single application has sidecar containers, and each write + // to their own log group. + AttributeAWSLogGroupNames = "aws.log.group.names" + // The ARN(s) of the AWS log stream(s). + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log- + // stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' + // Note: See the log stream ARN format documentation. One log group can contain + // several log streams, so these ARNs necessarily identify both a log group and a + // log stream. + AttributeAWSLogStreamARNs = "aws.log.stream.arns" + // The name(s) of the AWS log stream(s) an application is writing to. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: 'logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' + AttributeAWSLogStreamNames = "aws.log.stream.names" +) + +// Resource used by Google Cloud Run. +const ( + // The name of the Cloud Run execution being run for the Job, as set by the + // CLOUD_RUN_EXECUTION environment variable. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'job-name-xxxx', 'sample-job-mdw84' + AttributeGCPCloudRunJobExecution = "gcp.cloud_run.job.execution" + // The index for a task within an execution as provided by the + // CLOUD_RUN_TASK_INDEX environment variable. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 0, 1 + AttributeGCPCloudRunJobTaskIndex = "gcp.cloud_run.job.task_index" +) + +// Resources used by Google Compute Engine (GCE). +const ( + // The hostname of a GCE instance. This is the full value of the default or custom + // hostname. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'my-host1234.example.com', 'sample-vm.us-west1-b.c.my- + // project.internal' + AttributeGCPGceInstanceHostname = "gcp.gce.instance.hostname" + // The instance name of a GCE instance. This is the value provided by host.name, + // the visible name of the instance in the Cloud Console UI, and the prefix for + // the default hostname of the instance as defined by the default internal DNS + // name. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'instance-1', 'my-vm-name' + AttributeGCPGceInstanceName = "gcp.gce.instance.name" +) + +// Heroku dyno metadata +const ( + // Unique identifier for the application + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '2daa2797-e42b-4624-9322-ec3f968df4da' + AttributeHerokuAppID = "heroku.app.id" + // Commit hash for the current release + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'e6134959463efd8966b20e75b913cafe3f5ec' + AttributeHerokuReleaseCommit = "heroku.release.commit" + // Time and date the release was created + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '2022-10-23T18:00:42Z' + AttributeHerokuReleaseCreationTimestamp = "heroku.release.creation_timestamp" +) + +// A container instance. +const ( + // The command used to run the container (i.e. the command name). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'otelcontribcol' + // Note: If using embedded credentials or sensitive data, it is recommended to + // remove them to prevent potential leakage. + AttributeContainerCommand = "container.command" + // All the command arguments (including the command/executable itself) run by the + // container. [2] + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: 'otelcontribcol, --config, config.yaml' + AttributeContainerCommandArgs = "container.command_args" + // The full command run by the container as a single string representing the full + // command. [2] + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'otelcontribcol --config config.yaml' + AttributeContainerCommandLine = "container.command_line" + // Container ID. Usually a UUID, as for example used to identify Docker + // containers. The UUID might be abbreviated. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'a3bf90e006b2' + AttributeContainerID = "container.id" + // Runtime specific image identifier. Usually a hash algorithm followed by a UUID. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: + // 'sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f' + // Note: Docker defines a sha256 of the image id; container.image.id corresponds + // to the Image field from the Docker container inspect API endpoint. + // K8S defines a link to the container registry repository with digest "imageID": + // "registry.azurecr.io /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e + // 8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625". + // OCI defines a digest of manifest. + AttributeContainerImageID = "container.image.id" + // Name of the image the container was built on. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'gcr.io/opentelemetry/operator' + AttributeContainerImageName = "container.image.name" + // Container image tag. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '0.1' + AttributeContainerImageTag = "container.image.tag" + // Container name used by container runtime. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry-autoconf' + AttributeContainerName = "container.name" + // The container runtime managing this container. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'docker', 'containerd', 'rkt' + AttributeContainerRuntime = "container.runtime" +) + +// The software deployment. +const ( + // Name of the deployment environment (aka deployment tier). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'staging', 'production' + AttributeDeploymentEnvironment = "deployment.environment" +) + +// The device on which the process represented by this resource is running. +const ( + // A unique identifier representing the device + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '2ab2916d-a51f-4ac8-80ee-45ac31a28092' + // Note: The device identifier MUST only be defined using the values outlined + // below. This value is not an advertising identifier and MUST NOT be used as + // such. On iOS (Swift or Objective-C), this value MUST be equal to the vendor + // identifier. On Android (Java or Kotlin), this value MUST be equal to the + // Firebase Installation ID or a globally unique UUID which is persisted across + // sessions in your application. More information can be found here on best + // practices and exact implementation details. Caution should be taken when + // storing personal data or anything which can identify a user. GDPR and data + // protection laws may apply, ensure you do your own due diligence. + AttributeDeviceID = "device.id" + // The name of the device manufacturer + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Apple', 'Samsung' + // Note: The Android OS provides this field via Build. iOS apps SHOULD hardcode + // the value Apple. + AttributeDeviceManufacturer = "device.manufacturer" + // The model identifier for the device + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'iPhone3,4', 'SM-G920F' + // Note: It's recommended this value represents a machine readable version of the + // model identifier rather than the market or consumer-friendly name of the + // device. + AttributeDeviceModelIdentifier = "device.model.identifier" + // The marketing name for the device model + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'iPhone 6s Plus', 'Samsung Galaxy S6' + // Note: It's recommended this value represents a human readable version of the + // device model rather than a machine readable alternative. + AttributeDeviceModelName = "device.model.name" +) + +// A serverless instance. +const ( + // The execution environment ID as a string, that will be potentially reused for + // other invocations to the same function/function version. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de' + // Note:
    + //
  • AWS Lambda: Use the (full) log stream name.
  • + //
+ AttributeFaaSInstance = "faas.instance" + // The amount of memory available to the serverless function converted to Bytes. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 134217728 + // Note: It's recommended to set this attribute since e.g. too little memory can + // easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, + // the environment variable AWS_LAMBDA_FUNCTION_MEMORY_SIZE provides this + // information (which must be multiplied by 1,048,576). + AttributeFaaSMaxMemory = "faas.max_memory" + // The name of the single function that this runtime instance executes. + // + // Type: string + // Requirement Level: Required + // Stability: experimental + // Examples: 'my-function', 'myazurefunctionapp/some-function-name' + // Note: This is the name of the function as configured/deployed on the FaaS + // platform and is usually different from the name of the callback + // function (which may be stored in the + // code.namespace/code.function + // span attributes).For some cloud providers, the above definition is ambiguous. + // The following + // definition of function name MUST be used for this attribute + // (and consequently the span name) for the listed cloud providers/products:
    + //
  • Azure: The full name /, i.e., function app name + // followed by a forward slash followed by the function name (this form + // can also be seen in the resource JSON for the function). + // This means that a span attribute MUST be used, as an Azure function + // app can host multiple functions that would usually share + // a TracerProvider (see also the cloud.resource_id attribute).
  • + //
+ AttributeFaaSName = "faas.name" + // The immutable version of the function being executed. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '26', 'pinkfroid-00002' + // Note: Depending on the cloud provider and platform, use:
    + //
  • AWS Lambda: The function version + // (an integer represented as a decimal string).
  • + //
  • Google Cloud Run (Services): The revision + // (i.e., the function name plus the revision suffix).
  • + //
  • Google Cloud Functions: The value of the + // K_REVISION environment variable.
  • + //
  • Azure Functions: Not applicable. Do not set this attribute.
  • + //
+ AttributeFaaSVersion = "faas.version" +) + +// A host is defined as a computing instance. For example, physical servers, +// virtual machines, switches or disk array. +const ( + // The CPU architecture the host system is running on. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeHostArch = "host.arch" + // Unique host ID. For Cloud, this must be the instance_id assigned by the cloud + // provider. For non-containerized systems, this should be the machine-id. See the + // table below for the sources to use to determine the machine-id based on + // operating system. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'fdbf79e8af94cb7f9e8df36789187052' + AttributeHostID = "host.id" + // VM image ID or host OS image ID. For Cloud, this value is from the provider. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'ami-07b06b442921831e5' + AttributeHostImageID = "host.image.id" + // Name of the VM image or OS install the host was instantiated from. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905' + AttributeHostImageName = "host.image.name" + // The version string of the VM image or host OS as defined in Version Attributes. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '0.1' + AttributeHostImageVersion = "host.image.version" + // Name of the host. On Unix systems, it may contain what the hostname command + // returns, or the fully qualified hostname, or another name specified by the + // user. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry-test' + AttributeHostName = "host.name" + // Type of host. For Cloud, this must be the machine type. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'n1-standard-1' + AttributeHostType = "host.type" +) + +const ( + // AMD64 + AttributeHostArchAMD64 = "amd64" + // ARM32 + AttributeHostArchARM32 = "arm32" + // ARM64 + AttributeHostArchARM64 = "arm64" + // Itanium + AttributeHostArchIA64 = "ia64" + // 32-bit PowerPC + AttributeHostArchPPC32 = "ppc32" + // 64-bit PowerPC + AttributeHostArchPPC64 = "ppc64" + // IBM z/Architecture + AttributeHostArchS390x = "s390x" + // 32-bit x86 + AttributeHostArchX86 = "x86" +) + +// A Kubernetes Cluster. +const ( + // The name of the cluster. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry-cluster' + AttributeK8SClusterName = "k8s.cluster.name" + // A pseudo-ID for the cluster, set to the UID of the kube-system namespace. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '218fc5a9-a5f1-4b54-aa05-46717d0ab26d' + // Note: K8S does not have support for obtaining a cluster ID. If this is ever + // added, we will recommend collecting the k8s.cluster.uid through the + // official APIs. In the meantime, we are able to use the uid of the + // kube-system namespace as a proxy for cluster ID. Read on for the + // rationale.Every object created in a K8S cluster is assigned a distinct UID. The + // kube-system namespace is used by Kubernetes itself and will exist + // for the lifetime of the cluster. Using the uid of the kube-system + // namespace is a reasonable proxy for the K8S ClusterID as it will only + // change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are + // UUIDs as standardized by + // ISO/IEC 9834-8 and ITU-T X.667. + // Which states:
+ // If generated according to one of the mechanisms defined in Rec.
+ // ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be + // different from all other UUIDs generated before 3603 A.D., or is + // extremely likely to be different (depending on the mechanism + // chosen).Therefore, UIDs between clusters should be extremely unlikely to + // conflict. + AttributeK8SClusterUID = "k8s.cluster.uid" +) + +// A Kubernetes Node object. +const ( + // The name of the Node. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'node-1' + AttributeK8SNodeName = "k8s.node.name" + // The UID of the Node. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2' + AttributeK8SNodeUID = "k8s.node.uid" +) + +// A Kubernetes Namespace. +const ( + // The name of the namespace that the pod is running in. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'default' + AttributeK8SNamespaceName = "k8s.namespace.name" +) + +// A Kubernetes Pod object. +const ( + // The name of the Pod. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry-pod-autoconf' + AttributeK8SPodName = "k8s.pod.name" + // The UID of the Pod. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + AttributeK8SPodUID = "k8s.pod.uid" +) + +// A container in a +// [PodTemplate](https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates). +const ( + // The name of the Container from Pod specification, must be unique within a Pod. + // Container runtime usually uses different globally unique name (container.name). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'redis' + AttributeK8SContainerName = "k8s.container.name" + // Number of times the container was restarted. This attribute can be used to + // identify a particular container (running or stopped) within a container spec. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 0, 2 + AttributeK8SContainerRestartCount = "k8s.container.restart_count" +) + +// A Kubernetes ReplicaSet object. +const ( + // The name of the ReplicaSet. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry' + AttributeK8SReplicaSetName = "k8s.replicaset.name" + // The UID of the ReplicaSet. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + AttributeK8SReplicaSetUID = "k8s.replicaset.uid" +) + +// A Kubernetes Deployment object. +const ( + // The name of the Deployment. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry' + AttributeK8SDeploymentName = "k8s.deployment.name" + // The UID of the Deployment. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + AttributeK8SDeploymentUID = "k8s.deployment.uid" +) + +// A Kubernetes StatefulSet object. +const ( + // The name of the StatefulSet. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry' + AttributeK8SStatefulSetName = "k8s.statefulset.name" + // The UID of the StatefulSet. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + AttributeK8SStatefulSetUID = "k8s.statefulset.uid" +) + +// A Kubernetes DaemonSet object. +const ( + // The name of the DaemonSet. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry' + AttributeK8SDaemonSetName = "k8s.daemonset.name" + // The UID of the DaemonSet. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + AttributeK8SDaemonSetUID = "k8s.daemonset.uid" +) + +// A Kubernetes Job object. +const ( + // The name of the Job. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry' + AttributeK8SJobName = "k8s.job.name" + // The UID of the Job. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + AttributeK8SJobUID = "k8s.job.uid" +) + +// A Kubernetes CronJob object. +const ( + // The name of the CronJob. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry' + AttributeK8SCronJobName = "k8s.cronjob.name" + // The UID of the CronJob. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + AttributeK8SCronJobUID = "k8s.cronjob.uid" +) + +// The operating system (OS) on which the process represented by this resource +// is running. +const ( + // Human readable (not intended to be parsed) OS version information, like e.g. + // reported by ver or lsb_release -a commands. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1 LTS' + AttributeOSDescription = "os.description" + // Human readable operating system name. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'iOS', 'Android', 'Ubuntu' + AttributeOSName = "os.name" + // The operating system type. + // + // Type: Enum + // Requirement Level: Required + // Stability: experimental + AttributeOSType = "os.type" + // The version string of the operating system as defined in Version Attributes. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '14.2.1', '18.04.1' + AttributeOSVersion = "os.version" +) + +const ( + // Microsoft Windows + AttributeOSTypeWindows = "windows" + // Linux + AttributeOSTypeLinux = "linux" + // Apple Darwin + AttributeOSTypeDarwin = "darwin" + // FreeBSD + AttributeOSTypeFreeBSD = "freebsd" + // NetBSD + AttributeOSTypeNetBSD = "netbsd" + // OpenBSD + AttributeOSTypeOpenBSD = "openbsd" + // DragonFly BSD + AttributeOSTypeDragonflyBSD = "dragonflybsd" + // HP-UX (Hewlett Packard Unix) + AttributeOSTypeHPUX = "hpux" + // AIX (Advanced Interactive eXecutive) + AttributeOSTypeAIX = "aix" + // SunOS, Oracle Solaris + AttributeOSTypeSolaris = "solaris" + // IBM z/OS + AttributeOSTypeZOS = "z_os" +) + +// An operating system process. +const ( + // The command used to launch the process (i.e. the command name). On Linux based + // systems, can be set to the zeroth string in proc/[pid]/cmdline. On Windows, can + // be set to the first parameter extracted from GetCommandLineW. + // + // Type: string + // Requirement Level: Conditionally Required - See alternative attributes below. + // Stability: experimental + // Examples: 'cmd/otelcol' + AttributeProcessCommand = "process.command" + // All the command arguments (including the command/executable itself) as received + // by the process. On Linux-based systems (and some other Unixoid systems + // supporting procfs), can be set according to the list of null-delimited strings + // extracted from proc/[pid]/cmdline. For libc-based executables, this would be + // the full argv vector passed to main. + // + // Type: string[] + // Requirement Level: Conditionally Required - See alternative attributes below. + // Stability: experimental + // Examples: 'cmd/otecol', '--config=config.yaml' + AttributeProcessCommandArgs = "process.command_args" + // The full command used to launch the process as a single string representing the + // full command. On Windows, can be set to the result of GetCommandLineW. Do not + // set this if you have to assemble it just for monitoring; use + // process.command_args instead. + // + // Type: string + // Requirement Level: Conditionally Required - See alternative attributes below. + // Stability: experimental + // Examples: 'C:\\cmd\\otecol --config="my directory\\config.yaml"' + AttributeProcessCommandLine = "process.command_line" + // The name of the process executable. On Linux based systems, can be set to the + // Name in proc/[pid]/status. On Windows, can be set to the base name of + // GetProcessImageFileNameW. + // + // Type: string + // Requirement Level: Conditionally Required - See alternative attributes below. + // Stability: experimental + // Examples: 'otelcol' + AttributeProcessExecutableName = "process.executable.name" + // The full path to the process executable. On Linux based systems, can be set to + // the target of proc/[pid]/exe. On Windows, can be set to the result of + // GetProcessImageFileNameW. + // + // Type: string + // Requirement Level: Conditionally Required - See alternative attributes below. + // Stability: experimental + // Examples: '/usr/bin/cmd/otelcol' + AttributeProcessExecutablePath = "process.executable.path" + // The username of the user that owns the process. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'root' + AttributeProcessOwner = "process.owner" + // Parent Process identifier (PID). + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 111 + AttributeProcessParentPID = "process.parent_pid" + // Process identifier (PID). + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 1234 + AttributeProcessPID = "process.pid" +) + +// The single (language) runtime instance which is monitored. +const ( + // An additional description about the runtime of the process, for example a + // specific vendor customization of the runtime environment. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0' + AttributeProcessRuntimeDescription = "process.runtime.description" + // The name of the runtime of this process. For compiled native binaries, this + // SHOULD be the name of the compiler. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'OpenJDK Runtime Environment' + AttributeProcessRuntimeName = "process.runtime.name" + // The version of the runtime of this process, as returned by the runtime without + // modification. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '14.0.2' + AttributeProcessRuntimeVersion = "process.runtime.version" +) + +// A service instance. +const ( + // Logical name of the service. + // + // Type: string + // Requirement Level: Required + // Stability: experimental + // Examples: 'shoppingcart' + // Note: MUST be the same for all instances of horizontally scaled services. If + // the value was not specified, SDKs MUST fallback to unknown_service: + // concatenated with process.executable.name, e.g. unknown_service:bash. If + // process.executable.name is not available, the value MUST be set to + // unknown_service. + AttributeServiceName = "service.name" + // The version string of the service API or implementation. The format is not + // defined by these conventions. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '2.0.0', 'a01dbef8a' + AttributeServiceVersion = "service.version" +) + +// A service instance. +const ( + // The string ID of the service instance. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'my-k8s-pod-deployment-1', '627cc493-f310-47de-96bd-71410b7dec09' + // Note: MUST be unique for each instance of the same + // service.namespace,service.name pair (in other words + // service.namespace,service.name,service.instance.id triplet MUST be globally + // unique). The ID helps to distinguish instances of the same service that exist + // at the same time (e.g. instances of a horizontally scaled service). It is + // preferable for the ID to be persistent and stay the same for the lifetime of + // the service instance, however it is acceptable that the ID is ephemeral and + // changes during important lifetime events for the service (e.g. service + // restarts). If the service has no inherent unique ID that can be used as the + // value of this attribute it is recommended to generate a random Version 1 or + // Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use + // Version 5, see RFC 4122 for more recommendations). + AttributeServiceInstanceID = "service.instance.id" + // A namespace for service.name. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Shop' + // Note: A string value having a meaning that helps to distinguish a group of + // services, for example the team name that owns a group of services. service.name + // is expected to be unique within the same namespace. If service.namespace is not + // specified in the Resource then service.name is expected to be unique for all + // services that have no explicit namespace defined (so the empty/unspecified + // namespace is simply one more valid namespace). Zero-length namespace string is + // assumed equal to unspecified namespace. + AttributeServiceNamespace = "service.namespace" +) + +// The telemetry SDK used to capture data recorded by the instrumentation +// libraries. +const ( + // The language of the telemetry SDK. + // + // Type: Enum + // Requirement Level: Required + // Stability: experimental + AttributeTelemetrySDKLanguage = "telemetry.sdk.language" + // The name of the telemetry SDK as defined above. + // + // Type: string + // Requirement Level: Required + // Stability: experimental + // Examples: 'opentelemetry' + // Note: The OpenTelemetry SDK MUST set the telemetry.sdk.name attribute to + // opentelemetry. + // If another SDK, like a fork or a vendor-provided implementation, is used, this + // SDK MUST set the + // telemetry.sdk.name attribute to the fully-qualified class or module name of + // this SDK's main entry point + // or another suitable identifier depending on the language. + // The identifier opentelemetry is reserved and MUST NOT be used in this case. + // All custom identifiers SHOULD be stable across different versions of an + // implementation. + AttributeTelemetrySDKName = "telemetry.sdk.name" + // The version string of the telemetry SDK. + // + // Type: string + // Requirement Level: Required + // Stability: experimental + // Examples: '1.2.3' + AttributeTelemetrySDKVersion = "telemetry.sdk.version" +) + +const ( + // cpp + AttributeTelemetrySDKLanguageCPP = "cpp" + // dotnet + AttributeTelemetrySDKLanguageDotnet = "dotnet" + // erlang + AttributeTelemetrySDKLanguageErlang = "erlang" + // go + AttributeTelemetrySDKLanguageGo = "go" + // java + AttributeTelemetrySDKLanguageJava = "java" + // nodejs + AttributeTelemetrySDKLanguageNodejs = "nodejs" + // php + AttributeTelemetrySDKLanguagePHP = "php" + // python + AttributeTelemetrySDKLanguagePython = "python" + // ruby + AttributeTelemetrySDKLanguageRuby = "ruby" + // rust + AttributeTelemetrySDKLanguageRust = "rust" + // swift + AttributeTelemetrySDKLanguageSwift = "swift" + // webjs + AttributeTelemetrySDKLanguageWebjs = "webjs" +) + +// The telemetry SDK used to capture data recorded by the instrumentation +// libraries. +const ( + // The version string of the auto instrumentation agent, if used. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '1.2.3' + AttributeTelemetryAutoVersion = "telemetry.auto.version" +) + +// Resource describing the packaged software running the application code. Web +// engines are typically executed using process.runtime. +const ( + // Additional description of the web engine (e.g. detailed version and edition + // information). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - 2.2.2.Final' + AttributeWebEngineDescription = "webengine.description" + // The name of the web engine. + // + // Type: string + // Requirement Level: Required + // Stability: experimental + // Examples: 'WildFly' + AttributeWebEngineName = "webengine.name" + // The version of the web engine. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '21.0.0' + AttributeWebEngineVersion = "webengine.version" +) + +// Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's +// concepts. +const ( + // The name of the instrumentation scope - (InstrumentationScope.Name in OTLP). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'io.opentelemetry.contrib.mongodb' + AttributeOTelScopeName = "otel.scope.name" + // The version of the instrumentation scope - (InstrumentationScope.Version in + // OTLP). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '1.0.0' + AttributeOTelScopeVersion = "otel.scope.version" +) + +// Span attributes used by non-OTLP exporters to represent OpenTelemetry +// Scope's concepts. +const ( + // Deprecated, use the otel.scope.name attribute. + // + // Type: string + // Requirement Level: Optional + // Stability: deprecated + // Examples: 'io.opentelemetry.contrib.mongodb' + AttributeOTelLibraryName = "otel.library.name" + // Deprecated, use the otel.scope.version attribute. + // + // Type: string + // Requirement Level: Optional + // Stability: deprecated + // Examples: '1.0.0' + AttributeOTelLibraryVersion = "otel.library.version" +) + +func GetResourceSemanticConventionAttributeNames() []string { + return []string{ + AttributeBrowserBrands, + AttributeBrowserLanguage, + AttributeBrowserMobile, + AttributeBrowserPlatform, + AttributeCloudAccountID, + AttributeCloudAvailabilityZone, + AttributeCloudPlatform, + AttributeCloudProvider, + AttributeCloudRegion, + AttributeCloudResourceID, + AttributeAWSECSClusterARN, + AttributeAWSECSContainerARN, + AttributeAWSECSLaunchtype, + AttributeAWSECSTaskARN, + AttributeAWSECSTaskFamily, + AttributeAWSECSTaskRevision, + AttributeAWSEKSClusterARN, + AttributeAWSLogGroupARNs, + AttributeAWSLogGroupNames, + AttributeAWSLogStreamARNs, + AttributeAWSLogStreamNames, + AttributeGCPCloudRunJobExecution, + AttributeGCPCloudRunJobTaskIndex, + AttributeGCPGceInstanceHostname, + AttributeGCPGceInstanceName, + AttributeHerokuAppID, + AttributeHerokuReleaseCommit, + AttributeHerokuReleaseCreationTimestamp, + AttributeContainerCommand, + AttributeContainerCommandArgs, + AttributeContainerCommandLine, + AttributeContainerID, + AttributeContainerImageID, + AttributeContainerImageName, + AttributeContainerImageTag, + AttributeContainerName, + AttributeContainerRuntime, + AttributeDeploymentEnvironment, + AttributeDeviceID, + AttributeDeviceManufacturer, + AttributeDeviceModelIdentifier, + AttributeDeviceModelName, + AttributeFaaSInstance, + AttributeFaaSMaxMemory, + AttributeFaaSName, + AttributeFaaSVersion, + AttributeHostArch, + AttributeHostID, + AttributeHostImageID, + AttributeHostImageName, + AttributeHostImageVersion, + AttributeHostName, + AttributeHostType, + AttributeK8SClusterName, + AttributeK8SClusterUID, + AttributeK8SNodeName, + AttributeK8SNodeUID, + AttributeK8SNamespaceName, + AttributeK8SPodName, + AttributeK8SPodUID, + AttributeK8SContainerName, + AttributeK8SContainerRestartCount, + AttributeK8SReplicaSetName, + AttributeK8SReplicaSetUID, + AttributeK8SDeploymentName, + AttributeK8SDeploymentUID, + AttributeK8SStatefulSetName, + AttributeK8SStatefulSetUID, + AttributeK8SDaemonSetName, + AttributeK8SDaemonSetUID, + AttributeK8SJobName, + AttributeK8SJobUID, + AttributeK8SCronJobName, + AttributeK8SCronJobUID, + AttributeOSDescription, + AttributeOSName, + AttributeOSType, + AttributeOSVersion, + AttributeProcessCommand, + AttributeProcessCommandArgs, + AttributeProcessCommandLine, + AttributeProcessExecutableName, + AttributeProcessExecutablePath, + AttributeProcessOwner, + AttributeProcessParentPID, + AttributeProcessPID, + AttributeProcessRuntimeDescription, + AttributeProcessRuntimeName, + AttributeProcessRuntimeVersion, + AttributeServiceName, + AttributeServiceVersion, + AttributeServiceInstanceID, + AttributeServiceNamespace, + AttributeTelemetrySDKLanguage, + AttributeTelemetrySDKName, + AttributeTelemetrySDKVersion, + AttributeTelemetryAutoVersion, + AttributeWebEngineDescription, + AttributeWebEngineName, + AttributeWebEngineVersion, + AttributeOTelScopeName, + AttributeOTelScopeVersion, + AttributeOTelLibraryName, + AttributeOTelLibraryVersion, + } +} diff --git a/semconv/v1.21.0/generated_trace.go b/semconv/v1.21.0/generated_trace.go new file mode 100644 index 00000000000..9bbd3cfbf5f --- /dev/null +++ b/semconv/v1.21.0/generated_trace.go @@ -0,0 +1,1536 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv + +// The shared attributes used to report a single exception associated with a +// span or log. +const ( + // The exception message. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Division by zero', "Can't convert 'int' object to str implicitly" + AttributeExceptionMessage = "exception.message" + // A stacktrace as a string in the natural representation for the language + // runtime. The representation is to be determined and documented by each language + // SIG. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Exception in thread "main" java.lang.RuntimeException: Test + // exception\\n at ' + // 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' + // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' + // 'com.example.GenerateTrace.main(GenerateTrace.java:5)' + AttributeExceptionStacktrace = "exception.stacktrace" + // The type of the exception (its fully-qualified class name, if applicable). The + // dynamic type of the exception should be preferred over the static type in + // languages that support it. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'java.net.ConnectException', 'OSError' + AttributeExceptionType = "exception.type" +) + +// Span attributes used by AWS Lambda (in addition to general `faas` +// attributes). +const ( + // The full invoked ARN as provided on the Context passed to the function (Lambda- + // Runtime-Invoked-Function-ARN header on the /runtime/invocation/next + // applicable). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias' + // Note: This may be different from cloud.resource_id if an alias is involved. + AttributeAWSLambdaInvokedARN = "aws.lambda.invoked_arn" +) + +// Attributes for CloudEvents. CloudEvents is a specification on how to define +// event data in a standard way. These attributes can be attached to spans when +// performing operations with CloudEvents, regardless of the protocol being +// used. +const ( + // The event_id uniquely identifies the event. + // + // Type: string + // Requirement Level: Required + // Stability: experimental + // Examples: '123e4567-e89b-12d3-a456-426614174000', '0001' + AttributeCloudeventsEventID = "cloudevents.event_id" + // The source identifies the context in which an event happened. + // + // Type: string + // Requirement Level: Required + // Stability: experimental + // Examples: 'https://github.com/cloudevents', '/cloudevents/spec/pull/123', 'my- + // service' + AttributeCloudeventsEventSource = "cloudevents.event_source" + // The version of the CloudEvents specification which the event uses. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '1.0' + AttributeCloudeventsEventSpecVersion = "cloudevents.event_spec_version" + // The subject of the event in the context of the event producer (identified by + // source). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'mynewfile.jpg' + AttributeCloudeventsEventSubject = "cloudevents.event_subject" + // The event_type contains a value describing the type of event related to the + // originating occurrence. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'com.github.pull_request.opened', 'com.example.object.deleted.v2' + AttributeCloudeventsEventType = "cloudevents.event_type" +) + +// Semantic conventions for the OpenTracing Shim +const ( + // Parent-child Reference type + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Note: The causal relationship between a child Span and a parent Span. + AttributeOpentracingRefType = "opentracing.ref_type" +) + +const ( + // The parent Span depends on the child Span in some capacity + AttributeOpentracingRefTypeChildOf = "child_of" + // The parent Span does not depend in any way on the result of the child Span + AttributeOpentracingRefTypeFollowsFrom = "follows_from" +) + +// The attributes used to perform database client calls. +const ( + // The connection string used to connect to the database. It is recommended to + // remove embedded credentials. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Server=(localdb)\\v11.0;Integrated Security=true;' + AttributeDBConnectionString = "db.connection_string" + // The fully-qualified class name of the Java Database Connectivity (JDBC) driver + // used to connect. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'org.postgresql.Driver', + // 'com.microsoft.sqlserver.jdbc.SQLServerDriver' + AttributeDBJDBCDriverClassname = "db.jdbc.driver_classname" + // This attribute is used to report the name of the database being accessed. For + // commands that switch the database, this should be set to the target database + // (even if the command fails). + // + // Type: string + // Requirement Level: Conditionally Required - If applicable. + // Stability: experimental + // Examples: 'customers', 'main' + // Note: In some SQL databases, the database name to be used is called + // "schema name". In case there are multiple layers that could be + // considered for database name (e.g. Oracle instance name and schema name), the + // database name to be used is the more specific layer (e.g. Oracle schema name). + AttributeDBName = "db.name" + // The name of the operation being executed, e.g. the MongoDB command name such as + // findAndModify, or the SQL keyword. + // + // Type: string + // Requirement Level: Conditionally Required - If `db.statement` is not + // applicable. + // Stability: experimental + // Examples: 'findAndModify', 'HMSET', 'SELECT' + // Note: When setting this to an SQL keyword, it is not recommended to attempt any + // client-side parsing of db.statement just to get this property, but it should be + // set if the operation name is provided by the library being instrumented. If the + // SQL statement has an ambiguous operation, or performs more than one operation, + // this value may be omitted. + AttributeDBOperation = "db.operation" + // The database statement being executed. + // + // Type: string + // Requirement Level: Recommended - Should be collected by default only if there + // is sanitization that excludes sensitive information. + // Stability: experimental + // Examples: 'SELECT * FROM wuser_table', 'SET mykey "WuValue"' + AttributeDBStatement = "db.statement" + // An identifier for the database management system (DBMS) product being used. See + // below for a list of well-known identifiers. + // + // Type: Enum + // Requirement Level: Required + // Stability: experimental + AttributeDBSystem = "db.system" + // Username for accessing the database. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'readonly_user', 'reporting_user' + AttributeDBUser = "db.user" +) + +const ( + // Some other SQL database. Fallback only. See notes + AttributeDBSystemOtherSQL = "other_sql" + // Microsoft SQL Server + AttributeDBSystemMSSQL = "mssql" + // Microsoft SQL Server Compact + AttributeDBSystemMssqlcompact = "mssqlcompact" + // MySQL + AttributeDBSystemMySQL = "mysql" + // Oracle Database + AttributeDBSystemOracle = "oracle" + // IBM DB2 + AttributeDBSystemDB2 = "db2" + // PostgreSQL + AttributeDBSystemPostgreSQL = "postgresql" + // Amazon Redshift + AttributeDBSystemRedshift = "redshift" + // Apache Hive + AttributeDBSystemHive = "hive" + // Cloudscape + AttributeDBSystemCloudscape = "cloudscape" + // HyperSQL DataBase + AttributeDBSystemHSQLDB = "hsqldb" + // Progress Database + AttributeDBSystemProgress = "progress" + // SAP MaxDB + AttributeDBSystemMaxDB = "maxdb" + // SAP HANA + AttributeDBSystemHanaDB = "hanadb" + // Ingres + AttributeDBSystemIngres = "ingres" + // FirstSQL + AttributeDBSystemFirstSQL = "firstsql" + // EnterpriseDB + AttributeDBSystemEDB = "edb" + // InterSystems Caché + AttributeDBSystemCache = "cache" + // Adabas (Adaptable Database System) + AttributeDBSystemAdabas = "adabas" + // Firebird + AttributeDBSystemFirebird = "firebird" + // Apache Derby + AttributeDBSystemDerby = "derby" + // FileMaker + AttributeDBSystemFilemaker = "filemaker" + // Informix + AttributeDBSystemInformix = "informix" + // InstantDB + AttributeDBSystemInstantDB = "instantdb" + // InterBase + AttributeDBSystemInterbase = "interbase" + // MariaDB + AttributeDBSystemMariaDB = "mariadb" + // Netezza + AttributeDBSystemNetezza = "netezza" + // Pervasive PSQL + AttributeDBSystemPervasive = "pervasive" + // PointBase + AttributeDBSystemPointbase = "pointbase" + // SQLite + AttributeDBSystemSqlite = "sqlite" + // Sybase + AttributeDBSystemSybase = "sybase" + // Teradata + AttributeDBSystemTeradata = "teradata" + // Vertica + AttributeDBSystemVertica = "vertica" + // H2 + AttributeDBSystemH2 = "h2" + // ColdFusion IMQ + AttributeDBSystemColdfusion = "coldfusion" + // Apache Cassandra + AttributeDBSystemCassandra = "cassandra" + // Apache HBase + AttributeDBSystemHBase = "hbase" + // MongoDB + AttributeDBSystemMongoDB = "mongodb" + // Redis + AttributeDBSystemRedis = "redis" + // Couchbase + AttributeDBSystemCouchbase = "couchbase" + // CouchDB + AttributeDBSystemCouchDB = "couchdb" + // Microsoft Azure Cosmos DB + AttributeDBSystemCosmosDB = "cosmosdb" + // Amazon DynamoDB + AttributeDBSystemDynamoDB = "dynamodb" + // Neo4j + AttributeDBSystemNeo4j = "neo4j" + // Apache Geode + AttributeDBSystemGeode = "geode" + // Elasticsearch + AttributeDBSystemElasticsearch = "elasticsearch" + // Memcached + AttributeDBSystemMemcached = "memcached" + // CockroachDB + AttributeDBSystemCockroachdb = "cockroachdb" + // OpenSearch + AttributeDBSystemOpensearch = "opensearch" + // ClickHouse + AttributeDBSystemClickhouse = "clickhouse" + // Cloud Spanner + AttributeDBSystemSpanner = "spanner" + // Trino + AttributeDBSystemTrino = "trino" +) + +// Connection-level attributes for Microsoft SQL Server +const ( + // The Microsoft SQL Server instance name connecting to. This name is used to + // determine the port of a named instance. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'MSSQLSERVER' + // Note: If setting a db.mssql.instance_name, server.port is no longer required + // (but still recommended if non-standard). + AttributeDBMSSQLInstanceName = "db.mssql.instance_name" +) + +// Call-level attributes for Cassandra +const ( + // The consistency level of the query. Based on consistency values from CQL. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeDBCassandraConsistencyLevel = "db.cassandra.consistency_level" + // The data center of the coordinating node for a query. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'us-west-2' + AttributeDBCassandraCoordinatorDC = "db.cassandra.coordinator.dc" + // The ID of the coordinating node for a query. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af' + AttributeDBCassandraCoordinatorID = "db.cassandra.coordinator.id" + // Whether or not the query is idempotent. + // + // Type: boolean + // Requirement Level: Optional + // Stability: experimental + AttributeDBCassandraIdempotence = "db.cassandra.idempotence" + // The fetch size used for paging, i.e. how many rows will be returned at once. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 5000 + AttributeDBCassandraPageSize = "db.cassandra.page_size" + // The number of times a query was speculatively executed. Not set or 0 if the + // query was not executed speculatively. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 0, 2 + AttributeDBCassandraSpeculativeExecutionCount = "db.cassandra.speculative_execution_count" + // The name of the primary table that the operation is acting upon, including the + // keyspace name (if applicable). + // + // Type: string + // Requirement Level: Recommended + // Stability: experimental + // Examples: 'mytable' + // Note: This mirrors the db.sql.table attribute but references cassandra rather + // than sql. It is not recommended to attempt any client-side parsing of + // db.statement just to get this property, but it should be set if it is provided + // by the library being instrumented. If the operation is acting upon an anonymous + // table, or more than one table, this value MUST NOT be set. + AttributeDBCassandraTable = "db.cassandra.table" +) + +const ( + // all + AttributeDBCassandraConsistencyLevelAll = "all" + // each_quorum + AttributeDBCassandraConsistencyLevelEachQuorum = "each_quorum" + // quorum + AttributeDBCassandraConsistencyLevelQuorum = "quorum" + // local_quorum + AttributeDBCassandraConsistencyLevelLocalQuorum = "local_quorum" + // one + AttributeDBCassandraConsistencyLevelOne = "one" + // two + AttributeDBCassandraConsistencyLevelTwo = "two" + // three + AttributeDBCassandraConsistencyLevelThree = "three" + // local_one + AttributeDBCassandraConsistencyLevelLocalOne = "local_one" + // any + AttributeDBCassandraConsistencyLevelAny = "any" + // serial + AttributeDBCassandraConsistencyLevelSerial = "serial" + // local_serial + AttributeDBCassandraConsistencyLevelLocalSerial = "local_serial" +) + +// Call-level attributes for Redis +const ( + // The index of the database being accessed as used in the SELECT command, + // provided as an integer. To be used instead of the generic db.name attribute. + // + // Type: int + // Requirement Level: Conditionally Required - If other than the default database + // (`0`). + // Stability: experimental + // Examples: 0, 1, 15 + AttributeDBRedisDBIndex = "db.redis.database_index" +) + +// Call-level attributes for MongoDB +const ( + // The collection being accessed within the database stated in db.name. + // + // Type: string + // Requirement Level: Required + // Stability: experimental + // Examples: 'customers', 'products' + AttributeDBMongoDBCollection = "db.mongodb.collection" +) + +// Call-level attributes for SQL databases +const ( + // The name of the primary table that the operation is acting upon, including the + // database name (if applicable). + // + // Type: string + // Requirement Level: Recommended + // Stability: experimental + // Examples: 'public.users', 'customers' + // Note: It is not recommended to attempt any client-side parsing of db.statement + // just to get this property, but it should be set if it is provided by the + // library being instrumented. If the operation is acting upon an anonymous table, + // or more than one table, this value MUST NOT be set. + AttributeDBSQLTable = "db.sql.table" +) + +// Call-level attributes for Cosmos DB. +const ( + // Unique Cosmos client instance id. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '3ba4827d-4422-483f-b59f-85b74211c11d' + AttributeDBCosmosDBClientID = "db.cosmosdb.client_id" + // Cosmos client connection mode. + // + // Type: Enum + // Requirement Level: Conditionally Required - if not `direct` (or pick gw as + // default) + // Stability: experimental + AttributeDBCosmosDBConnectionMode = "db.cosmosdb.connection_mode" + // Cosmos DB container name. + // + // Type: string + // Requirement Level: Conditionally Required - if available + // Stability: experimental + // Examples: 'anystring' + AttributeDBCosmosDBContainer = "db.cosmosdb.container" + // CosmosDB Operation Type. + // + // Type: Enum + // Requirement Level: Conditionally Required - when performing one of the + // operations in this list + // Stability: experimental + AttributeDBCosmosDBOperationType = "db.cosmosdb.operation_type" + // RU consumed for that operation + // + // Type: double + // Requirement Level: Conditionally Required - when available + // Stability: experimental + // Examples: 46.18, 1.0 + AttributeDBCosmosDBRequestCharge = "db.cosmosdb.request_charge" + // Request payload size in bytes + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + AttributeDBCosmosDBRequestContentLength = "db.cosmosdb.request_content_length" + // Cosmos DB status code. + // + // Type: int + // Requirement Level: Conditionally Required - if response was received + // Stability: experimental + // Examples: 200, 201 + AttributeDBCosmosDBStatusCode = "db.cosmosdb.status_code" + // Cosmos DB sub status code. + // + // Type: int + // Requirement Level: Conditionally Required - when response was received and + // contained sub-code. + // Stability: experimental + // Examples: 1000, 1002 + AttributeDBCosmosDBSubStatusCode = "db.cosmosdb.sub_status_code" +) + +const ( + // Gateway (HTTP) connections mode + AttributeDBCosmosDBConnectionModeGateway = "gateway" + // Direct connection + AttributeDBCosmosDBConnectionModeDirect = "direct" +) + +const ( + // invalid + AttributeDBCosmosDBOperationTypeInvalid = "Invalid" + // create + AttributeDBCosmosDBOperationTypeCreate = "Create" + // patch + AttributeDBCosmosDBOperationTypePatch = "Patch" + // read + AttributeDBCosmosDBOperationTypeRead = "Read" + // read_feed + AttributeDBCosmosDBOperationTypeReadFeed = "ReadFeed" + // delete + AttributeDBCosmosDBOperationTypeDelete = "Delete" + // replace + AttributeDBCosmosDBOperationTypeReplace = "Replace" + // execute + AttributeDBCosmosDBOperationTypeExecute = "Execute" + // query + AttributeDBCosmosDBOperationTypeQuery = "Query" + // head + AttributeDBCosmosDBOperationTypeHead = "Head" + // head_feed + AttributeDBCosmosDBOperationTypeHeadFeed = "HeadFeed" + // upsert + AttributeDBCosmosDBOperationTypeUpsert = "Upsert" + // batch + AttributeDBCosmosDBOperationTypeBatch = "Batch" + // query_plan + AttributeDBCosmosDBOperationTypeQueryPlan = "QueryPlan" + // execute_javascript + AttributeDBCosmosDBOperationTypeExecuteJavascript = "ExecuteJavaScript" +) + +// Span attributes used by non-OTLP exporters to represent OpenTelemetry Span's +// concepts. +const ( + // Name of the code, either "OK" or "ERROR". MUST NOT be set + // if the status code is UNSET. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeOTelStatusCode = "otel.status_code" + // Description of the Status if it has a value, otherwise not set. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'resource not found' + AttributeOTelStatusDescription = "otel.status_description" +) + +const ( + // The operation has been validated by an Application developer or Operator to have completed successfully + AttributeOTelStatusCodeOk = "OK" + // The operation contains an error + AttributeOTelStatusCodeError = "ERROR" +) + +// This semantic convention describes an instance of a function that runs +// without provisioning or managing of servers (also known as serverless +// functions or Function as a Service (FaaS)) with spans. +const ( + // The invocation ID of the current function invocation. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28' + AttributeFaaSInvocationID = "faas.invocation_id" + // Type of the trigger which caused this function invocation. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Note: For the server/consumer span on the incoming side, + // faas.trigger MUST be set.Clients invoking FaaS instances usually cannot set + // faas.trigger, + // since they would typically need to look in the payload to determine + // the event type. If clients set it, it should be the same as the + // trigger that corresponding incoming would have (i.e., this has + // nothing to do with the underlying transport used to make the API + // call to invoke the lambda, which is often HTTP). + AttributeFaaSTrigger = "faas.trigger" +) + +const ( + // A response to some data source operation such as a database or filesystem read/write + AttributeFaaSTriggerDatasource = "datasource" + // To provide an answer to an inbound HTTP request + AttributeFaaSTriggerHTTP = "http" + // A function is set to be executed when messages are sent to a messaging system + AttributeFaaSTriggerPubsub = "pubsub" + // A function is scheduled to be executed regularly + AttributeFaaSTriggerTimer = "timer" + // If none of the others apply + AttributeFaaSTriggerOther = "other" +) + +// Semantic Convention for FaaS triggered as a response to some data source +// operation such as a database or filesystem read/write. +const ( + // The name of the source on which the triggering operation was performed. For + // example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos + // DB to the database name. + // + // Type: string + // Requirement Level: Required + // Stability: experimental + // Examples: 'myBucketName', 'myDBName' + AttributeFaaSDocumentCollection = "faas.document.collection" + // The document name/table subjected to the operation. For example, in Cloud + // Storage or S3 is the name of the file, and in Cosmos DB the table name. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'myFile.txt', 'myTableName' + AttributeFaaSDocumentName = "faas.document.name" + // Describes the type of the operation that was performed on the data. + // + // Type: Enum + // Requirement Level: Required + // Stability: experimental + AttributeFaaSDocumentOperation = "faas.document.operation" + // A string containing the time when the data was accessed in the ISO 8601 format + // expressed in UTC. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '2020-01-23T13:47:06Z' + AttributeFaaSDocumentTime = "faas.document.time" +) + +const ( + // When a new object is created + AttributeFaaSDocumentOperationInsert = "insert" + // When an object is modified + AttributeFaaSDocumentOperationEdit = "edit" + // When an object is deleted + AttributeFaaSDocumentOperationDelete = "delete" +) + +// Semantic Convention for FaaS scheduled to be executed regularly. +const ( + // A string containing the schedule period as Cron Expression. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '0/5 * * * ? *' + AttributeFaaSCron = "faas.cron" + // A string containing the function invocation time in the ISO 8601 format + // expressed in UTC. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '2020-01-23T13:47:06Z' + AttributeFaaSTime = "faas.time" +) + +// Contains additional attributes for incoming FaaS spans. +const ( + // A boolean that is true if the serverless function is executed for the first + // time (aka cold-start). + // + // Type: boolean + // Requirement Level: Optional + // Stability: experimental + AttributeFaaSColdstart = "faas.coldstart" +) + +// Contains additional attributes for outgoing FaaS spans. +const ( + // The name of the invoked function. + // + // Type: string + // Requirement Level: Required + // Stability: experimental + // Examples: 'my-function' + // Note: SHOULD be equal to the faas.name resource attribute of the invoked + // function. + AttributeFaaSInvokedName = "faas.invoked_name" + // The cloud provider of the invoked function. + // + // Type: Enum + // Requirement Level: Required + // Stability: experimental + // Note: SHOULD be equal to the cloud.provider resource attribute of the invoked + // function. + AttributeFaaSInvokedProvider = "faas.invoked_provider" + // The cloud region of the invoked function. + // + // Type: string + // Requirement Level: Conditionally Required - For some cloud providers, like AWS + // or GCP, the region in which a function is hosted is essential to uniquely + // identify the function and also part of its endpoint. Since it's part of the + // endpoint being called, the region is always known to clients. In these cases, + // `faas.invoked_region` MUST be set accordingly. If the region is unknown to the + // client or not required for identifying the invoked function, setting + // `faas.invoked_region` is optional. + // Stability: experimental + // Examples: 'eu-central-1' + // Note: SHOULD be equal to the cloud.region resource attribute of the invoked + // function. + AttributeFaaSInvokedRegion = "faas.invoked_region" +) + +const ( + // Alibaba Cloud + AttributeFaaSInvokedProviderAlibabaCloud = "alibaba_cloud" + // Amazon Web Services + AttributeFaaSInvokedProviderAWS = "aws" + // Microsoft Azure + AttributeFaaSInvokedProviderAzure = "azure" + // Google Cloud Platform + AttributeFaaSInvokedProviderGCP = "gcp" + // Tencent Cloud + AttributeFaaSInvokedProviderTencentCloud = "tencent_cloud" +) + +// Operations that access some remote service. +const ( + // The service.name of the remote service. SHOULD be equal to the actual + // service.name resource attribute of the remote service if any. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'AuthTokenCache' + AttributePeerService = "peer.service" +) + +// These attributes may be used for any operation with an authenticated and/or +// authorized enduser. +const ( + // Username or client_id extracted from the access token or Authorization header + // in the inbound request from outside the system. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'username' + AttributeEnduserID = "enduser.id" + // Actual/assumed role the client is making the request under extracted from token + // or application security context. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'admin' + AttributeEnduserRole = "enduser.role" + // Scopes or granted authorities the client currently possesses extracted from + // token or application security context. The value would come from the scope + // associated with an OAuth 2.0 Access Token or an attribute value in a SAML 2.0 + // Assertion. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'read:message, write:files' + AttributeEnduserScope = "enduser.scope" +) + +// These attributes may be used for any operation to store information about a +// thread that started a span. +const ( + // Current "managed" thread ID (as opposed to OS thread ID). + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 42 + AttributeThreadID = "thread.id" + // Current thread name. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'main' + AttributeThreadName = "thread.name" +) + +// These attributes allow to report this unit of code and therefore to provide +// more context about the span. +const ( + // The column number in code.filepath best representing the operation. It SHOULD + // point within the code unit named in code.function. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 16 + AttributeCodeColumn = "code.column" + // The source code file name that identifies the code unit as uniquely as possible + // (preferably an absolute file path). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '/usr/local/MyApplication/content_root/app/index.php' + AttributeCodeFilepath = "code.filepath" + // The method or function name, or equivalent (usually rightmost part of the code + // unit's name). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'serveRequest' + AttributeCodeFunction = "code.function" + // The line number in code.filepath best representing the operation. It SHOULD + // point within the code unit named in code.function. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 42 + AttributeCodeLineNumber = "code.lineno" + // The "namespace" within which code.function is defined. Usually the + // qualified class or module name, such that code.namespace + some separator + + // code.function form a unique identifier for the code unit. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'com.example.MyHTTPService' + AttributeCodeNamespace = "code.namespace" +) + +// Semantic Convention for HTTP Client +const ( + // The ordinal number of request resending attempt (for any reason, including + // redirects). + // + // Type: int + // Requirement Level: Recommended - if and only if request was retried. + // Stability: experimental + // Examples: 3 + // Note: The resend count SHOULD be updated each time an HTTP request gets resent + // by the client, regardless of what was the cause of the resending (e.g. + // redirection, authorization failure, 503 Server Unavailable, network issues, or + // any other). + AttributeHTTPResendCount = "http.resend_count" +) + +// The `aws` conventions apply to operations using the AWS SDK. They map +// request or response parameters in AWS SDK API calls to attributes on a Span. +// The conventions have been collected over time based on feedback from AWS +// users of tracing and will continue to evolve as new interesting conventions +// are found. +// Some descriptions are also provided for populating general OpenTelemetry +// semantic conventions based on these APIs. +const ( + // The AWS request ID as returned in the response headers x-amz-request-id or + // x-amz-requestid. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '79b9da39-b7ae-508a-a6bc-864b2829c622', 'C9ER4AJX75574TDJ' + AttributeAWSRequestID = "aws.request_id" +) + +// Attributes that exist for multiple DynamoDB request types. +const ( + // The value of the AttributesToGet request parameter. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: 'lives', 'id' + AttributeAWSDynamoDBAttributesToGet = "aws.dynamodb.attributes_to_get" + // The value of the ConsistentRead request parameter. + // + // Type: boolean + // Requirement Level: Optional + // Stability: experimental + AttributeAWSDynamoDBConsistentRead = "aws.dynamodb.consistent_read" + // The JSON-serialized value of each item in the ConsumedCapacity response field. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": { "string" : { + // "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits": + // number } }, "LocalSecondaryIndexes": { "string" : { "CapacityUnits": number, + // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }, + // "ReadCapacityUnits": number, "Table": { "CapacityUnits": number, + // "ReadCapacityUnits": number, "WriteCapacityUnits": number }, "TableName": + // "string", "WriteCapacityUnits": number }' + AttributeAWSDynamoDBConsumedCapacity = "aws.dynamodb.consumed_capacity" + // The value of the IndexName request parameter. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'name_to_group' + AttributeAWSDynamoDBIndexName = "aws.dynamodb.index_name" + // The JSON-serialized value of the ItemCollectionMetrics response field. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B": blob, + // "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { "string" : + // "AttributeValue" }, "N": "string", "NS": [ "string" ], "NULL": boolean, "S": + // "string", "SS": [ "string" ] } }, "SizeEstimateRangeGB": [ number ] } ] }' + AttributeAWSDynamoDBItemCollectionMetrics = "aws.dynamodb.item_collection_metrics" + // The value of the Limit request parameter. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 10 + AttributeAWSDynamoDBLimit = "aws.dynamodb.limit" + // The value of the ProjectionExpression request parameter. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Title', 'Title, Price, Color', 'Title, Description, RelatedItems, + // ProductReviews' + AttributeAWSDynamoDBProjection = "aws.dynamodb.projection" + // The value of the ProvisionedThroughput.ReadCapacityUnits request parameter. + // + // Type: double + // Requirement Level: Optional + // Stability: experimental + // Examples: 1.0, 2.0 + AttributeAWSDynamoDBProvisionedReadCapacity = "aws.dynamodb.provisioned_read_capacity" + // The value of the ProvisionedThroughput.WriteCapacityUnits request parameter. + // + // Type: double + // Requirement Level: Optional + // Stability: experimental + // Examples: 1.0, 2.0 + AttributeAWSDynamoDBProvisionedWriteCapacity = "aws.dynamodb.provisioned_write_capacity" + // The value of the Select request parameter. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'ALL_ATTRIBUTES', 'COUNT' + AttributeAWSDynamoDBSelect = "aws.dynamodb.select" + // The keys in the RequestItems object field. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Users', 'Cats' + AttributeAWSDynamoDBTableNames = "aws.dynamodb.table_names" +) + +// DynamoDB.CreateTable +const ( + // The JSON-serialized value of each item of the GlobalSecondaryIndexes request + // field + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName": "string", + // "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], + // "ProjectionType": "string" }, "ProvisionedThroughput": { "ReadCapacityUnits": + // number, "WriteCapacityUnits": number } }' + AttributeAWSDynamoDBGlobalSecondaryIndexes = "aws.dynamodb.global_secondary_indexes" + // The JSON-serialized value of each item of the LocalSecondaryIndexes request + // field. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: '{ "IndexARN": "string", "IndexName": "string", "IndexSizeBytes": + // number, "ItemCount": number, "KeySchema": [ { "AttributeName": "string", + // "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], + // "ProjectionType": "string" } }' + AttributeAWSDynamoDBLocalSecondaryIndexes = "aws.dynamodb.local_secondary_indexes" +) + +// DynamoDB.ListTables +const ( + // The value of the ExclusiveStartTableName request parameter. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Users', 'CatsTable' + AttributeAWSDynamoDBExclusiveStartTable = "aws.dynamodb.exclusive_start_table" + // The the number of items in the TableNames response parameter. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 20 + AttributeAWSDynamoDBTableCount = "aws.dynamodb.table_count" +) + +// DynamoDB.Query +const ( + // The value of the ScanIndexForward request parameter. + // + // Type: boolean + // Requirement Level: Optional + // Stability: experimental + AttributeAWSDynamoDBScanForward = "aws.dynamodb.scan_forward" +) + +// DynamoDB.Scan +const ( + // The value of the Count response parameter. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 10 + AttributeAWSDynamoDBCount = "aws.dynamodb.count" + // The value of the ScannedCount response parameter. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 50 + AttributeAWSDynamoDBScannedCount = "aws.dynamodb.scanned_count" + // The value of the Segment request parameter. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 10 + AttributeAWSDynamoDBSegment = "aws.dynamodb.segment" + // The value of the TotalSegments request parameter. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 100 + AttributeAWSDynamoDBTotalSegments = "aws.dynamodb.total_segments" +) + +// DynamoDB.UpdateTable +const ( + // The JSON-serialized value of each item in the AttributeDefinitions request + // field. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: '{ "AttributeName": "string", "AttributeType": "string" }' + AttributeAWSDynamoDBAttributeDefinitions = "aws.dynamodb.attribute_definitions" + // The JSON-serialized value of each item in the the GlobalSecondaryIndexUpdates + // request field. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ { + // "AttributeName": "string", "KeyType": "string" } ], "Projection": { + // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, + // "ProvisionedThroughput": { "ReadCapacityUnits": number, "WriteCapacityUnits": + // number } }' + AttributeAWSDynamoDBGlobalSecondaryIndexUpdates = "aws.dynamodb.global_secondary_index_updates" +) + +// Attributes that exist for S3 request types. +const ( + // The S3 bucket name the request refers to. Corresponds to the --bucket parameter + // of the S3 API operations. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'some-bucket-name' + // Note: The bucket attribute is applicable to all S3 operations that reference a + // bucket, i.e. that require the bucket name as a mandatory parameter. + // This applies to almost all S3 operations except list-buckets. + AttributeAWSS3Bucket = "aws.s3.bucket" + // The source object (in the form bucket/key) for the copy operation. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'someFile.yml' + // Note: The copy_source attribute applies to S3 copy operations and corresponds + // to the --copy-source parameter + // of the copy-object operation within the S3 API. + // This applies in particular to the following operations:
    + //
  • copy-object
  • + //
  • upload-part-copy
  • + //
+ AttributeAWSS3CopySource = "aws.s3.copy_source" + // The delete request container that specifies the objects to be deleted. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Objects=[{Key=string,VersionID=string},{Key=string,VersionID=string} + // ],Quiet=boolean' + // Note: The delete attribute is only applicable to the delete-object operation. + // The delete attribute corresponds to the --delete parameter of the + // delete-objects operation within the S3 API. + AttributeAWSS3Delete = "aws.s3.delete" + // The S3 object key the request refers to. Corresponds to the --key parameter of + // the S3 API operations. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'someFile.yml' + // Note: The key attribute is applicable to all object-related S3 operations, i.e. + // that require the object key as a mandatory parameter. + // This applies in particular to the following operations:
    + //
  • copy-object
  • + //
  • delete-object
  • + //
  • get-object
  • + //
  • head-object
  • + //
  • put-object
  • + //
  • restore-object
  • + //
  • select-object-content
  • + //
  • abort-multipart-upload
  • + //
  • complete-multipart-upload
  • + //
  • create-multipart-upload
  • + //
  • list-parts
  • + //
  • upload-part
  • + //
  • upload-part-copy
  • + //
+ AttributeAWSS3Key = "aws.s3.key" + // The part number of the part being uploaded in a multipart-upload operation. + // This is a positive integer between 1 and 10,000. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 3456 + // Note: The part_number attribute is only applicable to the upload-part + // and upload-part-copy operations. + // The part_number attribute corresponds to the --part-number parameter of the + // upload-part operation within the S3 API. + AttributeAWSS3PartNumber = "aws.s3.part_number" + // Upload ID that identifies the multipart upload. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ' + // Note: The upload_id attribute applies to S3 multipart-upload operations and + // corresponds to the --upload-id parameter + // of the S3 API multipart operations. + // This applies in particular to the following operations:
    + //
  • abort-multipart-upload
  • + //
  • complete-multipart-upload
  • + //
  • list-parts
  • + //
  • upload-part
  • + //
  • upload-part-copy
  • + //
+ AttributeAWSS3UploadID = "aws.s3.upload_id" +) + +// Semantic conventions to apply when instrumenting the GraphQL implementation. +// They map GraphQL operations to attributes on a Span. +const ( + // The GraphQL document being executed. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'query findBookByID { bookByID(id: ?) { name } }' + // Note: The value may be sanitized to exclude sensitive information. + AttributeGraphqlDocument = "graphql.document" + // The name of the operation being executed. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'findBookByID' + AttributeGraphqlOperationName = "graphql.operation.name" + // The type of the operation being executed. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Examples: 'query', 'mutation', 'subscription' + AttributeGraphqlOperationType = "graphql.operation.type" +) + +const ( + // GraphQL query + AttributeGraphqlOperationTypeQuery = "query" + // GraphQL mutation + AttributeGraphqlOperationTypeMutation = "mutation" + // GraphQL subscription + AttributeGraphqlOperationTypeSubscription = "subscription" +) + +// General attributes used in messaging systems. +const ( + // The number of messages sent, received, or processed in the scope of the + // batching operation. + // + // Type: int + // Requirement Level: Conditionally Required - If the span describes an operation + // on a batch of messages. + // Stability: experimental + // Examples: 0, 1, 2 + // Note: Instrumentations SHOULD NOT set messaging.batch.message_count on spans + // that operate with a single message. When a messaging client library supports + // both batch and single-message API for the same operation, instrumentations + // SHOULD use messaging.batch.message_count for batching APIs and SHOULD NOT use + // it for single-message APIs. + AttributeMessagingBatchMessageCount = "messaging.batch.message_count" + // A unique identifier for the client that consumes or produces a message. + // + // Type: string + // Requirement Level: Recommended - If a client id is available + // Stability: experimental + // Examples: 'client-5', 'myhost@8742@s8083jm' + AttributeMessagingClientID = "messaging.client_id" + // A string identifying the kind of messaging operation as defined in the + // Operation names section above. + // + // Type: Enum + // Requirement Level: Required + // Stability: experimental + // Note: If a custom value is used, it MUST be of low cardinality. + AttributeMessagingOperation = "messaging.operation" + // A string identifying the messaging system. + // + // Type: string + // Requirement Level: Required + // Stability: experimental + // Examples: 'kafka', 'rabbitmq', 'rocketmq', 'activemq', 'AmazonSQS' + AttributeMessagingSystem = "messaging.system" +) + +const ( + // publish + AttributeMessagingOperationPublish = "publish" + // receive + AttributeMessagingOperationReceive = "receive" + // process + AttributeMessagingOperationProcess = "process" +) + +// Semantic conventions for remote procedure calls. +const ( + // The name of the (logical) method being called, must be equal to the $method + // part in the span name. + // + // Type: string + // Requirement Level: Recommended + // Stability: experimental + // Examples: 'exampleMethod' + // Note: This is the logical name of the method from the RPC interface + // perspective, which can be different from the name of any implementing + // method/function. The code.function attribute may be used to store the latter + // (e.g., method actually executing the call on the server side, RPC client stub + // method on the client side). + AttributeRPCMethod = "rpc.method" + // The full (logical) name of the service being called, including its package + // name, if applicable. + // + // Type: string + // Requirement Level: Recommended + // Stability: experimental + // Examples: 'myservice.EchoService' + // Note: This is the logical name of the service from the RPC interface + // perspective, which can be different from the name of any implementing class. + // The code.namespace attribute may be used to store the latter (despite the + // attribute name, it may include a class name; e.g., class with method actually + // executing the call on the server side, RPC client stub class on the client + // side). + AttributeRPCService = "rpc.service" + // A string identifying the remoting system. See below for a list of well-known + // identifiers. + // + // Type: Enum + // Requirement Level: Required + // Stability: experimental + AttributeRPCSystem = "rpc.system" +) + +const ( + // gRPC + AttributeRPCSystemGRPC = "grpc" + // Java RMI + AttributeRPCSystemJavaRmi = "java_rmi" + // .NET WCF + AttributeRPCSystemDotnetWcf = "dotnet_wcf" + // Apache Dubbo + AttributeRPCSystemApacheDubbo = "apache_dubbo" + // Connect RPC + AttributeRPCSystemConnectRPC = "connect_rpc" +) + +// Tech-specific attributes for gRPC. +const ( + // The numeric status code of the gRPC request. + // + // Type: Enum + // Requirement Level: Required + // Stability: experimental + AttributeRPCGRPCStatusCode = "rpc.grpc.status_code" +) + +const ( + // OK + AttributeRPCGRPCStatusCodeOk = "0" + // CANCELLED + AttributeRPCGRPCStatusCodeCancelled = "1" + // UNKNOWN + AttributeRPCGRPCStatusCodeUnknown = "2" + // INVALID_ARGUMENT + AttributeRPCGRPCStatusCodeInvalidArgument = "3" + // DEADLINE_EXCEEDED + AttributeRPCGRPCStatusCodeDeadlineExceeded = "4" + // NOT_FOUND + AttributeRPCGRPCStatusCodeNotFound = "5" + // ALREADY_EXISTS + AttributeRPCGRPCStatusCodeAlreadyExists = "6" + // PERMISSION_DENIED + AttributeRPCGRPCStatusCodePermissionDenied = "7" + // RESOURCE_EXHAUSTED + AttributeRPCGRPCStatusCodeResourceExhausted = "8" + // FAILED_PRECONDITION + AttributeRPCGRPCStatusCodeFailedPrecondition = "9" + // ABORTED + AttributeRPCGRPCStatusCodeAborted = "10" + // OUT_OF_RANGE + AttributeRPCGRPCStatusCodeOutOfRange = "11" + // UNIMPLEMENTED + AttributeRPCGRPCStatusCodeUnimplemented = "12" + // INTERNAL + AttributeRPCGRPCStatusCodeInternal = "13" + // UNAVAILABLE + AttributeRPCGRPCStatusCodeUnavailable = "14" + // DATA_LOSS + AttributeRPCGRPCStatusCodeDataLoss = "15" + // UNAUTHENTICATED + AttributeRPCGRPCStatusCodeUnauthenticated = "16" +) + +// Tech-specific attributes for [JSON RPC](https://www.jsonrpc.org/). +const ( + // error.code property of response if it is an error response. + // + // Type: int + // Requirement Level: Conditionally Required - If response is not successful. + // Stability: experimental + // Examples: -32700, 100 + AttributeRPCJsonrpcErrorCode = "rpc.jsonrpc.error_code" + // error.message property of response if it is an error response. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Parse error', 'User already exists' + AttributeRPCJsonrpcErrorMessage = "rpc.jsonrpc.error_message" + // id property of request or response. Since protocol allows id to be int, string, + // null or missing (for notifications), value is expected to be cast to string for + // simplicity. Use empty string in case of null value. Omit entirely if this is a + // notification. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '10', 'request-7', '' + AttributeRPCJsonrpcRequestID = "rpc.jsonrpc.request_id" + // Protocol version as in jsonrpc property of request/response. Since JSON-RPC 1.0 + // does not specify this, the value can be omitted. + // + // Type: string + // Requirement Level: Conditionally Required - If other than the default version + // (`1.0`) + // Stability: experimental + // Examples: '2.0', '1.0' + AttributeRPCJsonrpcVersion = "rpc.jsonrpc.version" +) + +// Tech-specific attributes for Connect RPC. +const ( + // The error codes of the Connect request. Error codes are always string values. + // + // Type: Enum + // Requirement Level: Conditionally Required - If response is not successful and + // if error code available. + // Stability: experimental + AttributeRPCConnectRPCErrorCode = "rpc.connect_rpc.error_code" +) + +const ( + // cancelled + AttributeRPCConnectRPCErrorCodeCancelled = "cancelled" + // unknown + AttributeRPCConnectRPCErrorCodeUnknown = "unknown" + // invalid_argument + AttributeRPCConnectRPCErrorCodeInvalidArgument = "invalid_argument" + // deadline_exceeded + AttributeRPCConnectRPCErrorCodeDeadlineExceeded = "deadline_exceeded" + // not_found + AttributeRPCConnectRPCErrorCodeNotFound = "not_found" + // already_exists + AttributeRPCConnectRPCErrorCodeAlreadyExists = "already_exists" + // permission_denied + AttributeRPCConnectRPCErrorCodePermissionDenied = "permission_denied" + // resource_exhausted + AttributeRPCConnectRPCErrorCodeResourceExhausted = "resource_exhausted" + // failed_precondition + AttributeRPCConnectRPCErrorCodeFailedPrecondition = "failed_precondition" + // aborted + AttributeRPCConnectRPCErrorCodeAborted = "aborted" + // out_of_range + AttributeRPCConnectRPCErrorCodeOutOfRange = "out_of_range" + // unimplemented + AttributeRPCConnectRPCErrorCodeUnimplemented = "unimplemented" + // internal + AttributeRPCConnectRPCErrorCodeInternal = "internal" + // unavailable + AttributeRPCConnectRPCErrorCodeUnavailable = "unavailable" + // data_loss + AttributeRPCConnectRPCErrorCodeDataLoss = "data_loss" + // unauthenticated + AttributeRPCConnectRPCErrorCodeUnauthenticated = "unauthenticated" +) + +func GetTraceSemanticConventionAttributeNames() []string { + return []string{ + AttributeExceptionMessage, + AttributeExceptionStacktrace, + AttributeExceptionType, + AttributeAWSLambdaInvokedARN, + AttributeCloudeventsEventID, + AttributeCloudeventsEventSource, + AttributeCloudeventsEventSpecVersion, + AttributeCloudeventsEventSubject, + AttributeCloudeventsEventType, + AttributeOpentracingRefType, + AttributeDBConnectionString, + AttributeDBJDBCDriverClassname, + AttributeDBName, + AttributeDBOperation, + AttributeDBStatement, + AttributeDBSystem, + AttributeDBUser, + AttributeDBMSSQLInstanceName, + AttributeDBCassandraConsistencyLevel, + AttributeDBCassandraCoordinatorDC, + AttributeDBCassandraCoordinatorID, + AttributeDBCassandraIdempotence, + AttributeDBCassandraPageSize, + AttributeDBCassandraSpeculativeExecutionCount, + AttributeDBCassandraTable, + AttributeDBRedisDBIndex, + AttributeDBMongoDBCollection, + AttributeDBSQLTable, + AttributeDBCosmosDBClientID, + AttributeDBCosmosDBConnectionMode, + AttributeDBCosmosDBContainer, + AttributeDBCosmosDBOperationType, + AttributeDBCosmosDBRequestCharge, + AttributeDBCosmosDBRequestContentLength, + AttributeDBCosmosDBStatusCode, + AttributeDBCosmosDBSubStatusCode, + AttributeOTelStatusCode, + AttributeOTelStatusDescription, + AttributeFaaSInvocationID, + AttributeFaaSTrigger, + AttributeFaaSDocumentCollection, + AttributeFaaSDocumentName, + AttributeFaaSDocumentOperation, + AttributeFaaSDocumentTime, + AttributeFaaSCron, + AttributeFaaSTime, + AttributeFaaSColdstart, + AttributeFaaSInvokedName, + AttributeFaaSInvokedProvider, + AttributeFaaSInvokedRegion, + AttributePeerService, + AttributeEnduserID, + AttributeEnduserRole, + AttributeEnduserScope, + AttributeThreadID, + AttributeThreadName, + AttributeCodeColumn, + AttributeCodeFilepath, + AttributeCodeFunction, + AttributeCodeLineNumber, + AttributeCodeNamespace, + AttributeHTTPResendCount, + AttributeAWSRequestID, + AttributeAWSDynamoDBAttributesToGet, + AttributeAWSDynamoDBConsistentRead, + AttributeAWSDynamoDBConsumedCapacity, + AttributeAWSDynamoDBIndexName, + AttributeAWSDynamoDBItemCollectionMetrics, + AttributeAWSDynamoDBLimit, + AttributeAWSDynamoDBProjection, + AttributeAWSDynamoDBProvisionedReadCapacity, + AttributeAWSDynamoDBProvisionedWriteCapacity, + AttributeAWSDynamoDBSelect, + AttributeAWSDynamoDBTableNames, + AttributeAWSDynamoDBGlobalSecondaryIndexes, + AttributeAWSDynamoDBLocalSecondaryIndexes, + AttributeAWSDynamoDBExclusiveStartTable, + AttributeAWSDynamoDBTableCount, + AttributeAWSDynamoDBScanForward, + AttributeAWSDynamoDBCount, + AttributeAWSDynamoDBScannedCount, + AttributeAWSDynamoDBSegment, + AttributeAWSDynamoDBTotalSegments, + AttributeAWSDynamoDBAttributeDefinitions, + AttributeAWSDynamoDBGlobalSecondaryIndexUpdates, + AttributeAWSS3Bucket, + AttributeAWSS3CopySource, + AttributeAWSS3Delete, + AttributeAWSS3Key, + AttributeAWSS3PartNumber, + AttributeAWSS3UploadID, + AttributeGraphqlDocument, + AttributeGraphqlOperationName, + AttributeGraphqlOperationType, + AttributeMessagingBatchMessageCount, + AttributeMessagingClientID, + AttributeMessagingOperation, + AttributeMessagingSystem, + AttributeRPCMethod, + AttributeRPCService, + AttributeRPCSystem, + AttributeRPCGRPCStatusCode, + AttributeRPCJsonrpcErrorCode, + AttributeRPCJsonrpcErrorMessage, + AttributeRPCJsonrpcRequestID, + AttributeRPCJsonrpcVersion, + AttributeRPCConnectRPCErrorCode, + } +} diff --git a/semconv/v1.21.0/schema.go b/semconv/v1.21.0/schema.go new file mode 100644 index 00000000000..6db9125c204 --- /dev/null +++ b/semconv/v1.21.0/schema.go @@ -0,0 +1,9 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package semconv // import "go.opentelemetry.io/collector/semconv/v1.21.0" + +// SchemaURL is the schema URL that matches the version of the semantic conventions +// that this package defines. Semconv packages starting from v1.4.0 must declare +// non-empty schema URL in the form https://opentelemetry.io/schemas/ +const SchemaURL = "https://opentelemetry.io/schemas/1.21.0" diff --git a/semconv/v1.22.0/doc.go b/semconv/v1.22.0/doc.go new file mode 100644 index 00000000000..87554f9da80 --- /dev/null +++ b/semconv/v1.22.0/doc.go @@ -0,0 +1,9 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package semconv implements OpenTelemetry semantic conventions. +// +// OpenTelemetry semantic conventions are agreed standardized naming +// patterns for OpenTelemetry things. This package represents the v1.22.0 +// version of the OpenTelemetry semantic conventions. +package semconv // import "go.opentelemetry.io/collector/semconv/v1.22.0" diff --git a/semconv/v1.22.0/generated_event.go b/semconv/v1.22.0/generated_event.go new file mode 100644 index 00000000000..ec6c733ecd4 --- /dev/null +++ b/semconv/v1.22.0/generated_event.go @@ -0,0 +1,119 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv + +// This semantic convention defines the attributes used to represent a feature +// flag evaluation as an event. +const ( + // The unique identifier of the feature flag. + // + // Type: string + // Requirement Level: Required + // Stability: experimental + // Examples: 'logo-color' + AttributeFeatureFlagKey = "feature_flag.key" + // The name of the service provider that performs the flag evaluation. + // + // Type: string + // Requirement Level: Recommended + // Stability: experimental + // Examples: 'Flag Manager' + AttributeFeatureFlagProviderName = "feature_flag.provider_name" + // SHOULD be a semantic identifier for a value. If one is unavailable, a + // stringified version of the value can be used. + // + // Type: string + // Requirement Level: Recommended + // Stability: experimental + // Examples: 'red', 'true', 'on' + // Note: A semantic identifier, commonly referred to as a variant, provides a + // means + // for referring to a value without including the value itself. This can + // provide additional context for understanding the meaning behind a value. + // For example, the variant red maybe be used for the value #c05543.A stringified + // version of the value can be used in situations where a + // semantic identifier is unavailable. String representation of the value + // should be determined by the implementer. + AttributeFeatureFlagVariant = "feature_flag.variant" +) + +// RPC received/sent message. +const ( + // Compressed size of the message in bytes. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + AttributeMessageCompressedSize = "message.compressed_size" + // MUST be calculated as two different counters starting from 1 one for sent + // messages and one for received message. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Note: This way we guarantee that the values will be consistent between + // different implementations. + AttributeMessageID = "message.id" + // Whether this is a received or sent message. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeMessageType = "message.type" + // Uncompressed size of the message in bytes. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + AttributeMessageUncompressedSize = "message.uncompressed_size" +) + +const ( + // sent + AttributeMessageTypeSent = "SENT" + // received + AttributeMessageTypeReceived = "RECEIVED" +) + +// The attributes used to report a single exception associated with a span. +const ( + // SHOULD be set to true if the exception event is recorded at a point where it is + // known that the exception is escaping the scope of the span. + // + // Type: boolean + // Requirement Level: Optional + // Stability: experimental + // Note: An exception is considered to have escaped (or left) the scope of a span, + // if that span is ended while the exception is still logically "in + // flight". + // This may be actually "in flight" in some languages (e.g. if the + // exception + // is passed to a Context manager's __exit__ method in Python) but will + // usually be caught at the point of recording the exception in most languages.It + // is usually not possible to determine at the point where an exception is thrown + // whether it will escape the scope of a span. + // However, it is trivial to know that an exception + // will escape, if one checks for an active exception just before ending the span, + // as done in the example above.It follows that an exception may still escape the + // scope of the span + // even if the exception.escaped attribute was not set or set to false, + // since the event might have been recorded at a time where it was not + // clear whether the exception will escape. + AttributeExceptionEscaped = "exception.escaped" +) + +func GetEventSemanticConventionAttributeNames() []string { + return []string{ + AttributeFeatureFlagKey, + AttributeFeatureFlagProviderName, + AttributeFeatureFlagVariant, + AttributeMessageCompressedSize, + AttributeMessageID, + AttributeMessageType, + AttributeMessageUncompressedSize, + AttributeExceptionEscaped, + } +} diff --git a/semconv/v1.22.0/generated_resource.go b/semconv/v1.22.0/generated_resource.go new file mode 100644 index 00000000000..9c86ae85a73 --- /dev/null +++ b/semconv/v1.22.0/generated_resource.go @@ -0,0 +1,1473 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv + +// The Android platform on which the Android application is running. +const ( + // Uniquely identifies the framework API revision offered by a version + // (os.version) of the android operating system. More information can be found + // here. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '33', '32' + AttributeAndroidOSAPILevel = "android.os.api_level" +) + +// The web browser in which the application represented by the resource is +// running. The `browser.*` attributes MUST be used only for resources that +// represent applications running in a web browser (regardless of whether +// running on a mobile or desktop device). +const ( + // Array of brand name and version separated by a space + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: ' Not A;Brand 99', 'Chromium 99', 'Chrome 99' + // Note: This value is intended to be taken from the UA client hints API + // (navigator.userAgentData.brands). + AttributeBrowserBrands = "browser.brands" + // Preferred language of the user using the browser + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'en', 'en-US', 'fr', 'fr-FR' + // Note: This value is intended to be taken from the Navigator API + // navigator.language. + AttributeBrowserLanguage = "browser.language" + // A boolean that is true if the browser is running on a mobile device + // + // Type: boolean + // Requirement Level: Optional + // Stability: experimental + // Note: This value is intended to be taken from the UA client hints API + // (navigator.userAgentData.mobile). If unavailable, this attribute SHOULD be left + // unset. + AttributeBrowserMobile = "browser.mobile" + // The platform on which the browser is running + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Windows', 'macOS', 'Android' + // Note: This value is intended to be taken from the UA client hints API + // (navigator.userAgentData.platform). If unavailable, the legacy + // navigator.platform API SHOULD NOT be used instead and this attribute SHOULD be + // left unset in order for the values to be consistent. + // The list of possible values is defined in the W3C User-Agent Client Hints + // specification. Note that some (but not all) of these values can overlap with + // values in the os.type and os.name attributes. However, for consistency, the + // values in the browser.platform attribute should capture the exact value that + // the user agent provides. + AttributeBrowserPlatform = "browser.platform" +) + +// A cloud environment (e.g. GCP, Azure, AWS) +const ( + // The cloud account ID the resource is assigned to. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '111111111111', 'opentelemetry' + AttributeCloudAccountID = "cloud.account.id" + // Cloud regions often have multiple, isolated locations known as zones to + // increase availability. Availability zone represents the zone where the resource + // is running. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'us-east-1c' + // Note: Availability zones are called "zones" on Alibaba Cloud and + // Google Cloud. + AttributeCloudAvailabilityZone = "cloud.availability_zone" + // The cloud platform in use. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Note: The prefix of the service SHOULD match the one specified in + // cloud.provider. + AttributeCloudPlatform = "cloud.platform" + // Name of the cloud provider. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeCloudProvider = "cloud.provider" + // The geographical region the resource is running. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'us-central1', 'us-east-1' + // Note: Refer to your provider's docs to see the available regions, for example + // Alibaba Cloud regions, AWS regions, Azure regions, Google Cloud regions, or + // Tencent Cloud regions. + AttributeCloudRegion = "cloud.region" + // Cloud provider-specific native identifier of the monitored cloud resource (e.g. + // an ARN on AWS, a fully qualified resource ID on Azure, a full resource name on + // GCP) + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function', '//run.googl + // eapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID', '/sub + // scriptions//resourceGroups//providers/Microsoft.Web/sites + // //functions/' + // Note: On some cloud providers, it may not be possible to determine the full ID + // at startup, + // so it may be necessary to set cloud.resource_id as a span attribute instead.The + // exact value to use for cloud.resource_id depends on the cloud provider. + // The following well-known definitions MUST be used if you set this attribute and + // they apply:
    + //
  • AWS Lambda: The function ARN. + // Take care not to use the "invoked ARN" directly but replace any + // alias suffix + // with the resolved function version, as the same runtime instance may be + // invokable with + // multiple different aliases.
  • + //
  • GCP: The URI of the resource
  • + //
  • Azure: The Fully Qualified Resource ID of the invoked function, + // not the function app, having the form + // /subscriptions//resourceGroups//providers/Microsoft.Web/s + // ites//functions/. + // This means that a span attribute MUST be used, as an Azure function app can + // host multiple functions that would usually share + // a TracerProvider.
  • + //
+ AttributeCloudResourceID = "cloud.resource_id" +) + +const ( + // Alibaba Cloud Elastic Compute Service + AttributeCloudPlatformAlibabaCloudECS = "alibaba_cloud_ecs" + // Alibaba Cloud Function Compute + AttributeCloudPlatformAlibabaCloudFc = "alibaba_cloud_fc" + // Red Hat OpenShift on Alibaba Cloud + AttributeCloudPlatformAlibabaCloudOpenshift = "alibaba_cloud_openshift" + // AWS Elastic Compute Cloud + AttributeCloudPlatformAWSEC2 = "aws_ec2" + // AWS Elastic Container Service + AttributeCloudPlatformAWSECS = "aws_ecs" + // AWS Elastic Kubernetes Service + AttributeCloudPlatformAWSEKS = "aws_eks" + // AWS Lambda + AttributeCloudPlatformAWSLambda = "aws_lambda" + // AWS Elastic Beanstalk + AttributeCloudPlatformAWSElasticBeanstalk = "aws_elastic_beanstalk" + // AWS App Runner + AttributeCloudPlatformAWSAppRunner = "aws_app_runner" + // Red Hat OpenShift on AWS (ROSA) + AttributeCloudPlatformAWSOpenshift = "aws_openshift" + // Azure Virtual Machines + AttributeCloudPlatformAzureVM = "azure_vm" + // Azure Container Instances + AttributeCloudPlatformAzureContainerInstances = "azure_container_instances" + // Azure Kubernetes Service + AttributeCloudPlatformAzureAKS = "azure_aks" + // Azure Functions + AttributeCloudPlatformAzureFunctions = "azure_functions" + // Azure App Service + AttributeCloudPlatformAzureAppService = "azure_app_service" + // Azure Red Hat OpenShift + AttributeCloudPlatformAzureOpenshift = "azure_openshift" + // Google Bare Metal Solution (BMS) + AttributeCloudPlatformGCPBareMetalSolution = "gcp_bare_metal_solution" + // Google Cloud Compute Engine (GCE) + AttributeCloudPlatformGCPComputeEngine = "gcp_compute_engine" + // Google Cloud Run + AttributeCloudPlatformGCPCloudRun = "gcp_cloud_run" + // Google Cloud Kubernetes Engine (GKE) + AttributeCloudPlatformGCPKubernetesEngine = "gcp_kubernetes_engine" + // Google Cloud Functions (GCF) + AttributeCloudPlatformGCPCloudFunctions = "gcp_cloud_functions" + // Google Cloud App Engine (GAE) + AttributeCloudPlatformGCPAppEngine = "gcp_app_engine" + // Red Hat OpenShift on Google Cloud + AttributeCloudPlatformGCPOpenshift = "gcp_openshift" + // Red Hat OpenShift on IBM Cloud + AttributeCloudPlatformIbmCloudOpenshift = "ibm_cloud_openshift" + // Tencent Cloud Cloud Virtual Machine (CVM) + AttributeCloudPlatformTencentCloudCvm = "tencent_cloud_cvm" + // Tencent Cloud Elastic Kubernetes Service (EKS) + AttributeCloudPlatformTencentCloudEKS = "tencent_cloud_eks" + // Tencent Cloud Serverless Cloud Function (SCF) + AttributeCloudPlatformTencentCloudScf = "tencent_cloud_scf" +) + +const ( + // Alibaba Cloud + AttributeCloudProviderAlibabaCloud = "alibaba_cloud" + // Amazon Web Services + AttributeCloudProviderAWS = "aws" + // Microsoft Azure + AttributeCloudProviderAzure = "azure" + // Google Cloud Platform + AttributeCloudProviderGCP = "gcp" + // Heroku Platform as a Service + AttributeCloudProviderHeroku = "heroku" + // IBM Cloud + AttributeCloudProviderIbmCloud = "ibm_cloud" + // Tencent Cloud + AttributeCloudProviderTencentCloud = "tencent_cloud" +) + +// Resources used by AWS Elastic Container Service (ECS). +const ( + // The ARN of an ECS cluster. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' + AttributeAWSECSClusterARN = "aws.ecs.cluster.arn" + // The Amazon Resource Name (ARN) of an ECS container instance. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'arn:aws:ecs:us- + // west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9' + AttributeAWSECSContainerARN = "aws.ecs.container.arn" + // The launch type for an ECS task. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeAWSECSLaunchtype = "aws.ecs.launchtype" + // The ARN of an ECS task definition. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'arn:aws:ecs:us- + // west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b' + AttributeAWSECSTaskARN = "aws.ecs.task.arn" + // The task definition family this task definition is a member of. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry-family' + AttributeAWSECSTaskFamily = "aws.ecs.task.family" + // The revision for this task definition. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '8', '26' + AttributeAWSECSTaskRevision = "aws.ecs.task.revision" +) + +const ( + // ec2 + AttributeAWSECSLaunchtypeEC2 = "ec2" + // fargate + AttributeAWSECSLaunchtypeFargate = "fargate" +) + +// Resources used by AWS Elastic Kubernetes Service (EKS). +const ( + // The ARN of an EKS cluster. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' + AttributeAWSEKSClusterARN = "aws.eks.cluster.arn" +) + +// Resources specific to Amazon Web Services. +const ( + // The Amazon Resource Name(s) (ARN) of the AWS log group(s). + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*' + // Note: See the log group ARN format documentation. + AttributeAWSLogGroupARNs = "aws.log.group.arns" + // The name(s) of the AWS log group(s) an application is writing to. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: '/aws/lambda/my-function', 'opentelemetry-service' + // Note: Multiple log groups must be supported for cases like multi-container + // applications, where a single application has sidecar containers, and each write + // to their own log group. + AttributeAWSLogGroupNames = "aws.log.group.names" + // The ARN(s) of the AWS log stream(s). + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log- + // stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' + // Note: See the log stream ARN format documentation. One log group can contain + // several log streams, so these ARNs necessarily identify both a log group and a + // log stream. + AttributeAWSLogStreamARNs = "aws.log.stream.arns" + // The name(s) of the AWS log stream(s) an application is writing to. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: 'logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' + AttributeAWSLogStreamNames = "aws.log.stream.names" +) + +// Resource used by Google Cloud Run. +const ( + // The name of the Cloud Run execution being run for the Job, as set by the + // CLOUD_RUN_EXECUTION environment variable. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'job-name-xxxx', 'sample-job-mdw84' + AttributeGCPCloudRunJobExecution = "gcp.cloud_run.job.execution" + // The index for a task within an execution as provided by the + // CLOUD_RUN_TASK_INDEX environment variable. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 0, 1 + AttributeGCPCloudRunJobTaskIndex = "gcp.cloud_run.job.task_index" +) + +// Resources used by Google Compute Engine (GCE). +const ( + // The hostname of a GCE instance. This is the full value of the default or custom + // hostname. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'my-host1234.example.com', 'sample-vm.us-west1-b.c.my- + // project.internal' + AttributeGCPGceInstanceHostname = "gcp.gce.instance.hostname" + // The instance name of a GCE instance. This is the value provided by host.name, + // the visible name of the instance in the Cloud Console UI, and the prefix for + // the default hostname of the instance as defined by the default internal DNS + // name. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'instance-1', 'my-vm-name' + AttributeGCPGceInstanceName = "gcp.gce.instance.name" +) + +// Heroku dyno metadata +const ( + // Unique identifier for the application + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '2daa2797-e42b-4624-9322-ec3f968df4da' + AttributeHerokuAppID = "heroku.app.id" + // Commit hash for the current release + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'e6134959463efd8966b20e75b913cafe3f5ec' + AttributeHerokuReleaseCommit = "heroku.release.commit" + // Time and date the release was created + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '2022-10-23T18:00:42Z' + AttributeHerokuReleaseCreationTimestamp = "heroku.release.creation_timestamp" +) + +// A container instance. +const ( + // The command used to run the container (i.e. the command name). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'otelcontribcol' + // Note: If using embedded credentials or sensitive data, it is recommended to + // remove them to prevent potential leakage. + AttributeContainerCommand = "container.command" + // All the command arguments (including the command/executable itself) run by the + // container. [2] + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: 'otelcontribcol, --config, config.yaml' + AttributeContainerCommandArgs = "container.command_args" + // The full command run by the container as a single string representing the full + // command. [2] + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'otelcontribcol --config config.yaml' + AttributeContainerCommandLine = "container.command_line" + // Container ID. Usually a UUID, as for example used to identify Docker + // containers. The UUID might be abbreviated. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'a3bf90e006b2' + AttributeContainerID = "container.id" + // Runtime specific image identifier. Usually a hash algorithm followed by a UUID. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: + // 'sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f' + // Note: Docker defines a sha256 of the image id; container.image.id corresponds + // to the Image field from the Docker container inspect API endpoint. + // K8S defines a link to the container registry repository with digest "imageID": + // "registry.azurecr.io /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e + // 8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625". + // The ID is assinged by the container runtime and can vary in different + // environments. Consider using oci.manifest.digest if it is important to identify + // the same image in different environments/runtimes. + AttributeContainerImageID = "container.image.id" + // Name of the image the container was built on. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'gcr.io/opentelemetry/operator' + AttributeContainerImageName = "container.image.name" + // Repo digests of the container image as provided by the container runtime. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: 'example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d7 + // 02d249a0ccb', 'internal.registry.example.com:5000/example@sha256:b69959407d21e8 + // a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578' + // Note: Docker and CRI report those under the RepoDigests field. + AttributeContainerImageRepoDigests = "container.image.repo_digests" + // Container image tags. An example can be found in Docker Image Inspect. Should + // be only the section of the full name for example from + // registry.example.com/my-org/my-image:. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: 'v1.27.1', '3.5.7-0' + AttributeContainerImageTags = "container.image.tags" + // Container name used by container runtime. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry-autoconf' + AttributeContainerName = "container.name" + // The container runtime managing this container. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'docker', 'containerd', 'rkt' + AttributeContainerRuntime = "container.runtime" +) + +// The software deployment. +const ( + // Name of the deployment environment (aka deployment tier). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'staging', 'production' + AttributeDeploymentEnvironment = "deployment.environment" +) + +// The device on which the process represented by this resource is running. +const ( + // A unique identifier representing the device + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '2ab2916d-a51f-4ac8-80ee-45ac31a28092' + // Note: The device identifier MUST only be defined using the values outlined + // below. This value is not an advertising identifier and MUST NOT be used as + // such. On iOS (Swift or Objective-C), this value MUST be equal to the vendor + // identifier. On Android (Java or Kotlin), this value MUST be equal to the + // Firebase Installation ID or a globally unique UUID which is persisted across + // sessions in your application. More information can be found here on best + // practices and exact implementation details. Caution should be taken when + // storing personal data or anything which can identify a user. GDPR and data + // protection laws may apply, ensure you do your own due diligence. + AttributeDeviceID = "device.id" + // The name of the device manufacturer + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Apple', 'Samsung' + // Note: The Android OS provides this field via Build. iOS apps SHOULD hardcode + // the value Apple. + AttributeDeviceManufacturer = "device.manufacturer" + // The model identifier for the device + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'iPhone3,4', 'SM-G920F' + // Note: It's recommended this value represents a machine readable version of the + // model identifier rather than the market or consumer-friendly name of the + // device. + AttributeDeviceModelIdentifier = "device.model.identifier" + // The marketing name for the device model + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'iPhone 6s Plus', 'Samsung Galaxy S6' + // Note: It's recommended this value represents a human readable version of the + // device model rather than a machine readable alternative. + AttributeDeviceModelName = "device.model.name" +) + +// A serverless instance. +const ( + // The execution environment ID as a string, that will be potentially reused for + // other invocations to the same function/function version. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de' + // Note:
    + //
  • AWS Lambda: Use the (full) log stream name.
  • + //
+ AttributeFaaSInstance = "faas.instance" + // The amount of memory available to the serverless function converted to Bytes. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 134217728 + // Note: It's recommended to set this attribute since e.g. too little memory can + // easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, + // the environment variable AWS_LAMBDA_FUNCTION_MEMORY_SIZE provides this + // information (which must be multiplied by 1,048,576). + AttributeFaaSMaxMemory = "faas.max_memory" + // The name of the single function that this runtime instance executes. + // + // Type: string + // Requirement Level: Required + // Stability: experimental + // Examples: 'my-function', 'myazurefunctionapp/some-function-name' + // Note: This is the name of the function as configured/deployed on the FaaS + // platform and is usually different from the name of the callback + // function (which may be stored in the + // code.namespace/code.function + // span attributes).For some cloud providers, the above definition is ambiguous. + // The following + // definition of function name MUST be used for this attribute + // (and consequently the span name) for the listed cloud providers/products:
    + //
  • Azure: The full name /, i.e., function app name + // followed by a forward slash followed by the function name (this form + // can also be seen in the resource JSON for the function). + // This means that a span attribute MUST be used, as an Azure function + // app can host multiple functions that would usually share + // a TracerProvider (see also the cloud.resource_id attribute).
  • + //
+ AttributeFaaSName = "faas.name" + // The immutable version of the function being executed. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '26', 'pinkfroid-00002' + // Note: Depending on the cloud provider and platform, use:
    + //
  • AWS Lambda: The function version + // (an integer represented as a decimal string).
  • + //
  • Google Cloud Run (Services): The revision + // (i.e., the function name plus the revision suffix).
  • + //
  • Google Cloud Functions: The value of the + // K_REVISION environment variable.
  • + //
  • Azure Functions: Not applicable. Do not set this attribute.
  • + //
+ AttributeFaaSVersion = "faas.version" +) + +// A host is defined as a computing instance. For example, physical servers, +// virtual machines, switches or disk array. +const ( + // The CPU architecture the host system is running on. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeHostArch = "host.arch" + // Unique host ID. For Cloud, this must be the instance_id assigned by the cloud + // provider. For non-containerized systems, this should be the machine-id. See the + // table below for the sources to use to determine the machine-id based on + // operating system. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'fdbf79e8af94cb7f9e8df36789187052' + AttributeHostID = "host.id" + // VM image ID or host OS image ID. For Cloud, this value is from the provider. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'ami-07b06b442921831e5' + AttributeHostImageID = "host.image.id" + // Name of the VM image or OS install the host was instantiated from. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905' + AttributeHostImageName = "host.image.name" + // The version string of the VM image or host OS as defined in Version Attributes. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '0.1' + AttributeHostImageVersion = "host.image.version" + // Available IP addresses of the host, excluding loopback interfaces. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: '192.168.1.140', 'fe80::abc2:4a28:737a:609e' + // Note: IPv4 Addresses MUST be specified in dotted-quad notation. IPv6 addresses + // MUST be specified in the RFC 5952 format. + AttributeHostIP = "host.ip" + // Name of the host. On Unix systems, it may contain what the hostname command + // returns, or the fully qualified hostname, or another name specified by the + // user. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry-test' + AttributeHostName = "host.name" + // Type of host. For Cloud, this must be the machine type. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'n1-standard-1' + AttributeHostType = "host.type" +) + +const ( + // AMD64 + AttributeHostArchAMD64 = "amd64" + // ARM32 + AttributeHostArchARM32 = "arm32" + // ARM64 + AttributeHostArchARM64 = "arm64" + // Itanium + AttributeHostArchIA64 = "ia64" + // 32-bit PowerPC + AttributeHostArchPPC32 = "ppc32" + // 64-bit PowerPC + AttributeHostArchPPC64 = "ppc64" + // IBM z/Architecture + AttributeHostArchS390x = "s390x" + // 32-bit x86 + AttributeHostArchX86 = "x86" +) + +// A host's CPU information +const ( + // The amount of level 2 memory cache available to the processor (in Bytes). + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 12288000 + AttributeHostCPUCacheL2Size = "host.cpu.cache.l2.size" + // Numeric value specifying the family or generation of the CPU. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 6 + AttributeHostCPUFamily = "host.cpu.family" + // Model identifier. It provides more granular information about the CPU, + // distinguishing it from other CPUs within the same family. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 6 + AttributeHostCPUModelID = "host.cpu.model.id" + // Model designation of the processor. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz' + AttributeHostCPUModelName = "host.cpu.model.name" + // Stepping or core revisions. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 1 + AttributeHostCPUStepping = "host.cpu.stepping" + // Processor manufacturer identifier. A maximum 12-character string. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'GenuineIntel' + // Note: CPUID command returns the vendor ID string in EBX, EDX and ECX registers. + // Writing these to memory in this order results in a 12-character string. + AttributeHostCPUVendorID = "host.cpu.vendor.id" +) + +// A Kubernetes Cluster. +const ( + // The name of the cluster. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry-cluster' + AttributeK8SClusterName = "k8s.cluster.name" + // A pseudo-ID for the cluster, set to the UID of the kube-system namespace. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '218fc5a9-a5f1-4b54-aa05-46717d0ab26d' + // Note: K8S does not have support for obtaining a cluster ID. If this is ever + // added, we will recommend collecting the k8s.cluster.uid through the + // official APIs. In the meantime, we are able to use the uid of the + // kube-system namespace as a proxy for cluster ID. Read on for the + // rationale.Every object created in a K8S cluster is assigned a distinct UID. The + // kube-system namespace is used by Kubernetes itself and will exist + // for the lifetime of the cluster. Using the uid of the kube-system + // namespace is a reasonable proxy for the K8S ClusterID as it will only + // change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are + // UUIDs as standardized by + // ISO/IEC 9834-8 and ITU-T X.667. + // Which states:
+ // If generated according to one of the mechanisms defined in Rec.
+ // ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be + // different from all other UUIDs generated before 3603 A.D., or is + // extremely likely to be different (depending on the mechanism + // chosen).Therefore, UIDs between clusters should be extremely unlikely to + // conflict. + AttributeK8SClusterUID = "k8s.cluster.uid" +) + +// A Kubernetes Node object. +const ( + // The name of the Node. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'node-1' + AttributeK8SNodeName = "k8s.node.name" + // The UID of the Node. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2' + AttributeK8SNodeUID = "k8s.node.uid" +) + +// A Kubernetes Namespace. +const ( + // The name of the namespace that the pod is running in. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'default' + AttributeK8SNamespaceName = "k8s.namespace.name" +) + +// A Kubernetes Pod object. +const ( + // The name of the Pod. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry-pod-autoconf' + AttributeK8SPodName = "k8s.pod.name" + // The UID of the Pod. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + AttributeK8SPodUID = "k8s.pod.uid" +) + +// A container in a +// [PodTemplate](https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates). +const ( + // The name of the Container from Pod specification, must be unique within a Pod. + // Container runtime usually uses different globally unique name (container.name). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'redis' + AttributeK8SContainerName = "k8s.container.name" + // Number of times the container was restarted. This attribute can be used to + // identify a particular container (running or stopped) within a container spec. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 0, 2 + AttributeK8SContainerRestartCount = "k8s.container.restart_count" +) + +// A Kubernetes ReplicaSet object. +const ( + // The name of the ReplicaSet. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry' + AttributeK8SReplicaSetName = "k8s.replicaset.name" + // The UID of the ReplicaSet. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + AttributeK8SReplicaSetUID = "k8s.replicaset.uid" +) + +// A Kubernetes Deployment object. +const ( + // The name of the Deployment. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry' + AttributeK8SDeploymentName = "k8s.deployment.name" + // The UID of the Deployment. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + AttributeK8SDeploymentUID = "k8s.deployment.uid" +) + +// A Kubernetes StatefulSet object. +const ( + // The name of the StatefulSet. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry' + AttributeK8SStatefulSetName = "k8s.statefulset.name" + // The UID of the StatefulSet. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + AttributeK8SStatefulSetUID = "k8s.statefulset.uid" +) + +// A Kubernetes DaemonSet object. +const ( + // The name of the DaemonSet. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry' + AttributeK8SDaemonSetName = "k8s.daemonset.name" + // The UID of the DaemonSet. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + AttributeK8SDaemonSetUID = "k8s.daemonset.uid" +) + +// A Kubernetes Job object. +const ( + // The name of the Job. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry' + AttributeK8SJobName = "k8s.job.name" + // The UID of the Job. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + AttributeK8SJobUID = "k8s.job.uid" +) + +// A Kubernetes CronJob object. +const ( + // The name of the CronJob. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry' + AttributeK8SCronJobName = "k8s.cronjob.name" + // The UID of the CronJob. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + AttributeK8SCronJobUID = "k8s.cronjob.uid" +) + +// An OCI image manifest. +const ( + // The digest of the OCI image manifest. For container images specifically is the + // digest by which the container image is known. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: + // 'sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4' + // Note: Follows OCI Image Manifest Specification, and specifically the Digest + // property. + // An example can be found in Example Image Manifest. + AttributeOciManifestDigest = "oci.manifest.digest" +) + +// The operating system (OS) on which the process represented by this resource +// is running. +const ( + // Unique identifier for a particular build or compilation of the operating + // system. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'TQ3C.230805.001.B2', '20E247', '22621' + AttributeOSBuildID = "os.build_id" + // Human readable (not intended to be parsed) OS version information, like e.g. + // reported by ver or lsb_release -a commands. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1 LTS' + AttributeOSDescription = "os.description" + // Human readable operating system name. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'iOS', 'Android', 'Ubuntu' + AttributeOSName = "os.name" + // The operating system type. + // + // Type: Enum + // Requirement Level: Required + // Stability: experimental + AttributeOSType = "os.type" + // The version string of the operating system as defined in Version Attributes. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '14.2.1', '18.04.1' + AttributeOSVersion = "os.version" +) + +const ( + // Microsoft Windows + AttributeOSTypeWindows = "windows" + // Linux + AttributeOSTypeLinux = "linux" + // Apple Darwin + AttributeOSTypeDarwin = "darwin" + // FreeBSD + AttributeOSTypeFreeBSD = "freebsd" + // NetBSD + AttributeOSTypeNetBSD = "netbsd" + // OpenBSD + AttributeOSTypeOpenBSD = "openbsd" + // DragonFly BSD + AttributeOSTypeDragonflyBSD = "dragonflybsd" + // HP-UX (Hewlett Packard Unix) + AttributeOSTypeHPUX = "hpux" + // AIX (Advanced Interactive eXecutive) + AttributeOSTypeAIX = "aix" + // SunOS, Oracle Solaris + AttributeOSTypeSolaris = "solaris" + // IBM z/OS + AttributeOSTypeZOS = "z_os" +) + +// An operating system process. +const ( + // The command used to launch the process (i.e. the command name). On Linux based + // systems, can be set to the zeroth string in proc/[pid]/cmdline. On Windows, can + // be set to the first parameter extracted from GetCommandLineW. + // + // Type: string + // Requirement Level: Conditionally Required - See alternative attributes below. + // Stability: experimental + // Examples: 'cmd/otelcol' + AttributeProcessCommand = "process.command" + // All the command arguments (including the command/executable itself) as received + // by the process. On Linux-based systems (and some other Unixoid systems + // supporting procfs), can be set according to the list of null-delimited strings + // extracted from proc/[pid]/cmdline. For libc-based executables, this would be + // the full argv vector passed to main. + // + // Type: string[] + // Requirement Level: Conditionally Required - See alternative attributes below. + // Stability: experimental + // Examples: 'cmd/otecol', '--config=config.yaml' + AttributeProcessCommandArgs = "process.command_args" + // The full command used to launch the process as a single string representing the + // full command. On Windows, can be set to the result of GetCommandLineW. Do not + // set this if you have to assemble it just for monitoring; use + // process.command_args instead. + // + // Type: string + // Requirement Level: Conditionally Required - See alternative attributes below. + // Stability: experimental + // Examples: 'C:\\cmd\\otecol --config="my directory\\config.yaml"' + AttributeProcessCommandLine = "process.command_line" + // The name of the process executable. On Linux based systems, can be set to the + // Name in proc/[pid]/status. On Windows, can be set to the base name of + // GetProcessImageFileNameW. + // + // Type: string + // Requirement Level: Conditionally Required - See alternative attributes below. + // Stability: experimental + // Examples: 'otelcol' + AttributeProcessExecutableName = "process.executable.name" + // The full path to the process executable. On Linux based systems, can be set to + // the target of proc/[pid]/exe. On Windows, can be set to the result of + // GetProcessImageFileNameW. + // + // Type: string + // Requirement Level: Conditionally Required - See alternative attributes below. + // Stability: experimental + // Examples: '/usr/bin/cmd/otelcol' + AttributeProcessExecutablePath = "process.executable.path" + // The username of the user that owns the process. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'root' + AttributeProcessOwner = "process.owner" + // Parent Process identifier (PID). + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 111 + AttributeProcessParentPID = "process.parent_pid" + // Process identifier (PID). + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 1234 + AttributeProcessPID = "process.pid" +) + +// The single (language) runtime instance which is monitored. +const ( + // An additional description about the runtime of the process, for example a + // specific vendor customization of the runtime environment. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0' + AttributeProcessRuntimeDescription = "process.runtime.description" + // The name of the runtime of this process. For compiled native binaries, this + // SHOULD be the name of the compiler. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'OpenJDK Runtime Environment' + AttributeProcessRuntimeName = "process.runtime.name" + // The version of the runtime of this process, as returned by the runtime without + // modification. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '14.0.2' + AttributeProcessRuntimeVersion = "process.runtime.version" +) + +// A service instance. +const ( + // Logical name of the service. + // + // Type: string + // Requirement Level: Required + // Stability: experimental + // Examples: 'shoppingcart' + // Note: MUST be the same for all instances of horizontally scaled services. If + // the value was not specified, SDKs MUST fallback to unknown_service: + // concatenated with process.executable.name, e.g. unknown_service:bash. If + // process.executable.name is not available, the value MUST be set to + // unknown_service. + AttributeServiceName = "service.name" + // The version string of the service API or implementation. The format is not + // defined by these conventions. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '2.0.0', 'a01dbef8a' + AttributeServiceVersion = "service.version" +) + +// A service instance. +const ( + // The string ID of the service instance. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'my-k8s-pod-deployment-1', '627cc493-f310-47de-96bd-71410b7dec09' + // Note: MUST be unique for each instance of the same + // service.namespace,service.name pair (in other words + // service.namespace,service.name,service.instance.id triplet MUST be globally + // unique). The ID helps to distinguish instances of the same service that exist + // at the same time (e.g. instances of a horizontally scaled service). It is + // preferable for the ID to be persistent and stay the same for the lifetime of + // the service instance, however it is acceptable that the ID is ephemeral and + // changes during important lifetime events for the service (e.g. service + // restarts). If the service has no inherent unique ID that can be used as the + // value of this attribute it is recommended to generate a random Version 1 or + // Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use + // Version 5, see RFC 4122 for more recommendations). + AttributeServiceInstanceID = "service.instance.id" + // A namespace for service.name. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Shop' + // Note: A string value having a meaning that helps to distinguish a group of + // services, for example the team name that owns a group of services. service.name + // is expected to be unique within the same namespace. If service.namespace is not + // specified in the Resource then service.name is expected to be unique for all + // services that have no explicit namespace defined (so the empty/unspecified + // namespace is simply one more valid namespace). Zero-length namespace string is + // assumed equal to unspecified namespace. + AttributeServiceNamespace = "service.namespace" +) + +// The telemetry SDK used to capture data recorded by the instrumentation +// libraries. +const ( + // The language of the telemetry SDK. + // + // Type: Enum + // Requirement Level: Required + // Stability: experimental + AttributeTelemetrySDKLanguage = "telemetry.sdk.language" + // The name of the telemetry SDK as defined above. + // + // Type: string + // Requirement Level: Required + // Stability: experimental + // Examples: 'opentelemetry' + // Note: The OpenTelemetry SDK MUST set the telemetry.sdk.name attribute to + // opentelemetry. + // If another SDK, like a fork or a vendor-provided implementation, is used, this + // SDK MUST set the + // telemetry.sdk.name attribute to the fully-qualified class or module name of + // this SDK's main entry point + // or another suitable identifier depending on the language. + // The identifier opentelemetry is reserved and MUST NOT be used in this case. + // All custom identifiers SHOULD be stable across different versions of an + // implementation. + AttributeTelemetrySDKName = "telemetry.sdk.name" + // The version string of the telemetry SDK. + // + // Type: string + // Requirement Level: Required + // Stability: experimental + // Examples: '1.2.3' + AttributeTelemetrySDKVersion = "telemetry.sdk.version" +) + +const ( + // cpp + AttributeTelemetrySDKLanguageCPP = "cpp" + // dotnet + AttributeTelemetrySDKLanguageDotnet = "dotnet" + // erlang + AttributeTelemetrySDKLanguageErlang = "erlang" + // go + AttributeTelemetrySDKLanguageGo = "go" + // java + AttributeTelemetrySDKLanguageJava = "java" + // nodejs + AttributeTelemetrySDKLanguageNodejs = "nodejs" + // php + AttributeTelemetrySDKLanguagePHP = "php" + // python + AttributeTelemetrySDKLanguagePython = "python" + // ruby + AttributeTelemetrySDKLanguageRuby = "ruby" + // rust + AttributeTelemetrySDKLanguageRust = "rust" + // swift + AttributeTelemetrySDKLanguageSwift = "swift" + // webjs + AttributeTelemetrySDKLanguageWebjs = "webjs" +) + +// The telemetry SDK used to capture data recorded by the instrumentation +// libraries. +const ( + // The name of the auto instrumentation agent or distribution, if used. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'parts-unlimited-java' + // Note: Official auto instrumentation agents and distributions SHOULD set the + // telemetry.distro.name attribute to + // a string starting with opentelemetry-, e.g. opentelemetry-java-instrumentation. + AttributeTelemetryDistroName = "telemetry.distro.name" + // The version string of the auto instrumentation agent or distribution, if used. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '1.2.3' + AttributeTelemetryDistroVersion = "telemetry.distro.version" +) + +// Resource describing the packaged software running the application code. Web +// engines are typically executed using process.runtime. +const ( + // Additional description of the web engine (e.g. detailed version and edition + // information). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - 2.2.2.Final' + AttributeWebEngineDescription = "webengine.description" + // The name of the web engine. + // + // Type: string + // Requirement Level: Required + // Stability: experimental + // Examples: 'WildFly' + AttributeWebEngineName = "webengine.name" + // The version of the web engine. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '21.0.0' + AttributeWebEngineVersion = "webengine.version" +) + +// Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's +// concepts. +const ( + // The name of the instrumentation scope - (InstrumentationScope.Name in OTLP). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'io.opentelemetry.contrib.mongodb' + AttributeOTelScopeName = "otel.scope.name" + // The version of the instrumentation scope - (InstrumentationScope.Version in + // OTLP). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '1.0.0' + AttributeOTelScopeVersion = "otel.scope.version" +) + +// Span attributes used by non-OTLP exporters to represent OpenTelemetry +// Scope's concepts. +const ( + // Deprecated, use the otel.scope.name attribute. + // + // Type: string + // Requirement Level: Optional + // Stability: deprecated + // Examples: 'io.opentelemetry.contrib.mongodb' + AttributeOTelLibraryName = "otel.library.name" + // Deprecated, use the otel.scope.version attribute. + // + // Type: string + // Requirement Level: Optional + // Stability: deprecated + // Examples: '1.0.0' + AttributeOTelLibraryVersion = "otel.library.version" +) + +func GetResourceSemanticConventionAttributeNames() []string { + return []string{ + AttributeAndroidOSAPILevel, + AttributeBrowserBrands, + AttributeBrowserLanguage, + AttributeBrowserMobile, + AttributeBrowserPlatform, + AttributeCloudAccountID, + AttributeCloudAvailabilityZone, + AttributeCloudPlatform, + AttributeCloudProvider, + AttributeCloudRegion, + AttributeCloudResourceID, + AttributeAWSECSClusterARN, + AttributeAWSECSContainerARN, + AttributeAWSECSLaunchtype, + AttributeAWSECSTaskARN, + AttributeAWSECSTaskFamily, + AttributeAWSECSTaskRevision, + AttributeAWSEKSClusterARN, + AttributeAWSLogGroupARNs, + AttributeAWSLogGroupNames, + AttributeAWSLogStreamARNs, + AttributeAWSLogStreamNames, + AttributeGCPCloudRunJobExecution, + AttributeGCPCloudRunJobTaskIndex, + AttributeGCPGceInstanceHostname, + AttributeGCPGceInstanceName, + AttributeHerokuAppID, + AttributeHerokuReleaseCommit, + AttributeHerokuReleaseCreationTimestamp, + AttributeContainerCommand, + AttributeContainerCommandArgs, + AttributeContainerCommandLine, + AttributeContainerID, + AttributeContainerImageID, + AttributeContainerImageName, + AttributeContainerImageRepoDigests, + AttributeContainerImageTags, + AttributeContainerName, + AttributeContainerRuntime, + AttributeDeploymentEnvironment, + AttributeDeviceID, + AttributeDeviceManufacturer, + AttributeDeviceModelIdentifier, + AttributeDeviceModelName, + AttributeFaaSInstance, + AttributeFaaSMaxMemory, + AttributeFaaSName, + AttributeFaaSVersion, + AttributeHostArch, + AttributeHostID, + AttributeHostImageID, + AttributeHostImageName, + AttributeHostImageVersion, + AttributeHostIP, + AttributeHostName, + AttributeHostType, + AttributeHostCPUCacheL2Size, + AttributeHostCPUFamily, + AttributeHostCPUModelID, + AttributeHostCPUModelName, + AttributeHostCPUStepping, + AttributeHostCPUVendorID, + AttributeK8SClusterName, + AttributeK8SClusterUID, + AttributeK8SNodeName, + AttributeK8SNodeUID, + AttributeK8SNamespaceName, + AttributeK8SPodName, + AttributeK8SPodUID, + AttributeK8SContainerName, + AttributeK8SContainerRestartCount, + AttributeK8SReplicaSetName, + AttributeK8SReplicaSetUID, + AttributeK8SDeploymentName, + AttributeK8SDeploymentUID, + AttributeK8SStatefulSetName, + AttributeK8SStatefulSetUID, + AttributeK8SDaemonSetName, + AttributeK8SDaemonSetUID, + AttributeK8SJobName, + AttributeK8SJobUID, + AttributeK8SCronJobName, + AttributeK8SCronJobUID, + AttributeOciManifestDigest, + AttributeOSBuildID, + AttributeOSDescription, + AttributeOSName, + AttributeOSType, + AttributeOSVersion, + AttributeProcessCommand, + AttributeProcessCommandArgs, + AttributeProcessCommandLine, + AttributeProcessExecutableName, + AttributeProcessExecutablePath, + AttributeProcessOwner, + AttributeProcessParentPID, + AttributeProcessPID, + AttributeProcessRuntimeDescription, + AttributeProcessRuntimeName, + AttributeProcessRuntimeVersion, + AttributeServiceName, + AttributeServiceVersion, + AttributeServiceInstanceID, + AttributeServiceNamespace, + AttributeTelemetrySDKLanguage, + AttributeTelemetrySDKName, + AttributeTelemetrySDKVersion, + AttributeTelemetryDistroName, + AttributeTelemetryDistroVersion, + AttributeWebEngineDescription, + AttributeWebEngineName, + AttributeWebEngineVersion, + AttributeOTelScopeName, + AttributeOTelScopeVersion, + AttributeOTelLibraryName, + AttributeOTelLibraryVersion, + } +} diff --git a/semconv/v1.22.0/generated_trace.go b/semconv/v1.22.0/generated_trace.go new file mode 100644 index 00000000000..2630302dae1 --- /dev/null +++ b/semconv/v1.22.0/generated_trace.go @@ -0,0 +1,1471 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv + +// The shared attributes used to report a single exception associated with a +// span or log. +const ( + // The exception message. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Division by zero', "Can't convert 'int' object to str implicitly" + AttributeExceptionMessage = "exception.message" + // A stacktrace as a string in the natural representation for the language + // runtime. The representation is to be determined and documented by each language + // SIG. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Exception in thread "main" java.lang.RuntimeException: Test + // exception\\n at ' + // 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' + // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' + // 'com.example.GenerateTrace.main(GenerateTrace.java:5)' + AttributeExceptionStacktrace = "exception.stacktrace" + // The type of the exception (its fully-qualified class name, if applicable). The + // dynamic type of the exception should be preferred over the static type in + // languages that support it. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'java.net.ConnectException', 'OSError' + AttributeExceptionType = "exception.type" +) + +// Operations that access some remote service. +const ( + // The service.name of the remote service. SHOULD be equal to the actual + // service.name resource attribute of the remote service if any. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'AuthTokenCache' + AttributePeerService = "peer.service" +) + +// These attributes may be used for any operation with an authenticated and/or +// authorized enduser. +const ( + // Username or client_id extracted from the access token or Authorization header + // in the inbound request from outside the system. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'username' + AttributeEnduserID = "enduser.id" + // Actual/assumed role the client is making the request under extracted from token + // or application security context. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'admin' + AttributeEnduserRole = "enduser.role" + // Scopes or granted authorities the client currently possesses extracted from + // token or application security context. The value would come from the scope + // associated with an OAuth 2.0 Access Token or an attribute value in a SAML 2.0 + // Assertion. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'read:message, write:files' + AttributeEnduserScope = "enduser.scope" +) + +// These attributes may be used for any operation to store information about a +// thread that started a span. +const ( + // Whether the thread is daemon or not. + // + // Type: boolean + // Requirement Level: Optional + // Stability: experimental + AttributeThreadDaemon = "thread.daemon" + // Current "managed" thread ID (as opposed to OS thread ID). + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 42 + AttributeThreadID = "thread.id" + // Current thread name. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'main' + AttributeThreadName = "thread.name" +) + +// These attributes allow to report this unit of code and therefore to provide +// more context about the span. +const ( + // The column number in code.filepath best representing the operation. It SHOULD + // point within the code unit named in code.function. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 16 + AttributeCodeColumn = "code.column" + // The source code file name that identifies the code unit as uniquely as possible + // (preferably an absolute file path). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '/usr/local/MyApplication/content_root/app/index.php' + AttributeCodeFilepath = "code.filepath" + // The method or function name, or equivalent (usually rightmost part of the code + // unit's name). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'serveRequest' + AttributeCodeFunction = "code.function" + // The line number in code.filepath best representing the operation. It SHOULD + // point within the code unit named in code.function. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 42 + AttributeCodeLineNumber = "code.lineno" + // The "namespace" within which code.function is defined. Usually the + // qualified class or module name, such that code.namespace + some separator + + // code.function form a unique identifier for the code unit. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'com.example.MyHTTPService' + AttributeCodeNamespace = "code.namespace" +) + +// Span attributes used by AWS Lambda (in addition to general `faas` +// attributes). +const ( + // The full invoked ARN as provided on the Context passed to the function (Lambda- + // Runtime-Invoked-Function-ARN header on the /runtime/invocation/next + // applicable). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias' + // Note: This may be different from cloud.resource_id if an alias is involved. + AttributeAWSLambdaInvokedARN = "aws.lambda.invoked_arn" +) + +// Attributes for CloudEvents. CloudEvents is a specification on how to define +// event data in a standard way. These attributes can be attached to spans when +// performing operations with CloudEvents, regardless of the protocol being +// used. +const ( + // The event_id uniquely identifies the event. + // + // Type: string + // Requirement Level: Required + // Stability: experimental + // Examples: '123e4567-e89b-12d3-a456-426614174000', '0001' + AttributeCloudeventsEventID = "cloudevents.event_id" + // The source identifies the context in which an event happened. + // + // Type: string + // Requirement Level: Required + // Stability: experimental + // Examples: 'https://github.com/cloudevents', '/cloudevents/spec/pull/123', 'my- + // service' + AttributeCloudeventsEventSource = "cloudevents.event_source" + // The version of the CloudEvents specification which the event uses. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '1.0' + AttributeCloudeventsEventSpecVersion = "cloudevents.event_spec_version" + // The subject of the event in the context of the event producer (identified by + // source). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'mynewfile.jpg' + AttributeCloudeventsEventSubject = "cloudevents.event_subject" + // The event_type contains a value describing the type of event related to the + // originating occurrence. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'com.github.pull_request.opened', 'com.example.object.deleted.v2' + AttributeCloudeventsEventType = "cloudevents.event_type" +) + +// Semantic conventions for the OpenTracing Shim +const ( + // Parent-child Reference type + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Note: The causal relationship between a child Span and a parent Span. + AttributeOpentracingRefType = "opentracing.ref_type" +) + +const ( + // The parent Span depends on the child Span in some capacity + AttributeOpentracingRefTypeChildOf = "child_of" + // The parent Span does not depend in any way on the result of the child Span + AttributeOpentracingRefTypeFollowsFrom = "follows_from" +) + +// The attributes used to perform database client calls. +const ( + // The connection string used to connect to the database. It is recommended to + // remove embedded credentials. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Server=(localdb)\\v11.0;Integrated Security=true;' + AttributeDBConnectionString = "db.connection_string" + // The fully-qualified class name of the Java Database Connectivity (JDBC) driver + // used to connect. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'org.postgresql.Driver', + // 'com.microsoft.sqlserver.jdbc.SQLServerDriver' + AttributeDBJDBCDriverClassname = "db.jdbc.driver_classname" + // This attribute is used to report the name of the database being accessed. For + // commands that switch the database, this should be set to the target database + // (even if the command fails). + // + // Type: string + // Requirement Level: Conditionally Required - If applicable. + // Stability: experimental + // Examples: 'customers', 'main' + // Note: In some SQL databases, the database name to be used is called + // "schema name". In case there are multiple layers that could be + // considered for database name (e.g. Oracle instance name and schema name), the + // database name to be used is the more specific layer (e.g. Oracle schema name). + AttributeDBName = "db.name" + // The name of the operation being executed, e.g. the MongoDB command name such as + // findAndModify, or the SQL keyword. + // + // Type: string + // Requirement Level: Conditionally Required - If `db.statement` is not + // applicable. + // Stability: experimental + // Examples: 'findAndModify', 'HMSET', 'SELECT' + // Note: When setting this to an SQL keyword, it is not recommended to attempt any + // client-side parsing of db.statement just to get this property, but it should be + // set if the operation name is provided by the library being instrumented. If the + // SQL statement has an ambiguous operation, or performs more than one operation, + // this value may be omitted. + AttributeDBOperation = "db.operation" + // The database statement being executed. + // + // Type: string + // Requirement Level: Recommended - Should be collected by default only if there + // is sanitization that excludes sensitive information. + // Stability: experimental + // Examples: 'SELECT * FROM wuser_table', 'SET mykey "WuValue"' + AttributeDBStatement = "db.statement" + // An identifier for the database management system (DBMS) product being used. See + // below for a list of well-known identifiers. + // + // Type: Enum + // Requirement Level: Required + // Stability: experimental + AttributeDBSystem = "db.system" + // Username for accessing the database. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'readonly_user', 'reporting_user' + AttributeDBUser = "db.user" +) + +const ( + // Some other SQL database. Fallback only. See notes + AttributeDBSystemOtherSQL = "other_sql" + // Microsoft SQL Server + AttributeDBSystemMSSQL = "mssql" + // Microsoft SQL Server Compact + AttributeDBSystemMssqlcompact = "mssqlcompact" + // MySQL + AttributeDBSystemMySQL = "mysql" + // Oracle Database + AttributeDBSystemOracle = "oracle" + // IBM DB2 + AttributeDBSystemDB2 = "db2" + // PostgreSQL + AttributeDBSystemPostgreSQL = "postgresql" + // Amazon Redshift + AttributeDBSystemRedshift = "redshift" + // Apache Hive + AttributeDBSystemHive = "hive" + // Cloudscape + AttributeDBSystemCloudscape = "cloudscape" + // HyperSQL DataBase + AttributeDBSystemHSQLDB = "hsqldb" + // Progress Database + AttributeDBSystemProgress = "progress" + // SAP MaxDB + AttributeDBSystemMaxDB = "maxdb" + // SAP HANA + AttributeDBSystemHanaDB = "hanadb" + // Ingres + AttributeDBSystemIngres = "ingres" + // FirstSQL + AttributeDBSystemFirstSQL = "firstsql" + // EnterpriseDB + AttributeDBSystemEDB = "edb" + // InterSystems Caché + AttributeDBSystemCache = "cache" + // Adabas (Adaptable Database System) + AttributeDBSystemAdabas = "adabas" + // Firebird + AttributeDBSystemFirebird = "firebird" + // Apache Derby + AttributeDBSystemDerby = "derby" + // FileMaker + AttributeDBSystemFilemaker = "filemaker" + // Informix + AttributeDBSystemInformix = "informix" + // InstantDB + AttributeDBSystemInstantDB = "instantdb" + // InterBase + AttributeDBSystemInterbase = "interbase" + // MariaDB + AttributeDBSystemMariaDB = "mariadb" + // Netezza + AttributeDBSystemNetezza = "netezza" + // Pervasive PSQL + AttributeDBSystemPervasive = "pervasive" + // PointBase + AttributeDBSystemPointbase = "pointbase" + // SQLite + AttributeDBSystemSqlite = "sqlite" + // Sybase + AttributeDBSystemSybase = "sybase" + // Teradata + AttributeDBSystemTeradata = "teradata" + // Vertica + AttributeDBSystemVertica = "vertica" + // H2 + AttributeDBSystemH2 = "h2" + // ColdFusion IMQ + AttributeDBSystemColdfusion = "coldfusion" + // Apache Cassandra + AttributeDBSystemCassandra = "cassandra" + // Apache HBase + AttributeDBSystemHBase = "hbase" + // MongoDB + AttributeDBSystemMongoDB = "mongodb" + // Redis + AttributeDBSystemRedis = "redis" + // Couchbase + AttributeDBSystemCouchbase = "couchbase" + // CouchDB + AttributeDBSystemCouchDB = "couchdb" + // Microsoft Azure Cosmos DB + AttributeDBSystemCosmosDB = "cosmosdb" + // Amazon DynamoDB + AttributeDBSystemDynamoDB = "dynamodb" + // Neo4j + AttributeDBSystemNeo4j = "neo4j" + // Apache Geode + AttributeDBSystemGeode = "geode" + // Elasticsearch + AttributeDBSystemElasticsearch = "elasticsearch" + // Memcached + AttributeDBSystemMemcached = "memcached" + // CockroachDB + AttributeDBSystemCockroachdb = "cockroachdb" + // OpenSearch + AttributeDBSystemOpensearch = "opensearch" + // ClickHouse + AttributeDBSystemClickhouse = "clickhouse" + // Cloud Spanner + AttributeDBSystemSpanner = "spanner" + // Trino + AttributeDBSystemTrino = "trino" +) + +// Connection-level attributes for Microsoft SQL Server +const ( + // The Microsoft SQL Server instance name connecting to. This name is used to + // determine the port of a named instance. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'MSSQLSERVER' + // Note: If setting a db.mssql.instance_name, server.port is no longer required + // (but still recommended if non-standard). + AttributeDBMSSQLInstanceName = "db.mssql.instance_name" +) + +// Call-level attributes for Cassandra +const ( + // The consistency level of the query. Based on consistency values from CQL. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeDBCassandraConsistencyLevel = "db.cassandra.consistency_level" + // The data center of the coordinating node for a query. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'us-west-2' + AttributeDBCassandraCoordinatorDC = "db.cassandra.coordinator.dc" + // The ID of the coordinating node for a query. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af' + AttributeDBCassandraCoordinatorID = "db.cassandra.coordinator.id" + // Whether or not the query is idempotent. + // + // Type: boolean + // Requirement Level: Optional + // Stability: experimental + AttributeDBCassandraIdempotence = "db.cassandra.idempotence" + // The fetch size used for paging, i.e. how many rows will be returned at once. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 5000 + AttributeDBCassandraPageSize = "db.cassandra.page_size" + // The number of times a query was speculatively executed. Not set or 0 if the + // query was not executed speculatively. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 0, 2 + AttributeDBCassandraSpeculativeExecutionCount = "db.cassandra.speculative_execution_count" + // The name of the primary table that the operation is acting upon, including the + // keyspace name (if applicable). + // + // Type: string + // Requirement Level: Recommended + // Stability: experimental + // Examples: 'mytable' + // Note: This mirrors the db.sql.table attribute but references cassandra rather + // than sql. It is not recommended to attempt any client-side parsing of + // db.statement just to get this property, but it should be set if it is provided + // by the library being instrumented. If the operation is acting upon an anonymous + // table, or more than one table, this value MUST NOT be set. + AttributeDBCassandraTable = "db.cassandra.table" +) + +const ( + // all + AttributeDBCassandraConsistencyLevelAll = "all" + // each_quorum + AttributeDBCassandraConsistencyLevelEachQuorum = "each_quorum" + // quorum + AttributeDBCassandraConsistencyLevelQuorum = "quorum" + // local_quorum + AttributeDBCassandraConsistencyLevelLocalQuorum = "local_quorum" + // one + AttributeDBCassandraConsistencyLevelOne = "one" + // two + AttributeDBCassandraConsistencyLevelTwo = "two" + // three + AttributeDBCassandraConsistencyLevelThree = "three" + // local_one + AttributeDBCassandraConsistencyLevelLocalOne = "local_one" + // any + AttributeDBCassandraConsistencyLevelAny = "any" + // serial + AttributeDBCassandraConsistencyLevelSerial = "serial" + // local_serial + AttributeDBCassandraConsistencyLevelLocalSerial = "local_serial" +) + +// Call-level attributes for Redis +const ( + // The index of the database being accessed as used in the SELECT command, + // provided as an integer. To be used instead of the generic db.name attribute. + // + // Type: int + // Requirement Level: Conditionally Required - If other than the default database + // (`0`). + // Stability: experimental + // Examples: 0, 1, 15 + AttributeDBRedisDBIndex = "db.redis.database_index" +) + +// Call-level attributes for MongoDB +const ( + // The collection being accessed within the database stated in db.name. + // + // Type: string + // Requirement Level: Required + // Stability: experimental + // Examples: 'customers', 'products' + AttributeDBMongoDBCollection = "db.mongodb.collection" +) + +// Call-level attributes for Elasticsearch +const ( + // Represents the identifier of an Elasticsearch cluster. + // + // Type: string + // Requirement Level: Recommended - When communicating with an Elastic Cloud + // deployment, this should be collected from the "X-Found-Handling-Cluster" HTTP + // response header. + // Stability: experimental + // Examples: 'e9106fc68e3044f0b1475b04bf4ffd5f' + AttributeDBElasticsearchClusterName = "db.elasticsearch.cluster.name" + // Represents the human-readable identifier of the node/instance to which a + // request was routed. + // + // Type: string + // Requirement Level: Recommended - When communicating with an Elastic Cloud + // deployment, this should be collected from the "X-Found-Handling-Instance" HTTP + // response header. + // Stability: experimental + // Examples: 'instance-0000000001' + AttributeDBElasticsearchNodeName = "db.elasticsearch.node.name" +) + +// Call-level attributes for SQL databases +const ( + // The name of the primary table that the operation is acting upon, including the + // database name (if applicable). + // + // Type: string + // Requirement Level: Recommended + // Stability: experimental + // Examples: 'public.users', 'customers' + // Note: It is not recommended to attempt any client-side parsing of db.statement + // just to get this property, but it should be set if it is provided by the + // library being instrumented. If the operation is acting upon an anonymous table, + // or more than one table, this value MUST NOT be set. + AttributeDBSQLTable = "db.sql.table" +) + +// Call-level attributes for Cosmos DB. +const ( + // Unique Cosmos client instance id. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '3ba4827d-4422-483f-b59f-85b74211c11d' + AttributeDBCosmosDBClientID = "db.cosmosdb.client_id" + // Cosmos client connection mode. + // + // Type: Enum + // Requirement Level: Conditionally Required - if not `direct` (or pick gw as + // default) + // Stability: experimental + AttributeDBCosmosDBConnectionMode = "db.cosmosdb.connection_mode" + // Cosmos DB container name. + // + // Type: string + // Requirement Level: Conditionally Required - if available + // Stability: experimental + // Examples: 'anystring' + AttributeDBCosmosDBContainer = "db.cosmosdb.container" + // CosmosDB Operation Type. + // + // Type: Enum + // Requirement Level: Conditionally Required - when performing one of the + // operations in this list + // Stability: experimental + AttributeDBCosmosDBOperationType = "db.cosmosdb.operation_type" + // RU consumed for that operation + // + // Type: double + // Requirement Level: Conditionally Required - when available + // Stability: experimental + // Examples: 46.18, 1.0 + AttributeDBCosmosDBRequestCharge = "db.cosmosdb.request_charge" + // Request payload size in bytes + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + AttributeDBCosmosDBRequestContentLength = "db.cosmosdb.request_content_length" + // Cosmos DB status code. + // + // Type: int + // Requirement Level: Conditionally Required - if response was received + // Stability: experimental + // Examples: 200, 201 + AttributeDBCosmosDBStatusCode = "db.cosmosdb.status_code" + // Cosmos DB sub status code. + // + // Type: int + // Requirement Level: Conditionally Required - when response was received and + // contained sub-code. + // Stability: experimental + // Examples: 1000, 1002 + AttributeDBCosmosDBSubStatusCode = "db.cosmosdb.sub_status_code" +) + +const ( + // Gateway (HTTP) connections mode + AttributeDBCosmosDBConnectionModeGateway = "gateway" + // Direct connection + AttributeDBCosmosDBConnectionModeDirect = "direct" +) + +const ( + // invalid + AttributeDBCosmosDBOperationTypeInvalid = "Invalid" + // create + AttributeDBCosmosDBOperationTypeCreate = "Create" + // patch + AttributeDBCosmosDBOperationTypePatch = "Patch" + // read + AttributeDBCosmosDBOperationTypeRead = "Read" + // read_feed + AttributeDBCosmosDBOperationTypeReadFeed = "ReadFeed" + // delete + AttributeDBCosmosDBOperationTypeDelete = "Delete" + // replace + AttributeDBCosmosDBOperationTypeReplace = "Replace" + // execute + AttributeDBCosmosDBOperationTypeExecute = "Execute" + // query + AttributeDBCosmosDBOperationTypeQuery = "Query" + // head + AttributeDBCosmosDBOperationTypeHead = "Head" + // head_feed + AttributeDBCosmosDBOperationTypeHeadFeed = "HeadFeed" + // upsert + AttributeDBCosmosDBOperationTypeUpsert = "Upsert" + // batch + AttributeDBCosmosDBOperationTypeBatch = "Batch" + // query_plan + AttributeDBCosmosDBOperationTypeQueryPlan = "QueryPlan" + // execute_javascript + AttributeDBCosmosDBOperationTypeExecuteJavascript = "ExecuteJavaScript" +) + +// Span attributes used by non-OTLP exporters to represent OpenTelemetry Span's +// concepts. +const ( + // Name of the code, either "OK" or "ERROR". MUST NOT be set + // if the status code is UNSET. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeOTelStatusCode = "otel.status_code" + // Description of the Status if it has a value, otherwise not set. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'resource not found' + AttributeOTelStatusDescription = "otel.status_description" +) + +const ( + // The operation has been validated by an Application developer or Operator to have completed successfully + AttributeOTelStatusCodeOk = "OK" + // The operation contains an error + AttributeOTelStatusCodeError = "ERROR" +) + +// This semantic convention describes an instance of a function that runs +// without provisioning or managing of servers (also known as serverless +// functions or Function as a Service (FaaS)) with spans. +const ( + // The invocation ID of the current function invocation. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28' + AttributeFaaSInvocationID = "faas.invocation_id" +) + +// Semantic Convention for FaaS triggered as a response to some data source +// operation such as a database or filesystem read/write. +const ( + // The name of the source on which the triggering operation was performed. For + // example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos + // DB to the database name. + // + // Type: string + // Requirement Level: Required + // Stability: experimental + // Examples: 'myBucketName', 'myDBName' + AttributeFaaSDocumentCollection = "faas.document.collection" + // The document name/table subjected to the operation. For example, in Cloud + // Storage or S3 is the name of the file, and in Cosmos DB the table name. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'myFile.txt', 'myTableName' + AttributeFaaSDocumentName = "faas.document.name" + // Describes the type of the operation that was performed on the data. + // + // Type: Enum + // Requirement Level: Required + // Stability: experimental + AttributeFaaSDocumentOperation = "faas.document.operation" + // A string containing the time when the data was accessed in the ISO 8601 format + // expressed in UTC. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '2020-01-23T13:47:06Z' + AttributeFaaSDocumentTime = "faas.document.time" +) + +const ( + // When a new object is created + AttributeFaaSDocumentOperationInsert = "insert" + // When an object is modified + AttributeFaaSDocumentOperationEdit = "edit" + // When an object is deleted + AttributeFaaSDocumentOperationDelete = "delete" +) + +// Semantic Convention for FaaS scheduled to be executed regularly. +const ( + // A string containing the schedule period as Cron Expression. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '0/5 * * * ? *' + AttributeFaaSCron = "faas.cron" + // A string containing the function invocation time in the ISO 8601 format + // expressed in UTC. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '2020-01-23T13:47:06Z' + AttributeFaaSTime = "faas.time" +) + +// Contains additional attributes for incoming FaaS spans. +const ( + // A boolean that is true if the serverless function is executed for the first + // time (aka cold-start). + // + // Type: boolean + // Requirement Level: Optional + // Stability: experimental + AttributeFaaSColdstart = "faas.coldstart" +) + +// The `aws` conventions apply to operations using the AWS SDK. They map +// request or response parameters in AWS SDK API calls to attributes on a Span. +// The conventions have been collected over time based on feedback from AWS +// users of tracing and will continue to evolve as new interesting conventions +// are found. +// Some descriptions are also provided for populating general OpenTelemetry +// semantic conventions based on these APIs. +const ( + // The AWS request ID as returned in the response headers x-amz-request-id or + // x-amz-requestid. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '79b9da39-b7ae-508a-a6bc-864b2829c622', 'C9ER4AJX75574TDJ' + AttributeAWSRequestID = "aws.request_id" +) + +// Attributes that exist for multiple DynamoDB request types. +const ( + // The value of the AttributesToGet request parameter. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: 'lives', 'id' + AttributeAWSDynamoDBAttributesToGet = "aws.dynamodb.attributes_to_get" + // The value of the ConsistentRead request parameter. + // + // Type: boolean + // Requirement Level: Optional + // Stability: experimental + AttributeAWSDynamoDBConsistentRead = "aws.dynamodb.consistent_read" + // The JSON-serialized value of each item in the ConsumedCapacity response field. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": { "string" : { + // "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits": + // number } }, "LocalSecondaryIndexes": { "string" : { "CapacityUnits": number, + // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }, + // "ReadCapacityUnits": number, "Table": { "CapacityUnits": number, + // "ReadCapacityUnits": number, "WriteCapacityUnits": number }, "TableName": + // "string", "WriteCapacityUnits": number }' + AttributeAWSDynamoDBConsumedCapacity = "aws.dynamodb.consumed_capacity" + // The value of the IndexName request parameter. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'name_to_group' + AttributeAWSDynamoDBIndexName = "aws.dynamodb.index_name" + // The JSON-serialized value of the ItemCollectionMetrics response field. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B": blob, + // "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { "string" : + // "AttributeValue" }, "N": "string", "NS": [ "string" ], "NULL": boolean, "S": + // "string", "SS": [ "string" ] } }, "SizeEstimateRangeGB": [ number ] } ] }' + AttributeAWSDynamoDBItemCollectionMetrics = "aws.dynamodb.item_collection_metrics" + // The value of the Limit request parameter. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 10 + AttributeAWSDynamoDBLimit = "aws.dynamodb.limit" + // The value of the ProjectionExpression request parameter. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Title', 'Title, Price, Color', 'Title, Description, RelatedItems, + // ProductReviews' + AttributeAWSDynamoDBProjection = "aws.dynamodb.projection" + // The value of the ProvisionedThroughput.ReadCapacityUnits request parameter. + // + // Type: double + // Requirement Level: Optional + // Stability: experimental + // Examples: 1.0, 2.0 + AttributeAWSDynamoDBProvisionedReadCapacity = "aws.dynamodb.provisioned_read_capacity" + // The value of the ProvisionedThroughput.WriteCapacityUnits request parameter. + // + // Type: double + // Requirement Level: Optional + // Stability: experimental + // Examples: 1.0, 2.0 + AttributeAWSDynamoDBProvisionedWriteCapacity = "aws.dynamodb.provisioned_write_capacity" + // The value of the Select request parameter. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'ALL_ATTRIBUTES', 'COUNT' + AttributeAWSDynamoDBSelect = "aws.dynamodb.select" + // The keys in the RequestItems object field. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Users', 'Cats' + AttributeAWSDynamoDBTableNames = "aws.dynamodb.table_names" +) + +// DynamoDB.CreateTable +const ( + // The JSON-serialized value of each item of the GlobalSecondaryIndexes request + // field + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName": "string", + // "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], + // "ProjectionType": "string" }, "ProvisionedThroughput": { "ReadCapacityUnits": + // number, "WriteCapacityUnits": number } }' + AttributeAWSDynamoDBGlobalSecondaryIndexes = "aws.dynamodb.global_secondary_indexes" + // The JSON-serialized value of each item of the LocalSecondaryIndexes request + // field. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: '{ "IndexARN": "string", "IndexName": "string", "IndexSizeBytes": + // number, "ItemCount": number, "KeySchema": [ { "AttributeName": "string", + // "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], + // "ProjectionType": "string" } }' + AttributeAWSDynamoDBLocalSecondaryIndexes = "aws.dynamodb.local_secondary_indexes" +) + +// DynamoDB.ListTables +const ( + // The value of the ExclusiveStartTableName request parameter. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Users', 'CatsTable' + AttributeAWSDynamoDBExclusiveStartTable = "aws.dynamodb.exclusive_start_table" + // The the number of items in the TableNames response parameter. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 20 + AttributeAWSDynamoDBTableCount = "aws.dynamodb.table_count" +) + +// DynamoDB.Query +const ( + // The value of the ScanIndexForward request parameter. + // + // Type: boolean + // Requirement Level: Optional + // Stability: experimental + AttributeAWSDynamoDBScanForward = "aws.dynamodb.scan_forward" +) + +// DynamoDB.Scan +const ( + // The value of the Count response parameter. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 10 + AttributeAWSDynamoDBCount = "aws.dynamodb.count" + // The value of the ScannedCount response parameter. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 50 + AttributeAWSDynamoDBScannedCount = "aws.dynamodb.scanned_count" + // The value of the Segment request parameter. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 10 + AttributeAWSDynamoDBSegment = "aws.dynamodb.segment" + // The value of the TotalSegments request parameter. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 100 + AttributeAWSDynamoDBTotalSegments = "aws.dynamodb.total_segments" +) + +// DynamoDB.UpdateTable +const ( + // The JSON-serialized value of each item in the AttributeDefinitions request + // field. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: '{ "AttributeName": "string", "AttributeType": "string" }' + AttributeAWSDynamoDBAttributeDefinitions = "aws.dynamodb.attribute_definitions" + // The JSON-serialized value of each item in the the GlobalSecondaryIndexUpdates + // request field. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ { + // "AttributeName": "string", "KeyType": "string" } ], "Projection": { + // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, + // "ProvisionedThroughput": { "ReadCapacityUnits": number, "WriteCapacityUnits": + // number } }' + AttributeAWSDynamoDBGlobalSecondaryIndexUpdates = "aws.dynamodb.global_secondary_index_updates" +) + +// Attributes that exist for S3 request types. +const ( + // The S3 bucket name the request refers to. Corresponds to the --bucket parameter + // of the S3 API operations. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'some-bucket-name' + // Note: The bucket attribute is applicable to all S3 operations that reference a + // bucket, i.e. that require the bucket name as a mandatory parameter. + // This applies to almost all S3 operations except list-buckets. + AttributeAWSS3Bucket = "aws.s3.bucket" + // The source object (in the form bucket/key) for the copy operation. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'someFile.yml' + // Note: The copy_source attribute applies to S3 copy operations and corresponds + // to the --copy-source parameter + // of the copy-object operation within the S3 API. + // This applies in particular to the following operations:
    + //
  • copy-object
  • + //
  • upload-part-copy
  • + //
+ AttributeAWSS3CopySource = "aws.s3.copy_source" + // The delete request container that specifies the objects to be deleted. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Objects=[{Key=string,VersionID=string},{Key=string,VersionID=string} + // ],Quiet=boolean' + // Note: The delete attribute is only applicable to the delete-object operation. + // The delete attribute corresponds to the --delete parameter of the + // delete-objects operation within the S3 API. + AttributeAWSS3Delete = "aws.s3.delete" + // The S3 object key the request refers to. Corresponds to the --key parameter of + // the S3 API operations. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'someFile.yml' + // Note: The key attribute is applicable to all object-related S3 operations, i.e. + // that require the object key as a mandatory parameter. + // This applies in particular to the following operations:
    + //
  • copy-object
  • + //
  • delete-object
  • + //
  • get-object
  • + //
  • head-object
  • + //
  • put-object
  • + //
  • restore-object
  • + //
  • select-object-content
  • + //
  • abort-multipart-upload
  • + //
  • complete-multipart-upload
  • + //
  • create-multipart-upload
  • + //
  • list-parts
  • + //
  • upload-part
  • + //
  • upload-part-copy
  • + //
+ AttributeAWSS3Key = "aws.s3.key" + // The part number of the part being uploaded in a multipart-upload operation. + // This is a positive integer between 1 and 10,000. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 3456 + // Note: The part_number attribute is only applicable to the upload-part + // and upload-part-copy operations. + // The part_number attribute corresponds to the --part-number parameter of the + // upload-part operation within the S3 API. + AttributeAWSS3PartNumber = "aws.s3.part_number" + // Upload ID that identifies the multipart upload. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ' + // Note: The upload_id attribute applies to S3 multipart-upload operations and + // corresponds to the --upload-id parameter + // of the S3 API multipart operations. + // This applies in particular to the following operations:
    + //
  • abort-multipart-upload
  • + //
  • complete-multipart-upload
  • + //
  • list-parts
  • + //
  • upload-part
  • + //
  • upload-part-copy
  • + //
+ AttributeAWSS3UploadID = "aws.s3.upload_id" +) + +// Semantic conventions to apply when instrumenting the GraphQL implementation. +// They map GraphQL operations to attributes on a Span. +const ( + // The GraphQL document being executed. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'query findBookByID { bookByID(id: ?) { name } }' + // Note: The value may be sanitized to exclude sensitive information. + AttributeGraphqlDocument = "graphql.document" + // The name of the operation being executed. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'findBookByID' + AttributeGraphqlOperationName = "graphql.operation.name" + // The type of the operation being executed. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Examples: 'query', 'mutation', 'subscription' + AttributeGraphqlOperationType = "graphql.operation.type" +) + +const ( + // GraphQL query + AttributeGraphqlOperationTypeQuery = "query" + // GraphQL mutation + AttributeGraphqlOperationTypeMutation = "mutation" + // GraphQL subscription + AttributeGraphqlOperationTypeSubscription = "subscription" +) + +// General attributes used in messaging systems. +const ( + // The number of messages sent, received, or processed in the scope of the + // batching operation. + // + // Type: int + // Requirement Level: Conditionally Required - If the span describes an operation + // on a batch of messages. + // Stability: experimental + // Examples: 0, 1, 2 + // Note: Instrumentations SHOULD NOT set messaging.batch.message_count on spans + // that operate with a single message. When a messaging client library supports + // both batch and single-message API for the same operation, instrumentations + // SHOULD use messaging.batch.message_count for batching APIs and SHOULD NOT use + // it for single-message APIs. + AttributeMessagingBatchMessageCount = "messaging.batch.message_count" + // A unique identifier for the client that consumes or produces a message. + // + // Type: string + // Requirement Level: Recommended - If a client id is available + // Stability: experimental + // Examples: 'client-5', 'myhost@8742@s8083jm' + AttributeMessagingClientID = "messaging.client_id" + // A string identifying the kind of messaging operation as defined in the + // Operation names section above. + // + // Type: Enum + // Requirement Level: Required + // Stability: experimental + // Note: If a custom value is used, it MUST be of low cardinality. + AttributeMessagingOperation = "messaging.operation" + // A string identifying the messaging system. + // + // Type: string + // Requirement Level: Required + // Stability: experimental + // Examples: 'kafka', 'rabbitmq', 'rocketmq', 'activemq', 'AmazonSQS' + AttributeMessagingSystem = "messaging.system" +) + +const ( + // publish + AttributeMessagingOperationPublish = "publish" + // receive + AttributeMessagingOperationReceive = "receive" + // process + AttributeMessagingOperationProcess = "process" +) + +// Semantic conventions for remote procedure calls. +const ( + // The name of the (logical) method being called, must be equal to the $method + // part in the span name. + // + // Type: string + // Requirement Level: Recommended + // Stability: experimental + // Examples: 'exampleMethod' + // Note: This is the logical name of the method from the RPC interface + // perspective, which can be different from the name of any implementing + // method/function. The code.function attribute may be used to store the latter + // (e.g., method actually executing the call on the server side, RPC client stub + // method on the client side). + AttributeRPCMethod = "rpc.method" + // The full (logical) name of the service being called, including its package + // name, if applicable. + // + // Type: string + // Requirement Level: Recommended + // Stability: experimental + // Examples: 'myservice.EchoService' + // Note: This is the logical name of the service from the RPC interface + // perspective, which can be different from the name of any implementing class. + // The code.namespace attribute may be used to store the latter (despite the + // attribute name, it may include a class name; e.g., class with method actually + // executing the call on the server side, RPC client stub class on the client + // side). + AttributeRPCService = "rpc.service" + // A string identifying the remoting system. See below for a list of well-known + // identifiers. + // + // Type: Enum + // Requirement Level: Required + // Stability: experimental + AttributeRPCSystem = "rpc.system" +) + +const ( + // gRPC + AttributeRPCSystemGRPC = "grpc" + // Java RMI + AttributeRPCSystemJavaRmi = "java_rmi" + // .NET WCF + AttributeRPCSystemDotnetWcf = "dotnet_wcf" + // Apache Dubbo + AttributeRPCSystemApacheDubbo = "apache_dubbo" + // Connect RPC + AttributeRPCSystemConnectRPC = "connect_rpc" +) + +// Tech-specific attributes for gRPC. +const ( + // The numeric status code of the gRPC request. + // + // Type: Enum + // Requirement Level: Required + // Stability: experimental + AttributeRPCGRPCStatusCode = "rpc.grpc.status_code" +) + +const ( + // OK + AttributeRPCGRPCStatusCodeOk = "0" + // CANCELLED + AttributeRPCGRPCStatusCodeCancelled = "1" + // UNKNOWN + AttributeRPCGRPCStatusCodeUnknown = "2" + // INVALID_ARGUMENT + AttributeRPCGRPCStatusCodeInvalidArgument = "3" + // DEADLINE_EXCEEDED + AttributeRPCGRPCStatusCodeDeadlineExceeded = "4" + // NOT_FOUND + AttributeRPCGRPCStatusCodeNotFound = "5" + // ALREADY_EXISTS + AttributeRPCGRPCStatusCodeAlreadyExists = "6" + // PERMISSION_DENIED + AttributeRPCGRPCStatusCodePermissionDenied = "7" + // RESOURCE_EXHAUSTED + AttributeRPCGRPCStatusCodeResourceExhausted = "8" + // FAILED_PRECONDITION + AttributeRPCGRPCStatusCodeFailedPrecondition = "9" + // ABORTED + AttributeRPCGRPCStatusCodeAborted = "10" + // OUT_OF_RANGE + AttributeRPCGRPCStatusCodeOutOfRange = "11" + // UNIMPLEMENTED + AttributeRPCGRPCStatusCodeUnimplemented = "12" + // INTERNAL + AttributeRPCGRPCStatusCodeInternal = "13" + // UNAVAILABLE + AttributeRPCGRPCStatusCodeUnavailable = "14" + // DATA_LOSS + AttributeRPCGRPCStatusCodeDataLoss = "15" + // UNAUTHENTICATED + AttributeRPCGRPCStatusCodeUnauthenticated = "16" +) + +// Tech-specific attributes for [JSON RPC](https://www.jsonrpc.org/). +const ( + // error.code property of response if it is an error response. + // + // Type: int + // Requirement Level: Conditionally Required - If response is not successful. + // Stability: experimental + // Examples: -32700, 100 + AttributeRPCJsonrpcErrorCode = "rpc.jsonrpc.error_code" + // error.message property of response if it is an error response. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Parse error', 'User already exists' + AttributeRPCJsonrpcErrorMessage = "rpc.jsonrpc.error_message" + // id property of request or response. Since protocol allows id to be int, string, + // null or missing (for notifications), value is expected to be cast to string for + // simplicity. Use empty string in case of null value. Omit entirely if this is a + // notification. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '10', 'request-7', '' + AttributeRPCJsonrpcRequestID = "rpc.jsonrpc.request_id" + // Protocol version as in jsonrpc property of request/response. Since JSON-RPC 1.0 + // does not specify this, the value can be omitted. + // + // Type: string + // Requirement Level: Conditionally Required - If other than the default version + // (`1.0`) + // Stability: experimental + // Examples: '2.0', '1.0' + AttributeRPCJsonrpcVersion = "rpc.jsonrpc.version" +) + +// Tech-specific attributes for Connect RPC. +const ( + // The error codes of the Connect request. Error codes are always string values. + // + // Type: Enum + // Requirement Level: Conditionally Required - If response is not successful and + // if error code available. + // Stability: experimental + AttributeRPCConnectRPCErrorCode = "rpc.connect_rpc.error_code" +) + +const ( + // cancelled + AttributeRPCConnectRPCErrorCodeCancelled = "cancelled" + // unknown + AttributeRPCConnectRPCErrorCodeUnknown = "unknown" + // invalid_argument + AttributeRPCConnectRPCErrorCodeInvalidArgument = "invalid_argument" + // deadline_exceeded + AttributeRPCConnectRPCErrorCodeDeadlineExceeded = "deadline_exceeded" + // not_found + AttributeRPCConnectRPCErrorCodeNotFound = "not_found" + // already_exists + AttributeRPCConnectRPCErrorCodeAlreadyExists = "already_exists" + // permission_denied + AttributeRPCConnectRPCErrorCodePermissionDenied = "permission_denied" + // resource_exhausted + AttributeRPCConnectRPCErrorCodeResourceExhausted = "resource_exhausted" + // failed_precondition + AttributeRPCConnectRPCErrorCodeFailedPrecondition = "failed_precondition" + // aborted + AttributeRPCConnectRPCErrorCodeAborted = "aborted" + // out_of_range + AttributeRPCConnectRPCErrorCodeOutOfRange = "out_of_range" + // unimplemented + AttributeRPCConnectRPCErrorCodeUnimplemented = "unimplemented" + // internal + AttributeRPCConnectRPCErrorCodeInternal = "internal" + // unavailable + AttributeRPCConnectRPCErrorCodeUnavailable = "unavailable" + // data_loss + AttributeRPCConnectRPCErrorCodeDataLoss = "data_loss" + // unauthenticated + AttributeRPCConnectRPCErrorCodeUnauthenticated = "unauthenticated" +) + +func GetTraceSemanticConventionAttributeNames() []string { + return []string{ + AttributeExceptionMessage, + AttributeExceptionStacktrace, + AttributeExceptionType, + AttributePeerService, + AttributeEnduserID, + AttributeEnduserRole, + AttributeEnduserScope, + AttributeThreadDaemon, + AttributeThreadID, + AttributeThreadName, + AttributeCodeColumn, + AttributeCodeFilepath, + AttributeCodeFunction, + AttributeCodeLineNumber, + AttributeCodeNamespace, + AttributeAWSLambdaInvokedARN, + AttributeCloudeventsEventID, + AttributeCloudeventsEventSource, + AttributeCloudeventsEventSpecVersion, + AttributeCloudeventsEventSubject, + AttributeCloudeventsEventType, + AttributeOpentracingRefType, + AttributeDBConnectionString, + AttributeDBJDBCDriverClassname, + AttributeDBName, + AttributeDBOperation, + AttributeDBStatement, + AttributeDBSystem, + AttributeDBUser, + AttributeDBMSSQLInstanceName, + AttributeDBCassandraConsistencyLevel, + AttributeDBCassandraCoordinatorDC, + AttributeDBCassandraCoordinatorID, + AttributeDBCassandraIdempotence, + AttributeDBCassandraPageSize, + AttributeDBCassandraSpeculativeExecutionCount, + AttributeDBCassandraTable, + AttributeDBRedisDBIndex, + AttributeDBMongoDBCollection, + AttributeDBElasticsearchClusterName, + AttributeDBElasticsearchNodeName, + AttributeDBSQLTable, + AttributeDBCosmosDBClientID, + AttributeDBCosmosDBConnectionMode, + AttributeDBCosmosDBContainer, + AttributeDBCosmosDBOperationType, + AttributeDBCosmosDBRequestCharge, + AttributeDBCosmosDBRequestContentLength, + AttributeDBCosmosDBStatusCode, + AttributeDBCosmosDBSubStatusCode, + AttributeOTelStatusCode, + AttributeOTelStatusDescription, + AttributeFaaSInvocationID, + AttributeFaaSDocumentCollection, + AttributeFaaSDocumentName, + AttributeFaaSDocumentOperation, + AttributeFaaSDocumentTime, + AttributeFaaSCron, + AttributeFaaSTime, + AttributeFaaSColdstart, + AttributeAWSRequestID, + AttributeAWSDynamoDBAttributesToGet, + AttributeAWSDynamoDBConsistentRead, + AttributeAWSDynamoDBConsumedCapacity, + AttributeAWSDynamoDBIndexName, + AttributeAWSDynamoDBItemCollectionMetrics, + AttributeAWSDynamoDBLimit, + AttributeAWSDynamoDBProjection, + AttributeAWSDynamoDBProvisionedReadCapacity, + AttributeAWSDynamoDBProvisionedWriteCapacity, + AttributeAWSDynamoDBSelect, + AttributeAWSDynamoDBTableNames, + AttributeAWSDynamoDBGlobalSecondaryIndexes, + AttributeAWSDynamoDBLocalSecondaryIndexes, + AttributeAWSDynamoDBExclusiveStartTable, + AttributeAWSDynamoDBTableCount, + AttributeAWSDynamoDBScanForward, + AttributeAWSDynamoDBCount, + AttributeAWSDynamoDBScannedCount, + AttributeAWSDynamoDBSegment, + AttributeAWSDynamoDBTotalSegments, + AttributeAWSDynamoDBAttributeDefinitions, + AttributeAWSDynamoDBGlobalSecondaryIndexUpdates, + AttributeAWSS3Bucket, + AttributeAWSS3CopySource, + AttributeAWSS3Delete, + AttributeAWSS3Key, + AttributeAWSS3PartNumber, + AttributeAWSS3UploadID, + AttributeGraphqlDocument, + AttributeGraphqlOperationName, + AttributeGraphqlOperationType, + AttributeMessagingBatchMessageCount, + AttributeMessagingClientID, + AttributeMessagingOperation, + AttributeMessagingSystem, + AttributeRPCMethod, + AttributeRPCService, + AttributeRPCSystem, + AttributeRPCGRPCStatusCode, + AttributeRPCJsonrpcErrorCode, + AttributeRPCJsonrpcErrorMessage, + AttributeRPCJsonrpcRequestID, + AttributeRPCJsonrpcVersion, + AttributeRPCConnectRPCErrorCode, + } +} diff --git a/semconv/v1.22.0/schema.go b/semconv/v1.22.0/schema.go new file mode 100644 index 00000000000..bf32dc2f18c --- /dev/null +++ b/semconv/v1.22.0/schema.go @@ -0,0 +1,9 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package semconv // import "go.opentelemetry.io/collector/semconv/v1.22.0" + +// SchemaURL is the schema URL that matches the version of the semantic conventions +// that this package defines. Semconv packages starting from v1.4.0 must declare +// non-empty schema URL in the form https://opentelemetry.io/schemas/ +const SchemaURL = "https://opentelemetry.io/schemas/1.22.0" diff --git a/service/README.md b/service/README.md index 58409c7f9b8..b954cd85aa4 100644 --- a/service/README.md +++ b/service/README.md @@ -142,7 +142,6 @@ exporters: - debug extensions: - zpages - - memory_ballast ``` ## How to validate configuration file and return all errors without running collector diff --git a/service/config_test.go b/service/config_test.go index c3b659d0dec..6ac9d6e625a 100644 --- a/service/config_test.go +++ b/service/config_test.go @@ -42,7 +42,7 @@ func TestConfigValidate(t *testing.T) { name: "duplicate-processor-reference", cfgFn: func() *Config { cfg := generateConfig() - pipe := cfg.Pipelines[component.NewID("traces")] + pipe := cfg.Pipelines[component.MustNewID("traces")] pipe.Processors = append(pipe.Processors, pipe.Processors...) return cfg }, @@ -52,10 +52,10 @@ func TestConfigValidate(t *testing.T) { name: "invalid-service-pipeline-type", cfgFn: func() *Config { cfg := generateConfig() - cfg.Pipelines[component.NewID("wrongtype")] = &pipelines.PipelineConfig{ - Receivers: []component.ID{component.NewID("nop")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("nop")}, + cfg.Pipelines[component.MustNewID("wrongtype")] = &pipelines.PipelineConfig{ + Receivers: []component.ID{component.MustNewID("nop")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("nop")}, } return cfg }, @@ -99,12 +99,12 @@ func generateConfig() *Config { Address: ":8080", }, }, - Extensions: extensions.Config{component.NewID("nop")}, + Extensions: extensions.Config{component.MustNewID("nop")}, Pipelines: pipelines.Config{ - component.NewID("traces"): { - Receivers: []component.ID{component.NewID("nop")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewID("traces"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, }, } diff --git a/service/extensions/extensions.go b/service/extensions/extensions.go index 5ff92cd5852..e05c5aa01f0 100644 --- a/service/extensions/extensions.go +++ b/service/extensions/extensions.go @@ -15,6 +15,7 @@ import ( "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/extension" "go.opentelemetry.io/collector/service/internal/components" + "go.opentelemetry.io/collector/service/internal/servicetelemetry" "go.opentelemetry.io/collector/service/internal/zpages" ) @@ -22,19 +23,32 @@ const zExtensionName = "zextensionname" // Extensions is a map of extensions created from extension configs. type Extensions struct { - telemetry component.TelemetrySettings - extMap map[component.ID]extension.Extension + telemetry servicetelemetry.TelemetrySettings + extMap map[component.ID]extension.Extension + instanceIDs map[component.ID]*component.InstanceID + extensionIDs []component.ID // start order (and reverse stop order) } // Start starts all extensions. func (bes *Extensions) Start(ctx context.Context, host component.Host) error { bes.telemetry.Logger.Info("Starting extensions...") - for extID, ext := range bes.extMap { + for _, extID := range bes.extensionIDs { extLogger := components.ExtensionLogger(bes.telemetry.Logger, extID) extLogger.Info("Extension is starting...") - if err := ext.Start(ctx, components.NewHostWrapper(host, extLogger)); err != nil { + instanceID := bes.instanceIDs[extID] + ext := bes.extMap[extID] + bes.telemetry.Status.ReportStatus( + instanceID, + component.NewStatusEvent(component.StatusStarting), + ) + if err := ext.Start(ctx, host); err != nil { + bes.telemetry.Status.ReportStatus( + instanceID, + component.NewPermanentErrorEvent(err), + ) return err } + bes.telemetry.Status.ReportOKIfStarting(instanceID) extLogger.Info("Extension started.") } return nil @@ -44,15 +58,34 @@ func (bes *Extensions) Start(ctx context.Context, host component.Host) error { func (bes *Extensions) Shutdown(ctx context.Context) error { bes.telemetry.Logger.Info("Stopping extensions...") var errs error - for _, ext := range bes.extMap { - errs = multierr.Append(errs, ext.Shutdown(ctx)) + for i := len(bes.extensionIDs) - 1; i >= 0; i-- { + extID := bes.extensionIDs[i] + instanceID := bes.instanceIDs[extID] + ext := bes.extMap[extID] + bes.telemetry.Status.ReportStatus( + instanceID, + component.NewStatusEvent(component.StatusStopping), + ) + if err := ext.Shutdown(ctx); err != nil { + bes.telemetry.Status.ReportStatus( + instanceID, + component.NewPermanentErrorEvent(err), + ) + errs = multierr.Append(errs, err) + continue + } + bes.telemetry.Status.ReportStatus( + instanceID, + component.NewStatusEvent(component.StatusStopped), + ) } return errs } func (bes *Extensions) NotifyPipelineReady() error { - for extID, ext := range bes.extMap { + for _, extID := range bes.extensionIDs { + ext := bes.extMap[extID] if pw, ok := ext.(extension.PipelineWatcher); ok { if err := pw.Ready(); err != nil { return fmt.Errorf("failed to notify extension %q: %w", extID, err) @@ -63,9 +96,9 @@ func (bes *Extensions) NotifyPipelineReady() error { } func (bes *Extensions) NotifyPipelineNotReady() error { - // Notify extensions in reverse order. var errs error - for _, ext := range bes.extMap { + for _, extID := range bes.extensionIDs { + ext := bes.extMap[extID] if pw, ok := ext.(extension.PipelineWatcher); ok { errs = multierr.Append(errs, pw.NotReady()) } @@ -75,7 +108,8 @@ func (bes *Extensions) NotifyPipelineNotReady() error { func (bes *Extensions) NotifyConfig(ctx context.Context, conf *confmap.Conf) error { var errs error - for _, ext := range bes.extMap { + for _, extID := range bes.extensionIDs { + ext := bes.extMap[extID] if cw, ok := ext.(extension.ConfigWatcher); ok { clonedConf := confmap.NewFromStringMap(conf.ToStringMap()) errs = multierr.Append(errs, cw.NotifyConfig(ctx, clonedConf)) @@ -84,6 +118,15 @@ func (bes *Extensions) NotifyConfig(ctx context.Context, conf *confmap.Conf) err return errs } +func (bes *Extensions) NotifyComponentStatusChange(source *component.InstanceID, event *component.StatusEvent) { + for _, extID := range bes.extensionIDs { + ext := bes.extMap[extID] + if sw, ok := ext.(extension.StatusWatcher); ok { + sw.ComponentStatusChanged(source, event) + } + } +} + func (bes *Extensions) GetExtensions() map[component.ID]component.Component { result := make(map[component.ID]component.Component, len(bes.extMap)) for extID, v := range bes.extMap { @@ -100,7 +143,7 @@ func (bes *Extensions) HandleZPages(w http.ResponseWriter, r *http.Request) { data := zpages.SummaryExtensionsTableData{} data.Rows = make([]zpages.SummaryExtensionsTableRowData, 0, len(bes.extMap)) - for id := range bes.extMap { + for _, id := range bes.extensionIDs { row := zpages.SummaryExtensionsTableRowData{FullName: id.String()} data.Rows = append(data.Rows, row) } @@ -120,32 +163,29 @@ func (bes *Extensions) HandleZPages(w http.ResponseWriter, r *http.Request) { // Settings holds configuration for building Extensions. type Settings struct { - Telemetry component.TelemetrySettings + Telemetry servicetelemetry.TelemetrySettings BuildInfo component.BuildInfo - // Drepecated: [v0.68.0] use Extensions. - Configs map[component.ID]component.Config - - // Drepecated: [v0.68.0] use Extensions. - Factories map[component.Type]extension.Factory - // Extensions builder for extensions. Extensions *extension.Builder } // New creates a new Extensions from Config. func New(ctx context.Context, set Settings, cfg Config) (*Extensions, error) { - if set.Extensions == nil { - set.Extensions = extension.NewBuilder(set.Configs, set.Factories) - } exts := &Extensions{ - telemetry: set.Telemetry, - extMap: make(map[component.ID]extension.Extension), + telemetry: set.Telemetry, + extMap: make(map[component.ID]extension.Extension), + instanceIDs: make(map[component.ID]*component.InstanceID), + extensionIDs: make([]component.ID, 0, len(cfg)), } for _, extID := range cfg { + instanceID := &component.InstanceID{ + ID: extID, + Kind: component.KindExtension, + } extSet := extension.CreateSettings{ ID: extID, - TelemetrySettings: set.Telemetry, + TelemetrySettings: set.Telemetry.ToComponentTelemetrySettings(instanceID), BuildInfo: set.BuildInfo, } extSet.TelemetrySettings.Logger = components.ExtensionLogger(set.Telemetry.Logger, extID) @@ -161,7 +201,12 @@ func New(ctx context.Context, set Settings, cfg Config) (*Extensions, error) { } exts.extMap[extID] = ext + exts.instanceIDs[extID] = instanceID } - + order, err := computeOrder(exts) + if err != nil { + return nil, err + } + exts.extensionIDs = order return exts, nil } diff --git a/service/extensions/extensions_test.go b/service/extensions/extensions_test.go index d244fe0e8dd..d447582bd54 100644 --- a/service/extensions/extensions_test.go +++ b/service/extensions/extensions_test.go @@ -16,6 +16,8 @@ import ( "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/extension" "go.opentelemetry.io/collector/extension/extensiontest" + "go.opentelemetry.io/collector/service/internal/servicetelemetry" + "go.opentelemetry.io/collector/service/internal/status" ) func TestBuildExtensions(t *testing.T) { @@ -36,17 +38,17 @@ func TestBuildExtensions(t *testing.T) { { name: "extension_not_configured", config: Config{ - component.NewID("myextension"), + component.MustNewID("myextension"), }, wantErrMsg: "failed to create extension \"myextension\": extension \"myextension\" is not configured", }, { name: "missing_extension_factory", extensionsConfigs: map[component.ID]component.Config{ - component.NewID("unknown"): nopExtensionConfig, + component.MustNewID("unknown"): nopExtensionConfig, }, config: Config{ - component.NewID("unknown"), + component.MustNewID("unknown"), }, wantErrMsg: "failed to create extension \"unknown\": extension factory not available for: \"unknown\"", }, @@ -81,10 +83,9 @@ func TestBuildExtensions(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { _, err := New(context.Background(), Settings{ - Telemetry: componenttest.NewNopTelemetrySettings(), - BuildInfo: component.NewDefaultBuildInfo(), - Configs: tt.extensionsConfigs, - Factories: tt.factories, + Telemetry: servicetelemetry.NewNopTelemetrySettings(), + BuildInfo: component.NewDefaultBuildInfo(), + Extensions: extension.NewBuilder(tt.extensionsConfigs, tt.factories), }, tt.config) require.Error(t, err) assert.EqualError(t, err, tt.wantErrMsg) @@ -92,15 +93,130 @@ func TestBuildExtensions(t *testing.T) { } } +type testOrderExt struct { + name string + deps []string +} + +type testOrderCase struct { + testName string + extensions []testOrderExt + order []string + err string +} + +func TestOrdering(t *testing.T) { + tests := []testOrderCase{ + { + testName: "no_deps", + extensions: []testOrderExt{{name: ""}, {name: "foo"}, {name: "bar"}}, + order: nil, // no predictable order + }, + { + testName: "deps", + extensions: []testOrderExt{ + {name: "foo", deps: []string{"bar"}}, // foo -> bar + {name: "baz", deps: []string{"foo"}}, // baz -> foo + {name: "bar"}, + }, + // baz -> foo -> bar + order: []string{"recording/bar", "recording/foo", "recording/baz"}, + }, + { + testName: "deps_double", + extensions: []testOrderExt{ + {name: "foo", deps: []string{"bar"}}, // foo -> bar + {name: "baz", deps: []string{"foo", "bar"}}, // baz -> {foo, bar} + {name: "bar"}, + }, + // baz -> foo -> bar + order: []string{"recording/bar", "recording/foo", "recording/baz"}, + }, + { + testName: "unknown_dep", + extensions: []testOrderExt{ + {name: "foo", deps: []string{"BAZ"}}, + {name: "bar"}, + }, + err: "unable to find extension", + }, + { + testName: "circular", + extensions: []testOrderExt{ + {name: "foo", deps: []string{"bar"}}, + {name: "bar", deps: []string{"foo"}}, + }, + err: "unable to order extenions", + }, + } + for _, testCase := range tests { + t.Run(testCase.testName, testCase.testOrdering) + } +} + +func (tc testOrderCase) testOrdering(t *testing.T) { + var startOrder []string + var shutdownOrder []string + + recordingExtensionFactory := newRecordingExtensionFactory(func(set extension.CreateSettings, _ component.Host) error { + startOrder = append(startOrder, set.ID.String()) + return nil + }, func(set extension.CreateSettings) error { + shutdownOrder = append(shutdownOrder, set.ID.String()) + return nil + }) + + extCfgs := make(map[component.ID]component.Config) + extIDs := make([]component.ID, len(tc.extensions)) + for i, ext := range tc.extensions { + extID := component.NewIDWithName(recordingExtensionFactory.Type(), ext.name) + extIDs[i] = extID + extCfgs[extID] = recordingExtensionConfig{dependencies: ext.deps} + } + + exts, err := New(context.Background(), Settings{ + Telemetry: servicetelemetry.NewNopTelemetrySettings(), + BuildInfo: component.NewDefaultBuildInfo(), + Extensions: extension.NewBuilder( + extCfgs, + map[component.Type]extension.Factory{ + recordingExtensionFactory.Type(): recordingExtensionFactory, + }), + }, Config(extIDs)) + if tc.err != "" { + require.ErrorContains(t, err, tc.err) + return + } + require.NoError(t, err) + + err = exts.Start(context.Background(), componenttest.NewNopHost()) + require.NoError(t, err) + err = exts.Shutdown(context.Background()) + require.NoError(t, err) + + // TODO From Go 1.21 can use slices.Reverse() + reverseSlice := func(s []string) { + for i, j := 0, len(s)-1; i < j; i, j = i+1, j-1 { + s[i], s[j] = s[j], s[i] + } + } + + if len(tc.order) > 0 { + require.Equal(t, tc.order, startOrder) + reverseSlice(shutdownOrder) + require.Equal(t, tc.order, shutdownOrder) + } +} + func TestNotifyConfig(t *testing.T) { notificationError := errors.New("Error processing config") nopExtensionFactory := extensiontest.NewNopFactory() nopExtensionConfig := nopExtensionFactory.CreateDefaultConfig() - n1ExtensionFactory := newConfigWatcherExtensionFactory("notifiable1", func() error { return nil }) + n1ExtensionFactory := newConfigWatcherExtensionFactory(component.MustNewType("notifiable1"), func() error { return nil }) n1ExtensionConfig := n1ExtensionFactory.CreateDefaultConfig() - n2ExtensionFactory := newConfigWatcherExtensionFactory("notifiable2", func() error { return nil }) + n2ExtensionFactory := newConfigWatcherExtensionFactory(component.MustNewType("notifiable2"), func() error { return nil }) n2ExtensionConfig := n1ExtensionFactory.CreateDefaultConfig() - nErrExtensionFactory := newConfigWatcherExtensionFactory("notifiableErr", func() error { return notificationError }) + nErrExtensionFactory := newConfigWatcherExtensionFactory(component.MustNewType("notifiableErr"), func() error { return notificationError }) nErrExtensionConfig := nErrExtensionFactory.CreateDefaultConfig() tests := []struct { @@ -114,52 +230,52 @@ func TestNotifyConfig(t *testing.T) { { name: "No notifiable extensions", factories: map[component.Type]extension.Factory{ - "nop": nopExtensionFactory, + component.MustNewType("nop"): nopExtensionFactory, }, extensionsConfigs: map[component.ID]component.Config{ - component.NewID("nop"): nopExtensionConfig, + component.MustNewID("nop"): nopExtensionConfig, }, serviceExtensions: []component.ID{ - component.NewID("nop"), + component.MustNewID("nop"), }, }, { name: "One notifiable extension", factories: map[component.Type]extension.Factory{ - "notifiable1": n1ExtensionFactory, + component.MustNewType("notifiable1"): n1ExtensionFactory, }, extensionsConfigs: map[component.ID]component.Config{ - component.NewID("notifiable1"): n1ExtensionConfig, + component.MustNewID("notifiable1"): n1ExtensionConfig, }, serviceExtensions: []component.ID{ - component.NewID("notifiable1"), + component.MustNewID("notifiable1"), }, }, { name: "Multiple notifiable extensions", factories: map[component.Type]extension.Factory{ - "notifiable1": n1ExtensionFactory, - "notifiable2": n2ExtensionFactory, + component.MustNewType("notifiable1"): n1ExtensionFactory, + component.MustNewType("notifiable2"): n2ExtensionFactory, }, extensionsConfigs: map[component.ID]component.Config{ - component.NewID("notifiable1"): n1ExtensionConfig, - component.NewID("notifiable2"): n2ExtensionConfig, + component.MustNewID("notifiable1"): n1ExtensionConfig, + component.MustNewID("notifiable2"): n2ExtensionConfig, }, serviceExtensions: []component.ID{ - component.NewID("notifiable1"), - component.NewID("notifiable2"), + component.MustNewID("notifiable1"), + component.MustNewID("notifiable2"), }, }, { name: "Errors in extension notification", factories: map[component.Type]extension.Factory{ - "notifiableErr": nErrExtensionFactory, + component.MustNewType("notifiableErr"): nErrExtensionFactory, }, extensionsConfigs: map[component.ID]component.Config{ - component.NewID("notifiableErr"): nErrExtensionConfig, + component.MustNewID("notifiableErr"): nErrExtensionConfig, }, serviceExtensions: []component.ID{ - component.NewID("notifiableErr"), + component.MustNewID("notifiableErr"), }, want: notificationError, }, @@ -168,10 +284,9 @@ func TestNotifyConfig(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { extensions, err := New(context.Background(), Settings{ - Telemetry: componenttest.NewNopTelemetrySettings(), - BuildInfo: component.NewDefaultBuildInfo(), - Configs: tt.extensionsConfigs, - Factories: tt.factories, + Telemetry: servicetelemetry.NewNopTelemetrySettings(), + BuildInfo: component.NewDefaultBuildInfo(), + Extensions: extension.NewBuilder(tt.extensionsConfigs, tt.factories), }, tt.serviceExtensions) assert.NoError(t, err) errs := extensions.NotifyConfig(context.Background(), confmap.NewFromStringMap(map[string]interface{}{})) @@ -184,15 +299,15 @@ type configWatcherExtension struct { fn func() error } -func (comp *configWatcherExtension) Start(_ context.Context, _ component.Host) error { +func (comp *configWatcherExtension) Start(context.Context, component.Host) error { return comp.fn() } -func (comp *configWatcherExtension) Shutdown(_ context.Context) error { +func (comp *configWatcherExtension) Shutdown(context.Context) error { return comp.fn() } -func (comp *configWatcherExtension) NotifyConfig(_ context.Context, _ *confmap.Conf) error { +func (comp *configWatcherExtension) NotifyConfig(context.Context, *confmap.Conf) error { return comp.fn() } @@ -211,7 +326,7 @@ func newConfigWatcherExtensionFactory(name component.Type, fn func() error) exte func() component.Config { return &struct{}{} }, - func(ctx context.Context, set extension.CreateSettings, extension component.Config) (extension.Extension, error) { + func(context.Context, extension.CreateSettings, component.Config) (extension.Extension, error) { return newConfigWatcherExtension(fn), nil }, component.StabilityLevelDevelopment, @@ -220,11 +335,11 @@ func newConfigWatcherExtensionFactory(name component.Type, fn func() error) exte func newBadExtensionFactory() extension.Factory { return extension.NewFactory( - "bf", + component.MustNewType("bf"), func() component.Config { return &struct{}{} }, - func(ctx context.Context, set extension.CreateSettings, extension component.Config) (extension.Extension, error) { + func(context.Context, extension.CreateSettings, component.Config) (extension.Extension, error) { return nil, nil }, component.StabilityLevelDevelopment, @@ -233,13 +348,187 @@ func newBadExtensionFactory() extension.Factory { func newCreateErrorExtensionFactory() extension.Factory { return extension.NewFactory( - "err", + component.MustNewType("err"), func() component.Config { return &struct{}{} }, - func(ctx context.Context, set extension.CreateSettings, extension component.Config) (extension.Extension, error) { + func(context.Context, extension.CreateSettings, component.Config) (extension.Extension, error) { return nil, errors.New("cannot create \"err\" extension type") }, component.StabilityLevelDevelopment, ) } + +func TestStatusReportedOnStartupShutdown(t *testing.T) { + // compare two slices of status events ignoring timestamp + assertEqualStatuses := func(t *testing.T, evts1, evts2 []*component.StatusEvent) { + assert.Equal(t, len(evts1), len(evts2)) + for i := 0; i < len(evts1); i++ { + ev1 := evts1[i] + ev2 := evts2[i] + assert.Equal(t, ev1.Status(), ev2.Status()) + assert.Equal(t, ev1.Err(), ev2.Err()) + } + } + + for _, tc := range []struct { + name string + expectedStatuses []*component.StatusEvent + startErr error + shutdownErr error + }{ + { + name: "successful startup/shutdown", + expectedStatuses: []*component.StatusEvent{ + component.NewStatusEvent(component.StatusStarting), + component.NewStatusEvent(component.StatusOK), + component.NewStatusEvent(component.StatusStopping), + component.NewStatusEvent(component.StatusStopped), + }, + startErr: nil, + shutdownErr: nil, + }, + { + name: "start error", + expectedStatuses: []*component.StatusEvent{ + component.NewStatusEvent(component.StatusStarting), + component.NewPermanentErrorEvent(assert.AnError), + }, + startErr: assert.AnError, + shutdownErr: nil, + }, + { + name: "shutdown error", + expectedStatuses: []*component.StatusEvent{ + component.NewStatusEvent(component.StatusStarting), + component.NewStatusEvent(component.StatusOK), + component.NewStatusEvent(component.StatusStopping), + component.NewPermanentErrorEvent(assert.AnError), + }, + startErr: nil, + shutdownErr: assert.AnError, + }, + } { + t.Run(tc.name, func(t *testing.T) { + statusType := component.MustNewType("statustest") + compID := component.NewID(statusType) + factory := newStatusTestExtensionFactory(statusType, tc.startErr, tc.shutdownErr) + config := factory.CreateDefaultConfig() + extensionsConfigs := map[component.ID]component.Config{ + compID: config, + } + factories := map[component.Type]extension.Factory{ + statusType: factory, + } + extensions, err := New( + context.Background(), + Settings{ + Telemetry: servicetelemetry.NewNopTelemetrySettings(), + BuildInfo: component.NewDefaultBuildInfo(), + Extensions: extension.NewBuilder(extensionsConfigs, factories), + }, + []component.ID{compID}, + ) + + assert.NoError(t, err) + + var actualStatuses []*component.StatusEvent + rep := status.NewReporter(func(_ *component.InstanceID, ev *component.StatusEvent) { + actualStatuses = append(actualStatuses, ev) + }, func(err error) { + require.NoError(t, err) + }) + extensions.telemetry.Status = rep + rep.Ready() + + assert.Equal(t, tc.startErr, extensions.Start(context.Background(), componenttest.NewNopHost())) + if tc.startErr == nil { + assert.Equal(t, tc.shutdownErr, extensions.Shutdown(context.Background())) + } + assertEqualStatuses(t, tc.expectedStatuses, actualStatuses) + }) + } +} + +type statusTestExtension struct { + startErr error + shutdownErr error +} + +func (ext *statusTestExtension) Start(context.Context, component.Host) error { + return ext.startErr +} + +func (ext *statusTestExtension) Shutdown(context.Context) error { + return ext.shutdownErr +} + +func newStatusTestExtension(startErr, shutdownErr error) *statusTestExtension { + return &statusTestExtension{ + startErr: startErr, + shutdownErr: shutdownErr, + } +} + +func newStatusTestExtensionFactory(name component.Type, startErr, shutdownErr error) extension.Factory { + return extension.NewFactory( + name, + func() component.Config { + return &struct{}{} + }, + func(context.Context, extension.CreateSettings, component.Config) (extension.Extension, error) { + return newStatusTestExtension(startErr, shutdownErr), nil + }, + component.StabilityLevelDevelopment, + ) +} + +func newRecordingExtensionFactory(startCallback func(set extension.CreateSettings, host component.Host) error, shutdownCallback func(set extension.CreateSettings) error) extension.Factory { + return extension.NewFactory( + component.MustNewType("recording"), + func() component.Config { + return &recordingExtensionConfig{} + }, + func(_ context.Context, set extension.CreateSettings, cfg component.Config) (extension.Extension, error) { + return &recordingExtension{ + config: cfg.(recordingExtensionConfig), + createSettings: set, + startCallback: startCallback, + shutdownCallback: shutdownCallback, + }, nil + }, + component.StabilityLevelDevelopment, + ) +} + +type recordingExtensionConfig struct { + dependencies []string // names of dependencies of the same extension type +} + +type recordingExtension struct { + config recordingExtensionConfig + startCallback func(set extension.CreateSettings, host component.Host) error + shutdownCallback func(set extension.CreateSettings) error + createSettings extension.CreateSettings +} + +var _ extension.Dependent = (*recordingExtension)(nil) + +func (ext *recordingExtension) Dependencies() []component.ID { + if len(ext.config.dependencies) == 0 { + return nil + } + deps := make([]component.ID, len(ext.config.dependencies)) + for i, dep := range ext.config.dependencies { + deps[i] = component.MustNewIDWithName("recording", dep) + } + return deps +} + +func (ext *recordingExtension) Start(_ context.Context, host component.Host) error { + return ext.startCallback(ext.createSettings, host) +} + +func (ext *recordingExtension) Shutdown(context.Context) error { + return ext.shutdownCallback(ext.createSettings) +} diff --git a/service/extensions/graph.go b/service/extensions/graph.go new file mode 100644 index 00000000000..7099d018a1f --- /dev/null +++ b/service/extensions/graph.go @@ -0,0 +1,77 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package extensions // import "go.opentelemetry.io/collector/service/extensions" + +import ( + "errors" + "fmt" + "strings" + + "gonum.org/v1/gonum/graph" + "gonum.org/v1/gonum/graph/simple" + "gonum.org/v1/gonum/graph/topo" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/extension" +) + +type node struct { + nodeID int64 + extID component.ID +} + +func (n node) ID() int64 { + return n.nodeID +} + +func computeOrder(exts *Extensions) ([]component.ID, error) { + graph := simple.NewDirectedGraph() + nodes := make(map[component.ID]*node) + for extID := range exts.extMap { + n := &node{ + nodeID: int64(len(nodes) + 1), + extID: extID, + } + graph.AddNode(n) + nodes[extID] = n + } + for extID, ext := range exts.extMap { + n := nodes[extID] + if dep, ok := ext.(extension.Dependent); ok { + for _, depID := range dep.Dependencies() { + if d, ok := nodes[depID]; ok { + graph.SetEdge(graph.NewEdge(d, n)) + } else { + return nil, fmt.Errorf("unable to find extension %s on which extension %s depends", depID, extID) + } + } + } + } + orderedNodes, err := topo.Sort(graph) + if err != nil { + return nil, cycleErr(err, topo.DirectedCyclesIn(graph)) + } + + order := make([]component.ID, len(orderedNodes)) + for i, n := range orderedNodes { + order[i] = n.(*node).extID + } + return order, nil +} + +func cycleErr(err error, cycles [][]graph.Node) error { + var topoErr topo.Unorderable + if !errors.As(err, &topoErr) || len(cycles) == 0 || len(cycles[0]) == 0 { + return err + } + + cycle := cycles[0] + var names []string + for _, n := range cycle { + node := n.(*node) + names = append(names, node.extID.String()) + } + cycleStr := "[" + strings.Join(names, " -> ") + "]" + return fmt.Errorf("unable to order extenions by dependencies, cycle found %s: %w", cycleStr, err) +} diff --git a/service/extensions/graph_test.go b/service/extensions/graph_test.go new file mode 100644 index 00000000000..a3a9d714afe --- /dev/null +++ b/service/extensions/graph_test.go @@ -0,0 +1,21 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package extensions // import "go.opentelemetry.io/collector/service/extensions" + +import ( + "errors" + "testing" + + "github.com/stretchr/testify/assert" + "gonum.org/v1/gonum/graph" + "gonum.org/v1/gonum/graph/topo" +) + +func TestCycleErr(t *testing.T) { + err := errors.New("foo") + assert.Equal(t, err, cycleErr(err, nil), "cycleErr should return the error unchanged when it's unrecognized") + + var topoErr topo.Unorderable = [][]graph.Node{{}} + assert.Equal(t, topoErr, cycleErr(topoErr, nil), "cycleErr should return topo.Unorderable error unchanged when no cycles are found") +} diff --git a/service/extensions/package_test.go b/service/extensions/package_test.go new file mode 100644 index 00000000000..92f3cf19c6a --- /dev/null +++ b/service/extensions/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package extensions + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/service/go.mod b/service/go.mod index dbe78b42af3..602137b3bbc 100644 --- a/service/go.mod +++ b/service/go.mod @@ -1,47 +1,48 @@ module go.opentelemetry.io/collector/service -go 1.20 +go 1.21 require ( - contrib.go.opencensus.io/exporter/prometheus v0.4.2 - github.com/google/uuid v1.3.1 - github.com/prometheus/client_golang v1.16.0 - github.com/prometheus/client_model v0.4.0 - github.com/prometheus/common v0.44.0 - github.com/shirou/gopsutil/v3 v3.23.8 + github.com/google/uuid v1.6.0 + github.com/prometheus/client_golang v1.19.0 + github.com/prometheus/client_model v0.6.0 + github.com/prometheus/common v0.48.0 + github.com/shirou/gopsutil/v3 v3.24.1 github.com/stretchr/testify v1.8.4 go.opencensus.io v0.24.0 - go.opentelemetry.io/collector v0.85.0 - go.opentelemetry.io/collector/component v0.85.0 - go.opentelemetry.io/collector/config/confignet v0.85.0 - go.opentelemetry.io/collector/config/configtelemetry v0.85.0 - go.opentelemetry.io/collector/confmap v0.85.0 - go.opentelemetry.io/collector/connector v0.85.0 - go.opentelemetry.io/collector/consumer v0.85.0 - go.opentelemetry.io/collector/exporter v0.85.0 - go.opentelemetry.io/collector/extension v0.85.0 - go.opentelemetry.io/collector/extension/zpagesextension v0.85.0 - go.opentelemetry.io/collector/featuregate v1.0.0-rcv0014 - go.opentelemetry.io/collector/pdata v1.0.0-rcv0014 - go.opentelemetry.io/collector/processor v0.85.0 - go.opentelemetry.io/collector/receiver v0.85.0 - go.opentelemetry.io/collector/semconv v0.85.0 - go.opentelemetry.io/contrib/propagators/b3 v1.19.0 - go.opentelemetry.io/otel v1.18.0 - go.opentelemetry.io/otel/bridge/opencensus v0.41.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.41.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.41.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.18.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.18.0 - go.opentelemetry.io/otel/exporters/prometheus v0.41.0 - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.41.0 - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.18.0 - go.opentelemetry.io/otel/metric v1.18.0 - go.opentelemetry.io/otel/sdk v1.18.0 - go.opentelemetry.io/otel/sdk/metric v0.41.0 - go.opentelemetry.io/otel/trace v1.18.0 + go.opentelemetry.io/collector v0.96.0 + go.opentelemetry.io/collector/component v0.96.0 + go.opentelemetry.io/collector/config/confignet v0.96.0 + go.opentelemetry.io/collector/config/configtelemetry v0.96.0 + go.opentelemetry.io/collector/confmap v0.96.0 + go.opentelemetry.io/collector/connector v0.96.0 + go.opentelemetry.io/collector/consumer v0.96.0 + go.opentelemetry.io/collector/exporter v0.96.0 + go.opentelemetry.io/collector/extension v0.96.0 + go.opentelemetry.io/collector/extension/zpagesextension v0.96.0 + go.opentelemetry.io/collector/featuregate v1.3.0 + go.opentelemetry.io/collector/pdata v1.3.0 + go.opentelemetry.io/collector/processor v0.96.0 + go.opentelemetry.io/collector/receiver v0.96.0 + go.opentelemetry.io/collector/semconv v0.96.0 + go.opentelemetry.io/contrib/config v0.4.0 + go.opentelemetry.io/contrib/propagators/b3 v1.24.0 + go.opentelemetry.io/otel v1.24.0 + go.opentelemetry.io/otel/bridge/opencensus v1.24.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.24.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.24.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 + go.opentelemetry.io/otel/exporters/prometheus v0.46.0 + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.24.0 + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 + go.opentelemetry.io/otel/metric v1.24.0 + go.opentelemetry.io/otel/sdk v1.24.0 + go.opentelemetry.io/otel/sdk/metric v1.24.0 + go.opentelemetry.io/otel/trace v1.24.0 + go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 - go.uber.org/zap v1.26.0 + go.uber.org/zap v1.27.0 gonum.org/v1/gonum v0.14.0 ) @@ -50,46 +51,41 @@ require ( github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect + github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.0.1 // indirect + github.com/knadh/koanf/v2 v2.1.0 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/prometheus/procfs v0.10.1 // indirect - github.com/prometheus/statsd_exporter v0.22.7 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect - go.opentelemetry.io/contrib/zpages v0.44.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.41.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.18.0 // indirect - go.opentelemetry.io/proto/otlp v1.0.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/grpc v1.58.1 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect + go.opentelemetry.io/contrib/zpages v0.49.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect + go.opentelemetry.io/proto/otlp v1.1.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -122,3 +118,5 @@ replace go.opentelemetry.io/collector/receiver => ../receiver replace go.opentelemetry.io/collector/featuregate => ../featuregate replace go.opentelemetry.io/collector/config/confignet => ../config/confignet + +replace go.opentelemetry.io/collector/config/configretry => ../config/configretry diff --git a/service/go.sum b/service/go.sum index 693484f860c..a888ca2c937 100644 --- a/service/go.sum +++ b/service/go.sum @@ -1,60 +1,12 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= -contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -64,462 +16,210 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= -github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +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/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= -github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= +github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +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/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 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/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= -github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/shirou/gopsutil/v3 v3.23.8 h1:xnATPiybo6GgdRoC4YoGnxXZFRc3dqQTGi73oLvvBrE= -github.com/shirou/gopsutil/v3 v3.23.8/go.mod h1:7hmCaBn+2ZwaZOr6jmPBZDfawwMGuo1id3C6aM8EDqQ= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/shirou/gopsutil/v3 v3.24.1 h1:R3t6ondCEvmARp3wxODhXMTLC/klMa87h2PHUw5m7QI= +github.com/shirou/gopsutil/v3 v3.24.1/go.mod h1:UU7a2MSBQa+kW1uuDq8DeEBS8kmrnQwsv2b5O513rwU= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 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/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/propagators/b3 v1.19.0 h1:ulz44cpm6V5oAeg5Aw9HyqGFMS6XM7untlMEhD7YzzA= -go.opentelemetry.io/contrib/propagators/b3 v1.19.0/go.mod h1:OzCmE2IVS+asTI+odXQstRGVfXQ4bXv9nMBRK0nNyqQ= -go.opentelemetry.io/contrib/zpages v0.44.0 h1:9J/cxTTWhM6kzgdaBt6NiXS2HUreXn/eW2M+vzHgDAQ= -go.opentelemetry.io/contrib/zpages v0.44.0/go.mod h1:G3eNCGhodjn2wIdM+i6GneZb1Cqg6dNRBlm1cpNEElg= -go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= -go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/bridge/opencensus v0.41.0 h1:VBpeaTbrvLFHvRtsyCJXjsTaicBNrAFdmctiN1k6WNI= -go.opentelemetry.io/otel/bridge/opencensus v0.41.0/go.mod h1:yCQB5IKRhgjlbTLc91+ixcZc2/8BncGGJ+CS3dZJwtY= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.41.0 h1:k0k7hFNDd8K4iOMJXj7s8sHaC4mhTlAeppRmZXLgZ6k= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.41.0/go.mod h1:hG4Fj/y8TR/tlEDREo8tWstl9fO9gcFkn4xrx0Io8xU= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.41.0 h1:HgbDTD8pioFdY3NRc/YCvsWjqQPtweGyXxa32LgnTOw= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.41.0/go.mod h1:tmvt/yK5Es5d6lHYWerLSOna8lCEfrBVX/a9M0ggqss= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.41.0 h1:iV3BOgW4fry1Riw9dwypigqlIYWXvSRVT2RJmblzo40= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.41.0/go.mod h1:7PGzqlKrxIRmbj5tlNW0nTkYZ5fHXDgk6Fy8/KjR0CI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.18.0 h1:IAtl+7gua134xcV3NieDhJHjjOVeJhXAnYf/0hswjUY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.18.0/go.mod h1:w+pXobnBzh95MNIkeIuAKcHe/Uu/CX2PKIvBP6ipKRA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.18.0 h1:yE32ay7mJG2leczfREEhoW3VfSZIvHaB+gvVo1o8DQ8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.18.0/go.mod h1:G17FHPDLt74bCI7tJ4CMitEk4BXTYG4FW6XUpkPBXa4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.18.0 h1:6pu8ttx76BxHf+xz/H77AUZkPF3cwWzXqAUsXhVKI18= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.18.0/go.mod h1:IOmXxPrxoxFMXdNy7lfDmE8MzE61YPcurbUm0SMjerI= -go.opentelemetry.io/otel/exporters/prometheus v0.41.0 h1:A3/bhjP5SmELy8dcpK+uttHeh9Qrh+YnS16/VzrztRQ= -go.opentelemetry.io/otel/exporters/prometheus v0.41.0/go.mod h1:mKuXEMi9suyyNJQ99SZCO0mpWGFe0MIALtjd3r6uo7Q= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.41.0 h1:XzjGkawtAXs20Y+s6k1GNDMBsMDOV28TOT8cxmE42qM= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.41.0/go.mod h1:HAomEgjcKZk3VJ+HHdHLnhZXeGqdzPxxNTdKYRopUXY= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.18.0 h1:hSWWvDjXHVLq9DkmB+77fl8v7+t+yYiS+eNkiplDK54= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.18.0/go.mod h1:zG7KQql1WjZCaUJd+L/ReSYx4bjbYJxg5ws9ws+mYes= -go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= -go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= -go.opentelemetry.io/otel/sdk v1.18.0 h1:e3bAB0wB3MljH38sHzpV/qWrOTCFrdZF2ct9F8rBkcY= -go.opentelemetry.io/otel/sdk v1.18.0/go.mod h1:1RCygWV7plY2KmdskZEDDBs4tJeHG92MdHZIluiYs/M= -go.opentelemetry.io/otel/sdk/metric v0.41.0 h1:c3sAt9/pQ5fSIUfl0gPtClV3HhE18DCVzByD33R/zsk= -go.opentelemetry.io/otel/sdk/metric v0.41.0/go.mod h1:PmOmSt+iOklKtIg5O4Vz9H/ttcRFSNTgii+E1KGyn1w= -go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= -go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= -go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= -go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= +go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= +go.opentelemetry.io/contrib/propagators/b3 v1.24.0 h1:n4xwCdTx3pZqZs2CjS/CUZAs03y3dZcGhC/FepKtEUY= +go.opentelemetry.io/contrib/propagators/b3 v1.24.0/go.mod h1:k5wRxKRU2uXx2F8uNJ4TaonuEO/V7/5xoz7kdsDACT8= +go.opentelemetry.io/contrib/zpages v0.49.0 h1:Wk217PkNBxcKWnIQpwtbZZE286K4ZY9uajnM5woSeLU= +go.opentelemetry.io/contrib/zpages v0.49.0/go.mod h1:6alLi5mmkZWbAtZMRPd1ffIgkTcsU9OTHQF2NbSOhrQ= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/bridge/opencensus v1.24.0 h1:Vlhy5ee5k5R0zASpH+9AgHiJH7xnKACI3XopO1tUZfY= +go.opentelemetry.io/otel/bridge/opencensus v1.24.0/go.mod h1:jRjVXV/X38jyrnHtvMGN8+9cejZB21JvXAAvooF2s+Q= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.24.0 h1:f2jriWfOdldanBwS9jNBdeOKAQN7b4ugAMaNu1/1k9g= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.24.0/go.mod h1:B+bcQI1yTY+N0vqMpoZbEN7+XU4tNM0DmUiOwebFJWI= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.24.0 h1:mM8nKi6/iFQ0iqst80wDHU2ge198Ye/TfN0WBS5U24Y= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.24.0/go.mod h1:0PrIIzDteLSmNyxqcGYRL4mDIo8OTuBAOI/Bn1URxac= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 h1:Mw5xcxMwlqoJd97vwPxA8isEaIoxsta9/Q51+TTJLGE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0/go.mod h1:CQNu9bj7o7mC6U7+CA/schKEYakYXWr79ucDHTMGhCM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= +go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.24.0 h1:JYE2HM7pZbOt5Jhk8ndWZTUWYOVift2cHjXVMkPdmdc= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.24.0/go.mod h1:yMb/8c6hVsnma0RpsBMNo0fEiQKeclawtgaIaOp2MLY= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 h1:s0PHtIkN+3xrbDOpt2M8OTG92cWqUESvzh2MxiR5xY8= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0/go.mod h1:hZlFbDbRt++MMPCCfSJfmhkGIWnX1h3XjkfxZUjLrIA= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= +go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/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-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.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/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -527,77 +227,24 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= gonum.org/v1/gonum v0.14.0/go.mod h1:AoWeoz0becf9QMWtE8iWXNXc27fK4fNeHNf/oMejGfU= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 h1:Z0hjGZePRE0ZBWotvtrwxFNrNE9CUAGtplaDK5NNI/g= -google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 h1:FmF5cCW94Ij59cfpoLiwTgodWmm60eEV0CjlsVg2fuw= -google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= -google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -606,37 +253,16 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/service/host.go b/service/host.go index d216ae94adb..870e0bfc446 100644 --- a/service/host.go +++ b/service/host.go @@ -30,13 +30,6 @@ type serviceHost struct { serviceExtensions *extensions.Extensions } -// ReportFatalError is used to report to the host that the receiver encountered -// a fatal error (i.e.: an error that the instance can't recover from) after -// its start function has already returned. -func (host *serviceHost) ReportFatalError(err error) { - host.asyncErrorChannel <- err -} - func (host *serviceHost) GetFactory(kind component.Kind, componentType component.Type) component.Factory { switch kind { case component.KindReceiver: @@ -66,3 +59,10 @@ func (host *serviceHost) GetExtensions() map[component.ID]component.Component { func (host *serviceHost) GetExporters() map[component.DataType]map[component.ID]component.Component { return host.pipelines.GetExporters() } + +func (host *serviceHost) notifyComponentStatusChange(source *component.InstanceID, event *component.StatusEvent) { + host.serviceExtensions.NotifyComponentStatusChange(source, event) + if event.Status() == component.StatusFatalError { + host.asyncErrorChannel <- event.Err() + } +} diff --git a/service/internal/capabilityconsumer/package_test.go b/service/internal/capabilityconsumer/package_test.go new file mode 100644 index 00000000000..3d41da10e31 --- /dev/null +++ b/service/internal/capabilityconsumer/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package capabilityconsumer + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/service/internal/components/components.go b/service/internal/components/components.go deleted file mode 100644 index 5cb52f3e910..00000000000 --- a/service/internal/components/components.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package components // import "go.opentelemetry.io/collector/service/internal/components" - -import ( - "go.uber.org/zap" - - "go.opentelemetry.io/collector/component" -) - -// LogStabilityLevel logs the stability level of a component. The log level is set to info for -// undefined, unmaintained, deprecated and development. The log level is set to debug -// for alpha, beta and stable. -func LogStabilityLevel(logger *zap.Logger, sl component.StabilityLevel) { - if sl >= component.StabilityLevelAlpha { - logger.Debug(sl.LogMessage(), zap.String(zapStabilityKey, sl.String())) - } else { - logger.Info(sl.LogMessage(), zap.String(zapStabilityKey, sl.String())) - } -} diff --git a/service/internal/components/components_test.go b/service/internal/components/components_test.go deleted file mode 100644 index 7fcb98486cb..00000000000 --- a/service/internal/components/components_test.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package components // import "go.opentelemetry.io/collector/service/internal/components" - -import ( - "testing" - - "github.com/stretchr/testify/require" - "go.uber.org/zap" - "go.uber.org/zap/zapcore" - "go.uber.org/zap/zaptest/observer" - - "go.opentelemetry.io/collector/component" -) - -func TestLogStabilityLevel(t *testing.T) { - tests := []struct { - level zapcore.Level - expectedLogs int - }{ - { - level: zapcore.DebugLevel, - expectedLogs: 7, - }, - { - level: zapcore.InfoLevel, - expectedLogs: 4, - }, - } - - for _, tt := range tests { - observed, logs := observer.New(tt.level) - logger := zap.New(observed) - // ensure log levels are set correctly for each stability level - LogStabilityLevel(logger, component.StabilityLevelUndefined) - LogStabilityLevel(logger, component.StabilityLevelUnmaintained) - LogStabilityLevel(logger, component.StabilityLevelDeprecated) - LogStabilityLevel(logger, component.StabilityLevelDevelopment) - LogStabilityLevel(logger, component.StabilityLevelAlpha) - LogStabilityLevel(logger, component.StabilityLevelBeta) - LogStabilityLevel(logger, component.StabilityLevelStable) - require.Equal(t, tt.expectedLogs, logs.Len()) - } -} diff --git a/service/internal/components/host_wrapper.go b/service/internal/components/host_wrapper.go deleted file mode 100644 index 2d386ddad67..00000000000 --- a/service/internal/components/host_wrapper.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package components // import "go.opentelemetry.io/collector/service/internal/components" - -import ( - "net/http" - - "go.uber.org/zap" - - "go.opentelemetry.io/collector/component" -) - -// hostWrapper adds behavior on top of the component.Host being passed when starting the built components. -type hostWrapper struct { - component.Host - *zap.Logger -} - -func NewHostWrapper(host component.Host, logger *zap.Logger) component.Host { - return &hostWrapper{ - host, - logger, - } -} - -func (hw *hostWrapper) ReportFatalError(err error) { - // The logger from the built component already identifies the component. - hw.Logger.Error("Component fatal error", zap.Error(err)) - hw.Host.ReportFatalError(err) -} - -// RegisterZPages is used by zpages extension to register handles from service. -// When the wrapper is passed to the extension it won't be successful when casting -// the interface, for the time being expose the interface here. -// TODO: Find a better way to add the service zpages to the extension. This a temporary fix. -func (hw *hostWrapper) RegisterZPages(mux *http.ServeMux, pathPrefix string) { - if zpagesHost, ok := hw.Host.(interface { - RegisterZPages(mux *http.ServeMux, pathPrefix string) - }); ok { - zpagesHost.RegisterZPages(mux, pathPrefix) - } -} diff --git a/service/internal/components/host_wrapper_test.go b/service/internal/components/host_wrapper_test.go deleted file mode 100644 index 62b7a744681..00000000000 --- a/service/internal/components/host_wrapper_test.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package components - -import ( - "errors" - "testing" - - "go.uber.org/zap" - - "go.opentelemetry.io/collector/component/componenttest" -) - -func Test_newHostWrapper(_ *testing.T) { - hw := NewHostWrapper(componenttest.NewNopHost(), zap.NewNop()) - hw.ReportFatalError(errors.New("test error")) -} diff --git a/service/internal/components/loggers.go b/service/internal/components/loggers.go index 3cb88ae0d44..f4178977b2d 100644 --- a/service/internal/components/loggers.go +++ b/service/internal/components/loggers.go @@ -4,6 +4,8 @@ package components // import "go.opentelemetry.io/collector/service/internal/components" import ( + "strings" + "go.uber.org/zap" "go.opentelemetry.io/collector/component" @@ -11,49 +13,45 @@ import ( const ( zapKindKey = "kind" - zapKindReceiver = "receiver" - zapKindProcessor = "processor" - zapKindExporter = "exporter" - zapKindExtension = "extension" - zapKindPipeline = "pipeline" zapNameKey = "name" zapDataTypeKey = "data_type" zapStabilityKey = "stability" + zapPipelineKey = "pipeline" zapExporterInPipeline = "exporter_in_pipeline" zapReceiverInPipeline = "receiver_in_pipeline" ) func ReceiverLogger(logger *zap.Logger, id component.ID, dt component.DataType) *zap.Logger { return logger.With( - zap.String(zapKindKey, zapKindReceiver), + zap.String(zapKindKey, strings.ToLower(component.KindReceiver.String())), zap.String(zapNameKey, id.String()), - zap.String(zapDataTypeKey, string(dt))) + zap.String(zapDataTypeKey, dt.String())) } func ProcessorLogger(logger *zap.Logger, id component.ID, pipelineID component.ID) *zap.Logger { return logger.With( - zap.String(zapKindKey, zapKindProcessor), + zap.String(zapKindKey, strings.ToLower(component.KindProcessor.String())), zap.String(zapNameKey, id.String()), - zap.String(zapKindPipeline, pipelineID.String())) + zap.String(zapPipelineKey, pipelineID.String())) } func ExporterLogger(logger *zap.Logger, id component.ID, dt component.DataType) *zap.Logger { return logger.With( - zap.String(zapKindKey, zapKindExporter), - zap.String(zapDataTypeKey, string(dt)), + zap.String(zapKindKey, strings.ToLower(component.KindExporter.String())), + zap.String(zapDataTypeKey, dt.String()), zap.String(zapNameKey, id.String())) } func ExtensionLogger(logger *zap.Logger, id component.ID) *zap.Logger { return logger.With( - zap.String(zapKindKey, zapKindExtension), + zap.String(zapKindKey, strings.ToLower(component.KindExtension.String())), zap.String(zapNameKey, id.String())) } func ConnectorLogger(logger *zap.Logger, id component.ID, expDT, rcvDT component.DataType) *zap.Logger { return logger.With( - zap.String(zapKindKey, zapKindExporter), + zap.String(zapKindKey, strings.ToLower(component.KindConnector.String())), zap.String(zapNameKey, id.String()), - zap.String(zapExporterInPipeline, string(expDT)), - zap.String(zapReceiverInPipeline, string(rcvDT))) + zap.String(zapExporterInPipeline, expDT.String()), + zap.String(zapReceiverInPipeline, rcvDT.String())) } diff --git a/service/internal/components/package_test.go b/service/internal/components/package_test.go new file mode 100644 index 00000000000..30b5a82311a --- /dev/null +++ b/service/internal/components/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package components + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/service/internal/graph/graph.go b/service/internal/graph/graph.go index 5b8a404d66f..04643a37526 100644 --- a/service/internal/graph/graph.go +++ b/service/internal/graph/graph.go @@ -22,12 +22,13 @@ import ( "go.opentelemetry.io/collector/processor" "go.opentelemetry.io/collector/receiver" "go.opentelemetry.io/collector/service/internal/capabilityconsumer" + "go.opentelemetry.io/collector/service/internal/servicetelemetry" "go.opentelemetry.io/collector/service/pipelines" ) // Settings holds configuration for building builtPipelines. type Settings struct { - Telemetry component.TelemetrySettings + Telemetry servicetelemetry.TelemetrySettings BuildInfo component.BuildInfo ReceiverBuilder *receiver.Builder @@ -45,12 +46,19 @@ type Graph struct { // Keep track of how nodes relate to pipelines, so we can declare edges in the graph. pipelines map[component.ID]*pipelineNodes + + // Keep track of status source per node + instanceIDs map[int64]*component.InstanceID + + telemetry servicetelemetry.TelemetrySettings } func Build(ctx context.Context, set Settings) (*Graph, error) { pipelines := &Graph{ componentGraph: simple.NewDirectedGraph(), pipelines: make(map[component.ID]*pipelineNodes, len(set.PipelineConfigs)), + instanceIDs: make(map[int64]*component.InstanceID), + telemetry: set.Telemetry, } for pipelineID := range set.PipelineConfigs { pipelines.pipelines[pipelineID] = &pipelineNodes{ @@ -82,14 +90,15 @@ func (g *Graph) createNodes(set Settings) error { connectorsAsReceiver[recvID] = append(connectorsAsReceiver[recvID], pipelineID) continue } - rcvrNode := g.createReceiver(pipelineID.Type(), recvID) + rcvrNode := g.createReceiver(pipelineID, recvID) pipe.receivers[rcvrNode.ID()] = rcvrNode } pipe.capabilitiesNode = newCapabilitiesNode(pipelineID) for _, procID := range pipelineCfg.Processors { - pipe.processors = append(pipe.processors, g.createProcessor(pipelineID, procID)) + procNode := g.createProcessor(pipelineID, procID) + pipe.processors = append(pipe.processors, procNode) } pipe.fanOutNode = newFanOutNode(pipelineID) @@ -100,7 +109,7 @@ func (g *Graph) createNodes(set Settings) error { connectorsAsExporter[exprID] = append(connectorsAsExporter[exprID], pipelineID) continue } - expNode := g.createExporter(pipelineID.Type(), exprID) + expNode := g.createExporter(pipelineID, exprID) pipe.exporters[expNode.ID()] = expNode } } @@ -156,6 +165,7 @@ func (g *Graph) createNodes(set Settings) error { continue } connNode := g.createConnector(eID, rID, connID) + g.pipelines[eID].exporters[connNode.ID()] = connNode g.pipelines[rID].receivers[connNode.ID()] = connNode } @@ -164,36 +174,70 @@ func (g *Graph) createNodes(set Settings) error { return nil } -func (g *Graph) createReceiver(pipelineType component.DataType, recvID component.ID) *receiverNode { - rcvrNode := newReceiverNode(pipelineType, recvID) +func (g *Graph) createReceiver(pipelineID, recvID component.ID) *receiverNode { + rcvrNode := newReceiverNode(pipelineID.Type(), recvID) if node := g.componentGraph.Node(rcvrNode.ID()); node != nil { + g.instanceIDs[node.ID()].PipelineIDs[pipelineID] = struct{}{} return node.(*receiverNode) } g.componentGraph.AddNode(rcvrNode) + g.instanceIDs[rcvrNode.ID()] = &component.InstanceID{ + ID: recvID, + Kind: component.KindReceiver, + PipelineIDs: map[component.ID]struct{}{ + pipelineID: {}, + }, + } return rcvrNode } func (g *Graph) createProcessor(pipelineID, procID component.ID) *processorNode { procNode := newProcessorNode(pipelineID, procID) g.componentGraph.AddNode(procNode) + g.instanceIDs[procNode.ID()] = &component.InstanceID{ + ID: procID, + Kind: component.KindProcessor, + PipelineIDs: map[component.ID]struct{}{ + pipelineID: {}, + }, + } return procNode } -func (g *Graph) createExporter(pipelineType component.DataType, exprID component.ID) *exporterNode { - expNode := newExporterNode(pipelineType, exprID) +func (g *Graph) createExporter(pipelineID, exprID component.ID) *exporterNode { + expNode := newExporterNode(pipelineID.Type(), exprID) if node := g.componentGraph.Node(expNode.ID()); node != nil { + g.instanceIDs[expNode.ID()].PipelineIDs[pipelineID] = struct{}{} return node.(*exporterNode) } g.componentGraph.AddNode(expNode) + g.instanceIDs[expNode.ID()] = &component.InstanceID{ + ID: expNode.componentID, + Kind: component.KindExporter, + PipelineIDs: map[component.ID]struct{}{ + pipelineID: {}, + }, + } return expNode } func (g *Graph) createConnector(exprPipelineID, rcvrPipelineID, connID component.ID) *connectorNode { connNode := newConnectorNode(exprPipelineID.Type(), rcvrPipelineID.Type(), connID) if node := g.componentGraph.Node(connNode.ID()); node != nil { + instanceID := g.instanceIDs[connNode.ID()] + instanceID.PipelineIDs[exprPipelineID] = struct{}{} + instanceID.PipelineIDs[rcvrPipelineID] = struct{}{} return node.(*connectorNode) } g.componentGraph.AddNode(connNode) + g.instanceIDs[connNode.ID()] = &component.InstanceID{ + ID: connNode.componentID, + Kind: component.KindConnector, + PipelineIDs: map[component.ID]struct{}{ + exprPipelineID: {}, + rcvrPipelineID: {}, + }, + } return connNode } @@ -227,17 +271,27 @@ func (g *Graph) buildComponents(ctx context.Context, set Settings) error { for i := len(nodes) - 1; i >= 0; i-- { node := nodes[i] + + // skipped for capabilitiesNodes and fanoutNodes as they are not assigned componentIDs. + var telemetrySettings component.TelemetrySettings + if instanceID, ok := g.instanceIDs[node.ID()]; ok { + telemetrySettings = set.Telemetry.ToComponentTelemetrySettings(instanceID) + } + switch n := node.(type) { case *receiverNode: - err = n.buildComponent(ctx, set.Telemetry, set.BuildInfo, set.ReceiverBuilder, g.nextConsumers(n.ID())) + err = n.buildComponent(ctx, telemetrySettings, set.BuildInfo, set.ReceiverBuilder, g.nextConsumers(n.ID())) case *processorNode: - err = n.buildComponent(ctx, set.Telemetry, set.BuildInfo, set.ProcessorBuilder, g.nextConsumers(n.ID())[0]) + err = n.buildComponent(ctx, telemetrySettings, set.BuildInfo, set.ProcessorBuilder, g.nextConsumers(n.ID())[0]) case *exporterNode: - err = n.buildComponent(ctx, set.Telemetry, set.BuildInfo, set.ExporterBuilder) + err = n.buildComponent(ctx, telemetrySettings, set.BuildInfo, set.ExporterBuilder) case *connectorNode: - err = n.buildComponent(ctx, set.Telemetry, set.BuildInfo, set.ConnectorBuilder, g.nextConsumers(n.ID())) + err = n.buildComponent(ctx, telemetrySettings, set.BuildInfo, set.ConnectorBuilder, g.nextConsumers(n.ID())) case *capabilitiesNode: - capability := consumer.Capabilities{MutatesData: false} + capability := consumer.Capabilities{ + // The fanOutNode represents the aggregate capabilities of the exporters in the pipeline. + MutatesData: g.pipelines[n.pipelineID].fanOutNode.getConsumer().Capabilities().MutatesData, + } for _, proc := range g.pipelines[n.pipelineID].processors { capability.MutatesData = capability.MutatesData || proc.getConsumer().Capabilities().MutatesData } @@ -268,7 +322,6 @@ func (g *Graph) buildComponents(ctx context.Context, set Settings) error { case component.DataTypeMetrics: consumers := make([]consumer.Metrics, 0, len(nexts)) for _, next := range nexts { - consumers = append(consumers, next.(consumer.Metrics)) } n.baseConsumer = fanoutconsumer.NewMetrics(consumers) @@ -326,14 +379,29 @@ func (g *Graph) StartAll(ctx context.Context, host component.Host) error { // are started before upstream components. This ensures that each // component's consumer is ready to consume. for i := len(nodes) - 1; i >= 0; i-- { - comp, ok := nodes[i].(component.Component) + node := nodes[i] + comp, ok := node.(component.Component) + if !ok { // Skip capabilities/fanout nodes continue } + + instanceID := g.instanceIDs[node.ID()] + g.telemetry.Status.ReportStatus( + instanceID, + component.NewStatusEvent(component.StatusStarting), + ) + if compErr := comp.Start(ctx, host); compErr != nil { + g.telemetry.Status.ReportStatus( + instanceID, + component.NewPermanentErrorEvent(compErr), + ) return compErr } + + g.telemetry.Status.ReportOKIfStarting(instanceID) } return nil } @@ -350,12 +418,33 @@ func (g *Graph) ShutdownAll(ctx context.Context) error { // before the consumer is stopped. var errs error for i := 0; i < len(nodes); i++ { - comp, ok := nodes[i].(component.Component) + node := nodes[i] + comp, ok := node.(component.Component) + if !ok { // Skip capabilities/fanout nodes continue } - errs = multierr.Append(errs, comp.Shutdown(ctx)) + + instanceID := g.instanceIDs[node.ID()] + g.telemetry.Status.ReportStatus( + instanceID, + component.NewStatusEvent(component.StatusStopping), + ) + + if compErr := comp.Shutdown(ctx); compErr != nil { + errs = multierr.Append(errs, compErr) + g.telemetry.Status.ReportStatus( + instanceID, + component.NewPermanentErrorEvent(compErr), + ) + continue + } + + g.telemetry.Status.ReportStatus( + instanceID, + component.NewStatusEvent(component.StatusStopped), + ) } return errs } diff --git a/service/internal/graph/graph_test.go b/service/internal/graph/graph_test.go index 1279ff145d5..9ae936b5d05 100644 --- a/service/internal/graph/graph_test.go +++ b/service/internal/graph/graph_test.go @@ -7,6 +7,7 @@ import ( "context" "errors" "fmt" + "strings" "sync" "testing" @@ -27,6 +28,8 @@ import ( "go.opentelemetry.io/collector/processor/processortest" "go.opentelemetry.io/collector/receiver" "go.opentelemetry.io/collector/receiver/receivertest" + "go.opentelemetry.io/collector/service/internal/servicetelemetry" + "go.opentelemetry.io/collector/service/internal/status" "go.opentelemetry.io/collector/service/internal/testcomponents" "go.opentelemetry.io/collector/service/pipelines" ) @@ -87,48 +90,48 @@ func TestGraphStartStop(t *testing.T) { { name: "single", edges: [][2]component.ID{ - {component.NewIDWithName("r", "1"), component.NewIDWithName("p", "1")}, - {component.NewIDWithName("r", "2"), component.NewIDWithName("p", "1")}, - {component.NewIDWithName("p", "1"), component.NewIDWithName("p", "2")}, - {component.NewIDWithName("p", "2"), component.NewIDWithName("e", "1")}, - {component.NewIDWithName("p", "1"), component.NewIDWithName("e", "2")}, + {component.MustNewIDWithName("r", "1"), component.MustNewIDWithName("p", "1")}, + {component.MustNewIDWithName("r", "2"), component.MustNewIDWithName("p", "1")}, + {component.MustNewIDWithName("p", "1"), component.MustNewIDWithName("p", "2")}, + {component.MustNewIDWithName("p", "2"), component.MustNewIDWithName("e", "1")}, + {component.MustNewIDWithName("p", "1"), component.MustNewIDWithName("e", "2")}, }, }, { name: "multi", edges: [][2]component.ID{ // Pipeline 1 - {component.NewIDWithName("r", "1"), component.NewIDWithName("p", "1")}, - {component.NewIDWithName("r", "2"), component.NewIDWithName("p", "1")}, - {component.NewIDWithName("p", "1"), component.NewIDWithName("p", "2")}, - {component.NewIDWithName("p", "2"), component.NewIDWithName("e", "1")}, - {component.NewIDWithName("p", "1"), component.NewIDWithName("e", "2")}, + {component.MustNewIDWithName("r", "1"), component.MustNewIDWithName("p", "1")}, + {component.MustNewIDWithName("r", "2"), component.MustNewIDWithName("p", "1")}, + {component.MustNewIDWithName("p", "1"), component.MustNewIDWithName("p", "2")}, + {component.MustNewIDWithName("p", "2"), component.MustNewIDWithName("e", "1")}, + {component.MustNewIDWithName("p", "1"), component.MustNewIDWithName("e", "2")}, // Pipeline 2, shares r1 and e2 - {component.NewIDWithName("r", "1"), component.NewIDWithName("p", "3")}, - {component.NewIDWithName("p", "3"), component.NewIDWithName("e", "2")}, + {component.MustNewIDWithName("r", "1"), component.MustNewIDWithName("p", "3")}, + {component.MustNewIDWithName("p", "3"), component.MustNewIDWithName("e", "2")}, }, }, { name: "connected", edges: [][2]component.ID{ // Pipeline 1 - {component.NewIDWithName("r", "1"), component.NewIDWithName("p", "1")}, - {component.NewIDWithName("r", "2"), component.NewIDWithName("p", "1")}, - {component.NewIDWithName("p", "1"), component.NewIDWithName("p", "2")}, - {component.NewIDWithName("p", "2"), component.NewIDWithName("e", "1")}, - {component.NewIDWithName("p", "1"), component.NewIDWithName("c", "1")}, + {component.MustNewIDWithName("r", "1"), component.MustNewIDWithName("p", "1")}, + {component.MustNewIDWithName("r", "2"), component.MustNewIDWithName("p", "1")}, + {component.MustNewIDWithName("p", "1"), component.MustNewIDWithName("p", "2")}, + {component.MustNewIDWithName("p", "2"), component.MustNewIDWithName("e", "1")}, + {component.MustNewIDWithName("p", "1"), component.MustNewIDWithName("c", "1")}, // Pipeline 2, shares r1 and c1 - {component.NewIDWithName("r", "1"), component.NewIDWithName("p", "3")}, - {component.NewIDWithName("p", "3"), component.NewIDWithName("c", "1")}, + {component.MustNewIDWithName("r", "1"), component.MustNewIDWithName("p", "3")}, + {component.MustNewIDWithName("p", "3"), component.MustNewIDWithName("c", "1")}, // Pipeline 3, emits to e2 and c2 - {component.NewIDWithName("c", "1"), component.NewIDWithName("e", "2")}, - {component.NewIDWithName("c", "1"), component.NewIDWithName("c", "2")}, + {component.MustNewIDWithName("c", "1"), component.MustNewIDWithName("e", "2")}, + {component.MustNewIDWithName("c", "1"), component.MustNewIDWithName("c", "2")}, // Pipeline 4, also emits to e2 - {component.NewIDWithName("c", "2"), component.NewIDWithName("e", "2")}, + {component.MustNewIDWithName("c", "2"), component.MustNewIDWithName("e", "2")}, }, }, } @@ -141,8 +144,13 @@ func TestGraphStartStop(t *testing.T) { } pg := &Graph{componentGraph: simple.NewDirectedGraph()} + pg.telemetry = servicetelemetry.NewNopTelemetrySettings() + pg.instanceIDs = make(map[int64]*component.InstanceID) + for _, edge := range tt.edges { f, t := &testNode{id: edge[0]}, &testNode{id: edge[1]} + pg.instanceIDs[f.ID()] = &component.InstanceID{} + pg.instanceIDs[t.ID()] = &component.InstanceID{} pg.componentGraph.SetEdge(simple.Edge{F: f, T: t}) } @@ -163,10 +171,17 @@ func TestGraphStartStop(t *testing.T) { func TestGraphStartStopCycle(t *testing.T) { pg := &Graph{componentGraph: simple.NewDirectedGraph()} - r1 := &testNode{id: component.NewIDWithName("r", "1")} - p1 := &testNode{id: component.NewIDWithName("p", "1")} - c1 := &testNode{id: component.NewIDWithName("c", "1")} - e1 := &testNode{id: component.NewIDWithName("e", "1")} + r1 := &testNode{id: component.MustNewIDWithName("r", "1")} + p1 := &testNode{id: component.MustNewIDWithName("p", "1")} + c1 := &testNode{id: component.MustNewIDWithName("c", "1")} + e1 := &testNode{id: component.MustNewIDWithName("e", "1")} + + pg.instanceIDs = map[int64]*component.InstanceID{ + r1.ID(): {}, + p1.ID(): {}, + c1.ID(): {}, + e1.ID(): {}, + } pg.componentGraph.SetEdge(simple.Edge{F: r1, T: p1}) pg.componentGraph.SetEdge(simple.Edge{F: p1, T: c1}) @@ -184,15 +199,22 @@ func TestGraphStartStopCycle(t *testing.T) { func TestGraphStartStopComponentError(t *testing.T) { pg := &Graph{componentGraph: simple.NewDirectedGraph()} + pg.telemetry = servicetelemetry.NewNopTelemetrySettings() + r1 := &testNode{ + id: component.MustNewIDWithName("r", "1"), + startErr: errors.New("foo"), + } + e1 := &testNode{ + id: component.MustNewIDWithName("e", "1"), + shutdownErr: errors.New("bar"), + } + pg.instanceIDs = map[int64]*component.InstanceID{ + r1.ID(): {}, + e1.ID(): {}, + } pg.componentGraph.SetEdge(simple.Edge{ - F: &testNode{ - id: component.NewIDWithName("r", "1"), - startErr: errors.New("foo"), - }, - T: &testNode{ - id: component.NewIDWithName("e", "1"), - shutdownErr: errors.New("bar"), - }, + F: r1, + T: e1, }) assert.EqualError(t, pg.StartAll(context.Background(), componenttest.NewNopHost()), "foo") assert.EqualError(t, pg.ShutdownAll(context.Background()), "bar") @@ -207,20 +229,20 @@ func TestConnectorPipelinesGraph(t *testing.T) { { name: "pipelines_simple.yaml", pipelineConfigs: pipelines.Config{ - component.NewID("traces"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Processors: []component.ID{component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewID("traces"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, - component.NewID("metrics"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Processors: []component.ID{component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewID("metrics"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, - component.NewID("logs"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Processors: []component.ID{component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewID("logs"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, }, expectedPerExporter: 1, @@ -228,20 +250,20 @@ func TestConnectorPipelinesGraph(t *testing.T) { { name: "pipelines_simple_mutate.yaml", pipelineConfigs: pipelines.Config{ - component.NewID("traces"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Processors: []component.ID{component.NewIDWithName("exampleprocessor", "mutate")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewID("traces"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewIDWithName("exampleprocessor", "mutate")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, - component.NewID("metrics"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Processors: []component.ID{component.NewIDWithName("exampleprocessor", "mutate")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewID("metrics"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewIDWithName("exampleprocessor", "mutate")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, - component.NewID("logs"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Processors: []component.ID{component.NewIDWithName("exampleprocessor", "mutate")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewID("logs"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewIDWithName("exampleprocessor", "mutate")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, }, expectedPerExporter: 1, @@ -249,20 +271,20 @@ func TestConnectorPipelinesGraph(t *testing.T) { { name: "pipelines_simple_multi_proc.yaml", pipelineConfigs: pipelines.Config{ - component.NewID("traces"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Processors: []component.ID{component.NewID("exampleprocessor"), component.NewIDWithName("exampleprocessor", "mutate")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewID("traces"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewID("exampleprocessor"), component.MustNewIDWithName("exampleprocessor", "mutate")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, - component.NewID("metrics"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Processors: []component.ID{component.NewID("exampleprocessor"), component.NewIDWithName("exampleprocessor", "mutate")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewID("metrics"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewID("exampleprocessor"), component.MustNewIDWithName("exampleprocessor", "mutate")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, - component.NewID("logs"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Processors: []component.ID{component.NewID("exampleprocessor"), component.NewIDWithName("exampleprocessor", "mutate")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewID("logs"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewID("exampleprocessor"), component.MustNewIDWithName("exampleprocessor", "mutate")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, }, expectedPerExporter: 1, @@ -270,17 +292,17 @@ func TestConnectorPipelinesGraph(t *testing.T) { { name: "pipelines_simple_no_proc.yaml", pipelineConfigs: pipelines.Config{ - component.NewID("traces"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewID("traces"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, - component.NewID("metrics"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewID("metrics"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, - component.NewID("logs"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewID("logs"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, }, expectedPerExporter: 1, @@ -288,20 +310,20 @@ func TestConnectorPipelinesGraph(t *testing.T) { { name: "pipelines_multi.yaml", pipelineConfigs: pipelines.Config{ - component.NewID("traces"): { - Receivers: []component.ID{component.NewID("examplereceiver"), component.NewIDWithName("examplereceiver", "1")}, - Processors: []component.ID{component.NewIDWithName("exampleprocessor", "mutate"), component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewID("exampleexporter"), component.NewIDWithName("exampleexporter", "1")}, + component.MustNewID("traces"): { + Receivers: []component.ID{component.MustNewID("examplereceiver"), component.MustNewIDWithName("examplereceiver", "1")}, + Processors: []component.ID{component.MustNewIDWithName("exampleprocessor", "mutate"), component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleexporter"), component.MustNewIDWithName("exampleexporter", "1")}, }, - component.NewID("metrics"): { - Receivers: []component.ID{component.NewID("examplereceiver"), component.NewIDWithName("examplereceiver", "1")}, - Processors: []component.ID{component.NewIDWithName("exampleprocessor", "mutate"), component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewID("exampleexporter"), component.NewIDWithName("exampleexporter", "1")}, + component.MustNewID("metrics"): { + Receivers: []component.ID{component.MustNewID("examplereceiver"), component.MustNewIDWithName("examplereceiver", "1")}, + Processors: []component.ID{component.MustNewIDWithName("exampleprocessor", "mutate"), component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleexporter"), component.MustNewIDWithName("exampleexporter", "1")}, }, - component.NewID("logs"): { - Receivers: []component.ID{component.NewID("examplereceiver"), component.NewIDWithName("examplereceiver", "1")}, - Processors: []component.ID{component.NewIDWithName("exampleprocessor", "mutate"), component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewID("exampleexporter"), component.NewIDWithName("exampleexporter", "1")}, + component.MustNewID("logs"): { + Receivers: []component.ID{component.MustNewID("examplereceiver"), component.MustNewIDWithName("examplereceiver", "1")}, + Processors: []component.ID{component.MustNewIDWithName("exampleprocessor", "mutate"), component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleexporter"), component.MustNewIDWithName("exampleexporter", "1")}, }, }, expectedPerExporter: 2, @@ -309,17 +331,17 @@ func TestConnectorPipelinesGraph(t *testing.T) { { name: "pipelines_multi_no_proc.yaml", pipelineConfigs: pipelines.Config{ - component.NewID("traces"): { - Receivers: []component.ID{component.NewID("examplereceiver"), component.NewIDWithName("examplereceiver", "1")}, - Exporters: []component.ID{component.NewID("exampleexporter"), component.NewIDWithName("exampleexporter", "1")}, + component.MustNewID("traces"): { + Receivers: []component.ID{component.MustNewID("examplereceiver"), component.MustNewIDWithName("examplereceiver", "1")}, + Exporters: []component.ID{component.MustNewID("exampleexporter"), component.MustNewIDWithName("exampleexporter", "1")}, }, - component.NewID("metrics"): { - Receivers: []component.ID{component.NewID("examplereceiver"), component.NewIDWithName("examplereceiver", "1")}, - Exporters: []component.ID{component.NewID("exampleexporter"), component.NewIDWithName("exampleexporter", "1")}, + component.MustNewID("metrics"): { + Receivers: []component.ID{component.MustNewID("examplereceiver"), component.MustNewIDWithName("examplereceiver", "1")}, + Exporters: []component.ID{component.MustNewID("exampleexporter"), component.MustNewIDWithName("exampleexporter", "1")}, }, - component.NewID("logs"): { - Receivers: []component.ID{component.NewID("examplereceiver"), component.NewIDWithName("examplereceiver", "1")}, - Exporters: []component.ID{component.NewID("exampleexporter"), component.NewIDWithName("exampleexporter", "1")}, + component.MustNewID("logs"): { + Receivers: []component.ID{component.MustNewID("examplereceiver"), component.MustNewIDWithName("examplereceiver", "1")}, + Exporters: []component.ID{component.MustNewID("exampleexporter"), component.MustNewIDWithName("exampleexporter", "1")}, }, }, expectedPerExporter: 2, @@ -327,32 +349,32 @@ func TestConnectorPipelinesGraph(t *testing.T) { { name: "multi_pipeline_receivers_and_exporters.yaml", pipelineConfigs: pipelines.Config{ - component.NewID("traces"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Processors: []component.ID{component.NewIDWithName("exampleprocessor", "mutate")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewID("traces"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewIDWithName("exampleprocessor", "mutate")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, - component.NewIDWithName("traces", "1"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewIDWithName("traces", "1"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, - component.NewID("metrics"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Processors: []component.ID{component.NewIDWithName("exampleprocessor", "mutate")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewID("metrics"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewIDWithName("exampleprocessor", "mutate")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, - component.NewIDWithName("metrics", "1"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewIDWithName("metrics", "1"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, - component.NewID("logs"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Processors: []component.ID{component.NewIDWithName("exampleprocessor", "mutate")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewID("logs"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewIDWithName("exampleprocessor", "mutate")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, - component.NewIDWithName("logs", "1"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewIDWithName("logs", "1"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, }, expectedPerExporter: 2, @@ -360,15 +382,15 @@ func TestConnectorPipelinesGraph(t *testing.T) { { name: "pipelines_conn_simple_traces.yaml", pipelineConfigs: pipelines.Config{ - component.NewIDWithName("traces", "in"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Processors: []component.ID{component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewID("exampleconnector")}, // wrapped w/ mutates: true + component.MustNewIDWithName("traces", "in"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, }, - component.NewIDWithName("traces", "out"): { - Receivers: []component.ID{component.NewID("exampleconnector")}, - Processors: []component.ID{component.NewIDWithName("exampleprocessor", "mutate")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewIDWithName("traces", "out"): { + Receivers: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, + Processors: []component.ID{component.MustNewIDWithName("exampleprocessor", "mutate")}, // mutate propagates upstream to connector + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, }, expectedPerExporter: 1, @@ -376,15 +398,15 @@ func TestConnectorPipelinesGraph(t *testing.T) { { name: "pipelines_conn_simple_metrics.yaml", pipelineConfigs: pipelines.Config{ - component.NewIDWithName("metrics", "in"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Processors: []component.ID{component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewID("exampleconnector")}, // wrapped w/ mutates: true + component.MustNewIDWithName("metrics", "in"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, }, - component.NewIDWithName("metrics", "out"): { - Receivers: []component.ID{component.NewID("exampleconnector")}, - Processors: []component.ID{component.NewIDWithName("exampleprocessor", "mutate")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewIDWithName("metrics", "out"): { + Receivers: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, + Processors: []component.ID{component.MustNewIDWithName("exampleprocessor", "mutate")}, // mutate propagates upstream to connector + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, }, expectedPerExporter: 1, @@ -392,15 +414,15 @@ func TestConnectorPipelinesGraph(t *testing.T) { { name: "pipelines_conn_simple_logs.yaml", pipelineConfigs: pipelines.Config{ - component.NewIDWithName("logs", "in"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Processors: []component.ID{component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewID("exampleconnector")}, // wrapped w/ mutates: true + component.MustNewIDWithName("logs", "in"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, }, - component.NewIDWithName("logs", "out"): { - Receivers: []component.ID{component.NewID("exampleconnector")}, - Processors: []component.ID{component.NewIDWithName("exampleprocessor", "mutate")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewIDWithName("logs", "out"): { + Receivers: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, + Processors: []component.ID{component.MustNewIDWithName("exampleprocessor", "mutate")}, // mutate propagates upstream to connector + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, }, expectedPerExporter: 1, @@ -408,25 +430,25 @@ func TestConnectorPipelinesGraph(t *testing.T) { { name: "pipelines_conn_fork_merge_traces.yaml", pipelineConfigs: pipelines.Config{ - component.NewIDWithName("traces", "in"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Processors: []component.ID{component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewIDWithName("exampleconnector", "fork")}, // wrapped w/ mutates: true + component.MustNewIDWithName("traces", "in"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, }, - component.NewIDWithName("traces", "type0"): { - Receivers: []component.ID{component.NewIDWithName("exampleconnector", "fork")}, - Processors: []component.ID{component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewIDWithName("exampleconnector", "merge")}, + component.MustNewIDWithName("traces", "type0"): { + Receivers: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewIDWithName("exampleconnector", "merge")}, }, - component.NewIDWithName("traces", "type1"): { - Receivers: []component.ID{component.NewIDWithName("exampleconnector", "fork")}, - Processors: []component.ID{component.NewIDWithName("exampleprocessor", "mutate")}, - Exporters: []component.ID{component.NewIDWithName("exampleconnector", "merge")}, + component.MustNewIDWithName("traces", "type1"): { + Receivers: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, + Processors: []component.ID{component.MustNewIDWithName("exampleprocessor", "mutate")}, // mutate propagates upstream to connector + Exporters: []component.ID{component.MustNewIDWithName("exampleconnector", "merge")}, }, - component.NewIDWithName("traces", "out"): { - Receivers: []component.ID{component.NewIDWithName("exampleconnector", "merge")}, - Processors: []component.ID{component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewIDWithName("traces", "out"): { + Receivers: []component.ID{component.MustNewIDWithName("exampleconnector", "merge")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, }, expectedPerExporter: 2, @@ -434,25 +456,25 @@ func TestConnectorPipelinesGraph(t *testing.T) { { name: "pipelines_conn_fork_merge_metrics.yaml", pipelineConfigs: pipelines.Config{ - component.NewIDWithName("metrics", "in"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Processors: []component.ID{component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewIDWithName("exampleconnector", "fork")}, // wrapped w/ mutates: true + component.MustNewIDWithName("metrics", "in"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, }, - component.NewIDWithName("metrics", "type0"): { - Receivers: []component.ID{component.NewIDWithName("exampleconnector", "fork")}, - Processors: []component.ID{component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewIDWithName("exampleconnector", "merge")}, + component.MustNewIDWithName("metrics", "type0"): { + Receivers: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewIDWithName("exampleconnector", "merge")}, }, - component.NewIDWithName("metrics", "type1"): { - Receivers: []component.ID{component.NewIDWithName("exampleconnector", "fork")}, - Processors: []component.ID{component.NewIDWithName("exampleprocessor", "mutate")}, - Exporters: []component.ID{component.NewIDWithName("exampleconnector", "merge")}, + component.MustNewIDWithName("metrics", "type1"): { + Receivers: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, + Processors: []component.ID{component.MustNewIDWithName("exampleprocessor", "mutate")}, // mutate propagates upstream to connector + Exporters: []component.ID{component.MustNewIDWithName("exampleconnector", "merge")}, }, - component.NewIDWithName("metrics", "out"): { - Receivers: []component.ID{component.NewIDWithName("exampleconnector", "merge")}, - Processors: []component.ID{component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewIDWithName("metrics", "out"): { + Receivers: []component.ID{component.MustNewIDWithName("exampleconnector", "merge")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, }, expectedPerExporter: 2, @@ -460,25 +482,25 @@ func TestConnectorPipelinesGraph(t *testing.T) { { name: "pipelines_conn_fork_merge_logs.yaml", pipelineConfigs: pipelines.Config{ - component.NewIDWithName("logs", "in"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Processors: []component.ID{component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewIDWithName("exampleconnector", "fork")}, // wrapped w/ mutates: true + component.MustNewIDWithName("logs", "in"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, }, - component.NewIDWithName("logs", "type0"): { - Receivers: []component.ID{component.NewIDWithName("exampleconnector", "fork")}, - Processors: []component.ID{component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewIDWithName("exampleconnector", "merge")}, + component.MustNewIDWithName("logs", "type0"): { + Receivers: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewIDWithName("exampleconnector", "merge")}, }, - component.NewIDWithName("logs", "type1"): { - Receivers: []component.ID{component.NewIDWithName("exampleconnector", "fork")}, - Processors: []component.ID{component.NewIDWithName("exampleprocessor", "mutate")}, - Exporters: []component.ID{component.NewIDWithName("exampleconnector", "merge")}, + component.MustNewIDWithName("logs", "type1"): { + Receivers: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, + Processors: []component.ID{component.MustNewIDWithName("exampleprocessor", "mutate")}, // mutate propagates upstream to connector + Exporters: []component.ID{component.MustNewIDWithName("exampleconnector", "merge")}, }, - component.NewIDWithName("logs", "out"): { - Receivers: []component.ID{component.NewIDWithName("exampleconnector", "merge")}, - Processors: []component.ID{component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewIDWithName("logs", "out"): { + Receivers: []component.ID{component.MustNewIDWithName("exampleconnector", "merge")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, }, expectedPerExporter: 2, @@ -486,20 +508,20 @@ func TestConnectorPipelinesGraph(t *testing.T) { { name: "pipelines_conn_translate_from_traces.yaml", pipelineConfigs: pipelines.Config{ - component.NewID("traces"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Processors: []component.ID{component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewID("exampleconnector")}, + component.MustNewID("traces"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleconnector")}, }, - component.NewID("metrics"): { - Receivers: []component.ID{component.NewID("exampleconnector")}, - Processors: []component.ID{component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewID("metrics"): { + Receivers: []component.ID{component.MustNewID("exampleconnector")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, - component.NewID("logs"): { - Receivers: []component.ID{component.NewID("exampleconnector")}, - Processors: []component.ID{component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewID("logs"): { + Receivers: []component.ID{component.MustNewID("exampleconnector")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, }, expectedPerExporter: 1, @@ -507,20 +529,20 @@ func TestConnectorPipelinesGraph(t *testing.T) { { name: "pipelines_conn_translate_from_metrics.yaml", pipelineConfigs: pipelines.Config{ - component.NewID("metrics"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Processors: []component.ID{component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewID("exampleconnector")}, + component.MustNewID("metrics"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleconnector")}, }, - component.NewID("traces"): { - Receivers: []component.ID{component.NewID("exampleconnector")}, - Processors: []component.ID{component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewID("traces"): { + Receivers: []component.ID{component.MustNewID("exampleconnector")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, - component.NewID("logs"): { - Receivers: []component.ID{component.NewID("exampleconnector")}, - Processors: []component.ID{component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewID("logs"): { + Receivers: []component.ID{component.MustNewID("exampleconnector")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, }, expectedPerExporter: 1, @@ -528,20 +550,20 @@ func TestConnectorPipelinesGraph(t *testing.T) { { name: "pipelines_conn_translate_from_logs.yaml", pipelineConfigs: pipelines.Config{ - component.NewID("logs"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Processors: []component.ID{component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewID("exampleconnector")}, + component.MustNewID("logs"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleconnector")}, }, - component.NewID("traces"): { - Receivers: []component.ID{component.NewID("exampleconnector")}, - Processors: []component.ID{component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewID("traces"): { + Receivers: []component.ID{component.MustNewID("exampleconnector")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, - component.NewID("metrics"): { - Receivers: []component.ID{component.NewID("exampleconnector")}, - Processors: []component.ID{component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewID("metrics"): { + Receivers: []component.ID{component.MustNewID("exampleconnector")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, }, expectedPerExporter: 1, @@ -549,35 +571,35 @@ func TestConnectorPipelinesGraph(t *testing.T) { { name: "pipelines_conn_matrix.yaml", pipelineConfigs: pipelines.Config{ - component.NewIDWithName("traces", "in"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Processors: []component.ID{component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewID("exampleconnector")}, // wrapped w/ mutates: true + component.MustNewIDWithName("traces", "in"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewIDWithName("exampleprocessor", "mutate")}, + Exporters: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, }, - component.NewIDWithName("metrics", "in"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Processors: []component.ID{component.NewIDWithName("exampleprocessor", "mutate")}, - Exporters: []component.ID{component.NewID("exampleconnector")}, + component.MustNewIDWithName("metrics", "in"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewIDWithName("exampleprocessor", "mutate")}, + Exporters: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, }, - component.NewIDWithName("logs", "in"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Processors: []component.ID{component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewID("exampleconnector")}, // wrapped w/ mutates: true + component.MustNewIDWithName("logs", "in"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewIDWithName("exampleprocessor", "mutate")}, + Exporters: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, }, - component.NewIDWithName("traces", "out"): { - Receivers: []component.ID{component.NewID("exampleconnector")}, - Processors: []component.ID{component.NewIDWithName("exampleprocessor", "mutate")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewIDWithName("traces", "out"): { + Receivers: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, + Processors: []component.ID{component.MustNewIDWithName("exampleprocessor", "mutate")}, // mutate propagates upstream to connector + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, - component.NewIDWithName("metrics", "out"): { - Receivers: []component.ID{component.NewID("exampleconnector")}, - Processors: []component.ID{component.NewID("exampleprocessor")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewIDWithName("metrics", "out"): { + Receivers: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, + Processors: []component.ID{component.MustNewIDWithName("exampleprocessor", "mutate")}, // mutate propagates upstream to connector + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, - component.NewIDWithName("logs", "out"): { - Receivers: []component.ID{component.NewID("exampleconnector")}, - Processors: []component.ID{component.NewIDWithName("exampleprocessor", "mutate")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewIDWithName("logs", "out"): { + Receivers: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, + Processors: []component.ID{component.MustNewIDWithName("exampleprocessor", "mutate")}, // mutate propagates upstream to connector + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, }, expectedPerExporter: 3, @@ -585,45 +607,123 @@ func TestConnectorPipelinesGraph(t *testing.T) { { name: "pipelines_conn_lanes.yaml", pipelineConfigs: pipelines.Config{ - component.NewIDWithName("traces", "in"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Exporters: []component.ID{component.NewID("mockforward")}, + component.MustNewIDWithName("traces", "in"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Exporters: []component.ID{component.MustNewID("mockforward")}, }, - component.NewIDWithName("traces", "out"): { - Receivers: []component.ID{component.NewID("mockforward")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewIDWithName("traces", "out"): { + Receivers: []component.ID{component.MustNewID("mockforward")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, - component.NewIDWithName("metrics", "in"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Exporters: []component.ID{component.NewID("mockforward")}, + component.MustNewIDWithName("metrics", "in"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Exporters: []component.ID{component.MustNewID("mockforward")}, }, - component.NewIDWithName("metrics", "out"): { - Receivers: []component.ID{component.NewID("mockforward")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewIDWithName("metrics", "out"): { + Receivers: []component.ID{component.MustNewID("mockforward")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, - component.NewIDWithName("logs", "in"): { - Receivers: []component.ID{component.NewID("examplereceiver")}, - Exporters: []component.ID{component.NewID("mockforward")}, + component.MustNewIDWithName("logs", "in"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Exporters: []component.ID{component.MustNewID("mockforward")}, }, - component.NewIDWithName("logs", "out"): { - Receivers: []component.ID{component.NewID("mockforward")}, - Exporters: []component.ID{component.NewID("exampleexporter")}, + component.MustNewIDWithName("logs", "out"): { + Receivers: []component.ID{component.MustNewID("mockforward")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, }, }, expectedPerExporter: 1, }, + { + name: "pipelines_conn_mutate_traces.yaml", + pipelineConfigs: pipelines.Config{ + component.MustNewIDWithName("traces", "in"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, + }, + component.MustNewIDWithName("traces", "out0"): { + Receivers: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, + }, + component.MustNewIDWithName("traces", "middle"): { + Receivers: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewIDWithName("exampleconnector", "mutate")}, + }, + component.MustNewIDWithName("traces", "out1"): { + Receivers: []component.ID{component.MustNewIDWithName("exampleconnector", "mutate")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, + }, + }, + expectedPerExporter: 2, + }, + { + name: "pipelines_conn_mutate_metrics.yaml", + pipelineConfigs: pipelines.Config{ + component.MustNewIDWithName("metrics", "in"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, + }, + component.MustNewIDWithName("metrics", "out0"): { + Receivers: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, + }, + component.MustNewIDWithName("metrics", "middle"): { + Receivers: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewIDWithName("exampleconnector", "mutate")}, + }, + component.MustNewIDWithName("metrics", "out1"): { + Receivers: []component.ID{component.MustNewIDWithName("exampleconnector", "mutate")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, + }, + }, + expectedPerExporter: 2, + }, + { + name: "pipelines_conn_mutate_logs.yaml", + pipelineConfigs: pipelines.Config{ + component.MustNewIDWithName("logs", "in"): { + Receivers: []component.ID{component.MustNewID("examplereceiver")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, + }, + component.MustNewIDWithName("logs", "out0"): { + Receivers: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, + }, + component.MustNewIDWithName("logs", "middle"): { + Receivers: []component.ID{component.MustNewIDWithName("exampleconnector", "inherit_mutate")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewIDWithName("exampleconnector", "mutate")}, + }, + component.MustNewIDWithName("logs", "out1"): { + Receivers: []component.ID{component.MustNewIDWithName("exampleconnector", "mutate")}, + Processors: []component.ID{component.MustNewID("exampleprocessor")}, + Exporters: []component.ID{component.MustNewID("exampleexporter")}, + }, + }, + expectedPerExporter: 2, + }, } for _, test := range tests { t.Run(test.name, func(t *testing.T) { // Build the pipeline set := Settings{ - Telemetry: componenttest.NewNopTelemetrySettings(), + Telemetry: servicetelemetry.NewNopTelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo(), ReceiverBuilder: receiver.NewBuilder( map[component.ID]component.Config{ - component.NewID("examplereceiver"): testcomponents.ExampleReceiverFactory.CreateDefaultConfig(), - component.NewIDWithName("examplereceiver", "1"): testcomponents.ExampleReceiverFactory.CreateDefaultConfig(), + component.MustNewID("examplereceiver"): testcomponents.ExampleReceiverFactory.CreateDefaultConfig(), + component.MustNewIDWithName("examplereceiver", "1"): testcomponents.ExampleReceiverFactory.CreateDefaultConfig(), }, map[component.Type]receiver.Factory{ testcomponents.ExampleReceiverFactory.Type(): testcomponents.ExampleReceiverFactory, @@ -631,8 +731,8 @@ func TestConnectorPipelinesGraph(t *testing.T) { ), ProcessorBuilder: processor.NewBuilder( map[component.ID]component.Config{ - component.NewID("exampleprocessor"): testcomponents.ExampleProcessorFactory.CreateDefaultConfig(), - component.NewIDWithName("exampleprocessor", "mutate"): testcomponents.ExampleProcessorFactory.CreateDefaultConfig(), + component.MustNewID("exampleprocessor"): testcomponents.ExampleProcessorFactory.CreateDefaultConfig(), + component.MustNewIDWithName("exampleprocessor", "mutate"): testcomponents.ExampleProcessorFactory.CreateDefaultConfig(), }, map[component.Type]processor.Factory{ testcomponents.ExampleProcessorFactory.Type(): testcomponents.ExampleProcessorFactory, @@ -640,8 +740,8 @@ func TestConnectorPipelinesGraph(t *testing.T) { ), ExporterBuilder: exporter.NewBuilder( map[component.ID]component.Config{ - component.NewID("exampleexporter"): testcomponents.ExampleExporterFactory.CreateDefaultConfig(), - component.NewIDWithName("exampleexporter", "1"): testcomponents.ExampleExporterFactory.CreateDefaultConfig(), + component.MustNewID("exampleexporter"): testcomponents.ExampleExporterFactory.CreateDefaultConfig(), + component.MustNewIDWithName("exampleexporter", "1"): testcomponents.ExampleExporterFactory.CreateDefaultConfig(), }, map[component.Type]exporter.Factory{ testcomponents.ExampleExporterFactory.Type(): testcomponents.ExampleExporterFactory, @@ -649,10 +749,11 @@ func TestConnectorPipelinesGraph(t *testing.T) { ), ConnectorBuilder: connector.NewBuilder( map[component.ID]component.Config{ - component.NewID("exampleconnector"): testcomponents.ExampleConnectorFactory.CreateDefaultConfig(), - component.NewIDWithName("exampleconnector", "fork"): testcomponents.ExampleConnectorFactory.CreateDefaultConfig(), - component.NewIDWithName("exampleconnector", "merge"): testcomponents.ExampleConnectorFactory.CreateDefaultConfig(), - component.NewID("mockforward"): testcomponents.MockForwardConnectorFactory.CreateDefaultConfig(), + component.MustNewID("exampleconnector"): testcomponents.ExampleConnectorFactory.CreateDefaultConfig(), + component.MustNewIDWithName("exampleconnector", "merge"): testcomponents.ExampleConnectorFactory.CreateDefaultConfig(), + component.MustNewIDWithName("exampleconnector", "mutate"): testcomponents.ExampleConnectorFactory.CreateDefaultConfig(), + component.MustNewIDWithName("exampleconnector", "inherit_mutate"): testcomponents.ExampleConnectorFactory.CreateDefaultConfig(), + component.MustNewID("mockforward"): testcomponents.MockForwardConnectorFactory.CreateDefaultConfig(), }, map[component.Type]connector.Factory{ testcomponents.ExampleConnectorFactory.Type(): testcomponents.ExampleConnectorFactory, @@ -679,6 +780,11 @@ func TestConnectorPipelinesGraph(t *testing.T) { // Determine independently if the capabilities node should report MutateData as true var expectMutatesData bool + for _, expr := range pipelineCfg.Exporters { + if strings.Contains(expr.Name(), "mutate") { + expectMutatesData = true + } + } for _, proc := range pipelineCfg.Processors { if proc.Name() == "mutate" { expectMutatesData = true @@ -746,6 +852,9 @@ func TestConnectorPipelinesGraph(t *testing.T) { if !ok { continue } + if expConn.getConsumer().Capabilities().MutatesData { + continue + } // find all the pipelines of the same type where this connector is a receiver var inheritMutatesData bool for recPipelineID, recPipeline := range pg.pipelines { @@ -840,22 +949,34 @@ func TestConnectorPipelinesGraph(t *testing.T) { for _, e := range allExporters[component.DataTypeTraces] { tracesExporter := e.(*testcomponents.ExampleExporter) assert.Equal(t, test.expectedPerExporter, len(tracesExporter.Traces)) + expected := testdata.GenerateTraces(1) + if len(allExporters[component.DataTypeTraces]) > 1 { + expected.MarkReadOnly() // multiple read-only exporters should get read-only pdata + } for i := 0; i < test.expectedPerExporter; i++ { - assert.EqualValues(t, testdata.GenerateTraces(1), tracesExporter.Traces[0]) + assert.EqualValues(t, expected, tracesExporter.Traces[0]) } } for _, e := range allExporters[component.DataTypeMetrics] { metricsExporter := e.(*testcomponents.ExampleExporter) assert.Equal(t, test.expectedPerExporter, len(metricsExporter.Metrics)) + expected := testdata.GenerateMetrics(1) + if len(allExporters[component.DataTypeMetrics]) > 1 { + expected.MarkReadOnly() // multiple read-only exporters should get read-only pdata + } for i := 0; i < test.expectedPerExporter; i++ { - assert.EqualValues(t, testdata.GenerateMetrics(1), metricsExporter.Metrics[0]) + assert.EqualValues(t, expected, metricsExporter.Metrics[0]) } } for _, e := range allExporters[component.DataTypeLogs] { logsExporter := e.(*testcomponents.ExampleExporter) assert.Equal(t, test.expectedPerExporter, len(logsExporter.Logs)) + expected := testdata.GenerateLogs(1) + if len(allExporters[component.DataTypeLogs]) > 1 { + expected.MarkReadOnly() // multiple read-only exporters should get read-only pdata + } for i := 0; i < test.expectedPerExporter; i++ { - assert.EqualValues(t, testdata.GenerateLogs(1), logsExporter.Logs[0]) + assert.EqualValues(t, expected, logsExporter.Logs[0]) } } }) @@ -863,28 +984,28 @@ func TestConnectorPipelinesGraph(t *testing.T) { } func TestConnectorRouter(t *testing.T) { - rcvrID := component.NewID("examplereceiver") - routeTracesID := component.NewIDWithName("examplerouter", "traces") - routeMetricsID := component.NewIDWithName("examplerouter", "metrics") - routeLogsID := component.NewIDWithName("examplerouter", "logs") - expRightID := component.NewIDWithName("exampleexporter", "right") - expLeftID := component.NewIDWithName("exampleexporter", "left") + rcvrID := component.MustNewID("examplereceiver") + routeTracesID := component.MustNewIDWithName("examplerouter", "traces") + routeMetricsID := component.MustNewIDWithName("examplerouter", "metrics") + routeLogsID := component.MustNewIDWithName("examplerouter", "logs") + expRightID := component.MustNewIDWithName("exampleexporter", "right") + expLeftID := component.MustNewIDWithName("exampleexporter", "left") - tracesInID := component.NewIDWithName("traces", "in") - tracesRightID := component.NewIDWithName("traces", "right") - tracesLeftID := component.NewIDWithName("traces", "left") + tracesInID := component.MustNewIDWithName("traces", "in") + tracesRightID := component.MustNewIDWithName("traces", "right") + tracesLeftID := component.MustNewIDWithName("traces", "left") - metricsInID := component.NewIDWithName("metrics", "in") - metricsRightID := component.NewIDWithName("metrics", "right") - metricsLeftID := component.NewIDWithName("metrics", "left") + metricsInID := component.MustNewIDWithName("metrics", "in") + metricsRightID := component.MustNewIDWithName("metrics", "right") + metricsLeftID := component.MustNewIDWithName("metrics", "left") - logsInID := component.NewIDWithName("logs", "in") - logsRightID := component.NewIDWithName("logs", "right") - logsLeftID := component.NewIDWithName("logs", "left") + logsInID := component.MustNewIDWithName("logs", "in") + logsRightID := component.MustNewIDWithName("logs", "right") + logsLeftID := component.MustNewIDWithName("logs", "left") ctx := context.Background() set := Settings{ - Telemetry: componenttest.NewNopTelemetrySettings(), + Telemetry: servicetelemetry.NewNopTelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo(), ReceiverBuilder: receiver.NewBuilder( map[component.ID]component.Config{ @@ -1067,15 +1188,15 @@ func TestGraphBuildErrors(t *testing.T) { { name: "not_supported_exporter_logs", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("bf"): badExporterFactory.CreateDefaultConfig(), + component.MustNewID("bf"): badExporterFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewID("logs"): { - Receivers: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("bf")}, + component.MustNewID("logs"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("bf")}, }, }, expected: "failed to create \"bf\" exporter for data type \"logs\": telemetry type is not supported", @@ -1083,15 +1204,15 @@ func TestGraphBuildErrors(t *testing.T) { { name: "not_supported_exporter_metrics", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("bf"): badExporterFactory.CreateDefaultConfig(), + component.MustNewID("bf"): badExporterFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewID("metrics"): { - Receivers: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("bf")}, + component.MustNewID("metrics"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("bf")}, }, }, expected: "failed to create \"bf\" exporter for data type \"metrics\": telemetry type is not supported", @@ -1099,15 +1220,15 @@ func TestGraphBuildErrors(t *testing.T) { { name: "not_supported_exporter_traces", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("bf"): badExporterFactory.CreateDefaultConfig(), + component.MustNewID("bf"): badExporterFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewID("traces"): { - Receivers: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("bf")}, + component.MustNewID("traces"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("bf")}, }, }, expected: "failed to create \"bf\" exporter for data type \"traces\": telemetry type is not supported", @@ -1115,19 +1236,19 @@ func TestGraphBuildErrors(t *testing.T) { { name: "not_supported_processor_logs", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, processorCfgs: map[component.ID]component.Config{ - component.NewID("bf"): badProcessorFactory.CreateDefaultConfig(), + component.MustNewID("bf"): badProcessorFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewID("logs"): { - Receivers: []component.ID{component.NewID("nop")}, - Processors: []component.ID{component.NewID("bf")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewID("logs"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Processors: []component.ID{component.MustNewID("bf")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, }, expected: "failed to create \"bf\" processor, in pipeline \"logs\": telemetry type is not supported", @@ -1135,19 +1256,19 @@ func TestGraphBuildErrors(t *testing.T) { { name: "not_supported_processor_metrics", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, processorCfgs: map[component.ID]component.Config{ - component.NewID("bf"): badProcessorFactory.CreateDefaultConfig(), + component.MustNewID("bf"): badProcessorFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewID("metrics"): { - Receivers: []component.ID{component.NewID("nop")}, - Processors: []component.ID{component.NewID("bf")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewID("metrics"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Processors: []component.ID{component.MustNewID("bf")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, }, expected: "failed to create \"bf\" processor, in pipeline \"metrics\": telemetry type is not supported", @@ -1155,19 +1276,19 @@ func TestGraphBuildErrors(t *testing.T) { { name: "not_supported_processor_traces", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, processorCfgs: map[component.ID]component.Config{ - component.NewID("bf"): badProcessorFactory.CreateDefaultConfig(), + component.MustNewID("bf"): badProcessorFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewID("traces"): { - Receivers: []component.ID{component.NewID("nop")}, - Processors: []component.ID{component.NewID("bf")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewID("traces"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Processors: []component.ID{component.MustNewID("bf")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, }, expected: "failed to create \"bf\" processor, in pipeline \"traces\": telemetry type is not supported", @@ -1175,15 +1296,15 @@ func TestGraphBuildErrors(t *testing.T) { { name: "not_supported_receiver_logs", receiverCfgs: map[component.ID]component.Config{ - component.NewID("bf"): badReceiverFactory.CreateDefaultConfig(), + component.MustNewID("bf"): badReceiverFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewID("logs"): { - Receivers: []component.ID{component.NewID("bf")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewID("logs"): { + Receivers: []component.ID{component.MustNewID("bf")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, }, expected: "failed to create \"bf\" receiver for data type \"logs\": telemetry type is not supported", @@ -1191,15 +1312,15 @@ func TestGraphBuildErrors(t *testing.T) { { name: "not_supported_receiver_metrics", receiverCfgs: map[component.ID]component.Config{ - component.NewID("bf"): badReceiverFactory.CreateDefaultConfig(), + component.MustNewID("bf"): badReceiverFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewID("metrics"): { - Receivers: []component.ID{component.NewID("bf")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewID("metrics"): { + Receivers: []component.ID{component.MustNewID("bf")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, }, expected: "failed to create \"bf\" receiver for data type \"metrics\": telemetry type is not supported", @@ -1207,15 +1328,15 @@ func TestGraphBuildErrors(t *testing.T) { { name: "not_supported_receiver_traces", receiverCfgs: map[component.ID]component.Config{ - component.NewID("bf"): badReceiverFactory.CreateDefaultConfig(), + component.MustNewID("bf"): badReceiverFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewID("traces"): { - Receivers: []component.ID{component.NewID("bf")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewID("traces"): { + Receivers: []component.ID{component.MustNewID("bf")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, }, expected: "failed to create \"bf\" receiver for data type \"traces\": telemetry type is not supported", @@ -1223,22 +1344,22 @@ func TestGraphBuildErrors(t *testing.T) { { name: "not_supported_connector_traces_traces.yaml", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopExporterFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopExporterFactory.CreateDefaultConfig(), }, connectorCfgs: map[component.ID]component.Config{ - component.NewID("bf"): nopConnectorFactory.CreateDefaultConfig(), + component.MustNewID("bf"): nopConnectorFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewIDWithName("traces", "in"): { - Receivers: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("bf")}, + component.MustNewIDWithName("traces", "in"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("bf")}, }, - component.NewIDWithName("traces", "out"): { - Receivers: []component.ID{component.NewID("bf")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewIDWithName("traces", "out"): { + Receivers: []component.ID{component.MustNewID("bf")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, }, expected: "connector \"bf\" used as exporter in traces pipeline but not used in any supported receiver pipeline", @@ -1246,22 +1367,22 @@ func TestGraphBuildErrors(t *testing.T) { { name: "not_supported_connector_traces_metrics.yaml", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopExporterFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopExporterFactory.CreateDefaultConfig(), }, connectorCfgs: map[component.ID]component.Config{ - component.NewID("bf"): nopConnectorFactory.CreateDefaultConfig(), + component.MustNewID("bf"): nopConnectorFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewIDWithName("traces", "in"): { - Receivers: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("bf")}, + component.MustNewIDWithName("traces", "in"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("bf")}, }, - component.NewIDWithName("metrics", "out"): { - Receivers: []component.ID{component.NewID("bf")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewIDWithName("metrics", "out"): { + Receivers: []component.ID{component.MustNewID("bf")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, }, expected: "connector \"bf\" used as exporter in traces pipeline but not used in any supported receiver pipeline", @@ -1269,22 +1390,22 @@ func TestGraphBuildErrors(t *testing.T) { { name: "not_supported_connector_traces_logs.yaml", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopExporterFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopExporterFactory.CreateDefaultConfig(), }, connectorCfgs: map[component.ID]component.Config{ - component.NewID("bf"): nopConnectorFactory.CreateDefaultConfig(), + component.MustNewID("bf"): nopConnectorFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewIDWithName("traces", "in"): { - Receivers: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("bf")}, + component.MustNewIDWithName("traces", "in"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("bf")}, }, - component.NewIDWithName("logs", "out"): { - Receivers: []component.ID{component.NewID("bf")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewIDWithName("logs", "out"): { + Receivers: []component.ID{component.MustNewID("bf")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, }, expected: "connector \"bf\" used as exporter in traces pipeline but not used in any supported receiver pipeline", @@ -1292,22 +1413,22 @@ func TestGraphBuildErrors(t *testing.T) { { name: "not_supported_connector_metrics_traces.yaml", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopExporterFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopExporterFactory.CreateDefaultConfig(), }, connectorCfgs: map[component.ID]component.Config{ - component.NewID("bf"): nopConnectorFactory.CreateDefaultConfig(), + component.MustNewID("bf"): nopConnectorFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewIDWithName("metrics", "in"): { - Receivers: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("bf")}, + component.MustNewIDWithName("metrics", "in"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("bf")}, }, - component.NewIDWithName("traces", "out"): { - Receivers: []component.ID{component.NewID("bf")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewIDWithName("traces", "out"): { + Receivers: []component.ID{component.MustNewID("bf")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, }, expected: "connector \"bf\" used as exporter in metrics pipeline but not used in any supported receiver pipeline", @@ -1315,22 +1436,22 @@ func TestGraphBuildErrors(t *testing.T) { { name: "not_supported_connector_metrics_metrics.yaml", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopExporterFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopExporterFactory.CreateDefaultConfig(), }, connectorCfgs: map[component.ID]component.Config{ - component.NewID("bf"): nopConnectorFactory.CreateDefaultConfig(), + component.MustNewID("bf"): nopConnectorFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewIDWithName("metrics", "in"): { - Receivers: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("bf")}, + component.MustNewIDWithName("metrics", "in"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("bf")}, }, - component.NewIDWithName("metrics", "out"): { - Receivers: []component.ID{component.NewID("bf")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewIDWithName("metrics", "out"): { + Receivers: []component.ID{component.MustNewID("bf")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, }, expected: "connector \"bf\" used as exporter in metrics pipeline but not used in any supported receiver pipeline", @@ -1338,22 +1459,22 @@ func TestGraphBuildErrors(t *testing.T) { { name: "not_supported_connector_metrics_logs.yaml", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopExporterFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopExporterFactory.CreateDefaultConfig(), }, connectorCfgs: map[component.ID]component.Config{ - component.NewID("bf"): nopConnectorFactory.CreateDefaultConfig(), + component.MustNewID("bf"): nopConnectorFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewIDWithName("metrics", "in"): { - Receivers: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("bf")}, + component.MustNewIDWithName("metrics", "in"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("bf")}, }, - component.NewIDWithName("logs", "out"): { - Receivers: []component.ID{component.NewID("bf")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewIDWithName("logs", "out"): { + Receivers: []component.ID{component.MustNewID("bf")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, }, expected: "connector \"bf\" used as exporter in metrics pipeline but not used in any supported receiver pipeline", @@ -1361,22 +1482,22 @@ func TestGraphBuildErrors(t *testing.T) { { name: "not_supported_connector_logs_traces.yaml", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopExporterFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopExporterFactory.CreateDefaultConfig(), }, connectorCfgs: map[component.ID]component.Config{ - component.NewID("bf"): nopConnectorFactory.CreateDefaultConfig(), + component.MustNewID("bf"): nopConnectorFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewIDWithName("logs", "in"): { - Receivers: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("bf")}, + component.MustNewIDWithName("logs", "in"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("bf")}, }, - component.NewIDWithName("traces", "out"): { - Receivers: []component.ID{component.NewID("bf")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewIDWithName("traces", "out"): { + Receivers: []component.ID{component.MustNewID("bf")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, }, expected: "connector \"bf\" used as exporter in logs pipeline but not used in any supported receiver pipeline", @@ -1384,22 +1505,22 @@ func TestGraphBuildErrors(t *testing.T) { { name: "not_supported_connector_logs_metrics.yaml", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopExporterFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopExporterFactory.CreateDefaultConfig(), }, connectorCfgs: map[component.ID]component.Config{ - component.NewID("bf"): nopConnectorFactory.CreateDefaultConfig(), + component.MustNewID("bf"): nopConnectorFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewIDWithName("logs", "in"): { - Receivers: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("bf")}, + component.MustNewIDWithName("logs", "in"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("bf")}, }, - component.NewIDWithName("metrics", "out"): { - Receivers: []component.ID{component.NewID("bf")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewIDWithName("metrics", "out"): { + Receivers: []component.ID{component.MustNewID("bf")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, }, expected: "connector \"bf\" used as exporter in logs pipeline but not used in any supported receiver pipeline", @@ -1407,22 +1528,22 @@ func TestGraphBuildErrors(t *testing.T) { { name: "not_supported_connector_logs_logs.yaml", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopExporterFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopExporterFactory.CreateDefaultConfig(), }, connectorCfgs: map[component.ID]component.Config{ - component.NewID("bf"): nopConnectorFactory.CreateDefaultConfig(), + component.MustNewID("bf"): nopConnectorFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewIDWithName("logs", "in"): { - Receivers: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("bf")}, + component.MustNewIDWithName("logs", "in"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("bf")}, }, - component.NewIDWithName("logs", "out"): { - Receivers: []component.ID{component.NewID("bf")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewIDWithName("logs", "out"): { + Receivers: []component.ID{component.MustNewID("bf")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, }, expected: "connector \"bf\" used as exporter in logs pipeline but not used in any supported receiver pipeline", @@ -1430,18 +1551,18 @@ func TestGraphBuildErrors(t *testing.T) { { name: "orphaned-connector-use-as-exporter", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopExporterFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopExporterFactory.CreateDefaultConfig(), }, connectorCfgs: map[component.ID]component.Config{ - component.NewIDWithName("nop", "conn"): nopConnectorFactory.CreateDefaultConfig(), + component.MustNewIDWithName("nop", "conn"): nopConnectorFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewIDWithName("metrics", "in"): { - Receivers: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewIDWithName("nop", "conn")}, + component.MustNewIDWithName("metrics", "in"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewIDWithName("nop", "conn")}, }, }, expected: `connector "nop/conn" used as exporter in metrics pipeline but not used in any supported receiver pipeline`, @@ -1449,18 +1570,18 @@ func TestGraphBuildErrors(t *testing.T) { { name: "orphaned-connector-use-as-receiver", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopExporterFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopExporterFactory.CreateDefaultConfig(), }, connectorCfgs: map[component.ID]component.Config{ - component.NewIDWithName("nop", "conn"): nopConnectorFactory.CreateDefaultConfig(), + component.MustNewIDWithName("nop", "conn"): nopConnectorFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewIDWithName("traces", "out"): { - Receivers: []component.ID{component.NewIDWithName("nop", "conn")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewIDWithName("traces", "out"): { + Receivers: []component.ID{component.MustNewIDWithName("nop", "conn")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, }, expected: `connector "nop/conn" used as receiver in traces pipeline but not used in any supported exporter pipeline`, @@ -1468,26 +1589,26 @@ func TestGraphBuildErrors(t *testing.T) { { name: "partially-orphaned-connector-use-as-exporter", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopExporterFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopExporterFactory.CreateDefaultConfig(), }, connectorCfgs: map[component.ID]component.Config{ - component.NewID("mockforward"): mfConnectorFactory.CreateDefaultConfig(), + component.MustNewID("mockforward"): mfConnectorFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewIDWithName("traces", "in"): { - Receivers: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("mockforward")}, + component.MustNewIDWithName("traces", "in"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("mockforward")}, }, - component.NewIDWithName("traces", "out"): { - Receivers: []component.ID{component.NewID("mockforward")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewIDWithName("traces", "out"): { + Receivers: []component.ID{component.MustNewID("mockforward")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, - component.NewIDWithName("metrics", "in"): { - Receivers: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("mockforward")}, + component.MustNewIDWithName("metrics", "in"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("mockforward")}, }, }, expected: `connector "mockforward" used as exporter in metrics pipeline but not used in any supported receiver pipeline`, @@ -1495,26 +1616,26 @@ func TestGraphBuildErrors(t *testing.T) { { name: "partially-orphaned-connector-use-as-receiver", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopExporterFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopExporterFactory.CreateDefaultConfig(), }, connectorCfgs: map[component.ID]component.Config{ - component.NewID("mockforward"): mfConnectorFactory.CreateDefaultConfig(), + component.MustNewID("mockforward"): mfConnectorFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewIDWithName("metrics", "in"): { - Receivers: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("mockforward")}, + component.MustNewIDWithName("metrics", "in"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("mockforward")}, }, - component.NewIDWithName("metrics", "out"): { - Receivers: []component.ID{component.NewID("mockforward")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewIDWithName("metrics", "out"): { + Receivers: []component.ID{component.MustNewID("mockforward")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, - component.NewIDWithName("traces", "out"): { - Receivers: []component.ID{component.NewID("mockforward")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewIDWithName("traces", "out"): { + Receivers: []component.ID{component.MustNewID("mockforward")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, }, expected: `connector "mockforward" used as receiver in traces pipeline but not used in any supported exporter pipeline`, @@ -1522,22 +1643,22 @@ func TestGraphBuildErrors(t *testing.T) { { name: "not_allowed_simple_cycle_traces.yaml", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, processorCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopProcessorFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopProcessorFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopExporterFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopExporterFactory.CreateDefaultConfig(), }, connectorCfgs: map[component.ID]component.Config{ - component.NewIDWithName("nop", "conn"): nopConnectorFactory.CreateDefaultConfig(), + component.MustNewIDWithName("nop", "conn"): nopConnectorFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewID("traces"): { - Receivers: []component.ID{component.NewIDWithName("nop", "conn")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewIDWithName("nop", "conn")}, + component.MustNewID("traces"): { + Receivers: []component.ID{component.MustNewIDWithName("nop", "conn")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewIDWithName("nop", "conn")}, }, }, expected: `cycle detected: ` + @@ -1548,22 +1669,22 @@ func TestGraphBuildErrors(t *testing.T) { { name: "not_allowed_simple_cycle_metrics.yaml", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, processorCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopProcessorFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopProcessorFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopExporterFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopExporterFactory.CreateDefaultConfig(), }, connectorCfgs: map[component.ID]component.Config{ - component.NewIDWithName("nop", "conn"): nopConnectorFactory.CreateDefaultConfig(), + component.MustNewIDWithName("nop", "conn"): nopConnectorFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewID("metrics"): { - Receivers: []component.ID{component.NewIDWithName("nop", "conn")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewIDWithName("nop", "conn")}, + component.MustNewID("metrics"): { + Receivers: []component.ID{component.MustNewIDWithName("nop", "conn")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewIDWithName("nop", "conn")}, }, }, expected: `cycle detected: ` + @@ -1574,22 +1695,22 @@ func TestGraphBuildErrors(t *testing.T) { { name: "not_allowed_simple_cycle_logs.yaml", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, processorCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopProcessorFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopProcessorFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopExporterFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopExporterFactory.CreateDefaultConfig(), }, connectorCfgs: map[component.ID]component.Config{ - component.NewIDWithName("nop", "conn"): nopConnectorFactory.CreateDefaultConfig(), + component.MustNewIDWithName("nop", "conn"): nopConnectorFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewID("logs"): { - Receivers: []component.ID{component.NewIDWithName("nop", "conn")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewIDWithName("nop", "conn")}, + component.MustNewID("logs"): { + Receivers: []component.ID{component.MustNewIDWithName("nop", "conn")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewIDWithName("nop", "conn")}, }, }, expected: `cycle detected: ` + @@ -1600,39 +1721,39 @@ func TestGraphBuildErrors(t *testing.T) { { name: "not_allowed_deep_cycle_traces.yaml", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, processorCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopProcessorFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopProcessorFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopExporterFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopExporterFactory.CreateDefaultConfig(), }, connectorCfgs: map[component.ID]component.Config{ - component.NewIDWithName("nop", "conn"): nopConnectorFactory.CreateDefaultConfig(), - component.NewIDWithName("nop", "conn1"): nopConnectorFactory.CreateDefaultConfig(), - component.NewIDWithName("nop", "conn2"): nopConnectorFactory.CreateDefaultConfig(), + component.MustNewIDWithName("nop", "conn"): nopConnectorFactory.CreateDefaultConfig(), + component.MustNewIDWithName("nop", "conn1"): nopConnectorFactory.CreateDefaultConfig(), + component.MustNewIDWithName("nop", "conn2"): nopConnectorFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewIDWithName("traces", "in"): { - Receivers: []component.ID{component.NewID("nop")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewIDWithName("nop", "conn")}, + component.MustNewIDWithName("traces", "in"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewIDWithName("nop", "conn")}, }, - component.NewIDWithName("traces", "1"): { - Receivers: []component.ID{component.NewIDWithName("nop", "conn")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewIDWithName("nop", "conn1")}, + component.MustNewIDWithName("traces", "1"): { + Receivers: []component.ID{component.MustNewIDWithName("nop", "conn")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewIDWithName("nop", "conn1")}, }, - component.NewIDWithName("traces", "2"): { - Receivers: []component.ID{component.NewIDWithName("nop", "conn1")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewIDWithName("nop", "conn2"), component.NewIDWithName("nop", "conn")}, + component.MustNewIDWithName("traces", "2"): { + Receivers: []component.ID{component.MustNewIDWithName("nop", "conn1")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewIDWithName("nop", "conn2"), component.MustNewIDWithName("nop", "conn")}, }, - component.NewIDWithName("traces", "out"): { - Receivers: []component.ID{component.NewIDWithName("nop", "conn2")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewIDWithName("traces", "out"): { + Receivers: []component.ID{component.MustNewIDWithName("nop", "conn2")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, }, expected: `cycle detected: ` + @@ -1645,39 +1766,39 @@ func TestGraphBuildErrors(t *testing.T) { { name: "not_allowed_deep_cycle_metrics.yaml", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, processorCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopProcessorFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopProcessorFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopExporterFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopExporterFactory.CreateDefaultConfig(), }, connectorCfgs: map[component.ID]component.Config{ - component.NewIDWithName("nop", "conn"): nopConnectorFactory.CreateDefaultConfig(), - component.NewIDWithName("nop", "conn1"): nopConnectorFactory.CreateDefaultConfig(), - component.NewIDWithName("nop", "conn2"): nopConnectorFactory.CreateDefaultConfig(), + component.MustNewIDWithName("nop", "conn"): nopConnectorFactory.CreateDefaultConfig(), + component.MustNewIDWithName("nop", "conn1"): nopConnectorFactory.CreateDefaultConfig(), + component.MustNewIDWithName("nop", "conn2"): nopConnectorFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewIDWithName("metrics", "in"): { - Receivers: []component.ID{component.NewID("nop")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewIDWithName("nop", "conn")}, + component.MustNewIDWithName("metrics", "in"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewIDWithName("nop", "conn")}, }, - component.NewIDWithName("metrics", "1"): { - Receivers: []component.ID{component.NewIDWithName("nop", "conn")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewIDWithName("nop", "conn1")}, + component.MustNewIDWithName("metrics", "1"): { + Receivers: []component.ID{component.MustNewIDWithName("nop", "conn")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewIDWithName("nop", "conn1")}, }, - component.NewIDWithName("metrics", "2"): { - Receivers: []component.ID{component.NewIDWithName("nop", "conn1")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewIDWithName("nop", "conn2"), component.NewIDWithName("nop", "conn")}, + component.MustNewIDWithName("metrics", "2"): { + Receivers: []component.ID{component.MustNewIDWithName("nop", "conn1")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewIDWithName("nop", "conn2"), component.MustNewIDWithName("nop", "conn")}, }, - component.NewIDWithName("metrics", "out"): { - Receivers: []component.ID{component.NewIDWithName("nop", "conn2")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewIDWithName("metrics", "out"): { + Receivers: []component.ID{component.MustNewIDWithName("nop", "conn2")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, }, expected: `cycle detected: ` + @@ -1690,39 +1811,39 @@ func TestGraphBuildErrors(t *testing.T) { { name: "not_allowed_deep_cycle_logs.yaml", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, processorCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopProcessorFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopProcessorFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopExporterFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopExporterFactory.CreateDefaultConfig(), }, connectorCfgs: map[component.ID]component.Config{ - component.NewIDWithName("nop", "conn"): nopConnectorFactory.CreateDefaultConfig(), - component.NewIDWithName("nop", "conn1"): nopConnectorFactory.CreateDefaultConfig(), - component.NewIDWithName("nop", "conn2"): nopConnectorFactory.CreateDefaultConfig(), + component.MustNewIDWithName("nop", "conn"): nopConnectorFactory.CreateDefaultConfig(), + component.MustNewIDWithName("nop", "conn1"): nopConnectorFactory.CreateDefaultConfig(), + component.MustNewIDWithName("nop", "conn2"): nopConnectorFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewIDWithName("logs", "in"): { - Receivers: []component.ID{component.NewID("nop")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewIDWithName("nop", "conn")}, + component.MustNewIDWithName("logs", "in"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewIDWithName("nop", "conn")}, }, - component.NewIDWithName("logs", "1"): { - Receivers: []component.ID{component.NewIDWithName("nop", "conn")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewIDWithName("nop", "conn1")}, + component.MustNewIDWithName("logs", "1"): { + Receivers: []component.ID{component.MustNewIDWithName("nop", "conn")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewIDWithName("nop", "conn1")}, }, - component.NewIDWithName("logs", "2"): { - Receivers: []component.ID{component.NewIDWithName("nop", "conn1")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewIDWithName("nop", "conn2"), component.NewIDWithName("nop", "conn")}, + component.MustNewIDWithName("logs", "2"): { + Receivers: []component.ID{component.MustNewIDWithName("nop", "conn1")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewIDWithName("nop", "conn2"), component.MustNewIDWithName("nop", "conn")}, }, - component.NewIDWithName("logs", "out"): { - Receivers: []component.ID{component.NewIDWithName("nop", "conn2")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewIDWithName("logs", "out"): { + Receivers: []component.ID{component.MustNewIDWithName("nop", "conn2")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, }, expected: `cycle detected: ` + @@ -1735,55 +1856,55 @@ func TestGraphBuildErrors(t *testing.T) { { name: "not_allowed_deep_cycle_multi_signal.yaml", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, processorCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopProcessorFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopProcessorFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopExporterFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopExporterFactory.CreateDefaultConfig(), }, connectorCfgs: map[component.ID]component.Config{ - component.NewIDWithName("nop", "fork"): nopConnectorFactory.CreateDefaultConfig(), - component.NewIDWithName("nop", "count"): nopConnectorFactory.CreateDefaultConfig(), - component.NewIDWithName("nop", "forkagain"): nopConnectorFactory.CreateDefaultConfig(), - component.NewIDWithName("nop", "rawlog"): nopConnectorFactory.CreateDefaultConfig(), + component.MustNewIDWithName("nop", "fork"): nopConnectorFactory.CreateDefaultConfig(), + component.MustNewIDWithName("nop", "count"): nopConnectorFactory.CreateDefaultConfig(), + component.MustNewIDWithName("nop", "forkagain"): nopConnectorFactory.CreateDefaultConfig(), + component.MustNewIDWithName("nop", "rawlog"): nopConnectorFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewIDWithName("traces", "in"): { - Receivers: []component.ID{component.NewID("nop")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewIDWithName("nop", "fork")}, - }, - component.NewIDWithName("traces", "copy1"): { - Receivers: []component.ID{component.NewIDWithName("nop", "fork")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewIDWithName("nop", "count")}, - }, - component.NewIDWithName("traces", "copy2"): { - Receivers: []component.ID{component.NewIDWithName("nop", "fork")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewIDWithName("nop", "forkagain")}, - }, - component.NewIDWithName("traces", "copy2a"): { - Receivers: []component.ID{component.NewIDWithName("nop", "forkagain")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewIDWithName("nop", "count")}, - }, - component.NewIDWithName("traces", "copy2b"): { - Receivers: []component.ID{component.NewIDWithName("nop", "forkagain")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewIDWithName("nop", "rawlog")}, - }, - component.NewIDWithName("metrics", "count"): { - Receivers: []component.ID{component.NewIDWithName("nop", "count")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("nop")}, - }, - component.NewIDWithName("logs", "raw"): { - Receivers: []component.ID{component.NewIDWithName("nop", "rawlog")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewIDWithName("nop", "fork")}, // cannot loop back to "nop/fork" + component.MustNewIDWithName("traces", "in"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewIDWithName("nop", "fork")}, + }, + component.MustNewIDWithName("traces", "copy1"): { + Receivers: []component.ID{component.MustNewIDWithName("nop", "fork")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewIDWithName("nop", "count")}, + }, + component.MustNewIDWithName("traces", "copy2"): { + Receivers: []component.ID{component.MustNewIDWithName("nop", "fork")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewIDWithName("nop", "forkagain")}, + }, + component.MustNewIDWithName("traces", "copy2a"): { + Receivers: []component.ID{component.MustNewIDWithName("nop", "forkagain")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewIDWithName("nop", "count")}, + }, + component.MustNewIDWithName("traces", "copy2b"): { + Receivers: []component.ID{component.MustNewIDWithName("nop", "forkagain")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewIDWithName("nop", "rawlog")}, + }, + component.MustNewIDWithName("metrics", "count"): { + Receivers: []component.ID{component.MustNewIDWithName("nop", "count")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("nop")}, + }, + component.MustNewIDWithName("logs", "raw"): { + Receivers: []component.ID{component.MustNewIDWithName("nop", "rawlog")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewIDWithName("nop", "fork")}, // cannot loop back to "nop/fork" }, }, expected: `cycle detected: ` + @@ -1798,15 +1919,15 @@ func TestGraphBuildErrors(t *testing.T) { { name: "unknown_exporter_config", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewID("traces"): { - Receivers: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("nop"), component.NewIDWithName("nop", "1")}, + component.MustNewID("traces"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("nop"), component.MustNewIDWithName("nop", "1")}, }, }, expected: "failed to create \"nop/1\" exporter for data type \"traces\": exporter \"nop/1\" is not configured", @@ -1814,15 +1935,15 @@ func TestGraphBuildErrors(t *testing.T) { { name: "unknown_exporter_factory", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("unknown"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("unknown"): nopReceiverFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewID("traces"): { - Receivers: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("unknown")}, + component.MustNewID("traces"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("unknown")}, }, }, expected: "failed to create \"unknown\" exporter for data type \"traces\": exporter factory not available for: \"unknown\"", @@ -1830,19 +1951,19 @@ func TestGraphBuildErrors(t *testing.T) { { name: "unknown_processor_config", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, processorCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopProcessorFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopProcessorFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewID("metrics"): { - Receivers: []component.ID{component.NewID("nop")}, - Processors: []component.ID{component.NewID("nop"), component.NewIDWithName("nop", "1")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewID("metrics"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Processors: []component.ID{component.MustNewID("nop"), component.MustNewIDWithName("nop", "1")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, }, expected: "failed to create \"nop/1\" processor, in pipeline \"metrics\": processor \"nop/1\" is not configured", @@ -1850,19 +1971,19 @@ func TestGraphBuildErrors(t *testing.T) { { name: "unknown_processor_factory", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, processorCfgs: map[component.ID]component.Config{ - component.NewID("unknown"): nopProcessorFactory.CreateDefaultConfig(), + component.MustNewID("unknown"): nopProcessorFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewID("metrics"): { - Receivers: []component.ID{component.NewID("nop")}, - Processors: []component.ID{component.NewID("unknown")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewID("metrics"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Processors: []component.ID{component.MustNewID("unknown")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, }, expected: "failed to create \"unknown\" processor, in pipeline \"metrics\": processor factory not available for: \"unknown\"", @@ -1870,15 +1991,15 @@ func TestGraphBuildErrors(t *testing.T) { { name: "unknown_receiver_config", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewID("logs"): { - Receivers: []component.ID{component.NewID("nop"), component.NewIDWithName("nop", "1")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewID("logs"): { + Receivers: []component.ID{component.MustNewID("nop"), component.MustNewIDWithName("nop", "1")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, }, expected: "failed to create \"nop/1\" receiver for data type \"logs\": receiver \"nop/1\" is not configured", @@ -1886,15 +2007,15 @@ func TestGraphBuildErrors(t *testing.T) { { name: "unknown_receiver_factory", receiverCfgs: map[component.ID]component.Config{ - component.NewID("unknown"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("unknown"): nopReceiverFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewID("logs"): { - Receivers: []component.ID{component.NewID("unknown")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewID("logs"): { + Receivers: []component.ID{component.MustNewID("unknown")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, }, expected: "failed to create \"unknown\" receiver for data type \"logs\": receiver factory not available for: \"unknown\"", @@ -1902,22 +2023,22 @@ func TestGraphBuildErrors(t *testing.T) { { name: "unknown_connector_factory", receiverCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, exporterCfgs: map[component.ID]component.Config{ - component.NewID("nop"): nopReceiverFactory.CreateDefaultConfig(), + component.MustNewID("nop"): nopReceiverFactory.CreateDefaultConfig(), }, connectorCfgs: map[component.ID]component.Config{ - component.NewID("unknown"): nopConnectorFactory.CreateDefaultConfig(), + component.MustNewID("unknown"): nopConnectorFactory.CreateDefaultConfig(), }, pipelineCfgs: pipelines.Config{ - component.NewIDWithName("traces", "in"): { - Receivers: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("unknown")}, + component.MustNewIDWithName("traces", "in"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("unknown")}, }, - component.NewIDWithName("traces", "out"): { - Receivers: []component.ID{component.NewID("unknown")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewIDWithName("traces", "out"): { + Receivers: []component.ID{component.MustNewID("unknown")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, }, expected: "connector factory not available for: \"unknown\"", @@ -1928,7 +2049,7 @@ func TestGraphBuildErrors(t *testing.T) { t.Run(test.name, func(t *testing.T) { set := Settings{ BuildInfo: component.NewDefaultBuildInfo(), - Telemetry: componenttest.NewNopTelemetrySettings(), + Telemetry: servicetelemetry.NewNopTelemetrySettings(), ReceiverBuilder: receiver.NewBuilder( test.receiverCfgs, map[component.Type]receiver.Factory{ @@ -1975,7 +2096,7 @@ func TestGraphFailToStartAndShutdown(t *testing.T) { nopConnectorFactory := connectortest.NewNopFactory() set := Settings{ - Telemetry: componenttest.NewNopTelemetrySettings(), + Telemetry: servicetelemetry.NewNopTelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo(), ReceiverBuilder: receiver.NewBuilder( map[component.ID]component.Config{ @@ -2017,12 +2138,12 @@ func TestGraphFailToStartAndShutdown(t *testing.T) { dataTypes := []component.DataType{component.DataTypeTraces, component.DataTypeMetrics, component.DataTypeLogs} for _, dt := range dataTypes { - t.Run(string(dt)+"/receiver", func(t *testing.T) { + t.Run(dt.String()+"/receiver", func(t *testing.T) { set.PipelineConfigs = pipelines.Config{ component.NewID(dt): { - Receivers: []component.ID{component.NewID("nop"), component.NewID("err")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("nop")}, + Receivers: []component.ID{component.MustNewID("nop"), component.MustNewID("err")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, } pipelines, err := Build(context.Background(), set) @@ -2031,12 +2152,12 @@ func TestGraphFailToStartAndShutdown(t *testing.T) { assert.Error(t, pipelines.ShutdownAll(context.Background())) }) - t.Run(string(dt)+"/processor", func(t *testing.T) { + t.Run(dt.String()+"/processor", func(t *testing.T) { set.PipelineConfigs = pipelines.Config{ component.NewID(dt): { - Receivers: []component.ID{component.NewID("nop")}, - Processors: []component.ID{component.NewID("nop"), component.NewID("err")}, - Exporters: []component.ID{component.NewID("nop")}, + Receivers: []component.ID{component.MustNewID("nop")}, + Processors: []component.ID{component.MustNewID("nop"), component.MustNewID("err")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, } pipelines, err := Build(context.Background(), set) @@ -2045,12 +2166,12 @@ func TestGraphFailToStartAndShutdown(t *testing.T) { assert.Error(t, pipelines.ShutdownAll(context.Background())) }) - t.Run(string(dt)+"/exporter", func(t *testing.T) { + t.Run(dt.String()+"/exporter", func(t *testing.T) { set.PipelineConfigs = pipelines.Config{ component.NewID(dt): { - Receivers: []component.ID{component.NewID("nop")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("nop"), component.NewID("err")}, + Receivers: []component.ID{component.MustNewID("nop")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("nop"), component.MustNewID("err")}, }, } pipelines, err := Build(context.Background(), set) @@ -2060,17 +2181,17 @@ func TestGraphFailToStartAndShutdown(t *testing.T) { }) for _, dt2 := range dataTypes { - t.Run(string(dt)+"/"+string(dt2)+"/connector", func(t *testing.T) { + t.Run(dt.String()+"/"+dt2.String()+"/connector", func(t *testing.T) { set.PipelineConfigs = pipelines.Config{ component.NewIDWithName(dt, "in"): { - Receivers: []component.ID{component.NewID("nop")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("nop"), component.NewIDWithName("err", "conn")}, + Receivers: []component.ID{component.MustNewID("nop")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("nop"), component.MustNewIDWithName("err", "conn")}, }, component.NewIDWithName(dt2, "out"): { - Receivers: []component.ID{component.NewID("nop"), component.NewIDWithName("err", "conn")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("nop")}, + Receivers: []component.ID{component.MustNewID("nop"), component.MustNewIDWithName("err", "conn")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, } pipelines, err := Build(context.Background(), set) @@ -2082,6 +2203,160 @@ func TestGraphFailToStartAndShutdown(t *testing.T) { } } +func TestStatusReportedOnStartupShutdown(t *testing.T) { + + rNoErr := &testNode{id: component.MustNewIDWithName("r_no_err", "1")} + rStErr := &testNode{id: component.MustNewIDWithName("r_st_err", "1"), startErr: assert.AnError} + rSdErr := &testNode{id: component.MustNewIDWithName("r_sd_err", "1"), shutdownErr: assert.AnError} + + eNoErr := &testNode{id: component.MustNewIDWithName("e_no_err", "1")} + eStErr := &testNode{id: component.MustNewIDWithName("e_st_err", "1"), startErr: assert.AnError} + eSdErr := &testNode{id: component.MustNewIDWithName("e_sd_err", "1"), shutdownErr: assert.AnError} + + instanceIDs := map[*testNode]*component.InstanceID{ + rNoErr: {ID: rNoErr.id}, + rStErr: {ID: rStErr.id}, + rSdErr: {ID: rSdErr.id}, + eNoErr: {ID: eNoErr.id}, + eStErr: {ID: eStErr.id}, + eSdErr: {ID: eSdErr.id}, + } + + // compare two maps of status events ignoring timestamp + assertEqualStatuses := func(t *testing.T, evMap1, evMap2 map[*component.InstanceID][]*component.StatusEvent) { + assert.Equal(t, len(evMap1), len(evMap2)) + for id, evts1 := range evMap1 { + evts2 := evMap2[id] + assert.Equal(t, len(evts1), len(evts2)) + for i := 0; i < len(evts1); i++ { + ev1 := evts1[i] + ev2 := evts2[i] + assert.Equal(t, ev1.Status(), ev2.Status()) + assert.Equal(t, ev1.Err(), ev2.Err()) + } + } + + } + + for _, tc := range []struct { + name string + edge [2]*testNode + expectedStatuses map[*component.InstanceID][]*component.StatusEvent + startupErr error + shutdownErr error + }{ + { + name: "successful startup/shutdown", + edge: [2]*testNode{rNoErr, eNoErr}, + expectedStatuses: map[*component.InstanceID][]*component.StatusEvent{ + instanceIDs[rNoErr]: { + component.NewStatusEvent(component.StatusStarting), + component.NewStatusEvent(component.StatusOK), + component.NewStatusEvent(component.StatusStopping), + component.NewStatusEvent(component.StatusStopped), + }, + instanceIDs[eNoErr]: { + component.NewStatusEvent(component.StatusStarting), + component.NewStatusEvent(component.StatusOK), + component.NewStatusEvent(component.StatusStopping), + component.NewStatusEvent(component.StatusStopped), + }, + }, + }, + { + name: "early startup error", + edge: [2]*testNode{rNoErr, eStErr}, + expectedStatuses: map[*component.InstanceID][]*component.StatusEvent{ + instanceIDs[eStErr]: { + component.NewStatusEvent(component.StatusStarting), + component.NewPermanentErrorEvent(assert.AnError), + }, + }, + startupErr: assert.AnError, + }, + { + name: "late startup error", + edge: [2]*testNode{rStErr, eNoErr}, + expectedStatuses: map[*component.InstanceID][]*component.StatusEvent{ + instanceIDs[rStErr]: { + component.NewStatusEvent(component.StatusStarting), + component.NewPermanentErrorEvent(assert.AnError), + }, + instanceIDs[eNoErr]: { + component.NewStatusEvent(component.StatusStarting), + component.NewStatusEvent(component.StatusOK), + component.NewStatusEvent(component.StatusStopping), + component.NewStatusEvent(component.StatusStopped), + }, + }, + startupErr: assert.AnError, + }, + { + name: "early shutdown error", + edge: [2]*testNode{rSdErr, eNoErr}, + expectedStatuses: map[*component.InstanceID][]*component.StatusEvent{ + instanceIDs[rSdErr]: { + component.NewStatusEvent(component.StatusStarting), + component.NewStatusEvent(component.StatusOK), + component.NewStatusEvent(component.StatusStopping), + component.NewPermanentErrorEvent(assert.AnError), + }, + instanceIDs[eNoErr]: { + component.NewStatusEvent(component.StatusStarting), + component.NewStatusEvent(component.StatusOK), + component.NewStatusEvent(component.StatusStopping), + component.NewStatusEvent(component.StatusStopped), + }, + }, + shutdownErr: assert.AnError, + }, + { + name: "late shutdown error", + edge: [2]*testNode{rNoErr, eSdErr}, + expectedStatuses: map[*component.InstanceID][]*component.StatusEvent{ + instanceIDs[rNoErr]: { + component.NewStatusEvent(component.StatusStarting), + component.NewStatusEvent(component.StatusOK), + component.NewStatusEvent(component.StatusStopping), + component.NewStatusEvent(component.StatusStopped), + }, + instanceIDs[eSdErr]: { + component.NewStatusEvent(component.StatusStarting), + component.NewStatusEvent(component.StatusOK), + component.NewStatusEvent(component.StatusStopping), + component.NewPermanentErrorEvent(assert.AnError), + }, + }, + shutdownErr: assert.AnError, + }, + } { + t.Run(tc.name, func(t *testing.T) { + pg := &Graph{componentGraph: simple.NewDirectedGraph()} + pg.telemetry = servicetelemetry.NewNopTelemetrySettings() + + actualStatuses := make(map[*component.InstanceID][]*component.StatusEvent) + rep := status.NewReporter(func(id *component.InstanceID, ev *component.StatusEvent) { + actualStatuses[id] = append(actualStatuses[id], ev) + }, func(error) { + }) + + pg.telemetry.Status = rep + rep.Ready() + + e0, e1 := tc.edge[0], tc.edge[1] + pg.instanceIDs = map[int64]*component.InstanceID{ + e0.ID(): instanceIDs[e0], + e1.ID(): instanceIDs[e1], + } + pg.componentGraph.SetEdge(simple.Edge{F: e0, T: e1}) + + assert.Equal(t, tc.startupErr, pg.StartAll(context.Background(), componenttest.NewNopHost())) + assert.Equal(t, tc.shutdownErr, pg.ShutdownAll(context.Background())) + assertEqualStatuses(t, tc.expectedStatuses, actualStatuses) + }) + } +} + func (g *Graph) getReceivers() map[component.DataType]map[component.ID]component.Component { receiversMap := make(map[component.DataType]map[component.ID]component.Component) receiversMap[component.DataTypeTraces] = make(map[component.ID]component.Component) @@ -2115,9 +2390,10 @@ func (g *Graph) getReceivers() map[component.DataType]map[component.ID]component // - E instances of the connector as a receiver. // - R instances of the connector as an exporter. func expectedInstances(m pipelines.Config, pID component.ID) (int, int) { + exConnectorType := component.MustNewType("exampleconnector") var r, e int for _, rID := range m[pID].Receivers { - if rID.Type() != "exampleconnector" { + if rID.Type() != exConnectorType { r++ continue } @@ -2134,7 +2410,7 @@ func expectedInstances(m pipelines.Config, pID component.ID) (int, int) { r += len(typeMap) } for _, eID := range m[pID].Exporters { - if eID.Type() != "exampleconnector" { + if eID.Type() != exConnectorType { e++ continue } @@ -2154,31 +2430,31 @@ func expectedInstances(m pipelines.Config, pID component.ID) (int, int) { } func newBadReceiverFactory() receiver.Factory { - return receiver.NewFactory("bf", func() component.Config { + return receiver.NewFactory(component.MustNewType("bf"), func() component.Config { return &struct{}{} }) } func newBadProcessorFactory() processor.Factory { - return processor.NewFactory("bf", func() component.Config { + return processor.NewFactory(component.MustNewType("bf"), func() component.Config { return &struct{}{} }) } func newBadExporterFactory() exporter.Factory { - return exporter.NewFactory("bf", func() component.Config { + return exporter.NewFactory(component.MustNewType("bf"), func() component.Config { return &struct{}{} }) } func newBadConnectorFactory() connector.Factory { - return connector.NewFactory("bf", func() component.Config { + return connector.NewFactory(component.MustNewType("bf"), func() component.Config { return &struct{}{} }) } func newErrReceiverFactory() receiver.Factory { - return receiver.NewFactory("err", + return receiver.NewFactory(component.MustNewType("err"), func() component.Config { return &struct{}{} }, receiver.WithTraces(func(context.Context, receiver.CreateSettings, component.Config, consumer.Traces) (receiver.Traces, error) { return &errComponent{}, nil @@ -2193,7 +2469,7 @@ func newErrReceiverFactory() receiver.Factory { } func newErrProcessorFactory() processor.Factory { - return processor.NewFactory("err", + return processor.NewFactory(component.MustNewType("err"), func() component.Config { return &struct{}{} }, processor.WithTraces(func(context.Context, processor.CreateSettings, component.Config, consumer.Traces) (processor.Traces, error) { return &errComponent{}, nil @@ -2208,7 +2484,7 @@ func newErrProcessorFactory() processor.Factory { } func newErrExporterFactory() exporter.Factory { - return exporter.NewFactory("err", + return exporter.NewFactory(component.MustNewType("err"), func() component.Config { return &struct{}{} }, exporter.WithTraces(func(context.Context, exporter.CreateSettings, component.Config) (exporter.Traces, error) { return &errComponent{}, nil @@ -2223,7 +2499,7 @@ func newErrExporterFactory() exporter.Factory { } func newErrConnectorFactory() connector.Factory { - return connector.NewFactory("err", func() component.Config { + return connector.NewFactory(component.MustNewType("err"), func() component.Config { return &struct{}{} }, connector.WithTracesToTraces(func(context.Context, connector.CreateSettings, component.Config, consumer.Traces) (connector.Traces, error) { diff --git a/service/internal/graph/nodes.go b/service/internal/graph/nodes.go index 7f7fda70f85..13726d1c760 100644 --- a/service/internal/graph/nodes.go +++ b/service/internal/graph/nodes.go @@ -61,7 +61,7 @@ type receiverNode struct { func newReceiverNode(pipelineType component.DataType, recvID component.ID) *receiverNode { return &receiverNode{ - nodeID: newNodeID(receiverSeed, string(pipelineType), recvID.String()), + nodeID: newNodeID(receiverSeed, pipelineType.String(), recvID.String()), componentID: recvID, pipelineType: pipelineType, } @@ -165,7 +165,7 @@ type exporterNode struct { func newExporterNode(pipelineType component.DataType, exprID component.ID) *exporterNode { return &exporterNode{ - nodeID: newNodeID(exporterSeed, string(pipelineType), exprID.String()), + nodeID: newNodeID(exporterSeed, pipelineType.String(), exprID.String()), componentID: exprID, pipelineType: pipelineType, } @@ -215,7 +215,7 @@ type connectorNode struct { func newConnectorNode(exprPipelineType, rcvrPipelineType component.DataType, connID component.ID) *connectorNode { return &connectorNode{ - nodeID: newNodeID(connectorSeed, connID.String(), string(exprPipelineType), string(rcvrPipelineType)), + nodeID: newNodeID(connectorSeed, connID.String(), exprPipelineType.String(), rcvrPipelineType.String()), componentID: connID, exprPipelineType: exprPipelineType, rcvrPipelineType: rcvrPipelineType, @@ -244,7 +244,7 @@ func (n *connectorNode) buildComponent( consumers[next.(*capabilitiesNode).pipelineID] = next.(consumer.Traces) capability.MutatesData = capability.MutatesData || next.Capabilities().MutatesData } - next := fanoutconsumer.NewTracesRouter(consumers) + next := connector.NewTracesRouter(consumers) switch n.exprPipelineType { case component.DataTypeTraces: @@ -255,6 +255,9 @@ func (n *connectorNode) buildComponent( n.Component = conn // When connecting pipelines of the same data type, the connector must // inherit the capabilities of pipelines in which it is acting as a receiver. + // Since the incoming and outgoing data types are the same, we must also consider + // that the connector itself may MutatesData. + capability.MutatesData = capability.MutatesData || conn.Capabilities().MutatesData n.baseConsumer = capabilityconsumer.NewTraces(conn, capability) case component.DataTypeMetrics: conn, err := builder.CreateMetricsToTraces(ctx, set, next) @@ -277,7 +280,7 @@ func (n *connectorNode) buildComponent( consumers[next.(*capabilitiesNode).pipelineID] = next.(consumer.Metrics) capability.MutatesData = capability.MutatesData || next.Capabilities().MutatesData } - next := fanoutconsumer.NewMetricsRouter(consumers) + next := connector.NewMetricsRouter(consumers) switch n.exprPipelineType { case component.DataTypeTraces: @@ -294,6 +297,9 @@ func (n *connectorNode) buildComponent( n.Component = conn // When connecting pipelines of the same data type, the connector must // inherit the capabilities of pipelines in which it is acting as a receiver. + // Since the incoming and outgoing data types are the same, we must also consider + // that the connector itself may MutatesData. + capability.MutatesData = capability.MutatesData || conn.Capabilities().MutatesData n.baseConsumer = capabilityconsumer.NewMetrics(conn, capability) case component.DataTypeLogs: conn, err := builder.CreateLogsToMetrics(ctx, set, next) @@ -309,7 +315,7 @@ func (n *connectorNode) buildComponent( consumers[next.(*capabilitiesNode).pipelineID] = next.(consumer.Logs) capability.MutatesData = capability.MutatesData || next.Capabilities().MutatesData } - next := fanoutconsumer.NewLogsRouter(consumers) + next := connector.NewLogsRouter(consumers) switch n.exprPipelineType { case component.DataTypeTraces: @@ -332,6 +338,9 @@ func (n *connectorNode) buildComponent( n.Component = conn // When connecting pipelines of the same data type, the connector must // inherit the capabilities of pipelines in which it is acting as a receiver. + // Since the incoming and outgoing data types are the same, we must also consider + // that the connector itself may MutatesData. + capability.MutatesData = capability.MutatesData || conn.Capabilities().MutatesData n.baseConsumer = capabilityconsumer.NewLogs(conn, capability) } } diff --git a/service/internal/graph/package_test.go b/service/internal/graph/package_test.go new file mode 100644 index 00000000000..9e6a4a59736 --- /dev/null +++ b/service/internal/graph/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package graph + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/service/internal/graph/zpages.go b/service/internal/graph/zpages.go index 0c7c0829eed..0f2793974e9 100644 --- a/service/internal/graph/zpages.go +++ b/service/internal/graph/zpages.go @@ -55,7 +55,7 @@ func (g *Graph) HandleZPages(w http.ResponseWriter, r *http.Request) { sumData.Rows = append(sumData.Rows, zpages.SummaryPipelinesTableRowData{ FullName: c.String(), - InputType: string(c.Type()), + InputType: c.Type().String(), MutatesData: p.capabilitiesNode.getConsumer().Capabilities().MutatesData, Receivers: recvIDs, Processors: procIDs, diff --git a/service/internal/proctelemetry/config.go b/service/internal/proctelemetry/config.go index 4590b02d481..9d315b48cdb 100644 --- a/service/internal/proctelemetry/config.go +++ b/service/internal/proctelemetry/config.go @@ -16,6 +16,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" + "go.opentelemetry.io/contrib/config" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/bridge/opencensus" "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc" @@ -32,7 +33,6 @@ import ( "go.opentelemetry.io/collector/processor/processorhelper" semconv "go.opentelemetry.io/collector/semconv/v1.18.0" - "go.opentelemetry.io/collector/service/telemetry" ) const ( @@ -66,12 +66,14 @@ var ( errNoValidSpanExporter = errors.New("no valid span exporter") ) -func InitMetricReader(ctx context.Context, reader telemetry.MetricReader, asyncErrorChannel chan error) (sdkmetric.Reader, *http.Server, error) { +func InitMetricReader(ctx context.Context, reader config.MetricReader, asyncErrorChannel chan error) (sdkmetric.Reader, *http.Server, error) { if reader.Pull != nil { return initPullExporter(reader.Pull.Exporter, asyncErrorChannel) } if reader.Periodic != nil { - opts := []sdkmetric.PeriodicReaderOption{} + opts := []sdkmetric.PeriodicReaderOption{ + sdkmetric.WithProducer(opencensus.NewMetricProducer()), + } if reader.Periodic.Interval != nil { opts = append(opts, sdkmetric.WithInterval(time.Duration(*reader.Periodic.Interval)*time.Millisecond)) } @@ -84,7 +86,7 @@ func InitMetricReader(ctx context.Context, reader telemetry.MetricReader, asyncE return nil, nil, fmt.Errorf("unsupported metric reader type %v", reader) } -func InitSpanProcessor(ctx context.Context, processor telemetry.SpanProcessor) (sdktrace.SpanProcessor, error) { +func InitSpanProcessor(ctx context.Context, processor config.SpanProcessor) (sdktrace.SpanProcessor, error) { if processor.Batch != nil { if processor.Batch.Exporter.Console != nil { exp, err := stdouttrace.New( @@ -95,16 +97,16 @@ func InitSpanProcessor(ctx context.Context, processor telemetry.SpanProcessor) ( } return initBatchSpanProcessor(processor.Batch, exp) } - if processor.Batch.Exporter.Otlp != nil { + if processor.Batch.Exporter.OTLP != nil { var err error var exp sdktrace.SpanExporter - switch processor.Batch.Exporter.Otlp.Protocol { + switch processor.Batch.Exporter.OTLP.Protocol { case protocolProtobufHTTP: - exp, err = initOTLPHTTPSpanExporter(ctx, processor.Batch.Exporter.Otlp) + exp, err = initOTLPHTTPSpanExporter(ctx, processor.Batch.Exporter.OTLP) case protocolProtobufGRPC: - exp, err = initOTLPgRPCSpanExporter(ctx, processor.Batch.Exporter.Otlp) + exp, err = initOTLPgRPCSpanExporter(ctx, processor.Batch.Exporter.OTLP) default: - return nil, fmt.Errorf("unsupported protocol %q", processor.Batch.Exporter.Otlp.Protocol) + return nil, fmt.Errorf("unsupported protocol %q", processor.Batch.Exporter.OTLP.Protocol) } if err != nil { return nil, err @@ -195,7 +197,7 @@ func cardinalityFilter(kvs ...attribute.KeyValue) attribute.Filter { } } -func initPrometheusExporter(prometheusConfig *telemetry.Prometheus, asyncErrorChannel chan error) (sdkmetric.Reader, *http.Server, error) { +func initPrometheusExporter(prometheusConfig *config.Prometheus, asyncErrorChannel chan error) (sdkmetric.Reader, *http.Server, error) { promRegistry := prometheus.NewRegistry() if prometheusConfig.Host == nil { return nil, nil, fmt.Errorf("host must be specified") @@ -203,14 +205,18 @@ func initPrometheusExporter(prometheusConfig *telemetry.Prometheus, asyncErrorCh if prometheusConfig.Port == nil { return nil, nil, fmt.Errorf("port must be specified") } - wrappedRegisterer := prometheus.WrapRegistererWithPrefix("otelcol_", promRegistry) exporter, err := otelprom.New( - otelprom.WithRegisterer(wrappedRegisterer), + otelprom.WithRegisterer(promRegistry), // https://github.com/open-telemetry/opentelemetry-collector/issues/8043 otelprom.WithoutUnits(), // Disabled for the moment until this becomes stable, and we are ready to break backwards compatibility. otelprom.WithoutScopeInfo(), - otelprom.WithProducer(opencensus.NewMetricProducer())) + otelprom.WithProducer(opencensus.NewMetricProducer()), + // This allows us to produce metrics that are backwards compatible w/ opencensus + otelprom.WithoutCounterSuffixes(), + otelprom.WithNamespace("otelcol"), + otelprom.WithResourceAsConstantLabels(attribute.NewDenyKeysFilter()), + ) if err != nil { return nil, nil, fmt.Errorf("error creating otel prometheus exporter: %w", err) } @@ -218,14 +224,14 @@ func initPrometheusExporter(prometheusConfig *telemetry.Prometheus, asyncErrorCh return exporter, InitPrometheusServer(promRegistry, fmt.Sprintf("%s:%d", *prometheusConfig.Host, *prometheusConfig.Port), asyncErrorChannel), nil } -func initPullExporter(exporter telemetry.MetricExporter, asyncErrorChannel chan error) (sdkmetric.Reader, *http.Server, error) { +func initPullExporter(exporter config.MetricExporter, asyncErrorChannel chan error) (sdkmetric.Reader, *http.Server, error) { if exporter.Prometheus != nil { return initPrometheusExporter(exporter.Prometheus, asyncErrorChannel) } return nil, nil, errNoValidMetricExporter } -func initPeriodicExporter(ctx context.Context, exporter telemetry.MetricExporter, opts ...sdkmetric.PeriodicReaderOption) (sdkmetric.Reader, *http.Server, error) { +func initPeriodicExporter(ctx context.Context, exporter config.MetricExporter, opts ...sdkmetric.PeriodicReaderOption) (sdkmetric.Reader, *http.Server, error) { if exporter.Console != nil { enc := json.NewEncoder(os.Stdout) enc.SetIndent("", " ") @@ -238,16 +244,16 @@ func initPeriodicExporter(ctx context.Context, exporter telemetry.MetricExporter } return sdkmetric.NewPeriodicReader(exp, opts...), nil, nil } - if exporter.Otlp != nil { + if exporter.OTLP != nil { var err error var exp sdkmetric.Exporter - switch exporter.Otlp.Protocol { + switch exporter.OTLP.Protocol { case protocolProtobufHTTP: - exp, err = initOTLPHTTPExporter(ctx, exporter.Otlp) + exp, err = initOTLPHTTPExporter(ctx, exporter.OTLP) case protocolProtobufGRPC: - exp, err = initOTLPgRPCExporter(ctx, exporter.Otlp) + exp, err = initOTLPgRPCExporter(ctx, exporter.OTLP) default: - return nil, nil, fmt.Errorf("unsupported protocol %s", exporter.Otlp.Protocol) + return nil, nil, fmt.Errorf("unsupported protocol %s", exporter.OTLP.Protocol) } if err != nil { return nil, nil, err @@ -264,7 +270,7 @@ func normalizeEndpoint(endpoint string) string { return endpoint } -func initOTLPgRPCExporter(ctx context.Context, otlpConfig *telemetry.OtlpMetric) (sdkmetric.Exporter, error) { +func initOTLPgRPCExporter(ctx context.Context, otlpConfig *config.OTLPMetric) (sdkmetric.Exporter, error) { opts := []otlpmetricgrpc.Option{} if len(otlpConfig.Endpoint) > 0 { @@ -298,7 +304,7 @@ func initOTLPgRPCExporter(ctx context.Context, otlpConfig *telemetry.OtlpMetric) return otlpmetricgrpc.New(ctx, opts...) } -func initOTLPHTTPExporter(ctx context.Context, otlpConfig *telemetry.OtlpMetric) (sdkmetric.Exporter, error) { +func initOTLPHTTPExporter(ctx context.Context, otlpConfig *config.OTLPMetric) (sdkmetric.Exporter, error) { opts := []otlpmetrichttp.Option{} if len(otlpConfig.Endpoint) > 0 { @@ -335,7 +341,7 @@ func initOTLPHTTPExporter(ctx context.Context, otlpConfig *telemetry.OtlpMetric) return otlpmetrichttp.New(ctx, opts...) } -func initOTLPgRPCSpanExporter(ctx context.Context, otlpConfig *telemetry.Otlp) (sdktrace.SpanExporter, error) { +func initOTLPgRPCSpanExporter(ctx context.Context, otlpConfig *config.OTLP) (sdktrace.SpanExporter, error) { opts := []otlptracegrpc.Option{} if len(otlpConfig.Endpoint) > 0 { @@ -369,7 +375,7 @@ func initOTLPgRPCSpanExporter(ctx context.Context, otlpConfig *telemetry.Otlp) ( return otlptracegrpc.New(ctx, opts...) } -func initOTLPHTTPSpanExporter(ctx context.Context, otlpConfig *telemetry.Otlp) (sdktrace.SpanExporter, error) { +func initOTLPHTTPSpanExporter(ctx context.Context, otlpConfig *config.OTLP) (sdktrace.SpanExporter, error) { opts := []otlptracehttp.Option{} if len(otlpConfig.Endpoint) > 0 { @@ -406,7 +412,7 @@ func initOTLPHTTPSpanExporter(ctx context.Context, otlpConfig *telemetry.Otlp) ( return otlptracehttp.New(ctx, opts...) } -func initBatchSpanProcessor(bsp *telemetry.BatchSpanProcessor, exp sdktrace.SpanExporter) (sdktrace.SpanProcessor, error) { +func initBatchSpanProcessor(bsp *config.BatchSpanProcessor, exp sdktrace.SpanExporter) (sdktrace.SpanProcessor, error) { opts := []sdktrace.BatchSpanProcessorOption{} if bsp.ExportTimeout != nil { if *bsp.ExportTimeout < 0 { diff --git a/service/internal/proctelemetry/config_test.go b/service/internal/proctelemetry/config_test.go index cb09754e52c..6f7bbc16dfe 100644 --- a/service/internal/proctelemetry/config_test.go +++ b/service/internal/proctelemetry/config_test.go @@ -10,8 +10,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - - "go.opentelemetry.io/collector/service/telemetry" + "go.opentelemetry.io/contrib/config" ) func strPtr(s string) *string { @@ -25,7 +24,7 @@ func intPtr(i int) *int { func TestMetricReader(t *testing.T) { testCases := []struct { name string - reader telemetry.MetricReader + reader config.MetricReader args any err error }{ @@ -35,10 +34,10 @@ func TestMetricReader(t *testing.T) { }, { name: "pull prometheus invalid exporter", - reader: telemetry.MetricReader{ - Pull: &telemetry.PullMetricReader{ - Exporter: telemetry.MetricExporter{ - Otlp: &telemetry.OtlpMetric{}, + reader: config.MetricReader{ + Pull: &config.PullMetricReader{ + Exporter: config.MetricExporter{ + OTLP: &config.OTLPMetric{}, }, }, }, @@ -46,10 +45,10 @@ func TestMetricReader(t *testing.T) { }, { name: "pull/prometheus-invalid-config-no-host", - reader: telemetry.MetricReader{ - Pull: &telemetry.PullMetricReader{ - Exporter: telemetry.MetricExporter{ - Prometheus: &telemetry.Prometheus{}, + reader: config.MetricReader{ + Pull: &config.PullMetricReader{ + Exporter: config.MetricExporter{ + Prometheus: &config.Prometheus{}, }, }, }, @@ -57,10 +56,10 @@ func TestMetricReader(t *testing.T) { }, { name: "pull/prometheus-invalid-config-no-port", - reader: telemetry.MetricReader{ - Pull: &telemetry.PullMetricReader{ - Exporter: telemetry.MetricExporter{ - Prometheus: &telemetry.Prometheus{ + reader: config.MetricReader{ + Pull: &config.PullMetricReader{ + Exporter: config.MetricExporter{ + Prometheus: &config.Prometheus{ Host: strPtr("locahost"), }, }, @@ -70,10 +69,10 @@ func TestMetricReader(t *testing.T) { }, { name: "pull/prometheus-invalid-config-no-port", - reader: telemetry.MetricReader{ - Pull: &telemetry.PullMetricReader{ - Exporter: telemetry.MetricExporter{ - Prometheus: &telemetry.Prometheus{ + reader: config.MetricReader{ + Pull: &config.PullMetricReader{ + Exporter: config.MetricExporter{ + Prometheus: &config.Prometheus{ Host: strPtr("locahost"), Port: intPtr(8080), }, @@ -83,10 +82,10 @@ func TestMetricReader(t *testing.T) { }, { name: "periodic/invalid-exporter", - reader: telemetry.MetricReader{ - Periodic: &telemetry.PeriodicMetricReader{ - Exporter: telemetry.MetricExporter{ - Prometheus: &telemetry.Prometheus{ + reader: config.MetricReader{ + Periodic: &config.PeriodicMetricReader{ + Exporter: config.MetricExporter{ + Prometheus: &config.Prometheus{ Host: strPtr("locahost"), Port: intPtr(8080), }, @@ -97,39 +96,39 @@ func TestMetricReader(t *testing.T) { }, { name: "periodic/no-exporter", - reader: telemetry.MetricReader{ - Periodic: &telemetry.PeriodicMetricReader{}, + reader: config.MetricReader{ + Periodic: &config.PeriodicMetricReader{}, }, err: errNoValidMetricExporter, }, { name: "periodic/console-exporter", - reader: telemetry.MetricReader{ - Periodic: &telemetry.PeriodicMetricReader{ - Exporter: telemetry.MetricExporter{ - Console: telemetry.Console{}, + reader: config.MetricReader{ + Periodic: &config.PeriodicMetricReader{ + Exporter: config.MetricExporter{ + Console: config.Console{}, }, }, }, }, { name: "periodic/console-exporter-with-timeout-interval", - reader: telemetry.MetricReader{ - Periodic: &telemetry.PeriodicMetricReader{ + reader: config.MetricReader{ + Periodic: &config.PeriodicMetricReader{ Interval: intPtr(10), Timeout: intPtr(5), - Exporter: telemetry.MetricExporter{ - Console: telemetry.Console{}, + Exporter: config.MetricExporter{ + Console: config.Console{}, }, }, }, }, { name: "periodic/otlp-exporter-invalid-protocol", - reader: telemetry.MetricReader{ - Periodic: &telemetry.PeriodicMetricReader{ - Exporter: telemetry.MetricExporter{ - Otlp: &telemetry.OtlpMetric{ + reader: config.MetricReader{ + Periodic: &config.PeriodicMetricReader{ + Exporter: config.MetricExporter{ + OTLP: &config.OTLPMetric{ Protocol: *strPtr("http/invalid"), }, }, @@ -139,10 +138,10 @@ func TestMetricReader(t *testing.T) { }, { name: "periodic/otlp-grpc-exporter-no-endpoint", - reader: telemetry.MetricReader{ - Periodic: &telemetry.PeriodicMetricReader{ - Exporter: telemetry.MetricExporter{ - Otlp: &telemetry.OtlpMetric{ + reader: config.MetricReader{ + Periodic: &config.PeriodicMetricReader{ + Exporter: config.MetricExporter{ + OTLP: &config.OTLPMetric{ Protocol: "grpc/protobuf", Compression: strPtr("gzip"), Timeout: intPtr(1000), @@ -156,10 +155,10 @@ func TestMetricReader(t *testing.T) { }, { name: "periodic/otlp-grpc-exporter", - reader: telemetry.MetricReader{ - Periodic: &telemetry.PeriodicMetricReader{ - Exporter: telemetry.MetricExporter{ - Otlp: &telemetry.OtlpMetric{ + reader: config.MetricReader{ + Periodic: &config.PeriodicMetricReader{ + Exporter: config.MetricExporter{ + OTLP: &config.OTLPMetric{ Protocol: "grpc/protobuf", Endpoint: "http://localhost:4317", Compression: strPtr("none"), @@ -174,10 +173,10 @@ func TestMetricReader(t *testing.T) { }, { name: "periodic/otlp-grpc-exporter-no-scheme", - reader: telemetry.MetricReader{ - Periodic: &telemetry.PeriodicMetricReader{ - Exporter: telemetry.MetricExporter{ - Otlp: &telemetry.OtlpMetric{ + reader: config.MetricReader{ + Periodic: &config.PeriodicMetricReader{ + Exporter: config.MetricExporter{ + OTLP: &config.OTLPMetric{ Protocol: "grpc/protobuf", Endpoint: "localhost:4317", Compression: strPtr("gzip"), @@ -192,10 +191,10 @@ func TestMetricReader(t *testing.T) { }, { name: "periodic/otlp-grpc-invalid-endpoint", - reader: telemetry.MetricReader{ - Periodic: &telemetry.PeriodicMetricReader{ - Exporter: telemetry.MetricExporter{ - Otlp: &telemetry.OtlpMetric{ + reader: config.MetricReader{ + Periodic: &config.PeriodicMetricReader{ + Exporter: config.MetricExporter{ + OTLP: &config.OTLPMetric{ Protocol: "grpc/protobuf", Endpoint: " ", Compression: strPtr("gzip"), @@ -211,10 +210,10 @@ func TestMetricReader(t *testing.T) { }, { name: "periodic/otlp-grpc-invalid-compression", - reader: telemetry.MetricReader{ - Periodic: &telemetry.PeriodicMetricReader{ - Exporter: telemetry.MetricExporter{ - Otlp: &telemetry.OtlpMetric{ + reader: config.MetricReader{ + Periodic: &config.PeriodicMetricReader{ + Exporter: config.MetricExporter{ + OTLP: &config.OTLPMetric{ Protocol: "grpc/protobuf", Endpoint: "localhost:4317", Compression: strPtr("invalid"), @@ -230,10 +229,10 @@ func TestMetricReader(t *testing.T) { }, { name: "periodic/otlp-http-exporter", - reader: telemetry.MetricReader{ - Periodic: &telemetry.PeriodicMetricReader{ - Exporter: telemetry.MetricExporter{ - Otlp: &telemetry.OtlpMetric{ + reader: config.MetricReader{ + Periodic: &config.PeriodicMetricReader{ + Exporter: config.MetricExporter{ + OTLP: &config.OTLPMetric{ Protocol: "http/protobuf", Endpoint: "http://localhost:4318", Compression: strPtr("gzip"), @@ -248,10 +247,10 @@ func TestMetricReader(t *testing.T) { }, { name: "periodic/otlp-http-exporter-with-path", - reader: telemetry.MetricReader{ - Periodic: &telemetry.PeriodicMetricReader{ - Exporter: telemetry.MetricExporter{ - Otlp: &telemetry.OtlpMetric{ + reader: config.MetricReader{ + Periodic: &config.PeriodicMetricReader{ + Exporter: config.MetricExporter{ + OTLP: &config.OTLPMetric{ Protocol: "http/protobuf", Endpoint: "http://localhost:4318/path/123", Compression: strPtr("none"), @@ -266,10 +265,10 @@ func TestMetricReader(t *testing.T) { }, { name: "periodic/otlp-http-exporter-no-endpoint", - reader: telemetry.MetricReader{ - Periodic: &telemetry.PeriodicMetricReader{ - Exporter: telemetry.MetricExporter{ - Otlp: &telemetry.OtlpMetric{ + reader: config.MetricReader{ + Periodic: &config.PeriodicMetricReader{ + Exporter: config.MetricExporter{ + OTLP: &config.OTLPMetric{ Protocol: "http/protobuf", Compression: strPtr("gzip"), Timeout: intPtr(1000), @@ -283,10 +282,10 @@ func TestMetricReader(t *testing.T) { }, { name: "periodic/otlp-http-exporter-no-scheme", - reader: telemetry.MetricReader{ - Periodic: &telemetry.PeriodicMetricReader{ - Exporter: telemetry.MetricExporter{ - Otlp: &telemetry.OtlpMetric{ + reader: config.MetricReader{ + Periodic: &config.PeriodicMetricReader{ + Exporter: config.MetricExporter{ + OTLP: &config.OTLPMetric{ Protocol: "http/protobuf", Endpoint: "localhost:4318", Compression: strPtr("gzip"), @@ -301,10 +300,10 @@ func TestMetricReader(t *testing.T) { }, { name: "periodic/otlp-http-invalid-endpoint", - reader: telemetry.MetricReader{ - Periodic: &telemetry.PeriodicMetricReader{ - Exporter: telemetry.MetricExporter{ - Otlp: &telemetry.OtlpMetric{ + reader: config.MetricReader{ + Periodic: &config.PeriodicMetricReader{ + Exporter: config.MetricExporter{ + OTLP: &config.OTLPMetric{ Protocol: "http/protobuf", Endpoint: " ", Compression: strPtr("gzip"), @@ -320,10 +319,10 @@ func TestMetricReader(t *testing.T) { }, { name: "periodic/otlp-http-invalid-compression", - reader: telemetry.MetricReader{ - Periodic: &telemetry.PeriodicMetricReader{ - Exporter: telemetry.MetricExporter{ - Otlp: &telemetry.OtlpMetric{ + reader: config.MetricReader{ + Periodic: &config.PeriodicMetricReader{ + Exporter: config.MetricExporter{ + OTLP: &config.OTLPMetric{ Protocol: "http/protobuf", Endpoint: "localhost:4318", Compression: strPtr("invalid"), @@ -340,7 +339,15 @@ func TestMetricReader(t *testing.T) { } for _, tt := range testCases { t.Run(tt.name, func(t *testing.T) { - _, _, err := InitMetricReader(context.Background(), tt.reader, make(chan error)) + reader, server, err := InitMetricReader(context.Background(), tt.reader, make(chan error)) + defer func() { + if reader != nil { + assert.NoError(t, reader.Shutdown(context.Background())) + } + if server != nil { + assert.NoError(t, server.Shutdown(context.Background())) + } + }() assert.Equal(t, tt.err, err) }) } @@ -349,7 +356,7 @@ func TestMetricReader(t *testing.T) { func TestSpanProcessor(t *testing.T) { testCases := []struct { name string - processor telemetry.SpanProcessor + processor config.SpanProcessor args any err error }{ @@ -359,20 +366,20 @@ func TestSpanProcessor(t *testing.T) { }, { name: "batch processor invalid exporter", - processor: telemetry.SpanProcessor{ - Batch: &telemetry.BatchSpanProcessor{ - Exporter: telemetry.SpanExporter{}, + processor: config.SpanProcessor{ + Batch: &config.BatchSpanProcessor{ + Exporter: config.SpanExporter{}, }, }, err: errNoValidSpanExporter, }, { name: "batch processor invalid batch size console exporter", - processor: telemetry.SpanProcessor{ - Batch: &telemetry.BatchSpanProcessor{ + processor: config.SpanProcessor{ + Batch: &config.BatchSpanProcessor{ MaxExportBatchSize: intPtr(-1), - Exporter: telemetry.SpanExporter{ - Console: telemetry.Console{}, + Exporter: config.SpanExporter{ + Console: config.Console{}, }, }, }, @@ -380,11 +387,11 @@ func TestSpanProcessor(t *testing.T) { }, { name: "batch processor invalid export timeout console exporter", - processor: telemetry.SpanProcessor{ - Batch: &telemetry.BatchSpanProcessor{ + processor: config.SpanProcessor{ + Batch: &config.BatchSpanProcessor{ ExportTimeout: intPtr(-2), - Exporter: telemetry.SpanExporter{ - Console: telemetry.Console{}, + Exporter: config.SpanExporter{ + Console: config.Console{}, }, }, }, @@ -392,11 +399,11 @@ func TestSpanProcessor(t *testing.T) { }, { name: "batch processor invalid queue size console exporter", - processor: telemetry.SpanProcessor{ - Batch: &telemetry.BatchSpanProcessor{ + processor: config.SpanProcessor{ + Batch: &config.BatchSpanProcessor{ MaxQueueSize: intPtr(-3), - Exporter: telemetry.SpanExporter{ - Console: telemetry.Console{}, + Exporter: config.SpanExporter{ + Console: config.Console{}, }, }, }, @@ -404,11 +411,11 @@ func TestSpanProcessor(t *testing.T) { }, { name: "batch processor invalid schedule delay console exporter", - processor: telemetry.SpanProcessor{ - Batch: &telemetry.BatchSpanProcessor{ + processor: config.SpanProcessor{ + Batch: &config.BatchSpanProcessor{ ScheduleDelay: intPtr(-4), - Exporter: telemetry.SpanExporter{ - Console: telemetry.Console{}, + Exporter: config.SpanExporter{ + Console: config.Console{}, }, }, }, @@ -416,28 +423,28 @@ func TestSpanProcessor(t *testing.T) { }, { name: "batch processor console exporter", - processor: telemetry.SpanProcessor{ - Batch: &telemetry.BatchSpanProcessor{ + processor: config.SpanProcessor{ + Batch: &config.BatchSpanProcessor{ MaxExportBatchSize: intPtr(0), ExportTimeout: intPtr(0), MaxQueueSize: intPtr(0), ScheduleDelay: intPtr(0), - Exporter: telemetry.SpanExporter{ - Console: telemetry.Console{}, + Exporter: config.SpanExporter{ + Console: config.Console{}, }, }, }, }, { name: "batch/otlp-exporter-invalid-protocol", - processor: telemetry.SpanProcessor{ - Batch: &telemetry.BatchSpanProcessor{ + processor: config.SpanProcessor{ + Batch: &config.BatchSpanProcessor{ MaxExportBatchSize: intPtr(0), ExportTimeout: intPtr(0), MaxQueueSize: intPtr(0), ScheduleDelay: intPtr(0), - Exporter: telemetry.SpanExporter{ - Otlp: &telemetry.Otlp{ + Exporter: config.SpanExporter{ + OTLP: &config.OTLP{ Protocol: *strPtr("http/invalid"), }, }, @@ -447,14 +454,14 @@ func TestSpanProcessor(t *testing.T) { }, { name: "batch/otlp-grpc-exporter-no-endpoint", - processor: telemetry.SpanProcessor{ - Batch: &telemetry.BatchSpanProcessor{ + processor: config.SpanProcessor{ + Batch: &config.BatchSpanProcessor{ MaxExportBatchSize: intPtr(0), ExportTimeout: intPtr(0), MaxQueueSize: intPtr(0), ScheduleDelay: intPtr(0), - Exporter: telemetry.SpanExporter{ - Otlp: &telemetry.Otlp{ + Exporter: config.SpanExporter{ + OTLP: &config.OTLP{ Protocol: "grpc/protobuf", Compression: strPtr("gzip"), Timeout: intPtr(1000), @@ -468,14 +475,14 @@ func TestSpanProcessor(t *testing.T) { }, { name: "batch/otlp-grpc-exporter", - processor: telemetry.SpanProcessor{ - Batch: &telemetry.BatchSpanProcessor{ + processor: config.SpanProcessor{ + Batch: &config.BatchSpanProcessor{ MaxExportBatchSize: intPtr(0), ExportTimeout: intPtr(0), MaxQueueSize: intPtr(0), ScheduleDelay: intPtr(0), - Exporter: telemetry.SpanExporter{ - Otlp: &telemetry.Otlp{ + Exporter: config.SpanExporter{ + OTLP: &config.OTLP{ Protocol: "grpc/protobuf", Endpoint: "http://localhost:4317", Compression: strPtr("gzip"), @@ -490,14 +497,14 @@ func TestSpanProcessor(t *testing.T) { }, { name: "batch/otlp-grpc-exporter-no-scheme", - processor: telemetry.SpanProcessor{ - Batch: &telemetry.BatchSpanProcessor{ + processor: config.SpanProcessor{ + Batch: &config.BatchSpanProcessor{ MaxExportBatchSize: intPtr(0), ExportTimeout: intPtr(0), MaxQueueSize: intPtr(0), ScheduleDelay: intPtr(0), - Exporter: telemetry.SpanExporter{ - Otlp: &telemetry.Otlp{ + Exporter: config.SpanExporter{ + OTLP: &config.OTLP{ Protocol: "grpc/protobuf", Endpoint: "localhost:4317", Compression: strPtr("gzip"), @@ -512,14 +519,14 @@ func TestSpanProcessor(t *testing.T) { }, { name: "batch/otlp-grpc-invalid-endpoint", - processor: telemetry.SpanProcessor{ - Batch: &telemetry.BatchSpanProcessor{ + processor: config.SpanProcessor{ + Batch: &config.BatchSpanProcessor{ MaxExportBatchSize: intPtr(0), ExportTimeout: intPtr(0), MaxQueueSize: intPtr(0), ScheduleDelay: intPtr(0), - Exporter: telemetry.SpanExporter{ - Otlp: &telemetry.Otlp{ + Exporter: config.SpanExporter{ + OTLP: &config.OTLP{ Protocol: "grpc/protobuf", Endpoint: " ", Compression: strPtr("gzip"), @@ -535,14 +542,14 @@ func TestSpanProcessor(t *testing.T) { }, { name: "batch/otlp-grpc-invalid-compression", - processor: telemetry.SpanProcessor{ - Batch: &telemetry.BatchSpanProcessor{ + processor: config.SpanProcessor{ + Batch: &config.BatchSpanProcessor{ MaxExportBatchSize: intPtr(0), ExportTimeout: intPtr(0), MaxQueueSize: intPtr(0), ScheduleDelay: intPtr(0), - Exporter: telemetry.SpanExporter{ - Otlp: &telemetry.Otlp{ + Exporter: config.SpanExporter{ + OTLP: &config.OTLP{ Protocol: "grpc/protobuf", Endpoint: "localhost:4317", Compression: strPtr("invalid"), @@ -558,14 +565,14 @@ func TestSpanProcessor(t *testing.T) { }, { name: "batch/otlp-http-exporter", - processor: telemetry.SpanProcessor{ - Batch: &telemetry.BatchSpanProcessor{ + processor: config.SpanProcessor{ + Batch: &config.BatchSpanProcessor{ MaxExportBatchSize: intPtr(0), ExportTimeout: intPtr(0), MaxQueueSize: intPtr(0), ScheduleDelay: intPtr(0), - Exporter: telemetry.SpanExporter{ - Otlp: &telemetry.Otlp{ + Exporter: config.SpanExporter{ + OTLP: &config.OTLP{ Protocol: "http/protobuf", Endpoint: "http://localhost:4318", Compression: strPtr("gzip"), @@ -580,14 +587,14 @@ func TestSpanProcessor(t *testing.T) { }, { name: "batch/otlp-http-exporter-with-path", - processor: telemetry.SpanProcessor{ - Batch: &telemetry.BatchSpanProcessor{ + processor: config.SpanProcessor{ + Batch: &config.BatchSpanProcessor{ MaxExportBatchSize: intPtr(0), ExportTimeout: intPtr(0), MaxQueueSize: intPtr(0), ScheduleDelay: intPtr(0), - Exporter: telemetry.SpanExporter{ - Otlp: &telemetry.Otlp{ + Exporter: config.SpanExporter{ + OTLP: &config.OTLP{ Protocol: "http/protobuf", Endpoint: "http://localhost:4318/path/123", Compression: strPtr("none"), @@ -602,14 +609,14 @@ func TestSpanProcessor(t *testing.T) { }, { name: "batch/otlp-http-exporter-no-endpoint", - processor: telemetry.SpanProcessor{ - Batch: &telemetry.BatchSpanProcessor{ + processor: config.SpanProcessor{ + Batch: &config.BatchSpanProcessor{ MaxExportBatchSize: intPtr(0), ExportTimeout: intPtr(0), MaxQueueSize: intPtr(0), ScheduleDelay: intPtr(0), - Exporter: telemetry.SpanExporter{ - Otlp: &telemetry.Otlp{ + Exporter: config.SpanExporter{ + OTLP: &config.OTLP{ Protocol: "http/protobuf", Compression: strPtr("gzip"), Timeout: intPtr(1000), @@ -623,14 +630,14 @@ func TestSpanProcessor(t *testing.T) { }, { name: "batch/otlp-http-exporter-no-scheme", - processor: telemetry.SpanProcessor{ - Batch: &telemetry.BatchSpanProcessor{ + processor: config.SpanProcessor{ + Batch: &config.BatchSpanProcessor{ MaxExportBatchSize: intPtr(0), ExportTimeout: intPtr(0), MaxQueueSize: intPtr(0), ScheduleDelay: intPtr(0), - Exporter: telemetry.SpanExporter{ - Otlp: &telemetry.Otlp{ + Exporter: config.SpanExporter{ + OTLP: &config.OTLP{ Protocol: "http/protobuf", Endpoint: "localhost:4318", Compression: strPtr("gzip"), @@ -645,14 +652,14 @@ func TestSpanProcessor(t *testing.T) { }, { name: "batch/otlp-http-invalid-endpoint", - processor: telemetry.SpanProcessor{ - Batch: &telemetry.BatchSpanProcessor{ + processor: config.SpanProcessor{ + Batch: &config.BatchSpanProcessor{ MaxExportBatchSize: intPtr(0), ExportTimeout: intPtr(0), MaxQueueSize: intPtr(0), ScheduleDelay: intPtr(0), - Exporter: telemetry.SpanExporter{ - Otlp: &telemetry.Otlp{ + Exporter: config.SpanExporter{ + OTLP: &config.OTLP{ Protocol: "http/protobuf", Endpoint: " ", Compression: strPtr("gzip"), @@ -668,14 +675,14 @@ func TestSpanProcessor(t *testing.T) { }, { name: "batch/otlp-http-invalid-compression", - processor: telemetry.SpanProcessor{ - Batch: &telemetry.BatchSpanProcessor{ + processor: config.SpanProcessor{ + Batch: &config.BatchSpanProcessor{ MaxExportBatchSize: intPtr(0), ExportTimeout: intPtr(0), MaxQueueSize: intPtr(0), ScheduleDelay: intPtr(0), - Exporter: telemetry.SpanExporter{ - Otlp: &telemetry.Otlp{ + Exporter: config.SpanExporter{ + OTLP: &config.OTLP{ Protocol: "http/protobuf", Endpoint: "localhost:4318", Compression: strPtr("invalid"), @@ -692,7 +699,12 @@ func TestSpanProcessor(t *testing.T) { } for _, tt := range testCases { t.Run(tt.name, func(t *testing.T) { - _, err := InitSpanProcessor(context.Background(), tt.processor) + processor, err := InitSpanProcessor(context.Background(), tt.processor) + defer func() { + if processor != nil { + assert.NoError(t, processor.Shutdown(context.Background())) + } + }() assert.Equal(t, tt.err, err) }) } diff --git a/service/internal/proctelemetry/process_telemetry.go b/service/internal/proctelemetry/process_telemetry.go index a5e80443fcd..991897f8b1b 100644 --- a/service/internal/proctelemetry/process_telemetry.go +++ b/service/internal/proctelemetry/process_telemetry.go @@ -5,7 +5,6 @@ package proctelemetry // import "go.opentelemetry.io/collector/service/internal/ import ( "context" - "errors" "os" "runtime" "sync" @@ -13,10 +12,7 @@ import ( "github.com/shirou/gopsutil/v3/common" "github.com/shirou/gopsutil/v3/process" - "go.opencensus.io/metric" - "go.opencensus.io/stats" otelmetric "go.opentelemetry.io/otel/metric" - sdkmetric "go.opentelemetry.io/otel/sdk/metric" "go.uber.org/multierr" ) @@ -32,14 +28,6 @@ type processMetrics struct { proc *process.Process context context.Context - processUptime *metric.Float64DerivedCumulative - allocMem *metric.Int64DerivedGauge - totalAllocMem *metric.Int64DerivedCumulative - sysMem *metric.Int64DerivedGauge - cpuSeconds *metric.Float64DerivedCumulative - rssMemory *metric.Int64DerivedGauge - - // otel metrics otelProcessUptime otelmetric.Float64ObservableCounter otelAllocMem otelmetric.Int64ObservableGauge otelTotalAllocMem otelmetric.Int64ObservableCounter @@ -76,7 +64,7 @@ func WithHostProc(hostProc string) RegisterOption { // RegisterProcessMetrics creates a new set of processMetrics (mem, cpu) that can be used to measure // basic information about this process. -func RegisterProcessMetrics(ocRegistry *metric.Registry, mp otelmetric.MeterProvider, useOtel bool, ballastSizeBytes uint64, opts ...RegisterOption) error { +func RegisterProcessMetrics(mp otelmetric.MeterProvider, ballastSizeBytes uint64, opts ...RegisterOption) error { set := registerOption{} for _, opt := range opts { opt.apply(&set) @@ -98,85 +86,10 @@ func RegisterProcessMetrics(ocRegistry *metric.Registry, mp otelmetric.MeterProv return err } - if useOtel { - // ignore instrument name error as per workaround in https://github.com/open-telemetry/opentelemetry-collector/issues/8346 - if err = pm.recordWithOtel(mp.Meter(scopeName)); err != nil && !errors.Is(err, sdkmetric.ErrInstrumentName) { - return err - } - return nil - } - return pm.recordWithOC(ocRegistry) -} - -func (pm *processMetrics) recordWithOC(ocRegistry *metric.Registry) error { - var err error - - pm.processUptime, err = ocRegistry.AddFloat64DerivedCumulative( - "process/uptime", - metric.WithDescription("Uptime of the process"), - metric.WithUnit(stats.UnitSeconds)) - if err != nil { - return err - } - if err = pm.processUptime.UpsertEntry(pm.updateProcessUptime); err != nil { - return err - } - - pm.allocMem, err = ocRegistry.AddInt64DerivedGauge( - "process/runtime/heap_alloc_bytes", - metric.WithDescription("Bytes of allocated heap objects (see 'go doc runtime.MemStats.HeapAlloc')"), - metric.WithUnit(stats.UnitBytes)) - if err != nil { - return err - } - if err = pm.allocMem.UpsertEntry(pm.updateAllocMem); err != nil { - return err - } - - pm.totalAllocMem, err = ocRegistry.AddInt64DerivedCumulative( - "process/runtime/total_alloc_bytes", - metric.WithDescription("Cumulative bytes allocated for heap objects (see 'go doc runtime.MemStats.TotalAlloc')"), - metric.WithUnit(stats.UnitBytes)) - if err != nil { - return err - } - if err = pm.totalAllocMem.UpsertEntry(pm.updateTotalAllocMem); err != nil { - return err - } - - pm.sysMem, err = ocRegistry.AddInt64DerivedGauge( - "process/runtime/total_sys_memory_bytes", - metric.WithDescription("Total bytes of memory obtained from the OS (see 'go doc runtime.MemStats.Sys')"), - metric.WithUnit(stats.UnitBytes)) - if err != nil { - return err - } - if err = pm.sysMem.UpsertEntry(pm.updateSysMem); err != nil { - return err - } - - pm.cpuSeconds, err = ocRegistry.AddFloat64DerivedCumulative( - "process/cpu_seconds", - metric.WithDescription("Total CPU user and system time in seconds"), - metric.WithUnit(stats.UnitSeconds)) - if err != nil { - return err - } - if err = pm.cpuSeconds.UpsertEntry(pm.updateCPUSeconds); err != nil { - return err - } - - pm.rssMemory, err = ocRegistry.AddInt64DerivedGauge( - "process/memory/rss", - metric.WithDescription("Total physical memory (resident set size)"), - metric.WithUnit(stats.UnitBytes)) - if err != nil { - return err - } - return pm.rssMemory.UpsertEntry(pm.updateRSSMemory) + return pm.record(mp.Meter(scopeName)) } -func (pm *processMetrics) recordWithOtel(meter otelmetric.Meter) error { +func (pm *processMetrics) record(meter otelmetric.Meter) error { var errs, err error pm.otelProcessUptime, err = meter.Float64ObservableCounter( diff --git a/service/internal/proctelemetry/process_telemetry_linux_test.go b/service/internal/proctelemetry/process_telemetry_linux_test.go index d42838b2782..1a15f28fc7e 100644 --- a/service/internal/proctelemetry/process_telemetry_linux_test.go +++ b/service/internal/proctelemetry/process_telemetry_linux_test.go @@ -2,52 +2,50 @@ // SPDX-License-Identifier: Apache-2.0 //go:build linux -// +build linux package proctelemetry import ( + "fmt" + "strings" "testing" "time" + io_prometheus_client "github.com/prometheus/client_model/go" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opencensus.io/metric" - "go.opentelemetry.io/otel/metric/noop" ) -func TestOCProcessTelemetryWithHostProc(t *testing.T) { - ocRegistry := metric.NewRegistry() +func TestProcessTelemetryWithHostProc(t *testing.T) { + tel := setupTelemetry(t) // Make the sure the environment variable value is not used. t.Setenv("HOST_PROC", "foo/bar") - require.NoError(t, RegisterProcessMetrics(ocRegistry, noop.NewMeterProvider(), false, 0, WithHostProc("/proc"))) + require.NoError(t, RegisterProcessMetrics(tel.MeterProvider, 0, WithHostProc("/proc"))) // Check that the metrics are actually filled. time.Sleep(200 * time.Millisecond) - metrics := ocRegistry.Read() + mp, err := fetchPrometheusMetrics(tel.promHandler) + require.NoError(t, err) for _, metricName := range expectedMetrics { - m := findMetric(metrics, metricName) - require.NotNil(t, m) - require.Len(t, m.TimeSeries, 1) - ts := m.TimeSeries[0] - assert.Len(t, ts.LabelValues, 0) - require.Len(t, ts.Points, 1) - - var value float64 - if metricName == "process/uptime" || metricName == "process/cpu_seconds" { - value = ts.Points[0].Value.(float64) + metric, ok := mp[metricName] + require.True(t, ok) + require.True(t, len(metric.Metric) == 1) + var metricValue float64 + if metric.GetType() == io_prometheus_client.MetricType_COUNTER { + metricValue = metric.Metric[0].GetCounter().GetValue() } else { - value = float64(ts.Points[0].Value.(int64)) + metricValue = metric.Metric[0].GetGauge().GetValue() } - - if metricName == "process/uptime" || metricName == "process/cpu_seconds" { + if strings.HasPrefix(metricName, "process_uptime") || strings.HasPrefix(metricName, "process_cpu_seconds") { // This likely will still be zero when running the test. - assert.GreaterOrEqual(t, value, float64(0), metricName) + assert.GreaterOrEqual(t, metricValue, float64(0), metricName) continue } - assert.Greater(t, value, float64(0), metricName) + + fmt.Println(metricName) + assert.Greater(t, metricValue, float64(0), metricName) } } diff --git a/service/internal/proctelemetry/process_telemetry_test.go b/service/internal/proctelemetry/process_telemetry_test.go index 5caa96417bd..40d0f54ef27 100644 --- a/service/internal/proctelemetry/process_telemetry_test.go +++ b/service/internal/proctelemetry/process_telemetry_test.go @@ -9,7 +9,6 @@ import ( "net/http/httptest" "strings" "testing" - "time" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" @@ -17,42 +16,22 @@ import ( "github.com/prometheus/common/expfmt" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opencensus.io/metric" - "go.opencensus.io/metric/metricdata" - "go.opencensus.io/stats/view" otelprom "go.opentelemetry.io/otel/exporters/prometheus" - "go.opentelemetry.io/otel/metric/noop" sdkmetric "go.opentelemetry.io/otel/sdk/metric" "go.opentelemetry.io/otel/sdk/resource" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/configtelemetry" - "go.opentelemetry.io/collector/internal/obsreportconfig" ) type testTelemetry struct { component.TelemetrySettings - views []*view.View - promHandler http.Handler - meterProvider *sdkmetric.MeterProvider - expectedMetrics []string + promHandler http.Handler + meterProvider *sdkmetric.MeterProvider } var expectedMetrics = []string{ - // Changing a metric name is a breaking change. - // Adding new metrics is ok as long it follows the conventions described at - // https://pkg.go.dev/go.opentelemetry.io/collector/obsreport?tab=doc#hdr-Naming_Convention_for_New_Metrics - "process/uptime", - "process/runtime/heap_alloc_bytes", - "process/runtime/total_alloc_bytes", - "process/runtime/total_sys_memory_bytes", - "process/cpu_seconds", - "process/memory/rss", -} - -var otelExpectedMetrics = []string{ - // OTel Go adds `_total` suffix "process_uptime", "process_runtime_heap_alloc_bytes", "process_runtime_total_alloc_bytes", @@ -64,16 +43,11 @@ var otelExpectedMetrics = []string{ func setupTelemetry(t *testing.T) testTelemetry { settings := testTelemetry{ TelemetrySettings: componenttest.NewNopTelemetrySettings(), - expectedMetrics: otelExpectedMetrics, } settings.TelemetrySettings.MetricsLevel = configtelemetry.LevelNormal - settings.views = obsreportconfig.AllViews(configtelemetry.LevelNormal) - err := view.Register(settings.views...) - require.NoError(t, err) - promReg := prometheus.NewRegistry() - exporter, err := otelprom.New(otelprom.WithRegisterer(promReg), otelprom.WithoutUnits()) + exporter, err := otelprom.New(otelprom.WithRegisterer(promReg), otelprom.WithoutUnits(), otelprom.WithoutCounterSuffixes()) require.NoError(t, err) settings.meterProvider = sdkmetric.NewMeterProvider( @@ -102,20 +76,16 @@ func fetchPrometheusMetrics(handler http.Handler) (map[string]*io_prometheus_cli return parser.TextToMetricFamilies(rr.Body) } -func TestOtelProcessTelemetry(t *testing.T) { +func TestProcessTelemetry(t *testing.T) { tel := setupTelemetry(t) - require.NoError(t, RegisterProcessMetrics(nil, tel.MeterProvider, true, 0)) + require.NoError(t, RegisterProcessMetrics(tel.MeterProvider, 0)) mp, err := fetchPrometheusMetrics(tel.promHandler) require.NoError(t, err) - for _, metricName := range tel.expectedMetrics { + for _, metricName := range expectedMetrics { metric, ok := mp[metricName] - if !ok { - withSuffix := metricName + "_total" - metric, ok = mp[withSuffix] - } require.True(t, ok) require.True(t, len(metric.Metric) == 1) var metricValue float64 @@ -133,58 +103,3 @@ func TestOtelProcessTelemetry(t *testing.T) { assert.Greater(t, metricValue, float64(0), metricName) } } - -func TestOCProcessTelemetry(t *testing.T) { - ocRegistry := metric.NewRegistry() - - require.NoError(t, RegisterProcessMetrics(ocRegistry, noop.NewMeterProvider(), false, 0)) - - // Check that the metrics are actually filled. - <-time.After(200 * time.Millisecond) - - metrics := ocRegistry.Read() - - for _, metricName := range expectedMetrics { - m := findMetric(metrics, metricName) - require.NotNil(t, m) - require.Len(t, m.TimeSeries, 1) - ts := m.TimeSeries[0] - assert.Len(t, ts.LabelValues, 0) - require.Len(t, ts.Points, 1) - - var value float64 - if metricName == "process/uptime" || metricName == "process/cpu_seconds" { - value = ts.Points[0].Value.(float64) - } else { - value = float64(ts.Points[0].Value.(int64)) - } - - if metricName == "process/uptime" || metricName == "process/cpu_seconds" { - // This likely will still be zero when running the test. - assert.GreaterOrEqual(t, value, float64(0), metricName) - continue - } - - assert.Greater(t, value, float64(0), metricName) - } -} - -func TestProcessTelemetryFailToRegister(t *testing.T) { - for _, metricName := range expectedMetrics { - t.Run(metricName, func(t *testing.T) { - ocRegistry := metric.NewRegistry() - _, err := ocRegistry.AddFloat64Gauge(metricName) - require.NoError(t, err) - assert.Error(t, RegisterProcessMetrics(ocRegistry, noop.NewMeterProvider(), false, 0)) - }) - } -} - -func findMetric(metrics []*metricdata.Metric, name string) *metricdata.Metric { - for _, m := range metrics { - if m.Descriptor.Name == name { - return m - } - } - return nil -} diff --git a/service/internal/resource/config.go b/service/internal/resource/config.go new file mode 100644 index 00000000000..1f233ddde97 --- /dev/null +++ b/service/internal/resource/config.go @@ -0,0 +1,44 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package resource // import "go.opentelemetry.io/collector/service/internal/resource" + +import ( + "github.com/google/uuid" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/sdk/resource" + + "go.opentelemetry.io/collector/component" + semconv "go.opentelemetry.io/collector/semconv/v1.18.0" +) + +// New resource from telemetry configuration. +func New(buildInfo component.BuildInfo, resourceCfg map[string]*string) *resource.Resource { + var telAttrs []attribute.KeyValue + + for k, v := range resourceCfg { + // nil value indicates that the attribute should not be included in the telemetry. + if v != nil { + telAttrs = append(telAttrs, attribute.String(k, *v)) + } + } + + if _, ok := resourceCfg[semconv.AttributeServiceName]; !ok { + // AttributeServiceName is not specified in the config. Use the default service name. + telAttrs = append(telAttrs, attribute.String(semconv.AttributeServiceName, buildInfo.Command)) + } + + if _, ok := resourceCfg[semconv.AttributeServiceInstanceID]; !ok { + // AttributeServiceInstanceID is not specified in the config. Auto-generate one. + instanceUUID, _ := uuid.NewRandom() + instanceID := instanceUUID.String() + telAttrs = append(telAttrs, attribute.String(semconv.AttributeServiceInstanceID, instanceID)) + } + + if _, ok := resourceCfg[semconv.AttributeServiceVersion]; !ok { + // AttributeServiceVersion is not specified in the config. Use the actual + // build version. + telAttrs = append(telAttrs, attribute.String(semconv.AttributeServiceVersion, buildInfo.Version)) + } + return resource.NewWithAttributes(semconv.SchemaURL, telAttrs...) +} diff --git a/service/internal/resource/config_test.go b/service/internal/resource/config_test.go new file mode 100644 index 00000000000..ab8f8e816c3 --- /dev/null +++ b/service/internal/resource/config_test.go @@ -0,0 +1,103 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package resource + +import ( + "testing" + + "github.com/google/uuid" + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/component" +) + +const ( + randomUUIDSpecialValue = "random-uuid" +) + +var buildInfo = component.BuildInfo{ + Command: "otelcol", + Version: "1.0.0", +} + +func ptr[T any](v T) *T { + return &v +} + +func TestNew(t *testing.T) { + tests := []struct { + name string + resourceCfg map[string]*string + want map[string]string + }{ + { + name: "empty", + resourceCfg: map[string]*string{}, + want: map[string]string{ + "service.name": "otelcol", + "service.version": "1.0.0", + "service.instance.id": randomUUIDSpecialValue, + }, + }, + { + name: "overwrite", + resourceCfg: map[string]*string{ + "service.name": ptr("my-service"), + "service.version": ptr("1.2.3"), + "service.instance.id": ptr("123"), + }, + want: map[string]string{ + "service.name": "my-service", + "service.version": "1.2.3", + "service.instance.id": "123", + }, + }, + { + name: "remove", + resourceCfg: map[string]*string{ + "service.name": nil, + "service.version": nil, + "service.instance.id": nil, + }, + want: map[string]string{}, + }, + { + name: "add", + resourceCfg: map[string]*string{ + "host.name": ptr("my-host"), + }, + want: map[string]string{ + "service.name": "otelcol", + "service.version": "1.0.0", + "service.instance.id": randomUUIDSpecialValue, + "host.name": "my-host", + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + res := New(buildInfo, tt.resourceCfg) + got := make(map[string]string) + for _, attr := range res.Attributes() { + got[string(attr.Key)] = attr.Value.Emit() + } + + if tt.want["service.instance.id"] == randomUUIDSpecialValue { + assert.Contains(t, got, "service.instance.id") + + // Check that the value is a valid UUID. + _, err := uuid.Parse(got["service.instance.id"]) + assert.NoError(t, err) + + // Remove so that we can compare the rest of the map. + delete(got, "service.instance.id") + delete(tt.want, "service.instance.id") + } + + assert.EqualValues(t, tt.want, got) + }) + } + +} diff --git a/service/internal/servicetelemetry/nop_telemetry_settings.go b/service/internal/servicetelemetry/nop_telemetry_settings.go new file mode 100644 index 00000000000..116554a51f8 --- /dev/null +++ b/service/internal/servicetelemetry/nop_telemetry_settings.go @@ -0,0 +1,27 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package servicetelemetry // import "go.opentelemetry.io/collector/service/internal/servicetelemetry" + +import ( + noopmetric "go.opentelemetry.io/otel/metric/noop" + nooptrace "go.opentelemetry.io/otel/trace/noop" + "go.uber.org/zap" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/service/internal/status" +) + +// NewNopTelemetrySettings returns a new nop settings for Create* functions. +func NewNopTelemetrySettings() TelemetrySettings { + return TelemetrySettings{ + Logger: zap.NewNop(), + TracerProvider: nooptrace.NewTracerProvider(), + MeterProvider: noopmetric.NewMeterProvider(), + MetricsLevel: configtelemetry.LevelNone, + Resource: pcommon.NewResource(), + Status: status.NewReporter(func(*component.InstanceID, *component.StatusEvent) {}, func(error) {}), + } +} diff --git a/service/internal/servicetelemetry/nop_telemetry_settings_test.go b/service/internal/servicetelemetry/nop_telemetry_settings_test.go new file mode 100644 index 00000000000..8c4a401e0f0 --- /dev/null +++ b/service/internal/servicetelemetry/nop_telemetry_settings_test.go @@ -0,0 +1,35 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package servicetelemetry + +import ( + "testing" + + "github.com/stretchr/testify/require" + noopmetric "go.opentelemetry.io/otel/metric/noop" + nooptrace "go.opentelemetry.io/otel/trace/noop" + "go.uber.org/zap" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" + "go.opentelemetry.io/collector/pdata/pcommon" +) + +func TestNewNopSettings(t *testing.T) { + set := NewNopTelemetrySettings() + set.Status.Ready() + require.NotNil(t, set) + require.IsType(t, TelemetrySettings{}, set) + require.Equal(t, zap.NewNop(), set.Logger) + require.Equal(t, nooptrace.NewTracerProvider(), set.TracerProvider) + require.Equal(t, noopmetric.NewMeterProvider(), set.MeterProvider) + require.Equal(t, configtelemetry.LevelNone, set.MetricsLevel) + require.Equal(t, pcommon.NewResource(), set.Resource) + set.Status.ReportStatus( + &component.InstanceID{}, + component.NewStatusEvent(component.StatusStarting), + ) + set.Status.ReportOKIfStarting(&component.InstanceID{}) + +} diff --git a/service/internal/servicetelemetry/package_test.go b/service/internal/servicetelemetry/package_test.go new file mode 100644 index 00000000000..0c9a1bc67a6 --- /dev/null +++ b/service/internal/servicetelemetry/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package servicetelemetry + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/service/internal/servicetelemetry/telemetry_settings.go b/service/internal/servicetelemetry/telemetry_settings.go new file mode 100644 index 00000000000..55c6b9f3962 --- /dev/null +++ b/service/internal/servicetelemetry/telemetry_settings.go @@ -0,0 +1,55 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package servicetelemetry // import "go.opentelemetry.io/collector/service/internal/servicetelemetry" + +import ( + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" + "go.uber.org/zap" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/service/internal/status" +) + +// TelemetrySettings mirrors component.TelemetrySettings except for the mechanism for reporting +// status. Service-level status reporting has additional methods which can report status for +// components by their InstanceID whereas the component versions are tied to a specific component. +type TelemetrySettings struct { + // Logger that the factory can use during creation and can pass to the created + // component to be used later as well. + Logger *zap.Logger + + // TracerProvider that the factory can pass to other instrumented third-party libraries. + TracerProvider trace.TracerProvider + + // MeterProvider that the factory can pass to other instrumented third-party libraries. + MeterProvider metric.MeterProvider + + // MetricsLevel controls the level of detail for metrics emitted by the collector. + // Experimental: *NOTE* this field is experimental and may be changed or removed. + MetricsLevel configtelemetry.Level + + // Resource contains the resource attributes for the collector's telemetry. + Resource pcommon.Resource + + // Status contains a Reporter that allows the service to report status on behalf of a + // component. + Status *status.Reporter +} + +// ToComponentTelemetrySettings returns a TelemetrySettings for a specific component derived from +// this service level Settings object. +func (s TelemetrySettings) ToComponentTelemetrySettings(id *component.InstanceID) component.TelemetrySettings { + statusFunc := status.NewReportStatusFunc(id, s.Status.ReportStatus) + return component.TelemetrySettings{ + Logger: s.Logger, + TracerProvider: s.TracerProvider, + MeterProvider: s.MeterProvider, + MetricsLevel: s.MetricsLevel, + Resource: s.Resource, + ReportStatus: statusFunc, + } +} diff --git a/service/internal/servicetelemetry/telemetry_settings_test.go b/service/internal/servicetelemetry/telemetry_settings_test.go new file mode 100644 index 00000000000..5aad2c6c2b6 --- /dev/null +++ b/service/internal/servicetelemetry/telemetry_settings_test.go @@ -0,0 +1,40 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package servicetelemetry + +import ( + "testing" + + "github.com/stretchr/testify/require" + noopmetric "go.opentelemetry.io/otel/metric/noop" + nooptrace "go.opentelemetry.io/otel/trace/noop" + "go.uber.org/zap" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/service/internal/status" +) + +func TestSettings(t *testing.T) { + set := TelemetrySettings{ + Logger: zap.NewNop(), + TracerProvider: nooptrace.NewTracerProvider(), + MeterProvider: noopmetric.NewMeterProvider(), + MetricsLevel: configtelemetry.LevelNone, + Resource: pcommon.NewResource(), + Status: status.NewReporter( + func(*component.InstanceID, *component.StatusEvent) {}, + func(err error) { require.NoError(t, err) }), + } + set.Status.Ready() + set.Status.ReportStatus( + &component.InstanceID{}, + component.NewStatusEvent(component.StatusStarting), + ) + set.Status.ReportOKIfStarting(&component.InstanceID{}) + + compSet := set.ToComponentTelemetrySettings(&component.InstanceID{}) + compSet.ReportStatus(component.NewStatusEvent(component.StatusStarting)) +} diff --git a/service/internal/status/package_test.go b/service/internal/status/package_test.go new file mode 100644 index 00000000000..a49dda2ff11 --- /dev/null +++ b/service/internal/status/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package status + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/service/internal/status/status.go b/service/internal/status/status.go new file mode 100644 index 00000000000..21790b1061f --- /dev/null +++ b/service/internal/status/status.go @@ -0,0 +1,193 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package status // import "go.opentelemetry.io/collector/service/internal/status" + +import ( + "errors" + "fmt" + "sync" + + "go.opentelemetry.io/collector/component" +) + +// onTransitionFunc receives a component.StatusEvent on a successful state transition +type onTransitionFunc func(*component.StatusEvent) + +// errInvalidStateTransition is returned for invalid state transitions +var errInvalidStateTransition = errors.New("invalid state transition") + +// fsm is a finite state machine that models transitions for component status +type fsm struct { + current *component.StatusEvent + transitions map[component.Status]map[component.Status]struct{} + onTransition onTransitionFunc +} + +// transition will attempt to execute a state transition. If it's successful, it calls the +// onTransitionFunc with a StatusEvent representing the new state. Returns an error if the arguments +// result in an invalid status, or if the state transition is not valid. +func (m *fsm) transition(ev *component.StatusEvent) error { + if _, ok := m.transitions[m.current.Status()][ev.Status()]; !ok { + return fmt.Errorf( + "cannot transition from %s to %s: %w", + m.current.Status(), + ev.Status(), + errInvalidStateTransition, + ) + } + m.current = ev + m.onTransition(ev) + return nil +} + +// newFSM creates a state machine with all valid transitions for component.Status. +// The initial state is set to component.StatusNone. +func newFSM(onTransition onTransitionFunc) *fsm { + return &fsm{ + current: component.NewStatusEvent(component.StatusNone), + onTransition: onTransition, + transitions: map[component.Status]map[component.Status]struct{}{ + component.StatusNone: { + component.StatusStarting: {}, + }, + component.StatusStarting: { + component.StatusOK: {}, + component.StatusRecoverableError: {}, + component.StatusPermanentError: {}, + component.StatusFatalError: {}, + component.StatusStopping: {}, + }, + component.StatusOK: { + component.StatusRecoverableError: {}, + component.StatusPermanentError: {}, + component.StatusFatalError: {}, + component.StatusStopping: {}, + }, + component.StatusRecoverableError: { + component.StatusOK: {}, + component.StatusPermanentError: {}, + component.StatusFatalError: {}, + component.StatusStopping: {}, + }, + component.StatusPermanentError: {}, + component.StatusFatalError: {}, + component.StatusStopping: { + component.StatusRecoverableError: {}, + component.StatusPermanentError: {}, + component.StatusFatalError: {}, + component.StatusStopped: {}, + }, + component.StatusStopped: {}, + }, + } +} + +// NotifyStatusFunc is the receiver of status events after successful state transitions +type NotifyStatusFunc func(*component.InstanceID, *component.StatusEvent) + +// InvalidTransitionFunc is the receiver of invalid transition errors +type InvalidTransitionFunc func(error) + +// ServiceStatusFunc is the expected type of ReportStatus for servicetelemetry.Settings +type ServiceStatusFunc func(*component.InstanceID, *component.StatusEvent) + +// ErrStatusNotReady is returned when trying to report status before service start +var ErrStatusNotReady = errors.New("report component status is not ready until service start") + +// Reporter handles component status reporting +type Reporter struct { + mu sync.Mutex + ready bool + fsmMap map[*component.InstanceID]*fsm + onStatusChange NotifyStatusFunc + onInvalidTransition InvalidTransitionFunc +} + +// NewReporter returns a reporter that will invoke the NotifyStatusFunc when a component's status +// has changed. +func NewReporter(onStatusChange NotifyStatusFunc, onInvalidTransition InvalidTransitionFunc) *Reporter { + return &Reporter{ + fsmMap: make(map[*component.InstanceID]*fsm), + onStatusChange: onStatusChange, + onInvalidTransition: onInvalidTransition, + } +} + +// Ready enables status reporting +func (r *Reporter) Ready() { + r.mu.Lock() + defer r.mu.Unlock() + r.ready = true +} + +// ReportComponentStatus reports status for the given InstanceID +// Deprecated: [v0.92.0] This function will be removed in a future release. +// Use ReportStatus instead. +func (r *Reporter) ReportComponentStatus( + id *component.InstanceID, + ev *component.StatusEvent, +) error { + r.ReportStatus(id, ev) + return nil +} + +// ReportStatus reports status for the given InstanceID +func (r *Reporter) ReportStatus( + id *component.InstanceID, + ev *component.StatusEvent, +) { + r.mu.Lock() + defer r.mu.Unlock() + if !r.ready { + r.onInvalidTransition(ErrStatusNotReady) + } else { + if err := r.componentFSM(id).transition(ev); err != nil { + r.onInvalidTransition(err) + } + } +} + +// ReportComponentOkIfStarting reports StatusOK if the component's current status is Starting +// Deprecated: [v0.92.0] This function will be removed in a future release. +// Use ReportOKIfStarting instead. +func (r *Reporter) ReportComponentOKIfStarting(id *component.InstanceID) error { + r.ReportOKIfStarting(id) + return nil +} + +func (r *Reporter) ReportOKIfStarting(id *component.InstanceID) { + r.mu.Lock() + defer r.mu.Unlock() + if !r.ready { + r.onInvalidTransition(ErrStatusNotReady) + } + fsm := r.componentFSM(id) + if fsm.current.Status() == component.StatusStarting { + if err := fsm.transition(component.NewStatusEvent(component.StatusOK)); err != nil { + r.onInvalidTransition(err) + } + } +} + +// Note: a lock must be acquired before calling this method. +func (r *Reporter) componentFSM(id *component.InstanceID) *fsm { + fsm, ok := r.fsmMap[id] + if !ok { + fsm = newFSM(func(ev *component.StatusEvent) { r.onStatusChange(id, ev) }) + r.fsmMap[id] = fsm + } + return fsm +} + +// NewReportStatusFunc returns a function to be used as ReportStatus for +// component.TelemetrySettings, which differs from servicetelemetry.Settings in that +// the component version is tied to specific component instance. +func NewReportStatusFunc( + id *component.InstanceID, + srvStatus ServiceStatusFunc, +) func(*component.StatusEvent) { + return func(ev *component.StatusEvent) { + srvStatus(id, ev) + } +} diff --git a/service/internal/status/status_test.go b/service/internal/status/status_test.go new file mode 100644 index 00000000000..c31c649e496 --- /dev/null +++ b/service/internal/status/status_test.go @@ -0,0 +1,353 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package status + +import ( + "fmt" + "sync" + "testing" + + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/component" +) + +func TestStatusFSM(t *testing.T) { + for _, tc := range []struct { + name string + reportedStatuses []component.Status + expectedStatuses []component.Status + expectedErrorCount int + }{ + { + name: "successful startup and shutdown", + reportedStatuses: []component.Status{ + component.StatusStarting, + component.StatusOK, + component.StatusStopping, + component.StatusStopped, + }, + expectedStatuses: []component.Status{ + component.StatusStarting, + component.StatusOK, + component.StatusStopping, + component.StatusStopped, + }, + }, + { + name: "component recovered", + reportedStatuses: []component.Status{ + component.StatusStarting, + component.StatusRecoverableError, + component.StatusOK, + component.StatusStopping, + component.StatusStopped, + }, + expectedStatuses: []component.Status{ + component.StatusStarting, + component.StatusRecoverableError, + component.StatusOK, + component.StatusStopping, + component.StatusStopped, + }, + }, + { + name: "repeated events are errors", + reportedStatuses: []component.Status{ + component.StatusStarting, + component.StatusOK, + component.StatusRecoverableError, + component.StatusRecoverableError, + component.StatusRecoverableError, + component.StatusOK, + component.StatusStopping, + component.StatusStopped, + }, + expectedStatuses: []component.Status{ + component.StatusStarting, + component.StatusOK, + component.StatusRecoverableError, + component.StatusOK, + component.StatusStopping, + component.StatusStopped, + }, + expectedErrorCount: 2, + }, + { + name: "PermanentError is terminal", + reportedStatuses: []component.Status{ + component.StatusStarting, + component.StatusOK, + component.StatusPermanentError, + component.StatusOK, + }, + expectedStatuses: []component.Status{ + component.StatusStarting, + component.StatusOK, + component.StatusPermanentError, + }, + expectedErrorCount: 1, + }, + { + name: "FatalError is terminal", + reportedStatuses: []component.Status{ + component.StatusStarting, + component.StatusOK, + component.StatusFatalError, + component.StatusOK, + }, + expectedStatuses: []component.Status{ + component.StatusStarting, + component.StatusOK, + component.StatusFatalError, + }, + expectedErrorCount: 1, + }, + { + name: "Stopped is terminal", + reportedStatuses: []component.Status{ + component.StatusStarting, + component.StatusOK, + component.StatusStopping, + component.StatusStopped, + component.StatusOK, + }, + expectedStatuses: []component.Status{ + component.StatusStarting, + component.StatusOK, + component.StatusStopping, + component.StatusStopped, + }, + expectedErrorCount: 1, + }, + } { + t.Run(tc.name, func(t *testing.T) { + var receivedStatuses []component.Status + fsm := newFSM( + func(ev *component.StatusEvent) { + receivedStatuses = append(receivedStatuses, ev.Status()) + }, + ) + + errorCount := 0 + for _, status := range tc.reportedStatuses { + if err := fsm.transition(component.NewStatusEvent(status)); err != nil { + errorCount++ + require.ErrorIs(t, err, errInvalidStateTransition) + } + } + + require.Equal(t, tc.expectedErrorCount, errorCount) + require.Equal(t, tc.expectedStatuses, receivedStatuses) + }) + } +} + +func TestValidSeqsToStopped(t *testing.T) { + events := []*component.StatusEvent{ + component.NewStatusEvent(component.StatusStarting), + component.NewStatusEvent(component.StatusOK), + component.NewStatusEvent(component.StatusRecoverableError), + component.NewStatusEvent(component.StatusPermanentError), + component.NewStatusEvent(component.StatusFatalError), + } + + for _, ev := range events { + name := fmt.Sprintf("transition from: %s to: %s invalid", ev.Status(), component.StatusStopped) + t.Run(name, func(t *testing.T) { + fsm := newFSM(func(*component.StatusEvent) {}) + if ev.Status() != component.StatusStarting { + require.NoError(t, fsm.transition(component.NewStatusEvent(component.StatusStarting))) + } + require.NoError(t, fsm.transition(ev)) + // skipping to stopped is not allowed + err := fsm.transition(component.NewStatusEvent(component.StatusStopped)) + require.ErrorIs(t, err, errInvalidStateTransition) + + // stopping -> stopped is allowed for non-fatal, non-permanent errors + err = fsm.transition(component.NewStatusEvent(component.StatusStopping)) + if ev.Status() == component.StatusPermanentError || ev.Status() == component.StatusFatalError { + require.ErrorIs(t, err, errInvalidStateTransition) + } else { + require.NoError(t, err) + require.NoError(t, fsm.transition(component.NewStatusEvent(component.StatusStopped))) + } + }) + } + +} + +func TestStatusFuncs(t *testing.T) { + id1 := &component.InstanceID{} + id2 := &component.InstanceID{} + + actualStatuses := make(map[*component.InstanceID][]component.Status) + statusFunc := func(id *component.InstanceID, ev *component.StatusEvent) { + actualStatuses[id] = append(actualStatuses[id], ev.Status()) + } + + statuses1 := []component.Status{ + component.StatusStarting, + component.StatusOK, + component.StatusStopping, + component.StatusStopped, + } + + statuses2 := []component.Status{ + component.StatusStarting, + component.StatusOK, + component.StatusRecoverableError, + component.StatusOK, + component.StatusStopping, + component.StatusStopped, + } + + expectedStatuses := map[*component.InstanceID][]component.Status{ + id1: statuses1, + id2: statuses2, + } + + rep := NewReporter(statusFunc, + func(err error) { + require.NoError(t, err) + }) + comp1Func := NewReportStatusFunc(id1, rep.ReportStatus) + comp2Func := NewReportStatusFunc(id2, rep.ReportStatus) + rep.Ready() + + for _, st := range statuses1 { + comp1Func(component.NewStatusEvent(st)) + } + + for _, st := range statuses2 { + comp2Func(component.NewStatusEvent(st)) + } + + require.Equal(t, expectedStatuses, actualStatuses) +} + +func TestStatusFuncsConcurrent(t *testing.T) { + ids := []*component.InstanceID{{}, {}, {}, {}} + count := 0 + statusFunc := func(*component.InstanceID, *component.StatusEvent) { + count++ + } + rep := NewReporter(statusFunc, + func(err error) { + require.NoError(t, err) + }) + rep.Ready() + + wg := sync.WaitGroup{} + wg.Add(len(ids)) + + for _, id := range ids { + id := id + go func() { + compFn := NewReportStatusFunc(id, rep.ReportStatus) + compFn(component.NewStatusEvent(component.StatusStarting)) + for i := 0; i < 1000; i++ { + compFn(component.NewStatusEvent(component.StatusRecoverableError)) + compFn(component.NewStatusEvent(component.StatusOK)) + } + wg.Done() + }() + } + + wg.Wait() + require.Equal(t, 8004, count) +} + +func TestReporterReady(t *testing.T) { + statusFunc := func(*component.InstanceID, *component.StatusEvent) {} + var err error + rep := NewReporter(statusFunc, + func(e error) { + err = e + }) + id := &component.InstanceID{} + + rep.ReportStatus(id, component.NewStatusEvent(component.StatusStarting)) + require.ErrorIs(t, err, ErrStatusNotReady) + rep.Ready() + + err = nil + rep.ReportStatus(id, component.NewStatusEvent(component.StatusStarting)) + require.NoError(t, err) +} + +func TestReportComponentOKIfStarting(t *testing.T) { + for _, tc := range []struct { + name string + initialStatuses []component.Status + expectedStatuses []component.Status + }{ + { + name: "matching condition: StatusStarting", + initialStatuses: []component.Status{ + component.StatusStarting, + }, + expectedStatuses: []component.Status{ + component.StatusStarting, + component.StatusOK, + }, + }, + { + name: "non-matching condition StatusOK", + initialStatuses: []component.Status{ + component.StatusStarting, + component.StatusOK, + }, + expectedStatuses: []component.Status{ + component.StatusStarting, + component.StatusOK, + }, + }, + { + name: "non-matching condition RecoverableError", + initialStatuses: []component.Status{ + component.StatusStarting, + component.StatusRecoverableError, + }, + expectedStatuses: []component.Status{ + component.StatusStarting, + component.StatusRecoverableError, + }, + }, + { + name: "non-matching condition PermanentError", + initialStatuses: []component.Status{ + component.StatusStarting, + component.StatusPermanentError, + }, + expectedStatuses: []component.Status{ + component.StatusStarting, + component.StatusPermanentError, + }, + }, + } { + t.Run(tc.name, func(t *testing.T) { + var receivedStatuses []component.Status + + rep := NewReporter( + func(_ *component.InstanceID, ev *component.StatusEvent) { + receivedStatuses = append(receivedStatuses, ev.Status()) + }, + func(err error) { + require.NoError(t, err) + }, + ) + rep.Ready() + + id := &component.InstanceID{} + for _, status := range tc.initialStatuses { + rep.ReportStatus(id, component.NewStatusEvent(status)) + } + + rep.ReportOKIfStarting(id) + + require.Equal(t, tc.expectedStatuses, receivedStatuses) + }) + } +} diff --git a/service/internal/testcomponents/example_connector.go b/service/internal/testcomponents/example_connector.go index ccf6d678d28..75c5145cf7b 100644 --- a/service/internal/testcomponents/example_connector.go +++ b/service/internal/testcomponents/example_connector.go @@ -15,7 +15,7 @@ import ( "go.opentelemetry.io/collector/pdata/ptrace" ) -const connType = "exampleconnector" +var connType = component.MustNewType("exampleconnector") // ExampleConnectorFactory is factory for ExampleConnector. var ExampleConnectorFactory = connector.NewFactory( @@ -36,7 +36,7 @@ var ExampleConnectorFactory = connector.NewFactory( ) var MockForwardConnectorFactory = connector.NewFactory( - "mockforward", + component.MustNewType("mockforward"), createExampleConnectorDefaultConfig, connector.WithTracesToTraces(createExampleTracesToTraces, component.StabilityLevelDevelopment), connector.WithMetricsToMetrics(createExampleMetricsToMetrics, component.StabilityLevelDevelopment), @@ -47,69 +47,78 @@ func createExampleConnectorDefaultConfig() component.Config { return &struct{}{} } -func createExampleTracesToTraces(_ context.Context, _ connector.CreateSettings, _ component.Config, traces consumer.Traces) (connector.Traces, error) { +func createExampleTracesToTraces(_ context.Context, set connector.CreateSettings, _ component.Config, traces consumer.Traces) (connector.Traces, error) { return &ExampleConnector{ ConsumeTracesFunc: traces.ConsumeTraces, + mutatesData: set.ID.Name() == "mutate", }, nil } -func createExampleTracesToMetrics(_ context.Context, _ connector.CreateSettings, _ component.Config, metrics consumer.Metrics) (connector.Traces, error) { +func createExampleTracesToMetrics(_ context.Context, set connector.CreateSettings, _ component.Config, metrics consumer.Metrics) (connector.Traces, error) { return &ExampleConnector{ ConsumeTracesFunc: func(ctx context.Context, td ptrace.Traces) error { return metrics.ConsumeMetrics(ctx, testdata.GenerateMetrics(td.SpanCount())) }, + mutatesData: set.ID.Name() == "mutate", }, nil } -func createExampleTracesToLogs(_ context.Context, _ connector.CreateSettings, _ component.Config, logs consumer.Logs) (connector.Traces, error) { +func createExampleTracesToLogs(_ context.Context, set connector.CreateSettings, _ component.Config, logs consumer.Logs) (connector.Traces, error) { return &ExampleConnector{ ConsumeTracesFunc: func(ctx context.Context, td ptrace.Traces) error { return logs.ConsumeLogs(ctx, testdata.GenerateLogs(td.SpanCount())) }, + mutatesData: set.ID.Name() == "mutate", }, nil } -func createExampleMetricsToTraces(_ context.Context, _ connector.CreateSettings, _ component.Config, traces consumer.Traces) (connector.Metrics, error) { +func createExampleMetricsToTraces(_ context.Context, set connector.CreateSettings, _ component.Config, traces consumer.Traces) (connector.Metrics, error) { return &ExampleConnector{ ConsumeMetricsFunc: func(ctx context.Context, md pmetric.Metrics) error { return traces.ConsumeTraces(ctx, testdata.GenerateTraces(md.MetricCount())) }, + mutatesData: set.ID.Name() == "mutate", }, nil } -func createExampleMetricsToMetrics(_ context.Context, _ connector.CreateSettings, _ component.Config, metrics consumer.Metrics) (connector.Metrics, error) { +func createExampleMetricsToMetrics(_ context.Context, set connector.CreateSettings, _ component.Config, metrics consumer.Metrics) (connector.Metrics, error) { return &ExampleConnector{ ConsumeMetricsFunc: metrics.ConsumeMetrics, + mutatesData: set.ID.Name() == "mutate", }, nil } -func createExampleMetricsToLogs(_ context.Context, _ connector.CreateSettings, _ component.Config, logs consumer.Logs) (connector.Metrics, error) { +func createExampleMetricsToLogs(_ context.Context, set connector.CreateSettings, _ component.Config, logs consumer.Logs) (connector.Metrics, error) { return &ExampleConnector{ ConsumeMetricsFunc: func(ctx context.Context, md pmetric.Metrics) error { return logs.ConsumeLogs(ctx, testdata.GenerateLogs(md.MetricCount())) }, + mutatesData: set.ID.Name() == "mutate", }, nil } -func createExampleLogsToTraces(_ context.Context, _ connector.CreateSettings, _ component.Config, traces consumer.Traces) (connector.Logs, error) { +func createExampleLogsToTraces(_ context.Context, set connector.CreateSettings, _ component.Config, traces consumer.Traces) (connector.Logs, error) { return &ExampleConnector{ ConsumeLogsFunc: func(ctx context.Context, ld plog.Logs) error { return traces.ConsumeTraces(ctx, testdata.GenerateTraces(ld.LogRecordCount())) }, + mutatesData: set.ID.Name() == "mutate", }, nil } -func createExampleLogsToMetrics(_ context.Context, _ connector.CreateSettings, _ component.Config, metrics consumer.Metrics) (connector.Logs, error) { +func createExampleLogsToMetrics(_ context.Context, set connector.CreateSettings, _ component.Config, metrics consumer.Metrics) (connector.Logs, error) { return &ExampleConnector{ ConsumeLogsFunc: func(ctx context.Context, ld plog.Logs) error { return metrics.ConsumeMetrics(ctx, testdata.GenerateMetrics(ld.LogRecordCount())) }, + mutatesData: set.ID.Name() == "mutate", }, nil } -func createExampleLogsToLogs(_ context.Context, _ connector.CreateSettings, _ component.Config, logs consumer.Logs) (connector.Logs, error) { +func createExampleLogsToLogs(_ context.Context, set connector.CreateSettings, _ component.Config, logs consumer.Logs) (connector.Logs, error) { return &ExampleConnector{ ConsumeLogsFunc: logs.ConsumeLogs, + mutatesData: set.ID.Name() == "mutate", }, nil } @@ -118,8 +127,9 @@ type ExampleConnector struct { consumer.ConsumeTracesFunc consumer.ConsumeMetricsFunc consumer.ConsumeLogsFunc + mutatesData bool } func (c *ExampleConnector) Capabilities() consumer.Capabilities { - return consumer.Capabilities{MutatesData: false} + return consumer.Capabilities{MutatesData: c.mutatesData} } diff --git a/service/internal/testcomponents/example_exporter.go b/service/internal/testcomponents/example_exporter.go index 7c5f512d361..653a2ad4a47 100644 --- a/service/internal/testcomponents/example_exporter.go +++ b/service/internal/testcomponents/example_exporter.go @@ -14,14 +14,13 @@ import ( "go.opentelemetry.io/collector/pdata/ptrace" ) -const ( - typeStr = "exampleexporter" - stability = component.StabilityLevelDevelopment -) +var testType = component.MustNewType("exampleexporter") + +const stability = component.StabilityLevelDevelopment // ExampleExporterFactory is factory for ExampleExporter. var ExampleExporterFactory = exporter.NewFactory( - typeStr, + testType, createExporterDefaultConfig, exporter.WithTraces(createTracesExporter, stability), exporter.WithMetrics(createMetricsExporter, stability), diff --git a/service/internal/testcomponents/example_processor.go b/service/internal/testcomponents/example_processor.go index 8189264b5c3..9f73611853b 100644 --- a/service/internal/testcomponents/example_processor.go +++ b/service/internal/testcomponents/example_processor.go @@ -11,7 +11,7 @@ import ( "go.opentelemetry.io/collector/processor" ) -const procType = "exampleprocessor" +var procType = component.MustNewType("exampleprocessor") // ExampleProcessorFactory is factory for ExampleProcessor. var ExampleProcessorFactory = processor.NewFactory( diff --git a/service/internal/testcomponents/example_receiver.go b/service/internal/testcomponents/example_receiver.go index e59d9cb67bb..34b0372b03b 100644 --- a/service/internal/testcomponents/example_receiver.go +++ b/service/internal/testcomponents/example_receiver.go @@ -11,7 +11,7 @@ import ( "go.opentelemetry.io/collector/receiver" ) -const receiverType = component.Type("examplereceiver") +var receiverType = component.MustNewType("examplereceiver") // ExampleReceiverFactory is factory for ExampleReceiver. var ExampleReceiverFactory = receiver.NewFactory( diff --git a/service/internal/testcomponents/example_router.go b/service/internal/testcomponents/example_router.go index 67d97dbebcb..3eafbf13cb6 100644 --- a/service/internal/testcomponents/example_router.go +++ b/service/internal/testcomponents/example_router.go @@ -14,7 +14,7 @@ import ( "go.opentelemetry.io/collector/pdata/ptrace" ) -const routerType = "examplerouter" +var routerType = component.MustNewType("examplerouter") // ExampleRouterFactory is factory for ExampleRouter. var ExampleRouterFactory = connector.NewFactory( @@ -42,7 +42,7 @@ func createExampleRouterDefaultConfig() component.Config { func createExampleTracesRouter(_ context.Context, _ connector.CreateSettings, cfg component.Config, traces consumer.Traces) (connector.Traces, error) { c := cfg.(ExampleRouterConfig) - r := traces.(connector.TracesRouter) + r := traces.(connector.TracesRouterAndConsumer) left, _ := r.Consumer(c.Traces.Left) right, _ := r.Consumer(c.Traces.Right) return &ExampleRouter{ @@ -53,7 +53,7 @@ func createExampleTracesRouter(_ context.Context, _ connector.CreateSettings, cf func createExampleMetricsRouter(_ context.Context, _ connector.CreateSettings, cfg component.Config, metrics consumer.Metrics) (connector.Metrics, error) { c := cfg.(ExampleRouterConfig) - r := metrics.(connector.MetricsRouter) + r := metrics.(connector.MetricsRouterAndConsumer) left, _ := r.Consumer(c.Metrics.Left) right, _ := r.Consumer(c.Metrics.Right) return &ExampleRouter{ @@ -64,7 +64,7 @@ func createExampleMetricsRouter(_ context.Context, _ connector.CreateSettings, c func createExampleLogsRouter(_ context.Context, _ connector.CreateSettings, cfg component.Config, logs consumer.Logs) (connector.Logs, error) { c := cfg.(ExampleRouterConfig) - r := logs.(connector.LogsRouter) + r := logs.(connector.LogsRouterAndConsumer) left, _ := r.Consumer(c.Logs.Left) right, _ := r.Consumer(c.Logs.Right) return &ExampleRouter{ diff --git a/service/internal/testcomponents/example_router_test.go b/service/internal/testcomponents/example_router_test.go index bcf4f5b97b4..23f94854b2a 100644 --- a/service/internal/testcomponents/example_router_test.go +++ b/service/internal/testcomponents/example_router_test.go @@ -11,10 +11,10 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/connector" "go.opentelemetry.io/collector/connector/connectortest" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/fanoutconsumer" "go.opentelemetry.io/collector/internal/testdata" ) @@ -31,8 +31,8 @@ func TestExampleRouter(t *testing.T) { } func TestTracesRouter(t *testing.T) { - leftID := component.NewIDWithName("sink", "left") - rightID := component.NewIDWithName("sink", "right") + leftID := component.MustNewIDWithName("sink", "left") + rightID := component.MustNewIDWithName("sink", "right") sinkLeft := new(consumertest.TracesSink) sinkRight := new(consumertest.TracesSink) @@ -40,7 +40,7 @@ func TestTracesRouter(t *testing.T) { // The service will build a router to give to every connector. // Many connectors will just call router.ConsumeTraces, // but some implementation will call RouteTraces instead. - router := fanoutconsumer.NewTracesRouter( + router := connector.NewTracesRouter( map[component.ID]consumer.Traces{ leftID: sinkLeft, rightID: sinkRight, @@ -70,8 +70,8 @@ func TestTracesRouter(t *testing.T) { } func TestMetricsRouter(t *testing.T) { - leftID := component.NewIDWithName("sink", "left") - rightID := component.NewIDWithName("sink", "right") + leftID := component.MustNewIDWithName("sink", "left") + rightID := component.MustNewIDWithName("sink", "right") sinkLeft := new(consumertest.MetricsSink) sinkRight := new(consumertest.MetricsSink) @@ -79,7 +79,7 @@ func TestMetricsRouter(t *testing.T) { // The service will build a router to give to every connector. // Many connectors will just call router.ConsumeMetrics, // but some implementation will call RouteMetrics instead. - router := fanoutconsumer.NewMetricsRouter( + router := connector.NewMetricsRouter( map[component.ID]consumer.Metrics{ leftID: sinkLeft, rightID: sinkRight, @@ -109,8 +109,8 @@ func TestMetricsRouter(t *testing.T) { } func TestLogsRouter(t *testing.T) { - leftID := component.NewIDWithName("sink", "left") - rightID := component.NewIDWithName("sink", "right") + leftID := component.MustNewIDWithName("sink", "left") + rightID := component.MustNewIDWithName("sink", "right") sinkLeft := new(consumertest.LogsSink) sinkRight := new(consumertest.LogsSink) @@ -118,7 +118,7 @@ func TestLogsRouter(t *testing.T) { // The service will build a router to give to every connector. // Many connectors will just call router.ConsumeLogs, // but some implementation will call RouteLogs instead. - router := fanoutconsumer.NewLogsRouter( + router := connector.NewLogsRouter( map[component.ID]consumer.Logs{ leftID: sinkLeft, rightID: sinkRight, diff --git a/service/internal/testcomponents/package_test.go b/service/internal/testcomponents/package_test.go new file mode 100644 index 00000000000..5bdec34a7bd --- /dev/null +++ b/service/internal/testcomponents/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package testcomponents + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/service/internal/testcomponents/stateful_component.go b/service/internal/testcomponents/stateful_component.go index ea05b947526..85c8db869dd 100644 --- a/service/internal/testcomponents/stateful_component.go +++ b/service/internal/testcomponents/stateful_component.go @@ -22,12 +22,12 @@ func (cs *componentState) Stopped() bool { return cs.stopped } -func (cs *componentState) Start(_ context.Context, _ component.Host) error { +func (cs *componentState) Start(context.Context, component.Host) error { cs.started = true return nil } -func (cs *componentState) Shutdown(_ context.Context) error { +func (cs *componentState) Shutdown(context.Context) error { cs.stopped = true return nil } diff --git a/service/internal/zpages/package_test.go b/service/internal/zpages/package_test.go new file mode 100644 index 00000000000..5e3b5178ec5 --- /dev/null +++ b/service/internal/zpages/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package zpages + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/service/pipelines/config_test.go b/service/pipelines/config_test.go index e08dff3741a..7ad94d5ab3f 100644 --- a/service/pipelines/config_test.go +++ b/service/pipelines/config_test.go @@ -28,7 +28,7 @@ func TestConfigValidate(t *testing.T) { name: "duplicate-processor-reference", cfgFn: func() Config { cfg := generateConfig() - pipe := cfg[component.NewID("traces")] + pipe := cfg[component.MustNewID("traces")] pipe.Processors = append(pipe.Processors, pipe.Processors...) return cfg }, @@ -38,7 +38,7 @@ func TestConfigValidate(t *testing.T) { name: "missing-pipeline-receivers", cfgFn: func() Config { cfg := generateConfig() - cfg[component.NewID("traces")].Receivers = nil + cfg[component.MustNewID("traces")].Receivers = nil return cfg }, expected: fmt.Errorf(`pipeline "traces": %w`, errMissingServicePipelineReceivers), @@ -47,7 +47,7 @@ func TestConfigValidate(t *testing.T) { name: "missing-pipeline-exporters", cfgFn: func() Config { cfg := generateConfig() - cfg[component.NewID("traces")].Exporters = nil + cfg[component.MustNewID("traces")].Exporters = nil return cfg }, expected: fmt.Errorf(`pipeline "traces": %w`, errMissingServicePipelineExporters), @@ -63,10 +63,10 @@ func TestConfigValidate(t *testing.T) { name: "invalid-service-pipeline-type", cfgFn: func() Config { cfg := generateConfig() - cfg[component.NewID("wrongtype")] = &PipelineConfig{ - Receivers: []component.ID{component.NewID("nop")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("nop")}, + cfg[component.MustNewID("wrongtype")] = &PipelineConfig{ + Receivers: []component.ID{component.MustNewID("nop")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("nop")}, } return cfg }, @@ -84,10 +84,10 @@ func TestConfigValidate(t *testing.T) { func generateConfig() Config { return map[component.ID]*PipelineConfig{ - component.NewID("traces"): { - Receivers: []component.ID{component.NewID("nop")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewID("traces"): { + Receivers: []component.ID{component.MustNewID("nop")}, + Processors: []component.ID{component.MustNewID("nop")}, + Exporters: []component.ID{component.MustNewID("nop")}, }, } } diff --git a/service/pipelines/package_test.go b/service/pipelines/package_test.go new file mode 100644 index 00000000000..6ae41a8bb59 --- /dev/null +++ b/service/pipelines/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package pipelines + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/service/service.go b/service/service.go index ed9540ec948..febff396417 100644 --- a/service/service.go +++ b/service/service.go @@ -5,13 +5,11 @@ package service // import "go.opentelemetry.io/collector/service" import ( "context" + "errors" "fmt" "runtime" - "github.com/google/uuid" - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/sdk/resource" + sdkresource "go.opentelemetry.io/otel/sdk/resource" "go.uber.org/multierr" "go.uber.org/zap" @@ -21,14 +19,17 @@ import ( "go.opentelemetry.io/collector/connector" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/extension" + "go.opentelemetry.io/collector/internal/localhostgate" "go.opentelemetry.io/collector/internal/obsreportconfig" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/processor" "go.opentelemetry.io/collector/receiver" - semconv "go.opentelemetry.io/collector/semconv/v1.18.0" "go.opentelemetry.io/collector/service/extensions" "go.opentelemetry.io/collector/service/internal/graph" "go.opentelemetry.io/collector/service/internal/proctelemetry" + "go.opentelemetry.io/collector/service/internal/resource" + "go.opentelemetry.io/collector/service/internal/servicetelemetry" + "go.opentelemetry.io/collector/service/internal/status" "go.opentelemetry.io/collector/service/telemetry" ) @@ -60,26 +61,17 @@ type Settings struct { // LoggingOptions provides a way to change behavior of zap logging. LoggingOptions []zap.Option - - // For testing purpose only. - useOtel *bool } // Service represents the implementation of a component.Host. type Service struct { - buildInfo component.BuildInfo - telemetry *telemetry.Telemetry - telemetrySettings component.TelemetrySettings - host *serviceHost - telemetryInitializer *telemetryInitializer - collectorConf *confmap.Conf + buildInfo component.BuildInfo + telemetrySettings servicetelemetry.TelemetrySettings + host *serviceHost + collectorConf *confmap.Conf } func New(ctx context.Context, set Settings, cfg Config) (*Service, error) { - useOtel := obsreportconfig.UseOtelForInternalMetricsfeatureGate.IsEnabled() - if set.useOtel != nil { - useOtel = *set.useOtel - } disableHighCard := obsreportconfig.DisableHighCardinalityMetricsfeatureGate.IsEnabled() extendedConfig := obsreportconfig.UseOtelWithSDKConfigurationForInternalTelemetryFeatureGate.IsEnabled() srv := &Service{ @@ -93,40 +85,48 @@ func New(ctx context.Context, set Settings, cfg Config) (*Service, error) { buildInfo: set.BuildInfo, asyncErrorChannel: set.AsyncErrorChannel, }, - telemetryInitializer: newColTelemetry(useOtel, disableHighCard, extendedConfig), - collectorConf: set.CollectorConf, + collectorConf: set.CollectorConf, } - var err error - srv.telemetry, err = telemetry.New(ctx, telemetry.Settings{ZapOptions: set.LoggingOptions}, cfg.Telemetry) + tel, err := telemetry.New(ctx, telemetry.Settings{BuildInfo: set.BuildInfo, ZapOptions: set.LoggingOptions}, cfg.Telemetry) if err != nil { return nil, fmt.Errorf("failed to get logger: %w", err) } - res := buildResource(set.BuildInfo, cfg.Telemetry) + res := resource.New(set.BuildInfo, cfg.Telemetry.Resource) pcommonRes := pdataFromSdk(res) - srv.telemetrySettings = component.TelemetrySettings{ - Logger: srv.telemetry.Logger(), - TracerProvider: srv.telemetry.TracerProvider(), - MeterProvider: noop.NewMeterProvider(), + logger := tel.Logger() + mp, err := newMeterProvider( + meterProviderSettings{ + res: res, + logger: logger, + cfg: cfg.Telemetry.Metrics, + asyncErrorChannel: set.AsyncErrorChannel, + }, + disableHighCard, + extendedConfig, + ) + if err != nil { + return nil, fmt.Errorf("failed to create metric provider: %w", err) + } + srv.telemetrySettings = servicetelemetry.TelemetrySettings{ + Logger: logger, + MeterProvider: mp, + TracerProvider: tel.TracerProvider(), MetricsLevel: cfg.Telemetry.Metrics.Level, - // Construct telemetry attributes from build info and config's resource attributes. Resource: pcommonRes, + Status: status.NewReporter(srv.host.notifyComponentStatusChange, func(err error) { + if errors.Is(err, status.ErrStatusNotReady) { + logger.Warn("Invalid transition", zap.Error(err)) + } + // ignore other errors as they represent invalid state transitions and are considered benign. + }), } - if err = srv.telemetryInitializer.init(res, srv.telemetrySettings, cfg.Telemetry, set.AsyncErrorChannel); err != nil { - return nil, fmt.Errorf("failed to initialize telemetry: %w", err) - } - srv.telemetrySettings.MeterProvider = srv.telemetryInitializer.mp - srv.telemetrySettings.TracerProvider = srv.telemetryInitializer.tp - // process the configuration and initialize the pipeline if err = srv.initExtensionsAndPipeline(ctx, set, cfg); err != nil { - // If pipeline initialization fails then shut down the telemetry server - if shutdownErr := srv.telemetryInitializer.shutdown(); shutdownErr != nil { - err = multierr.Append(err, fmt.Errorf("failed to shutdown collector telemetry: %w", shutdownErr)) - } - + // If pipeline initialization fails then shut down telemetry + err = multierr.Append(err, srv.shutdownTelemetry(ctx)) return nil, err } @@ -134,12 +134,20 @@ func New(ctx context.Context, set Settings, cfg Config) (*Service, error) { } // Start starts the extensions and pipelines. If Start fails Shutdown should be called to ensure a clean state. +// Start does the following steps in order: +// 1. Start all extensions. +// 2. Notify extensions about Collector configuration +// 3. Start all pipelines. +// 4. Notify extensions that the pipeline is ready. func (srv *Service) Start(ctx context.Context) error { srv.telemetrySettings.Logger.Info("Starting "+srv.buildInfo.Command+"...", zap.String("Version", srv.buildInfo.Version), zap.Int("NumCPU", runtime.NumCPU()), ) + // enable status reporting + srv.telemetrySettings.Status.Ready() + if err := srv.host.serviceExtensions.Start(ctx, srv.host); err != nil { return fmt.Errorf("failed to start extensions: %w", err) } @@ -159,9 +167,37 @@ func (srv *Service) Start(ctx context.Context) error { } srv.telemetrySettings.Logger.Info("Everything is ready. Begin running and processing data.") + localhostgate.LogAboutUseLocalHostAsDefault(srv.telemetrySettings.Logger) return nil } +func (srv *Service) shutdownTelemetry(ctx context.Context) error { + // The metric.MeterProvider and trace.TracerProvider interfaces do not have a Shutdown method. + // To shutdown the providers we try to cast to this interface, which matches the type signature used in the SDK. + type shutdownable interface { + Shutdown(context.Context) error + } + + var err error + if prov, ok := srv.telemetrySettings.MeterProvider.(shutdownable); ok { + if shutdownErr := prov.Shutdown(ctx); shutdownErr != nil { + err = multierr.Append(err, fmt.Errorf("failed to shutdown meter provider: %w", shutdownErr)) + } + } + + if prov, ok := srv.telemetrySettings.TracerProvider.(shutdownable); ok { + if shutdownErr := prov.Shutdown(ctx); shutdownErr != nil { + err = multierr.Append(err, fmt.Errorf("failed to shutdown tracer provider: %w", shutdownErr)) + } + } + return err +} + +// Shutdown the service. Shutdown will do the following steps in order: +// 1. Notify extensions that the pipeline is shutting down. +// 2. Shutdown all pipelines. +// 3. Shutdown all extensions. +// 4. Shutdown telemetry. func (srv *Service) Shutdown(ctx context.Context) error { // Accumulate errors and proceed with shutting down remaining components. var errs error @@ -183,13 +219,8 @@ func (srv *Service) Shutdown(ctx context.Context) error { srv.telemetrySettings.Logger.Info("Shutdown complete.") - if err := srv.telemetry.Shutdown(ctx); err != nil { - errs = multierr.Append(errs, fmt.Errorf("failed to shutdown telemetry: %w", err)) - } + errs = multierr.Append(errs, srv.shutdownTelemetry(ctx)) - if err := srv.telemetryInitializer.shutdown(); err != nil { - errs = multierr.Append(errs, fmt.Errorf("failed to shutdown collector telemetry: %w", err)) - } return errs } @@ -220,7 +251,7 @@ func (srv *Service) initExtensionsAndPipeline(ctx context.Context, set Settings, if cfg.Telemetry.Metrics.Level != configtelemetry.LevelNone && cfg.Telemetry.Metrics.Address != "" { // The process telemetry initialization requires the ballast size, which is available after the extensions are initialized. - if err = proctelemetry.RegisterProcessMetrics(srv.telemetryInitializer.ocRegistry, srv.telemetryInitializer.mp, obsreportconfig.UseOtelForInternalMetricsfeatureGate.IsEnabled(), getBallastSize(srv.host)); err != nil { + if err = proctelemetry.RegisterProcessMetrics(srv.telemetrySettings.MeterProvider, getBallastSize(srv.host)); err != nil { return fmt.Errorf("failed to register process metrics: %w", err) } } @@ -243,37 +274,7 @@ func getBallastSize(host component.Host) uint64 { return 0 } -func buildResource(buildInfo component.BuildInfo, cfg telemetry.Config) *resource.Resource { - var telAttrs []attribute.KeyValue - - for k, v := range cfg.Resource { - // nil value indicates that the attribute should not be included in the telemetry. - if v != nil { - telAttrs = append(telAttrs, attribute.String(k, *v)) - } - } - - if _, ok := cfg.Resource[semconv.AttributeServiceName]; !ok { - // AttributeServiceName is not specified in the config. Use the default service name. - telAttrs = append(telAttrs, attribute.String(semconv.AttributeServiceName, buildInfo.Command)) - } - - if _, ok := cfg.Resource[semconv.AttributeServiceInstanceID]; !ok { - // AttributeServiceInstanceID is not specified in the config. Auto-generate one. - instanceUUID, _ := uuid.NewRandom() - instanceID := instanceUUID.String() - telAttrs = append(telAttrs, attribute.String(semconv.AttributeServiceInstanceID, instanceID)) - } - - if _, ok := cfg.Resource[semconv.AttributeServiceVersion]; !ok { - // AttributeServiceVersion is not specified in the config. Use the actual - // build version. - telAttrs = append(telAttrs, attribute.String(semconv.AttributeServiceVersion, buildInfo.Version)) - } - return resource.NewWithAttributes(semconv.SchemaURL, telAttrs...) -} - -func pdataFromSdk(res *resource.Resource) pcommon.Resource { +func pdataFromSdk(res *sdkresource.Resource) pcommon.Resource { // pcommon.NewResource is the best way to generate a new resource currently and is safe to use outside of tests. // Because the resource is signal agnostic, and we need a net new resource, not an existing one, this is the only // method of creating it without exposing internal packages. diff --git a/service/service_test.go b/service/service_test.go index 2a3ec346d65..c538dc0027e 100644 --- a/service/service_test.go +++ b/service/service_test.go @@ -168,6 +168,11 @@ func ownMetricsTestCases() []ownMetricsTestCase { }} } +var ( + nopType = component.MustNewType("nop") + wrongType = component.MustNewType("wrong") +) + func TestServiceGetFactory(t *testing.T) { set := newNopSettings() srv, err := New(context.Background(), set, newNopConfig()) @@ -178,23 +183,23 @@ func TestServiceGetFactory(t *testing.T) { assert.NoError(t, srv.Shutdown(context.Background())) }) - assert.Nil(t, srv.host.GetFactory(component.KindReceiver, "wrongtype")) - assert.Equal(t, set.Receivers.Factory("nop"), srv.host.GetFactory(component.KindReceiver, "nop")) + assert.Nil(t, srv.host.GetFactory(component.KindReceiver, wrongType)) + assert.Equal(t, set.Receivers.Factory(nopType), srv.host.GetFactory(component.KindReceiver, nopType)) - assert.Nil(t, srv.host.GetFactory(component.KindProcessor, "wrongtype")) - assert.Equal(t, set.Processors.Factory("nop"), srv.host.GetFactory(component.KindProcessor, "nop")) + assert.Nil(t, srv.host.GetFactory(component.KindProcessor, wrongType)) + assert.Equal(t, set.Processors.Factory(nopType), srv.host.GetFactory(component.KindProcessor, nopType)) - assert.Nil(t, srv.host.GetFactory(component.KindExporter, "wrongtype")) - assert.Equal(t, set.Exporters.Factory("nop"), srv.host.GetFactory(component.KindExporter, "nop")) + assert.Nil(t, srv.host.GetFactory(component.KindExporter, wrongType)) + assert.Equal(t, set.Exporters.Factory(nopType), srv.host.GetFactory(component.KindExporter, nopType)) - assert.Nil(t, srv.host.GetFactory(component.KindConnector, "wrongtype")) - assert.Equal(t, set.Connectors.Factory("nop"), srv.host.GetFactory(component.KindConnector, "nop")) + assert.Nil(t, srv.host.GetFactory(component.KindConnector, wrongType)) + assert.Equal(t, set.Connectors.Factory(nopType), srv.host.GetFactory(component.KindConnector, nopType)) - assert.Nil(t, srv.host.GetFactory(component.KindExtension, "wrongtype")) - assert.Equal(t, set.Extensions.Factory("nop"), srv.host.GetFactory(component.KindExtension, "nop")) + assert.Nil(t, srv.host.GetFactory(component.KindExtension, wrongType)) + assert.Equal(t, set.Extensions.Factory(nopType), srv.host.GetFactory(component.KindExtension, nopType)) // Try retrieve non existing component.Kind. - assert.Nil(t, srv.host.GetFactory(42, "nop")) + assert.Nil(t, srv.host.GetFactory(42, nopType)) } func TestServiceGetExtensions(t *testing.T) { @@ -209,7 +214,7 @@ func TestServiceGetExtensions(t *testing.T) { extMap := srv.host.GetExtensions() assert.Len(t, extMap, 1) - assert.Contains(t, extMap, component.NewID("nop")) + assert.Contains(t, extMap, component.NewID(nopType)) } func TestServiceGetExporters(t *testing.T) { @@ -224,18 +229,18 @@ func TestServiceGetExporters(t *testing.T) { expMap := srv.host.GetExporters() assert.Len(t, expMap, 3) assert.Len(t, expMap[component.DataTypeTraces], 1) - assert.Contains(t, expMap[component.DataTypeTraces], component.NewID("nop")) + assert.Contains(t, expMap[component.DataTypeTraces], component.NewID(nopType)) assert.Len(t, expMap[component.DataTypeMetrics], 1) - assert.Contains(t, expMap[component.DataTypeMetrics], component.NewID("nop")) + assert.Contains(t, expMap[component.DataTypeMetrics], component.NewID(nopType)) assert.Len(t, expMap[component.DataTypeLogs], 1) - assert.Contains(t, expMap[component.DataTypeLogs], component.NewID("nop")) + assert.Contains(t, expMap[component.DataTypeLogs], component.NewID(nopType)) } // TestServiceTelemetryCleanupOnError tests that if newService errors due to an invalid config telemetry is cleaned up // and another service with a valid config can be started right after. func TestServiceTelemetryCleanupOnError(t *testing.T) { invalidCfg := newNopConfig() - invalidCfg.Pipelines[component.NewID("traces")].Processors[0] = component.NewID("invalid") + invalidCfg.Pipelines[component.MustNewID("traces")].Processors[0] = component.MustNewID("invalid") // Create a service with an invalid config and expect an error _, err := New(context.Background(), newNopSettings(), invalidCfg) require.Error(t, err) @@ -246,26 +251,18 @@ func TestServiceTelemetryCleanupOnError(t *testing.T) { assert.NoError(t, srv.Shutdown(context.Background())) } -func TestServiceTelemetryWithOpenCensusMetrics(t *testing.T) { +func TestServiceTelemetry(t *testing.T) { for _, tc := range ownMetricsTestCases() { t.Run(tc.name, func(t *testing.T) { - testCollectorStartHelper(t, false, tc) + testCollectorStartHelper(t, tc) }) } } -func TestServiceTelemetryWithOpenTelemetryMetrics(t *testing.T) { - for _, tc := range ownMetricsTestCases() { - t.Run(tc.name, func(t *testing.T) { - testCollectorStartHelper(t, true, tc) - }) - } -} - -func testCollectorStartHelper(t *testing.T, useOtel bool, tc ownMetricsTestCase) { +func testCollectorStartHelper(t *testing.T, tc ownMetricsTestCase) { var once sync.Once loggingHookCalled := false - hook := func(entry zapcore.Entry) error { + hook := func(zapcore.Entry) error { once.Do(func() { loggingHookCalled = true }) @@ -278,13 +275,12 @@ func testCollectorStartHelper(t *testing.T, useOtel bool, tc ownMetricsTestCase) set := newNopSettings() set.BuildInfo = component.BuildInfo{Version: "test version", Command: otelCommand} set.Extensions = extension.NewBuilder( - map[component.ID]component.Config{component.NewID("zpages"): &zpagesextension.Config{TCPAddr: confignet.TCPAddr{Endpoint: zpagesAddr}}}, - map[component.Type]extension.Factory{"zpages": zpagesextension.NewFactory()}) + map[component.ID]component.Config{component.MustNewID("zpages"): &zpagesextension.Config{TCPAddr: confignet.TCPAddrConfig{Endpoint: zpagesAddr}}}, + map[component.Type]extension.Factory{component.MustNewType("zpages"): zpagesextension.NewFactory()}) set.LoggingOptions = []zap.Option{zap.Hooks(hook)} - set.useOtel = &useOtel cfg := newNopConfig() - cfg.Extensions = []component.ID{component.NewID("zpages")} + cfg.Extensions = []component.ID{component.MustNewID("zpages")} cfg.Telemetry.Metrics.Address = metricsAddr cfg.Telemetry.Resource = make(map[string]*string) // Include resource attributes under the service::telemetry::resource key. @@ -303,9 +299,7 @@ func testCollectorStartHelper(t *testing.T, useOtel bool, tc ownMetricsTestCase) assert.True(t, loggingHookCalled) assertResourceLabels(t, srv.telemetrySettings.Resource, tc.expectedLabels) - if !useOtel { - assertMetrics(t, metricsAddr, tc.expectedLabels) - } + assertMetrics(t, metricsAddr, tc.expectedLabels) assertZPages(t, zpagesAddr) require.NoError(t, srv.Shutdown(context.Background())) } @@ -362,7 +356,7 @@ func TestExtensionNotificationFailure(t *testing.T) { set := newNopSettings() cfg := newNopConfig() - var extName component.Type = "configWatcher" + var extName = component.MustNewType("configWatcher") configWatcherExtensionFactory := newConfigWatcherExtensionFactory(extName) set.Extensions = extension.NewBuilder( map[component.ID]component.Config{component.NewID(extName): configWatcherExtensionFactory.CreateDefaultConfig()}, @@ -385,7 +379,7 @@ func TestNilCollectorEffectiveConfig(t *testing.T) { set.CollectorConf = nil cfg := newNopConfig() - var extName component.Type = "configWatcher" + var extName = component.MustNewType("configWatcher") configWatcherExtensionFactory := newConfigWatcherExtensionFactory(extName) set.Extensions = extension.NewBuilder( map[component.ID]component.Config{component.NewID(extName): configWatcherExtensionFactory.CreateDefaultConfig()}, @@ -403,6 +397,39 @@ func TestNilCollectorEffectiveConfig(t *testing.T) { require.NoError(t, srv.Shutdown(context.Background())) } +func TestServiceTelemetryLogger(t *testing.T) { + srv, err := New(context.Background(), newNopSettings(), newNopConfig()) + require.NoError(t, err) + + assert.NoError(t, srv.Start(context.Background())) + t.Cleanup(func() { + assert.NoError(t, srv.Shutdown(context.Background())) + }) + assert.NotNil(t, srv.telemetrySettings.Logger) +} + +func TestServiceFatalError(t *testing.T) { + set := newNopSettings() + set.AsyncErrorChannel = make(chan error) + + srv, err := New(context.Background(), set, newNopConfig()) + require.NoError(t, err) + + assert.NoError(t, srv.Start(context.Background())) + t.Cleanup(func() { + assert.NoError(t, srv.Shutdown(context.Background())) + }) + + go func() { + ev := component.NewFatalErrorEvent(assert.AnError) + srv.host.notifyComponentStatusChange(&component.InstanceID{}, ev) + }() + + err = <-srv.host.asyncErrorChannel + + require.ErrorIs(t, err, assert.AnError) +} + func assertResourceLabels(t *testing.T, res pcommon.Resource, expectedLabels map[string]labelValue) { for key, labelValue := range expectedLabels { lookupKey, ok := prometheusToOtelConv[key] @@ -437,13 +464,15 @@ func assertMetrics(t *testing.T, metricsAddr string, expectedLabels map[string]l prefix := "otelcol" for metricName, metricFamily := range parsed { - // require is used here so test fails with a single message. - require.True( - t, - strings.HasPrefix(metricName, prefix), - "expected prefix %q but string starts with %q", - prefix, - metricName[:len(prefix)+1]+"...") + if metricName != "target_info" { + // require is used here so test fails with a single message. + require.True( + t, + strings.HasPrefix(metricName, prefix), + "expected prefix %q but string starts with %q", + prefix, + metricName[:len(prefix)+1]+"...") + } for _, metric := range metricFamily.Metric { labelMap := map[string]string{} @@ -469,8 +498,6 @@ func assertMetrics(t *testing.T, metricsAddr string, expectedLabels map[string]l func assertZPages(t *testing.T, zpagesAddr string) { paths := []string{ "/debug/tracez", - // TODO: enable this when otel-metrics is used and this page is available. - // "/debug/rpcz", "/debug/pipelinez", "/debug/servicez", "/debug/extensionz", @@ -505,27 +532,27 @@ func newNopSettings() Settings { func newNopConfig() Config { return newNopConfigPipelineConfigs(pipelines.Config{ - component.NewID("traces"): { - Receivers: []component.ID{component.NewID("nop")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewID("traces"): { + Receivers: []component.ID{component.NewID(nopType)}, + Processors: []component.ID{component.NewID(nopType)}, + Exporters: []component.ID{component.NewID(nopType)}, }, - component.NewID("metrics"): { - Receivers: []component.ID{component.NewID("nop")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewID("metrics"): { + Receivers: []component.ID{component.NewID(nopType)}, + Processors: []component.ID{component.NewID(nopType)}, + Exporters: []component.ID{component.NewID(nopType)}, }, - component.NewID("logs"): { - Receivers: []component.ID{component.NewID("nop")}, - Processors: []component.ID{component.NewID("nop")}, - Exporters: []component.ID{component.NewID("nop")}, + component.MustNewID("logs"): { + Receivers: []component.ID{component.NewID(nopType)}, + Processors: []component.ID{component.NewID(nopType)}, + Exporters: []component.ID{component.NewID(nopType)}, }, }) } func newNopConfigPipelineConfigs(pipelineCfgs pipelines.Config) Config { return Config{ - Extensions: extensions.Config{component.NewID("nop")}, + Extensions: extensions.Config{component.NewID(nopType)}, Pipelines: pipelineCfgs, Telemetry: telemetry.Config{ Logs: telemetry.LogsConfig{ @@ -533,6 +560,8 @@ func newNopConfigPipelineConfigs(pipelineCfgs pipelines.Config) Config { Development: false, Encoding: "console", Sampling: &telemetry.LogsSamplingConfig{ + Enabled: true, + Tick: 10 * time.Second, Initial: 100, Thereafter: 100, }, @@ -552,15 +581,15 @@ func newNopConfigPipelineConfigs(pipelineCfgs pipelines.Config) Config { type configWatcherExtension struct{} -func (comp *configWatcherExtension) Start(_ context.Context, _ component.Host) error { +func (comp *configWatcherExtension) Start(context.Context, component.Host) error { return nil } -func (comp *configWatcherExtension) Shutdown(_ context.Context) error { +func (comp *configWatcherExtension) Shutdown(context.Context) error { return nil } -func (comp *configWatcherExtension) NotifyConfig(_ context.Context, _ *confmap.Conf) error { +func (comp *configWatcherExtension) NotifyConfig(context.Context, *confmap.Conf) error { return errors.New("Failed to resolve config") } @@ -570,7 +599,7 @@ func newConfigWatcherExtensionFactory(name component.Type) extension.Factory { func() component.Config { return &struct{}{} }, - func(ctx context.Context, set extension.CreateSettings, extension component.Config) (extension.Extension, error) { + func(context.Context, extension.CreateSettings, component.Config) (extension.Extension, error) { return &configWatcherExtension{}, nil }, component.StabilityLevelDevelopment, diff --git a/service/telemetry.go b/service/telemetry.go index 70fe22bc637..c7aab098747 100644 --- a/service/telemetry.go +++ b/service/telemetry.go @@ -5,33 +5,21 @@ package service // import "go.opentelemetry.io/collector/service" import ( "context" - "errors" "net" "net/http" "strconv" - "strings" - "unicode" - ocprom "contrib.go.opencensus.io/exporter/prometheus" - "github.com/prometheus/client_golang/prometheus" ocmetric "go.opencensus.io/metric" "go.opencensus.io/metric/metricproducer" - "go.opencensus.io/stats/view" - "go.opentelemetry.io/contrib/propagators/b3" - "go.opentelemetry.io/otel" + "go.opentelemetry.io/contrib/config" "go.opentelemetry.io/otel/metric" noopmetric "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/propagation" sdkmetric "go.opentelemetry.io/otel/sdk/metric" "go.opentelemetry.io/otel/sdk/resource" - sdktrace "go.opentelemetry.io/otel/sdk/trace" - "go.opentelemetry.io/otel/trace" "go.uber.org/multierr" "go.uber.org/zap" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" - "go.opentelemetry.io/collector/internal/obsreportconfig" "go.opentelemetry.io/collector/service/internal/proctelemetry" "go.opentelemetry.io/collector/service/telemetry" ) @@ -39,103 +27,51 @@ import ( const ( zapKeyTelemetryAddress = "address" zapKeyTelemetryLevel = "level" - - // supported trace propagators - traceContextPropagator = "tracecontext" - b3Propagator = "b3" -) - -var ( - errUnsupportedPropagator = errors.New("unsupported trace propagator") ) -type telemetryInitializer struct { - views []*view.View +type meterProvider struct { + *sdkmetric.MeterProvider ocRegistry *ocmetric.Registry - mp metric.MeterProvider - tp trace.TracerProvider servers []*http.Server - - useOtel bool - disableHighCardinality bool - extendedConfig bool } -func newColTelemetry(useOtel bool, disableHighCardinality bool, extendedConfig bool) *telemetryInitializer { - return &telemetryInitializer{ - mp: noopmetric.NewMeterProvider(), - tp: trace.NewNoopTracerProvider(), - useOtel: useOtel, - disableHighCardinality: disableHighCardinality, - extendedConfig: extendedConfig, - } +type meterProviderSettings struct { + res *resource.Resource + logger *zap.Logger + cfg telemetry.MetricsConfig + asyncErrorChannel chan error } -func (tel *telemetryInitializer) init(res *resource.Resource, settings component.TelemetrySettings, cfg telemetry.Config, asyncErrorChannel chan error) error { - if cfg.Metrics.Level == configtelemetry.LevelNone || (cfg.Metrics.Address == "" && len(cfg.Metrics.Readers) == 0) { - settings.Logger.Info( +func newMeterProvider(set meterProviderSettings, disableHighCardinality bool, extendedConfig bool) (metric.MeterProvider, error) { + if set.cfg.Level == configtelemetry.LevelNone || (set.cfg.Address == "" && len(set.cfg.Readers) == 0) { + set.logger.Info( "Skipping telemetry setup.", - zap.String(zapKeyTelemetryAddress, cfg.Metrics.Address), - zap.String(zapKeyTelemetryLevel, cfg.Metrics.Level.String()), + zap.String(zapKeyTelemetryAddress, set.cfg.Address), + zap.String(zapKeyTelemetryLevel, set.cfg.Level.String()), ) - return nil - } - - settings.Logger.Info("Setting up own telemetry...") - - if tp, err := tel.initTraces(res, cfg); err == nil { - tel.tp = tp - } else { - return err - } - - if tp, err := textMapPropagatorFromConfig(cfg.Traces.Propagators); err == nil { - otel.SetTextMapPropagator(tp) - } else { - return err + return noopmetric.NewMeterProvider(), nil } - return tel.initMetrics(res, settings.Logger, cfg, asyncErrorChannel) -} - -func (tel *telemetryInitializer) initTraces(res *resource.Resource, cfg telemetry.Config) (trace.TracerProvider, error) { - opts := []sdktrace.TracerProviderOption{} - for _, processor := range cfg.Traces.Processors { - sp, err := proctelemetry.InitSpanProcessor(context.Background(), processor) - if err != nil { - return nil, err + set.logger.Info("Setting up own telemetry...") + if len(set.cfg.Address) != 0 { + if extendedConfig { + set.logger.Warn("service::telemetry::metrics::address is being deprecated in favor of service::telemetry::metrics::readers") } - opts = append(opts, sdktrace.WithSpanProcessor(sp)) - } - return proctelemetry.InitTracerProvider(res, opts) -} - -func (tel *telemetryInitializer) initMetrics(res *resource.Resource, logger *zap.Logger, cfg telemetry.Config, asyncErrorChannel chan error) error { - // Initialize the ocRegistry, still used by the process metrics. - tel.ocRegistry = ocmetric.NewRegistry() - if !tel.useOtel && !tel.extendedConfig { - return tel.initOpenCensus(res, logger, cfg.Metrics.Address, cfg.Metrics.Level, asyncErrorChannel) - } - - if len(cfg.Metrics.Address) != 0 { - if tel.extendedConfig { - logger.Warn("service::telemetry::metrics::address is being deprecated in favor of service::telemetry::metrics::readers") - } - host, port, err := net.SplitHostPort(cfg.Metrics.Address) + host, port, err := net.SplitHostPort(set.cfg.Address) if err != nil { - return err + return nil, err } portInt, err := strconv.Atoi(port) if err != nil { - return err + return nil, err } - if cfg.Metrics.Readers == nil { - cfg.Metrics.Readers = []telemetry.MetricReader{} + if set.cfg.Readers == nil { + set.cfg.Readers = []config.MetricReader{} } - cfg.Metrics.Readers = append(cfg.Metrics.Readers, telemetry.MetricReader{ - Pull: &telemetry.PullMetricReader{ - Exporter: telemetry.MetricExporter{ - Prometheus: &telemetry.Prometheus{ + set.cfg.Readers = append(set.cfg.Readers, config.MetricReader{ + Pull: &config.PullMetricReader{ + Exporter: config.MetricExporter{ + Prometheus: &config.Prometheus{ Host: &host, Port: &portInt, }, @@ -144,103 +80,47 @@ func (tel *telemetryInitializer) initMetrics(res *resource.Resource, logger *zap }) } - metricproducer.GlobalManager().AddProducer(tel.ocRegistry) + mp := &meterProvider{ + // Initialize the ocRegistry, still used by the process metrics. + ocRegistry: ocmetric.NewRegistry(), + } + metricproducer.GlobalManager().AddProducer(mp.ocRegistry) opts := []sdkmetric.Option{} - for _, reader := range cfg.Metrics.Readers { + for _, reader := range set.cfg.Readers { // https://github.com/open-telemetry/opentelemetry-collector/issues/8045 - r, server, err := proctelemetry.InitMetricReader(context.Background(), reader, asyncErrorChannel) + r, server, err := proctelemetry.InitMetricReader(context.Background(), reader, set.asyncErrorChannel) if err != nil { - return err + return nil, err } if server != nil { - tel.servers = append(tel.servers, server) - logger.Info( + mp.servers = append(mp.servers, server) + set.logger.Info( "Serving metrics", zap.String(zapKeyTelemetryAddress, server.Addr), - zap.String(zapKeyTelemetryLevel, cfg.Metrics.Level.String()), + zap.String(zapKeyTelemetryLevel, set.cfg.Level.String()), ) } opts = append(opts, sdkmetric.WithReader(r)) } - mp, err := proctelemetry.InitOpenTelemetry(res, opts, tel.disableHighCardinality) - if err != nil { - return err - } - tel.mp = mp - return nil -} - -func (tel *telemetryInitializer) initOpenCensus(res *resource.Resource, logger *zap.Logger, address string, level configtelemetry.Level, asyncErrorChannel chan error) error { - promRegistry := prometheus.NewRegistry() - metricproducer.GlobalManager().AddProducer(tel.ocRegistry) - - tel.views = obsreportconfig.AllViews(level) - if err := view.Register(tel.views...); err != nil { - return err - } - - // Until we can use a generic metrics exporter, default to Prometheus. - opts := ocprom.Options{ - Namespace: "otelcol", - Registry: promRegistry, - } - - opts.ConstLabels = make(map[string]string) - for _, keyValue := range res.Attributes() { - opts.ConstLabels[sanitizePrometheusKey(string(keyValue.Key))] = keyValue.Value.AsString() - } - - pe, err := ocprom.NewExporter(opts) + var err error + mp.MeterProvider, err = proctelemetry.InitOpenTelemetry(set.res, opts, disableHighCardinality) if err != nil { - return err + return nil, err } - - view.RegisterExporter(pe) - - logger.Info( - "Serving Prometheus metrics", - zap.String(zapKeyTelemetryAddress, address), - zap.String(zapKeyTelemetryLevel, level.String()), - ) - tel.servers = append(tel.servers, proctelemetry.InitPrometheusServer(promRegistry, address, asyncErrorChannel)) - return nil + return mp, nil } -func (tel *telemetryInitializer) shutdown() error { - metricproducer.GlobalManager().DeleteProducer(tel.ocRegistry) - view.Unregister(tel.views...) +// Shutdown the meter provider and all the associated resources. +// The type signature of this method matches that of the sdkmetric.MeterProvider. +func (mp *meterProvider) Shutdown(ctx context.Context) error { + metricproducer.GlobalManager().DeleteProducer(mp.ocRegistry) var errs error - for _, server := range tel.servers { + for _, server := range mp.servers { if server != nil { errs = multierr.Append(errs, server.Close()) } } - return errs -} - -func sanitizePrometheusKey(str string) string { - runeFilterMap := func(r rune) rune { - if unicode.IsDigit(r) || unicode.IsLetter(r) || r == '_' { - return r - } - return '_' - } - return strings.Map(runeFilterMap, str) -} - -func textMapPropagatorFromConfig(props []string) (propagation.TextMapPropagator, error) { - var textMapPropagators []propagation.TextMapPropagator - for _, prop := range props { - switch prop { - case traceContextPropagator: - textMapPropagators = append(textMapPropagators, propagation.TraceContext{}) - case b3Propagator: - textMapPropagators = append(textMapPropagators, b3.New()) - default: - return nil, errUnsupportedPropagator - } - } - return propagation.NewCompositeTextMapPropagator(textMapPropagators...), nil + return multierr.Append(errs, mp.MeterProvider.Shutdown(ctx)) } diff --git a/service/telemetry/config.go b/service/telemetry/config.go index 514ae03278a..3336fcac578 100644 --- a/service/telemetry/config.go +++ b/service/telemetry/config.go @@ -5,12 +5,12 @@ package telemetry // import "go.opentelemetry.io/collector/service/telemetry" import ( "fmt" + "time" + "go.opentelemetry.io/contrib/config" "go.uber.org/zap/zapcore" "go.opentelemetry.io/collector/config/configtelemetry" - "go.opentelemetry.io/collector/confmap" - "go.opentelemetry.io/collector/internal/obsreportconfig" ) // Config defines the configurable settings for service telemetry. @@ -54,7 +54,14 @@ type LogsConfig struct { // (default = false) DisableStacktrace bool `mapstructure:"disable_stacktrace"` - // Sampling sets a sampling policy. A nil SamplingConfig disables sampling. + // Sampling sets a sampling policy. + // Default: + // sampling: + // enabled: true + // tick: 10s + // initial: 10 + // thereafter: 100 + // Sampling can be disabled by setting 'enabled' to false Sampling *LogsSamplingConfig `mapstructure:"sampling"` // OutputPaths is a list of URLs or file paths to write logging output to. @@ -91,7 +98,14 @@ type LogsConfig struct { // global CPU and I/O load that logging puts on your process while attempting // to preserve a representative subset of your logs. type LogsSamplingConfig struct { - Initial int `mapstructure:"initial"` + // Enabled enable sampling logging + Enabled bool `mapstructure:"enabled"` + // Tick represents the interval in seconds that the logger apply each sampling. + Tick time.Duration `mapstructure:"tick"` + // Initial represents the first M messages logged each Tick. + Initial int `mapstructure:"initial"` + // Thereafter represents the sampling rate, every Nth message will be sampled after Initial messages are logged during each Tick. + // If Thereafter is zero, the logger will drop all the messages after the Initial each Tick. Thereafter int `mapstructure:"thereafter"` } @@ -110,7 +124,7 @@ type MetricsConfig struct { // Readers allow configuration of metric readers to emit metrics to // any number of supported backends. - Readers []MetricReader `mapstructure:"readers"` + Readers []config.MetricReader `mapstructure:"readers"` } // TracesConfig exposes the common Telemetry configuration for collector's internal spans. @@ -122,7 +136,7 @@ type TracesConfig struct { Propagators []string `mapstructure:"propagators"` // Processors allow configuration of span processors to emit spans to // any number of suported backends. - Processors []SpanProcessor `mapstructure:"processors"` + Processors []config.SpanProcessor `mapstructure:"processors"` } // Validate checks whether the current configuration is valid @@ -134,71 +148,3 @@ func (c *Config) Validate() error { return nil } - -func (sp *SpanProcessor) Unmarshal(conf *confmap.Conf) error { - if !obsreportconfig.UseOtelWithSDKConfigurationForInternalTelemetryFeatureGate.IsEnabled() { - // only unmarshal if feature gate is enabled - return nil - } - - if conf == nil { - return nil - } - - if err := conf.Unmarshal(sp); err != nil { - return fmt.Errorf("invalid span processor configuration: %w", err) - } - - if sp.Batch != nil { - return sp.Batch.Exporter.Validate() - } - return fmt.Errorf("unsupported span processor type %s", conf.AllKeys()) -} - -// Validate checks for valid exporters to be configured for the SpanExporter -func (se *SpanExporter) Validate() error { - if se.Console == nil && se.Otlp == nil { - return fmt.Errorf("invalid exporter configuration") - } - return nil -} - -func (mr *MetricReader) Unmarshal(conf *confmap.Conf) error { - if !obsreportconfig.UseOtelWithSDKConfigurationForInternalTelemetryFeatureGate.IsEnabled() { - // only unmarshal if feature gate is enabled - return nil - } - - if conf == nil { - return nil - } - - if err := conf.Unmarshal(mr); err != nil { - return fmt.Errorf("invalid metric reader configuration: %w", err) - } - - if mr.Pull != nil { - return mr.Pull.Validate() - } - if mr.Periodic != nil { - return mr.Periodic.Validate() - } - - return fmt.Errorf("unsupported metric reader type %s", conf.AllKeys()) -} - -// Validate checks for valid exporters to be configured for the PullMetricReader -func (pmr *PullMetricReader) Validate() error { - if pmr.Exporter.Prometheus == nil { - return fmt.Errorf("invalid exporter configuration") - } - return nil -} - -// Validate checks for valid exporters to be configured for the PeriodicMetricReader -func (pmr *PeriodicMetricReader) Validate() error { - if pmr.Exporter.Otlp == nil && pmr.Exporter.Console == nil { - return fmt.Errorf("invalid exporter configuration") - } - return nil -} diff --git a/service/telemetry/config_test.go b/service/telemetry/config_test.go index 8af1616fb92..5417347c772 100644 --- a/service/telemetry/config_test.go +++ b/service/telemetry/config_test.go @@ -7,12 +7,9 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" + "go.opentelemetry.io/contrib/config" "go.opentelemetry.io/collector/config/configtelemetry" - "go.opentelemetry.io/collector/confmap" - "go.opentelemetry.io/collector/featuregate" - "go.opentelemetry.io/collector/internal/obsreportconfig" ) func TestLoadConfig(t *testing.T) { @@ -46,8 +43,8 @@ func TestLoadConfig(t *testing.T) { cfg: &Config{ Metrics: MetricsConfig{ Level: configtelemetry.LevelBasic, - Readers: []MetricReader{ - {Pull: &PullMetricReader{}}, + Readers: []config.MetricReader{ + {Pull: &config.PullMetricReader{}}, }, }, }, @@ -66,178 +63,3 @@ func TestLoadConfig(t *testing.T) { }) } } - -// Force the state of feature gate for a test -func setFeatureGateForTest(t testing.TB, gate *featuregate.Gate, enabled bool) func() { - originalValue := gate.IsEnabled() - require.NoError(t, featuregate.GlobalRegistry().Set(gate.ID(), enabled)) - return func() { - require.NoError(t, featuregate.GlobalRegistry().Set(gate.ID(), originalValue)) - } -} - -func TestUnmarshalMetricReaderWithGateOff(t *testing.T) { - defer setFeatureGateForTest(t, obsreportconfig.UseOtelWithSDKConfigurationForInternalTelemetryFeatureGate, false)() - reader := MetricReader{} - assert.NoError(t, reader.Unmarshal(confmap.NewFromStringMap(map[string]any{"invalid": "invalid"}))) -} - -func TestUnmarshalMetricReader(t *testing.T) { - defer setFeatureGateForTest(t, obsreportconfig.UseOtelWithSDKConfigurationForInternalTelemetryFeatureGate, true)() - tests := []struct { - name string - cfg *confmap.Conf - err string - }{ - { - name: "invalid config", - cfg: confmap.NewFromStringMap(map[string]any{"invalid": "invalid"}), - err: "unsupported metric reader type [invalid]", - }, - { - name: "nil config, nothing to do", - }, - { - name: "invalid pull reader type with valid prometheus exporter", - cfg: confmap.NewFromStringMap(map[string]any{"pull/prometheus1": PullMetricReader{ - Exporter: MetricExporter{ - Prometheus: &Prometheus{}, - }, - }}), - err: "unsupported metric reader type [pull/prometheus1]", - }, - { - name: "valid reader type, invalid config", - cfg: confmap.NewFromStringMap(map[string]any{"pull": "garbage"}), - err: "invalid metric reader configuration", - }, - { - name: "valid pull reader type, no exporter", - cfg: confmap.NewFromStringMap(map[string]any{"pull": PullMetricReader{}}), - err: "invalid exporter configuration", - }, - { - name: "valid pull reader type, invalid exporter", - cfg: confmap.NewFromStringMap(map[string]any{"pull": PullMetricReader{ - Exporter: MetricExporter{ - Prometheus: nil, - }, - }}), - err: "invalid exporter configuration", - }, - { - name: "valid pull reader type, valid prometheus exporter", - cfg: confmap.NewFromStringMap(map[string]any{"pull": PullMetricReader{ - Exporter: MetricExporter{ - Prometheus: &Prometheus{}, - }, - }}), - }, - { - name: "valid periodic reader type, valid console exporter", - cfg: confmap.NewFromStringMap(map[string]any{"periodic": PeriodicMetricReader{ - Exporter: MetricExporter{ - Console: Console{}, - }, - }}), - }, - { - name: "valid periodic reader type, invalid console exporter", - cfg: confmap.NewFromStringMap(map[string]any{"periodic": PeriodicMetricReader{ - Exporter: MetricExporter{ - Prometheus: &Prometheus{}, - }, - }}), - err: "invalid exporter configuration", - }, - { - name: "valid periodic reader type, valid otlp exporter", - cfg: confmap.NewFromStringMap(map[string]any{"periodic": PeriodicMetricReader{ - Exporter: MetricExporter{ - Otlp: &OtlpMetric{}, - }, - }}), - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - reader := MetricReader{} - err := reader.Unmarshal(tt.cfg) - if len(tt.err) > 0 { - assert.ErrorContains(t, err, tt.err) - } else { - assert.NoError(t, err) - } - }) - } -} - -func TestUnmarshalSpanProcessorWithGateOff(t *testing.T) { - defer setFeatureGateForTest(t, obsreportconfig.UseOtelWithSDKConfigurationForInternalTelemetryFeatureGate, false)() - sp := SpanProcessor{} - assert.NoError(t, sp.Unmarshal(confmap.NewFromStringMap(map[string]any{"invalid": "invalid"}))) -} - -func TestUnmarshalSpanProcessor(t *testing.T) { - defer setFeatureGateForTest(t, obsreportconfig.UseOtelWithSDKConfigurationForInternalTelemetryFeatureGate, true)() - tests := []struct { - name string - cfg *confmap.Conf - err string - }{ - { - name: "invalid config", - cfg: confmap.NewFromStringMap(map[string]any{"invalid": "invalid"}), - err: "unsupported span processor type [invalid]", - }, - { - name: "nil config, nothing to do", - }, - { - name: "invalid batch processor type with valid console exporter", - cfg: confmap.NewFromStringMap(map[string]any{"thing": BatchSpanProcessor{ - Exporter: SpanExporter{ - Console: Console{}, - }, - }}), - err: "unsupported span processor type [thing]", - }, - { - name: "valid batch processor, invalid config", - cfg: confmap.NewFromStringMap(map[string]any{"batch": "garbage"}), - err: "invalid span processor configuration", - }, - { - name: "valid batch processor, no exporter", - cfg: confmap.NewFromStringMap(map[string]any{"batch": BatchSpanProcessor{}}), - err: "invalid exporter configuration", - }, - { - name: "valid batch processor, valid console exporter", - cfg: confmap.NewFromStringMap(map[string]any{"batch": BatchSpanProcessor{ - Exporter: SpanExporter{ - Console: Console{}, - }, - }}), - }, - { - name: "valid batch processor type, valid otlp exporter", - cfg: confmap.NewFromStringMap(map[string]any{"batch": BatchSpanProcessor{ - Exporter: SpanExporter{ - Otlp: &Otlp{}, - }, - }}), - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - processor := SpanProcessor{} - err := processor.Unmarshal(tt.cfg) - if len(tt.err) > 0 { - assert.ErrorContains(t, err, tt.err) - } else { - assert.NoError(t, err) - } - }) - } -} diff --git a/service/telemetry/generated_config.go b/service/telemetry/generated_config.go deleted file mode 100644 index 340d9aac766..00000000000 --- a/service/telemetry/generated_config.go +++ /dev/null @@ -1,577 +0,0 @@ -// Code generated by github.com/atombender/go-jsonschema, DO NOT EDIT. - -package telemetry - -import ( - "encoding/json" - "fmt" -) - -type Attributes struct { - // ServiceName corresponds to the JSON schema field "service.name". - ServiceName *string `mapstructure:"service.name,omitempty"` -} - -type BatchLogRecordProcessor struct { - // ExportTimeout corresponds to the JSON schema field "export_timeout". - ExportTimeout *int `mapstructure:"export_timeout,omitempty"` - - // Exporter corresponds to the JSON schema field "exporter". - Exporter LogRecordExporter `mapstructure:"exporter"` - - // MaxExportBatchSize corresponds to the JSON schema field - // "max_export_batch_size". - MaxExportBatchSize *int `mapstructure:"max_export_batch_size,omitempty"` - - // MaxQueueSize corresponds to the JSON schema field "max_queue_size". - MaxQueueSize *int `mapstructure:"max_queue_size,omitempty"` - - // ScheduleDelay corresponds to the JSON schema field "schedule_delay". - ScheduleDelay *int `mapstructure:"schedule_delay,omitempty"` -} - -type BatchSpanProcessor struct { - // ExportTimeout corresponds to the JSON schema field "export_timeout". - ExportTimeout *int `mapstructure:"export_timeout,omitempty"` - - // Exporter corresponds to the JSON schema field "exporter". - Exporter SpanExporter `mapstructure:"exporter"` - - // MaxExportBatchSize corresponds to the JSON schema field - // "max_export_batch_size". - MaxExportBatchSize *int `mapstructure:"max_export_batch_size,omitempty"` - - // MaxQueueSize corresponds to the JSON schema field "max_queue_size". - MaxQueueSize *int `mapstructure:"max_queue_size,omitempty"` - - // ScheduleDelay corresponds to the JSON schema field "schedule_delay". - ScheduleDelay *int `mapstructure:"schedule_delay,omitempty"` -} - -type CommonJson map[string]interface{} - -type Console map[string]interface{} - -type Headers map[string]string - -type LogRecordExporter struct { - // Otlp corresponds to the JSON schema field "otlp". - Otlp *Otlp `mapstructure:"otlp,omitempty"` -} - -type LogRecordLimits struct { - // AttributeCountLimit corresponds to the JSON schema field - // "attribute_count_limit". - AttributeCountLimit *int `mapstructure:"attribute_count_limit,omitempty"` - - // AttributeValueLengthLimit corresponds to the JSON schema field - // "attribute_value_length_limit". - AttributeValueLengthLimit *int `mapstructure:"attribute_value_length_limit,omitempty"` -} - -type LogRecordProcessor struct { - // Batch corresponds to the JSON schema field "batch". - Batch *BatchLogRecordProcessor `mapstructure:"batch,omitempty"` - - // Simple corresponds to the JSON schema field "simple". - Simple *SimpleLogRecordProcessor `mapstructure:"simple,omitempty"` -} - -type LoggerProviderJson struct { - // Limits corresponds to the JSON schema field "limits". - Limits *LogRecordLimits `mapstructure:"limits,omitempty"` - - // Processors corresponds to the JSON schema field "processors". - Processors []LogRecordProcessor `mapstructure:"processors,omitempty"` -} - -type MeterProviderJson struct { - // Readers corresponds to the JSON schema field "readers". - Readers []MetricReader `mapstructure:"readers,omitempty"` - - // Views corresponds to the JSON schema field "views". - Views []View `mapstructure:"views,omitempty"` -} - -type MetricExporter struct { - // Console corresponds to the JSON schema field "console". - Console Console `mapstructure:"console,omitempty"` - - // Otlp corresponds to the JSON schema field "otlp". - Otlp *OtlpMetric `mapstructure:"otlp,omitempty"` - - // Prometheus corresponds to the JSON schema field "prometheus". - Prometheus *Prometheus `mapstructure:"prometheus,omitempty"` -} - -type MetricReader struct { - // Periodic corresponds to the JSON schema field "periodic". - Periodic *PeriodicMetricReader `mapstructure:"periodic,omitempty"` - - // Pull corresponds to the JSON schema field "pull". - Pull *PullMetricReader `mapstructure:"pull,omitempty"` -} - -type Otlp struct { - // Certificate corresponds to the JSON schema field "certificate". - Certificate *string `mapstructure:"certificate,omitempty"` - - // ClientCertificate corresponds to the JSON schema field "client_certificate". - ClientCertificate *string `mapstructure:"client_certificate,omitempty"` - - // ClientKey corresponds to the JSON schema field "client_key". - ClientKey *string `mapstructure:"client_key,omitempty"` - - // Compression corresponds to the JSON schema field "compression". - Compression *string `mapstructure:"compression,omitempty"` - - // Endpoint corresponds to the JSON schema field "endpoint". - Endpoint string `mapstructure:"endpoint"` - - // Headers corresponds to the JSON schema field "headers". - Headers Headers `mapstructure:"headers,omitempty"` - - // Protocol corresponds to the JSON schema field "protocol". - Protocol string `mapstructure:"protocol"` - - // Timeout corresponds to the JSON schema field "timeout". - Timeout *int `mapstructure:"timeout,omitempty"` -} - -type OtlpMetric struct { - // Certificate corresponds to the JSON schema field "certificate". - Certificate *string `mapstructure:"certificate,omitempty"` - - // ClientCertificate corresponds to the JSON schema field "client_certificate". - ClientCertificate *string `mapstructure:"client_certificate,omitempty"` - - // ClientKey corresponds to the JSON schema field "client_key". - ClientKey *string `mapstructure:"client_key,omitempty"` - - // Compression corresponds to the JSON schema field "compression". - Compression *string `mapstructure:"compression,omitempty"` - - // DefaultHistogramAggregation corresponds to the JSON schema field - // "default_histogram_aggregation". - DefaultHistogramAggregation *string `mapstructure:"default_histogram_aggregation,omitempty"` - - // Endpoint corresponds to the JSON schema field "endpoint". - Endpoint string `mapstructure:"endpoint"` - - // Headers corresponds to the JSON schema field "headers". - Headers Headers `mapstructure:"headers,omitempty"` - - // Protocol corresponds to the JSON schema field "protocol". - Protocol string `mapstructure:"protocol"` - - // TemporalityPreference corresponds to the JSON schema field - // "temporality_preference". - TemporalityPreference *string `mapstructure:"temporality_preference,omitempty"` - - // Timeout corresponds to the JSON schema field "timeout". - Timeout *int `mapstructure:"timeout,omitempty"` -} - -type PeriodicMetricReader struct { - // Exporter corresponds to the JSON schema field "exporter". - Exporter MetricExporter `mapstructure:"exporter"` - - // Interval corresponds to the JSON schema field "interval". - Interval *int `mapstructure:"interval,omitempty"` - - // Timeout corresponds to the JSON schema field "timeout". - Timeout *int `mapstructure:"timeout,omitempty"` -} - -type Prometheus struct { - // Host corresponds to the JSON schema field "host". - Host *string `mapstructure:"host,omitempty"` - - // Port corresponds to the JSON schema field "port". - Port *int `mapstructure:"port,omitempty"` -} - -type PullMetricReader struct { - // Exporter corresponds to the JSON schema field "exporter". - Exporter MetricExporter `mapstructure:"exporter"` -} - -type ResourceJson struct { - // Attributes corresponds to the JSON schema field "attributes". - Attributes *Attributes `mapstructure:"attributes,omitempty"` -} - -type Sampler struct { - // AlwaysOff corresponds to the JSON schema field "always_off". - AlwaysOff SamplerAlwaysOff `mapstructure:"always_off,omitempty"` - - // AlwaysOn corresponds to the JSON schema field "always_on". - AlwaysOn SamplerAlwaysOn `mapstructure:"always_on,omitempty"` - - // JaegerRemote corresponds to the JSON schema field "jaeger_remote". - JaegerRemote *SamplerJaegerRemote `mapstructure:"jaeger_remote,omitempty"` - - // ParentBased corresponds to the JSON schema field "parent_based". - ParentBased *SamplerParentBased `mapstructure:"parent_based,omitempty"` - - // TraceIdRatioBased corresponds to the JSON schema field "trace_id_ratio_based". - TraceIdRatioBased *SamplerTraceIdRatioBased `mapstructure:"trace_id_ratio_based,omitempty"` -} - -type SamplerAlwaysOff map[string]interface{} - -type SamplerAlwaysOn map[string]interface{} - -// UnmarshalJSON implements json.Unmarshaler. -func (j *BatchSpanProcessor) UnmarshalJSON(b []byte) error { - var raw map[string]interface{} - if err := json.Unmarshal(b, &raw); err != nil { - return err - } - if v, ok := raw["exporter"]; !ok || v == nil { - return fmt.Errorf("field exporter in BatchSpanProcessor: required") - } - type Plain BatchSpanProcessor - var plain Plain - if err := json.Unmarshal(b, &plain); err != nil { - return err - } - *j = BatchSpanProcessor(plain) - return nil -} - -type ViewStreamAggregationExplicitBucketHistogram struct { - // Boundaries corresponds to the JSON schema field "boundaries". - Boundaries []float64 `mapstructure:"boundaries,omitempty"` - - // RecordMinMax corresponds to the JSON schema field "record_min_max". - RecordMinMax *bool `mapstructure:"record_min_max,omitempty"` -} - -type ViewStreamAggregationExponentialBucketHistogram struct { - // MaxScale corresponds to the JSON schema field "max_scale". - MaxScale *int `mapstructure:"max_scale,omitempty"` - - // MaxSize corresponds to the JSON schema field "max_size". - MaxSize *int `mapstructure:"max_size,omitempty"` - - // RecordMinMax corresponds to the JSON schema field "record_min_max". - RecordMinMax *bool `mapstructure:"record_min_max,omitempty"` -} - -type ViewStreamAggregation struct { - // Default corresponds to the JSON schema field "default". - Default interface{} `mapstructure:"default,omitempty"` - - // Drop corresponds to the JSON schema field "drop". - Drop interface{} `mapstructure:"drop,omitempty"` - - // ExplicitBucketHistogram corresponds to the JSON schema field - // "explicit_bucket_histogram". - ExplicitBucketHistogram *ViewStreamAggregationExplicitBucketHistogram `mapstructure:"explicit_bucket_histogram,omitempty"` - - // ExponentialBucketHistogram corresponds to the JSON schema field - // "exponential_bucket_histogram". - ExponentialBucketHistogram *ViewStreamAggregationExponentialBucketHistogram `mapstructure:"exponential_bucket_histogram,omitempty"` - - // LastValue corresponds to the JSON schema field "last_value". - LastValue interface{} `mapstructure:"last_value,omitempty"` - - // Sum corresponds to the JSON schema field "sum". - Sum interface{} `mapstructure:"sum,omitempty"` -} - -// UnmarshalJSON implements json.Unmarshaler. -func (j *ViewStreamAggregation) UnmarshalJSON(b []byte) error { - var raw map[string]interface{} - if err := json.Unmarshal(b, &raw); err != nil { - return err - } - type Plain ViewStreamAggregation - var plain Plain - if err := json.Unmarshal(b, &plain); err != nil { - return err - } - if plain.Default != nil { - return fmt.Errorf("field %s: must be null", "default") - } - if plain.Drop != nil { - return fmt.Errorf("field %s: must be null", "drop") - } - if plain.LastValue != nil { - return fmt.Errorf("field %s: must be null", "last_value") - } - if plain.Sum != nil { - return fmt.Errorf("field %s: must be null", "sum") - } - *j = ViewStreamAggregation(plain) - return nil -} - -type ViewStream struct { - // Aggregation corresponds to the JSON schema field "aggregation". - Aggregation *ViewStreamAggregation `mapstructure:"aggregation,omitempty"` - - // AttributeKeys corresponds to the JSON schema field "attribute_keys". - AttributeKeys []string `mapstructure:"attribute_keys,omitempty"` - - // Description corresponds to the JSON schema field "description". - Description *string `mapstructure:"description,omitempty"` - - // Name corresponds to the JSON schema field "name". - Name *string `mapstructure:"name,omitempty"` -} - -type View struct { - // Selector corresponds to the JSON schema field "selector". - Selector *ViewSelector `mapstructure:"selector,omitempty"` - - // Stream corresponds to the JSON schema field "stream". - Stream *ViewStream `mapstructure:"stream,omitempty"` -} - -// UnmarshalJSON implements json.Unmarshaler. -func (j *PullMetricReader) UnmarshalJSON(b []byte) error { - var raw map[string]interface{} - if err := json.Unmarshal(b, &raw); err != nil { - return err - } - if v, ok := raw["exporter"]; !ok || v == nil { - return fmt.Errorf("field exporter in PullMetricReader: required") - } - type Plain PullMetricReader - var plain Plain - if err := json.Unmarshal(b, &plain); err != nil { - return err - } - *j = PullMetricReader(plain) - return nil -} - -// UnmarshalJSON implements json.Unmarshaler. -func (j *Otlp) UnmarshalJSON(b []byte) error { - var raw map[string]interface{} - if err := json.Unmarshal(b, &raw); err != nil { - return err - } - if v, ok := raw["endpoint"]; !ok || v == nil { - return fmt.Errorf("field endpoint in Otlp: required") - } - if v, ok := raw["protocol"]; !ok || v == nil { - return fmt.Errorf("field protocol in Otlp: required") - } - type Plain Otlp - var plain Plain - if err := json.Unmarshal(b, &plain); err != nil { - return err - } - *j = Otlp(plain) - return nil -} - -// UnmarshalJSON implements json.Unmarshaler. -func (j *PeriodicMetricReader) UnmarshalJSON(b []byte) error { - var raw map[string]interface{} - if err := json.Unmarshal(b, &raw); err != nil { - return err - } - if v, ok := raw["exporter"]; !ok || v == nil { - return fmt.Errorf("field exporter in PeriodicMetricReader: required") - } - type Plain PeriodicMetricReader - var plain Plain - if err := json.Unmarshal(b, &plain); err != nil { - return err - } - *j = PeriodicMetricReader(plain) - return nil -} - -type SpanExporter struct { - // Console corresponds to the JSON schema field "console". - Console Console `mapstructure:"console,omitempty"` - - // Otlp corresponds to the JSON schema field "otlp". - Otlp *Otlp `mapstructure:"otlp,omitempty"` -} - -// UnmarshalJSON implements json.Unmarshaler. -func (j *OtlpMetric) UnmarshalJSON(b []byte) error { - var raw map[string]interface{} - if err := json.Unmarshal(b, &raw); err != nil { - return err - } - if v, ok := raw["endpoint"]; !ok || v == nil { - return fmt.Errorf("field endpoint in OtlpMetric: required") - } - if v, ok := raw["protocol"]; !ok || v == nil { - return fmt.Errorf("field protocol in OtlpMetric: required") - } - type Plain OtlpMetric - var plain Plain - if err := json.Unmarshal(b, &plain); err != nil { - return err - } - *j = OtlpMetric(plain) - return nil -} - -type ViewSelector struct { - // InstrumentName corresponds to the JSON schema field "instrument_name". - InstrumentName *string `mapstructure:"instrument_name,omitempty"` - - // InstrumentType corresponds to the JSON schema field "instrument_type". - InstrumentType *string `mapstructure:"instrument_type,omitempty"` - - // MeterName corresponds to the JSON schema field "meter_name". - MeterName *string `mapstructure:"meter_name,omitempty"` - - // MeterSchemaUrl corresponds to the JSON schema field "meter_schema_url". - MeterSchemaUrl *string `mapstructure:"meter_schema_url,omitempty"` - - // MeterVersion corresponds to the JSON schema field "meter_version". - MeterVersion *string `mapstructure:"meter_version,omitempty"` -} - -// UnmarshalJSON implements json.Unmarshaler. -func (j *BatchLogRecordProcessor) UnmarshalJSON(b []byte) error { - var raw map[string]interface{} - if err := json.Unmarshal(b, &raw); err != nil { - return err - } - if v, ok := raw["exporter"]; !ok || v == nil { - return fmt.Errorf("field exporter in BatchLogRecordProcessor: required") - } - type Plain BatchLogRecordProcessor - var plain Plain - if err := json.Unmarshal(b, &plain); err != nil { - return err - } - *j = BatchLogRecordProcessor(plain) - return nil -} - -type SimpleLogRecordProcessor struct { - // Exporter corresponds to the JSON schema field "exporter". - Exporter LogRecordExporter `mapstructure:"exporter"` -} - -type SamplerJaegerRemote struct { - // Endpoint corresponds to the JSON schema field "endpoint". - Endpoint *string `mapstructure:"endpoint,omitempty"` - - // InitialSampler corresponds to the JSON schema field "initial_sampler". - InitialSampler *Sampler `mapstructure:"initial_sampler,omitempty"` - - // Interval corresponds to the JSON schema field "interval". - Interval *int `mapstructure:"interval,omitempty"` -} - -type SamplerParentBased struct { - // LocalParentNotSampled corresponds to the JSON schema field - // "local_parent_not_sampled". - LocalParentNotSampled *Sampler `mapstructure:"local_parent_not_sampled,omitempty"` - - // LocalParentSampled corresponds to the JSON schema field "local_parent_sampled". - LocalParentSampled *Sampler `mapstructure:"local_parent_sampled,omitempty"` - - // RemoteParentNotSampled corresponds to the JSON schema field - // "remote_parent_not_sampled". - RemoteParentNotSampled *Sampler `mapstructure:"remote_parent_not_sampled,omitempty"` - - // RemoteParentSampled corresponds to the JSON schema field - // "remote_parent_sampled". - RemoteParentSampled *Sampler `mapstructure:"remote_parent_sampled,omitempty"` - - // Root corresponds to the JSON schema field "root". - Root *Sampler `mapstructure:"root,omitempty"` -} - -type SamplerTraceIdRatioBased struct { - // Ratio corresponds to the JSON schema field "ratio". - Ratio *float64 `mapstructure:"ratio,omitempty"` -} - -// UnmarshalJSON implements json.Unmarshaler. -func (j *SimpleLogRecordProcessor) UnmarshalJSON(b []byte) error { - var raw map[string]interface{} - if err := json.Unmarshal(b, &raw); err != nil { - return err - } - if v, ok := raw["exporter"]; !ok || v == nil { - return fmt.Errorf("field exporter in SimpleLogRecordProcessor: required") - } - type Plain SimpleLogRecordProcessor - var plain Plain - if err := json.Unmarshal(b, &plain); err != nil { - return err - } - *j = SimpleLogRecordProcessor(plain) - return nil -} - -type SimpleSpanProcessor struct { - // Exporter corresponds to the JSON schema field "exporter". - Exporter SpanExporter `mapstructure:"exporter"` -} - -// UnmarshalJSON implements json.Unmarshaler. -func (j *SimpleSpanProcessor) UnmarshalJSON(b []byte) error { - var raw map[string]interface{} - if err := json.Unmarshal(b, &raw); err != nil { - return err - } - if v, ok := raw["exporter"]; !ok || v == nil { - return fmt.Errorf("field exporter in SimpleSpanProcessor: required") - } - type Plain SimpleSpanProcessor - var plain Plain - if err := json.Unmarshal(b, &plain); err != nil { - return err - } - *j = SimpleSpanProcessor(plain) - return nil -} - -type SpanLimits struct { - // AttributeCountLimit corresponds to the JSON schema field - // "attribute_count_limit". - AttributeCountLimit *int `mapstructure:"attribute_count_limit,omitempty"` - - // AttributeValueLengthLimit corresponds to the JSON schema field - // "attribute_value_length_limit". - AttributeValueLengthLimit *int `mapstructure:"attribute_value_length_limit,omitempty"` - - // EventAttributeCountLimit corresponds to the JSON schema field - // "event_attribute_count_limit". - EventAttributeCountLimit *int `mapstructure:"event_attribute_count_limit,omitempty"` - - // EventCountLimit corresponds to the JSON schema field "event_count_limit". - EventCountLimit *int `mapstructure:"event_count_limit,omitempty"` - - // LinkAttributeCountLimit corresponds to the JSON schema field - // "link_attribute_count_limit". - LinkAttributeCountLimit *int `mapstructure:"link_attribute_count_limit,omitempty"` - - // LinkCountLimit corresponds to the JSON schema field "link_count_limit". - LinkCountLimit *int `mapstructure:"link_count_limit,omitempty"` -} - -type SpanProcessor struct { - // Batch corresponds to the JSON schema field "batch". - Batch *BatchSpanProcessor `mapstructure:"batch,omitempty"` - - // Simple corresponds to the JSON schema field "simple". - Simple *SimpleSpanProcessor `mapstructure:"simple,omitempty"` -} - -type TracerProviderJson struct { - // Limits corresponds to the JSON schema field "limits". - Limits *SpanLimits `mapstructure:"limits,omitempty"` - - // Processors corresponds to the JSON schema field "processors". - Processors []SpanProcessor `mapstructure:"processors,omitempty"` - - // Sampler corresponds to the JSON schema field "sampler". - Sampler *Sampler `mapstructure:"sampler,omitempty"` -} diff --git a/service/telemetry/otel_trace_sampler.go b/service/telemetry/otel_trace_sampler.go index 1a8bb595cb6..25928bfe31e 100644 --- a/service/telemetry/otel_trace_sampler.go +++ b/service/telemetry/otel_trace_sampler.go @@ -9,7 +9,7 @@ import ( type recordSampler struct{} -func (r recordSampler) ShouldSample(_ sdktrace.SamplingParameters) sdktrace.SamplingResult { +func (r recordSampler) ShouldSample(sdktrace.SamplingParameters) sdktrace.SamplingResult { return sdktrace.SamplingResult{Decision: sdktrace.RecordOnly} } diff --git a/service/telemetry/package_test.go b/service/telemetry/package_test.go new file mode 100644 index 00000000000..7d5570bf8df --- /dev/null +++ b/service/telemetry/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package telemetry + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/service/telemetry/telemetry.go b/service/telemetry/telemetry.go index 00f9db630b0..d557d1e957e 100644 --- a/service/telemetry/telemetry.go +++ b/service/telemetry/telemetry.go @@ -5,12 +5,30 @@ package telemetry // import "go.opentelemetry.io/collector/service/telemetry" import ( "context" + "errors" + "go.opentelemetry.io/contrib/propagators/b3" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/propagation" sdktrace "go.opentelemetry.io/otel/sdk/trace" "go.opentelemetry.io/otel/trace" "go.uber.org/multierr" "go.uber.org/zap" "go.uber.org/zap/zapcore" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/service/internal/proctelemetry" + "go.opentelemetry.io/collector/service/internal/resource" +) + +const ( + // supported trace propagators + traceContextPropagator = "tracecontext" + b3Propagator = "b3" +) + +var ( + errUnsupportedPropagator = errors.New("unsupported trace propagator") ) type Telemetry struct { @@ -35,31 +53,73 @@ func (t *Telemetry) Shutdown(ctx context.Context) error { // Settings holds configuration for building Telemetry. type Settings struct { + BuildInfo component.BuildInfo ZapOptions []zap.Option } // New creates a new Telemetry from Config. -func New(_ context.Context, set Settings, cfg Config) (*Telemetry, error) { +func New(ctx context.Context, set Settings, cfg Config) (*Telemetry, error) { logger, err := newLogger(cfg.Logs, set.ZapOptions) if err != nil { return nil, err } - tp := sdktrace.NewTracerProvider( - // needed for supporting the zpages extension - sdktrace.WithSampler(alwaysRecord()), - ) + + tp, err := newTracerProvider(ctx, set, cfg) + if err != nil { + return nil, err + } + return &Telemetry{ logger: logger, tracerProvider: tp, }, nil } +func newTracerProvider(ctx context.Context, set Settings, cfg Config) (*sdktrace.TracerProvider, error) { + opts := []sdktrace.TracerProviderOption{sdktrace.WithSampler(alwaysRecord())} + for _, processor := range cfg.Traces.Processors { + sp, err := proctelemetry.InitSpanProcessor(ctx, processor) + if err != nil { + return nil, err + } + opts = append(opts, sdktrace.WithSpanProcessor(sp)) + } + + res := resource.New(set.BuildInfo, cfg.Resource) + tp, err := proctelemetry.InitTracerProvider(res, opts) + if err != nil { + return nil, err + } + + if tp, err := textMapPropagatorFromConfig(cfg.Traces.Propagators); err == nil { + otel.SetTextMapPropagator(tp) + } else { + return nil, err + } + + return tp, nil +} + +func textMapPropagatorFromConfig(props []string) (propagation.TextMapPropagator, error) { + var textMapPropagators []propagation.TextMapPropagator + for _, prop := range props { + switch prop { + case traceContextPropagator: + textMapPropagators = append(textMapPropagators, propagation.TraceContext{}) + case b3Propagator: + textMapPropagators = append(textMapPropagators, b3.New()) + default: + return nil, errUnsupportedPropagator + } + } + return propagation.NewCompositeTextMapPropagator(textMapPropagators...), nil +} + func newLogger(cfg LogsConfig, options []zap.Option) (*zap.Logger, error) { // Copied from NewProductionConfig. zapCfg := &zap.Config{ Level: zap.NewAtomicLevelAt(cfg.Level), Development: cfg.Development, - Sampling: toSamplingConfig(cfg.Sampling), Encoding: cfg.Encoding, EncoderConfig: zap.NewProductionEncoderConfig(), OutputPaths: cfg.OutputPaths, @@ -78,16 +138,23 @@ func newLogger(cfg LogsConfig, options []zap.Option) (*zap.Logger, error) { if err != nil { return nil, err } + if cfg.Sampling != nil && cfg.Sampling.Enabled { + logger = newSampledLogger(logger, cfg.Sampling) + } return logger, nil } -func toSamplingConfig(sc *LogsSamplingConfig) *zap.SamplingConfig { - if sc == nil { - return nil - } - return &zap.SamplingConfig{ - Initial: sc.Initial, - Thereafter: sc.Thereafter, - } +func newSampledLogger(logger *zap.Logger, sc *LogsSamplingConfig) *zap.Logger { + // Create a logger that samples every Nth message after the first M messages every S seconds + // where N = sc.Thereafter, M = sc.Initial, S = sc.Tick. + opts := zap.WrapCore(func(core zapcore.Core) zapcore.Core { + return zapcore.NewSamplerWithOptions( + core, + sc.Tick, + sc.Initial, + sc.Thereafter, + ) + }) + return logger.WithOptions(opts) } diff --git a/service/telemetry/telemetry_test.go b/service/telemetry/telemetry_test.go new file mode 100644 index 00000000000..b01b3c7d8c8 --- /dev/null +++ b/service/telemetry/telemetry_test.go @@ -0,0 +1,117 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package telemetry + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" + + "go.opentelemetry.io/collector/config/configtelemetry" +) + +func TestTelemetryConfiguration(t *testing.T) { + tests := []struct { + name string + cfg *Config + success bool + }{ + { + name: "Valid config", + cfg: &Config{ + Logs: LogsConfig{ + Level: zapcore.DebugLevel, + Encoding: "console", + }, + Metrics: MetricsConfig{ + Level: configtelemetry.LevelBasic, + Address: "127.0.0.1:3333", + }, + }, + success: true, + }, + { + name: "Invalid config", + cfg: &Config{ + Logs: LogsConfig{ + Level: zapcore.DebugLevel, + }, + Metrics: MetricsConfig{ + Level: configtelemetry.LevelBasic, + Address: "127.0.0.1:3333", + }, + }, + success: false, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + telemetry, err := New(context.Background(), Settings{ZapOptions: []zap.Option{}}, *tt.cfg) + if tt.success { + assert.NoError(t, err) + assert.NotNil(t, telemetry) + } else { + assert.Error(t, err) + assert.Nil(t, telemetry) + } + }) + } +} + +func TestSampledLogger(t *testing.T) { + tests := []struct { + name string + cfg *Config + }{ + { + name: "Default sampling", + cfg: &Config{ + Logs: LogsConfig{ + Encoding: "console", + }, + }, + }, + { + name: "Custom sampling", + cfg: &Config{ + Logs: LogsConfig{ + Level: zapcore.DebugLevel, + Encoding: "console", + Sampling: &LogsSamplingConfig{ + Enabled: true, + Tick: 1 * time.Second, + Initial: 100, + Thereafter: 100, + }, + }, + }, + }, + { + name: "Disable sampling", + cfg: &Config{ + Logs: LogsConfig{ + Level: zapcore.DebugLevel, + Encoding: "console", + Sampling: &LogsSamplingConfig{ + Enabled: false, + }, + }, + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + telemetry, err := New(context.Background(), Settings{ZapOptions: []zap.Option{}}, *tt.cfg) + assert.NoError(t, err) + assert.NotNil(t, telemetry) + assert.NotNil(t, telemetry.Logger()) + }) + } +} diff --git a/service/telemetry_test.go b/service/telemetry_test.go index a4144e27890..37bd3d82b28 100644 --- a/service/telemetry_test.go +++ b/service/telemetry_test.go @@ -15,6 +15,7 @@ import ( "github.com/stretchr/testify/require" "go.opencensus.io/stats" "go.opencensus.io/stats/view" + "go.opentelemetry.io/contrib/config" "go.opentelemetry.io/otel/metric" "go.uber.org/zap" @@ -23,6 +24,7 @@ import ( "go.opentelemetry.io/collector/internal/testutil" semconv "go.opentelemetry.io/collector/semconv/v1.18.0" "go.opentelemetry.io/collector/service/internal/proctelemetry" + "go.opentelemetry.io/collector/service/internal/resource" "go.opentelemetry.io/collector/service/telemetry" ) @@ -40,7 +42,7 @@ func TestBuildResource(t *testing.T) { // Check default config cfg := telemetry.Config{} - otelRes := buildResource(buildInfo, cfg) + otelRes := resource.New(buildInfo, cfg.Resource) res := pdataFromSdk(otelRes) assert.Equal(t, res.Attributes().Len(), 3) @@ -62,7 +64,7 @@ func TestBuildResource(t *testing.T) { semconv.AttributeServiceInstanceID: nil, }, } - otelRes = buildResource(buildInfo, cfg) + otelRes = resource.New(buildInfo, cfg.Resource) res = pdataFromSdk(otelRes) // Attributes should not exist since we nil-ified all. @@ -77,7 +79,7 @@ func TestBuildResource(t *testing.T) { semconv.AttributeServiceInstanceID: strPtr("c"), }, } - otelRes = buildResource(buildInfo, cfg) + otelRes = resource.New(buildInfo, cfg.Resource) res = pdataFromSdk(otelRes) assert.Equal(t, res.Attributes().Len(), 3) @@ -100,15 +102,13 @@ func TestTelemetryInit(t *testing.T) { for _, tc := range []struct { name string - useOtel bool disableHighCard bool expectedMetrics map[string]metricValue extendedConfig bool cfg *telemetry.Config }{ { - name: "UseOpenCensusForInternalMetrics", - useOtel: false, + name: "UseOpenTelemetryForInternalMetrics", expectedMetrics: map[string]metricValue{ metricPrefix + ocPrefix + counterName: { value: 13, @@ -118,36 +118,36 @@ func TestTelemetryInit(t *testing.T) { "service_instance_id": testInstanceID, }, }, - }, - }, - { - name: "UseOpenTelemetryForInternalMetrics", - useOtel: true, - expectedMetrics: map[string]metricValue{ - metricPrefix + ocPrefix + counterName + "_total": { - value: 13, - labels: map[string]string{}, - }, - metricPrefix + otelPrefix + counterName + "_total": { - value: 13, - labels: map[string]string{}, + metricPrefix + otelPrefix + counterName: { + value: 13, + labels: map[string]string{ + "service_name": "otelcol", + "service_version": "latest", + "service_instance_id": testInstanceID, + }, }, - metricPrefix + grpcPrefix + counterName + "_total": { + metricPrefix + grpcPrefix + counterName: { value: 11, labels: map[string]string{ - "net_sock_peer_addr": "", - "net_sock_peer_name": "", - "net_sock_peer_port": "", + "net_sock_peer_addr": "", + "net_sock_peer_name": "", + "net_sock_peer_port": "", + "service_name": "otelcol", + "service_version": "latest", + "service_instance_id": testInstanceID, }, }, - metricPrefix + httpPrefix + counterName + "_total": { + metricPrefix + httpPrefix + counterName: { value: 10, labels: map[string]string{ - "net_host_name": "", - "net_host_port": "", + "net_host_name": "", + "net_host_port": "", + "service_name": "otelcol", + "service_version": "latest", + "service_instance_id": testInstanceID, }, }, - metricPrefix + "target_info": { + "target_info": { value: 0, labels: map[string]string{ "service_name": "otelcol", @@ -159,26 +159,41 @@ func TestTelemetryInit(t *testing.T) { }, { name: "DisableHighCardinalityWithOtel", - useOtel: true, disableHighCard: true, expectedMetrics: map[string]metricValue{ - metricPrefix + ocPrefix + counterName + "_total": { - value: 13, - labels: map[string]string{}, + metricPrefix + ocPrefix + counterName: { + value: 13, + labels: map[string]string{ + "service_name": "otelcol", + "service_version": "latest", + "service_instance_id": testInstanceID, + }, }, - metricPrefix + otelPrefix + counterName + "_total": { - value: 13, - labels: map[string]string{}, + metricPrefix + otelPrefix + counterName: { + value: 13, + labels: map[string]string{ + "service_name": "otelcol", + "service_version": "latest", + "service_instance_id": testInstanceID, + }, }, - metricPrefix + grpcPrefix + counterName + "_total": { - value: 11, - labels: map[string]string{}, + metricPrefix + grpcPrefix + counterName: { + value: 11, + labels: map[string]string{ + "service_name": "otelcol", + "service_version": "latest", + "service_instance_id": testInstanceID, + }, }, - metricPrefix + httpPrefix + counterName + "_total": { - value: 10, - labels: map[string]string{}, + metricPrefix + httpPrefix + counterName: { + value: 10, + labels: map[string]string{ + "service_name": "otelcol", + "service_version": "latest", + "service_instance_id": testInstanceID, + }, }, - metricPrefix + "target_info": { + "target_info": { value: 0, labels: map[string]string{ "service_name": "otelcol", @@ -196,11 +211,11 @@ func TestTelemetryInit(t *testing.T) { Level: configtelemetry.LevelDetailed, }, Traces: telemetry.TracesConfig{ - Processors: []telemetry.SpanProcessor{ + Processors: []config.SpanProcessor{ { - Batch: &telemetry.BatchSpanProcessor{ - Exporter: telemetry.SpanExporter{ - Console: telemetry.Console{}, + Batch: &config.BatchSpanProcessor{ + Exporter: config.SpanExporter{ + Console: config.Console{}, }, }, }, @@ -211,30 +226,44 @@ func TestTelemetryInit(t *testing.T) { }, }, expectedMetrics: map[string]metricValue{ - metricPrefix + ocPrefix + counterName + "_total": { - value: 13, - labels: map[string]string{}, + metricPrefix + ocPrefix + counterName: { + value: 13, + labels: map[string]string{ + "service_name": "otelcol", + "service_version": "latest", + "service_instance_id": testInstanceID, + }, }, - metricPrefix + otelPrefix + counterName + "_total": { - value: 13, - labels: map[string]string{}, + metricPrefix + otelPrefix + counterName: { + value: 13, + labels: map[string]string{ + "service_name": "otelcol", + "service_version": "latest", + "service_instance_id": testInstanceID, + }, }, - metricPrefix + grpcPrefix + counterName + "_total": { + metricPrefix + grpcPrefix + counterName: { value: 11, labels: map[string]string{ - "net_sock_peer_addr": "", - "net_sock_peer_name": "", - "net_sock_peer_port": "", + "net_sock_peer_addr": "", + "net_sock_peer_name": "", + "net_sock_peer_port": "", + "service_name": "otelcol", + "service_version": "latest", + "service_instance_id": testInstanceID, }, }, - metricPrefix + httpPrefix + counterName + "_total": { + metricPrefix + httpPrefix + counterName: { value: 10, labels: map[string]string{ - "net_host_name": "", - "net_host_port": "", + "net_host_name": "", + "net_host_port": "", + "service_name": "otelcol", + "service_version": "latest", + "service_instance_id": testInstanceID, }, }, - metricPrefix + "target_info": { + "target_info": { value: 0, labels: map[string]string{ "service_name": "otelcol", @@ -246,13 +275,11 @@ func TestTelemetryInit(t *testing.T) { }, } { t.Run(tc.name, func(t *testing.T) { - tel := newColTelemetry(tc.useOtel, tc.disableHighCard, tc.extendedConfig) - buildInfo := component.NewDefaultBuildInfo() if tc.extendedConfig { - tc.cfg.Metrics.Readers = []telemetry.MetricReader{ + tc.cfg.Metrics.Readers = []config.MetricReader{ { - Pull: &telemetry.PullMetricReader{ - Exporter: telemetry.MetricExporter{ + Pull: &config.PullMetricReader{ + Exporter: config.MetricExporter{ Prometheus: testutil.GetAvailableLocalAddressPrometheus(t), }, }, @@ -270,24 +297,26 @@ func TestTelemetryInit(t *testing.T) { }, } } - otelRes := buildResource(buildInfo, *tc.cfg) - res := pdataFromSdk(otelRes) - settings := component.TelemetrySettings{ - Logger: zap.NewNop(), - Resource: res, + set := meterProviderSettings{ + res: resource.New(component.NewDefaultBuildInfo(), tc.cfg.Resource), + logger: zap.NewNop(), + cfg: tc.cfg.Metrics, + asyncErrorChannel: make(chan error), } - err := tel.init(otelRes, settings, *tc.cfg, make(chan error)) + mp, err := newMeterProvider(set, tc.disableHighCard, tc.extendedConfig) require.NoError(t, err) defer func() { - require.NoError(t, tel.shutdown()) + if prov, ok := mp.(interface{ Shutdown(context.Context) error }); ok { + require.NoError(t, prov.Shutdown(context.Background())) + } }() - v := createTestMetrics(t, tel.mp) + v := createTestMetrics(t, mp) defer func() { view.Unregister(v) }() - metrics := getMetricsFromPrometheus(t, tel.servers[0].Handler) + metrics := getMetricsFromPrometheus(t, mp.(*meterProvider).servers[0].Handler) require.Equal(t, len(tc.expectedMetrics), len(metrics)) for metricName, metricValue := range tc.expectedMetrics { diff --git a/versions.yaml b/versions.yaml index 9a74763d86d..7c0074f9ad1 100644 --- a/versions.yaml +++ b/versions.yaml @@ -3,23 +3,31 @@ module-sets: stable: - version: v1.0.0-rcv0014 + version: v1.3.0 modules: - go.opentelemetry.io/collector/featuregate - go.opentelemetry.io/collector/pdata + - go.opentelemetry.io/collector/config/configopaque beta: - version: v0.85.0 + version: v0.96.0 modules: - go.opentelemetry.io/collector - go.opentelemetry.io/collector/cmd/builder + - go.opentelemetry.io/collector/cmd/mdatagen - go.opentelemetry.io/collector/component - go.opentelemetry.io/collector/confmap + - go.opentelemetry.io/collector/confmap/converter/expandconverter + - go.opentelemetry.io/collector/confmap/provider/envprovider + - go.opentelemetry.io/collector/confmap/provider/fileprovider + - go.opentelemetry.io/collector/confmap/provider/httpprovider + - go.opentelemetry.io/collector/confmap/provider/httpsprovider + - go.opentelemetry.io/collector/confmap/provider/yamlprovider - go.opentelemetry.io/collector/config/configauth - go.opentelemetry.io/collector/config/configcompression - go.opentelemetry.io/collector/config/configgrpc - go.opentelemetry.io/collector/config/confighttp - go.opentelemetry.io/collector/config/confignet - - go.opentelemetry.io/collector/config/configopaque + - go.opentelemetry.io/collector/config/configretry - go.opentelemetry.io/collector/config/configtelemetry - go.opentelemetry.io/collector/config/configtls - go.opentelemetry.io/collector/config/internal @@ -35,6 +43,7 @@ module-sets: - go.opentelemetry.io/collector/extension/auth - go.opentelemetry.io/collector/extension/ballastextension - go.opentelemetry.io/collector/extension/zpagesextension + - go.opentelemetry.io/collector/extension/memorylimiterextension - go.opentelemetry.io/collector/otelcol - go.opentelemetry.io/collector/processor - go.opentelemetry.io/collector/processor/batchprocessor @@ -46,4 +55,5 @@ module-sets: excluded-modules: - go.opentelemetry.io/collector/cmd/otelcorecol + - go.opentelemetry.io/collector/internal/e2e - go.opentelemetry.io/collector/internal/tools From 41e5d7d8dda8fbe69410162f45630036b338e18b Mon Sep 17 00:00:00 2001 From: Steve Strugnell Date: Fri, 14 Jun 2024 10:28:46 +1200 Subject: [PATCH 3/5] Upstream merge 0.100.x (#42) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [configgrpc] Add `ToServerContext` (#9624) Adds a new function, `ToServerContext` which does what `ToServer` does, but takes a `context.Context`. After the next release we'll deprecate `ToServerContext` and rename it to `ToServer`. Related to https://github.com/open-telemetry/opentelemetry-collector/issues/9490 --------- Co-authored-by: Dmitrii Anoshin * [chore] Fix prepare-release.yml (#9675) **Description:** Fixes https://github.com/open-telemetry/opentelemetry-collector/actions/runs/8139621131/workflow ``` The workflow is not valid. .github/workflows/prepare-release.yml (Line: 54, Col: 9): Job 'prepare-release' depends on unknown job 'validate-version'. ``` #9409 introduced some errors because the workflow is not tested on PRs, #9668 partly fixed them and I mistakenly believed Github would notify me of further errors in the workflow, the same way it did with this one, but it did not. * [chore] Prepare release v1.3.0/v0.96.0 (#9680) The following commands were run to prepare this release: - make chlog-update VERSION=v1.3.0/v0.96.0 - make prepare-release PREVIOUS_VERSION=1.2.0 RELEASE_CANDIDATE=1.3.0 MODSET=stable - make prepare-release PREVIOUS_VERSION=0.95.0 RELEASE_CANDIDATE=0.96.0 MODSET=beta * [chore] Update release schedule (#9678) **Description:** Updates release schedule. The March 18th release overlaps with KubeCon EU, so I am shifting everything by one week starting with that release. This means the next release cycle will have three weeks. * [chore] Add reminder to update release schedule to release issue template (#9679) **Description:** Add reminder to update the release schedule * [chore] Update prepare release examples (#9677) **Description:** After #8975 we decided to not do any more explicit release candidates so we can update the examples. Note that due to #9676 this is not tested until we explicitly run the workflow on the next release, but the change is small enough to seem safe to merge. * [cmd/mdatagen] Pull new changes from contrib (#9683) To completely migrate mdatagen from contrib to core, we need to pull latest changes: - https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/31500 - https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/31503 - https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/31520 - https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/31525 - https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/31530 - https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/31532 --------- Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore] fix type in confighttp readme (#9690) This doc incorrectly uses the otlp exporter as an example of using confighttp. That exporter doesn't use confighttp Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Update module github.com/stretchr/testify to v1.9.0 (#9695) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/stretchr/testify](https://togithub.com/stretchr/testify) | `v1.8.4` -> `v1.9.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fstretchr%2ftestify/v1.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fstretchr%2ftestify/v1.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fstretchr%2ftestify/v1.8.4/v1.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fstretchr%2ftestify/v1.8.4/v1.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
stretchr/testify (github.com/stretchr/testify) ### [`v1.9.0`](https://togithub.com/stretchr/testify/releases/tag/v1.9.0) [Compare Source](https://togithub.com/stretchr/testify/compare/v1.8.4...v1.9.0) #### What's Changed - Fix Go modules version by [@​SuperQ](https://togithub.com/SuperQ) in [https://github.com/stretchr/testify/pull/1394](https://togithub.com/stretchr/testify/pull/1394) - Document that require is not safe to call in created goroutines by [@​programmer04](https://togithub.com/programmer04) in [https://github.com/stretchr/testify/pull/1392](https://togithub.com/stretchr/testify/pull/1392) - Remove myself from MAINTAINERS.md by [@​mvdkleijn](https://togithub.com/mvdkleijn) in [https://github.com/stretchr/testify/pull/1367](https://togithub.com/stretchr/testify/pull/1367) - Correct spelling/grammar by [@​echarrod](https://togithub.com/echarrod) in [https://github.com/stretchr/testify/pull/1389](https://togithub.com/stretchr/testify/pull/1389) - docs: Update URLs in README by [@​davidjb](https://togithub.com/davidjb) in [https://github.com/stretchr/testify/pull/1349](https://togithub.com/stretchr/testify/pull/1349) - Update mockery link to Github Pages in README by [@​LandonTClipp](https://togithub.com/LandonTClipp) in [https://github.com/stretchr/testify/pull/1346](https://togithub.com/stretchr/testify/pull/1346) - docs: Fix typos in tests and comments by [@​alexandear](https://togithub.com/alexandear) in [https://github.com/stretchr/testify/pull/1410](https://togithub.com/stretchr/testify/pull/1410) - CI: tests from go1.17 by [@​SuperQ](https://togithub.com/SuperQ) in [https://github.com/stretchr/testify/pull/1409](https://togithub.com/stretchr/testify/pull/1409) - Fix adding ? when no values passed by [@​lesichkovm](https://togithub.com/lesichkovm) in [https://github.com/stretchr/testify/pull/1320](https://togithub.com/stretchr/testify/pull/1320) - codegen: use standard header for generated files by [@​dolmen](https://togithub.com/dolmen) in [https://github.com/stretchr/testify/pull/1406](https://togithub.com/stretchr/testify/pull/1406) - mock: AssertExpectations log reason only on failure by [@​hikyaru-suzuki](https://togithub.com/hikyaru-suzuki) in [https://github.com/stretchr/testify/pull/1360](https://togithub.com/stretchr/testify/pull/1360) - assert: fix flaky TestNeverTrue by [@​dolmen](https://togithub.com/dolmen) in [https://github.com/stretchr/testify/pull/1417](https://togithub.com/stretchr/testify/pull/1417) - README: fix typos "set up" vs "setup" by [@​ossan-dev](https://togithub.com/ossan-dev) in [https://github.com/stretchr/testify/pull/1428](https://togithub.com/stretchr/testify/pull/1428) - mock: move regexp compilation outside of `Called` by [@​aud10slave](https://togithub.com/aud10slave) in [https://github.com/stretchr/testify/pull/631](https://togithub.com/stretchr/testify/pull/631) - assert: refactor internal func getLen() by [@​dolmen](https://togithub.com/dolmen) in [https://github.com/stretchr/testify/pull/1445](https://togithub.com/stretchr/testify/pull/1445) - mock: deprecate type AnythingOfTypeArgument ([#​1434](https://togithub.com/stretchr/testify/issues/1434)) by [@​dolmen](https://togithub.com/dolmen) in [https://github.com/stretchr/testify/pull/1441](https://togithub.com/stretchr/testify/pull/1441) - Remove no longer needed assert.canConvert by [@​alexandear](https://togithub.com/alexandear) in [https://github.com/stretchr/testify/pull/1470](https://togithub.com/stretchr/testify/pull/1470) - assert: ObjectsAreEqual: use time.Equal for time.Time types by [@​tscales](https://togithub.com/tscales) in [https://github.com/stretchr/testify/pull/1464](https://togithub.com/stretchr/testify/pull/1464) - Bump actions/checkout from 3 to 4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/stretchr/testify/pull/1466](https://togithub.com/stretchr/testify/pull/1466) - Bump actions/setup-go from 3.2.0 to 4.1.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/stretchr/testify/pull/1451](https://togithub.com/stretchr/testify/pull/1451) - fix: make EventuallyWithT concurrency safe by [@​czeslavo](https://togithub.com/czeslavo) in [https://github.com/stretchr/testify/pull/1395](https://togithub.com/stretchr/testify/pull/1395) - assert: fix httpCode and HTTPBody occur panic when http.Handler read Body by [@​hidu](https://togithub.com/hidu) in [https://github.com/stretchr/testify/pull/1484](https://togithub.com/stretchr/testify/pull/1484) - assert.EqualExportedValues: fix handling of arrays by [@​zrbecker](https://togithub.com/zrbecker) in [https://github.com/stretchr/testify/pull/1473](https://togithub.com/stretchr/testify/pull/1473) - .github: use latest Go versions by [@​kevinburkesegment](https://togithub.com/kevinburkesegment) in [https://github.com/stretchr/testify/pull/1489](https://togithub.com/stretchr/testify/pull/1489) - assert: Deprecate EqualExportedValues by [@​HaraldNordgren](https://togithub.com/HaraldNordgren) in [https://github.com/stretchr/testify/pull/1488](https://togithub.com/stretchr/testify/pull/1488) - suite: refactor test assertions by [@​alexandear](https://togithub.com/alexandear) in [https://github.com/stretchr/testify/pull/1474](https://togithub.com/stretchr/testify/pull/1474) - suite: fix SetupSubTest and TearDownSubTest execution order by [@​linusbarth](https://togithub.com/linusbarth) in [https://github.com/stretchr/testify/pull/1471](https://togithub.com/stretchr/testify/pull/1471) - docs: Fix deprecation comments for http package by [@​alexandear](https://togithub.com/alexandear) in [https://github.com/stretchr/testify/pull/1335](https://togithub.com/stretchr/testify/pull/1335) - Add map support doc comments to Subset and NotSubset by [@​jedevc](https://togithub.com/jedevc) in [https://github.com/stretchr/testify/pull/1306](https://togithub.com/stretchr/testify/pull/1306) - TestErrorIs/TestNotErrorIs: check error message contents by [@​craig65535](https://togithub.com/craig65535) in [https://github.com/stretchr/testify/pull/1435](https://togithub.com/stretchr/testify/pull/1435) - suite: fix subtest names (fix [#​1501](https://togithub.com/stretchr/testify/issues/1501)) by [@​dolmen](https://togithub.com/dolmen) in [https://github.com/stretchr/testify/pull/1504](https://togithub.com/stretchr/testify/pull/1504) - assert: improve unsafe.Pointer tests by [@​dolmen](https://togithub.com/dolmen) in [https://github.com/stretchr/testify/pull/1505](https://togithub.com/stretchr/testify/pull/1505) - assert: simplify isNil implementation by [@​dolmen](https://togithub.com/dolmen) in [https://github.com/stretchr/testify/pull/1506](https://togithub.com/stretchr/testify/pull/1506) - assert.InEpsilonSlice: fix expected/actual order and other improvements by [@​dolmen](https://togithub.com/dolmen) in [https://github.com/stretchr/testify/pull/1483](https://togithub.com/stretchr/testify/pull/1483) - Fix dependency cycle with objx [#​1292](https://togithub.com/stretchr/testify/issues/1292) by [@​dolmen](https://togithub.com/dolmen) in [https://github.com/stretchr/testify/pull/1453](https://togithub.com/stretchr/testify/pull/1453) - mock: refactor TestIsArgsEqual by [@​dolmen](https://togithub.com/dolmen) in [https://github.com/stretchr/testify/pull/1444](https://togithub.com/stretchr/testify/pull/1444) - mock: optimize argument matching checks by [@​dolmen](https://togithub.com/dolmen) in [https://github.com/stretchr/testify/pull/1416](https://togithub.com/stretchr/testify/pull/1416) - assert: fix TestEventuallyTimeout by [@​dolmen](https://togithub.com/dolmen) in [https://github.com/stretchr/testify/pull/1412](https://togithub.com/stretchr/testify/pull/1412) - CI: add go 1.21 in GitHub Actions by [@​dolmen](https://togithub.com/dolmen) in [https://github.com/stretchr/testify/pull/1450](https://togithub.com/stretchr/testify/pull/1450) - suite: fix recoverAndFailOnPanic to report test failure at the right location by [@​dolmen](https://togithub.com/dolmen) in [https://github.com/stretchr/testify/pull/1502](https://togithub.com/stretchr/testify/pull/1502) - Update maintainers by [@​brackendawson](https://togithub.com/brackendawson) in [https://github.com/stretchr/testify/pull/1533](https://togithub.com/stretchr/testify/pull/1533) - assert: Fix EqualValues to handle overflow/underflow by [@​arjunmahishi](https://togithub.com/arjunmahishi) in [https://github.com/stretchr/testify/pull/1531](https://togithub.com/stretchr/testify/pull/1531) - assert: better formatting for Len() error by [@​kevinburkesegment](https://togithub.com/kevinburkesegment) in [https://github.com/stretchr/testify/pull/1485](https://togithub.com/stretchr/testify/pull/1485) - Ensure AssertExpectations does not fail in skipped tests by [@​ianrose14](https://togithub.com/ianrose14) in [https://github.com/stretchr/testify/pull/1331](https://togithub.com/stretchr/testify/pull/1331) - suite: fix deadlock in suite.Require()/Assert() by [@​arjunmahishi](https://togithub.com/arjunmahishi) in [https://github.com/stretchr/testify/pull/1535](https://togithub.com/stretchr/testify/pull/1535) - Revert "assert: ObjectsAreEqual: use time.Equal for time.Time type" by [@​brackendawson](https://togithub.com/brackendawson) in [https://github.com/stretchr/testify/pull/1537](https://togithub.com/stretchr/testify/pull/1537) - \[chore] Add issue templates by [@​arjunmahishi](https://togithub.com/arjunmahishi) in [https://github.com/stretchr/testify/pull/1538](https://togithub.com/stretchr/testify/pull/1538) - Update the build status badge by [@​brackendawson](https://togithub.com/brackendawson) in [https://github.com/stretchr/testify/pull/1540](https://togithub.com/stretchr/testify/pull/1540) - Update Github workflows setup-go to V5 by [@​hendrywiranto](https://togithub.com/hendrywiranto) in [https://github.com/stretchr/testify/pull/1545](https://togithub.com/stretchr/testify/pull/1545) - Support Pointer to Struct in EqualExportedValues by [@​Lucaber](https://togithub.com/Lucaber) in [https://github.com/stretchr/testify/pull/1517](https://togithub.com/stretchr/testify/pull/1517) - README: drop link to gorc by [@​guettli](https://togithub.com/guettli) in [https://github.com/stretchr/testify/pull/1248](https://togithub.com/stretchr/testify/pull/1248) - http_assertions: honour the msgAndArgs provided with each assertion by [@​arjunmahishi](https://togithub.com/arjunmahishi) in [https://github.com/stretchr/testify/pull/1548](https://togithub.com/stretchr/testify/pull/1548) - fix typos in comments and tests by [@​ccoVeille](https://togithub.com/ccoVeille) in [https://github.com/stretchr/testify/pull/1247](https://togithub.com/stretchr/testify/pull/1247) - Include the auto-release notes in releases by [@​brackendawson](https://togithub.com/brackendawson) in [https://github.com/stretchr/testify/pull/1550](https://togithub.com/stretchr/testify/pull/1550) - Add `NotImplements` and variants by [@​hslatman](https://togithub.com/hslatman) in [https://github.com/stretchr/testify/pull/1385](https://togithub.com/stretchr/testify/pull/1385) - Add support to compare uintptr by [@​bogdandrutu](https://togithub.com/bogdandrutu) in [https://github.com/stretchr/testify/pull/1339](https://togithub.com/stretchr/testify/pull/1339) - build(deps): bump github.com/stretchr/objx from 0.5.1 to 0.5.2 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/stretchr/testify/pull/1552](https://togithub.com/stretchr/testify/pull/1552) #### New Contributors - [@​SuperQ](https://togithub.com/SuperQ) made their first contribution in [https://github.com/stretchr/testify/pull/1394](https://togithub.com/stretchr/testify/pull/1394) - [@​programmer04](https://togithub.com/programmer04) made their first contribution in [https://github.com/stretchr/testify/pull/1392](https://togithub.com/stretchr/testify/pull/1392) - [@​echarrod](https://togithub.com/echarrod) made their first contribution in [https://github.com/stretchr/testify/pull/1389](https://togithub.com/stretchr/testify/pull/1389) - [@​davidjb](https://togithub.com/davidjb) made their first contribution in [https://github.com/stretchr/testify/pull/1349](https://togithub.com/stretchr/testify/pull/1349) - [@​LandonTClipp](https://togithub.com/LandonTClipp) made their first contribution in [https://github.com/stretchr/testify/pull/1346](https://togithub.com/stretchr/testify/pull/1346) - [@​alexandear](https://togithub.com/alexandear) made their first contribution in [https://github.com/stretchr/testify/pull/1410](https://togithub.com/stretchr/testify/pull/1410) - [@​lesichkovm](https://togithub.com/lesichkovm) made their first contribution in [https://github.com/stretchr/testify/pull/1320](https://togithub.com/stretchr/testify/pull/1320) - [@​dolmen](https://togithub.com/dolmen) made their first contribution in [https://github.com/stretchr/testify/pull/1406](https://togithub.com/stretchr/testify/pull/1406) - [@​hikyaru-suzuki](https://togithub.com/hikyaru-suzuki) made their first contribution in [https://github.com/stretchr/testify/pull/1360](https://togithub.com/stretchr/testify/pull/1360) - [@​ossan-dev](https://togithub.com/ossan-dev) made their first contribution in [https://github.com/stretchr/testify/pull/1428](https://togithub.com/stretchr/testify/pull/1428) - [@​aud10slave](https://togithub.com/aud10slave) made their first contribution in [https://github.com/stretchr/testify/pull/631](https://togithub.com/stretchr/testify/pull/631) - [@​tscales](https://togithub.com/tscales) made their first contribution in [https://github.com/stretchr/testify/pull/1464](https://togithub.com/stretchr/testify/pull/1464) - [@​czeslavo](https://togithub.com/czeslavo) made their first contribution in [https://github.com/stretchr/testify/pull/1395](https://togithub.com/stretchr/testify/pull/1395) - [@​hidu](https://togithub.com/hidu) made their first contribution in [https://github.com/stretchr/testify/pull/1484](https://togithub.com/stretchr/testify/pull/1484) - [@​zrbecker](https://togithub.com/zrbecker) made their first contribution in [https://github.com/stretchr/testify/pull/1473](https://togithub.com/stretchr/testify/pull/1473) - [@​kevinburkesegment](https://togithub.com/kevinburkesegment) made their first contribution in [https://github.com/stretchr/testify/pull/1489](https://togithub.com/stretchr/testify/pull/1489) - [@​linusbarth](https://togithub.com/linusbarth) made their first contribution in [https://github.com/stretchr/testify/pull/1471](https://togithub.com/stretchr/testify/pull/1471) - [@​jedevc](https://togithub.com/jedevc) made their first contribution in [https://github.com/stretchr/testify/pull/1306](https://togithub.com/stretchr/testify/pull/1306) - [@​craig65535](https://togithub.com/craig65535) made their first contribution in [https://github.com/stretchr/testify/pull/1435](https://togithub.com/stretchr/testify/pull/1435) - [@​arjunmahishi](https://togithub.com/arjunmahishi) made their first contribution in [https://github.com/stretchr/testify/pull/1531](https://togithub.com/stretchr/testify/pull/1531) - [@​ianrose14](https://togithub.com/ianrose14) made their first contribution in [https://github.com/stretchr/testify/pull/1331](https://togithub.com/stretchr/testify/pull/1331) - [@​hendrywiranto](https://togithub.com/hendrywiranto) made their first contribution in [https://github.com/stretchr/testify/pull/1545](https://togithub.com/stretchr/testify/pull/1545) - [@​Lucaber](https://togithub.com/Lucaber) made their first contribution in [https://github.com/stretchr/testify/pull/1517](https://togithub.com/stretchr/testify/pull/1517) - [@​guettli](https://togithub.com/guettli) made their first contribution in [https://github.com/stretchr/testify/pull/1248](https://togithub.com/stretchr/testify/pull/1248) - [@​ccoVeille](https://togithub.com/ccoVeille) made their first contribution in [https://github.com/stretchr/testify/pull/1247](https://togithub.com/stretchr/testify/pull/1247) - [@​hslatman](https://togithub.com/hslatman) made their first contribution in [https://github.com/stretchr/testify/pull/1385](https://togithub.com/stretchr/testify/pull/1385) - [@​bogdandrutu](https://togithub.com/bogdandrutu) made their first contribution in [https://github.com/stretchr/testify/pull/1339](https://togithub.com/stretchr/testify/pull/1339) **Full Changelog**: https://github.com/stretchr/testify/compare/v1.8.4...v1.9.0
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update module go.opentelemetry.io/build-tools/semconvgen to v0.13.0 (#9701) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/build-tools/semconvgen](https://togithub.com/open-telemetry/opentelemetry-go-build-tools) | `v0.12.0` -> `v0.13.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fbuild-tools%2fsemconvgen/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fbuild-tools%2fsemconvgen/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fbuild-tools%2fsemconvgen/v0.12.0/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fbuild-tools%2fsemconvgen/v0.12.0/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-go-build-tools (go.opentelemetry.io/build-tools/semconvgen) ### [`v0.13.0`](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/blob/HEAD/CHANGELOG.md#v0130) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/compare/v0.12.0...v0.13.0) ##### 🛑 Breaking changes 🛑 - `all`: bump minimal Go version to 1.20 ([#​474](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/474)) ##### 💡 Enhancements 💡 - `multimod`: ignore excluded-modules when using sync to update dependencies ([#​442](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/442)) This allows users of the sync command to sync all modules in a monorepo, including those listed in the excluded-modules. This is useful for repositories where some modules may not yet be ready for releasing (therefore listed under excluded-modules) but their dependencies still need to be managed via multimod. - `crosslink`: Add `--skip` flag to ignore specified go modules ([#​480](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/480)) - `multimod`: add support for `--commit-hash` to allow users to overwrite the tag in a versions.yaml file ([#​422](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/422)) This feature allows users to specify a tag (i.e. main) when they want to update modules. - `chloggen`: support a custom changelog summary template ([#​501](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/501)) The changelog summary template can be customized by configuring a custom template with the `summary_template` configuration setting. The default template provides a starting point for a custom template: https://github.com/open-telemetry/opentelemetry-go-build-tools/blob/v0.13.0/chloggen/internal/chlog/summary.tmpl ##### 🧰 Bug fixes 🧰 - `crosslink`: Fix Windows produces backslashes instead of slashes ([#​458](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/458)) This fixes the issue of Windows produces backslashes instead of slashes when crosslinking dependencies in go.mod files on Windows. - `dbotconf`: Fix Windows produces backslashes instead of slashes ([#​264](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/264)) This fixes the issue of Windows produces backslashes instead of slashes when generating Dependabot configuration files on Windows. - `multimod`: Fix tagging on Windows ([#​464](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/464)) This fixes the issue of `multimod tag` failing on Windows. - `multimod`: Fix to log 'Using versioning file' and 'Successfully deleted module tags' to stderr instead of stdout ([#​507](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/507)) - `chloggen`: change generated files permissions from 0755 to 0644 ([#​457](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/457))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update module golang.org/x/tools to v0.19.0 (#9708) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | golang.org/x/tools | `v0.18.0` -> `v0.19.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2ftools/v0.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2ftools/v0.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2ftools/v0.18.0/v0.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2ftools/v0.18.0/v0.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [cmd/mdatagen] Update the scope name generation method (#9693) Don't use hardcoded "go.opentelemetry.io/collector" prefix. Provide a way to specify the `scope_name` in metadata.yaml. If not provided, try to use the go package name. Updates https://github.com/open-telemetry/opentelemetry-collector/issues/9494 * Update module go.opentelemetry.io/collector/exporter/otlphttpexporter to v0.96.0 (#9703) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/collector/exporter/otlphttpexporter](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.95.0` -> `v0.96.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.96.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.96.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.95.0/v0.96.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.95.0/v0.96.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/exporter/otlphttpexporter) ### [`v0.96.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v130v0960) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.95.0...v0.96.0) ##### 🛑 Breaking changes 🛑 - `configgrpc`: Remove deprecated `GRPCClientSettings`, `GRPCServerSettings`, and `ServerConfig.ToListenerContext`. ([#​9616](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9616)) - `confighttp`: Remove deprecated `HTTPClientSettings`, `NewDefaultHTTPClientSettings`, and `CORSSettings`. ([#​9625](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9625)) - `confignet`: Removes deprecated `NetAddr` and `TCPAddr` ([#​9614](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9614)) ##### 💡 Enhancements 💡 - `configtls`: Add `include_system_ca_certs_pool` to configtls, allowing to load system certs and additional custom certs. ([#​7774](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7774)) - `otelcol`: Add `ConfigProviderSettings` to `CollectorSettings` ([#​4759](https://togithub.com/open-telemetry/opentelemetry-collector/issues/4759)) This allows passing a custom list of `confmap.Provider`s to `otelcol.NewCommand`. - `pdata`: Update to OTLP v1.1.0 ([#​9587](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9587)) Introduces Span and SpanLink flags. - `confmap`: Update mapstructure to use a maintained fork, github.com/go-viper/mapstructure/v2. ([#​9634](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9634)) [https://github.com/mitchellh/mapstructure/issues/349](https://togithub.com/mitchellh/mapstructure/issues/349)/349 for context. ##### 🧰 Bug fixes 🧰 - `configretry`: Allow max_elapsed_time to be set to 0 for indefinite retries ([#​9641](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9641)) - `client`: Make `Metadata.Get` thread safe ([#​9595](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9595))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update module go.opentelemetry.io/collector/receiver/otlpreceiver to v0.96.0 (#9704) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/collector/receiver/otlpreceiver](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.95.0` -> `v0.96.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.96.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.96.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.95.0/v0.96.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.95.0/v0.96.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/receiver/otlpreceiver) ### [`v0.96.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v130v0960) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.95.0...v0.96.0) ##### 🛑 Breaking changes 🛑 - `configgrpc`: Remove deprecated `GRPCClientSettings`, `GRPCServerSettings`, and `ServerConfig.ToListenerContext`. ([#​9616](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9616)) - `confighttp`: Remove deprecated `HTTPClientSettings`, `NewDefaultHTTPClientSettings`, and `CORSSettings`. ([#​9625](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9625)) - `confignet`: Removes deprecated `NetAddr` and `TCPAddr` ([#​9614](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9614)) ##### 💡 Enhancements 💡 - `configtls`: Add `include_system_ca_certs_pool` to configtls, allowing to load system certs and additional custom certs. ([#​7774](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7774)) - `otelcol`: Add `ConfigProviderSettings` to `CollectorSettings` ([#​4759](https://togithub.com/open-telemetry/opentelemetry-collector/issues/4759)) This allows passing a custom list of `confmap.Provider`s to `otelcol.NewCommand`. - `pdata`: Update to OTLP v1.1.0 ([#​9587](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9587)) Introduces Span and SpanLink flags. - `confmap`: Update mapstructure to use a maintained fork, github.com/go-viper/mapstructure/v2. ([#​9634](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9634)) [https://github.com/mitchellh/mapstructure/issues/349](https://togithub.com/mitchellh/mapstructure/issues/349)/349 for context. ##### 🧰 Bug fixes 🧰 - `configretry`: Allow max_elapsed_time to be set to 0 for indefinite retries ([#​9641](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9641)) - `client`: Make `Metadata.Get` thread safe ([#​9595](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9595))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * [chore] [cmd/mdatagen] Update status.go template (#9713) To produce the same output as mdatagen in contrib. It makes it easy to compare the diff for the mdatagen migration. * Update module golang.org/x/sys to v0.18.0 (#9706) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | golang.org/x/sys | `v0.17.0` -> `v0.18.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fsys/v0.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2fsys/v0.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2fsys/v0.17.0/v0.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fsys/v0.17.0/v0.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Update module google.golang.org/protobuf to v1.33.0 (#9712) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google.golang.org/protobuf](https://togithub.com/protocolbuffers/protobuf-go) | `v1.32.0` -> `v1.33.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/google.golang.org%2fprotobuf/v1.33.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/google.golang.org%2fprotobuf/v1.33.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/google.golang.org%2fprotobuf/v1.32.0/v1.33.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/google.golang.org%2fprotobuf/v1.32.0/v1.33.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update module go.opentelemetry.io/collector/exporter/otlpexporter to v0.96.0 (#9702) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/collector/exporter/otlpexporter](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.95.0` -> `v0.96.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.96.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.96.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.95.0/v0.96.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.95.0/v0.96.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/exporter/otlpexporter) ### [`v0.96.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v130v0960) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.95.0...v0.96.0) ##### 🛑 Breaking changes 🛑 - `configgrpc`: Remove deprecated `GRPCClientSettings`, `GRPCServerSettings`, and `ServerConfig.ToListenerContext`. ([#​9616](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9616)) - `confighttp`: Remove deprecated `HTTPClientSettings`, `NewDefaultHTTPClientSettings`, and `CORSSettings`. ([#​9625](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9625)) - `confignet`: Removes deprecated `NetAddr` and `TCPAddr` ([#​9614](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9614)) ##### 💡 Enhancements 💡 - `configtls`: Add `include_system_ca_certs_pool` to configtls, allowing to load system certs and additional custom certs. ([#​7774](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7774)) - `otelcol`: Add `ConfigProviderSettings` to `CollectorSettings` ([#​4759](https://togithub.com/open-telemetry/opentelemetry-collector/issues/4759)) This allows passing a custom list of `confmap.Provider`s to `otelcol.NewCommand`. - `pdata`: Update to OTLP v1.1.0 ([#​9587](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9587)) Introduces Span and SpanLink flags. - `confmap`: Update mapstructure to use a maintained fork, github.com/go-viper/mapstructure/v2. ([#​9634](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9634)) [https://github.com/mitchellh/mapstructure/issues/349](https://togithub.com/mitchellh/mapstructure/issues/349)/349 for context. ##### 🧰 Bug fixes 🧰 - `configretry`: Allow max_elapsed_time to be set to 0 for indefinite retries ([#​9641](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9641)) - `client`: Make `Metadata.Get` thread safe ([#​9595](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9595))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Update github-actions deps (#9691) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/cache](https://togithub.com/actions/cache) | action | patch | `v4.0.0` -> `v4.0.1` | | [github/codeql-action](https://togithub.com/github/codeql-action) | action | patch | `v3.24.5` -> `v3.24.6` | --- ### Release Notes
actions/cache (actions/cache) ### [`v4.0.1`](https://togithub.com/actions/cache/releases/tag/v4.0.1) [Compare Source](https://togithub.com/actions/cache/compare/v4.0.0...v4.0.1) ##### What's Changed - Update README.md by [@​yacaovsnc](https://togithub.com/yacaovsnc) in [https://github.com/actions/cache/pull/1304](https://togithub.com/actions/cache/pull/1304) - Update examples by [@​yacaovsnc](https://togithub.com/yacaovsnc) in [https://github.com/actions/cache/pull/1305](https://togithub.com/actions/cache/pull/1305) - Update actions/cache publish flow by [@​bethanyj28](https://togithub.com/bethanyj28) in [https://github.com/actions/cache/pull/1340](https://togithub.com/actions/cache/pull/1340) - Update [@​actions/cache](https://togithub.com/actions/cache) by [@​bethanyj28](https://togithub.com/bethanyj28) in [https://github.com/actions/cache/pull/1341](https://togithub.com/actions/cache/pull/1341) ##### New Contributors - [@​yacaovsnc](https://togithub.com/yacaovsnc) made their first contribution in [https://github.com/actions/cache/pull/1304](https://togithub.com/actions/cache/pull/1304) **Full Changelog**: https://github.com/actions/cache/compare/v4...v4.0.1
github/codeql-action (github/codeql-action) ### [`v3.24.6`](https://togithub.com/github/codeql-action/compare/v3.24.5...v3.24.6) [Compare Source](https://togithub.com/github/codeql-action/compare/v3.24.5...v3.24.6)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update module golang.org/x/net to v0.22.0 (#9705) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | golang.org/x/net | `v0.21.0` -> `v0.22.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fnet/v0.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2fnet/v0.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2fnet/v0.21.0/v0.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fnet/v0.21.0/v0.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update module google.golang.org/grpc to v1.62.1 (#9711) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google.golang.org/grpc](https://togithub.com/grpc/grpc-go) | `v1.62.0` -> `v1.62.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/google.golang.org%2fgrpc/v1.62.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/google.golang.org%2fgrpc/v1.62.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/google.golang.org%2fgrpc/v1.62.0/v1.62.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/google.golang.org%2fgrpc/v1.62.0/v1.62.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
grpc/grpc-go (google.golang.org/grpc) ### [`v1.62.1`](https://togithub.com/grpc/grpc-go/releases/tag/v1.62.1): Release 1.62.1 [Compare Source](https://togithub.com/grpc/grpc-go/compare/v1.62.0...v1.62.1) ### Bug Fixes - xds: fix a bug that results in `no matching virtual host found` RPC errors due to a difference between the target and LDS resource names ([#​6997](https://togithub.com/grpc/grpc-go/issues/6997)) - server: fixed stats handler data `InPayload.Length` for unary RPC calls ([#​6766](https://togithub.com/grpc/grpc-go/issues/6766)) - Special Thanks: [@​hueypark](https://togithub.com/hueypark) - grpc: the experimental `RecvBufferPool` `DialOption` and `ServerOption` are now active during unary RPCs with compression ([#​6766](https://togithub.com/grpc/grpc-go/issues/6766)) - Special Thanks: [@​hueypark](https://togithub.com/hueypark) - grpc: trim whitespaces in `accept-encoding` header before determining compressors - Special Thanks: [@​sercand](https://togithub.com/sercand)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update module go.opentelemetry.io/build-tools/multimod to v0.13.0 (#9700) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/build-tools/multimod](https://togithub.com/open-telemetry/opentelemetry-go-build-tools) | `v0.12.0` -> `v0.13.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fbuild-tools%2fmultimod/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fbuild-tools%2fmultimod/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fbuild-tools%2fmultimod/v0.12.0/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fbuild-tools%2fmultimod/v0.12.0/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-go-build-tools (go.opentelemetry.io/build-tools/multimod) ### [`v0.13.0`](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/blob/HEAD/CHANGELOG.md#v0130) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/compare/v0.12.0...v0.13.0) ##### 🛑 Breaking changes 🛑 - `all`: bump minimal Go version to 1.20 ([#​474](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/474)) ##### 💡 Enhancements 💡 - `multimod`: ignore excluded-modules when using sync to update dependencies ([#​442](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/442)) This allows users of the sync command to sync all modules in a monorepo, including those listed in the excluded-modules. This is useful for repositories where some modules may not yet be ready for releasing (therefore listed under excluded-modules) but their dependencies still need to be managed via multimod. - `crosslink`: Add `--skip` flag to ignore specified go modules ([#​480](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/480)) - `multimod`: add support for `--commit-hash` to allow users to overwrite the tag in a versions.yaml file ([#​422](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/422)) This feature allows users to specify a tag (i.e. main) when they want to update modules. - `chloggen`: support a custom changelog summary template ([#​501](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/501)) The changelog summary template can be customized by configuring a custom template with the `summary_template` configuration setting. The default template provides a starting point for a custom template: https://github.com/open-telemetry/opentelemetry-go-build-tools/blob/v0.13.0/chloggen/internal/chlog/summary.tmpl ##### 🧰 Bug fixes 🧰 - `crosslink`: Fix Windows produces backslashes instead of slashes ([#​458](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/458)) This fixes the issue of Windows produces backslashes instead of slashes when crosslinking dependencies in go.mod files on Windows. - `dbotconf`: Fix Windows produces backslashes instead of slashes ([#​264](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/264)) This fixes the issue of Windows produces backslashes instead of slashes when generating Dependabot configuration files on Windows. - `multimod`: Fix tagging on Windows ([#​464](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/464)) This fixes the issue of `multimod tag` failing on Windows. - `multimod`: Fix to log 'Using versioning file' and 'Successfully deleted module tags' to stderr instead of stdout ([#​507](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/507)) - `chloggen`: change generated files permissions from 0755 to 0644 ([#​457](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/457))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update module go.opentelemetry.io/build-tools/crosslink to v0.13.0 (#9699) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/build-tools/crosslink](https://togithub.com/open-telemetry/opentelemetry-go-build-tools) | `v0.12.1-0.20240121161735-d70c842b1bf5` -> `v0.13.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fbuild-tools%2fcrosslink/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fbuild-tools%2fcrosslink/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fbuild-tools%2fcrosslink/v0.12.1-0.20240121161735-d70c842b1bf5/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fbuild-tools%2fcrosslink/v0.12.1-0.20240121161735-d70c842b1bf5/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-go-build-tools (go.opentelemetry.io/build-tools/crosslink) ### [`v0.13.0`](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/blob/HEAD/CHANGELOG.md#v0130) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/compare/v0.12.0...v0.13.0) ##### 🛑 Breaking changes 🛑 - `all`: bump minimal Go version to 1.20 ([#​474](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/474)) ##### 💡 Enhancements 💡 - `multimod`: ignore excluded-modules when using sync to update dependencies ([#​442](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/442)) This allows users of the sync command to sync all modules in a monorepo, including those listed in the excluded-modules. This is useful for repositories where some modules may not yet be ready for releasing (therefore listed under excluded-modules) but their dependencies still need to be managed via multimod. - `crosslink`: Add `--skip` flag to ignore specified go modules ([#​480](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/480)) - `multimod`: add support for `--commit-hash` to allow users to overwrite the tag in a versions.yaml file ([#​422](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/422)) This feature allows users to specify a tag (i.e. main) when they want to update modules. - `chloggen`: support a custom changelog summary template ([#​501](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/501)) The changelog summary template can be customized by configuring a custom template with the `summary_template` configuration setting. The default template provides a starting point for a custom template: https://github.com/open-telemetry/opentelemetry-go-build-tools/blob/v0.13.0/chloggen/internal/chlog/summary.tmpl ##### 🧰 Bug fixes 🧰 - `crosslink`: Fix Windows produces backslashes instead of slashes ([#​458](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/458)) This fixes the issue of Windows produces backslashes instead of slashes when crosslinking dependencies in go.mod files on Windows. - `dbotconf`: Fix Windows produces backslashes instead of slashes ([#​264](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/264)) This fixes the issue of Windows produces backslashes instead of slashes when generating Dependabot configuration files on Windows. - `multimod`: Fix tagging on Windows ([#​464](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/464)) This fixes the issue of `multimod tag` failing on Windows. - `multimod`: Fix to log 'Using versioning file' and 'Successfully deleted module tags' to stderr instead of stdout ([#​507](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/507)) - `chloggen`: change generated files permissions from 0755 to 0644 ([#​457](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/457))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update module go.opentelemetry.io/build-tools/chloggen to v0.13.0 (#9697) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/build-tools/chloggen](https://togithub.com/open-telemetry/opentelemetry-go-build-tools) | `v0.12.0` -> `v0.13.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fbuild-tools%2fchloggen/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fbuild-tools%2fchloggen/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fbuild-tools%2fchloggen/v0.12.0/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fbuild-tools%2fchloggen/v0.12.0/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-go-build-tools (go.opentelemetry.io/build-tools/chloggen) ### [`v0.13.0`](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/blob/HEAD/CHANGELOG.md#v0130) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/compare/v0.12.0...v0.13.0) ##### 🛑 Breaking changes 🛑 - `all`: bump minimal Go version to 1.20 ([#​474](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/474)) ##### 💡 Enhancements 💡 - `multimod`: ignore excluded-modules when using sync to update dependencies ([#​442](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/442)) This allows users of the sync command to sync all modules in a monorepo, including those listed in the excluded-modules. This is useful for repositories where some modules may not yet be ready for releasing (therefore listed under excluded-modules) but their dependencies still need to be managed via multimod. - `crosslink`: Add `--skip` flag to ignore specified go modules ([#​480](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/480)) - `multimod`: add support for `--commit-hash` to allow users to overwrite the tag in a versions.yaml file ([#​422](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/422)) This feature allows users to specify a tag (i.e. main) when they want to update modules. - `chloggen`: support a custom changelog summary template ([#​501](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/501)) The changelog summary template can be customized by configuring a custom template with the `summary_template` configuration setting. The default template provides a starting point for a custom template: https://github.com/open-telemetry/opentelemetry-go-build-tools/blob/v0.13.0/chloggen/internal/chlog/summary.tmpl ##### 🧰 Bug fixes 🧰 - `crosslink`: Fix Windows produces backslashes instead of slashes ([#​458](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/458)) This fixes the issue of Windows produces backslashes instead of slashes when crosslinking dependencies in go.mod files on Windows. - `dbotconf`: Fix Windows produces backslashes instead of slashes ([#​264](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/264)) This fixes the issue of Windows produces backslashes instead of slashes when generating Dependabot configuration files on Windows. - `multimod`: Fix tagging on Windows ([#​464](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/464)) This fixes the issue of `multimod tag` failing on Windows. - `multimod`: Fix to log 'Using versioning file' and 'Successfully deleted module tags' to stderr instead of stdout ([#​507](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/507)) - `chloggen`: change generated files permissions from 0755 to 0644 ([#​457](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/457))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Add a workflow to test otelcorecol as a Windows service (#9689) **Description:** Adding a workflow to fix #6455 this will also be needed when fixing #5300 Fixes #6455 **Link to tracking Issue:** #6455 * Update module go.opentelemetry.io/build-tools/checkfile to v0.13.0 (#9696) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/build-tools/checkfile](https://togithub.com/open-telemetry/opentelemetry-go-build-tools) | `v0.12.0` -> `v0.13.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fbuild-tools%2fcheckfile/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fbuild-tools%2fcheckfile/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fbuild-tools%2fcheckfile/v0.12.0/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fbuild-tools%2fcheckfile/v0.12.0/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-go-build-tools (go.opentelemetry.io/build-tools/checkfile) ### [`v0.13.0`](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/blob/HEAD/CHANGELOG.md#v0130) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/compare/v0.12.0...v0.13.0) ##### 🛑 Breaking changes 🛑 - `all`: bump minimal Go version to 1.20 ([#​474](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/474)) ##### 💡 Enhancements 💡 - `multimod`: ignore excluded-modules when using sync to update dependencies ([#​442](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/442)) This allows users of the sync command to sync all modules in a monorepo, including those listed in the excluded-modules. This is useful for repositories where some modules may not yet be ready for releasing (therefore listed under excluded-modules) but their dependencies still need to be managed via multimod. - `crosslink`: Add `--skip` flag to ignore specified go modules ([#​480](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/480)) - `multimod`: add support for `--commit-hash` to allow users to overwrite the tag in a versions.yaml file ([#​422](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/422)) This feature allows users to specify a tag (i.e. main) when they want to update modules. - `chloggen`: support a custom changelog summary template ([#​501](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/501)) The changelog summary template can be customized by configuring a custom template with the `summary_template` configuration setting. The default template provides a starting point for a custom template: https://github.com/open-telemetry/opentelemetry-go-build-tools/blob/v0.13.0/chloggen/internal/chlog/summary.tmpl ##### 🧰 Bug fixes 🧰 - `crosslink`: Fix Windows produces backslashes instead of slashes ([#​458](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/458)) This fixes the issue of Windows produces backslashes instead of slashes when crosslinking dependencies in go.mod files on Windows. - `dbotconf`: Fix Windows produces backslashes instead of slashes ([#​264](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/264)) This fixes the issue of Windows produces backslashes instead of slashes when generating Dependabot configuration files on Windows. - `multimod`: Fix tagging on Windows ([#​464](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/464)) This fixes the issue of `multimod tag` failing on Windows. - `multimod`: Fix to log 'Using versioning file' and 'Successfully deleted module tags' to stderr instead of stdout ([#​507](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/507)) - `chloggen`: change generated files permissions from 0755 to 0644 ([#​457](https://togithub.com/open-telemetry/opentelemetry-go-build-tools/issues/457))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [docs][chore] warning for using localhost in security-best-practices (#9444) **Description:** warning and alert for using localhost which might go under DNS resolution and end up with an unexpected IP, risking security. **Link to tracking Issue:** #9338 **Documentation:** Added Waring and risk alert in https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md --------- Co-authored-by: Pablo Baeyens * [component] Change component.Type underlying type to a struct (#9472) **Description:** Follow up to #9414 and open-telemetry/opentelemetry-collector-contrib/pull/31038. **Link to tracking Issue:** Fixes #9208. * [chore] Bump go version in CI (#9716) * [chore] [exporterhelper] Update notes for the experimental API (#9719) Addressing https://github.com/open-telemetry/opentelemetry-collector/pull/8685#discussion_r1514315859 * Update module github.com/shirou/gopsutil/v3 to v3.24.2 (#9692) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/shirou/gopsutil/v3](https://togithub.com/shirou/gopsutil) | `v3.24.1` -> `v3.24.2` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fshirou%2fgopsutil%2fv3/v3.24.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fshirou%2fgopsutil%2fv3/v3.24.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fshirou%2fgopsutil%2fv3/v3.24.1/v3.24.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fshirou%2fgopsutil%2fv3/v3.24.1/v3.24.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
shirou/gopsutil (github.com/shirou/gopsutil/v3) ### [`v3.24.2`](https://togithub.com/shirou/gopsutil/compare/v3.24.1...v3.24.2) [Compare Source](https://togithub.com/shirou/gopsutil/compare/v3.24.1...v3.24.2)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore] bump deps in tools (#9721) This addresses an indirect import of the protobuf lib. Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [confmap] Remove provider.New (#9698) **Description:** Follow up to #9443 - deleting the deprecated `New` methods on providers. * [chore] remove contents of roadmap (#9720) This is in preparation of the next PR which will introduce the new proposal for achieving a v1 release of the Collector. The idea being that we wanted to collect feedback on the proposal without having to deal with conflicts/changes in the old outdated document. Related to #9718 Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [exporterhelper] Turn panics into errors (#9717) * [config/configtls] Validate MinVersion and MaxVersion (#9664) **Description:** Add `Validate()` method to `TLSSetting` and validate tls `min_version` and `max_version`. **Link to tracking Issue:** #9475 * [configcompression] Mark as stable (#9571) **Description:** Mark `configcompression` as Stable **Link to tracking Issue:** Closes https://github.com/open-telemetry/opentelemetry-collector/issues/9374 --------- Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [exporter/otlphttp] enable lifecycle tests (#9722) enable lifecycle tests for otlphttpexporter **Link to tracking Issue:** fix #9685 Signed-off-by: Ziqi Zhao * [chore] [exporterhelper] Update docs to remove requeuing (#9723) * [exporterhelper] Introduce batching functionality (#8685) This change introduces new experimental batching functionality to the exporter helper. The batch sender is fully concurrent and synchronous. It's set after the queue sender, which, if enabled, introduces the asynchronous behavior and ensures no data loss with the permanent queue. Follow-up TODO list: - Add pre-built merge funcs for pdata - Handle partial errors - A missing part compared to the batch processor is the ability to shard the batches by context value. Updates https://github.com/open-telemetry/opentelemetry-collector/issues/8122 * [chore][Feature Request Template] Comment out header descriptions (#9732) **Description:** The descriptions for each header in the feature request template for this repository are useful to the person filing a request, but serve no purpose to the issue reader. These can be commented out to in the displayed markdown to save the user from having to delete each one (or if not deleted, save the reader from having to parse through extra information). * Remove deprecated obsreport/obsreporttest package (#9724) All API in the package was deprecated in 0.93.0 * use generated meter (#9669) This follows #9556 and uses the Meter func instead of managing the scope in the batch processor manually. Replaces #9581 Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Update github-actions deps (#9743) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [Wandalen/wretry.action](https://togithub.com/Wandalen/wretry.action) | action | patch | `v1.4.5` -> `v1.4.9` | | [actions/cache](https://togithub.com/actions/cache) | action | patch | `v4.0.0` -> `v4.0.1` | --- ### Release Notes
Wandalen/wretry.action (Wandalen/wretry.action) ### [`v1.4.9`](https://togithub.com/Wandalen/wretry.action/compare/v1.4.8...v1.4.9) [Compare Source](https://togithub.com/Wandalen/wretry.action/compare/v1.4.8...v1.4.9) ### [`v1.4.8`](https://togithub.com/Wandalen/wretry.action/compare/v1.4.7...v1.4.8) [Compare Source](https://togithub.com/Wandalen/wretry.action/compare/v1.4.7...v1.4.8) ### [`v1.4.7`](https://togithub.com/Wandalen/wretry.action/compare/v1.4.6...v1.4.7) [Compare Source](https://togithub.com/Wandalen/wretry.action/compare/v1.4.6...v1.4.7) ### [`v1.4.6`](https://togithub.com/Wandalen/wretry.action/compare/v1.4.5...v1.4.6) [Compare Source](https://togithub.com/Wandalen/wretry.action/compare/v1.4.5...v1.4.6)
actions/cache (actions/cache) ### [`v4.0.1`](https://togithub.com/actions/cache/releases/tag/v4.0.1) [Compare Source](https://togithub.com/actions/cache/compare/v4.0.0...v4.0.1) ##### What's Changed - Update README.md by [@​yacaovsnc](https://togithub.com/yacaovsnc) in [https://github.com/actions/cache/pull/1304](https://togithub.com/actions/cache/pull/1304) - Update examples by [@​yacaovsnc](https://togithub.com/yacaovsnc) in [https://github.com/actions/cache/pull/1305](https://togithub.com/actions/cache/pull/1305) - Update actions/cache publish flow by [@​bethanyj28](https://togithub.com/bethanyj28) in [https://github.com/actions/cache/pull/1340](https://togithub.com/actions/cache/pull/1340) - Update [@​actions/cache](https://togithub.com/actions/cache) by [@​bethanyj28](https://togithub.com/bethanyj28) in [https://github.com/actions/cache/pull/1341](https://togithub.com/actions/cache/pull/1341) ##### New Contributors - [@​yacaovsnc](https://togithub.com/yacaovsnc) made their first contribution in [https://github.com/actions/cache/pull/1304](https://togithub.com/actions/cache/pull/1304) **Full Changelog**: https://github.com/actions/cache/compare/v4...v4.0.1
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * [exporter/otlp] enable lifecycle test (#9735) **Description:** enable lifecycle test for otlpexporter **Link to tracking Issue:** fix #9684 Signed-off-by: Ziqi Zhao * [chore] group build-tools packages (#9742) Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [confmap] confmap honors `Unmarshal` methods on config embedded structs. (#9635) **Description:** This implements support for calling `Unmarshal` on embedded structs of structs being decoded. **Link to tracking Issue:** Fixes #6671 **Testing:** Unit tests. Contrib fix is open: https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/31406 * [exporterhelper] Fix persistent queue size backup on reads (#9740) **Description:** Persistent queue size backup on reads should depend on readIndex, not writeIndex. * Give NoOp create settings a unique name (#9637) Long story, but i'm working on updating the prometheus dependency: https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/30934 As part of that update, we need to adapt to a change that makes the prometheus servers' self-observability metrics independent. See https://github.com/prometheus/prometheus/issues/13507 and https://github.com/prometheus/prometheus/pull/13610 One way to adapt to this change is by adding a label to each receivers' metrics to differentiate one Prometheus receiver from another. I've tried taking that approach in https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/30934, but the current issue is that the NoOp components all have the same name, which causes the self-observability metrics to collide. I can work around this in the prometheus receiver's own tests, but I can't work around the issue in the `generated_component_test.go` tests, since those are generated. This PR makes the ID returned by `NewNopCreateSettings` unique by giving it a unique name. **Link to tracking Issue:** Part of https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30883 cc @Aneurysm9 --------- Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Update github/codeql-action action to v3.24.7 (#9744) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github/codeql-action](https://togithub.com/github/codeql-action) | action | patch | `v3.24.6` -> `v3.24.7` | --- ### Release Notes
github/codeql-action (github/codeql-action) ### [`v3.24.7`](https://togithub.com/github/codeql-action/compare/v3.24.6...v3.24.7) [Compare Source](https://togithub.com/github/codeql-action/compare/v3.24.6...v3.24.7)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * [exporter/nopexporter] Add the nopexporter (#9448) **Description:** Add the nopexporter. This can be helpful if a user wants to start the Collector with a dummy pipeline to only enable extensions. It could also be used to test Collector pipeline throughput. **Link to tracking Issue:** Resolves https://github.com/open-telemetry/opentelemetry-collector/issues/7316 **Testing:** Added lifecycle tests; the receiver doesn't do anything. **Documentation:** Added a readme for the component. cc @djaglowski @tigrannajaryan * [receiver/nopreceiver] Add the nopreceiver (#9446) **Description:** Add the nopreceiver. This can be helpful if a user wants to start the Collector with a dummy pipeline to only enable extensions. It could also be used to start a dynamically-configured Collector that starts with no config and waits to receive its config from a confmap.Provider that supports reloads. **Link to tracking Issue:** Works toward https://github.com/open-telemetry/opentelemetry-collector/issues/7316 **Testing:** Added lifecycle tests; the receiver doesn't do anything. **Documentation:** Added a readme for the component. * [chore] Run make gotidy to fix the CI (#9747) * [chore] group golang.org/x packages (#9741) Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore] Fix an incorrect automatic replace made by a bot in `otel-config.yml` (#9746) This PR fixes an incorrect automatic replace made in the `otel-config.yml` file in this [pull request](https://github.com/open-telemetry/opentelemetry-collector/pull/9680/files#diff-c7c8156618a7f8126b25ca1bdfde3e172a0d2cb75c533d63a71617ae2a5c54ae) by a bot. I've taken the previous value which seems right. Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore] Move resource test to service/internal/resource (#9730) **Description:** This test was out of place! Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore] tidy code to return directly (#9751) * [chore] Refactor mdatagen unmarshaling to use less custom Unmarshalers (#9760) Now that we support embedded structs unmarshaling, we can simplify the code handling metric data unmarshaling somewhat. * [exporterhelper] Fix race in concurrency check in batch sender leading to smaller batch sizes (#9761) **Description:** Although activeRequests is atomic, it is possible for 2 arriving requests to both increment activeRequests, and when entering the critical section of bs.activeRequests.Load() >= bs.concurrencyLimit, both times it evaluates to true. The correct behavior should be that only the 2nd check is true. Remove the workaround in tests that bypassed the bug. --- Even with this change, the results are slightly better but still depend on goroutine scheduling. * [chore] Remove the top level error if it indicates an empty name (#9763) This is a split of #9750 that tries to work around mapstructure, which wraps an error around a decoding error. In the case when an error is returned from a top level construct, we get a not so helpful message that says: ``` error decoding '': error running encode hook: marshaling error ``` With this change, the error is unwrapped, giving the following string representation: ``` error running encode hook: marshaling error ``` Because #9750 enforces going through mapstructure, it would change errors returned with this not-so-helpful preamble. Adding this removes the problem. * [chore] change the way we unmarshal the config in tests (#9765) This change is required in preparation of #9750 This removes the call to `component.UnmarshalConfig` in preparation of its deprecation, and instead has the `Conf` object unmarshal itself into the `Config` struct. * [chore] Remove the development warning from readme for persistent queue (#9766) Removing the alpha status with the warning as discussed in the latest Collecor SIG meeting. cc @swiatekm-sumo * [chore] Remove `telemetry.useOtelForInternalMetrics` stable feature gate (#9752) **Description:** Remove the stable feature gate `telemetry.useOtelForInternalMetrics`. It was declared stable in 0.95.0. * [cmd/mdatagen] optimize mdatagen for batchprocessor failed test (#9768) **Description:** fix #9688 The batchprocessor use a `batchProcessor` as a common struct which implements `consumer.Traces`, `consumer.Metrics`, `consumer.Logs` in the meantime. As a result, the generated lifecycle test will fail, since when it create a metrics, traces processor object, it will still fall to the case `consumer.Logs` and panic. ``` === RUN TestComponentLifecycle/metrics-shutdown === RUN TestComponentLifecycle/metrics-lifecycle panic: interface conversion: interface {} is plog.Logs, not pmetric.Metrics goroutine 37 [running]: go.opentelemetry.io/collector/processor/batchprocessor.(*batchMetrics).add(0x14000208120?, {0x10572aae0?, 0x1400029c3f0?}) /Users/zhaoziqi/Documents/go/src/go.opentelemetry.io/opentelemetry-collector/processor/batchprocessor/batch_processor.go:450 +0x208 go.opentelemetry.io/collector/processor/batchprocessor.(*shard).processItem(0x14000292200, {0x10572aae0?, 0x1400029c3f0?}) /Users/zhaoziqi/Documents/go/src/go.opentelemetry.io/opentelemetry-collector/processor/batchprocessor/batch_processor.go:226 +0x38 go.opentelemetry.io/collector/processor/batchprocessor.(*shard).start(0x14000292200) /Users/zhaoziqi/Documents/go/src/go.opentelemetry.io/opentelemetry-collector/processor/batchprocessor/batch_processor.go:199 +0x1a0 created by go.opentelemetry.io/collector/processor/batchprocessor.(*batchProcessor).newShard in goroutine 36 /Users/zhaoziqi/Documents/go/src/go.opentelemetry.io/opentelemetry-collector/processor/batchprocessor/batch_processor.go:160 +0x1a4 exit status 2 FAIL go.opentelemetry.io/collector/processor/batchprocessor 0.594s ``` **Link to tracking Issue:** fix #9688 --------- Signed-off-by: Ziqi Zhao * [confignet] Change `Transport` from `string` to `TransportType` (#9385) **Description:** Changes `Transport` from a `string` to a new `TransportType`. Implements `UnmarshalText` for `TransportType` to enforce values. This PR may be too much - it introduces a breaking change a lot of new public APIs that may not be worth it for such a small module. If we don't like the surface area this creates or the breaking change, but we still want to enforce transport type values, I think implementing `Validate` keeps the API footprint smaller and isn't breaking. **Link to tracking Issue:** Closes https://github.com/open-telemetry/opentelemetry-collector/issues/9364 **Documentation:** Added godoc comments --------- Co-authored-by: Pablo Baeyens * Update module go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc to v0.49.0 (#9493) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | `v0.47.0` -> `v0.49.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fgoogle.golang.org%2fgrpc%2fotelgrpc/v0.49.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fgoogle.golang.org%2fgrpc%2fotelgrpc/v0.49.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fgoogle.golang.org%2fgrpc%2fotelgrpc/v0.47.0/v0.49.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fgoogle.golang.org%2fgrpc%2fotelgrpc/v0.47.0/v0.49.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Revert "[chore] change the way we unmarshal the config in tests" (#9771) Reverts open-telemetry/opentelemetry-collector#9765 We need to revert those changes as contrib has issues with them in isolation from #9750. * Respect telemetry configuration when running as a Windows service (#9726) **Description:** Fixes #5300 With this change the service telemetry section is respected by the collector when running as a Windows service. Log lever can be used to control the verbosity of the events logged and the logger can be redirected to a file by specifying an output path on the service telemetry config. By default `stdout` and `stderr` are redirected to the event log when running as a Windows service to keep the current behavior. The code change itself was made with a focus of not breaking the public APIs and not reading the config more than once. That said it is probably something to be refactored when the public APIs can be touched again. **Link to tracking Issue:** #5300 **Testing:** The test is an integration test that depends on the actual executable. It checks for event publication and file output. * Revert "[chore] Refactor mdatagen unmarshaling to use less custom Unmarshalers" (#9773) Reverts open-telemetry/opentelemetry-collector#9760 Trying to make contrib happy. We will be back with a unit test covering contrib's usage of mdatagen. * [chore] use the new function name in comment (#9781) `ReportComponentStatus` is now deprecated, and `ReportStatus` is used instead. * [chore] add new metric with input_type configuration (#9784) **Description:** Making sure we can test input_type moving forward. **Link to tracking Issue:** Fixes #9777 * [configgrpc] Deprecate SanitizedEndpoint (#9788) **Description:** Deprecates `configgrpc.SanitizedEndpoint()`. **Link to tracking Issue:** Works towards: https://github.com/open-telemetry/opentelemetry-collector/issues/9482 * [chore] rework memorylimiter test to avoid flaky tests (#9733) Peeling this set of changes from #9584 as a separate PR. These changes allow a reduction of issues when working with ARM64, which seems to fail on some of the resource locking used in those tests. * [chore][status] Remove deprecated functions `ReportComponentStatus` and `ReportComponentOkIfStarting` (#9782) **Description:** Remove deprecated functions `ReportComponentStatus` and `ReportComponentOkIfStarting` **Link to tracking Issue:** See #9148 * [receiver] Remove deprecated `ScraperControllerSettings` and `NewDefaultScraperControllerSettings` (#9783) **Description:** Remove deprecated `ScraperControllerSettings` and `NewDefaultScraperControllerSettings` **Link to tracking Issue:** #6767 * [connector] Remove deprecated interfaces LogsRouter, MetricsRouter and TracesRouter (#9780) **Description:** Remove deprecated interfaces LogsRouter, MetricsRouter and TracesRouter. **Link to tracking Issue:** Follow up to #9095 * [component] Remove deprecated error `ErrNilNextConsumer` (#9779) **Description:** Remove deprecated error `ErrNilNextConsumer` **Link to tracking Issue:** Fixes #9322 * Update module gonum.org/v1/gonum to v0.15.0 (#9791) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | gonum.org/v1/gonum | `v0.14.0` -> `v0.15.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/gonum.org%2fv1%2fgonum/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/gonum.org%2fv1%2fgonum/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/gonum.org%2fv1%2fgonum/v0.14.0/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/gonum.org%2fv1%2fgonum/v0.14.0/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [CONTRIBUTING.md] Update golang version (#9792) **Description:** As of the referenced issue, this project's minimum supported version is 1.21. Documentation should accurately reflect this. **Link to tracking Issue:** https://github.com/open-telemetry/opentelemetry-collector/pull/9533 * Update github-actions deps (#9790) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [Wandalen/wretry.action](https://togithub.com/Wandalen/wretry.action) | action | patch | `v1.4.9` -> `v1.4.10` | | [actions/cache](https://togithub.com/actions/cache) | action | patch | `v4.0.1` -> `v4.0.2` | | [github/codeql-action](https://togithub.com/github/codeql-action) | action | patch | `v3.24.7` -> `v3.24.8` | --- ### Release Notes
Wandalen/wretry.action (Wandalen/wretry.action) ### [`v1.4.10`](https://togithub.com/Wandalen/wretry.action/compare/v1.4.9...v1.4.10) [Compare Source](https://togithub.com/Wandalen/wretry.action/compare/v1.4.9...v1.4.10)
actions/cache (actions/cache) ### [`v4.0.2`](https://togithub.com/actions/cache/compare/v4.0.1...v4.0.2) [Compare Source](https://togithub.com/actions/cache/compare/v4.0.1...v4.0.2)
github/codeql-action (github/codeql-action) ### [`v3.24.8`](https://togithub.com/github/codeql-action/compare/v3.24.7...v3.24.8) [Compare Source](https://togithub.com/github/codeql-action/compare/v3.24.7...v3.24.8)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * [confignet] added NewDefaultFunctions (#9671) **Description:** Added newDefault methods for structs in confignet package **Link to tracking Issue:** closes #9656 **Testing:** Tests were added for the newDefault functions **Documentation:** godoc --------- Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> * [configgrpc] Remove deprecated func, add ToServer with context (#9787) **Description:** Removes deprecated `ToServer`. Deprecate `ToServerContext` Add new `ToServer` with `context.Context`. **Link to tracking Issue:** Related to https://github.com/open-telemetry/opentelemetry-collector/issues/9490 --------- Co-authored-by: Dmitrii Anoshin * Nicer error message when passing an empty configuration file (#9762) This PR checks if `cfg.Validate()` error is `errMissingReceivers` error then returns a nicely formated error. * [otlphttpexporter] return nil from partial success handler when HTTP response body is empty (#9667) **Description:** Fixing a bug - When exporting using the otlphttpexporter, after receiving a successful HTTP response, when the response body's content length is 0 and the content type is specified as either "application/json" or "application/x-protobuf", an attempt will be made to unmarshal a nil value within any of the partial success response handler functions. This results in an error, and a potential resend of the original export request. To fix this scenario, a check was added to the `tracesPartialSuccessHandler`, `metricsPartialSuccessHandler`, and `logsPartialSuccessHandler` functions for a `nil` value in the `protoBytes` argument. When `nil`, the function will return with a `nil` value, indicating the absence of any error. **Link to tracking Issue:** #9666 * [chore] arm64 build (#9584) This PR adds a linux/arm64 build to the build of the collector, so it may support the goal of #9731 * Prevent starting unnecessary goroutines (#9817) Fixes https://github.com/open-telemetry/opentelemetry-collector/issues/9739 Replaces https://github.com/open-telemetry/opentelemetry-collector/pull/9814 Signed-off-by: Bogdan Drutu * [chore] Propose clarification to first step of release process (#9830) * [chore] Prepare release v1.4.0/v0.97.0 (#9832) The following commands were run to prepare this release: - make chlog-update VERSION=v1.4.0/v0.97.0 - make prepare-release PREVIOUS_VERSION=1.3.0 RELEASE_CANDIDATE=1.4.0 MODSET=stable - make prepare-release PREVIOUS_VERSION=0.96.0 RELEASE_CANDIDATE=0.97.0 MODSET=beta * [chore] Cleanup the v1.4.0/v0.97.0 changelog (#9834) Move API changes to the CHANGELOG-API.md and remove redundant entries * Update github/codeql-action action to v3.24.9 (#9839) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github/codeql-action](https://togithub.com/github/codeql-action) | action | patch | `v3.24.8` -> `v3.24.9` | --- ### Release Notes
github/codeql-action (github/codeql-action) ### [`v3.24.9`](https://togithub.com/github/codeql-action/compare/v3.24.8...v3.24.9) [Compare Source](https://togithub.com/github/codeql-action/compare/v3.24.8...v3.24.9)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * [confmap] log a warning when using $VAR in config (WIP) (#9547) **Description:** As requested by @mx-psi , added a no-op log for when variables using the deprecated $VAR style are used. The logger should be replaced once it is clear how to pass it down (see #9443). Also, from my testing, the function passed to os.Expand is in fact only run when we have $VAR and not for ${env:VAR}, so I did not add additional checking. **Link to tracking Issue:** #9162 **Testing:** I am not sure how to go about testing it, since we are not passing a logger in yet, there is no easy way to know what is being logged or what the map looks like. Some ideas on this would be appreciated --------- Co-authored-by: Pablo Baeyens * Update module go.opentelemetry.io/collector/receiver/otlpreceiver to v0.97.0 (#9847) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/collector/receiver/otlpreceiver](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.96.0` -> `v0.97.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.97.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.97.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.96.0/v0.97.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.96.0/v0.97.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/receiver/otlpreceiver) ### [`v0.97.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v140v0970) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.96.0...v0.97.0) ##### 🛑 Breaking changes 🛑 - `telemetry`: Remove telemetry.useOtelForInternalMetrics stable feature gate ([#​9752](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9752)) ##### 🚀 New components 🚀 - `exporter/nop`: Add the `nopexporter` to serve as a placeholder exporter in a pipeline ([#​7316](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7316)) This is primarily useful for starting the Collector with only extensions enabled or to test Collector pipeline throughput. - `receiver/nop`: Add the `nopreceiver` to serve as a placeholder receiver in a pipeline ([#​7316](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7316)) This is primarily useful for starting the Collector with only extensions enabled. ##### 💡 Enhancements 💡 - `configtls`: Validates TLS min_version and max_version ([#​9475](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9475)) Introduces `Validate()` method in TLSSetting. - `configcompression`: Mark module as Stable. ([#​9571](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9571)) - `cmd/mdatagen`: Use go package name for the scope name by default and add an option to provide the scope name in metadata.yaml. ([#​9693](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9693)) - `cmd/mdatagen`: Generate the lifecycle tests for components by default. ([#​9683](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9683)) It's encouraged to have lifecycle tests for all components enadled, but they can be disabled if needed in metadata.yaml with `skip_lifecycle: true` and `skip_shutdown: true` under `tests` section. - `cmd/mdatagen`: optimize the mdatagen for the case like batchprocessor which use a common struct to implement consumer.Traces, consumer.Metrics, consumer.Logs in the meantime. ([#​9688](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9688)) ##### 🧰 Bug fixes 🧰 - `exporterhelper`: Fix persistent queue size backup on reads. ([#​9740](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9740)) - `processor/batch`: Prevent starting unnecessary goroutines. ([#​9739](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9739)) - `otlphttpexporter`: prevent error on empty response body when content type is application/json ([#​9666](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9666)) - `confmap`: confmap honors `Unmarshal` methods on config embedded structs. ([#​6671](https://togithub.com/open-telemetry/opentelemetry-collector/issues/6671)) - `otelcol`: Respect telemetry configuration when running as a Windows service ([#​5300](https://togithub.com/open-telemetry/opentelemetry-collector/issues/5300))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update module go.opentelemetry.io/collector/exporter/otlpexporter to v0.97.0 (#9842) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/collector/exporter/otlpexporter](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.96.0` -> `v0.97.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.97.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.97.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.96.0/v0.97.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.96.0/v0.97.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/exporter/otlpexporter) ### [`v0.97.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v140v0970) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.96.0...v0.97.0) ##### 🛑 Breaking changes 🛑 - `telemetry`: Remove telemetry.useOtelForInternalMetrics stable feature gate ([#​9752](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9752)) ##### 🚀 New components 🚀 - `exporter/nop`: Add the `nopexporter` to serve as a placeholder exporter in a pipeline ([#​7316](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7316)) This is primarily useful for starting the Collector with only extensions enabled or to test Collector pipeline throughput. - `receiver/nop`: Add the `nopreceiver` to serve as a placeholder receiver in a pipeline ([#​7316](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7316)) This is primarily useful for starting the Collector with only extensions enabled. ##### 💡 Enhancements 💡 - `configtls`: Validates TLS min_version and max_version ([#​9475](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9475)) Introduces `Validate()` method in TLSSetting. - `configcompression`: Mark module as Stable. ([#​9571](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9571)) - `cmd/mdatagen`: Use go package name for the scope name by default and add an option to provide the scope name in metadata.yaml. ([#​9693](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9693)) - `cmd/mdatagen`: Generate the lifecycle tests for components by default. ([#​9683](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9683)) It's encouraged to have lifecycle tests for all components enadled, but they can be disabled if needed in metadata.yaml with `skip_lifecycle: true` and `skip_shutdown: true` under `tests` section. - `cmd/mdatagen`: optimize the mdatagen for the case like batchprocessor which use a common struct to implement consumer.Traces, consumer.Metrics, consumer.Logs in the meantime. ([#​9688](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9688)) ##### 🧰 Bug fixes 🧰 - `exporterhelper`: Fix persistent queue size backup on reads. ([#​9740](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9740)) - `processor/batch`: Prevent starting unnecessary goroutines. ([#​9739](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9739)) - `otlphttpexporter`: prevent error on empty response body when content type is application/json ([#​9666](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9666)) - `confmap`: confmap honors `Unmarshal` methods on config embedded structs. ([#​6671](https://togithub.com/open-telemetry/opentelemetry-collector/issues/6671)) - `otelcol`: Respect telemetry configuration when running as a Windows service ([#​5300](https://togithub.com/open-telemetry/opentelemetry-collector/issues/5300))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update Wandalen/wretry.action action to v2 (#9849) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [Wandalen/wretry.action](https://togithub.com/Wandalen/wretry.action) | action | major | `v1.4.10` -> `v2.1.0` | --- ### Release Notes
Wandalen/wretry.action (Wandalen/wretry.action) ### [`v2.1.0`](https://togithub.com/Wandalen/wretry.action/compare/v2.0.0...v2.1.0) [Compare Source](https://togithub.com/Wandalen/wretry.action/compare/v2.0.0...v2.1.0) ### [`v2.0.0`](https://togithub.com/Wandalen/wretry.action/compare/v1.4.10...v2.0.0) [Compare Source](https://togithub.com/Wandalen/wretry.action/compare/v1.4.10...v2.0.0)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * [configtls] Update IncludeSystemCACertsPool to be used in server and client RootCAs (#9835) **Description:** Updates `ServerConfig` and `ClientConfig` to use `IncludeSystemCACertsPool` when doing `LoadTLSConfig`. Previously `IncludeSystemCACertsPool` was only used for `ServerConfig`'s `ClientCAs` via `newClientCAsReloader`. **Link to tracking Issue:** Closes https://github.com/open-telemetry/opentelemetry-collector/issues/9789 **Testing:** Added more tests * [chore][docs] Move RFC to a new RFCs folder (#9828) **Description:** Some housekeeping to organize the `docs` folder. I intend to file a new RFC-ish soon. **Link to tracking Issue:** Fixes #8893 * [chore] Do not log warning when feature gate is enabled (#9852) **Description:** Fixes #9753 * [client] Remove experimental comment from `Metadata` (#9796) **Description:** Removes the `experimental` tag from `Metadata`. This feature has been used in the headerssetter extension since Aug 2022. **Link to tracking Issue:** Relates to https://github.com/open-telemetry/opentelemetry-collector/issues/9381 Related to https://github.com/open-telemetry/opentelemetry-collector/issues/9795 * [receiver/otlp] Return proper http response code based on retryable errors (#9357) **Description:** Updates the receiver's http response to return a proper http status based on whether or not the pipeline returned a retryable error. Builds upon the work done in https://github.com/open-telemetry/opentelemetry-collector/pull/8080 and https://github.com/open-telemetry/opentelemetry-collector/pull/9307 **Link to tracking Issue:** Closes https://github.com/open-telemetry/opentelemetry-collector/issues/9337 Closes https://github.com/open-telemetry/opentelemetry-collector/issues/8132 Closes https://github.com/open-telemetry/opentelemetry-collector/issues/9636 Closes https://github.com/open-telemetry/opentelemetry-collector/issues/6725 **Testing:** Updated lots of unit tests * [configtls] Add context.Context to public functions (#9813) **Description:** Opening this PR to prompt discussion about `configtls` and `context.Context`. We could add `context.Context` to these public functions and go through the long deprecation/rename process, but I want to make sure it is valuable. Arguments against this PR: - There isn't anything within these functions that currently rely on a `context.Context`. - There isn't anything inside these functions interact with the network. Arguments in favor of this PR: - Interacts with filesystem. - Go best practice to allow passing context. **Link to tracking Issue:** Related to https://github.com/open-telemetry/opentelemetry-collector/issues/9811 --------- Co-authored-by: Andrzej Stencel * [configtls] Removed deprecated structs (#9786) **Description:** Removed deprecated structs **Link to tracking Issue:** Related to https://github.com/open-telemetry/opentelemetry-collector/issues/9428 Related to https://github.com/open-telemetry/opentelemetry-collector/issues/9474 Closes https://github.com/open-telemetry/opentelemetry-collector/issues/9548 * [component] make Type implement MarshalText (#9856) **Description:** Adds `MarshalText` function so that `Type` can be properly marshaled as yaml. **Link to tracking Issue:** Fixes https://github.com/open-telemetry/opentelemetry-collector/issues/9855 * [otlp exporter] Validate exporter endpoint has port (#9632) **Description:** This PR updates the otlp exporter config validation to ensure that the "endpoint" specified for the exporter includes a port. The goal of this is to fail fast if the configuration is invalid instead of waiting for an error to arise. The PR adds a function to the ClientConfig defined in configgrpc that parses the port defined in the endpoint. The otlp exporter uses this port parsing to validate that **Link to tracking Issue:** [Issue 9505](https://github.com/open-telemetry/opentelemetry-collector/issues/9505) * Fix validate command (#9866) **Description:** Fixes issue where validate command was not properly printing valid values. **Link to tracking Issue:** Closes https://github.com/open-telemetry/opentelemetry-collector/issues/9863 **Testing:** Updated unit tests * Update module go.opentelemetry.io/collector/exporter/otlphttpexporter to v0.97.0 (#9846) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/collector/exporter/otlphttpexporter](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.96.0` -> `v0.97.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.97.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.97.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.96.0/v0.97.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.96.0/v0.97.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/exporter/otlphttpexporter) ### [`v0.97.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v140v0970) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.96.0...v0.97.0) ##### 🛑 Breaking changes 🛑 - `telemetry`: Remove telemetry.useOtelForInternalMetrics stable feature gate ([#​9752](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9752)) ##### 🚀 New components 🚀 - `exporter/nop`: Add the `nopexporter` to serve as a placeholder exporter in a pipeline ([#​7316](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7316)) This is primarily useful for starting the Collector with only extensions enabled or to test Collector pipeline throughput. - `receiver/nop`: Add the `nopreceiver` to serve as a placeholder receiver in a pipeline ([#​7316](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7316)) This is primarily useful for starting the Collector with only extensions enabled. ##### 💡 Enhancements 💡 - `configtls`: Validates TLS min_version and max_version ([#​9475](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9475)) Introduces `Validate()` method in TLSSetting. - `configcompression`: Mark module as Stable. ([#​9571](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9571)) - `cmd/mdatagen`: Use go package name for the scope name by default and add an option to provide the scope name in metadata.yaml. ([#​9693](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9693)) - `cmd/mdatagen`: Generate the lifecycle tests for components by default. ([#​9683](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9683)) It's encouraged to have lifecycle tests for all components enadled, but they can be disabled if needed in metadata.yaml with `skip_lifecycle: true` and `skip_shutdown: true` under `tests` section. - `cmd/mdatagen`: optimize the mdatagen for the case like batchprocessor which use a common struct to implement consumer.Traces, consumer.Metrics, consumer.Logs in the meantime. ([#​9688](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9688)) ##### 🧰 Bug fixes 🧰 - `exporterhelper`: Fix persistent queue size backup on reads. ([#​9740](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9740)) - `processor/batch`: Prevent starting unnecessary goroutines. ([#​9739](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9739)) - `otlphttpexporter`: prevent error on empty response body when content type is application/json ([#​9666](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9666)) - `confmap`: confmap honors `Unmarshal` methods on config embedded structs. ([#​6671](https://togithub.com/open-telemetry/opentelemetry-collector/issues/6671)) - `otelcol`: Respect telemetry configuration when running as a Windows service ([#​5300](https://togithub.com/open-telemetry/opentelemetry-collector/issues/5300))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * [chore] Remove vendor distributions mentions in metadata.yaml (#9865) Related to https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30657 This removes all distributions linked to this repository maintained outside of OpenTelemetry. Co-authored-by: Dmitrii Anoshin * [exporterhelper] Add default batching for OTLP data type (#9738) Introduce default batching functionality based on the internal data type (pdata). This makes the exporter batching capability available to the regular exporter helpers without using custom requests. Updates #8122 * [cmd/mdatagen] add unsupported platforms to the README header (#9803) **Description:** Add unsupported platforms to the README header **Link to tracking Issue:** Fixes #9794 * [chore] update the comment of the component package (#9798) Add connector as a type of component. * Remove docs/design.md and linked images (#9797) **Description:**searched both the core and contrib Collector repositories and found that the images are only used in this file. So I think it's safe to remove them as well. **Link to tracking Issue:** fixes #8889 * Update module github.com/cenkalti/backoff/v4 to v4.3.0 (#9841) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/cenkalti/backoff/v4](https://togithub.com/cenkalti/backoff) | `v4.2.1` -> `v4.3.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fcenkalti%2fbackoff%2fv4/v4.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fcenkalti%2fbackoff%2fv4/v4.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fcenkalti%2fbackoff%2fv4/v4.2.1/v4.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fcenkalti%2fbackoff%2fv4/v4.2.1/v4.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
cenkalti/backoff (github.com/cenkalti/backoff/v4) ### [`v4.3.0`](https://togithub.com/cenkalti/backoff/compare/v4.2.1...v4.3.0) [Compare Source](https://togithub.com/cenkalti/backoff/compare/v4.2.1...v4.3.0)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update Wandalen/wretry.action action to v3 (#9877) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [Wandalen/wretry.action](https://togithub.com/Wandalen/wretry.action) | action | major | `v2.1.0` -> `v3.0.0` | --- ### Release Notes
Wandalen/wretry.action (Wandalen/wretry.action) ### [`v3.0.0`](https://togithub.com/Wandalen/wretry.action/compare/v2.1.0...v3.0.0) [Compare Source](https://togithub.com/Wandalen/wretry.action/compare/v2.1.0...v3.0.0)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update module github.com/shirou/gopsutil/v3 to v3.24.3 (#9876) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/shirou/gopsutil/v3](https://togithub.com/shirou/gopsutil) | `v3.24.2` -> `v3.24.3` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fshirou%2fgopsutil%2fv3/v3.24.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fshirou%2fgopsutil%2fv3/v3.24.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fshirou%2fgopsutil%2fv3/v3.24.2/v3.24.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fshirou%2fgopsutil%2fv3/v3.24.2/v3.24.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
shirou/gopsutil (github.com/shirou/gopsutil/v3) ### [`v3.24.3`](https://togithub.com/shirou/gopsutil/releases/tag/v3.24.3) [Compare Source](https://togithub.com/shirou/gopsutil/compare/v3.24.2...v3.24.3) #### What's Changed ##### disk - chore: fix typo by [@​majorteach](https://togithub.com/majorteach) in [https://github.com/shirou/gopsutil/pull/1615](https://togithub.com/shirou/gopsutil/pull/1615) ##### host - \[host]\[linux]: fix utmp size on linux/arm64 by [@​shirou](https://togithub.com/shirou) in [https://github.com/shirou/gopsutil/pull/1603](https://togithub.com/shirou/gopsutil/pull/1603) ##### load - Total Processes in `MiscStat` Corrected by [@​eric1234](https://togithub.com/eric1234) in [https://github.com/shirou/gopsutil/pull/1612](https://togithub.com/shirou/gopsutil/pull/1612) ##### process - \[process]\[freebsd]: re-generate types on freebsd arm64 by [@​shirou](https://togithub.com/shirou) in [https://github.com/shirou/gopsutil/pull/1609](https://togithub.com/shirou/gopsutil/pull/1609) #### New Contributors - [@​majorteach](https://togithub.com/majorteach) made their first contribution in [https://github.com/shirou/gopsutil/pull/1615](https://togithub.com/shirou/gopsutil/pull/1615) - [@​eric1234](https://togithub.com/eric1234) made their first contribution in [https://github.com/shirou/gopsutil/pull/1612](https://togithub.com/shirou/gopsutil/pull/1612) **Full Changelog**: https://github.com/shirou/gopsutil/compare/v3.24.2...v3.24.3
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [chore] Actually remove design.md (#9874) Follow up to #9797 to actually remove the file, not just its contents * updated README.md file in otlpreceiver (#9756) **Description:** Updated the README.md file in otlpreceiver - Corrected the serialization format to OTLP-JSON **Link to tracking Issue:** [(https://opentelemetry.io/docs/specs/otel/protocol/file-exporter/)](https://github.com/open-telemetry/opentelemetry-collector/issues/9207) **Documentation:** Changed the serialization format from Protobuf-JSON to OTLP-JSON --------- Co-authored-by: Pablo Baeyens * [chore] Adds two confmap tests (#9879) **Description:** Adds two tests to confmap to test some edge cases **Link to tracking Issue:** Written while reviewing #9862 * Update Wandalen/wretry.action action to v3.0.1 (#9878) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [Wandalen/wretry.action](https://togithub.com/Wandalen/wretry.action) | action | patch | `v3.0.0` -> `v3.0.1` | --- ### Release Notes
Wandalen/wretry.action (Wandalen/wretry.action) ### [`v3.0.1`](https://togithub.com/Wandalen/wretry.action/compare/v3.0.0...v3.0.1) [Compare Source](https://togithub.com/Wandalen/wretry.action/compare/v3.0.0...v3.0.1)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * [chore] Updated `unmarshalText` func (#9838) Changed the switch statement in` UnmarshalText` function to an if statement {configcompression} Link to the issue: https://github.com/open-telemetry/opentelemetry-collector/issues/9458 --------- Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [confmap] support unmarshaling for embedded structs with and without squashing (#9861) This is taking a small slice of #9750 to document the behavior of confmap and make sure we can unmarshal embedded structs. * [configgrpc] remove deprecated funcs (#9836) Closes https://github.com/open-telemetry/opentelemetry-collector/issues/9482 Closes https://github.com/open-telemetry/opentelemetry-collector/issues/9812 * [telemetry] emit metrics with _ instead of / (#9775) This is addressing an issue w/ the names of the metrics generated by the Collector for its internal metrics. Note that this change only impacts users that emit telemetry using OTLP, which is currently still in experimental support. The prometheus metrics already replaced `/` with `_`. Fixes #9774 --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * update golang.org/x/net to v0.23.0 (#9887) * Log when Environment Provider tries to pull unset or empty env var (#9837) **Description:** Creates a logger in the confmap.ProviderSettings and uses it to log when there is a missing or blank environment variable referenced in config. For now the noop logger is used everywhere except tests. **Link to tracking Issue:** [5615](https://github.com/open-telemetry/opentelemetry-collector/issues/5615) **Testing:** I wrote unit tests that ensured 1. logging occurred when an environment variable was unset 2. logging occcured when the env var was empty. 3. there was no log when an env var was used correctly I also started the otel collector with the sample config - and added an env var reference in the sample config. I then inserted a print statement next to each log call to see whether my code paths were hit in the live application. I then went through the 3 cases mentioned above and ensured that logging behavior was accurate. * [chore] bump go to 1.21.9 (#9888) Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [receiver/otlp] Refactor http error handling (#9893) **Description:** This PR slightly refactors the otlp receiver's HTTP error handling. The result is a few less calls to `status.FromError`, increased accuracy in the grpc code included in the body of the response, and centralizing http<->grpc mapping in the `internal/errors` package. This PR intentionally changes how we map from HTTP status code to grpc `Status.code`. I don't consider this to be a breaking change, or even worthy of a changelog, since the specification states that `"The clients are not expected to alter their behavior based on Status.code field but MAY record it for troubleshooting purposes."` Honestly, I'd be ok if we chose to stop including the `Status.code` entirely as it leads to more confusion in the code and payload in my opinion. **Link to tracking Issue:** Closes https://github.com/open-telemetry/opentelemetry-collector/issues/9864 **Testing:** Added new tests * [chore] update release schedule (#9900) Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Updated public methods in confighttp (#9895) Added context.Context to the following functions: ToClient ToServer ToListener Link: https://github.com/open-telemetry/opentelemetry-collector/issues/9807 * [receiver/nop] Promote to beta (#9902) This will be put into core/contrib in https://github.com/open-telemetry/opentelemetry-collector-releases/pull/519. Realistically we could declare this stable as well, it doesn't seem feasible to introduce breaking changes. **Link to tracking Issue:** https://github.com/open-telemetry/opentelemetry-collector/issues/7316 * [chore][receiver/scraperhelper] Fix typos in comments (#9904) This just fixes a couple typos in comments in the `scrapercontroller.go` file. * [exporter/nop] Promote to beta (#9903) This will be put into core/contrib in https://github.com/open-telemetry/opentelemetry-collector-releases/pull/519. Realistically we could declare this stable as well, it doesn't seem feasible to introduce breaking changes. **Link to tracking Issue:** https://github.com/open-telemetry/opentelemetry-collector/issues/7316 * move internal/testdata to pdata/testdata (#9885) This reduces dependencies from the consumer package while making testdata available across repos. It will allow us to remove duplicated code and its a fairly small surface area. Fixes https://github.com/open-telemetry/opentelemetry-collector/issues/9886 --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Update module github.com/prometheus/client_model to v0.6.1 (#9913) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/prometheus/client_model](https://togithub.com/prometheus/client_model) | `v0.6.0` -> `v0.6.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fclient_model/v0.6.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fclient_model/v0.6.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fclient_model/v0.6.0/v0.6.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fclient_model/v0.6.0/v0.6.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
prometheus/client_model (github.com/prometheus/client_model) ### [`v0.6.1`](https://togithub.com/prometheus/client_model/releases/tag/v0.6.1) [Compare Source](https://togithub.com/prometheus/client_model/compare/v0.6.0...v0.6.1) #### What's Changed - Bump google.golang.org/protobuf from 1.32.0 to 1.33.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/client_model/pull/84](https://togithub.com/prometheus/client_model/pull/84) **Full Changelog**: https://github.com/prometheus/client_model/compare/v0.6.0...v0.6.1
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [chore] update pdata/testdata dep (#9909) This will make updating contrib easier. Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore][CI/CD] Fix failing codecov uploads (#9930) The `build-and-test` workflow has been failing consistently the last few days on the upload coverage step. The reason is outlined in https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/32259. Contrib issue, but same underlying cause: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/32259 None yet, the CI/CD tests on this PR should be successful if this works. * Update github-actions deps (#9914) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [Wandalen/wretry.action](https://togithub.com/Wandalen/wretry.action) | action | minor | `v3.0.1` -> `v3.2.0` | | [github/codeql-action](https://togithub.com/github/codeql-action) | action | patch | `v3.24.9` -> `v3.24.10` | --- ### Release Notes
Wandalen/wretry.action (Wandalen/wretry.action) ### [`v3.2.0`](https://togithub.com/Wandalen/wretry.action/compare/v3.1.0...v3.2.0) [Compare Source](https://togithub.com/Wandalen/wretry.action/compare/v3.1.0...v3.2.0) ### [`v3.1.0`](https://togithub.com/Wandalen/wretry.action/compare/v3.0.1...v3.1.0) [Compare Source](https://togithub.com/Wandalen/wretry.action/compare/v3.0.1...v3.1.0)
github/codeql-action (github/codeql-action) ### [`v3.24.10`](https://togithub.com/github/codeql-action/compare/v3.24.9...v3.24.10) [Compare Source](https://togithub.com/github/codeql-action/compare/v3.24.9...v3.24.10)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Move arm64 to platform support tier 2 (#9910) This is a documentation change reflecting the progress we have made in supporting Linux ARM64 type machines. We now run both core and contrib builds on Ampere machines, supported by the CNCF, through Actuated github action runners. This PR fixes #9731 * Update module go.opentelemetry.io/contrib/zpages to v0.50.0 (#9923) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/contrib/zpages](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | `v0.49.0` -> `v0.50.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcontrib%2fzpages/v0.50.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcontrib%2fzpages/v0.50.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcontrib%2fzpages/v0.49.0/v0.50.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcontrib%2fzpages/v0.49.0/v0.50.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Update module golang.org/x/net to v0.24.0 (#9924) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | golang.org/x/net | `v0.23.0` -> `v0.24.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fnet/v0.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2fnet/v0.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2fnet/v0.23.0/v0.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fnet/v0.23.0/v0.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Update module golang.org/x/tools to v0.20.0 (#9926) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | golang.org/x/tools | `v0.19.0` -> `v0.20.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2ftools/v0.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2ftools/v0.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2ftools/v0.19.0/v0.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2ftools/v0.19.0/v0.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Update module github.com/klauspost/compress to v1.17.8 (#9927) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/klauspost/compress](https://togithub.com/klauspost/compress) | `v1.17.7` -> `v1.17.8` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fklauspost%2fcompress/v1.17.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fklauspost%2fcompress/v1.17.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fklauspost%2fcompress/v1.17.7/v1.17.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fklauspost%2fcompress/v1.17.7/v1.17.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
klauspost/compress (github.com/klauspost/compress) ### [`v1.17.8`](https://togithub.com/klauspost/compress/releases/tag/v1.17.8) [Compare Source](https://togithub.com/klauspost/compress/compare/v1.17.7...v1.17.8) #### What's Changed - zstd: Reject blocks where reserved values are not 0 by [@​klauspost](https://togithub.com/klauspost) in [https://github.com/klauspost/compress/pull/885](https://togithub.com/klauspost/compress/pull/885) - zstd: Add RLE detection+encoding by [@​klauspost](https://togithub.com/klauspost) in [https://github.com/klauspost/compress/pull/938](https://togithub.com/klauspost/compress/pull/938) #### New Contributors - [@​ankon](https://togithub.com/ankon) made their first contribution in [https://github.com/klauspost/compress/pull/932](https://togithub.com/klauspost/compress/pull/932) - [@​kindhuge](https://togithub.com/kindhuge) made their first contribution in [https://github.com/klauspost/compress/pull/946](https://togithub.com/klauspost/compress/pull/946) **Full Changelog**: https://github.com/klauspost/compress/compare/v1.17.7...v1.17.8
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Update module go.opentelemetry.io/contrib/propagators/b3 to v1.25.0 (#9920) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/contrib/propagators/b3](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | `v1.24.0` -> `v1.25.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcontrib%2fpropagators%2fb3/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcontrib%2fpropagators%2fb3/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcontrib%2fpropagators%2fb3/v1.24.0/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcontrib%2fpropagators%2fb3/v1.24.0/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-go-contrib (go.opentelemetry.io/contrib/propagators/b3) ### [`v1.25.0`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v1.25.0): /v0.50.0/v0.19.0/v0.5.0/v0.0.1 [Compare Source](https://togithub.com/open-telemetry/opentelemetry-go-contrib/compare/v1.24.0...v1.25.0) ##### Added - Implemented setting the `cloud.resource_id` resource attribute in `go.opentelemetry.io/detectors/aws/ecs` based on the ECS Metadata v4 endpoint. ([#​5091](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/5091)) - The `go.opentelemetry.io/contrib/bridges/otelslog` module. This module provides an OpenTelemetry logging bridge for "log/slog". ([#​5335](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/5335)) ##### Fixed - Update all dependencies to address \[GO-2024-2687]. ([#​5359](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/5359)) ##### Removed - Drop support for [Go 1.20]. ([#​5163](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/5163)) [Go 1.20]: https://go.dev/doc/go1.20 **Full Changelog**: https://github.com/open-telemetry/opentelemetry-go-contrib/compare/v1.24.0...v1.25.0
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Update module golang.org/x/sys to v0.19.0 (#9925) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | golang.org/x/sys | `v0.18.0` -> `v0.19.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fsys/v0.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2fsys/v0.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2fsys/v0.18.0/v0.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fsys/v0.18.0/v0.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update module github.com/knadh/koanf/v2 to v2.1.1 (#9912) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/knadh/koanf/v2](https://togithub.com/knadh/koanf) | `v2.1.0` -> `v2.1.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fknadh%2fkoanf%2fv2/v2.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fknadh%2fkoanf%2fv2/v2.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fknadh%2fkoanf%2fv2/v2.1.0/v2.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fknadh%2fkoanf%2fv2/v2.1.0/v2.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
knadh/koanf (github.com/knadh/koanf/v2) ### [`v2.1.1`](https://togithub.com/knadh/koanf/releases/tag/v2.1.1) [Compare Source](https://togithub.com/knadh/koanf/compare/v2.1.0...v2.1.1) #### What's Changed - fix: run submodule tests by [@​rhnvrm](https://togithub.com/rhnvrm) in [https://github.com/knadh/koanf/pull/276](https://togithub.com/knadh/koanf/pull/276) - Bump google.golang.org/protobuf from 1.30.0 to 1.33.0 in /examples by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/knadh/koanf/pull/282](https://togithub.com/knadh/koanf/pull/282) - Bump google.golang.org/protobuf from 1.30.0 to 1.33.0 in /providers/etcd by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/knadh/koanf/pull/281](https://togithub.com/knadh/koanf/pull/281) - Bump google.golang.org/protobuf from 1.30.0 to 1.33.0 in /providers/nats by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/knadh/koanf/pull/280](https://togithub.com/knadh/koanf/pull/280) - feat: add ParserEnvWithValue by [@​tlipoca9](https://togithub.com/tlipoca9) in [https://github.com/knadh/koanf/pull/284](https://togithub.com/knadh/koanf/pull/284) - Fix map unflattening no-delimiter behaviour by [@​knadh](https://togithub.com/knadh) in [https://github.com/knadh/koanf/pull/278](https://togithub.com/knadh/koanf/pull/278) #### New Contributors - [@​tlipoca9](https://togithub.com/tlipoca9) made their first contribution in [https://github.com/knadh/koanf/pull/284](https://togithub.com/knadh/koanf/pull/284) **Full Changelog**: https://github.com/knadh/koanf/compare/v2.1.0...v2.1.1
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Update opentelemetry-go monorepo (#9929) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/otel](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.24.0` -> `v1.25.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel/v1.24.0/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel/v1.24.0/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/bridge/opencensus](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.24.0` -> `v1.25.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fbridge%2fopencensus/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fbridge%2fopencensus/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fbridge%2fopencensus/v1.24.0/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fbridge%2fopencensus/v1.24.0/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.24.0` -> `v1.25.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetricgrpc/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetricgrpc/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetricgrpc/v1.24.0/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetricgrpc/v1.24.0/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.24.0` -> `v1.25.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetrichttp/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetrichttp/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetrichttp/v1.24.0/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetrichttp/v1.24.0/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.24.0` -> `v1.25.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracegrpc/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracegrpc/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracegrpc/v1.24.0/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracegrpc/v1.24.0/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.24.0` -> `v1.25.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracehttp/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracehttp/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracehttp/v1.24.0/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracehttp/v1.24.0/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/prometheus](https://togithub.com/open-telemetry/opentelemetry-go) | `v0.46.0` -> `v0.47.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fprometheus/v0.47.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fprometheus/v0.47.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fprometheus/v0.46.0/v0.47.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fprometheus/v0.46.0/v0.47.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/stdout/stdoutmetric](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.24.0` -> `v1.25.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdoutmetric/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdoutmetric/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdoutmetric/v1.24.0/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdoutmetric/v1.24.0/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/stdout/stdouttrace](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.24.0` -> `v1.25.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdouttrace/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdouttrace/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdouttrace/v1.24.0/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdouttrace/v1.24.0/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/metric](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.24.0` -> `v1.25.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fmetric/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fmetric/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fmetric/v1.24.0/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fmetric/v1.24.0/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/sdk](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.24.0` -> `v1.25.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fsdk/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fsdk/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fsdk/v1.24.0/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fsdk/v1.24.0/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/sdk/metric](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.24.0` -> `v1.25.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fsdk%2fmetric/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fsdk%2fmetric/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fsdk%2fmetric/v1.24.0/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fsdk%2fmetric/v1.24.0/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/trace](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.24.0` -> `v1.25.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2ftrace/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2ftrace/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2ftrace/v1.24.0/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2ftrace/v1.24.0/v1.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-go (go.opentelemetry.io/otel) ### [`v1.25.0`](https://togithub.com/open-telemetry/opentelemetry-go/releases/tag/v1.25.0): /v0.47.0/v0.0.8/v0.1.0-alpha [Compare Source](https://togithub.com/open-telemetry/opentelemetry-go/compare/v1.24.0...v1.25.0) ##### Added - Add `WithProxy` option in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. ([#​4906](https://togithub.com/open-telemetry/opentelemetry-go/issues/4906)) - Add `WithProxy` option in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlptracehttp`. ([#​4906](https://togithub.com/open-telemetry/opentelemetry-go/issues/4906)) - Add `AddLink` method to the `Span` interface in `go.opentelemetry.io/otel/trace`. ([#​5032](https://togithub.com/open-telemetry/opentelemetry-go/issues/5032)) - The `Enabled` method is added to the `Logger` interface in `go.opentelemetry.io/otel/log`. This method is used to notify users if a log record will be emitted or not. ([#​5071](https://togithub.com/open-telemetry/opentelemetry-go/issues/5071)) - Add `SeverityUndefined` `const` to `go.opentelemetry.io/otel/log`. This value represents an unset severity level. ([#​5072](https://togithub.com/open-telemetry/opentelemetry-go/issues/5072)) - Add `Empty` function in `go.opentelemetry.io/otel/log` to return a `KeyValue` for an empty value. ([#​5076](https://togithub.com/open-telemetry/opentelemetry-go/issues/5076)) - Add `go.opentelemetry.io/otel/log/global` to manage the global `LoggerProvider`. This package is provided with the anticipation that all functionality will be migrate to `go.opentelemetry.io/otel` when `go.opentelemetry.io/otel/log` stabilizes. At which point, users will be required to migrage their code, and this package will be deprecated then removed. ([#​5085](https://togithub.com/open-telemetry/opentelemetry-go/issues/5085)) - Add support for `Summary` metrics in the `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` exporters. ([#​5100](https://togithub.com/open-telemetry/opentelemetry-go/issues/5100)) - Add `otel.scope.name` and `otel.scope.version` tags to spans exported by `go.opentelemetry.io/otel/exporters/zipkin`. ([#​5108](https://togithub.com/open-telemetry/opentelemetry-go/issues/5108)) - Add support for `AddLink` to `go.opentelemetry.io/otel/bridge/opencensus`. ([#​5116](https://togithub.com/open-telemetry/opentelemetry-go/issues/5116)) - Add `String` method to `Value` and `KeyValue` in `go.opentelemetry.io/otel/log`. ([#​5117](https://togithub.com/open-telemetry/opentelemetry-go/issues/5117)) - Add Exemplar support to `go.opentelemetry.io/otel/exporters/prometheus`. ([#​5111](https://togithub.com/open-telemetry/opentelemetry-go/issues/5111)) - Add metric semantic conventions to `go.opentelemetry.io/otel/semconv/v1.24.0`. Future `semconv` packages will include metric semantic conventions as well. ([#​4528](https://togithub.com/open-telemetry/opentelemetry-go/issues/4528)) ##### Changed - `SpanFromContext` and `SpanContextFromContext` in `go.opentelemetry.io/otel/trace` no longer make a heap allocation when the passed context has no span. ([#​5049](https://togithub.com/open-telemetry/opentelemetry-go/issues/5049)) - `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` now create a gRPC client in idle mode and with "dns" as the default resolver using [`grpc.NewClient`](https://pkg.go.dev/google.golang.org/grpc#NewClient). ([#​5151](https://togithub.com/open-telemetry/opentelemetry-go/issues/5151)) Because of that `WithDialOption` ignores [`grpc.WithBlock`](https://pkg.go.dev/google.golang.org/grpc#WithBlock), [`grpc.WithTimeout`](https://pkg.go.dev/google.golang.org/grpc#WithTimeout), and [`grpc.WithReturnConnectionError`](https://pkg.go.dev/google.golang.org/grpc#WithReturnConnectionError). Notice that [`grpc.DialContext`](https://pkg.go.dev/google.golang.org/grpc#DialContext) which was used before is now deprecated. ##### Fixed - Clarify the documentation about equivalence guarantees for the `Set` and `Distinct` types in `go.opentelemetry.io/otel/attribute`. ([#​5027](https://togithub.com/open-telemetry/opentelemetry-go/issues/5027)) - Prevent default `ErrorHandler` self-delegation. ([#​5137](https://togithub.com/open-telemetry/opentelemetry-go/issues/5137)) - Update all dependencies to address [GO-2024-2687]. ([#​5139](https://togithub.com/open-telemetry/opentelemetry-go/issues/5139)) ##### Removed - Drop support for [Go 1.20]. ([#​4967](https://togithub.com/open-telemetry/opentelemetry-go/issues/4967)) ##### Deprecated - Deprecate `go.opentelemetry.io/otel/attribute.Sortable` type. ([#​4734](https://togithub.com/open-telemetry/opentelemetry-go/issues/4734)) - Deprecate `go.opentelemetry.io/otel/attribute.NewSetWithSortable` function. ([#​4734](https://togithub.com/open-telemetry/opentelemetry-go/issues/4734)) - Deprecate `go.opentelemetry.io/otel/attribute.NewSetWithSortableFiltered` function. ([#​4734](https://togithub.com/open-telemetry/opentelemetry-go/issues/4734)) [Go 1.20]: https://go.dev/doc/go1.20 [GO-2024-2687]: https://pkg.go.dev/vuln/GO-2024-2687 #### New Contributors - [@​tgolang](https://togithub.com/tgolang) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/5048](https://togithub.com/open-telemetry/opentelemetry-go/pull/5048) - [@​MickaelAlliel](https://togithub.com/MickaelAlliel) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/4906](https://togithub.com/open-telemetry/opentelemetry-go/pull/4906) - [@​s4s7](https://togithub.com/s4s7) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/5096](https://togithub.com/open-telemetry/opentelemetry-go/pull/5096) - [@​Kielek](https://togithub.com/Kielek) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/5108](https://togithub.com/open-telemetry/opentelemetry-go/pull/5108) - [@​q-cheng](https://togithub.com/q-cheng) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/5032](https://togithub.com/open-telemetry/opentelemetry-go/pull/5032) - [@​carrbs](https://togithub.com/carrbs) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/4880](https://togithub.com/open-telemetry/opentelemetry-go/pull/4880) **Full Changelog**: https://github.com/open-telemetry/opentelemetry-go/compare/v1.24.0...v1.25.0
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [docs] update roadmap document (#9899) This document now contains the current focus of the maintainers of the collector project. --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> Co-authored-by: Pablo Baeyens * [service] Validate pipeline type against component types (#9257) **Description:** This change adds another layer of validation to pipelines. It validates that all the components in a pipeline are of the same type as the pipeline. For example, if a `metrics` pipeline contains a `traces`-only receiver, the `otelcol validate -config ...` command will fail. **Link to tracking Issue:** Fixes #8007. **Testing:** Added unit test + existing tests are passing. **Documentation:** godoc. --------- Co-authored-by: Pablo Baeyens * Add length limit to component (#9901) Changes component.Type validation regex to only allow a max of 63 characters in a type name. Fixes #9872 --------- Co-authored-by: Pablo Baeyens * [chore] Prepare release v1.5.0/v0.98.0 (#9935) The following commands were run to prepare this release: - make chlog-update VERSION=v1.5.0/v0.98.0 - make prepare-release PREVIOUS_VERSION=1.4.0 RELEASE_CANDIDATE=1.5.0 MODSET=stable - make prepare-release PREVIOUS_VERSION=0.97.0 RELEASE_CANDIDATE=0.98.0 MODSET=beta * [chore] Cleanup changelog (#9937) - Remove an entry for sync/atomic usage as it's an internal change - Fix a typo - Move pdata/testdata from Deprecations to Enhancements since `internal/testdata` wasn't avalable from outside of the repo * [chore] missed updating the makefile with new module (#9939) Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore] Remove unreachable deprecated internal/testdata (#9938) No changelog entry needed since it's an internal module * [chore] [exporterhelper] Update stale batchSender comments (#9884) Update comment as fields may have been renamed. * Update module github.com/golangci/golangci-lint to v1.57.2 (#9840) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/golangci/golangci-lint](https://togithub.com/golangci/golangci-lint) | `v1.56.2` -> `v1.57.2` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgolangci%2fgolangci-lint/v1.57.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fgolangci%2fgolangci-lint/v1.57.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fgolangci%2fgolangci-lint/v1.56.2/v1.57.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgolangci%2fgolangci-lint/v1.56.2/v1.57.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
golangci/golangci-lint (github.com/golangci/golangci-lint) ### [`v1.57.2`](https://togithub.com/golangci/golangci-lint/compare/v1.57.1...v1.57.2) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.57.1...v1.57.2) ### [`v1.57.1`](https://togithub.com/golangci/golangci-lint/releases/tag/v1.57.1) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.57.0...v1.57.1) #### Changelog - [`87b6bf1`](https://togithub.com/golangci/golangci-lint/commit/87b6bf17) build(deps): bump github.com/golangci/plugin-module-register from 0.1.0 to 0.1.1 ([#​4549](https://togithub.com/golangci/golangci-lint/issues/4549)) - [`921d535`](https://togithub.com/golangci/golangci-lint/commit/921d5357) build(deps): bump github.com/pelletier/go-toml/v2 from 2.1.1 to 2.2.0 ([#​4548](https://togithub.com/golangci/golangci-lint/issues/4548)) - [`cd890db`](https://togithub.com/golangci/golangci-lint/commit/cd890db2) fix: filter invalid issues before other processors ([#​4552](https://togithub.com/golangci/golangci-lint/issues/4552)) ### [`v1.57.0`](https://togithub.com/golangci/golangci-lint/compare/v1.56.2...v1.57.0) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.56.2...v1.57.0)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update module google.golang.org/grpc to v1.63.2 (#9928) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google.golang.org/grpc](https://togithub.com/grpc/grpc-go) | `v1.62.1` -> `v1.63.2` | [![age](https://developer.mend.io/api/mc/badges/age/go/google.golang.org%2fgrpc/v1.63.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/google.golang.org%2fgrpc/v1.63.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/google.golang.org%2fgrpc/v1.62.1/v1.63.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/google.golang.org%2fgrpc/v1.62.1/v1.63.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [google.golang.org/grpc](https://togithub.com/grpc/grpc-go) | `v1.63.0` -> `v1.63.2` | [![age](https://developer.mend.io/api/mc/badges/age/go/google.golang.org%2fgrpc/v1.63.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/google.golang.org%2fgrpc/v1.63.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/google.golang.org%2fgrpc/v1.63.0/v1.63.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/google.golang.org%2fgrpc/v1.63.0/v1.63.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
grpc/grpc-go (google.golang.org/grpc) ### [`v1.63.2`](https://togithub.com/grpc/grpc-go/releases/tag/v1.63.2): Release 1.63.2 [Compare Source](https://togithub.com/grpc/grpc-go/compare/v1.63.1...v1.63.2) ### Bugs - Fix the user agent string ### [`v1.63.1`](https://togithub.com/grpc/grpc-go/releases/tag/v1.63.1): Release 1.63.1 [Compare Source](https://togithub.com/grpc/grpc-go/compare/v1.63.0...v1.63.1) - grpc: un-deprecate Dial and DialContext and cherry-pick ### [`v1.63.0`](https://togithub.com/grpc/grpc-go/releases/tag/v1.63.0): Release 1.63.0 [Compare Source](https://togithub.com/grpc/grpc-go/compare/v1.62.2...v1.63.0) ### Behavior Changes - grpc: Return canonical target string from `resolver.Address.String()` (experimental) ([#​6923](https://togithub.com/grpc/grpc-go/issues/6923)) - client & server: when using write buffer pooling, use input value for buffer size instead of size\*2 ([#​6983](https://togithub.com/grpc/grpc-go/issues/6983)) - Special Thanks: [@​raghav-stripe](https://togithub.com/raghav-stripe) ### New Features - grpc: add `ClientConn.CanonicalTarget()` to return the canonical target string. ([#​7006](https://togithub.com/grpc/grpc-go/issues/7006)) - xds: implement LRS named metrics support ([gRFC A64](https://togithub.com/grpc/proposal/blob/master/A64-lrs-custom-metrics.md)) ([#​7027](https://togithub.com/grpc/grpc-go/issues/7027)) - Special Thanks: [@​danielzhaotongliu](https://togithub.com/danielzhaotongliu) - grpc: introduce `grpc.NewClient` to allow users to create new clients in idle mode and with "dns" as the default resolver ([#​7010](https://togithub.com/grpc/grpc-go/issues/7010)) - Special Thanks: [@​bruuuuuuuce](https://togithub.com/bruuuuuuuce) ### API Changes - grpc: stabilize experimental method `ClientConn.Target()` ([#​7006](https://togithub.com/grpc/grpc-go/issues/7006)) ### Bug Fixes - xds: fix an issue that would cause the client to send an empty list of resources for LDS/CDS upon reconnecting with the management server ([#​7026](https://togithub.com/grpc/grpc-go/issues/7026)) - server: Fix some errors returned by a server when using a `grpc.Server` as an `http.Handler` with the Go stdlib HTTP server ([#​6989](https://togithub.com/grpc/grpc-go/issues/6989)) - resolver/dns: add `SetResolvingTimeout` to allow configuring the DNS resolver's global timeout ([#​6917](https://togithub.com/grpc/grpc-go/issues/6917)) - Special Thanks: [@​and1truong](https://togithub.com/and1truong) - Set the security level of Windows named pipes to NoSecurity ([#​6956](https://togithub.com/grpc/grpc-go/issues/6956)) - Special Thanks: [@​irsl](https://togithub.com/irsl) ### [`v1.62.2`](https://togithub.com/grpc/grpc-go/releases/tag/v1.62.2): Release 1.62.2 [Compare Source](https://togithub.com/grpc/grpc-go/compare/v1.62.1...v1.62.2) ### Dependencies - Update http2 library to address vulnerability [CVE-2023-45288](https://www.kb.cert.org/vuls/id/421644)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update module github.com/prometheus/common to v0.52.3 (#9694) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/prometheus/common](https://togithub.com/prometheus/common) | `v0.48.0` -> `v0.52.3` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fcommon/v0.52.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fcommon/v0.52.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fcommon/v0.48.0/v0.52.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fcommon/v0.48.0/v0.52.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
prometheus/common (github.com/prometheus/common) ### [`v0.52.3`](https://togithub.com/prometheus/common/compare/v0.52.2...v0.52.3) [Compare Source](https://togithub.com/prometheus/common/compare/v0.52.2...v0.52.3) ### [`v0.52.2`](https://togithub.com/prometheus/common/releases/tag/v0.52.2) [Compare Source](https://togithub.com/prometheus/common/compare/v0.51.1...v0.52.2) #### What's Changed - Drop support for Go older than 1.18 by [@​SuperQ](https://togithub.com/SuperQ) in [https://github.com/prometheus/common/pull/612](https://togithub.com/prometheus/common/pull/612) - fix(protobuf): Correctly decode multi-messages streams by [@​srebhan](https://togithub.com/srebhan) in [https://github.com/prometheus/common/pull/616](https://togithub.com/prometheus/common/pull/616) - Bump github.com/aws/aws-sdk-go from 1.50.31 to 1.51.11 in /sigv4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/615](https://togithub.com/prometheus/common/pull/615) #### New Contributors - [@​srebhan](https://togithub.com/srebhan) made their first contribution in [https://github.com/prometheus/common/pull/616](https://togithub.com/prometheus/common/pull/616) **Full Changelog**: https://github.com/prometheus/common/compare/v0.51.1...v0.52.2 ### [`v0.51.1`](https://togithub.com/prometheus/common/releases/tag/v0.51.1) [Compare Source](https://togithub.com/prometheus/common/compare/v0.51.0...v0.51.1) #### What's Changed - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/common/pull/606](https://togithub.com/prometheus/common/pull/606) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/common/pull/609](https://togithub.com/prometheus/common/pull/609) - Retract v0.50.0 by [@​SuperQ](https://togithub.com/SuperQ) in [https://github.com/prometheus/common/pull/610](https://togithub.com/prometheus/common/pull/610) **Full Changelog**: https://github.com/prometheus/common/compare/v0.51.0...v0.51.1 ### [`v0.51.0`](https://togithub.com/prometheus/common/releases/tag/v0.51.0) [Compare Source](https://togithub.com/prometheus/common/compare/v0.50.0...v0.51.0) #### What's Changed - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/common/pull/604](https://togithub.com/prometheus/common/pull/604) - expfmt: Add a way to generate different OpenMetrics Formats by [@​ywwg](https://togithub.com/ywwg) in [https://github.com/prometheus/common/pull/596](https://togithub.com/prometheus/common/pull/596) - Fix string slice definition for FormatFlagOptions. by [@​gizmoguy](https://togithub.com/gizmoguy) in [https://github.com/prometheus/common/pull/607](https://togithub.com/prometheus/common/pull/607) - Correct logic in sample naming for counters, add new test by [@​vesari](https://togithub.com/vesari) in [https://github.com/prometheus/common/pull/608](https://togithub.com/prometheus/common/pull/608) #### New Contributors - [@​gizmoguy](https://togithub.com/gizmoguy) made their first contribution in [https://github.com/prometheus/common/pull/607](https://togithub.com/prometheus/common/pull/607) **Full Changelog**: https://github.com/prometheus/common/compare/v0.50.0...v0.51.0 ### [`v0.50.0`](https://togithub.com/prometheus/common/releases/tag/v0.50.0) [Compare Source](https://togithub.com/prometheus/common/compare/v0.49.0...v0.50.0) #### What's Changed - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/common/pull/594](https://togithub.com/prometheus/common/pull/594) - Bump github.com/stretchr/testify from 1.8.4 to 1.9.0 in /sigv4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/593](https://togithub.com/prometheus/common/pull/593) - Bump github.com/aws/aws-sdk-go from 1.50.27 to 1.50.29 in /sigv4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/592](https://togithub.com/prometheus/common/pull/592) - Bump github.com/aws/aws-sdk-go from 1.50.29 to 1.50.31 in /sigv4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/595](https://togithub.com/prometheus/common/pull/595) - Remove unused 'Host' member from HTTPClientConfig by [@​bboreham](https://togithub.com/bboreham) in [https://github.com/prometheus/common/pull/597](https://togithub.com/prometheus/common/pull/597) - Add OpenMetrics unit support by [@​vesari](https://togithub.com/vesari) in [https://github.com/prometheus/common/pull/544](https://togithub.com/prometheus/common/pull/544) - Remove deprecated version function by [@​SuperQ](https://togithub.com/SuperQ) in [https://github.com/prometheus/common/pull/591](https://togithub.com/prometheus/common/pull/591) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/common/pull/599](https://togithub.com/prometheus/common/pull/599) - Bump golang.org/x/oauth2 from 0.17.0 to 0.18.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/600](https://togithub.com/prometheus/common/pull/600) - Bump google.golang.org/protobuf from 1.32.0 to 1.33.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/601](https://togithub.com/prometheus/common/pull/601) **Full Changelog**: https://github.com/prometheus/common/compare/v0.49.0...v0.50.0 ### [`v0.49.0`](https://togithub.com/prometheus/common/releases/tag/v0.49.0) [Compare Source](https://togithub.com/prometheus/common/compare/v0.48.0...v0.49.0) #### What's Changed - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/common/pull/574](https://togithub.com/prometheus/common/pull/574) - Bump github.com/aws/aws-sdk-go from 1.49.13 to 1.50.8 in /sigv4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/571](https://togithub.com/prometheus/common/pull/571) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/common/pull/581](https://togithub.com/prometheus/common/pull/581) - Update Go by [@​SuperQ](https://togithub.com/SuperQ) in [https://github.com/prometheus/common/pull/588](https://togithub.com/prometheus/common/pull/588) - Deprecate version.NewCollector by [@​SuperQ](https://togithub.com/SuperQ) in [https://github.com/prometheus/common/pull/579](https://togithub.com/prometheus/common/pull/579) - Bump github.com/aws/aws-sdk-go from 1.50.8 to 1.50.27 in /sigv4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/587](https://togithub.com/prometheus/common/pull/587) - Avoid off-spec openmetrics exposition when exemplars have empty labels by [@​orls](https://togithub.com/orls) in [https://github.com/prometheus/common/pull/569](https://togithub.com/prometheus/common/pull/569) - Bump golang.org/x/oauth2 from 0.16.0 to 0.17.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/585](https://togithub.com/prometheus/common/pull/585) - Write created lines when negotiating OpenMetrics by [@​ArthurSens](https://togithub.com/ArthurSens) in [https://github.com/prometheus/common/pull/504](https://togithub.com/prometheus/common/pull/504) - Upgrade client_model to v.0.6.0 by [@​vesari](https://togithub.com/vesari) in [https://github.com/prometheus/common/pull/589](https://togithub.com/prometheus/common/pull/589) - http_config: Add host by [@​jkroepke](https://togithub.com/jkroepke) in [https://github.com/prometheus/common/pull/549](https://togithub.com/prometheus/common/pull/549) - LabelSet: Fix alphabetical sorting for prometheus LabelSet by [@​wasim-nihal](https://togithub.com/wasim-nihal) in [https://github.com/prometheus/common/pull/575](https://togithub.com/prometheus/common/pull/575) - labelset: optimise String() function by [@​bboreham](https://togithub.com/bboreham) in [https://github.com/prometheus/common/pull/590](https://togithub.com/prometheus/common/pull/590) #### New Contributors - [@​orls](https://togithub.com/orls) made their first contribution in [https://github.com/prometheus/common/pull/569](https://togithub.com/prometheus/common/pull/569) - [@​vesari](https://togithub.com/vesari) made their first contribution in [https://github.com/prometheus/common/pull/589](https://togithub.com/prometheus/common/pull/589) **Full Changelog**: https://github.com/prometheus/common/compare/v0.48.0...v0.49.0
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [cmd/mdatagen] Move component config test from cmd/builder (#9940) The tests generated by cmd/builder are skipped in contrib because they cause the CI timeouts. We moved the lifecycle tests to the tests generated by mdatagen, but the config/factory smoke tests are still part of the files generated by cmd/builder. Recently, the loadbalancing exporter got an invalid camelCase config field because of this coverage gap. This change moves the config/factory tests from cmd/builder to cmd/mdatagen. So, they are always generated for every component, even if not used in any collector bundle. * [chore] fix deprecation godoc (#9947) Not prefixing the Deprecated godoc with a newline (or it being the only godoc) appears to cause intellisense/linters some pain. Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [mdatagen] allow filtering out metrics based on resource attributes (#9660) **Description:** This PR allows filtering out metrics based on resource attributes. For example: ``` resource_attributes: k8s.pod.name: enabled: true exclude: #- strict: "kube-apiserver-kind-control-plane" - regexp: "kube-.*" - regexp: "coredns-.*" - strict: "coredns" - strict: "kindnet-mpb2p" ``` Would remove metrics that match regex or strict rules on resource attributes. **Link to tracking Issue:** https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/25134 **Testing:** - Tested with k8scluster receiver in kind cluster. - unit tests added **Documentation:** --------- Co-authored-by: Dmitrii Anoshin * Promote @atoulme, @TylerHelmuth and @songy23 to approvers (#9954) :tada: fixes #9946, fixes #9949, fixes #9953 * [chore] Remove dead link (#9955) Follows #9874 and #9797 * [chore] Fix component name in changelog (#9948) s/metadatagen/mdatagen/ * [confighttp] deprecate ToClientContext, ToServerContext, ToListenerContext (#9944) Replaced by ToClient, ToServer, ToListener Related to #9807 --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Update module go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc to v0.50.0 (#9918) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | `v0.49.0` -> `v0.50.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fgoogle.golang.org%2fgrpc%2fotelgrpc/v0.50.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fgoogle.golang.org%2fgrpc%2fotelgrpc/v0.50.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fgoogle.golang.org%2fgrpc%2fotelgrpc/v0.49.0/v0.50.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fgoogle.golang.org%2fgrpc%2fotelgrpc/v0.49.0/v0.50.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update module go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp to v0.50.0 (#9919) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | `v0.49.0` -> `v0.50.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fnet%2fhttp%2fotelhttp/v0.50.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fnet%2fhttp%2fotelhttp/v0.50.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fnet%2fhttp%2fotelhttp/v0.49.0/v0.50.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fnet%2fhttp%2fotelhttp/v0.49.0/v0.50.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [chore] these top level ignores are no longer needed (#9958) Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [cmd/mdatagen] [chore] Small fixes for new resource attributes filter (#9950) - Make sure we always pass a string to the filter.Match even if the attribute value has a different type. Otherwise, it panics. - Make sure we show the if_configured warning if the user sets include/exclude without enabled. - Simplify generated tests Follow up to https://github.com/open-telemetry/opentelemetry-collector/pull/9660 * Disable concurrency in zstd and add Benchmark tests for it (#9749) **Description:** zstd benchmark tests added The goal of this PR is to disable concurrency in zstd compression to reduce its memory footprint and avoid a known issue with goroutine leaks. Please see - https://github.com/klauspost/compress/issues/264 **Link to tracking Issue:** https://github.com/open-telemetry/opentelemetry-collector/issues/8216 **Testing:** Benchmark test results below ``` BenchmarkCompression/zstdWithConcurrency/compress-10 21392 55855 ns/op 187732.88 MB/s 2329164 B/op 28 allocs/op BenchmarkCompression/zstdNoConcurrency/compress-10 29526 39902 ns/op 262787.42 MB/s 1758988 B/op 15 allocs/op input => 10.00 MB ``` * Update module go.opentelemetry.io/contrib/config to v0.5.0 (#9934) Replace https://github.com/open-telemetry/opentelemetry-collector/pull/9917 because of a merge conflict --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * [chore] remove usage of deprecated funcs (#9965) DialContext was marked as deprecated https://github.com/grpc/grpc-go/releases/tag/v1.63.1 Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [configtls] Deprecate *Context funcs (#9945) Works towards https://github.com/open-telemetry/opentelemetry-collector/issues/9811 * [configtls] Add NewDefault* funcs (#9658) Adds new `NewDefault*` funcs for all 3 config structs. In anticipation of the name changes from https://github.com/open-telemetry/opentelemetry-collector/pull/9495 I've named the functions using the new, preferred name. Closes https://github.com/open-telemetry/opentelemetry-collector/issues/9657 * [chore] update filter dep (#9966) Makes updating contrib easier. Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore][exporter/debug] refactor code to make independent from Logging exporter (#9922) This PR is the first part of this draft PR: https://github.com/open-telemetry/opentelemetry-collector/pull/9298. This refactoring is needed to implement [[exporter/debug] change behavior of "normal" verbosity to be different from "basic" #7806](https://github.com/open-telemetry/opentelemetry-collector/issues/7806). I want to change the behavior of the Debug exporter, but leave the behavior of the Logging exporter unchanged. **Link to tracking Issue:** - https://github.com/open-telemetry/opentelemetry-collector/issues/7806 * [chore] [mdatagen] Fix generated tests for include/exclude capability (#9970) To unblock https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/32394 * [service] fix bug in sampler (#9968) The configuration for the recordSampler has multiple configurations for the RemoteParentSampler which doesn't appear to make any sense. I suspect the original intent was to configure both local and remote samplers with sampled and not sampled. --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore] Move logging out of meter provider initialization (#9729) **Description:** Moves logging messages about the meter provider outside of the meter provider initialization. While working on https://github.com/open-telemetry/opentelemetry-collector/issues/4970#issuecomment-1911978462, I realized there is an implicit dependency in the initialization order of the different telemetry components. I tried making this work and make the factory have a single `CreateTelemetrySettings`, but this results in an awkward API, so I am trying the alternative here: don't log during the meter provider initialization, but do so outside of it. **Link to tracking Issue:** Relates to #4970 --------- Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Update module go.opentelemetry.io/collector/confmap to v0.98.0 (#9972) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/collector/confmap](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.96.0` -> `v0.98.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconfmap/v0.98.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconfmap/v0.98.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconfmap/v0.96.0/v0.98.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconfmap/v0.96.0/v0.98.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/confmap) ### [`v0.98.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v150v0980) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.97.0...v0.98.0) ##### 🛑 Breaking changes 🛑 - `service`: emit internal collector metrics with \_ instead of / with OTLP export ([#​9774](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9774)) This is addressing an issue w/ the names of the metrics generated by the Collector for its internal metrics. Note that this change only impacts users that emit telemetry using OTLP, which is currently still in experimental support. The prometheus metrics already replaced `/` with `_` and they will do the same with `_`. ##### 💡 Enhancements 💡 - `mdatagen`: Adds unsupported platforms to the README header ([#​9794](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9794)) - `confmap`: Clarify the use of embedded structs to make unmarshaling composable ([#​7101](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7101)) - `nopexporter`: Promote the nopexporter to beta ([#​7316](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7316)) - `nopreceiver`: Promote the nopreceiver to beta ([#​7316](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7316)) - `otlpexporter`: Checks for port in the config validation for the otlpexporter ([#​9505](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9505)) - `service`: Validate pipeline type against component types ([#​8007](https://togithub.com/open-telemetry/opentelemetry-collector/issues/8007)) ##### 🧰 Bug fixes 🧰 - `configtls`: Fix issue where `IncludeSystemCACertsPool` was not consistently used between `ServerConfig` and `ClientConfig`. ([#​9835](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9835)) - `component`: Fix issue where the `components` command wasn't properly printing the component type. ([#​9856](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9856)) - `otelcol`: Fix issue where the `validate` command wasn't properly printing valid component type. ([#​9866](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9866)) - `receiver/otlp`: Fix bug where the otlp receiver did not properly respond with a retryable error code when possible for http ([#​9357](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9357)) ### [`v0.97.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v140v0970) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.96.0...v0.97.0) ##### 🛑 Breaking changes 🛑 - `telemetry`: Remove telemetry.useOtelForInternalMetrics stable feature gate ([#​9752](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9752)) ##### 🚀 New components 🚀 - `exporter/nop`: Add the `nopexporter` to serve as a placeholder exporter in a pipeline ([#​7316](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7316)) This is primarily useful for starting the Collector with only extensions enabled or to test Collector pipeline throughput. - `receiver/nop`: Add the `nopreceiver` to serve as a placeholder receiver in a pipeline ([#​7316](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7316)) This is primarily useful for starting the Collector with only extensions enabled. ##### 💡 Enhancements 💡 - `configtls`: Validates TLS min_version and max_version ([#​9475](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9475)) Introduces `Validate()` method in TLSSetting. - `configcompression`: Mark module as Stable. ([#​9571](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9571)) - `cmd/mdatagen`: Use go package name for the scope name by default and add an option to provide the scope name in metadata.yaml. ([#​9693](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9693)) - `cmd/mdatagen`: Generate the lifecycle tests for components by default. ([#​9683](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9683)) It's encouraged to have lifecycle tests for all components enadled, but they can be disabled if needed in metadata.yaml with `skip_lifecycle: true` and `skip_shutdown: true` under `tests` section. - `cmd/mdatagen`: optimize the mdatagen for the case like batchprocessor which use a common struct to implement consumer.Traces, consumer.Metrics, consumer.Logs in the meantime. ([#​9688](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9688)) ##### 🧰 Bug fixes 🧰 - `exporterhelper`: Fix persistent queue size backup on reads. ([#​9740](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9740)) - `processor/batch`: Prevent starting unnecessary goroutines. ([#​9739](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9739)) - `otlphttpexporter`: prevent error on empty response body when content type is application/json ([#​9666](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9666)) - `confmap`: confmap honors `Unmarshal` methods on config embedded structs. ([#​6671](https://togithub.com/open-telemetry/opentelemetry-collector/issues/6671)) - `otelcol`: Respect telemetry configuration when running as a Windows service ([#​5300](https://togithub.com/open-telemetry/opentelemetry-collector/issues/5300))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update module go.opentelemetry.io/collector/exporter/otlphttpexporter to v0.98.0 (#9974) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/collector/exporter/otlphttpexporter](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.97.0` -> `v0.98.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.98.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.98.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.97.0/v0.98.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.97.0/v0.98.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/exporter/otlphttpexporter) ### [`v0.98.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v150v0980) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.97.0...v0.98.0) ##### 🛑 Breaking changes 🛑 - `service`: emit internal collector metrics with \_ instead of / with OTLP export ([#​9774](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9774)) This is addressing an issue w/ the names of the metrics generated by the Collector for its internal metrics. Note that this change only impacts users that emit telemetry using OTLP, which is currently still in experimental support. The prometheus metrics already replaced `/` with `_` and they will do the same with `_`. ##### 💡 Enhancements 💡 - `mdatagen`: Adds unsupported platforms to the README header ([#​9794](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9794)) - `confmap`: Clarify the use of embedded structs to make unmarshaling composable ([#​7101](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7101)) - `nopexporter`: Promote the nopexporter to beta ([#​7316](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7316)) - `nopreceiver`: Promote the nopreceiver to beta ([#​7316](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7316)) - `otlpexporter`: Checks for port in the config validation for the otlpexporter ([#​9505](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9505)) - `service`: Validate pipeline type against component types ([#​8007](https://togithub.com/open-telemetry/opentelemetry-collector/issues/8007)) ##### 🧰 Bug fixes 🧰 - `configtls`: Fix issue where `IncludeSystemCACertsPool` was not consistently used between `ServerConfig` and `ClientConfig`. ([#​9835](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9835)) - `component`: Fix issue where the `components` command wasn't properly printing the component type. ([#​9856](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9856)) - `otelcol`: Fix issue where the `validate` command wasn't properly printing valid component type. ([#​9866](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9866)) - `receiver/otlp`: Fix bug where the otlp receiver did not properly respond with a retryable error code when possible for http ([#​9357](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9357))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update module go.opentelemetry.io/collector/receiver/otlpreceiver to v0.98.0 (#9976) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/collector/receiver/otlpreceiver](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.97.0` -> `v0.98.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.98.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.98.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.97.0/v0.98.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.97.0/v0.98.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/receiver/otlpreceiver) ### [`v0.98.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v150v0980) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.97.0...v0.98.0) ##### 🛑 Breaking changes 🛑 - `service`: emit internal collector metrics with \_ instead of / with OTLP export ([#​9774](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9774)) This is addressing an issue w/ the names of the metrics generated by the Collector for its internal metrics. Note that this change only impacts users that emit telemetry using OTLP, which is currently still in experimental support. The prometheus metrics already replaced `/` with `_` and they will do the same with `_`. ##### 💡 Enhancements 💡 - `mdatagen`: Adds unsupported platforms to the README header ([#​9794](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9794)) - `confmap`: Clarify the use of embedded structs to make unmarshaling composable ([#​7101](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7101)) - `nopexporter`: Promote the nopexporter to beta ([#​7316](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7316)) - `nopreceiver`: Promote the nopreceiver to beta ([#​7316](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7316)) - `otlpexporter`: Checks for port in the config validation for the otlpexporter ([#​9505](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9505)) - `service`: Validate pipeline type against component types ([#​8007](https://togithub.com/open-telemetry/opentelemetry-collector/issues/8007)) ##### 🧰 Bug fixes 🧰 - `configtls`: Fix issue where `IncludeSystemCACertsPool` was not consistently used between `ServerConfig` and `ClientConfig`. ([#​9835](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9835)) - `component`: Fix issue where the `components` command wasn't properly printing the component type. ([#​9856](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9856)) - `otelcol`: Fix issue where the `validate` command wasn't properly printing valid component type. ([#​9866](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9866)) - `receiver/otlp`: Fix bug where the otlp receiver did not properly respond with a retryable error code when possible for http ([#​9357](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9357))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update github-actions deps (#9971) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [Wandalen/wretry.action](https://togithub.com/Wandalen/wretry.action) | action | minor | `v3.2.0` -> `v3.4.0` | | [github/codeql-action](https://togithub.com/github/codeql-action) | action | minor | `v3.24.10` -> `v3.25.0` | --- ### Release Notes
Wandalen/wretry.action (Wandalen/wretry.action) ### [`v3.4.0`](https://togithub.com/Wandalen/wretry.action/compare/v3.3.0...v3.4.0) [Compare Source](https://togithub.com/Wandalen/wretry.action/compare/v3.3.0...v3.4.0) ### [`v3.3.0`](https://togithub.com/Wandalen/wretry.action/compare/v3.2.0...v3.3.0) [Compare Source](https://togithub.com/Wandalen/wretry.action/compare/v3.2.0...v3.3.0)
github/codeql-action (github/codeql-action) ### [`v3.25.0`](https://togithub.com/github/codeql-action/compare/v3.24.10...v3.25.0) [Compare Source](https://togithub.com/github/codeql-action/compare/v3.24.10...v3.25.0)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update module go.opentelemetry.io/collector/exporter/otlpexporter to v0.98.0 (#9973) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/collector/exporter/otlpexporter](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.97.0` -> `v0.98.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.98.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.98.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.97.0/v0.98.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.97.0/v0.98.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/exporter/otlpexporter) ### [`v0.98.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v150v0980) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.97.0...v0.98.0) ##### 🛑 Breaking changes 🛑 - `service`: emit internal collector metrics with \_ instead of / with OTLP export ([#​9774](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9774)) This is addressing an issue w/ the names of the metrics generated by the Collector for its internal metrics. Note that this change only impacts users that emit telemetry using OTLP, which is currently still in experimental support. The prometheus metrics already replaced `/` with `_` and they will do the same with `_`. ##### 💡 Enhancements 💡 - `mdatagen`: Adds unsupported platforms to the README header ([#​9794](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9794)) - `confmap`: Clarify the use of embedded structs to make unmarshaling composable ([#​7101](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7101)) - `nopexporter`: Promote the nopexporter to beta ([#​7316](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7316)) - `nopreceiver`: Promote the nopreceiver to beta ([#​7316](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7316)) - `otlpexporter`: Checks for port in the config validation for the otlpexporter ([#​9505](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9505)) - `service`: Validate pipeline type against component types ([#​8007](https://togithub.com/open-telemetry/opentelemetry-collector/issues/8007)) ##### 🧰 Bug fixes 🧰 - `configtls`: Fix issue where `IncludeSystemCACertsPool` was not consistently used between `ServerConfig` and `ClientConfig`. ([#​9835](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9835)) - `component`: Fix issue where the `components` command wasn't properly printing the component type. ([#​9856](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9856)) - `otelcol`: Fix issue where the `validate` command wasn't properly printing valid component type. ([#​9866](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9866)) - `receiver/otlp`: Fix bug where the otlp receiver did not properly respond with a retryable error code when possible for http ([#​9357](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9357))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * update to use the config package to configure tracer provider (#9967) Restore the functionality to use the OTel Go Contrib package to configure the SDK for Tracer Providers. Fixes #9715 --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore] [mdatagen] Fix generated tests for include/exclude capability (#9978) Unblocking https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/32394, again * Distribute internal metrics across different levels (#9767) **Description:** This change distributes the reported internal metrics across available levels and updates the level set by default: 1. The default level is changed from `basic` to `normal`, which can be overridden with `service::telmetry::metrics::level` configuration. 2. The following batch processor metrics are updated to be reported starting from `normal` level instead of `basic` level: - `processor_batch_batch_send_size` - `processor_batch_metadata_cardinality` - `processor_batch_timeout_trigger_send` - `processor_batch_size_trigger_send` 3. The following GRPC/HTTP server and client metrics are updated to be reported starting from `detailed` level: - `http.client.*` metrics - `http.server.*` metrics - `rpc.server.*` metrics - `rpc.client.*` metrics **Link to tracking Issue:** https://github.com/open-telemetry/opentelemetry-collector/issues/7890 * Update module golang.org/x/vuln to v1.1.0 (#9980) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | golang.org/x/vuln | `v1.0.4` -> `v1.1.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fvuln/v1.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2fvuln/v1.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2fvuln/v1.0.4/v1.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fvuln/v1.0.4/v1.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [mdatagen] generate goleak package test (#9959) This automates the generation of package_test.go for any component that uses mdatagen. The following configuration can be used to skip or ignore certain funcs: ```yaml tests: goleak: skip: true tests: goleak: ignore: top: - "go.opencensus.io/stats/view.(*worker).start" ``` --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [builder] Add strict versioning (#9897) **Description:** Adds strict version checking in the builder. This enables users to ensure that the versions specified in the builder config are the versions used in the go.mod when building the collector binary. This can be disabled with --skip-strict-versioning. **Link to tracking Issue:** #9896 **Testing:** Added unit tests **Documentation:** Added to builder README --------- Co-authored-by: Pablo Baeyens * [chore] change @astencel-sumo to @andrzej-stencel (#9990) I have changed my GitHub username following https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-user-account-settings/changing-your-github-username. * [confmap] Add converter and provider settings to confmap.ResolverSettings (#9516) **Description:** Follows https://github.com/open-telemetry/opentelemetry-collector/pull/9443, relates to https://github.com/open-telemetry/opentelemetry-collector/pull/9513. This builds on https://github.com/open-telemetry/opentelemetry-collector/pull/9228 to demonstrate the concept. This shows one way of extending the otelcol APIs to allow passing converters and providers from the builder with the new settings structs for each type. I think this approach has a few advantages: 1. This follows our pattern of passing in "factory" functions instead of instances to the object that actually uses the instances. 2. Makes the API more declarative: the settings specify which modules to instantiate and which settings to instantiate them with, but don't require the caller to actually do this. 3. Compared to the current state, this allows us to update the config at different layers. A distribution's `main.go` file can specify the providers/converters it wants and leave the settings to be created by `otelcol.Collector`. The primary drawbacks I see here are: 1. This is a little more opinionated since you don't have access to the converter/provider instances or control how they are instantiated. I think this is acceptable and provides good encapsulation. 2. The scheme->provider map can now only be specified by the providers' schemes, which is how it is currently done by default. I would want to hear what use cases we see for more complex control here that necessitates using schemes not specified by the providers. cc @mx-psi --------- Co-authored-by: Evan Bradley * [mdatagen] add setup/teardown configuration (#9993) This allows components with existing TestMain funcs to use the auto generated goleak checks Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore] update package test template (#9994) Ensure setup/teardown are respected even when goleak is skipped. Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Added default functions for configauth (#9850) Description: Added NewDefault methods for structs in `configauth` package Link to tracking Issue: Closes https://github.com/open-telemetry/opentelemetry-collector/issues/9821 Testing: Tests were added for the NewDefault functions --------- Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore] Clean up pull request template (#9995) #### Description Mainly to save myself a little effort when opening PRs. :slightly_smiling_face: I don't think the paragraph at the top is enforced, so I removed it. This probably depends on some output from https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/32491, so I tried to keep the changes hopefully somewhat unopinionated (the resulting description looks similar to how it does now). Happy to wait on that, reduce scope, or open follow-ups. cc @codeboten @crobert-1 --------- Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> Co-authored-by: Curtis Robert * [chore] Double Windows unit tests timeout (#9992) Bump the timeout for the Windows unit tests from 120s to 240s. The tests currently are brushing up very close to this limit and are becoming flaky as a result. [Example run](https://github.com/open-telemetry/opentelemetry-collector/actions/runs/8739137193/job/23984602883?pr=9516#step:5:19): ``` ok go.opentelemetry.io/collector/cmd/builder/internal/builder 116.086s ``` * Update go.opentelemetry.io/proto/otlp to v1.2.0 (#9985) Update the OTLP proto dependency and generated code. I plan to use the metric.metadata field to support additional prometheus types per https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/compatibility/prometheus_and_openmetrics.md#metric-metadata * OTLP HTTP Exporter: Propagate HTTP 429s (#9905) Changes otlphttp status code handling to propagate the error code as a grpc status code. This follows the logic that was implemented for the http receiver [here](https://github.com/open-telemetry/opentelemetry-collector/pull/9893/files). Fixes #9892 **Testing:** local tests were updated, going to test a local build. * [confmap] Return error when decoding negative values into uints (#9169) **Description:** This adds a decode hook for unmarshalling negative integers into uint types. This will now return an error instead of converting negative values into large uint values. **Link to tracking Issue:** Fixes #9060 **Testing:** Added unit tests for confmap functionality, functional tests in memory limiter processor (the original component this issue was filed against) * [cmd/builder] Improve TestVersioning (#10000) #### Description Improves `TestVersioning` added on #9897. The configurations were not what one would usually find, since when running the builder we do some validation and setup. This makes it closer to the real case. In the process I removed the 'invalid' cases, since these error out today already * [cmd/builder] Remove undocumented strictness check (#9999) Partially reverts #9897. This was not documented on the original PR and is IMO too strict. We likely want to allow for some skew between versions. Mentioned on https://github.com/open-telemetry/opentelemetry-collector/pull/9513#issuecomment-2065586307 --------- Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Support metric.metadata in pdata/pmetric (#10006) #### Description After https://github.com/open-telemetry/opentelemetry-collector/pull/9985, add support for the new metric.metadata field in the pmetric package. I plan to use the metric.metadata field to support additional prometheus types per https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/compatibility/prometheus_and_openmetrics.md#metric-metadata * [builder] only compare major and minor versions from gomod (#9997) #### Description When building from a commit hash, I got this error: ``` Error: mismatch in go.mod and builder configuration versions: core collector version calculated by component dependencies "v0.98.1-0.20240416174005-d0f15e2463f8" does not match configured version "v0.98.0". Use --skip-strict-versioning to temporarily disable this check. This flag will be removed in a future minor version ``` It may be more useful to only compare the major and minor versions #### Link to tracking issue https://github.com/open-telemetry/opentelemetry-collector/issues/9896 Found in https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/32544 #### Testing Manually tested new build #### Documentation updated readme * [cmd/builder] Allow configuring confmap providers (#9513) **Description:** Allow configuring confmap providers in the builder's config. If the field isn't set, the default set of providers is used. **Link to tracking Issue:** Resolves https://github.com/open-telemetry/opentelemetry-collector/issues/4759. **Testing:** Extended unit tests. **Documentation:** Updated the readme to include the new options in the example manifest file. cc @mx-psi --------- Co-authored-by: Evan Bradley Co-authored-by: Pablo Baeyens * Remove `GetExporters` from component.Host (#9987) **Description:** Remove the deprecated `GetExporters` function from `component.Host` **Link to tracking Issue:** Related to https://github.com/open-telemetry/opentelemetry-collector/issues/7370 * [exporter/otlp] Allow DNS scheme to be used in endpoint (#10010) Fixes #4274 Signed-off-by: Juraci Paixão Kröhling * [mdatagen] Rename include/exclude config options (#9960) The `include` and `exclude ` options in the resource attributes group sound confusing. It's easy to assume that matching filters will include or exclude resource attributes themselves while they control emitted resource metrics. The proposal is to change the include/exclude options to `metrics_include`/`metrics_exclude` with detailed comments. These names make it cleaner that matching rules limit the emitted metrics, not resource attributes. Updates https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/25134 * [chore][cmd/builder] Include replaces in builder versioning tests (#10016) #### Description This is necessary when testing the builder with unreleased versions of Collector modules. #### Link to tracking issue Fixes https://github.com/open-telemetry/opentelemetry-collector/issues/10014 * [chore] Prepare release v1.6.0/v0.99.0 (#10018) The following commands were run to prepare this release: - make chlog-update VERSION=v1.6.0/v0.99.0 - make prepare-release PREVIOUS_VERSION=1.5.0 RELEASE_CANDIDATE=1.6.0 MODSET=stable - make prepare-release PREVIOUS_VERSION=0.98.0 RELEASE_CANDIDATE=0.99.0 MODSET=beta * Update module go.opentelemetry.io/collector/receiver/otlpreceiver to v0.99.0 (#10024) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/collector/receiver/otlpreceiver](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.98.0` -> `v0.99.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.99.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.99.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.98.0/v0.99.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.98.0/v0.99.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/receiver/otlpreceiver) ### [`v0.99.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v160v0990) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.98.0...v0.99.0) ##### 🛑 Breaking changes 🛑 - `builder`: Add strict version checking when using the builder. Add the temporary flag ` --skip-strict-versioning `for skipping this check. ([#​9896](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9896)) Strict version checking will error on major and minor version mismatches between the `otelcol_version` configured and the builder version or versions in the go.mod. This check can be temporarily disabled by using the `--skip-strict-versioning` flag. This flag will be removed in a future minor version. - `telemetry`: Distributed internal metrics across different levels. ([#​7890](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7890)) The internal metrics levels are updated along with reported metrics: - The default level is changed from `basic` to `normal`, which can be overridden with `service::telmetry::metrics::level` configuration. - Batch processor metrics are updated to be reported starting from `normal` level: - `processor_batch_batch_send_size` - `processor_batch_metadata_cardinality` - `processor_batch_timeout_trigger_send` - `processor_batch_size_trigger_send` - GRPC/HTTP server and client metrics are updated to be reported starting from `detailed` level: - http.client.\* metrics - http.server.\* metrics - rpc.server.\* metrics - rpc.client.\* metrics ##### 💡 Enhancements 💡 - `confighttp`: Disable concurrency in zstd compression ([#​8216](https://togithub.com/open-telemetry/opentelemetry-collector/issues/8216)) - `cmd/builder`: Allow configuring `confmap.Provider`s in the builder. ([#​4759](https://togithub.com/open-telemetry/opentelemetry-collector/issues/4759)) If no providers are specified, the defaults are used. The default providers are: env, file, http, https, and yaml. To configure providers, use the `providers` key in your OCB build manifest with a list of Go modules for your providers. The modules will work the same as other Collector components. - `mdatagen`: enable goleak tests by default via mdatagen ([#​9959](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9959)) - `cmd/mdatagen`: support excluding some metrics based on string and regexes in resource_attributes ([#​9661](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9661)) - `cmd/mdatagen`: Generate config and factory tests covering their requirements. ([#​9940](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9940)) The tests are moved from cmd/builder. - `confmap`: Add `ProviderSettings`, `ConverterSettings`, `ProviderFactories`, and `ConverterFactories` fields to `confmap.ResolverSettings` ([#​9516](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9516)) This allows configuring providers and converters, which are instantiated by `NewResolver` using the given factories. ##### 🧰 Bug fixes 🧰 - `exporter/otlp`: Allow DNS scheme to be used in endpoint ([#​4274](https://togithub.com/open-telemetry/opentelemetry-collector/issues/4274)) - `service`: fix record sampler configuration ([#​9968](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9968)) - `service`: ensure the tracer provider is configured via go.opentelemetry.io/contrib/config ([#​9967](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9967)) - `otlphttpexporter`: Fixes a bug that was preventing the otlp http exporter from propagating status. ([#​9892](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9892)) - `confmap`: Fix decoding negative configuration values into uints ([#​9060](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9060))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update module go.opentelemetry.io/collector/exporter/otlpexporter to v0.99.0 (#10022) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/collector/exporter/otlpexporter](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.98.0` -> `v0.99.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.99.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.99.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.98.0/v0.99.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.98.0/v0.99.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/exporter/otlpexporter) ### [`v0.99.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v160v0990) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.98.0...v0.99.0) ##### 🛑 Breaking changes 🛑 - `builder`: Add strict version checking when using the builder. Add the temporary flag ` --skip-strict-versioning `for skipping this check. ([#​9896](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9896)) Strict version checking will error on major and minor version mismatches between the `otelcol_version` configured and the builder version or versions in the go.mod. This check can be temporarily disabled by using the `--skip-strict-versioning` flag. This flag will be removed in a future minor version. - `telemetry`: Distributed internal metrics across different levels. ([#​7890](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7890)) The internal metrics levels are updated along with reported metrics: - The default level is changed from `basic` to `normal`, which can be overridden with `service::telmetry::metrics::level` configuration. - Batch processor metrics are updated to be reported starting from `normal` level: - `processor_batch_batch_send_size` - `processor_batch_metadata_cardinality` - `processor_batch_timeout_trigger_send` - `processor_batch_size_trigger_send` - GRPC/HTTP server and client metrics are updated to be reported starting from `detailed` level: - http.client.\* metrics - http.server.\* metrics - rpc.server.\* metrics - rpc.client.\* metrics ##### 💡 Enhancements 💡 - `confighttp`: Disable concurrency in zstd compression ([#​8216](https://togithub.com/open-telemetry/opentelemetry-collector/issues/8216)) - `cmd/builder`: Allow configuring `confmap.Provider`s in the builder. ([#​4759](https://togithub.com/open-telemetry/opentelemetry-collector/issues/4759)) If no providers are specified, the defaults are used. The default providers are: env, file, http, https, and yaml. To configure providers, use the `providers` key in your OCB build manifest with a list of Go modules for your providers. The modules will work the same as other Collector components. - `mdatagen`: enable goleak tests by default via mdatagen ([#​9959](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9959)) - `cmd/mdatagen`: support excluding some metrics based on string and regexes in resource_attributes ([#​9661](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9661)) - `cmd/mdatagen`: Generate config and factory tests covering their requirements. ([#​9940](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9940)) The tests are moved from cmd/builder. - `confmap`: Add `ProviderSettings`, `ConverterSettings`, `ProviderFactories`, and `ConverterFactories` fields to `confmap.ResolverSettings` ([#​9516](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9516)) This allows configuring providers and converters, which are instantiated by `NewResolver` using the given factories. ##### 🧰 Bug fixes 🧰 - `exporter/otlp`: Allow DNS scheme to be used in endpoint ([#​4274](https://togithub.com/open-telemetry/opentelemetry-collector/issues/4274)) - `service`: fix record sampler configuration ([#​9968](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9968)) - `service`: ensure the tracer provider is configured via go.opentelemetry.io/contrib/config ([#​9967](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9967)) - `otlphttpexporter`: Fixes a bug that was preventing the otlp http exporter from propagating status. ([#​9892](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9892)) - `confmap`: Fix decoding negative configuration values into uints ([#​9060](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9060))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update github-actions deps (#10019) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/checkout](https://togithub.com/actions/checkout) | action | patch | `v4.1.1` -> `v4.1.3` | | [actions/upload-artifact](https://togithub.com/actions/upload-artifact) | action | patch | `v4.3.1` -> `v4.3.3` | | [github/codeql-action](https://togithub.com/github/codeql-action) | action | patch | `v3.25.0` -> `v3.25.2` | --- ### Release Notes
actions/checkout (actions/checkout) ### [`v4.1.3`](https://togithub.com/actions/checkout/releases/tag/v4.1.3) [Compare Source](https://togithub.com/actions/checkout/compare/v4.1.2...v4.1.3) #### What's Changed - Update `actions/checkout` version in `update-main-version.yml` by [@​jww3](https://togithub.com/jww3) in [https://github.com/actions/checkout/pull/1650](https://togithub.com/actions/checkout/pull/1650) - Check git version before attempting to disable `sparse-checkout` by [@​jww3](https://togithub.com/jww3) in [https://github.com/actions/checkout/pull/1656](https://togithub.com/actions/checkout/pull/1656) - Add SSH user parameter by [@​cory-miller](https://togithub.com/cory-miller) in [https://github.com/actions/checkout/pull/1685](https://togithub.com/actions/checkout/pull/1685) **Full Changelog**: https://github.com/actions/checkout/compare/v4.1.2...v4.1.3 ### [`v4.1.2`](https://togithub.com/actions/checkout/blob/HEAD/CHANGELOG.md#v412) [Compare Source](https://togithub.com/actions/checkout/compare/v4.1.1...v4.1.2) - Fix: Disable sparse checkout whenever `sparse-checkout` option is not present [@​dscho](https://togithub.com/dscho) in [https://github.com/actions/checkout/pull/1598](https://togithub.com/actions/checkout/pull/1598)
actions/upload-artifact (actions/upload-artifact) ### [`v4.3.3`](https://togithub.com/actions/upload-artifact/releases/tag/v4.3.3) [Compare Source](https://togithub.com/actions/upload-artifact/compare/v4.3.2...v4.3.3) ##### What's Changed - updating `@actions/artifact` dependency to v2.1.6 by [@​eggyhead](https://togithub.com/eggyhead) in [https://github.com/actions/upload-artifact/pull/565](https://togithub.com/actions/upload-artifact/pull/565) **Full Changelog**: https://github.com/actions/upload-artifact/compare/v4.3.2...v4.3.3 ### [`v4.3.2`](https://togithub.com/actions/upload-artifact/releases/tag/v4.3.2) [Compare Source](https://togithub.com/actions/upload-artifact/compare/v4.3.1...v4.3.2) #### What's Changed - Update release-new-action-version.yml by [@​konradpabjan](https://togithub.com/konradpabjan) in [https://github.com/actions/upload-artifact/pull/516](https://togithub.com/actions/upload-artifact/pull/516) - Minor fix to the migration readme by [@​andrewakim](https://togithub.com/andrewakim) in [https://github.com/actions/upload-artifact/pull/523](https://togithub.com/actions/upload-artifact/pull/523) - Update readme with v3/v2/v1 deprecation notice by [@​robherley](https://togithub.com/robherley) in [https://github.com/actions/upload-artifact/pull/561](https://togithub.com/actions/upload-artifact/pull/561) - updating `@actions/artifact` dependency to v2.1.5 and `@actions/core` to v1.0.1 by [@​eggyhead](https://togithub.com/eggyhead) in [https://github.com/actions/upload-artifact/pull/562](https://togithub.com/actions/upload-artifact/pull/562) #### New Contributors - [@​andrewakim](https://togithub.com/andrewakim) made their first contribution in [https://github.com/actions/upload-artifact/pull/523](https://togithub.com/actions/upload-artifact/pull/523) **Full Changelog**: https://github.com/actions/upload-artifact/compare/v4.3.1...v4.3.2
github/codeql-action (github/codeql-action) ### [`v3.25.2`](https://togithub.com/github/codeql-action/compare/v3.25.1...v3.25.2) [Compare Source](https://togithub.com/github/codeql-action/compare/v3.25.1...v3.25.2) ### [`v3.25.1`](https://togithub.com/github/codeql-action/compare/v3.25.0...v3.25.1) [Compare Source](https://togithub.com/github/codeql-action/compare/v3.25.0...v3.25.1)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update module go.opentelemetry.io/collector/exporter/otlphttpexporter to v0.99.0 (#10023) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/collector/exporter/otlphttpexporter](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.98.0` -> `v0.99.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.99.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.99.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.98.0/v0.99.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.98.0/v0.99.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/exporter/otlphttpexporter) ### [`v0.99.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v160v0990) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.98.0...v0.99.0) ##### 🛑 Breaking changes 🛑 - `builder`: Add strict version checking when using the builder. Add the temporary flag ` --skip-strict-versioning `for skipping this check. ([#​9896](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9896)) Strict version checking will error on major and minor version mismatches between the `otelcol_version` configured and the builder version or versions in the go.mod. This check can be temporarily disabled by using the `--skip-strict-versioning` flag. This flag will be removed in a future minor version. - `telemetry`: Distributed internal metrics across different levels. ([#​7890](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7890)) The internal metrics levels are updated along with reported metrics: - The default level is changed from `basic` to `normal`, which can be overridden with `service::telmetry::metrics::level` configuration. - Batch processor metrics are updated to be reported starting from `normal` level: - `processor_batch_batch_send_size` - `processor_batch_metadata_cardinality` - `processor_batch_timeout_trigger_send` - `processor_batch_size_trigger_send` - GRPC/HTTP server and client metrics are updated to be reported starting from `detailed` level: - http.client.\* metrics - http.server.\* metrics - rpc.server.\* metrics - rpc.client.\* metrics ##### 💡 Enhancements 💡 - `confighttp`: Disable concurrency in zstd compression ([#​8216](https://togithub.com/open-telemetry/opentelemetry-collector/issues/8216)) - `cmd/builder`: Allow configuring `confmap.Provider`s in the builder. ([#​4759](https://togithub.com/open-telemetry/opentelemetry-collector/issues/4759)) If no providers are specified, the defaults are used. The default providers are: env, file, http, https, and yaml. To configure providers, use the `providers` key in your OCB build manifest with a list of Go modules for your providers. The modules will work the same as other Collector components. - `mdatagen`: enable goleak tests by default via mdatagen ([#​9959](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9959)) - `cmd/mdatagen`: support excluding some metrics based on string and regexes in resource_attributes ([#​9661](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9661)) - `cmd/mdatagen`: Generate config and factory tests covering their requirements. ([#​9940](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9940)) The tests are moved from cmd/builder. - `confmap`: Add `ProviderSettings`, `ConverterSettings`, `ProviderFactories`, and `ConverterFactories` fields to `confmap.ResolverSettings` ([#​9516](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9516)) This allows configuring providers and converters, which are instantiated by `NewResolver` using the given factories. ##### 🧰 Bug fixes 🧰 - `exporter/otlp`: Allow DNS scheme to be used in endpoint ([#​4274](https://togithub.com/open-telemetry/opentelemetry-collector/issues/4274)) - `service`: fix record sampler configuration ([#​9968](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9968)) - `service`: ensure the tracer provider is configured via go.opentelemetry.io/contrib/config ([#​9967](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9967)) - `otlphttpexporter`: Fixes a bug that was preventing the otlp http exporter from propagating status. ([#​9892](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9892)) - `confmap`: Fix decoding negative configuration values into uints ([#​9060](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9060))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update module github.com/prometheus/common to v0.53.0 (#10021) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/prometheus/common](https://togithub.com/prometheus/common) | `v0.52.3` -> `v0.53.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fcommon/v0.53.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fcommon/v0.53.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fcommon/v0.52.3/v0.53.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fcommon/v0.52.3/v0.53.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
prometheus/common (github.com/prometheus/common) ### [`v0.53.0`](https://togithub.com/prometheus/common/releases/tag/v0.53.0) [Compare Source](https://togithub.com/prometheus/common/compare/v0.52.3...v0.53.0) #### What's Changed - Add StatusAt method for Alert struct by [@​grobinson-grafana](https://togithub.com/grobinson-grafana) in [https://github.com/prometheus/common/pull/618](https://togithub.com/prometheus/common/pull/618) - config: allow exposing real secret value through marshal by [@​GiedriusS](https://togithub.com/GiedriusS) in [https://github.com/prometheus/common/pull/487](https://togithub.com/prometheus/common/pull/487) - Fix up config test by [@​SuperQ](https://togithub.com/SuperQ) in [https://github.com/prometheus/common/pull/621](https://togithub.com/prometheus/common/pull/621) - LabelSet.String: restore faster sort call by [@​bboreham](https://togithub.com/bboreham) in [https://github.com/prometheus/common/pull/619](https://togithub.com/prometheus/common/pull/619) - LabelSet: add unit test for String method by [@​bboreham](https://togithub.com/bboreham) in [https://github.com/prometheus/common/pull/620](https://togithub.com/prometheus/common/pull/620) #### New Contributors - [@​grobinson-grafana](https://togithub.com/grobinson-grafana) made their first contribution in [https://github.com/prometheus/common/pull/618](https://togithub.com/prometheus/common/pull/618) - [@​GiedriusS](https://togithub.com/GiedriusS) made their first contribution in [https://github.com/prometheus/common/pull/487](https://togithub.com/prometheus/common/pull/487) **Full Changelog**: https://github.com/prometheus/common/compare/v0.52.3...v0.53.0
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [builder] remove ambigious import codepath (#10015) This code was added to handled an ambiguous import caused by a dependency that has been updated since v0.98.0. --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * chore: fix function names in comment (#10027) fix function names in comment Signed-off-by: dockercui Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Support parsing metric.metadata from OTLP JSON (#10026) Follow-up to https://github.com/open-telemetry/opentelemetry-collector/pull/10006, which added metric.metadata to pmetric. I forgot to add support for parsing the field from JSON in that PR. This PR adds the missing support. #### Testing Unit tests * Added default funcs for configgrpc (#9969) Description: Added newDefault methods for structs in configgrpc package Closes https://github.com/open-telemetry/opentelemetry-collector/issues/9654 Testing: Tests were added for the NewDefault functions --------- Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [mdatagen] move telemetry into its own file (#10037) This is in preparation for using mdatagen for component telemetry. --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore] Remove GO111MODULE references (#10039) This has been set to `on` by default since Go 1.16: https://go.dev/doc/go1.16#go-command. Co-authored-by: Evan Bradley * chore(deps): update github-actions deps (#10044) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/checkout](https://togithub.com/actions/checkout) | action | patch | `v4.1.3` -> `v4.1.4` | | [github/codeql-action](https://togithub.com/github/codeql-action) | action | patch | `v3.25.2` -> `v3.25.3` | --- ### Release Notes
actions/checkout (actions/checkout) ### [`v4.1.4`](https://togithub.com/actions/checkout/blob/HEAD/CHANGELOG.md#v414) [Compare Source](https://togithub.com/actions/checkout/compare/v4.1.3...v4.1.4) - Disable `extensions.worktreeConfig` when disabling `sparse-checkout` by [@​jww3](https://togithub.com/jww3) in [https://github.com/actions/checkout/pull/1692](https://togithub.com/actions/checkout/pull/1692) - Add dependabot config by [@​cory-miller](https://togithub.com/cory-miller) in [https://github.com/actions/checkout/pull/1688](https://togithub.com/actions/checkout/pull/1688) - Bump the minor-actions-dependencies group with 2 updates by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/actions/checkout/pull/1693](https://togithub.com/actions/checkout/pull/1693) - Bump word-wrap from 1.2.3 to 1.2.5 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/actions/checkout/pull/1643](https://togithub.com/actions/checkout/pull/1643)
github/codeql-action (github/codeql-action) ### [`v3.25.3`](https://togithub.com/github/codeql-action/compare/v3.25.2...v3.25.3) [Compare Source](https://togithub.com/github/codeql-action/compare/v3.25.2...v3.25.3)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module go.opentelemetry.io/contrib/propagators/b3 to v1.26.0 (#10049) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/contrib/propagators/b3](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | `v1.25.0` -> `v1.26.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcontrib%2fpropagators%2fb3/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcontrib%2fpropagators%2fb3/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcontrib%2fpropagators%2fb3/v1.25.0/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcontrib%2fpropagators%2fb3/v1.25.0/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-go-contrib (go.opentelemetry.io/contrib/propagators/b3) ### [`v1.26.0`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v1.26.0): /v0.51.0/v0.20.0/v0.6.0/v0.1.0 [Compare Source](https://togithub.com/open-telemetry/opentelemetry-go-contrib/compare/v1.25.0...v1.26.0) ##### Added - `NewSDK` in `go.opentelemetry.io/contrib/config` now returns a configured SDK with a valid `MeterProvider`. ([#​4804](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/4804)) ##### Changed - Change the scope name for the prometheus bridge to `go.opentelemetry.io/contrib/bridges/prometheus` to match the package. ([#​5396](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/5396)) ##### Fixed - Fix bug where an empty exemplar was added to counters in `go.opentelemetry.io/contrib/bridges/prometheus`. ([#​5395](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/5395)) - Fix bug where the last histogram bucket was missing in `go.opentelemetry.io/contrib/bridges/prometheus`. ([#​5395](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/5395)) **Full Changelog**: https://github.com/open-telemetry/opentelemetry-go-contrib/compare/v1.25.0...v1.26.0
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * fix(deps): update module go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc to v0.51.0 (#10047) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | `v0.50.0` -> `v0.51.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fgoogle.golang.org%2fgrpc%2fotelgrpc/v0.51.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fgoogle.golang.org%2fgrpc%2fotelgrpc/v0.51.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fgoogle.golang.org%2fgrpc%2fotelgrpc/v0.50.0/v0.51.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fgoogle.golang.org%2fgrpc%2fotelgrpc/v0.50.0/v0.51.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * fix(deps): update module google.golang.org/protobuf to v1.34.0 (#10051) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google.golang.org/protobuf](https://togithub.com/protocolbuffers/protobuf-go) | `v1.33.0` -> `v1.34.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/google.golang.org%2fprotobuf/v1.34.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/google.golang.org%2fprotobuf/v1.34.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/google.golang.org%2fprotobuf/v1.33.0/v1.34.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/google.golang.org%2fprotobuf/v1.33.0/v1.34.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
protocolbuffers/protobuf-go (google.golang.org/protobuf) ### [`v1.34.0`](https://togithub.com/protocolbuffers/protobuf-go/compare/v1.33.0...v1.34.0) [Compare Source](https://togithub.com/protocolbuffers/protobuf-go/compare/v1.33.0...v1.34.0)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [chore] group contrib packages (#10053) This follows the monorepo preset pattern here: https://docs.renovatebot.com/presets-monorepo/#monorepoopentelemetry-go Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * fix(deps): update opentelemetry-go monorepo (#10052) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/otel](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.25.0` -> `v1.26.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel/v1.25.0/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel/v1.25.0/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/bridge/opencensus](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.25.0` -> `v1.26.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fbridge%2fopencensus/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fbridge%2fopencensus/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fbridge%2fopencensus/v1.25.0/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fbridge%2fopencensus/v1.25.0/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.25.0` -> `v1.26.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetricgrpc/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetricgrpc/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetricgrpc/v1.25.0/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetricgrpc/v1.25.0/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.25.0` -> `v1.26.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetrichttp/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetrichttp/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetrichttp/v1.25.0/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetrichttp/v1.25.0/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/prometheus](https://togithub.com/open-telemetry/opentelemetry-go) | `v0.47.0` -> `v0.48.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fprometheus/v0.48.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fprometheus/v0.48.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fprometheus/v0.47.0/v0.48.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fprometheus/v0.47.0/v0.48.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/stdout/stdoutmetric](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.25.0` -> `v1.26.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdoutmetric/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdoutmetric/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdoutmetric/v1.25.0/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdoutmetric/v1.25.0/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/metric](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.25.0` -> `v1.26.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fmetric/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fmetric/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fmetric/v1.25.0/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fmetric/v1.25.0/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/sdk](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.25.0` -> `v1.26.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fsdk/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fsdk/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fsdk/v1.25.0/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fsdk/v1.25.0/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/sdk/metric](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.25.0` -> `v1.26.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fsdk%2fmetric/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fsdk%2fmetric/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fsdk%2fmetric/v1.25.0/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fsdk%2fmetric/v1.25.0/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/trace](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.25.0` -> `v1.26.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2ftrace/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2ftrace/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2ftrace/v1.25.0/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2ftrace/v1.25.0/v1.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-go (go.opentelemetry.io/otel) ### [`v1.26.0`](https://togithub.com/open-telemetry/opentelemetry-go/releases/tag/v1.26.0): /v0.48.0/v0.2.0-alpha [Compare Source](https://togithub.com/open-telemetry/opentelemetry-go/compare/v1.25.0...v1.26.0) ##### Added - Add `Recorder` in `go.opentelemetry.io/otel/log/logtest` to facilitate testing the log bridge implementations. ([#​5134](https://togithub.com/open-telemetry/opentelemetry-go/issues/5134)) - Add span flags to OTLP spans and links exported by `go.opentelemetry.io/otel/exporters/otlp/otlptrace`. ([#​5194](https://togithub.com/open-telemetry/opentelemetry-go/issues/5194)) - Make the initial alpha release of `go.opentelemetry.io/otel/sdk/log`. This new module contains the Go implementation of the OpenTelemetry Logs SDK. This module is unstable and breaking changes may be introduced. See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. ([#​5240](https://togithub.com/open-telemetry/opentelemetry-go/issues/5240)) - Make the initial alpha release of `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. This new module contains an OTLP exporter that transmits log telemetry using HTTP. This module is unstable and breaking changes may be introduced. See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. ([#​5240](https://togithub.com/open-telemetry/opentelemetry-go/issues/5240)) - Make the initial alpha release of `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`. This new module contains an exporter prints log records to STDOUT. This module is unstable and breaking changes may be introduced. See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. ([#​5240](https://togithub.com/open-telemetry/opentelemetry-go/issues/5240)) - The `go.opentelemetry.io/otel/semconv/v1.25.0` package. The package contains semantic conventions from the `v1.25.0` version of the OpenTelemetry Semantic Conventions. ([#​5254](https://togithub.com/open-telemetry/opentelemetry-go/issues/5254)) ##### Changed - Update `go.opentelemetry.io/proto/otlp` from v1.1.0 to v1.2.0. ([#​5177](https://togithub.com/open-telemetry/opentelemetry-go/issues/5177)) - Improve performance of baggage member character validation in `go.opentelemetry.io/otel/baggage`. ([#​5214](https://togithub.com/open-telemetry/opentelemetry-go/issues/5214)) **Full Changelog**: https://github.com/open-telemetry/opentelemetry-go/compare/v1.25.0...v1.26.0
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [docs/rfc] RFC about environment variables (#9854) **Description:** Adds an RFC about how environment variable resolution should work **Link to tracking Issue:** Fixes #9515, relates to: - #8215 - #8565 - #9162 - #9531 - #9532 --------- Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com> * fix(deps): update all opentelemetry-go-contrib packages (#10055) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/contrib/config](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | `v0.5.0` -> `v0.6.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcontrib%2fconfig/v0.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcontrib%2fconfig/v0.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcontrib%2fconfig/v0.5.0/v0.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcontrib%2fconfig/v0.5.0/v0.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | `v0.50.0` -> `v0.51.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fnet%2fhttp%2fotelhttp/v0.51.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fnet%2fhttp%2fotelhttp/v0.51.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fnet%2fhttp%2fotelhttp/v0.50.0/v0.51.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fnet%2fhttp%2fotelhttp/v0.50.0/v0.51.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/contrib/zpages](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | `v0.50.0` -> `v0.51.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcontrib%2fzpages/v0.51.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcontrib%2fzpages/v0.51.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcontrib%2fzpages/v0.50.0/v0.51.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcontrib%2fzpages/v0.50.0/v0.51.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-go-contrib (go.opentelemetry.io/contrib/config) ### [`v0.6.0`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v0.6.0) Initial Release. Compatibility with [the opentelemetry-go v0.6.0 release](https://togithub.com/open-telemetry/opentelemetry-go/releases/tag/v0.6.0) added for the following: - [exporters/metric/datadog](https://togithub.com/open-telemetry/opentelemetry-go-contrib/releases/tag/exporters%2Fmetric%2Fdatadog%2Fv0.6.0) - [exporters/metric/dogstatsd](https://togithub.com/open-telemetry/opentelemetry-go-contrib/releases/tag/exporters%2Fmetric%2Fdogstatsd%2Fv0.6.0) - [instrumentation/gin-gonic/gin](https://togithub.com/open-telemetry/opentelemetry-go-contrib/releases/tag/instrumentation%2Fgin-gonic%2Fgin%2Fv0.6.0) - [instrumentation/go.mongodb.org/mongo-driver](https://togithub.com/open-telemetry/opentelemetry-go-contrib/releases/tag/instrumentation%2Fgo.mongodb.org%2Fmongo-driver%2Fv0.6.0) - [instrumentation/gorilla/mux](https://togithub.com/open-telemetry/opentelemetry-go-contrib/releases/tag/instrumentation%2Fgorilla%2Fmux%2Fv0.6.0) - [instrumentation/labstack/echo](https://togithub.com/open-telemetry/opentelemetry-go-contrib/releases/tag/instrumentation%2Flabstack%2Fecho%2Fv0.6.0) - [instrumentation/macaron](https://togithub.com/open-telemetry/opentelemetry-go-contrib/releases/tag/instrumentation%2Fmacaron%2Fv0.6.0) - [instrumentation/runtime](https://togithub.com/open-telemetry/opentelemetry-go-contrib/releases/tag/instrumentation%2Fruntime%2Fv0.6.0)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [chore] only run unit tests for actuated on a single version (#10062) We do the same for the contrib repo. cc @atoulme Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore] Allow sometimes skipping deprecation process when adding variadic arguments (#10041) Call out that unnamed types, e.g. the function signature of an exported function, should not be relied upon by API consumers. In particular, updating a function to be variadic will break users who were depending on that function's signature. #### Link to tracking issue Helps https://github.com/open-telemetry/opentelemetry-collector/pull/9041 Co-authored-by: Evan Bradley Co-authored-by: Pablo Baeyens Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore] pin version of npm package (#10063) this addresses a security concern around the version of the package installed Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore] go version didn't match check (#10067) Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * add semantic convention v1.25.0 (#10075) Include attribute_group as requested. Fixes #10072 --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Documentation improvements - Comments in key functions (#10029) #### Documentation I wrote comments on a bunch of important functions that helped me understand how the collector works. I also created some other documentation in https://github.com/open-telemetry/opentelemetry-collector/pull/10068 - but split it up from this PR. * Allow receivers/processors to know when the queue is full (#10070) Marked as experimental as it is the Queue. --------- Signed-off-by: Bogdan Drutu Co-authored-by: Dmitrii Anoshin Co-authored-by: Yang Song * [builder] make retries configurable for faster tests (#10035) #### Description When running tests, waiting for `downloadModules()` to fail 3 times when that's expected adds time to the test run. This updates tests to only attempt downloading once. Note: if there's a network failure that could cause `downloadModules()` to fail when it should normally succeed. Also the wording here is `retries` when in actuality it's the number of attempts. I didn't change this to keep the log wording the same, but I can change the wording if that's preferable. #### Link to tracking issue this will help for adding tests for https://github.com/open-telemetry/opentelemetry-collector/issues/9252 and https://github.com/open-telemetry/opentelemetry-collector/issues/9896 #### Testing Tests ran --------- Co-authored-by: Pablo Baeyens * [exporterhelper] Fix `enabled` config option for batch sender (#10076) `enabled` config option for batch sender was ignored. This PR fixes it. * mdatagen: Call connectors with routers to be the same as the service graph (#10079) * [chore] remove multierr use in mdatagen (#10080) Use errors.Join instead. Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Revert pipeline type validation (#10078) #### Description This PR reverts the change made in https://github.com/open-telemetry/opentelemetry-collector/pull/9257 due to problems reported in https://github.com/open-telemetry/opentelemetry-collector/issues/10031. #### Link to tracking issue Fixes #10031. * [chore] [exporterhelper] Integrate capacity limiting into the communication channel (#9232) Integrate capacity limiting into internal channels used by both memory and persistent queues. Otherwise, with the independent capacity limiter, it's hard to ensure that queue size is always accurate going forward. Benchmarks before: ``` goos: darwin goarch: arm64 Benchmark_QueueUsage_1000_requests-10 3252 325010 ns/op 246059 B/op 10 allocs/op Benchmark_QueueUsage_100000_requests-10 39 29811116 ns/op 24002870 B/op 10 allocs/op Benchmark_QueueUsage_10000_items-10 3404 349753 ns/op 246052 B/op 10 allocs/op Benchmark_QueueUsage_1M_items-10 40 29415583 ns/op 24002858 B/op 10 allocs/op BenchmarkPersistentQueue_TraceSpans BenchmarkPersistentQueue_TraceSpans/#traces:_1_#spansPerTrace:_1-10 338180 3836 ns/op 2851 B/op 78 allocs/op BenchmarkPersistentQueue_TraceSpans/#traces:_1_#spansPerTrace:_10-10 81369 15822 ns/op 14598 B/op 289 allocs/op BenchmarkPersistentQueue_TraceSpans/#traces:_10_#spansPerTrace:_10-10 13066 90155 ns/op 130087 B/op 2417 allocs/op ``` Benchmarks after: ``` Benchmark_QueueUsage_1000_requests-10 4210 278175 ns/op 246055 B/op 10 allocs/op Benchmark_QueueUsage_100000_requests-10 42 25835945 ns/op 24002968 B/op 10 allocs/op Benchmark_QueueUsage_10000_items-10 4376 279571 ns/op 246056 B/op 10 allocs/op Benchmark_QueueUsage_1M_items-10 42 26483907 ns/op 24002995 B/op 10 allocs/op BenchmarkPersistentQueue_TraceSpans BenchmarkPersistentQueue_TraceSpans/#traces:_1_#spansPerTrace:_1-10 328268 4251 ns/op 2854 B/op 78 allocs/op BenchmarkPersistentQueue_TraceSpans/#traces:_1_#spansPerTrace:_10-10 101683 12238 ns/op 14582 B/op 289 allocs/op BenchmarkPersistentQueue_TraceSpans/#traces:_10_#spansPerTrace:_10-10 13382 86464 ns/op 130154 B/op 2417 allocs/op ``` * [chore] fix import orders in mdatagen templates (#10081) Signed-off-by: Bogdan Drutu * [otelcol] rfc for how to log during startup (#10066) #### Description This is an RFC to help us decide how we want `otelcol` to provide a logger before the primary logger is created. As we discuss I will update the doc. Before this is merged we should have decided on a solution and the Accepted Solution section must be updated. Related to https://github.com/open-telemetry/opentelemetry-collector/pull/10056 #### Link to tracking issue This unblocks: - https://github.com/open-telemetry/opentelemetry-collector/issues/9162 - https://github.com/open-telemetry/opentelemetry-collector/issues/5615 --------- Co-authored-by: Pablo Baeyens Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com> * [chore] remove duplicate code from the connector (#10082) Signed-off-by: Bogdan Drutu Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore] try to fix coverage step (#10085) It's unclear why the retry action is failing to pass in the secret, trying to standard codecov action with a token as per codecov documentation. --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore] Prepare release v1.7.0/v0.100.0 (#10087) The following commands were run to prepare this release: - make chlog-update VERSION=v1.7.0/v0.100.0 - make prepare-release PREVIOUS_VERSION=1.6.0 RELEASE_CANDIDATE=1.7.0 MODSET=stable - make prepare-release PREVIOUS_VERSION=0.99.0 RELEASE_CANDIDATE=0.100.0 MODSET=beta --------- Co-authored-by: Bogdan Drutu * Fix ratelimit tests * Apply changes in diff from upstream * Fix unused parameters (linter) * Fix import spacing (linting) * gotidy for changed mod --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> Signed-off-by: Ziqi Zhao Signed-off-by: Bogdan Drutu Signed-off-by: Juraci Paixão Kröhling Signed-off-by: dockercui Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Co-authored-by: Dmitrii Anoshin Co-authored-by: Pablo Baeyens Co-authored-by: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Paulo Janotti Co-authored-by: Sanket Teli <104385297+Sanket-0510@users.noreply.github.com> Co-authored-by: Pablo Baeyens Co-authored-by: Antoine Toulme Co-authored-by: molejnik88 Co-authored-by: Ziqi Zhao Co-authored-by: Carson Ip Co-authored-by: Curtis Robert Co-authored-by: David Ashpole Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com> Co-authored-by: Andrey Babushkin Co-authored-by: Antoine Toulme Co-authored-by: KIMBOH LOVETTE <37558983+Kimbohlovette@users.noreply.github.com> Co-authored-by: Joshua Jones Co-authored-by: Bogdan Drutu Co-authored-by: Daniel Jaglowski Co-authored-by: Tomás Mota Co-authored-by: Andrzej Stencel Co-authored-by: Ben Mask Co-authored-by: Lavish Pal Co-authored-by: Akhigbe Eromosele David Co-authored-by: Ankit Patel <8731662+ankitpatel96@users.noreply.github.com> Co-authored-by: Shaunak Kashyap Co-authored-by: Povilas Versockas Co-authored-by: Raj Nishtala <113392743+rnishtala-sumo@users.noreply.github.com> Co-authored-by: Kristina Pathak Co-authored-by: Evan Bradley Co-authored-by: Jacob Aronoff Co-authored-by: Juraci Paixão Kröhling Co-authored-by: dockercui <167661769+dockercui@users.noreply.github.com> Co-authored-by: Yang Song Co-authored-by: Kristina Pathak --- .chloggen/use-sync/atomic.yaml | 16 - .github/ISSUE_TEMPLATE/feature_request.md | 8 +- .github/ISSUE_TEMPLATE/release.md | 3 +- .github/pull_request_template.md | 21 +- .github/workflows/api-compatibility.yml | 4 +- .github/workflows/build-and-test-windows.yaml | 43 +- .github/workflows/build-and-test.yml | 78 +- .../workflows/builder-integration-test.yaml | 2 +- .github/workflows/builder-release.yaml | 2 +- .github/workflows/changelog.yml | 4 +- .github/workflows/check-links.yaml | 6 +- .github/workflows/check_links_config.json | 3 + .github/workflows/codeql-analysis.yml | 8 +- .github/workflows/contrib-tests.yml | 2 +- .../generate-semantic-conventions-pr.yaml | 6 +- .github/workflows/perf.yml | 2 +- .github/workflows/prepare-release.yml | 10 +- .github/workflows/scorecard.yml | 6 +- .github/workflows/shellcheck.yml | 2 +- .github/workflows/tidy-dependencies.yml | 6 +- CHANGELOG-API.md | 80 + CHANGELOG.md | 130 + CONTRIBUTING.md | 22 +- Makefile | 11 +- Makefile.Common | 3 +- README.md | 10 +- client/client.go | 17 +- cmd/builder/Makefile | 2 +- cmd/builder/README.md | 37 +- cmd/builder/go.mod | 5 +- cmd/builder/go.sum | 10 +- cmd/builder/internal/builder/config.go | 104 +- cmd/builder/internal/builder/config_test.go | 83 +- cmd/builder/internal/builder/main.go | 147 +- cmd/builder/internal/builder/main_test.go | 312 +- cmd/builder/internal/builder/templates.go | 4 - .../builder/templates/components_test.go.tmpl | 39 - .../internal/builder/templates/go.mod.tmpl | 6 + .../internal/builder/templates/main.go.tmpl | 28 +- cmd/builder/internal/command.go | 8 +- cmd/builder/internal/command_test.go | 43 +- cmd/builder/internal/config/default.yaml | 35 +- cmd/builder/test/core.builder.yaml | 9 +- cmd/mdatagen/doc.go | 7 - cmd/mdatagen/embeded_templates_test.go | 3 + cmd/mdatagen/go.mod | 56 +- cmd/mdatagen/go.sum | 68 +- .../internal/metadata/generated_status.go | 29 - .../internal/metadata/testdata/config.yaml | 55 - .../internal/samplereceiver/README.md | 22 + cmd/mdatagen/internal/samplereceiver/doc.go | 10 + .../samplereceiver}/documentation.md | 20 +- .../internal/samplereceiver/factory.go | 42 + .../generated_component_test.go | 85 + .../samplereceiver/generated_package_test.go | 5 +- .../internal}/metadata/generated_config.go | 22 +- .../metadata/generated_config_test.go | 2 + .../internal}/metadata/generated_metrics.go | 141 +- .../metadata/generated_metrics_test.go | 90 +- .../internal}/metadata/generated_resource.go | 0 .../metadata/generated_resource_test.go | 0 .../internal/metadata/generated_status.go | 17 + .../internal/metadata/generated_telemetry.go | 18 + .../metadata/generated_telemetry_test.go | 63 + .../internal/metadata/testdata/config.yaml | 127 + .../samplereceiver/metadata.yaml} | 21 +- .../internal/samplereceiver/metrics_test.go | 20 + cmd/mdatagen/lint_test.go | 2 +- cmd/mdatagen/loader.go | 68 +- cmd/mdatagen/loader_test.go | 41 +- cmd/mdatagen/main.go | 30 +- cmd/mdatagen/main_test.go | 224 +- cmd/mdatagen/metadata-schema.yaml | 14 + cmd/mdatagen/metricdata.go | 4 +- .../mdatagen}/package_test.go | 2 +- cmd/mdatagen/statusdata.go | 60 +- cmd/mdatagen/templates/component_test.go.tmpl | 205 +- cmd/mdatagen/templates/config.go.tmpl | 19 +- cmd/mdatagen/templates/metrics.go.tmpl | 35 +- cmd/mdatagen/templates/metrics_test.go.tmpl | 57 +- cmd/mdatagen/templates/package_test.go.tmpl | 25 + cmd/mdatagen/templates/readme.md.tmpl | 9 +- cmd/mdatagen/templates/status.go.tmpl | 15 +- cmd/mdatagen/templates/telemetry.go.tmpl | 17 + cmd/mdatagen/templates/telemetry_test.go.tmpl | 63 + .../templates/testdata/config.yaml.tmpl | 22 + cmd/mdatagen/testdata/metrics_and_type.yaml | 4 + .../testdata/resource_attributes_only.yaml | 4 + cmd/mdatagen/testdata/status_only.yaml | 4 + .../testdata/with_goleak_ignores.yaml | 14 + cmd/mdatagen/testdata/with_goleak_setup.yaml | 10 + cmd/mdatagen/testdata/with_goleak_skip.yaml | 10 + .../testdata/with_goleak_teardown.yaml | 10 + .../testdata/with_tests_connector.yaml | 3 - .../testdata/with_tests_exporter.yaml | 3 - .../testdata/with_tests_extension.yaml | 3 - .../testdata/with_tests_processor.yaml | 3 - .../testdata/with_tests_receiver.yaml | 3 - cmd/mdatagen/validate.go | 59 +- cmd/mdatagen/validate_test.go | 4 +- cmd/otelcorecol/builder-config.yaml | 38 +- cmd/otelcorecol/components.go | 4 + cmd/otelcorecol/components_test.go | 41 - cmd/otelcorecol/go.mod | 169 +- cmd/otelcorecol/go.sum | 173 +- cmd/otelcorecol/main.go | 30 +- cmd/otelcorecol/package_test.go | 5 +- component/component.go | 6 - component/componenttest/nop_host_test.go | 1 - .../componenttest/otelprometheuschecker.go | 2 +- component/config.go | 31 +- component/config_test.go | 32 +- component/doc.go | 2 +- component/go.mod | 37 +- component/go.sum | 66 +- component/host.go | 20 - component/telemetry.go | 2 +- config/configauth/configauth.go | 5 + config/configauth/configauth_test.go | 6 + config/configauth/go.mod | 33 +- config/configauth/go.sum | 66 +- config/configcompression/compressiontype.go | 20 +- config/configcompression/go.mod | 2 +- config/configcompression/go.sum | 4 +- config/configgrpc/configgrpc.go | 74 +- .../configgrpc/configgrpc_benchmark_test.go | 2 +- config/configgrpc/configgrpc_test.go | 135 +- config/configgrpc/go.mod | 65 +- config/configgrpc/go.sum | 82 +- config/configgrpc/package_test.go | 5 +- config/confighttp/README.md | 2 +- config/confighttp/compression_test.go | 3 +- config/confighttp/compressor.go | 7 +- config/confighttp/compressor_test.go | 96 + config/confighttp/confighttp.go | 59 +- config/confighttp/confighttp_test.go | 89 +- config/confighttp/go.mod | 63 +- config/confighttp/go.sum | 74 +- config/confighttp/ratelimit_test.go | 25 +- config/confignet/confignet.go | 97 +- config/confignet/confignet_test.go | 50 +- config/confignet/go.mod | 2 +- config/confignet/go.sum | 4 +- config/configopaque/go.mod | 7 +- config/configopaque/go.sum | 10 +- config/configretry/go.mod | 4 +- config/configretry/go.sum | 8 +- config/configtelemetry/go.mod | 2 +- config/configtelemetry/go.sum | 4 +- config/configtls/configtls.go | 85 +- config/configtls/configtls_test.go | 176 +- config/configtls/go.mod | 4 +- config/configtls/go.sum | 10 +- config/internal/go.mod | 8 +- config/internal/go.sum | 4 +- config/internal/warning.go | 2 +- confmap/confmap.go | 108 +- confmap/confmap_test.go | 335 +- confmap/confmaptest/provider_settings.go | 14 + confmap/converter.go | 13 +- confmap/converter/expandconverter/expand.go | 48 +- .../converter/expandconverter/expand_test.go | 105 +- confmap/converter/expandconverter/go.mod | 7 +- confmap/converter/expandconverter/go.sum | 10 +- confmap/doc_test.go | 97 + confmap/expand_test.go | 22 +- confmap/go.mod | 6 +- confmap/go.sum | 11 +- confmap/provider.go | 23 +- confmap/provider/envprovider/go.mod | 7 +- confmap/provider/envprovider/go.sum | 10 +- confmap/provider/envprovider/provider.go | 30 +- confmap/provider/envprovider/provider_test.go | 83 +- confmap/provider/fileprovider/go.mod | 7 +- confmap/provider/fileprovider/go.sum | 10 +- confmap/provider/fileprovider/provider.go | 11 +- .../provider/fileprovider/provider_test.go | 18 +- confmap/provider/httpprovider/go.mod | 7 +- confmap/provider/httpprovider/go.sum | 10 +- confmap/provider/httpprovider/provider.go | 9 +- .../provider/httpprovider/provider_test.go | 4 +- confmap/provider/httpsprovider/go.mod | 7 +- confmap/provider/httpsprovider/go.sum | 10 +- confmap/provider/httpsprovider/provider.go | 11 +- .../provider/httpsprovider/provider_test.go | 4 +- .../configurablehttpprovider/provider_test.go | 22 +- confmap/provider/yamlprovider/go.mod | 7 +- confmap/provider/yamlprovider/go.sum | 10 +- confmap/provider/yamlprovider/provider.go | 9 +- .../provider/yamlprovider/provider_test.go | 23 +- confmap/resolver.go | 70 +- confmap/resolver_test.go | 150 +- connector/connectortest/connector.go | 4 +- .../generated_component_test.go | 88 + ...kage_test.go => generated_package_test.go} | 3 +- connector/forwardconnector/go.mod | 48 +- connector/forwardconnector/go.sum | 68 +- .../internal/metadata/generated_status.go | 14 +- .../internal/metadata/generated_telemetry.go | 18 + .../metadata/generated_telemetry_test.go | 63 + connector/go.mod | 47 +- connector/go.sum | 68 +- connector/logs_router.go | 16 +- connector/logs_router_test.go | 2 +- connector/metrics_router.go | 45 +- connector/metrics_router_test.go | 2 +- connector/router.go | 55 + connector/traces_router.go | 49 +- connector/traces_router_test.go | 2 +- consumer/consumererror/signalerrors_test.go | 2 +- consumer/consumertest/sink_test.go | 2 +- consumer/go.mod | 29 +- consumer/go.sum | 30 +- docs/design.md | 205 - docs/ga-roadmap.md | 216 +- docs/images/design-collector-agent.png | Bin 98922 -> 0 bytes docs/images/design-collector-service.png | Bin 109843 -> 0 bytes docs/images/design-exporters.png | Bin 36684 -> 0 bytes docs/images/design-pipelines.png | Bin 19661 -> 0 bytes docs/images/design-processors.png | Bin 46883 -> 0 bytes docs/images/design-receivers.png | Bin 47509 -> 0 bytes ...pentelemetry-service-deployment-models.png | Bin 78430 -> 0 bytes docs/images/zpages-example.png | Bin 373980 -> 0 bytes docs/platform-support.md | 5 +- docs/release.md | 24 +- docs/rfcs/README.md | 10 + docs/rfcs/env-vars.md | 222 + docs/rfcs/logging-before-config-resolution.md | 66 + docs/{ => rfcs}/processing.md | 0 docs/security-best-practices.md | 5 +- examples/k8s/otel-config.yaml | 2 +- exporter/debugexporter/exporter.go | 87 + exporter/debugexporter/factory.go | 58 +- .../debugexporter/generated_component_test.go | 151 + ...kage_test.go => generated_package_test.go} | 3 +- exporter/debugexporter/go.mod | 58 +- exporter/debugexporter/go.sum | 72 +- .../internal/metadata/generated_status.go | 14 +- .../internal/metadata/generated_telemetry.go | 18 + .../metadata/generated_telemetry_test.go | 63 + exporter/exporterbatcher/batch_func.go | 24 + exporter/exporterbatcher/config.go | 70 + exporter/exporterbatcher/config_test.go | 30 + exporter/exporterhelper/README.md | 32 +- exporter/exporterhelper/batch_sender.go | 223 + exporter/exporterhelper/batch_sender_test.go | 448 ++ exporter/exporterhelper/common.go | 131 +- exporter/exporterhelper/common_test.go | 19 +- exporter/exporterhelper/logs.go | 9 +- exporter/exporterhelper/logs_batch.go | 137 + exporter/exporterhelper/logs_batch_test.go | 159 + exporter/exporterhelper/logs_test.go | 2 +- exporter/exporterhelper/metrics.go | 9 +- exporter/exporterhelper/metrics_batch.go | 236 + exporter/exporterhelper/metrics_batch_test.go | 166 + exporter/exporterhelper/metrics_test.go | 2 +- exporter/exporterhelper/obsexporter.go | 20 +- exporter/exporterhelper/queue_sender.go | 6 +- exporter/exporterhelper/request.go | 6 +- exporter/exporterhelper/request_test.go | 108 +- exporter/exporterhelper/retry_sender_test.go | 2 +- exporter/exporterhelper/traces.go | 9 +- exporter/exporterhelper/traces_batch.go | 139 + exporter/exporterhelper/traces_batch_test.go | 159 + exporter/exporterhelper/traces_test.go | 2 +- exporter/exporterqueue/config.go | 6 +- exporter/exporterqueue/queue.go | 23 +- exporter/exportertest/nop_exporter.go | 4 +- exporter/go.mod | 55 +- exporter/go.sum | 72 +- exporter/internal/common/logging_exporter.go | 4 + .../internal/common/logging_exporter_test.go | 2 +- exporter/internal/otlptext/logs_test.go | 2 +- exporter/internal/otlptext/metrics_test.go | 2 +- exporter/internal/otlptext/traces_test.go | 2 +- .../internal/queue/bounded_memory_queue.go | 23 +- .../queue/bounded_memory_queue_test.go | 10 +- exporter/internal/queue/persistent_queue.go | 204 +- .../internal/queue/persistent_queue_test.go | 124 +- exporter/internal/queue/queue.go | 23 + exporter/internal/queue/queue_capacity.go | 74 - .../internal/queue/queue_capacity_test.go | 58 - exporter/internal/queue/sized_channel.go | 104 + exporter/internal/queue/sized_channel_test.go | 44 + .../generated_component_test.go | 151 + ...kage_test.go => generated_package_test.go} | 3 +- exporter/loggingexporter/go.mod | 56 +- exporter/loggingexporter/go.sum | 72 +- .../internal/metadata/generated_status.go | 14 +- .../internal/metadata/generated_telemetry.go | 18 + .../metadata/generated_telemetry_test.go | 63 + exporter/nopexporter/Makefile | 1 + exporter/nopexporter/README.md | 27 + exporter/nopexporter/doc.go | 7 + .../nopexporter/generated_component_test.go | 151 + .../nopexporter/generated_package_test.go | 5 +- exporter/nopexporter/go.mod | 80 + exporter/nopexporter/go.sum | 124 + .../internal/metadata/generated_status.go | 17 + .../internal/metadata/generated_telemetry.go | 18 + .../metadata/generated_telemetry_test.go | 63 + exporter/nopexporter/metadata.yaml | 7 + exporter/nopexporter/nop_exporter.go | 46 + exporter/nopexporter/nop_exporter_test.go | 45 + exporter/otlpexporter/config.go | 30 +- exporter/otlpexporter/config_test.go | 25 +- exporter/otlpexporter/factory_test.go | 4 +- .../otlpexporter/generated_component_test.go | 151 + .../otlpexporter/generated_package_test.go | 13 + exporter/otlpexporter/go.mod | 96 +- exporter/otlpexporter/go.sum | 134 +- .../internal/metadata/generated_status.go | 14 +- .../internal/metadata/generated_telemetry.go | 18 + .../metadata/generated_telemetry_test.go | 63 + exporter/otlpexporter/metadata.yaml | 4 + exporter/otlpexporter/otlp_test.go | 2 +- .../testdata/invalid_configs.yaml | 48 + exporter/otlphttpexporter/config_test.go | 2 +- exporter/otlphttpexporter/factory_test.go | 4 +- .../generated_component_test.go | 151 + ...kage_test.go => generated_package_test.go} | 3 +- exporter/otlphttpexporter/go.mod | 95 +- exporter/otlphttpexporter/go.sum | 126 +- .../internal/metadata/generated_status.go | 14 +- .../internal/metadata/generated_telemetry.go | 18 + .../metadata/generated_telemetry_test.go | 63 + exporter/otlphttpexporter/metadata.yaml | 5 + exporter/otlphttpexporter/otlp.go | 20 +- exporter/otlphttpexporter/otlp_test.go | 340 +- extension/auth/go.mod | 41 +- extension/auth/go.sum | 66 +- .../generated_component_test.go | 51 + ...kage_test.go => generated_package_test.go} | 3 +- extension/ballastextension/go.mod | 50 +- extension/ballastextension/go.sum | 78 +- .../internal/metadata/generated_status.go | 14 +- .../internal/metadata/generated_telemetry.go | 18 + .../metadata/generated_telemetry_test.go | 63 + extension/extensiontest/nop_extension.go | 4 +- extension/go.mod | 40 +- extension/go.sum | 68 +- .../generated_component_test.go | 45 + .../generated_package_test.go | 13 + extension/memorylimiterextension/go.mod | 51 +- extension/memorylimiterextension/go.sum | 78 +- .../internal/metadata/generated_status.go | 14 +- .../internal/metadata/generated_telemetry.go | 18 + .../metadata/generated_telemetry_test.go | 63 + .../memorylimiterextension/metadata.yaml | 8 + .../generated_component_test.go | 51 + ...kage_test.go => generated_package_test.go} | 3 +- extension/zpagesextension/go.mod | 71 +- extension/zpagesextension/go.sum | 122 +- .../internal/metadata/generated_status.go | 14 +- .../internal/metadata/generated_telemetry.go | 18 + .../metadata/generated_telemetry_test.go | 63 + featuregate/go.mod | 2 +- featuregate/go.sum | 4 +- filter/Makefile | 1 + filter/config.go | 72 + filter/config_test.go | 113 + filter/doc.go | 5 + filter/filter.go | 11 + filter/go.mod | 24 + filter/go.sum | 28 + filter/testdata/config.yaml | 8 + filter/testdata/config_invalid.yaml | 12 + go.mod | 71 +- go.sum | 126 +- internal/e2e/go.mod | 108 +- internal/e2e/go.sum | 142 +- internal/e2e/otlphttp_test.go | 2 +- internal/fanoutconsumer/logs_test.go | 2 +- internal/fanoutconsumer/metrics_test.go | 2 +- internal/fanoutconsumer/traces_test.go | 2 +- internal/httphelper/helper.go | 36 + internal/httphelper/helper_test.go | 83 + internal/localhostgate/featuregate.go | 8 +- internal/localhostgate/featuregate_test.go | 2 +- internal/memorylimiter/config_test.go | 10 + .../negative_unsigned_limits_config.yaml | 13 + .../obsmetrics/obs_exporter.go | 9 +- .../obsmetrics/obs_processor.go | 2 +- .../obsmetrics/obs_receiver.go | 9 +- .../obsreportconfig/obsmetrics/obs_scraper.go | 5 +- .../obsreportconfig/obsmetrics/obsmetrics.go | 5 +- internal/obsreportconfig/obsreportconfig.go | 8 - internal/tools/go.mod | 117 +- internal/tools/go.sum | 241 +- obsreport/doc.go | 105 - obsreport/obsreporttest/deprecated.go | 29 - obsreport/obsreporttest/package_test.go | 14 - otelcol/collector.go | 13 +- otelcol/collector_test.go | 39 +- otelcol/collector_windows.go | 30 +- otelcol/collector_windows_service_test.go | 185 + otelcol/command.go | 3 +- otelcol/command_components.go | 85 +- otelcol/command_components_test.go | 57 +- otelcol/command_test.go | 20 +- otelcol/command_validate_test.go | 6 +- otelcol/config.go | 10 +- otelcol/config_test.go | 13 + otelcol/configprovider.go | 26 +- otelcol/configprovider_test.go | 15 +- otelcol/factories_test.go | 3 +- otelcol/go.mod | 109 +- otelcol/go.sum | 148 +- otelcol/internal/configunmarshaler/configs.go | 7 +- .../configunmarshaler/configs_test.go | 2 +- otelcol/otelcoltest/config.go | 22 +- otelcol/testdata/components-output.yaml | 43 + otelcol/testdata/otel-log-to-file.yaml | 30 + .../otelcol-invalid-receiver-type.yaml | 18 + otelcol/unmarshaler.go | 2 +- pdata/go.mod | 13 +- pdata/go.sum | 30 +- .../cmd/pdatagen/internal/pmetric_package.go | 4 + .../data/protogen/metrics/v1/metrics.pb.go | 259 +- .../data/protogen/trace/v1/trace.pb.go | 195 +- pdata/pmetric/generated_metric.go | 7 + pdata/pmetric/generated_metric_test.go | 9 + pdata/pmetric/json.go | 5 + pdata/pmetric/json_test.go | 6 +- pdata/testdata/Makefile | 1 + {internal => pdata}/testdata/common.go | 0 pdata/testdata/go.mod | 21 + pdata/testdata/go.sum | 68 + {internal => pdata}/testdata/log.go | 0 {internal => pdata}/testdata/metric.go | 0 {internal => pdata}/testdata/resource.go | 0 {internal => pdata}/testdata/trace.go | 0 processor/batchprocessor/batch_processor.go | 13 +- .../batchprocessor/batch_processor_test.go | 2 +- .../generated_component_test.go | 150 + ...kage_test.go => generated_package_test.go} | 3 +- processor/batchprocessor/go.mod | 49 +- processor/batchprocessor/go.sum | 68 +- .../internal/metadata/generated_status.go | 14 +- .../internal/metadata/generated_telemetry.go | 18 + .../metadata/generated_telemetry_test.go | 63 + processor/batchprocessor/metadata.yaml | 2 + processor/batchprocessor/metrics.go | 24 +- processor/batchprocessor/splitlogs_test.go | 2 +- processor/batchprocessor/splitmetrics_test.go | 2 +- processor/batchprocessor/splittraces_test.go | 2 +- processor/go.mod | 47 +- processor/go.sum | 68 +- .../generated_component_test.go | 144 + ...kage_test.go => generated_package_test.go} | 3 +- processor/memorylimiterprocessor/go.mod | 53 +- processor/memorylimiterprocessor/go.sum | 78 +- .../internal/metadata/generated_status.go | 14 +- .../internal/metadata/generated_telemetry.go | 18 + .../metadata/generated_telemetry_test.go | 63 + .../internal/mock_exporter.go | 39 +- .../memorylimiter_test.go | 6 +- .../memorylimiterprocessor/metadata.yaml | 8 + processor/processorhelper/obsreport.go | 28 +- processor/processorhelper/obsreport_test.go | 4 +- processor/processortest/nop_processor.go | 4 +- processor/processortest/shutdown_verifier.go | 2 +- receiver/go.mod | 46 +- receiver/go.sum | 68 +- receiver/nopreceiver/Makefile | 1 + receiver/nopreceiver/README.md | 26 + receiver/nopreceiver/doc.go | 7 + .../nopreceiver/generated_component_test.go | 84 + .../nopreceiver/generated_package_test.go | 13 + receiver/nopreceiver/go.mod | 73 + receiver/nopreceiver/go.sum | 122 + .../internal/metadata/generated_status.go | 17 + .../internal/metadata/generated_telemetry.go | 18 + .../metadata/generated_telemetry_test.go | 63 + receiver/nopreceiver/metadata.yaml | 7 + receiver/nopreceiver/nop_receiver.go | 42 + receiver/nopreceiver/nop_receiver_test.go | 40 + receiver/otlpreceiver/README.md | 2 +- receiver/otlpreceiver/config_test.go | 8 +- receiver/otlpreceiver/factory.go | 2 +- receiver/otlpreceiver/factory_test.go | 12 +- .../otlpreceiver/generated_component_test.go | 84 + .../otlpreceiver/generated_package_test.go | 13 + receiver/otlpreceiver/go.mod | 98 +- receiver/otlpreceiver/go.sum | 142 +- .../otlpreceiver/internal/errors/errors.go | 20 + .../internal/errors/errors_test.go | 31 + .../otlpreceiver/internal/logs/otlp_test.go | 4 +- .../internal/metadata/generated_status.go | 14 +- .../internal/metadata/generated_telemetry.go | 18 + .../metadata/generated_telemetry_test.go | 63 + .../internal/metrics/otlp_test.go | 4 +- .../otlpreceiver/internal/trace/otlp_test.go | 4 +- receiver/otlpreceiver/otlp.go | 10 +- receiver/otlpreceiver/otlp_test.go | 140 +- receiver/otlpreceiver/otlphttp.go | 18 +- receiver/otlpreceiver/package_test.go | 17 - receiver/receiverhelper/obsreport.go | 14 +- receiver/receivertest/contract_checker.go | 2 +- receiver/receivertest/nop_receiver.go | 37 +- receiver/scraperhelper/config.go | 15 - receiver/scraperhelper/obsreport.go | 4 +- receiver/scraperhelper/scrapercontroller.go | 4 +- renovate.json | 15 +- semconv/go.mod | 2 +- semconv/go.sum | 4 +- semconv/v1.25.0/doc.go | 9 + semconv/v1.25.0/generated_attribute_group.go | 4796 +++++++++++++++++ semconv/v1.25.0/generated_event.go | 105 + semconv/v1.25.0/generated_resource.go | 242 + semconv/v1.25.0/generated_trace.go | 245 + semconv/v1.25.0/schema.go | 9 + service/go.mod | 100 +- service/go.sum | 148 +- service/host.go | 6 + .../capabilityconsumer/capabilities_test.go | 2 +- service/internal/graph/graph.go | 22 +- service/internal/graph/graph_test.go | 2 +- service/internal/proctelemetry/config.go | 147 - service/internal/proctelemetry/config_test.go | 357 -- service/internal/resource/config_test.go | 67 + service/internal/status/status.go | 19 - .../testcomponents/example_connector.go | 2 +- .../testcomponents/example_router_test.go | 2 +- service/service.go | 33 +- service/telemetry.go | 29 +- service/telemetry/otel_trace_sampler.go | 28 - service/telemetry/telemetry.go | 71 +- service/telemetry/telemetry_test.go | 26 + service/telemetry_test.go | 62 +- versions.yaml | 10 +- 531 files changed, 20884 insertions(+), 6193 deletions(-) delete mode 100755 .chloggen/use-sync/atomic.yaml delete mode 100644 cmd/builder/internal/builder/templates/components_test.go.tmpl delete mode 100644 cmd/mdatagen/doc.go delete mode 100644 cmd/mdatagen/internal/metadata/generated_status.go delete mode 100644 cmd/mdatagen/internal/metadata/testdata/config.yaml create mode 100644 cmd/mdatagen/internal/samplereceiver/README.md create mode 100644 cmd/mdatagen/internal/samplereceiver/doc.go rename cmd/mdatagen/{ => internal/samplereceiver}/documentation.md (81%) create mode 100644 cmd/mdatagen/internal/samplereceiver/factory.go create mode 100644 cmd/mdatagen/internal/samplereceiver/generated_component_test.go rename exporter/exportertest/package_test.go => cmd/mdatagen/internal/samplereceiver/generated_package_test.go (51%) rename cmd/mdatagen/internal/{ => samplereceiver/internal}/metadata/generated_config.go (78%) rename cmd/mdatagen/internal/{ => samplereceiver/internal}/metadata/generated_config_test.go (97%) rename cmd/mdatagen/internal/{ => samplereceiver/internal}/metadata/generated_metrics.go (69%) rename cmd/mdatagen/internal/{ => samplereceiver/internal}/metadata/generated_metrics_test.go (74%) rename cmd/mdatagen/internal/{ => samplereceiver/internal}/metadata/generated_resource.go (100%) rename cmd/mdatagen/internal/{ => samplereceiver/internal}/metadata/generated_resource_test.go (100%) create mode 100644 cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_status.go create mode 100644 cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_telemetry.go create mode 100644 cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_telemetry_test.go create mode 100644 cmd/mdatagen/internal/samplereceiver/internal/metadata/testdata/config.yaml rename cmd/mdatagen/{metadata-sample.yaml => internal/samplereceiver/metadata.yaml} (85%) create mode 100644 cmd/mdatagen/internal/samplereceiver/metrics_test.go rename {exporter/otlpexporter => cmd/mdatagen}/package_test.go (89%) create mode 100644 cmd/mdatagen/templates/package_test.go.tmpl create mode 100644 cmd/mdatagen/templates/telemetry.go.tmpl create mode 100644 cmd/mdatagen/templates/telemetry_test.go.tmpl create mode 100644 cmd/mdatagen/testdata/with_goleak_ignores.yaml create mode 100644 cmd/mdatagen/testdata/with_goleak_setup.yaml create mode 100644 cmd/mdatagen/testdata/with_goleak_skip.yaml create mode 100644 cmd/mdatagen/testdata/with_goleak_teardown.yaml delete mode 100644 cmd/otelcorecol/components_test.go create mode 100644 config/confighttp/compressor_test.go create mode 100644 confmap/confmaptest/provider_settings.go create mode 100644 confmap/doc_test.go create mode 100644 connector/forwardconnector/generated_component_test.go rename connector/forwardconnector/{package_test.go => generated_package_test.go} (62%) create mode 100644 connector/forwardconnector/internal/metadata/generated_telemetry.go create mode 100644 connector/forwardconnector/internal/metadata/generated_telemetry_test.go create mode 100644 connector/router.go delete mode 100644 docs/design.md delete mode 100644 docs/images/design-collector-agent.png delete mode 100644 docs/images/design-collector-service.png delete mode 100644 docs/images/design-exporters.png delete mode 100644 docs/images/design-pipelines.png delete mode 100644 docs/images/design-processors.png delete mode 100644 docs/images/design-receivers.png delete mode 100644 docs/images/opentelemetry-service-deployment-models.png delete mode 100644 docs/images/zpages-example.png create mode 100644 docs/rfcs/README.md create mode 100644 docs/rfcs/env-vars.md create mode 100644 docs/rfcs/logging-before-config-resolution.md rename docs/{ => rfcs}/processing.md (100%) create mode 100644 exporter/debugexporter/exporter.go create mode 100644 exporter/debugexporter/generated_component_test.go rename exporter/debugexporter/{package_test.go => generated_package_test.go} (62%) create mode 100644 exporter/debugexporter/internal/metadata/generated_telemetry.go create mode 100644 exporter/debugexporter/internal/metadata/generated_telemetry_test.go create mode 100644 exporter/exporterbatcher/batch_func.go create mode 100644 exporter/exporterbatcher/config.go create mode 100644 exporter/exporterbatcher/config_test.go create mode 100644 exporter/exporterhelper/batch_sender.go create mode 100644 exporter/exporterhelper/batch_sender_test.go create mode 100644 exporter/exporterhelper/logs_batch.go create mode 100644 exporter/exporterhelper/logs_batch_test.go create mode 100644 exporter/exporterhelper/metrics_batch.go create mode 100644 exporter/exporterhelper/metrics_batch_test.go create mode 100644 exporter/exporterhelper/traces_batch.go create mode 100644 exporter/exporterhelper/traces_batch_test.go delete mode 100644 exporter/internal/queue/queue_capacity.go delete mode 100644 exporter/internal/queue/queue_capacity_test.go create mode 100644 exporter/internal/queue/sized_channel.go create mode 100644 exporter/internal/queue/sized_channel_test.go create mode 100644 exporter/loggingexporter/generated_component_test.go rename exporter/loggingexporter/{package_test.go => generated_package_test.go} (62%) create mode 100644 exporter/loggingexporter/internal/metadata/generated_telemetry.go create mode 100644 exporter/loggingexporter/internal/metadata/generated_telemetry_test.go create mode 100644 exporter/nopexporter/Makefile create mode 100644 exporter/nopexporter/README.md create mode 100644 exporter/nopexporter/doc.go create mode 100644 exporter/nopexporter/generated_component_test.go rename extension/extensiontest/package_test.go => exporter/nopexporter/generated_package_test.go (51%) create mode 100644 exporter/nopexporter/go.mod create mode 100644 exporter/nopexporter/go.sum create mode 100644 exporter/nopexporter/internal/metadata/generated_status.go create mode 100644 exporter/nopexporter/internal/metadata/generated_telemetry.go create mode 100644 exporter/nopexporter/internal/metadata/generated_telemetry_test.go create mode 100644 exporter/nopexporter/metadata.yaml create mode 100644 exporter/nopexporter/nop_exporter.go create mode 100644 exporter/nopexporter/nop_exporter_test.go create mode 100644 exporter/otlpexporter/generated_component_test.go create mode 100644 exporter/otlpexporter/generated_package_test.go create mode 100644 exporter/otlpexporter/internal/metadata/generated_telemetry.go create mode 100644 exporter/otlpexporter/internal/metadata/generated_telemetry_test.go create mode 100644 exporter/otlphttpexporter/generated_component_test.go rename exporter/otlphttpexporter/{package_test.go => generated_package_test.go} (62%) create mode 100644 exporter/otlphttpexporter/internal/metadata/generated_telemetry.go create mode 100644 exporter/otlphttpexporter/internal/metadata/generated_telemetry_test.go create mode 100644 extension/ballastextension/generated_component_test.go rename extension/ballastextension/{package_test.go => generated_package_test.go} (62%) create mode 100644 extension/ballastextension/internal/metadata/generated_telemetry.go create mode 100644 extension/ballastextension/internal/metadata/generated_telemetry_test.go create mode 100644 extension/memorylimiterextension/generated_component_test.go create mode 100644 extension/memorylimiterextension/generated_package_test.go create mode 100644 extension/memorylimiterextension/internal/metadata/generated_telemetry.go create mode 100644 extension/memorylimiterextension/internal/metadata/generated_telemetry_test.go create mode 100644 extension/zpagesextension/generated_component_test.go rename extension/zpagesextension/{package_test.go => generated_package_test.go} (62%) create mode 100644 extension/zpagesextension/internal/metadata/generated_telemetry.go create mode 100644 extension/zpagesextension/internal/metadata/generated_telemetry_test.go create mode 100644 filter/Makefile create mode 100644 filter/config.go create mode 100644 filter/config_test.go create mode 100644 filter/doc.go create mode 100644 filter/filter.go create mode 100644 filter/go.mod create mode 100644 filter/go.sum create mode 100644 filter/testdata/config.yaml create mode 100644 filter/testdata/config_invalid.yaml create mode 100644 internal/httphelper/helper.go create mode 100644 internal/httphelper/helper_test.go create mode 100644 internal/memorylimiter/testdata/negative_unsigned_limits_config.yaml delete mode 100644 obsreport/doc.go delete mode 100644 obsreport/obsreporttest/deprecated.go delete mode 100644 obsreport/obsreporttest/package_test.go create mode 100644 otelcol/collector_windows_service_test.go create mode 100644 otelcol/testdata/components-output.yaml create mode 100644 otelcol/testdata/otel-log-to-file.yaml create mode 100644 otelcol/testdata/otelcol-invalid-receiver-type.yaml create mode 100644 pdata/testdata/Makefile rename {internal => pdata}/testdata/common.go (100%) create mode 100644 pdata/testdata/go.mod create mode 100644 pdata/testdata/go.sum rename {internal => pdata}/testdata/log.go (100%) rename {internal => pdata}/testdata/metric.go (100%) rename {internal => pdata}/testdata/resource.go (100%) rename {internal => pdata}/testdata/trace.go (100%) create mode 100644 processor/batchprocessor/generated_component_test.go rename processor/batchprocessor/{package_test.go => generated_package_test.go} (62%) create mode 100644 processor/batchprocessor/internal/metadata/generated_telemetry.go create mode 100644 processor/batchprocessor/internal/metadata/generated_telemetry_test.go create mode 100644 processor/memorylimiterprocessor/generated_component_test.go rename processor/memorylimiterprocessor/{package_test.go => generated_package_test.go} (63%) create mode 100644 processor/memorylimiterprocessor/internal/metadata/generated_telemetry.go create mode 100644 processor/memorylimiterprocessor/internal/metadata/generated_telemetry_test.go create mode 100644 receiver/nopreceiver/Makefile create mode 100644 receiver/nopreceiver/README.md create mode 100644 receiver/nopreceiver/doc.go create mode 100644 receiver/nopreceiver/generated_component_test.go create mode 100644 receiver/nopreceiver/generated_package_test.go create mode 100644 receiver/nopreceiver/go.mod create mode 100644 receiver/nopreceiver/go.sum create mode 100644 receiver/nopreceiver/internal/metadata/generated_status.go create mode 100644 receiver/nopreceiver/internal/metadata/generated_telemetry.go create mode 100644 receiver/nopreceiver/internal/metadata/generated_telemetry_test.go create mode 100644 receiver/nopreceiver/metadata.yaml create mode 100644 receiver/nopreceiver/nop_receiver.go create mode 100644 receiver/nopreceiver/nop_receiver_test.go create mode 100644 receiver/otlpreceiver/generated_component_test.go create mode 100644 receiver/otlpreceiver/generated_package_test.go create mode 100644 receiver/otlpreceiver/internal/metadata/generated_telemetry.go create mode 100644 receiver/otlpreceiver/internal/metadata/generated_telemetry_test.go delete mode 100644 receiver/otlpreceiver/package_test.go create mode 100644 semconv/v1.25.0/doc.go create mode 100644 semconv/v1.25.0/generated_attribute_group.go create mode 100644 semconv/v1.25.0/generated_event.go create mode 100644 semconv/v1.25.0/generated_resource.go create mode 100644 semconv/v1.25.0/generated_trace.go create mode 100644 semconv/v1.25.0/schema.go delete mode 100644 service/telemetry/otel_trace_sampler.go diff --git a/.chloggen/use-sync/atomic.yaml b/.chloggen/use-sync/atomic.yaml deleted file mode 100755 index 35d3a11fefc..00000000000 --- a/.chloggen/use-sync/atomic.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# 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. otlpreceiver) -component: all - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "replacing uber-go/atomic by sync/atomic" - -# One or more tracking issues or pull requests related to the change -issues: [7160] - -# (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: diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 17843187e81..951330bb93b 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -15,15 +15,15 @@ not be prioritized. _Delete this paragraph before submitting._ **Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + **Describe the solution you'd like** -A clear and concise description of what you want to happen. + **Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. + **Additional context** -Add any other context or screenshots about the feature request here. + _Please delete paragraphs that you did not use before submitting._ diff --git a/.github/ISSUE_TEMPLATE/release.md b/.github/ISSUE_TEMPLATE/release.md index 1a5c7366c9c..7ac68b668d3 100644 --- a/.github/ISSUE_TEMPLATE/release.md +++ b/.github/ISSUE_TEMPLATE/release.md @@ -7,7 +7,7 @@ assignees: '' --- -Like #4522, but for vX.X.X +Like #9601, but for vX.X.X **Performed by collector release manager** @@ -19,6 +19,7 @@ Like #4522, but for vX.X.X - [ ] Tag and release contrib vX.X.X - [ ] Prepare otelcol-releases vX.X.X - [ ] Release binaries and container images vX.X.X +- [ ] Update the release schedule in docs/RELEASE.md **Performed by operator maintainers** diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index cde4e56a1c5..785a666f0eb 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,18 +1,15 @@ -## Important (read before submitting) -We are currently preparing for the upcoming 1.0 GA release. Pull requests that are not aligned with -the current roadmap and are not aimed at stabilizing and preparing the Collector for the release will -not be accepted. - -_Delete the preceding paragraph before submitting._ - -**Description:** +#### Description -**Link to tracking Issue:** + +#### Link to tracking issue +Fixes # -**Testing:** + +#### Testing -**Documentation:** + +#### Documentation -_Please delete paragraphs that you did not use before submitting._ + diff --git a/.github/workflows/api-compatibility.yml b/.github/workflows/api-compatibility.yml index 8bed13f01a8..cd2fda2aaab 100644 --- a/.github/workflows/api-compatibility.yml +++ b/.github/workflows/api-compatibility.yml @@ -22,13 +22,13 @@ jobs: steps: - name: Checkout-Main - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 with: ref: ${{ github.base_ref }} path: ${{ github.base_ref }} - name: Checkout-HEAD - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 with: path: ${{ github.head_ref }} diff --git a/.github/workflows/build-and-test-windows.yaml b/.github/workflows/build-and-test-windows.yaml index 4fca5f3ffc6..09124dfab02 100644 --- a/.github/workflows/build-and-test-windows.yaml +++ b/.github/workflows/build-and-test-windows.yaml @@ -18,14 +18,14 @@ jobs: runs-on: windows-latest steps: - name: Checkout Repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Setup Go uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: go-version: ~1.21.5 cache: false - name: Cache Go - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 env: cache-name: cache-go-modules with: @@ -35,3 +35,42 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - name: Run Unit Tests run: make gotest + + windows-service-test: + runs-on: windows-latest + steps: + - name: Checkout Repo + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + - name: Setup Go + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version: ~1.21.5 + cache: false + - name: Cache Go + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 + env: + cache-name: cache-go-modules + with: + path: | + ~\go\pkg\mod + ~\AppData\Local\go-build + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + + - name: Make otelcorecol + run: make otelcorecol + + - name: Install otelcorecol as a service + run: | + New-Service -Name "otelcorecol" -StartupType "Manual" -BinaryPathName "${PWD}\bin\otelcorecol_windows_amd64 --config ${PWD}\examples\local\otel-config.yaml" + eventcreate.exe /t information /id 1 /l application /d "Creating event provider for 'otelcorecol'" /so otelcorecol + + - name: Test otelcorecol service + working-directory: ${{ github.workspace }}/otelcol + run: | + go test -timeout 90s -run ^TestCollectorAsService$ -v -tags=win32service + + - name: Remove otelcorecol service + if: always() + run: | + Remove-Service otelcorecol + Remove-Item HKLM:\SYSTEM\CurrentControlSet\Services\EventLog\Application\otelcorecol diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index a9421cb4976..b7ed51a68e4 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -15,15 +15,15 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Setup Go uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: ~1.21.5 + go-version: ~1.21.9 cache: false - name: Cache Go id: go-cache - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 with: path: | ~/go/bin @@ -38,15 +38,15 @@ jobs: needs: [setup-environment] steps: - name: Checkout Repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Setup Go uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: ~1.21.5 + go-version: ~1.21.9 cache: false - name: Cache Go id: go-cache - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 with: path: | ~/go/bin @@ -62,15 +62,15 @@ jobs: timeout-minutes: 30 steps: - name: Checkout Repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Setup Go uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: ~1.21.5 + go-version: ~1.21.9 cache: false - name: Cache Go id: go-cache - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 with: path: | ~/go/bin @@ -87,15 +87,15 @@ jobs: needs: [setup-environment] steps: - name: Checkout Repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Setup Go uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: ~1.21.5 + go-version: ~1.21.9 cache: false - name: Cache Go id: go-cache - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 with: path: | ~/go/bin @@ -137,12 +137,23 @@ jobs: unittest-matrix: strategy: matrix: - go-version: ["~1.22", "~1.21.5"] # 1.20 needs quotes otherwise it's interpreted as 1.2 - runs-on: ubuntu-latest + runner: [ubuntu-latest, actuated-arm64-4cpu-4gb] + exclude: + - go-version: "~1.21.9" + runner: actuated-arm64-4cpu-4gb + go-version: ["~1.22", "~1.21.9"] # 1.20 needs quotes otherwise it's interpreted as 1.2 + runs-on: ${{ matrix.runner }} needs: [setup-environment] steps: + - name: Set up arkade + uses: alexellis/setup-arkade@v3 + - name: Install vmmeter + run: | + sudo -E arkade oci install ghcr.io/openfaasltd/vmmeter:latest --path /usr/local/bin/ + - name: Run vmmeter + uses: self-actuated/vmmeter-action@v1 - name: Checkout Repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Setup Go uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: @@ -150,19 +161,20 @@ jobs: cache: false - name: Cache Go id: go-cache - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 with: path: | ~/go/bin ~/go/pkg/mod - key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }} + key: go-cache-${{ runner.os }}-${{ matrix.runner }}-${{ hashFiles('**/go.sum') }} - name: Cache Build - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 with: path: ~/.cache/go-build - key: unittest-${{ runner.os }}-go-build-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} + key: unittest-${{ runner.os }}-${{ matrix.runner }}-go-build-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} - name: Run Unit Tests - run: make gotest + run: | + make -j4 gotest unittest: if: always() runs-on: ubuntu-latest @@ -185,37 +197,31 @@ jobs: needs: [setup-environment] steps: - name: Checkout Repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Setup Go uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: ~1.21.5 + go-version: ~1.21.9 cache: false - name: Cache Go id: go-cache - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 with: path: | ~/go/bin ~/go/pkg/mod key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }} - name: Cache Build - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 with: path: ~/.cache/go-build key: coverage-${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} - name: Run Unit Tests With Coverage run: make gotest-with-cover - name: Upload coverage report - uses: Wandalen/wretry.action@0ef67d343938e879e0a9bb37c107a55731e8ed35 # v1.4.5 - with: - action: codecov/codecov-action@v3 - with: | - file: ./coverage.txt - fail_ci_if_error: true - verbose: true - attempt_limit: 10 - attempt_delay: 15000 + uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # 4.3.1 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} cross-build-collector: needs: [setup-environment] @@ -253,15 +259,15 @@ jobs: steps: - name: Checkout Repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Setup Go uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: ~1.21.5 + go-version: ~1.21.9 cache: false - name: Cache Go id: go-cache - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 with: path: | ~/go/bin diff --git a/.github/workflows/builder-integration-test.yaml b/.github/workflows/builder-integration-test.yaml index 840fe378de3..94ed1a3179b 100644 --- a/.github/workflows/builder-integration-test.yaml +++ b/.github/workflows/builder-integration-test.yaml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Setup Go uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: diff --git a/.github/workflows/builder-release.yaml b/.github/workflows/builder-release.yaml index 12b128e8d17..86f0717b0f2 100644 --- a/.github/workflows/builder-release.yaml +++ b/.github/workflows/builder-release.yaml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 with: fetch-depth: 0 - name: Setup Go diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 7a57b9421d5..1838f6f3caf 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -26,7 +26,7 @@ jobs: PR_HEAD: ${{ github.event.pull_request.head.sha }} steps: - name: Checkout Repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 with: fetch-depth: 0 - name: Setup Go @@ -35,7 +35,7 @@ jobs: go-version: ~1.21.5 - name: Cache Go id: go-cache - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 with: path: | ~/go/bin diff --git a/.github/workflows/check-links.yaml b/.github/workflows/check-links.yaml index 338e0718131..93a407948ad 100644 --- a/.github/workflows/check-links.yaml +++ b/.github/workflows/check-links.yaml @@ -21,7 +21,7 @@ jobs: md: ${{ steps.changes.outputs.md }} steps: - name: Checkout Repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 with: fetch-depth: 0 - name: Get changed files @@ -34,12 +34,12 @@ jobs: if: ${{needs.changedfiles.outputs.md}} steps: - name: Checkout Repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 with: fetch-depth: 0 - name: Install markdown-link-check - run: npm install -g markdown-link-check + run: npm install -g markdown-link-check@3.11.2 - name: Run markdown-link-check run: | diff --git a/.github/workflows/check_links_config.json b/.github/workflows/check_links_config.json index 82ca9c0c33d..84c68f6fdf3 100644 --- a/.github/workflows/check_links_config.json +++ b/.github/workflows/check_links_config.json @@ -8,6 +8,9 @@ }, { "pattern": "http(s)?://example.com" + }, + { + "pattern": "#warnings" } ], "aliveStatusCodes": [429, 200], diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index c49d7dc19af..70dc2f95c98 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Setup Go uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 @@ -30,12 +30,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@47b3d888fe66b639e431abf22ebca059152f1eea # v3.24.5 + uses: github/codeql-action/init@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3 with: languages: go - name: Autobuild - uses: github/codeql-action/autobuild@47b3d888fe66b639e431abf22ebca059152f1eea # v3.24.5 + uses: github/codeql-action/autobuild@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@47b3d888fe66b639e431abf22ebca059152f1eea # v3.24.5 + uses: github/codeql-action/analyze@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3 diff --git a/.github/workflows/contrib-tests.yml b/.github/workflows/contrib-tests.yml index d17bfb6f9a8..0c8b11b8996 100644 --- a/.github/workflows/contrib-tests.yml +++ b/.github/workflows/contrib-tests.yml @@ -38,7 +38,7 @@ jobs: - other steps: - name: Checkout Repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Setup Go uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: diff --git a/.github/workflows/generate-semantic-conventions-pr.yaml b/.github/workflows/generate-semantic-conventions-pr.yaml index ad3275a2123..8bc7c691698 100644 --- a/.github/workflows/generate-semantic-conventions-pr.yaml +++ b/.github/workflows/generate-semantic-conventions-pr.yaml @@ -14,7 +14,7 @@ jobs: already-added: ${{ steps.check-versions.outputs.already-added }} already-opened: ${{ steps.check-versions.outputs.already-opened }} steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - id: check-versions name: Check versions @@ -56,9 +56,9 @@ jobs: needs: - check-versions steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Checkout semantic-convention - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 with: repository: open-telemetry/semantic-convention path: tmp-semantic-conventions diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index cc103bafcea..432cebcb13f 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -11,7 +11,7 @@ jobs: runperf: runs-on: ubuntu-latest steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Setup Go uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index 6ff746ec06a..5bed593e28b 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -6,18 +6,18 @@ on: # the minor version number and set the patch number to 0. inputs: candidate-stable: - description: Release candidate version (stable, like 1.0.0-rcv0014). Don't include a leading `v`. + description: Release candidate version (stable, like 1.3.0). Don't include a leading `v`. current-stable: required: true - description: Current version (stable, like 1.0.0-rcv0014). Don't include a leading `v`. + description: Current version (stable, like 1.2.0). Don't include a leading `v`. candidate-beta: - description: Release candidate version (beta, like 0.70.0). Don't include `v`. + description: Release candidate version (beta, like 0.96.0). Don't include `v`. current-beta: required: true - description: Current version (beta, like 0.69.1). Don't include `v`. + description: Current version (beta, like 0.95.1). Don't include `v`. jobs: #validate-version format validate-versions: @@ -54,7 +54,7 @@ jobs: - validate-versions runs-on: ubuntu-latest steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 with: fetch-depth: 0 # Make sure that there are no open issues with release:blocker label in Core. The release has to be delayed until they are resolved. diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 2b8b2e72658..3cfdee49ed5 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -29,7 +29,7 @@ jobs: steps: - name: "Checkout code" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 with: persist-credentials: false @@ -56,7 +56,7 @@ jobs: # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # format to the repository Actions tab. - name: "Upload artifact" - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 + uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 with: name: SARIF file path: results.sarif @@ -64,6 +64,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6 + uses: github/codeql-action/upload-sarif@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3 with: sarif_file: results.sarif diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index 92446e0fbda..aa59846bea5 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -13,6 +13,6 @@ jobs: name: Shellcheck runs-on: ubuntu-latest steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Run ShellCheck uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # 2.0.0 diff --git a/.github/workflows/tidy-dependencies.yml b/.github/workflows/tidy-dependencies.yml index 28752e3a56d..7427464d9a3 100644 --- a/.github/workflows/tidy-dependencies.yml +++ b/.github/workflows/tidy-dependencies.yml @@ -16,16 +16,16 @@ jobs: runs-on: ubuntu-latest if: ${{ !contains(github.event.pull_request.labels.*.name, 'dependency-major-update') && (github.actor == 'renovate[bot]' || contains(github.event.pull_request.labels.*.name, 'renovatebot')) }} steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 with: ref: ${{ github.head_ref }} - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: ~1.21.5 + go-version: ~1.21.9 cache: false - name: Cache Go id: go-cache - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 with: path: | ~/go/bin diff --git a/CHANGELOG-API.md b/CHANGELOG-API.md index 6ebdddf897f..a727efcbae1 100644 --- a/CHANGELOG-API.md +++ b/CHANGELOG-API.md @@ -7,6 +7,86 @@ If you are looking for user-facing changes, check out [CHANGELOG.md](./CHANGELOG +## v1.7.0/v0.100.0 + +### 💡 Enhancements 💡 + +- `configgrpc`: Adds `NewDefault*` functions for all the config structs. (#9654) +- `exporterqueue`: Expose ErrQueueIsFull so upstream components can retry or apply backpressure. (#10070) + +### 🧰 Bug fixes 🧰 + +- `mdatagen`: Call connectors with routers to be the same as the service graph (#10079) + +## v1.6.0/v0.99.0 + +### 🛑 Breaking changes 🛑 + +- `component`: Removed deprecated function `GetExporters` from `component.Host` interface (#9987) + +### 🚩 Deprecations 🚩 + +- `confighttp`: deprecate ToClientContext, ToServerContext, ToListenerContext, replaced by ToClient, ToServer, ToListener (#9807) +- `configtls`: Deprecates `ClientConfig.LoadTLSConfigContext` and `ServerConfig.LoadTLSConfigContext`, use `ClientConfig.LoadTLSConfig` and `ServerConfig.LoadTLSConfig` instead. (#9945) + +### 💡 Enhancements 💡 + +- `configauth`: Adds `NewDefault*` functions for all the config structs. (#9821) +- `configtls`: Adds `NewDefault*` functions for all the config structs. (#9658) +- `pmetric`: Support metric.metadata in pdata/pmetric (#10006) + +## v1.5.0/v0.98.0 + +### 🛑 Breaking changes 🛑 + +- `component`: Restricts maximum length for `component.Type` to 63 characters. (#9872) +- `configgrpc`: Remove deprecated `ToServerContext`, use `ToServer` instead. (#9836) +- `configgrpc`: Remove deprecated `SanitizedEndpoint`. (#9836) +- `configtls`: Remove Deprecated `TLSSetting`, `TLSClientSetting`, and `TLSServerSetting`. (#9786) +- `configtls`: Rename `TLSSetting` to `Config` on `ClientConfig` and `ServerConfig`. (#9786) + +### 🚩 Deprecations 🚩 + +- `confighttp`: Deprecate `ToClient`,`ToListener`and `ToServer` use `ToClientContext`,`ToListenerContext` and `ToServerContext`instead. (#9807) +- `configtls`: Deprecate `ClientConfig.LoadTLSConfig` and `ServerConfig.LoadTLSConfig`, use `ClientConfig.LoadTLSConfigContext` and `ServerConfig.LoadTLSConfigContext` instead. (#9811) + +### 💡 Enhancements 💡 + +- Introduce new module for generating pdata: pdata/testdata (#9886) +- `exporterhelper`: Make the `WithBatcher` option available for regular exporter helpers based on OTLP data type. (#8122) + Now, `WithBatcher` can be used with both regular exporter helper (e.g. NewTracesExporter) and the request-based exporter + helper (e.g. NewTracesRequestExporter). The request-based exporter helpers require `WithRequestBatchFuncs` option + providing batching functions. + +- `confmap`: Creates a logger in the confmap.ProviderSettings and uses it to log when there is a missing or blank environment variable referenced in config. For now the noop logger is used everywhere except tests. (#5615) + +## v1.4.0/v0.97.0 + +### 🛑 Breaking changes 🛑 + +- `configgrpc`: Remove deprecated `ToServer` function. (#9787) +- `confignet`: Change `Transport` field from `string` to `TransportType` (#9385) +- `component`: Change underlying type of `component.Type` to an opaque struct. (#9208) +- `obsreport`: Remove deprecated obsreport/obsreporttest package. (#9724) +- `component`: Remove deprecated error `ErrNilNextConsumer` (#9322) +- `connector`: Remove `LogsRouter`, `MetricsRouter` and `TracesRouter`. Use `LogsRouterAndConsumer`, `MetricsRouterAndConsumer`, `TracesRouterAndConsumer` respectively instead. (#9095) +- `receiver`: Remove deprecated struct `ScraperControllerSettings` and function `NewDefaultScraperControllerSettings` (#6767) +- `confmap`: Remove deprecated `provider.New` methods, use `NewWithSettings` moving forward. (#9443) + +### 🚩 Deprecations 🚩 + +- `configgrpc`: Deprecated `ToServerContext`, use `ToServer` instead. (#9787) +- `configgrpc`: Deprecate `SanitizedEndpoint` (#9788) + +### 💡 Enhancements 💡 + +- `exporterhelper`: Add experimental batching capabilities to the exporter helper (#8122) +- `confignet`: Adds `NewDefault*` functions for all the config structs. (#9656) +- `configtls`: Validates TLS min_version and max_version (#9475) + Introduces `Validate()` method in TLSSetting. +- `exporterhelper`: Invalid exporterhelper options now make the exporter creation error out instead of panicking. (#9717) +- `components`: Give NoOp components a unique name (#9637) + ## v1.3.0/v0.96.0 ### 🚩 Deprecations 🚩 diff --git a/CHANGELOG.md b/CHANGELOG.md index f1238d56c8b..b37709193bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,136 @@ If you are looking for developer-facing changes, check out [CHANGELOG-API.md](./ +## v1.7.0/v0.100.0 + +### 🛑 Breaking changes 🛑 + +- `service`: The `validate` sub-command no longer validates that each pipeline's type is the same as its component types (#10031) + +### 💡 Enhancements 💡 + +- `semconv`: Add support for v1.25.0 semantic convention (#10072) +- `builder`: remove the need to go get a module to address ambiguous import paths (#10015) +- `pmetric`: Support parsing metric.metadata from OTLP JSON. (#10026) + +### 🧰 Bug fixes 🧰 + +- `exporterhelper`: Fix enabled config option for batch sender (#10076) + +## v1.6.0/v0.99.0 + +### 🛑 Breaking changes 🛑 + +- `builder`: Add strict version checking when using the builder. Add the temporary flag `--skip-strict-versioning `for skipping this check. (#9896) + Strict version checking will error on major and minor version mismatches + between the `otelcol_version` configured and the builder version or versions + in the go.mod. This check can be temporarily disabled by using the `--skip-strict-versioning` + flag. This flag will be removed in a future minor version. + +- `telemetry`: Distributed internal metrics across different levels. (#7890) + The internal metrics levels are updated along with reported metrics: + - The default level is changed from `basic` to `normal`, which can be overridden with `service::telmetry::metrics::level` configuration. + - Batch processor metrics are updated to be reported starting from `normal` level: + - `processor_batch_batch_send_size` + - `processor_batch_metadata_cardinality` + - `processor_batch_timeout_trigger_send` + - `processor_batch_size_trigger_send` + - GRPC/HTTP server and client metrics are updated to be reported starting from `detailed` level: + - http.client.* metrics + - http.server.* metrics + - rpc.server.* metrics + - rpc.client.* metrics + + +### 💡 Enhancements 💡 + +- `confighttp`: Disable concurrency in zstd compression (#8216) +- `cmd/builder`: Allow configuring `confmap.Provider`s in the builder. (#4759) + If no providers are specified, the defaults are used. + The default providers are: env, file, http, https, and yaml. + + To configure providers, use the `providers` key in your OCB build + manifest with a list of Go modules for your providers. + The modules will work the same as other Collector components. + +- `mdatagen`: enable goleak tests by default via mdatagen (#9959) +- `cmd/mdatagen`: support excluding some metrics based on string and regexes in resource_attributes (#9661) +- `cmd/mdatagen`: Generate config and factory tests covering their requirements. (#9940) + The tests are moved from cmd/builder. + +- `confmap`: Add `ProviderSettings`, `ConverterSettings`, `ProviderFactories`, and `ConverterFactories` fields to `confmap.ResolverSettings` (#9516) + This allows configuring providers and converters, which are instantiated by `NewResolver` using the given factories. + +### 🧰 Bug fixes 🧰 + +- `exporter/otlp`: Allow DNS scheme to be used in endpoint (#4274) +- `service`: fix record sampler configuration (#9968) +- `service`: ensure the tracer provider is configured via go.opentelemetry.io/contrib/config (#9967) +- `otlphttpexporter`: Fixes a bug that was preventing the otlp http exporter from propagating status. (#9892) +- `confmap`: Fix decoding negative configuration values into uints (#9060) + +## v1.5.0/v0.98.0 + +### 🛑 Breaking changes 🛑 + +- `service`: emit internal collector metrics with _ instead of / with OTLP export (#9774) + This is addressing an issue w/ the names of the metrics generated by the Collector for its + internal metrics. Note that this change only impacts users that emit telemetry using OTLP, which + is currently still in experimental support. The prometheus metrics already replaced `/` with `_` + and they will do the same with `_`. + + +### 💡 Enhancements 💡 + +- `mdatagen`: Adds unsupported platforms to the README header (#9794) +- `confmap`: Clarify the use of embedded structs to make unmarshaling composable (#7101) +- `nopexporter`: Promote the nopexporter to beta (#7316) +- `nopreceiver`: Promote the nopreceiver to beta (#7316) +- `otlpexporter`: Checks for port in the config validation for the otlpexporter (#9505) +- `service`: Validate pipeline type against component types (#8007) + +### 🧰 Bug fixes 🧰 + +- `configtls`: Fix issue where `IncludeSystemCACertsPool` was not consistently used between `ServerConfig` and `ClientConfig`. (#9835) +- `component`: Fix issue where the `components` command wasn't properly printing the component type. (#9856) +- `otelcol`: Fix issue where the `validate` command wasn't properly printing valid component type. (#9866) +- `receiver/otlp`: Fix bug where the otlp receiver did not properly respond with a retryable error code when possible for http (#9357) + +## v1.4.0/v0.97.0 + +### 🛑 Breaking changes 🛑 + +- `telemetry`: Remove telemetry.useOtelForInternalMetrics stable feature gate (#9752) + +### 🚀 New components 🚀 + +- `exporter/nop`: Add the `nopexporter` to serve as a placeholder exporter in a pipeline (#7316) + This is primarily useful for starting the Collector with only extensions enabled + or to test Collector pipeline throughput. + +- `receiver/nop`: Add the `nopreceiver` to serve as a placeholder receiver in a pipeline (#7316) + This is primarily useful for starting the Collector with only extensions enabled. + +### 💡 Enhancements 💡 + +- `configtls`: Validates TLS min_version and max_version (#9475) + Introduces `Validate()` method in TLSSetting. +- `configcompression`: Mark module as Stable. (#9571) +- `cmd/mdatagen`: Use go package name for the scope name by default and add an option to provide the scope name in metadata.yaml. (#9693) +- `cmd/mdatagen`: Generate the lifecycle tests for components by default. (#9683) + It's encouraged to have lifecycle tests for all components enadled, but they can be disabled if needed + in metadata.yaml with `skip_lifecycle: true` and `skip_shutdown: true` under `tests` section. + +- `cmd/mdatagen`: optimize the mdatagen for the case like batchprocessor which use a common struct to implement consumer.Traces, consumer.Metrics, consumer.Logs in the meantime. (#9688) + +### 🧰 Bug fixes 🧰 + +- `exporterhelper`: Fix persistent queue size backup on reads. (#9740) +- `processor/batch`: Prevent starting unnecessary goroutines. (#9739) +- `otlphttpexporter`: prevent error on empty response body when content type is application/json (#9666) +- `confmap`: confmap honors `Unmarshal` methods on config embedded structs. (#6671) +- `otelcol`: Respect telemetry configuration when running as a Windows service (#5300) + ## v1.3.0/v0.96.0 ### 🛑 Breaking changes 🛑 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1f99bb80c8c..fb881c33d16 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -147,7 +147,7 @@ section of general project contributing guide. Working with the project sources requires the following tools: 1. [git](https://git-scm.com/) -2. [go](https://golang.org/) (version 1.20 and up) +2. [go](https://golang.org/) (version 1.21 and up) 3. [make](https://www.gnu.org/software/make/) 4. [docker](https://www.docker.com/) @@ -204,12 +204,9 @@ before merging (but see above paragraph about writing good commit messages in th ## General Notes -This project uses Go 1.20.* and [Github Actions.](https://github.com/features/actions) +This project uses Go 1.21.* and [Github Actions.](https://github.com/features/actions) -It is recommended to run `make gofmt all` before submitting your PR - -The dependencies are managed with `go mod` if you work with the sources under your -`$GOPATH` you need to set the environment variable `GO111MODULE=on`. +It is recommended to run `make gofmt all` before submitting your PR. ## Coding Guidelines @@ -510,6 +507,19 @@ that each of the following steps is done in a separate version: 1. On `v0.N+2`, we change `func GetFoo() Foo` to `func GetFoo(context.Context) Foo` if desired or remove it entirely if needed. +#### Exceptions + +For changes to modules that do not have a version of `v1` or higher, we may skip the deprecation process described above +for the following situations. Note that these changes should still be recorded as breaking changes in the changelog. + +* **Variadic arguments.** Functions that are not already variadic may have a variadic parameter added as a method of + supporting optional parameters, particularly through the functional options pattern. If a variadic parameter is + added to a function with no change in functionality when no variadic arguments are passed, the deprecation process + may be skipped. Calls to updated functions without the new argument will continue to work before, but users who depend + on the exact function signature as a type, for example as an argument to another function, will experience a + breaking change. For this reason, the deprecation process should only be skipped when it is not expected that + the function is commonly passed as a value. + #### Configuration changes ##### Alpha components diff --git a/Makefile b/Makefile index c2cbc2c0bdb..8fb56bfbdc9 100644 --- a/Makefile +++ b/Makefile @@ -138,7 +138,7 @@ endif # Build the Collector executable. .PHONY: otelcorecol otelcorecol: - pushd cmd/otelcorecol && GO111MODULE=on CGO_ENABLED=0 $(GOCMD) build -trimpath -o ../../bin/otelcorecol_$(GOOS)_$(GOARCH) \ + pushd cmd/otelcorecol && CGO_ENABLED=0 $(GOCMD) build -trimpath -o ../../bin/otelcorecol_$(GOOS)_$(GOARCH) \ -tags $(GO_BUILD_TAGS) ./cmd/otelcorecol && popd .PHONY: genotelcorecol @@ -157,7 +157,7 @@ ocb: OPENTELEMETRY_PROTO_SRC_DIR=pdata/internal/opentelemetry-proto # The branch matching the current version of the proto to use -OPENTELEMETRY_PROTO_VERSION=v1.1.0 +OPENTELEMETRY_PROTO_VERSION=v1.2.0 # Find all .proto files. OPENTELEMETRY_PROTO_FILES := $(subst $(OPENTELEMETRY_PROTO_SRC_DIR)/,,$(wildcard $(OPENTELEMETRY_PROTO_SRC_DIR)/opentelemetry/proto/*/v1/*.proto $(OPENTELEMETRY_PROTO_SRC_DIR)/opentelemetry/proto/collector/*/v1/*.proto)) @@ -237,6 +237,7 @@ gensemconv: $(SEMCONVGEN) $(SEMCONVKIT) $(SEMCONVGEN) -o semconv/${SPECTAG} -t semconv/template.j2 -s ${SPECTAG} -i ${SPECPATH}/model/. --only=resource -p conventionType=resource -f generated_resource.go $(SEMCONVGEN) -o semconv/${SPECTAG} -t semconv/template.j2 -s ${SPECTAG} -i ${SPECPATH}/model/. --only=event -p conventionType=event -f generated_event.go $(SEMCONVGEN) -o semconv/${SPECTAG} -t semconv/template.j2 -s ${SPECTAG} -i ${SPECPATH}/model/. --only=span -p conventionType=trace -f generated_trace.go + $(SEMCONVGEN) -o semconv/${SPECTAG} -t semconv/template.j2 -s ${SPECTAG} -i ${SPECPATH}/model/. --only=attribute_group -p conventionType=attribute_group -f generated_attribute_group.go $(SEMCONVKIT) -output "semconv/$(SPECTAG)" -tag "$(SPECTAG)" # Checks that the HEAD of the contrib repo checked out in CONTRIB_PATH compiles @@ -270,6 +271,7 @@ check-contrib: -replace go.opentelemetry.io/collector/exporter=$(CURDIR)/exporter \ -replace go.opentelemetry.io/collector/exporter/debugexporter=$(CURDIR)/exporter/debugexporter \ -replace go.opentelemetry.io/collector/exporter/loggingexporter=$(CURDIR)/exporter/loggingexporter \ + -replace go.opentelemetry.io/collector/exporter/nopexporter=$(CURDIR)/exporter/nopexporter \ -replace go.opentelemetry.io/collector/exporter/otlpexporter=$(CURDIR)/exporter/otlpexporter \ -replace go.opentelemetry.io/collector/exporter/otlphttpexporter=$(CURDIR)/exporter/otlphttpexporter \ -replace go.opentelemetry.io/collector/extension=$(CURDIR)/extension \ @@ -280,10 +282,12 @@ check-contrib: -replace go.opentelemetry.io/collector/featuregate=$(CURDIR)/featuregate \ -replace go.opentelemetry.io/collector/otelcol=$(CURDIR)/otelcol \ -replace go.opentelemetry.io/collector/pdata=$(CURDIR)/pdata \ + -replace go.opentelemetry.io/collector/pdata/testdata=$(CURDIR)/pdata/testdata \ -replace go.opentelemetry.io/collector/processor=$(CURDIR)/processor \ -replace go.opentelemetry.io/collector/processor/batchprocessor=$(CURDIR)/processor/batchprocessor \ -replace go.opentelemetry.io/collector/processor/memorylimiterprocessor=$(CURDIR)/processor/memorylimiterprocessor \ -replace go.opentelemetry.io/collector/receiver=$(CURDIR)/receiver \ + -replace go.opentelemetry.io/collector/receiver/nopreceiver=$(CURDIR)/receiver/nopreceiver \ -replace go.opentelemetry.io/collector/receiver/otlpreceiver=$(CURDIR)/receiver/otlpreceiver \ -replace go.opentelemetry.io/collector/semconv=$(CURDIR)/semconv \ -replace go.opentelemetry.io/collector/service=$(CURDIR)/service" @@ -323,6 +327,7 @@ restore-contrib: -dropreplace go.opentelemetry.io/collector/exporter \ -dropreplace go.opentelemetry.io/collector/exporter/debugexporter \ -dropreplace go.opentelemetry.io/collector/exporter/loggingexporter \ + -dropreplace go.opentelemetry.io/collector/exporter/nopexporter \ -dropreplace go.opentelemetry.io/collector/exporter/otlpexporter \ -dropreplace go.opentelemetry.io/collector/exporter/otlphttpexporter \ -dropreplace go.opentelemetry.io/collector/extension \ @@ -333,10 +338,12 @@ restore-contrib: -dropreplace go.opentelemetry.io/collector/featuregate \ -dropreplace go.opentelemetry.io/collector/otelcol \ -dropreplace go.opentelemetry.io/collector/pdata \ + -dropreplace go.opentelemetry.io/collector/pdata/testdata \ -dropreplace go.opentelemetry.io/collector/processor \ -dropreplace go.opentelemetry.io/collector/processor/batchprocessor \ -dropreplace go.opentelemetry.io/collector/processor/memorylimiterprocessor \ -dropreplace go.opentelemetry.io/collector/receiver \ + -dropreplace go.opentelemetry.io/collector/receiver/nopreceiver \ -dropreplace go.opentelemetry.io/collector/receiver/otlpreceiver \ -dropreplace go.opentelemetry.io/collector/semconv \ -dropreplace go.opentelemetry.io/collector/service" diff --git a/Makefile.Common b/Makefile.Common index 195701daf59..ca9b17c56df 100644 --- a/Makefile.Common +++ b/Makefile.Common @@ -4,7 +4,8 @@ ALL_PKGS := $(sort $(shell go list ./...)) # COVER_PKGS is the list of packages to include in the coverage COVER_PKGS := $(shell go list ./... | tr "\n" ",") -GOTEST_OPT?= -race -timeout 120s +GOTEST_TIMEOUT?=240s +GOTEST_OPT?= -race -timeout $(GOTEST_TIMEOUT) GOCMD?= go GOTEST=$(GOCMD) test GOOS := $(shell $(GOCMD) env GOOS) diff --git a/README.md b/README.md index 9736c07a617..7497f7fa4e0 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,6 @@ Vision   •   - Design -   •   Configuration   •   Monitoring @@ -120,11 +118,8 @@ Here is a list of community roles with current and previous members: - Triagers ([@open-telemetry/collector-triagers](https://github.com/orgs/open-telemetry/teams/collector-triagers)): - - [Andrzej Stencel](https://github.com/astencel-sumo), Sumo Logic - - [Antoine Toulme](https://github.com/atoulme), Splunk + - [Andrzej Stencel](https://github.com/andrzej-stencel), Sumo Logic - [Evan Bradley](https://github.com/evan-bradley), Dynatrace - - [Tyler Helmuth](https://github.com/TylerHelmuth), Honeycomb - - [Yang Song](https://github.com/songy23), Datadog - Actively seeking contributors to triage issues - Emeritus Triagers: @@ -137,8 +132,11 @@ Here is a list of community roles with current and previous members: - Approvers ([@open-telemetry/collector-approvers](https://github.com/orgs/open-telemetry/teams/collector-approvers)): - [Anthony Mirabella](https://github.com/Aneurysm9), AWS + - [Antoine Toulme](https://github.com/atoulme), Splunk - [Daniel Jaglowski](https://github.com/djaglowski), observIQ - [Juraci Paixão Kröhling](https://github.com/jpkrohling), Grafana Labs + - [Tyler Helmuth](https://github.com/TylerHelmuth), Honeycomb + - [Yang Song](https://github.com/songy23), Datadog - Emeritus Approvers: diff --git a/client/client.go b/client/client.go index b8775d5a440..fa944cad909 100644 --- a/client/client.go +++ b/client/client.go @@ -98,15 +98,9 @@ type Info struct { Auth AuthData // Metadata is the request metadata from the client connecting to this connector. - // Experimental: *NOTE* this structure is subject to change or removal in the future. Metadata Metadata } -// Metadata is an immutable map, meant to contain request metadata. -type Metadata struct { - data map[string][]string -} - // AuthData represents the authentication data as seen by authenticators tied to // the receivers. type AuthData interface { @@ -116,8 +110,7 @@ type AuthData interface { // "membership" might return a list of strings. GetAttribute(string) any - // GetAttributes returns the names of all attributes in this authentication - // data. + // GetAttributeNames returns the names of all attributes in this authentication data. GetAttributeNames() []string } @@ -139,7 +132,12 @@ func FromContext(ctx context.Context) Info { return c } -// NewMetadata creates a new Metadata object to use in Info. md is used as-is. +// Metadata is an immutable map, meant to contain request metadata. +type Metadata struct { + data map[string][]string +} + +// NewMetadata creates a new Metadata object to use in Info. func NewMetadata(md map[string][]string) Metadata { c := make(map[string][]string, len(md)) for k, v := range md { @@ -151,6 +149,7 @@ func NewMetadata(md map[string][]string) Metadata { } // Get gets the value of the key from metadata, returning a copy. +// The key lookup is case-insensitive. func (m Metadata) Get(key string) []string { if len(m.data) == 0 { return nil diff --git a/cmd/builder/Makefile b/cmd/builder/Makefile index aed509584fa..988ed9e64a5 100644 --- a/cmd/builder/Makefile +++ b/cmd/builder/Makefile @@ -2,7 +2,7 @@ include ../../Makefile.Common .PHONY: ocb ocb: - GO111MODULE=on CGO_ENABLED=0 $(GOCMD) build -trimpath -o ../../bin/ocb_$(GOOS)_$(GOARCH) . + CGO_ENABLED=0 $(GOCMD) build -trimpath -o ../../bin/ocb_$(GOOS)_$(GOARCH) . # Generate the default build config from otelcorecol, by removing the # "replaces" stanza, which is assumed to be at the end of the file. diff --git a/cmd/builder/README.md b/cmd/builder/README.md index 7a4259d59e5..57fd3c4f104 100644 --- a/cmd/builder/README.md +++ b/cmd/builder/README.md @@ -5,21 +5,27 @@ This program generates a custom OpenTelemetry Collector binary based on a given ## TL;DR ```console -$ GO111MODULE=on go install go.opentelemetry.io/collector/cmd/builder@latest +$ go install go.opentelemetry.io/collector/cmd/builder@latest $ cat > otelcol-builder.yaml < /tmp/otelcol.yaml <= 0.86.0") if err != nil { return err @@ -123,6 +147,20 @@ func (c *Config) SetRequireOtelColModule() error { } c.Distribution.RequireOtelColModule = constraint.Check(otelColVersion) + + // check whether confmap factories are supported + constraint, err = version.NewConstraint(">= 0.99.0") + if err != nil { + return err + } + + otelColVersion, err = version.NewVersion(c.Distribution.OtelColVersion) + if err != nil { + return err + } + + c.Distribution.SupportsConfmapFactories = constraint.Check(otelColVersion) + return nil } @@ -155,6 +193,36 @@ func (c *Config) ParseModules() error { return err } + if c.Providers != nil { + providers, err := parseModules(*c.Providers) + if err != nil { + return err + } + c.Providers = &providers + } else { + providers, err := parseModules([]Module{ + { + GoMod: "go.opentelemetry.io/collector/confmap/provider/envprovider v" + c.Distribution.OtelColVersion, + }, + { + GoMod: "go.opentelemetry.io/collector/confmap/provider/fileprovider v" + c.Distribution.OtelColVersion, + }, + { + GoMod: "go.opentelemetry.io/collector/confmap/provider/httpprovider v" + c.Distribution.OtelColVersion, + }, + { + GoMod: "go.opentelemetry.io/collector/confmap/provider/httpsprovider v" + c.Distribution.OtelColVersion, + }, + { + GoMod: "go.opentelemetry.io/collector/confmap/provider/yamlprovider v" + c.Distribution.OtelColVersion, + }, + }) + if err != nil { + return err + } + c.Providers = &providers + } + return nil } diff --git a/cmd/builder/internal/builder/config_test.go b/cmd/builder/internal/builder/config_test.go index dccee464fe4..cd81b9f2887 100644 --- a/cmd/builder/internal/builder/config_test.go +++ b/cmd/builder/internal/builder/config_test.go @@ -220,8 +220,89 @@ func TestRequireOtelColModule(t *testing.T) { t.Run(tt.Version, func(t *testing.T) { cfg := NewDefaultConfig() cfg.Distribution.OtelColVersion = tt.Version - require.NoError(t, cfg.SetRequireOtelColModule()) + require.NoError(t, cfg.SetBackwardsCompatibility()) assert.Equal(t, tt.ExpectedRequireOtelColModule, cfg.Distribution.RequireOtelColModule) }) } } + +func TestConfmapFactoryVersions(t *testing.T) { + testCases := []struct { + version string + supported bool + err bool + }{ + { + version: "x.0.0", + supported: false, + err: true, + }, + { + version: "0.x.0", + supported: false, + err: true, + }, + { + version: "0.0.0", + supported: false, + }, + { + version: "0.98.0", + supported: false, + }, + { + version: "0.98.1", + supported: false, + }, + { + version: "0.99.0", + supported: true, + }, + { + version: "0.99.7", + supported: true, + }, + { + version: "0.100.0", + supported: true, + }, + { + version: "0.100.1", + supported: true, + }, + { + version: "1.0", + supported: true, + }, + { + version: "1.0.0", + supported: true, + }, + } + + for _, tt := range testCases { + t.Run(tt.version, func(t *testing.T) { + cfg := NewDefaultConfig() + cfg.Distribution.OtelColVersion = tt.version + if !tt.err { + require.NoError(t, cfg.SetBackwardsCompatibility()) + assert.Equal(t, tt.supported, cfg.Distribution.SupportsConfmapFactories) + } else { + require.Error(t, cfg.SetBackwardsCompatibility()) + } + }) + } +} + +func TestAddsDefaultProviders(t *testing.T) { + cfg := NewDefaultConfig() + cfg.Providers = nil + assert.NoError(t, cfg.ParseModules()) + assert.Len(t, *cfg.Providers, 5) +} + +func TestSkipsNilFieldValidation(t *testing.T) { + cfg := NewDefaultConfig() + cfg.Providers = nil + assert.NoError(t, cfg.Validate()) +} diff --git a/cmd/builder/internal/builder/main.go b/cmd/builder/internal/builder/main.go index 3b22300be2e..3d36059af36 100644 --- a/cmd/builder/internal/builder/main.go +++ b/cmd/builder/internal/builder/main.go @@ -4,42 +4,52 @@ package builder // import "go.opentelemetry.io/collector/cmd/builder/internal/builder" import ( + "bytes" "errors" "fmt" "os" "os/exec" "path/filepath" + "strings" "text/template" "time" "go.uber.org/zap" - "go.uber.org/zap/zapio" + "golang.org/x/mod/modfile" + "golang.org/x/mod/semver" ) var ( // ErrGoNotFound is returned when a Go binary hasn't been found - ErrGoNotFound = errors.New("go binary not found") + ErrGoNotFound = errors.New("go binary not found") + ErrDepNotFound = errors.New("dependency not found in go mod file") + ErrVersionMismatch = errors.New("mismatch in go.mod and builder configuration versions") + errDownloadFailed = errors.New("failed to download go modules") + errCompileFailed = errors.New("failed to compile the OpenTelemetry Collector distribution") + skipStrictMsg = "Use --skip-strict-versioning to temporarily disable this check. This flag will be removed in a future minor version" ) -func runGoCommand(cfg Config, args ...string) error { - cfg.Logger.Info("Running go subcommand.", zap.Any("arguments", args)) +func runGoCommand(cfg Config, args ...string) ([]byte, error) { + if cfg.Verbose { + cfg.Logger.Info("Running go subcommand.", zap.Any("arguments", args)) + } + // #nosec G204 -- cfg.Distribution.Go is trusted to be a safe path and the caller is assumed to have carried out necessary input validation cmd := exec.Command(cfg.Distribution.Go, args...) cmd.Dir = cfg.Distribution.OutputPath - if cfg.Verbose { - writer := &zapio.Writer{Log: cfg.Logger} - defer func() { _ = writer.Close() }() - cmd.Stdout = writer - cmd.Stderr = writer - return cmd.Run() - } + var stdout, stderr bytes.Buffer + cmd.Stdout = &stdout + cmd.Stderr = &stderr - if out, err := cmd.CombinedOutput(); err != nil { - return fmt.Errorf("go subcommand failed with args '%v': %w. Output:\n%s", args, err, out) + if err := cmd.Run(); err != nil { + return nil, fmt.Errorf("go subcommand failed with args '%v': %w, error message: %s", args, err, stderr.String()) + } + if cfg.Verbose && stderr.Len() != 0 { + cfg.Logger.Info("go subcommand error", zap.String("message", stderr.String())) } - return nil + return stdout.Bytes(), nil } // GenerateAndCompile will generate the source files based on the given configuration, update go mod, and will compile into a binary @@ -80,7 +90,6 @@ func Generate(cfg Config) error { mainOthersTemplate, mainWindowsTemplate, componentsTemplate, - componentsTestTemplate, goModTemplate, } { if err := processAndWrite(cfg, tmpl, tmpl.Name(), cfg); err != nil { @@ -115,8 +124,8 @@ func Compile(cfg Config) error { if cfg.Distribution.BuildTags != "" { args = append(args, "-tags", cfg.Distribution.BuildTags) } - if err := runGoCommand(cfg, args...); err != nil { - return fmt.Errorf("failed to compile the OpenTelemetry Collector distribution: %w", err) + if _, err := runGoCommand(cfg, args...); err != nil { + return fmt.Errorf("%w: %s", errCompileFailed, err.Error()) } cfg.Logger.Info("Compiled", zap.String("binary", fmt.Sprintf("%s/%s", cfg.Distribution.OutputPath, cfg.Distribution.Name))) @@ -130,30 +139,67 @@ func GetModules(cfg Config) error { return nil } - // ambiguous import: found package cloud.google.com/go/compute/metadata in multiple modules - if err := runGoCommand(cfg, "get", "cloud.google.com/go"); err != nil { - return fmt.Errorf("failed to go get: %w", err) + if _, err := runGoCommand(cfg, "mod", "tidy", "-compat=1.21"); err != nil { + return fmt.Errorf("failed to update go.mod: %w", err) } - if err := runGoCommand(cfg, "mod", "tidy", "-compat=1.21"); err != nil { - return fmt.Errorf("failed to update go.mod: %w", err) + if cfg.SkipStrictVersioning { + return downloadModules(cfg) + } + + // Perform strict version checking. For each component listed and the + // otelcol core dependency, check that the enclosing go module matches. + modulePath, dependencyVersions, err := cfg.readGoModFile() + if err != nil { + return err + } + + corePath, coreVersion := cfg.coreModuleAndVersion() + coreDepVersion, ok := dependencyVersions[corePath] + if !ok { + return fmt.Errorf("core collector %w: '%s'. %s", ErrDepNotFound, corePath, skipStrictMsg) + } + if semver.MajorMinor(coreDepVersion) != semver.MajorMinor(coreVersion) { + return fmt.Errorf( + "%w: core collector version calculated by component dependencies %q does not match configured version %q. %s", + ErrVersionMismatch, coreDepVersion, coreVersion, skipStrictMsg) + } + + for _, mod := range cfg.allComponents() { + module, version, _ := strings.Cut(mod.GoMod, " ") + if module == modulePath { + // No need to check the version of components that are part of the + // module we're building from. + continue + } + + moduleDepVersion, ok := dependencyVersions[module] + if !ok { + return fmt.Errorf("component %w: '%s'. %s", ErrDepNotFound, module, skipStrictMsg) + } + if semver.MajorMinor(moduleDepVersion) != semver.MajorMinor(version) { + return fmt.Errorf( + "%w: component %q version calculated by dependencies %q does not match configured version %q. %s", + ErrVersionMismatch, module, moduleDepVersion, version, skipStrictMsg) + } } + return downloadModules(cfg) +} + +func downloadModules(cfg Config) error { cfg.Logger.Info("Getting go modules") - // basic retry if error from go mod command (in case of transient network error). This could be improved - // retry 3 times with 5 second spacing interval - retries := 3 failReason := "unknown" - for i := 1; i <= retries; i++ { - if err := runGoCommand(cfg, "mod", "download"); err != nil { + for i := 1; i <= cfg.downloadModules.numRetries; i++ { + if _, err := runGoCommand(cfg, "mod", "download"); err != nil { failReason = err.Error() - cfg.Logger.Info("Failed modules download", zap.String("retry", fmt.Sprintf("%d/%d", i, retries))) - time.Sleep(5 * time.Second) + cfg.Logger.Info("Failed modules download", zap.String("retry", fmt.Sprintf("%d/%d", i, cfg.downloadModules.numRetries))) + time.Sleep(cfg.downloadModules.wait) continue } return nil } - return fmt.Errorf("failed to download go modules: %s", failReason) + return fmt.Errorf("%w: %s", errDownloadFailed, failReason) } func processAndWrite(cfg Config, tmpl *template.Template, outFile string, tmplParams any) error { @@ -165,3 +211,44 @@ func processAndWrite(cfg Config, tmpl *template.Template, outFile string, tmplPa defer out.Close() return tmpl.Execute(out, tmplParams) } + +func (c *Config) coreModuleAndVersion() (string, string) { + module := "go.opentelemetry.io/collector" + if c.Distribution.RequireOtelColModule { + module += "/otelcol" + } + return module, "v" + c.Distribution.OtelColVersion +} + +func (c *Config) allComponents() []Module { + // TODO: Use slices.Concat when we drop support for Go 1.21 + return append(c.Exporters, + append(c.Receivers, + append(c.Processors, + append(c.Extensions, + append(c.Connectors, + *c.Providers...)...)...)...)...) +} + +func (c *Config) readGoModFile() (string, map[string]string, error) { + var modPath string + stdout, err := runGoCommand(*c, "mod", "edit", "-print") + if err != nil { + return modPath, nil, err + } + parsedFile, err := modfile.Parse("go.mod", stdout, nil) + if err != nil { + return modPath, nil, err + } + if parsedFile != nil && parsedFile.Module != nil { + modPath = parsedFile.Module.Mod.Path + } + dependencies := map[string]string{} + for _, req := range parsedFile.Require { + if req == nil { + continue + } + dependencies[req.Mod.Path] = req.Mod.Version + } + return modPath, dependencies, nil +} diff --git a/cmd/builder/internal/builder/main_test.go b/cmd/builder/internal/builder/main_test.go index 6a237743b29..7ddd7ff7408 100644 --- a/cmd/builder/internal/builder/main_test.go +++ b/cmd/builder/internal/builder/main_test.go @@ -13,29 +13,178 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/zap" ) -func TestGenerateDefault(t *testing.T) { - require.NoError(t, Generate(NewDefaultConfig())) -} +var ( + goModTestFile = []byte(`// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 +module go.opentelemetry.io/collector/cmd/builder/internal/tester +go 1.20 +require ( + go.opentelemetry.io/collector/component v0.96.0 + go.opentelemetry.io/collector/connector v0.94.1 + go.opentelemetry.io/collector/exporter v0.94.1 + go.opentelemetry.io/collector/extension v0.94.1 + go.opentelemetry.io/collector/otelcol v0.94.1 + go.opentelemetry.io/collector/processor v0.94.1 + go.opentelemetry.io/collector/receiver v0.94.1 + go.opentelemetry.io/collector v0.96.0 +)`) +) -func TestGenerateInvalidCollectorVersion(t *testing.T) { +func newTestConfig() Config { cfg := NewDefaultConfig() - cfg.Distribution.OtelColVersion = "invalid" - err := Generate(cfg) - require.NoError(t, err) + cfg.downloadModules.wait = 0 + cfg.downloadModules.numRetries = 1 + return cfg +} + +func newInitializedConfig(t *testing.T) Config { + cfg := newTestConfig() + // Validate and ParseModules will be called before the config is + // given to Generate. + assert.NoError(t, cfg.Validate()) + assert.NoError(t, cfg.SetBackwardsCompatibility()) + assert.NoError(t, cfg.ParseModules()) + + return cfg +} + +func TestGenerateDefault(t *testing.T) { + require.NoError(t, Generate(newInitializedConfig(t))) } func TestGenerateInvalidOutputPath(t *testing.T) { - cfg := NewDefaultConfig() + cfg := newInitializedConfig(t) cfg.Distribution.OutputPath = "/:invalid" err := Generate(cfg) require.Error(t, err) require.Contains(t, err.Error(), "failed to create output path") } +func TestVersioning(t *testing.T) { + replaces := generateReplaces() + tests := []struct { + description string + cfgBuilder func() Config + expectedErr error + }{ + { + description: "defaults", + cfgBuilder: func() Config { + cfg := newTestConfig() + cfg.Distribution.Go = "go" + cfg.Replaces = append(cfg.Replaces, replaces...) + return cfg + }, + expectedErr: nil, + }, + { + description: "require otelcol", + cfgBuilder: func() Config { + cfg := newTestConfig() + cfg.Distribution.Go = "go" + cfg.Distribution.RequireOtelColModule = true + cfg.Replaces = append(cfg.Replaces, replaces...) + return cfg + }, + expectedErr: nil, + }, + { + description: "only gomod file, skip generate", + cfgBuilder: func() Config { + cfg := newTestConfig() + tempDir := t.TempDir() + err := makeModule(tempDir, goModTestFile) + require.NoError(t, err) + cfg.Distribution.OutputPath = tempDir + cfg.SkipGenerate = true + cfg.Distribution.Go = "go" + return cfg + }, + expectedErr: ErrDepNotFound, + }, + { + description: "old otel version", + cfgBuilder: func() Config { + cfg := newTestConfig() + cfg.Verbose = true + cfg.Distribution.Go = "go" + cfg.Distribution.OtelColVersion = "0.97.0" + cfg.Distribution.RequireOtelColModule = true + var err error + cfg.Exporters, err = parseModules([]Module{ + { + GoMod: "go.opentelemetry.io/collector/exporter/otlpexporter v0.97.0", + }, + }) + require.NoError(t, err) + cfg.Receivers, err = parseModules([]Module{ + { + GoMod: "go.opentelemetry.io/collector/receiver/otlpreceiver v0.97.0", + }, + }) + require.NoError(t, err) + providers, err := parseModules([]Module{ + { + GoMod: "go.opentelemetry.io/collector/confmap/provider/envprovider v0.97.0", + }, + }) + require.NoError(t, err) + cfg.Providers = &providers + return cfg + }, + expectedErr: nil, + }, + { + description: "old component version", + cfgBuilder: func() Config { + cfg := newTestConfig() + cfg.Distribution.Go = "go" + cfg.Exporters = []Module{ + { + GoMod: "go.opentelemetry.io/collector/exporter/otlpexporter v0.97.0", + }, + } + cfg.Providers = &[]Module{} + cfg.Replaces = append(cfg.Replaces, replaces...) + return cfg + }, + expectedErr: nil, + }, + { + description: "old component version without strict mode", + cfgBuilder: func() Config { + cfg := newTestConfig() + cfg.Distribution.Go = "go" + cfg.SkipStrictVersioning = true + cfg.Exporters = []Module{ + { + GoMod: "go.opentelemetry.io/collector/exporter/otlpexporter v0.97.0", + }, + } + cfg.Providers = &[]Module{} + cfg.Replaces = append(cfg.Replaces, replaces...) + return cfg + }, + expectedErr: nil, + }, + } + for _, tc := range tests { + t.Run(tc.description, func(t *testing.T) { + cfg := tc.cfgBuilder() + require.NoError(t, cfg.SetBackwardsCompatibility()) + require.NoError(t, cfg.Validate()) + require.NoError(t, cfg.ParseModules()) + err := GenerateAndCompile(cfg) + require.ErrorIs(t, err, tc.expectedErr) + }) + } +} + func TestSkipGenerate(t *testing.T) { - cfg := NewDefaultConfig() + cfg := newInitializedConfig(t) cfg.Distribution.OutputPath = t.TempDir() cfg.SkipGenerate = true err := Generate(cfg) @@ -50,43 +199,7 @@ func TestSkipGenerate(t *testing.T) { } func TestGenerateAndCompile(t *testing.T) { - // This test is dependent on the current file structure. - // The goal is find the root of the repo so we can replace the root module. - _, thisFile, _, _ := runtime.Caller(0) - workspaceDir := filepath.Dir(filepath.Dir(filepath.Dir(filepath.Dir(filepath.Dir(thisFile))))) - replaces := []string{fmt.Sprintf("go.opentelemetry.io/collector => %s", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/component => %s/component", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/config/confignet => %s/config/confignet", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/config/configtelemetry => %s/config/configtelemetry", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/confmap => %s/confmap", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/confmap/converter/expandconverter => %s/confmap/converter/expandconverter", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/confmap/provider/envprovider => %s/confmap/provider/envprovider", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/confmap/provider/fileprovider => %s/confmap/provider/fileprovider", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/confmap/provider/httpprovider => %s/confmap/provider/httpprovider", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/confmap/provider/httpsprovider => %s/confmap/provider/httpsprovider", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/confmap/provider/yamlprovider => %s/confmap/provider/yamlprovider", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/consumer => %s/consumer", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/connector => %s/connector", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/exporter => %s/exporter", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/exporter/debugexporter => %s/exporter/debugexporter", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/exporter/loggingexporter => %s/exporter/loggingexporter", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/exporter/otlpexporter => %s/exporter/otlpexporter", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/exporter/otlphttpexporter => %s/exporter/otlphttpexporter", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/extension => %s/extension", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/extension/ballastextension => %s/extension/ballastextension", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/extension/zpagesextension => %s/extension/zpagesextension", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/featuregate => %s/featuregate", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/processor => %s/processor", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/processor/batchprocessor => %s/processor/batchprocessor", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/processor/memorylimiterprocessor => %s/processor/memorylimiterprocessor", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/receiver => %s/receiver", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/receiver/otlpreceiver => %s/receiver/otlpreceiver", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/otelcol => %s/otelcol", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/pdata => %s/pdata", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/semconv => %s/semconv", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/service => %s/service", workspaceDir), - } - + replaces := generateReplaces() testCases := []struct { testCase string cfgBuilder func(t *testing.T) Config @@ -94,7 +207,7 @@ func TestGenerateAndCompile(t *testing.T) { { testCase: "Default Configuration Compilation", cfgBuilder: func(t *testing.T) Config { - cfg := NewDefaultConfig() + cfg := newTestConfig() cfg.Distribution.OutputPath = t.TempDir() cfg.Replaces = append(cfg.Replaces, replaces...) return cfg @@ -103,7 +216,7 @@ func TestGenerateAndCompile(t *testing.T) { { testCase: "LDFlags Compilation", cfgBuilder: func(t *testing.T) Config { - cfg := NewDefaultConfig() + cfg := newTestConfig() cfg.Distribution.OutputPath = t.TempDir() cfg.Replaces = append(cfg.Replaces, replaces...) cfg.LDFlags = `-X "test.gitVersion=0743dc6c6411272b98494a9b32a63378e84c34da" -X "test.gitTag=local-testing" -X "test.goVersion=go version go1.20.7 darwin/amd64"` @@ -113,13 +226,46 @@ func TestGenerateAndCompile(t *testing.T) { { testCase: "Debug Compilation", cfgBuilder: func(t *testing.T) Config { - cfg := NewDefaultConfig() + cfg := newTestConfig() cfg.Distribution.OutputPath = t.TempDir() cfg.Replaces = append(cfg.Replaces, replaces...) + cfg.Logger = zap.NewNop() cfg.Distribution.DebugCompilation = true return cfg }, }, + { + testCase: "No providers", + cfgBuilder: func(t *testing.T) Config { + cfg := newTestConfig() + cfg.Distribution.OutputPath = t.TempDir() + cfg.Replaces = append(cfg.Replaces, replaces...) + cfg.Providers = &[]Module{} + return cfg + }, + }, + { + testCase: "Pre-confmap factories", + cfgBuilder: func(t *testing.T) Config { + cfg := newTestConfig() + cfg.Distribution.OutputPath = t.TempDir() + cfg.Replaces = append(cfg.Replaces, replaces...) + cfg.Distribution.OtelColVersion = "0.98.0" + cfg.SkipStrictVersioning = true + return cfg + }, + }, + { + testCase: "With confmap factories", + cfgBuilder: func(t *testing.T) Config { + cfg := newTestConfig() + cfg.Distribution.OutputPath = t.TempDir() + cfg.Replaces = append(cfg.Replaces, replaces...) + cfg.Distribution.OtelColVersion = "0.99.0" + cfg.SkipStrictVersioning = true + return cfg + }, + }, } for _, tt := range testCases { @@ -127,7 +273,75 @@ func TestGenerateAndCompile(t *testing.T) { cfg := tt.cfgBuilder(t) assert.NoError(t, cfg.Validate()) assert.NoError(t, cfg.SetGoPath()) + assert.NoError(t, cfg.ParseModules()) require.NoError(t, GenerateAndCompile(cfg)) }) } } + +func makeModule(dir string, fileContents []byte) error { + // if the file does not exist, try to create it + if _, err := os.Stat(dir); os.IsNotExist(err) { + if err = os.Mkdir(dir, 0750); err != nil { + return fmt.Errorf("failed to create output path: %w", err) + } + } else if err != nil { + return fmt.Errorf("failed to create output path: %w", err) + } + + err := os.WriteFile(filepath.Clean(filepath.Join(dir, "go.mod")), fileContents, 0600) + if err != nil { + return fmt.Errorf("failed to write go.mod file: %w", err) + } + return nil +} + +func generateReplaces() []string { + // This test is dependent on the current file structure. + // The goal is find the root of the repo so we can replace the root module. + _, thisFile, _, _ := runtime.Caller(0) + workspaceDir := filepath.Dir(filepath.Dir(filepath.Dir(filepath.Dir(filepath.Dir(thisFile))))) + return []string{fmt.Sprintf("go.opentelemetry.io/collector => %s", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/component => %s/component", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/config/configauth => %s/config/configauth", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/config/configcompression => %s/config/configcompression", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/config/configgrpc => %s/config/configgrpc", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/config/confignet => %s/config/confignet", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/config/configopaque => %s/config/configopaque", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/config/configretry => %s/config/configretry", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/config/configtelemetry => %s/config/configtelemetry", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/config/configtls => %s/config/configtls", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/config/internal => %s/config/internal", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/confmap => %s/confmap", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/confmap/converter/expandconverter => %s/confmap/converter/expandconverter", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/confmap/provider/envprovider => %s/confmap/provider/envprovider", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/confmap/provider/fileprovider => %s/confmap/provider/fileprovider", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/confmap/provider/httpprovider => %s/confmap/provider/httpprovider", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/confmap/provider/httpsprovider => %s/confmap/provider/httpsprovider", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/confmap/provider/yamlprovider => %s/confmap/provider/yamlprovider", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/consumer => %s/consumer", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/connector => %s/connector", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/exporter => %s/exporter", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/exporter/debugexporter => %s/exporter/debugexporter", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/exporter/loggingexporter => %s/exporter/loggingexporter", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/exporter/nopexporter => %s/exporter/nopexporter", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/exporter/otlpexporter => %s/exporter/otlpexporter", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/exporter/otlphttpexporter => %s/exporter/otlphttpexporter", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/extension => %s/extension", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/extension/auth => %s/extension/auth", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/extension/ballastextension => %s/extension/ballastextension", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/extension/zpagesextension => %s/extension/zpagesextension", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/featuregate => %s/featuregate", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/processor => %s/processor", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/processor/batchprocessor => %s/processor/batchprocessor", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/processor/memorylimiterprocessor => %s/processor/memorylimiterprocessor", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/receiver => %s/receiver", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/receiver/nopreceiver => %s/receiver/nopreceiver", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/receiver/otlpreceiver => %s/receiver/otlpreceiver", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/otelcol => %s/otelcol", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/pdata => %s/pdata", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/pdata/testdata => %s/pdata/testdata", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/semconv => %s/semconv", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/service => %s/service", workspaceDir), + } +} diff --git a/cmd/builder/internal/builder/templates.go b/cmd/builder/internal/builder/templates.go index fba3a9fc5ee..a916508d049 100644 --- a/cmd/builder/internal/builder/templates.go +++ b/cmd/builder/internal/builder/templates.go @@ -13,10 +13,6 @@ var ( componentsBytes []byte componentsTemplate = parseTemplate("components.go", componentsBytes) - //go:embed templates/components_test.go.tmpl - componentsTestBytes []byte - componentsTestTemplate = parseTemplate("components_test.go", componentsTestBytes) - //go:embed templates/main.go.tmpl mainBytes []byte mainTemplate = parseTemplate("main.go", mainBytes) diff --git a/cmd/builder/internal/builder/templates/components_test.go.tmpl b/cmd/builder/internal/builder/templates/components_test.go.tmpl deleted file mode 100644 index aaf9ee8b965..00000000000 --- a/cmd/builder/internal/builder/templates/components_test.go.tmpl +++ /dev/null @@ -1,39 +0,0 @@ -// Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT. - -package main - -import ( - "testing" - "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/component/componenttest" -) - -func TestValidateConfigs(t *testing.T) { - factories, err := components() - assert.NoError(t, err) - - for k, factory := range factories.Receivers { - assert.Equal(t, k, factory.Type()) - assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig())) - } - - for k, factory := range factories.Processors { - assert.Equal(t, k, factory.Type()) - assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig())) - } - - for k, factory := range factories.Exporters { - assert.Equal(t, k, factory.Type()) - assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig())) - } - - for k, factory := range factories.Connectors { - assert.Equal(t, k, factory.Type()) - assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig())) - } - - for k, factory := range factories.Extensions { - assert.Equal(t, k, factory.Type()) - assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig())) - } -} diff --git a/cmd/builder/internal/builder/templates/go.mod.tmpl b/cmd/builder/internal/builder/templates/go.mod.tmpl index f70306ae95b..ad6fd3f78f6 100644 --- a/cmd/builder/internal/builder/templates/go.mod.tmpl +++ b/cmd/builder/internal/builder/templates/go.mod.tmpl @@ -5,6 +5,12 @@ module {{.Distribution.Module}} go 1.21 require ( + {{if .Distribution.SupportsConfmapFactories -}} + go.opentelemetry.io/collector/confmap/converter/expandconverter v{{.Distribution.OtelColVersion}} + {{- range .Providers}} + {{if .GoMod}}{{.GoMod}}{{end}} + {{- end}} + {{- end}} {{- range .Connectors}} {{if .GoMod}}{{.GoMod}}{{end}} {{- end}} diff --git a/cmd/builder/internal/builder/templates/main.go.tmpl b/cmd/builder/internal/builder/templates/main.go.tmpl index 64a81295bcb..f9964c5d5ec 100644 --- a/cmd/builder/internal/builder/templates/main.go.tmpl +++ b/cmd/builder/internal/builder/templates/main.go.tmpl @@ -7,6 +7,13 @@ import ( "log" "go.opentelemetry.io/collector/component" + {{- if .Distribution.SupportsConfmapFactories}} + "go.opentelemetry.io/collector/confmap" + "go.opentelemetry.io/collector/confmap/converter/expandconverter" + {{- range .Providers}} + {{.Name}} "{{.Import}}" + {{- end}} + {{- end}} "go.opentelemetry.io/collector/otelcol" ) @@ -17,7 +24,26 @@ func main() { Version: "{{ .Distribution.Version }}", } - if err := run(otelcol.CollectorSettings{BuildInfo: info, Factories: components}); err != nil { + set := otelcol.CollectorSettings{ + BuildInfo: info, + Factories: components, + {{- if .Distribution.SupportsConfmapFactories}} + ConfigProviderSettings: otelcol.ConfigProviderSettings{ + ResolverSettings: confmap.ResolverSettings{ + ProviderFactories: []confmap.ProviderFactory{ + {{- range .Providers}} + {{.Name}}.NewFactory(), + {{- end}} + }, + ConverterFactories: []confmap.ConverterFactory{ + expandconverter.NewFactory(), + }, + }, + }, + {{- end}} + } + + if err := run(set); err != nil { log.Fatal(err) } } diff --git a/cmd/builder/internal/command.go b/cmd/builder/internal/command.go index 34d1b0b13b9..b6cc41a9ba5 100644 --- a/cmd/builder/internal/command.go +++ b/cmd/builder/internal/command.go @@ -23,6 +23,7 @@ const ( skipGenerateFlag = "skip-generate" skipCompilationFlag = "skip-compilation" skipGetModulesFlag = "skip-get-modules" + skipStrictVersioningFlag = "skip-strict-versioning" ldflagsFlag = "ldflags" distributionNameFlag = "name" distributionDescriptionFlag = "description" @@ -65,7 +66,7 @@ configuration is provided, ocb will generate a default Collector. return fmt.Errorf("go not found: %w", err) } - if err := cfg.SetRequireOtelColModule(); err != nil { + if err := cfg.SetBackwardsCompatibility(); err != nil { return fmt.Errorf("unable to compare otelcol version: %w", err) } @@ -83,6 +84,7 @@ configuration is provided, ocb will generate a default Collector. cmd.Flags().BoolVar(&cfg.SkipGenerate, skipGenerateFlag, false, "Whether builder should skip generating go code (default false)") cmd.Flags().BoolVar(&cfg.SkipCompilation, skipCompilationFlag, false, "Whether builder should only generate go code with no compile of the collector (default false)") cmd.Flags().BoolVar(&cfg.SkipGetModules, skipGetModulesFlag, false, "Whether builder should skip updating go.mod and retrieve Go module list (default false)") + cmd.Flags().BoolVar(&cfg.SkipStrictVersioning, skipStrictVersioningFlag, false, "Whether builder should skip strictly checking the calculated versions following dependency resolution") cmd.Flags().BoolVar(&cfg.Verbose, verboseFlag, false, "Whether builder should print verbose output (default false)") cmd.Flags().StringVar(&cfg.LDFlags, ldflagsFlag, "", `ldflags to include in the "go build" command`) cmd.Flags().StringVar(&cfg.Distribution.Name, distributionNameFlag, "otelcol-custom", "The executable name for the OpenTelemetry Collector distribution") @@ -168,6 +170,7 @@ func applyCfgFromFile(flags *flag.FlagSet, cfgFromFile builder.Config) { cfg.Receivers = cfgFromFile.Receivers cfg.Processors = cfgFromFile.Processors cfg.Connectors = cfgFromFile.Connectors + cfg.Providers = cfgFromFile.Providers cfg.Replaces = cfgFromFile.Replaces cfg.Excludes = cfgFromFile.Excludes @@ -180,6 +183,9 @@ func applyCfgFromFile(flags *flag.FlagSet, cfgFromFile builder.Config) { if !flags.Changed(skipGetModulesFlag) && cfgFromFile.SkipGetModules { cfg.SkipGetModules = cfgFromFile.SkipGetModules } + if !flags.Changed(skipStrictVersioningFlag) && cfgFromFile.SkipStrictVersioning { + cfg.SkipStrictVersioning = cfgFromFile.SkipStrictVersioning + } if !flags.Changed(distributionNameFlag) && cfgFromFile.Distribution.Name != "" { cfg.Distribution.Name = cfgFromFile.Distribution.Name } diff --git a/cmd/builder/internal/command_test.go b/cmd/builder/internal/command_test.go index 78ad0d740d2..27ae655893b 100644 --- a/cmd/builder/internal/command_test.go +++ b/cmd/builder/internal/command_test.go @@ -178,6 +178,26 @@ func Test_applyCfgFromFile(t *testing.T) { }, wantErr: false, }, + { + name: "Skip strict versioning true", + args: args{ + flags: flag.NewFlagSet("version=1.0.0", 1), + cfgFromFile: builder.Config{ + Logger: zap.NewNop(), + SkipCompilation: true, + SkipStrictVersioning: true, + Distribution: testDistribution, + }, + }, + want: builder.Config{ + Logger: zap.NewNop(), + SkipCompilation: true, + SkipGetModules: true, + SkipStrictVersioning: true, + Distribution: testDistribution, + }, + wantErr: false, + }, { name: "Skip generate false", args: args{ @@ -191,11 +211,12 @@ func Test_applyCfgFromFile(t *testing.T) { }, }, want: builder.Config{ - Logger: zap.NewNop(), - SkipGenerate: false, - SkipCompilation: true, - SkipGetModules: true, - Distribution: testDistribution, + Logger: zap.NewNop(), + SkipGenerate: false, + SkipCompilation: true, + SkipGetModules: true, + SkipStrictVersioning: true, + Distribution: testDistribution, }, wantErr: false, }, @@ -212,11 +233,12 @@ func Test_applyCfgFromFile(t *testing.T) { }, }, want: builder.Config{ - Logger: zap.NewNop(), - SkipGenerate: true, - SkipCompilation: true, - SkipGetModules: true, - Distribution: testDistribution, + Logger: zap.NewNop(), + SkipGenerate: true, + SkipCompilation: true, + SkipGetModules: true, + SkipStrictVersioning: true, + Distribution: testDistribution, }, wantErr: false, }, @@ -228,6 +250,7 @@ func Test_applyCfgFromFile(t *testing.T) { assert.Equal(t, tt.want.SkipGenerate, cfg.SkipGenerate) assert.Equal(t, tt.want.SkipCompilation, cfg.SkipCompilation) assert.Equal(t, tt.want.SkipGetModules, cfg.SkipGetModules) + assert.Equal(t, tt.want.SkipStrictVersioning, cfg.SkipStrictVersioning) assert.Equal(t, tt.want.Excludes, cfg.Excludes) assert.Equal(t, tt.want.Exporters, cfg.Exporters) assert.Equal(t, tt.want.Receivers, cfg.Receivers) diff --git a/cmd/builder/internal/config/default.yaml b/cmd/builder/internal/config/default.yaml index 1aee339e91b..ac86def33ff 100644 --- a/cmd/builder/internal/config/default.yaml +++ b/cmd/builder/internal/config/default.yaml @@ -2,23 +2,32 @@ dist: module: go.opentelemetry.io/collector/cmd/otelcorecol name: otelcorecol description: Local OpenTelemetry Collector binary, testing only. - version: 0.96.0-dev - otelcol_version: 0.96.0 + version: 0.100.0-dev + otelcol_version: 0.100.0 receivers: - - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.96.0 + - gomod: go.opentelemetry.io/collector/receiver/nopreceiver v0.100.0 + - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.100.0 exporters: - - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.96.0 - - gomod: go.opentelemetry.io/collector/exporter/loggingexporter v0.96.0 - - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.96.0 - - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.96.0 + - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.100.0 + - gomod: go.opentelemetry.io/collector/exporter/loggingexporter v0.100.0 + - gomod: go.opentelemetry.io/collector/exporter/nopexporter v0.100.0 + - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.100.0 + - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.100.0 extensions: - - gomod: go.opentelemetry.io/collector/extension/ballastextension v0.96.0 - - gomod: go.opentelemetry.io/collector/extension/memorylimiterextension v0.96.0 - - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.96.0 + - gomod: go.opentelemetry.io/collector/extension/ballastextension v0.100.0 + - gomod: go.opentelemetry.io/collector/extension/memorylimiterextension v0.100.0 + - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.100.0 processors: - - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.96.0 - - gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.96.0 + - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.100.0 + - gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.100.0 connectors: - - gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.96.0 + - gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.100.0 + +providers: + - gomod: go.opentelemetry.io/collector/confmap/provider/envprovider v0.100.0 + - gomod: go.opentelemetry.io/collector/confmap/provider/fileprovider v0.100.0 + - gomod: go.opentelemetry.io/collector/confmap/provider/httpprovider v0.100.0 + - gomod: go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.100.0 + - gomod: go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.100.0 diff --git a/cmd/builder/test/core.builder.yaml b/cmd/builder/test/core.builder.yaml index 0f4fe8e9df4..7baedadd974 100644 --- a/cmd/builder/test/core.builder.yaml +++ b/cmd/builder/test/core.builder.yaml @@ -1,20 +1,20 @@ dist: module: go.opentelemetry.io/collector/builder/test/core - otelcol_version: 0.94.0 + otelcol_version: 0.100.0 extensions: - import: go.opentelemetry.io/collector/extension/zpagesextension - gomod: go.opentelemetry.io/collector v0.94.0 + gomod: go.opentelemetry.io/collector v0.100.0 path: ${WORKSPACE_DIR} receivers: - import: go.opentelemetry.io/collector/receiver/otlpreceiver - gomod: go.opentelemetry.io/collector v0.94.0 + gomod: go.opentelemetry.io/collector v0.100.0 path: ${WORKSPACE_DIR} exporters: - import: go.opentelemetry.io/collector/exporter/debugexporter - gomod: go.opentelemetry.io/collector v0.94.0 + gomod: go.opentelemetry.io/collector v0.100.0 path: ${WORKSPACE_DIR} replaces: @@ -48,6 +48,7 @@ replaces: - go.opentelemetry.io/collector/featuregate => ${WORKSPACE_DIR}/featuregate - go.opentelemetry.io/collector/otelcol => ${WORKSPACE_DIR}/otelcol - go.opentelemetry.io/collector/pdata => ${WORKSPACE_DIR}/pdata + - go.opentelemetry.io/collector/pdata/testdata => ${WORKSPACE_DIR}/pdata/testdata - go.opentelemetry.io/collector/processor => ${WORKSPACE_DIR}/processor - go.opentelemetry.io/collector/receiver => ${WORKSPACE_DIR}/receiver - go.opentelemetry.io/collector/receiver/otlpreceiver => ${WORKSPACE_DIR}/receiver/otlpreceiver diff --git a/cmd/mdatagen/doc.go b/cmd/mdatagen/doc.go deleted file mode 100644 index 8f1fc6a7176..00000000000 --- a/cmd/mdatagen/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Generate a test metrics builder from a sample metrics set covering all configuration options. -//go:generate mdatagen metadata-sample.yaml - -package main diff --git a/cmd/mdatagen/embeded_templates_test.go b/cmd/mdatagen/embeded_templates_test.go index 1f4c4684e4e..3bba543b139 100644 --- a/cmd/mdatagen/embeded_templates_test.go +++ b/cmd/mdatagen/embeded_templates_test.go @@ -28,8 +28,11 @@ func TestEnsureTemplatesLoaded(t *testing.T) { path.Join(rootDir, "resource_test.go.tmpl"): {}, path.Join(rootDir, "config.go.tmpl"): {}, path.Join(rootDir, "config_test.go.tmpl"): {}, + path.Join(rootDir, "package_test.go.tmpl"): {}, path.Join(rootDir, "readme.md.tmpl"): {}, path.Join(rootDir, "status.go.tmpl"): {}, + path.Join(rootDir, "telemetry.go.tmpl"): {}, + path.Join(rootDir, "telemetry_test.go.tmpl"): {}, path.Join(rootDir, "testdata", "config.yaml.tmpl"): {}, } count = 0 diff --git a/cmd/mdatagen/go.mod b/cmd/mdatagen/go.mod index e654d0832c7..8512c0f3a0d 100644 --- a/cmd/mdatagen/go.mod +++ b/cmd/mdatagen/go.mod @@ -4,16 +4,18 @@ go 1.21 require ( github.com/google/go-cmp v0.6.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.96.0 - go.opentelemetry.io/collector/confmap v0.96.0 - go.opentelemetry.io/collector/confmap/provider/fileprovider v0.96.0 - go.opentelemetry.io/collector/pdata v1.3.0 - go.opentelemetry.io/collector/receiver v0.96.0 - go.opentelemetry.io/collector/semconv v0.96.0 - go.opentelemetry.io/otel/metric v1.24.0 - go.opentelemetry.io/otel/trace v1.24.0 - go.uber.org/multierr v1.11.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.100.0 + go.opentelemetry.io/collector/confmap v0.100.0 + go.opentelemetry.io/collector/confmap/provider/fileprovider v0.100.0 + go.opentelemetry.io/collector/consumer v0.100.0 + go.opentelemetry.io/collector/filter v0.100.0 + go.opentelemetry.io/collector/pdata v1.7.0 + go.opentelemetry.io/collector/receiver v0.100.0 + go.opentelemetry.io/collector/semconv v0.100.0 + go.opentelemetry.io/otel/metric v1.26.0 + go.opentelemetry.io/otel/trace v1.26.0 + go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 golang.org/x/text v0.14.0 ) @@ -26,31 +28,31 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.19.0 // indirect - github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect - go.opentelemetry.io/collector/consumer v0.96.0 // indirect - go.opentelemetry.io/otel v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect - go.opentelemetry.io/otel/sdk v1.24.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/sys v0.17.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/grpc v1.62.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect + go.opentelemetry.io/otel v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect + go.opentelemetry.io/otel/sdk v1.26.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.34.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -60,8 +62,12 @@ replace go.opentelemetry.io/collector/confmap => ../../confmap replace go.opentelemetry.io/collector/confmap/provider/fileprovider => ../../confmap/provider/fileprovider +replace go.opentelemetry.io/collector/filter => ../../filter + replace go.opentelemetry.io/collector/pdata => ../../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + replace go.opentelemetry.io/collector/receiver => ../../receiver replace go.opentelemetry.io/collector/semconv => ../../semconv diff --git a/cmd/mdatagen/go.sum b/cmd/mdatagen/go.sum index 06616cda85d..4394e616fe3 100644 --- a/cmd/mdatagen/go.sum +++ b/cmd/mdatagen/go.sum @@ -14,13 +14,11 @@ github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsM github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +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/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -29,8 +27,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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= @@ -48,32 +46,32 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= -go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -89,16 +87,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -111,14 +109,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/cmd/mdatagen/internal/metadata/generated_status.go b/cmd/mdatagen/internal/metadata/generated_status.go deleted file mode 100644 index 7e332e5ba4a..00000000000 --- a/cmd/mdatagen/internal/metadata/generated_status.go +++ /dev/null @@ -1,29 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" - - "go.opentelemetry.io/collector/component" -) - -var ( - Type = component.MustNewType("file") - scopeName = "go.opentelemetry.io/collector" -) - -const ( - TracesStability = component.StabilityLevelBeta - LogsStability = component.StabilityLevelDevelopment - MetricsStability = component.StabilityLevelStable -) - -func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter(scopeName) -} - -func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer(scopeName) -} diff --git a/cmd/mdatagen/internal/metadata/testdata/config.yaml b/cmd/mdatagen/internal/metadata/testdata/config.yaml deleted file mode 100644 index 8283dc2dd70..00000000000 --- a/cmd/mdatagen/internal/metadata/testdata/config.yaml +++ /dev/null @@ -1,55 +0,0 @@ -default: -all_set: - metrics: - default.metric: - enabled: true - default.metric.to_be_removed: - enabled: true - optional.metric: - enabled: true - optional.metric.empty_unit: - enabled: true - resource_attributes: - map.resource.attr: - enabled: true - optional.resource.attr: - enabled: true - slice.resource.attr: - enabled: true - string.enum.resource.attr: - enabled: true - string.resource.attr: - enabled: true - string.resource.attr_disable_warning: - enabled: true - string.resource.attr_remove_warning: - enabled: true - string.resource.attr_to_be_removed: - enabled: true -none_set: - metrics: - default.metric: - enabled: false - default.metric.to_be_removed: - enabled: false - optional.metric: - enabled: false - optional.metric.empty_unit: - enabled: false - resource_attributes: - map.resource.attr: - enabled: false - optional.resource.attr: - enabled: false - slice.resource.attr: - enabled: false - string.enum.resource.attr: - enabled: false - string.resource.attr: - enabled: false - string.resource.attr_disable_warning: - enabled: false - string.resource.attr_remove_warning: - enabled: false - string.resource.attr_to_be_removed: - enabled: false diff --git a/cmd/mdatagen/internal/samplereceiver/README.md b/cmd/mdatagen/internal/samplereceiver/README.md new file mode 100644 index 00000000000..8444ce2e8ec --- /dev/null +++ b/cmd/mdatagen/internal/samplereceiver/README.md @@ -0,0 +1,22 @@ +# Sample Receiver +This receiver is used for testing purposes to check the output of mdatagen. + +| Status | | +| ------------- |-----------| +| Stability | [development]: logs | +| | [beta]: traces | +| | [stable]: metrics | +| Unsupported Platforms | freebsd, illumos | +| Distributions | [] | +| Warnings | [Any additional information that should be brought to the consumer's attention](#warnings) | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Areceiver%2Fsample%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Areceiver%2Fsample) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Areceiver%2Fsample%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Areceiver%2Fsample) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@dmitryax](https://www.github.com/dmitryax) | + +[development]: https://github.com/open-telemetry/opentelemetry-collector#development +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[stable]: https://github.com/open-telemetry/opentelemetry-collector#stable + + +## Warnings + +This is where warnings are described. diff --git a/cmd/mdatagen/internal/samplereceiver/doc.go b/cmd/mdatagen/internal/samplereceiver/doc.go new file mode 100644 index 00000000000..7b7505667ae --- /dev/null +++ b/cmd/mdatagen/internal/samplereceiver/doc.go @@ -0,0 +1,10 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Generate a test metrics builder from a sample metrics set covering all configuration options. +//go:generate mdatagen metadata.yaml + +// Deprecated: This package is moving to https://github.com/open-telemetry/opentelemetry-collector and will eventually be removed. +// Please see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30497 +// This is a sample receiver package used to showcase how mdatagen is applied. +package samplereceiver // import "go.opentelemetry.io/collector/cmd/mdatagen/internal/samplereceiver" diff --git a/cmd/mdatagen/documentation.md b/cmd/mdatagen/internal/samplereceiver/documentation.md similarity index 81% rename from cmd/mdatagen/documentation.md rename to cmd/mdatagen/internal/samplereceiver/documentation.md index 1955e081535..60a79a7941a 100644 --- a/cmd/mdatagen/documentation.md +++ b/cmd/mdatagen/internal/samplereceiver/documentation.md @@ -1,6 +1,6 @@ [comment]: <> (Code generated by mdatagen. DO NOT EDIT.) -# file +# sample ## Default Metrics @@ -42,6 +42,24 @@ The metric will be will be removed soon. | ---- | ----------- | ---------- | ----------------------- | --------- | | s | Sum | Double | Delta | false | +### metric.input_type + +Monotonic cumulative sum int metric with string input_type enabled by default. + +| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | +| ---- | ----------- | ---------- | ----------------------- | --------- | +| s | Sum | Int | Cumulative | true | + +#### Attributes + +| Name | Description | Values | +| ---- | ----------- | ------ | +| string_attr | Attribute with any string value. | Any Str | +| state | Integer attribute with overridden name. | Any Int | +| enum_attr | Attribute with a known set of string values. | Str: ``red``, ``green``, ``blue`` | +| slice_attr | Attribute with a slice value. | Any Slice | +| map_attr | Attribute with a map value. | Any Map | + ## Optional Metrics The following metrics are not emitted by default. Each of them can be enabled by applying the following configuration: diff --git a/cmd/mdatagen/internal/samplereceiver/factory.go b/cmd/mdatagen/internal/samplereceiver/factory.go new file mode 100644 index 00000000000..89769521f74 --- /dev/null +++ b/cmd/mdatagen/internal/samplereceiver/factory.go @@ -0,0 +1,42 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package samplereceiver // import "go.opentelemetry.io/collector/cmd/mdatagen/internal/samplereceiver" + +import ( + "context" + + "go.opentelemetry.io/collector/cmd/mdatagen/internal/samplereceiver/internal/metadata" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/receiver" +) + +// NewFactory returns a receiver.Factory for sample receiver. +func NewFactory() receiver.Factory { + return receiver.NewFactory( + metadata.Type, + func() component.Config { return &struct{}{} }, + receiver.WithTraces(createTraces, metadata.TracesStability), + receiver.WithMetrics(createMetrics, metadata.MetricsStability), + receiver.WithLogs(createLogs, metadata.LogsStability)) +} + +func createTraces(context.Context, receiver.CreateSettings, component.Config, consumer.Traces) (receiver.Traces, error) { + return nopInstance, nil +} + +func createMetrics(context.Context, receiver.CreateSettings, component.Config, consumer.Metrics) (receiver.Metrics, error) { + return nopInstance, nil +} + +func createLogs(context.Context, receiver.CreateSettings, component.Config, consumer.Logs) (receiver.Logs, error) { + return nopInstance, nil +} + +var nopInstance = &nopReceiver{} + +type nopReceiver struct { + component.StartFunc + component.ShutdownFunc +} diff --git a/cmd/mdatagen/internal/samplereceiver/generated_component_test.go b/cmd/mdatagen/internal/samplereceiver/generated_component_test.go new file mode 100644 index 00000000000..af315d20a85 --- /dev/null +++ b/cmd/mdatagen/internal/samplereceiver/generated_component_test.go @@ -0,0 +1,85 @@ +// Code generated by mdatagen. DO NOT EDIT. +//go:build !freebsd && !illumos + +package samplereceiver + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/receiver" + "go.opentelemetry.io/collector/receiver/receivertest" +) + +func TestComponentFactoryType(t *testing.T) { + require.Equal(t, "sample", NewFactory().Type().String()) +} + +func TestComponentConfigStruct(t *testing.T) { + require.NoError(t, componenttest.CheckConfigStruct(NewFactory().CreateDefaultConfig())) +} + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set receiver.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "logs", + createFn: func(ctx context.Context, set receiver.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateLogsReceiver(ctx, set, cfg, consumertest.NewNop()) + }, + }, + + { + name: "metrics", + createFn: func(ctx context.Context, set receiver.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsReceiver(ctx, set, cfg, consumertest.NewNop()) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set receiver.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesReceiver(ctx, set, cfg, consumertest.NewNop()) + }, + }, + } + + cm, err := confmaptest.LoadConf("metadata.yaml") + require.NoError(t, err) + cfg := factory.CreateDefaultConfig() + sub, err := cm.Sub("tests::config") + require.NoError(t, err) + require.NoError(t, component.UnmarshalConfig(sub, cfg)) + + for _, test := range tests { + t.Run(test.name+"-shutdown", func(t *testing.T) { + c, err := test.createFn(context.Background(), receivertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + firstRcvr, err := test.createFn(context.Background(), receivertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + require.NoError(t, err) + require.NoError(t, firstRcvr.Start(context.Background(), host)) + require.NoError(t, firstRcvr.Shutdown(context.Background())) + secondRcvr, err := test.createFn(context.Background(), receivertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondRcvr.Start(context.Background(), host)) + require.NoError(t, secondRcvr.Shutdown(context.Background())) + }) + } +} diff --git a/exporter/exportertest/package_test.go b/cmd/mdatagen/internal/samplereceiver/generated_package_test.go similarity index 51% rename from exporter/exportertest/package_test.go rename to cmd/mdatagen/internal/samplereceiver/generated_package_test.go index 8fa8a72b85f..ba2afcd94ca 100644 --- a/exporter/exportertest/package_test.go +++ b/cmd/mdatagen/internal/samplereceiver/generated_package_test.go @@ -1,7 +1,6 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 +// Code generated by mdatagen. DO NOT EDIT. -package exportertest +package samplereceiver import ( "testing" diff --git a/cmd/mdatagen/internal/metadata/generated_config.go b/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_config.go similarity index 78% rename from cmd/mdatagen/internal/metadata/generated_config.go rename to cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_config.go index 92937f48dbf..05ddc47ac40 100644 --- a/cmd/mdatagen/internal/metadata/generated_config.go +++ b/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_config.go @@ -2,7 +2,10 @@ package metadata -import "go.opentelemetry.io/collector/confmap" +import ( + "go.opentelemetry.io/collector/confmap" + "go.opentelemetry.io/collector/filter" +) // MetricConfig provides common config for a particular metric. type MetricConfig struct { @@ -23,10 +26,11 @@ func (ms *MetricConfig) Unmarshal(parser *confmap.Conf) error { return nil } -// MetricsConfig provides config for file metrics. +// MetricsConfig provides config for sample metrics. type MetricsConfig struct { DefaultMetric MetricConfig `mapstructure:"default.metric"` DefaultMetricToBeRemoved MetricConfig `mapstructure:"default.metric.to_be_removed"` + MetricInputType MetricConfig `mapstructure:"metric.input_type"` OptionalMetric MetricConfig `mapstructure:"optional.metric"` OptionalMetricEmptyUnit MetricConfig `mapstructure:"optional.metric.empty_unit"` } @@ -39,6 +43,9 @@ func DefaultMetricsConfig() MetricsConfig { DefaultMetricToBeRemoved: MetricConfig{ Enabled: true, }, + MetricInputType: MetricConfig{ + Enabled: true, + }, OptionalMetric: MetricConfig{ Enabled: false, }, @@ -51,6 +58,13 @@ func DefaultMetricsConfig() MetricsConfig { // ResourceAttributeConfig provides common config for a particular resource attribute. type ResourceAttributeConfig struct { Enabled bool `mapstructure:"enabled"` + // Experimental: MetricsInclude defines a list of filters for attribute values. + // If the list is not empty, only metrics with matching resource attribute values will be emitted. + MetricsInclude []filter.Config `mapstructure:"metrics_include"` + // Experimental: MetricsExclude defines a list of filters for attribute values. + // If the list is not empty, metrics with matching resource attribute values will not be emitted. + // MetricsInclude has higher priority than MetricsExclude. + MetricsExclude []filter.Config `mapstructure:"metrics_exclude"` enabledSetByUser bool } @@ -67,7 +81,7 @@ func (rac *ResourceAttributeConfig) Unmarshal(parser *confmap.Conf) error { return nil } -// ResourceAttributesConfig provides config for file resource attributes. +// ResourceAttributesConfig provides config for sample resource attributes. type ResourceAttributesConfig struct { MapResourceAttr ResourceAttributeConfig `mapstructure:"map.resource.attr"` OptionalResourceAttr ResourceAttributeConfig `mapstructure:"optional.resource.attr"` @@ -108,7 +122,7 @@ func DefaultResourceAttributesConfig() ResourceAttributesConfig { } } -// MetricsBuilderConfig is a configuration for file metrics builder. +// MetricsBuilderConfig is a configuration for sample metrics builder. type MetricsBuilderConfig struct { Metrics MetricsConfig `mapstructure:"metrics"` ResourceAttributes ResourceAttributesConfig `mapstructure:"resource_attributes"` diff --git a/cmd/mdatagen/internal/metadata/generated_config_test.go b/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_config_test.go similarity index 97% rename from cmd/mdatagen/internal/metadata/generated_config_test.go rename to cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_config_test.go index bfb90940386..0f581b137f7 100644 --- a/cmd/mdatagen/internal/metadata/generated_config_test.go +++ b/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_config_test.go @@ -29,6 +29,7 @@ func TestMetricsBuilderConfig(t *testing.T) { Metrics: MetricsConfig{ DefaultMetric: MetricConfig{Enabled: true}, DefaultMetricToBeRemoved: MetricConfig{Enabled: true}, + MetricInputType: MetricConfig{Enabled: true}, OptionalMetric: MetricConfig{Enabled: true}, OptionalMetricEmptyUnit: MetricConfig{Enabled: true}, }, @@ -50,6 +51,7 @@ func TestMetricsBuilderConfig(t *testing.T) { Metrics: MetricsConfig{ DefaultMetric: MetricConfig{Enabled: false}, DefaultMetricToBeRemoved: MetricConfig{Enabled: false}, + MetricInputType: MetricConfig{Enabled: false}, OptionalMetric: MetricConfig{Enabled: false}, OptionalMetricEmptyUnit: MetricConfig{Enabled: false}, }, diff --git a/cmd/mdatagen/internal/metadata/generated_metrics.go b/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_metrics.go similarity index 69% rename from cmd/mdatagen/internal/metadata/generated_metrics.go rename to cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_metrics.go index a6d8a7e4169..344599e2c40 100644 --- a/cmd/mdatagen/internal/metadata/generated_metrics.go +++ b/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_metrics.go @@ -3,9 +3,12 @@ package metadata import ( + "fmt" + "strconv" "time" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/filter" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/receiver" @@ -150,6 +153,63 @@ func newMetricDefaultMetricToBeRemoved(cfg MetricConfig) metricDefaultMetricToBe return m } +type metricMetricInputType struct { + data pmetric.Metric // data buffer for generated metric. + config MetricConfig // metric config provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills metric.input_type metric with initial data. +func (m *metricMetricInputType) init() { + m.data.SetName("metric.input_type") + m.data.SetDescription("Monotonic cumulative sum int metric with string input_type enabled by default.") + m.data.SetUnit("s") + m.data.SetEmptySum() + m.data.Sum().SetIsMonotonic(true) + m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) + m.data.Sum().DataPoints().EnsureCapacity(m.capacity) +} + +func (m *metricMetricInputType) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, stringAttrAttributeValue string, overriddenIntAttrAttributeValue int64, enumAttrAttributeValue string, sliceAttrAttributeValue []any, mapAttrAttributeValue map[string]any) { + if !m.config.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntValue(val) + dp.Attributes().PutStr("string_attr", stringAttrAttributeValue) + dp.Attributes().PutInt("state", overriddenIntAttrAttributeValue) + dp.Attributes().PutStr("enum_attr", enumAttrAttributeValue) + dp.Attributes().PutEmptySlice("slice_attr").FromRaw(sliceAttrAttributeValue) + dp.Attributes().PutEmptyMap("map_attr").FromRaw(mapAttrAttributeValue) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricMetricInputType) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricMetricInputType) emit(metrics pmetric.MetricSlice) { + if m.config.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricMetricInputType(cfg MetricConfig) metricMetricInputType { + m := metricMetricInputType{config: cfg} + if cfg.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + type metricOptionalMetric struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. @@ -262,8 +322,11 @@ type MetricsBuilder struct { metricsCapacity int // maximum observed number of metrics per resource. metricsBuffer pmetric.Metrics // accumulates metrics data before emitting. buildInfo component.BuildInfo // contains version information. + resourceAttributeIncludeFilter map[string]filter.Filter + resourceAttributeExcludeFilter map[string]filter.Filter metricDefaultMetric metricDefaultMetric metricDefaultMetricToBeRemoved metricDefaultMetricToBeRemoved + metricMetricInputType metricMetricInputType metricOptionalMetric metricOptionalMetric metricOptionalMetricEmptyUnit metricOptionalMetricEmptyUnit } @@ -294,7 +357,7 @@ func NewMetricsBuilder(mbc MetricsBuilderConfig, settings receiver.CreateSetting if !mbc.ResourceAttributes.StringResourceAttrDisableWarning.enabledSetByUser { settings.Logger.Warn("[WARNING] Please set `enabled` field explicitly for `string.resource.attr_disable_warning`: This resource_attribute will be disabled by default soon.") } - if mbc.ResourceAttributes.StringResourceAttrRemoveWarning.enabledSetByUser { + if mbc.ResourceAttributes.StringResourceAttrRemoveWarning.enabledSetByUser || mbc.ResourceAttributes.StringResourceAttrRemoveWarning.MetricsInclude != nil || mbc.ResourceAttributes.StringResourceAttrRemoveWarning.MetricsExclude != nil { settings.Logger.Warn("[WARNING] `string.resource.attr_remove_warning` should not be configured: This resource_attribute is deprecated and will be removed soon.") } if mbc.ResourceAttributes.StringResourceAttrToBeRemoved.Enabled { @@ -307,9 +370,61 @@ func NewMetricsBuilder(mbc MetricsBuilderConfig, settings receiver.CreateSetting buildInfo: settings.BuildInfo, metricDefaultMetric: newMetricDefaultMetric(mbc.Metrics.DefaultMetric), metricDefaultMetricToBeRemoved: newMetricDefaultMetricToBeRemoved(mbc.Metrics.DefaultMetricToBeRemoved), + metricMetricInputType: newMetricMetricInputType(mbc.Metrics.MetricInputType), metricOptionalMetric: newMetricOptionalMetric(mbc.Metrics.OptionalMetric), metricOptionalMetricEmptyUnit: newMetricOptionalMetricEmptyUnit(mbc.Metrics.OptionalMetricEmptyUnit), + resourceAttributeIncludeFilter: make(map[string]filter.Filter), + resourceAttributeExcludeFilter: make(map[string]filter.Filter), + } + if mbc.ResourceAttributes.MapResourceAttr.MetricsInclude != nil { + mb.resourceAttributeIncludeFilter["map.resource.attr"] = filter.CreateFilter(mbc.ResourceAttributes.MapResourceAttr.MetricsInclude) + } + if mbc.ResourceAttributes.MapResourceAttr.MetricsExclude != nil { + mb.resourceAttributeExcludeFilter["map.resource.attr"] = filter.CreateFilter(mbc.ResourceAttributes.MapResourceAttr.MetricsExclude) + } + if mbc.ResourceAttributes.OptionalResourceAttr.MetricsInclude != nil { + mb.resourceAttributeIncludeFilter["optional.resource.attr"] = filter.CreateFilter(mbc.ResourceAttributes.OptionalResourceAttr.MetricsInclude) + } + if mbc.ResourceAttributes.OptionalResourceAttr.MetricsExclude != nil { + mb.resourceAttributeExcludeFilter["optional.resource.attr"] = filter.CreateFilter(mbc.ResourceAttributes.OptionalResourceAttr.MetricsExclude) + } + if mbc.ResourceAttributes.SliceResourceAttr.MetricsInclude != nil { + mb.resourceAttributeIncludeFilter["slice.resource.attr"] = filter.CreateFilter(mbc.ResourceAttributes.SliceResourceAttr.MetricsInclude) + } + if mbc.ResourceAttributes.SliceResourceAttr.MetricsExclude != nil { + mb.resourceAttributeExcludeFilter["slice.resource.attr"] = filter.CreateFilter(mbc.ResourceAttributes.SliceResourceAttr.MetricsExclude) + } + if mbc.ResourceAttributes.StringEnumResourceAttr.MetricsInclude != nil { + mb.resourceAttributeIncludeFilter["string.enum.resource.attr"] = filter.CreateFilter(mbc.ResourceAttributes.StringEnumResourceAttr.MetricsInclude) } + if mbc.ResourceAttributes.StringEnumResourceAttr.MetricsExclude != nil { + mb.resourceAttributeExcludeFilter["string.enum.resource.attr"] = filter.CreateFilter(mbc.ResourceAttributes.StringEnumResourceAttr.MetricsExclude) + } + if mbc.ResourceAttributes.StringResourceAttr.MetricsInclude != nil { + mb.resourceAttributeIncludeFilter["string.resource.attr"] = filter.CreateFilter(mbc.ResourceAttributes.StringResourceAttr.MetricsInclude) + } + if mbc.ResourceAttributes.StringResourceAttr.MetricsExclude != nil { + mb.resourceAttributeExcludeFilter["string.resource.attr"] = filter.CreateFilter(mbc.ResourceAttributes.StringResourceAttr.MetricsExclude) + } + if mbc.ResourceAttributes.StringResourceAttrDisableWarning.MetricsInclude != nil { + mb.resourceAttributeIncludeFilter["string.resource.attr_disable_warning"] = filter.CreateFilter(mbc.ResourceAttributes.StringResourceAttrDisableWarning.MetricsInclude) + } + if mbc.ResourceAttributes.StringResourceAttrDisableWarning.MetricsExclude != nil { + mb.resourceAttributeExcludeFilter["string.resource.attr_disable_warning"] = filter.CreateFilter(mbc.ResourceAttributes.StringResourceAttrDisableWarning.MetricsExclude) + } + if mbc.ResourceAttributes.StringResourceAttrRemoveWarning.MetricsInclude != nil { + mb.resourceAttributeIncludeFilter["string.resource.attr_remove_warning"] = filter.CreateFilter(mbc.ResourceAttributes.StringResourceAttrRemoveWarning.MetricsInclude) + } + if mbc.ResourceAttributes.StringResourceAttrRemoveWarning.MetricsExclude != nil { + mb.resourceAttributeExcludeFilter["string.resource.attr_remove_warning"] = filter.CreateFilter(mbc.ResourceAttributes.StringResourceAttrRemoveWarning.MetricsExclude) + } + if mbc.ResourceAttributes.StringResourceAttrToBeRemoved.MetricsInclude != nil { + mb.resourceAttributeIncludeFilter["string.resource.attr_to_be_removed"] = filter.CreateFilter(mbc.ResourceAttributes.StringResourceAttrToBeRemoved.MetricsInclude) + } + if mbc.ResourceAttributes.StringResourceAttrToBeRemoved.MetricsExclude != nil { + mb.resourceAttributeExcludeFilter["string.resource.attr_to_be_removed"] = filter.CreateFilter(mbc.ResourceAttributes.StringResourceAttrToBeRemoved.MetricsExclude) + } + for _, op := range options { op(mb) } @@ -368,17 +483,29 @@ func (mb *MetricsBuilder) EmitForResource(rmo ...ResourceMetricsOption) { rm := pmetric.NewResourceMetrics() rm.SetSchemaUrl(conventions.SchemaURL) ils := rm.ScopeMetrics().AppendEmpty() - ils.Scope().SetName("go.opentelemetry.io/collector") + ils.Scope().SetName("go.opentelemetry.io/collector/internal/receiver/samplereceiver") ils.Scope().SetVersion(mb.buildInfo.Version) ils.Metrics().EnsureCapacity(mb.metricsCapacity) mb.metricDefaultMetric.emit(ils.Metrics()) mb.metricDefaultMetricToBeRemoved.emit(ils.Metrics()) + mb.metricMetricInputType.emit(ils.Metrics()) mb.metricOptionalMetric.emit(ils.Metrics()) mb.metricOptionalMetricEmptyUnit.emit(ils.Metrics()) for _, op := range rmo { op(rm) } + for attr, filter := range mb.resourceAttributeIncludeFilter { + if val, ok := rm.Resource().Attributes().Get(attr); ok && !filter.Matches(val.AsString()) { + return + } + } + for attr, filter := range mb.resourceAttributeExcludeFilter { + if val, ok := rm.Resource().Attributes().Get(attr); ok && filter.Matches(val.AsString()) { + return + } + } + if ils.Metrics().Len() > 0 { mb.updateCapacity(rm) rm.MoveTo(mb.metricsBuffer.ResourceMetrics().AppendEmpty()) @@ -405,6 +532,16 @@ func (mb *MetricsBuilder) RecordDefaultMetricToBeRemovedDataPoint(ts pcommon.Tim mb.metricDefaultMetricToBeRemoved.recordDataPoint(mb.startTime, ts, val) } +// RecordMetricInputTypeDataPoint adds a data point to metric.input_type metric. +func (mb *MetricsBuilder) RecordMetricInputTypeDataPoint(ts pcommon.Timestamp, inputVal string, stringAttrAttributeValue string, overriddenIntAttrAttributeValue int64, enumAttrAttributeValue AttributeEnumAttr, sliceAttrAttributeValue []any, mapAttrAttributeValue map[string]any) error { + val, err := strconv.ParseInt(inputVal, 10, 64) + if err != nil { + return fmt.Errorf("failed to parse int64 for MetricInputType, value was %s: %w", inputVal, err) + } + mb.metricMetricInputType.recordDataPoint(mb.startTime, ts, val, stringAttrAttributeValue, overriddenIntAttrAttributeValue, enumAttrAttributeValue.String(), sliceAttrAttributeValue, mapAttrAttributeValue) + return nil +} + // RecordOptionalMetricDataPoint adds a data point to optional.metric metric. func (mb *MetricsBuilder) RecordOptionalMetricDataPoint(ts pcommon.Timestamp, val float64, stringAttrAttributeValue string, booleanAttrAttributeValue bool) { mb.metricOptionalMetric.recordDataPoint(mb.startTime, ts, val, stringAttrAttributeValue, booleanAttrAttributeValue) diff --git a/cmd/mdatagen/internal/metadata/generated_metrics_test.go b/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_metrics_test.go similarity index 74% rename from cmd/mdatagen/internal/metadata/generated_metrics_test.go rename to cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_metrics_test.go index 4860ac1ba2b..b6214e5d894 100644 --- a/cmd/mdatagen/internal/metadata/generated_metrics_test.go +++ b/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_metrics_test.go @@ -14,30 +14,43 @@ import ( "go.opentelemetry.io/collector/receiver/receivertest" ) -type testConfigCollection int +type testDataSet int const ( - testSetDefault testConfigCollection = iota - testSetAll - testSetNone + testDataSetDefault testDataSet = iota + testDataSetAll + testDataSetNone ) func TestMetricsBuilder(t *testing.T) { tests := []struct { - name string - configSet testConfigCollection + name string + metricsSet testDataSet + resAttrsSet testDataSet + expectEmpty bool }{ { - name: "default", - configSet: testSetDefault, + name: "default", }, { - name: "all_set", - configSet: testSetAll, + name: "all_set", + metricsSet: testDataSetAll, + resAttrsSet: testDataSetAll, }, { - name: "none_set", - configSet: testSetNone, + name: "none_set", + metricsSet: testDataSetNone, + resAttrsSet: testDataSetNone, + expectEmpty: true, + }, + { + name: "filter_set_include", + resAttrsSet: testDataSetAll, + }, + { + name: "filter_set_exclude", + resAttrsSet: testDataSetAll, + expectEmpty: true, }, } for _, test := range tests { @@ -50,31 +63,31 @@ func TestMetricsBuilder(t *testing.T) { mb := NewMetricsBuilder(loadMetricsBuilderConfig(t, test.name), settings, WithStartTime(start)) expectedWarnings := 0 - if test.configSet == testSetDefault { + if test.metricsSet == testDataSetDefault { assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `default.metric`: This metric will be disabled by default soon.", observedLogs.All()[expectedWarnings].Message) expectedWarnings++ } - if test.configSet == testSetDefault || test.configSet == testSetAll { + if test.metricsSet == testDataSetDefault || test.metricsSet == testDataSetAll { assert.Equal(t, "[WARNING] `default.metric.to_be_removed` should not be enabled: This metric is deprecated and will be removed soon.", observedLogs.All()[expectedWarnings].Message) expectedWarnings++ } - if test.configSet == testSetAll || test.configSet == testSetNone { + if test.metricsSet == testDataSetAll || test.metricsSet == testDataSetNone { assert.Equal(t, "[WARNING] `optional.metric` should not be configured: This metric is deprecated and will be removed soon.", observedLogs.All()[expectedWarnings].Message) expectedWarnings++ } - if test.configSet == testSetAll || test.configSet == testSetNone { + if test.metricsSet == testDataSetAll || test.metricsSet == testDataSetNone { assert.Equal(t, "[WARNING] `optional.metric.empty_unit` should not be configured: This metric is deprecated and will be removed soon.", observedLogs.All()[expectedWarnings].Message) expectedWarnings++ } - if test.configSet == testSetDefault { + if test.resAttrsSet == testDataSetDefault { assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `string.resource.attr_disable_warning`: This resource_attribute will be disabled by default soon.", observedLogs.All()[expectedWarnings].Message) expectedWarnings++ } - if test.configSet == testSetAll || test.configSet == testSetNone { + if test.resAttrsSet == testDataSetAll || test.resAttrsSet == testDataSetNone { assert.Equal(t, "[WARNING] `string.resource.attr_remove_warning` should not be configured: This resource_attribute is deprecated and will be removed soon.", observedLogs.All()[expectedWarnings].Message) expectedWarnings++ } - if test.configSet == testSetDefault || test.configSet == testSetAll { + if test.resAttrsSet == testDataSetDefault || test.resAttrsSet == testDataSetAll { assert.Equal(t, "[WARNING] `string.resource.attr_to_be_removed` should not be enabled: This resource_attribute is deprecated and will be removed soon.", observedLogs.All()[expectedWarnings].Message) expectedWarnings++ } @@ -92,6 +105,10 @@ func TestMetricsBuilder(t *testing.T) { allMetricsCount++ mb.RecordDefaultMetricToBeRemovedDataPoint(ts, 1) + defaultMetricsCount++ + allMetricsCount++ + mb.RecordMetricInputTypeDataPoint(ts, "1", "string_attr-val", 19, AttributeEnumAttrRed, []any{"slice_attr-item1", "slice_attr-item2"}, map[string]any{"key1": "map_attr-val1", "key2": "map_attr-val2"}) + allMetricsCount++ mb.RecordOptionalMetricDataPoint(ts, 1, "string_attr-val", true) @@ -110,7 +127,7 @@ func TestMetricsBuilder(t *testing.T) { res := rb.Emit() metrics := mb.Emit(WithResource(res)) - if test.configSet == testSetNone { + if test.expectEmpty { assert.Equal(t, 0, metrics.ResourceMetrics().Len()) return } @@ -120,10 +137,10 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, res, rm.Resource()) assert.Equal(t, 1, rm.ScopeMetrics().Len()) ms := rm.ScopeMetrics().At(0).Metrics() - if test.configSet == testSetDefault { + if test.metricsSet == testDataSetDefault { assert.Equal(t, defaultMetricsCount, ms.Len()) } - if test.configSet == testSetAll { + if test.metricsSet == testDataSetAll { assert.Equal(t, allMetricsCount, ms.Len()) } validatedMetrics := make(map[string]bool) @@ -172,6 +189,35 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, ts, dp.Timestamp()) assert.Equal(t, pmetric.NumberDataPointValueTypeDouble, dp.ValueType()) assert.Equal(t, float64(1), dp.DoubleValue()) + case "metric.input_type": + assert.False(t, validatedMetrics["metric.input_type"], "Found a duplicate in the metrics slice: metric.input_type") + validatedMetrics["metric.input_type"] = true + assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) + assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) + assert.Equal(t, "Monotonic cumulative sum int metric with string input_type enabled by default.", ms.At(i).Description()) + assert.Equal(t, "s", ms.At(i).Unit()) + assert.Equal(t, true, ms.At(i).Sum().IsMonotonic()) + assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) + dp := ms.At(i).Sum().DataPoints().At(0) + assert.Equal(t, start, dp.StartTimestamp()) + assert.Equal(t, ts, dp.Timestamp()) + assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType()) + assert.Equal(t, int64(1), dp.IntValue()) + attrVal, ok := dp.Attributes().Get("string_attr") + assert.True(t, ok) + assert.EqualValues(t, "string_attr-val", attrVal.Str()) + attrVal, ok = dp.Attributes().Get("state") + assert.True(t, ok) + assert.EqualValues(t, 19, attrVal.Int()) + attrVal, ok = dp.Attributes().Get("enum_attr") + assert.True(t, ok) + assert.EqualValues(t, "red", attrVal.Str()) + attrVal, ok = dp.Attributes().Get("slice_attr") + assert.True(t, ok) + assert.EqualValues(t, []any{"slice_attr-item1", "slice_attr-item2"}, attrVal.Slice().AsRaw()) + attrVal, ok = dp.Attributes().Get("map_attr") + assert.True(t, ok) + assert.EqualValues(t, map[string]any{"key1": "map_attr-val1", "key2": "map_attr-val2"}, attrVal.Map().AsRaw()) case "optional.metric": assert.False(t, validatedMetrics["optional.metric"], "Found a duplicate in the metrics slice: optional.metric") validatedMetrics["optional.metric"] = true diff --git a/cmd/mdatagen/internal/metadata/generated_resource.go b/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_resource.go similarity index 100% rename from cmd/mdatagen/internal/metadata/generated_resource.go rename to cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_resource.go diff --git a/cmd/mdatagen/internal/metadata/generated_resource_test.go b/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_resource_test.go similarity index 100% rename from cmd/mdatagen/internal/metadata/generated_resource_test.go rename to cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_resource_test.go diff --git a/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_status.go b/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_status.go new file mode 100644 index 00000000000..e3e8df2ad14 --- /dev/null +++ b/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_status.go @@ -0,0 +1,17 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" +) + +var ( + Type = component.MustNewType("sample") +) + +const ( + LogsStability = component.StabilityLevelDevelopment + TracesStability = component.StabilityLevelBeta + MetricsStability = component.StabilityLevelStable +) diff --git a/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_telemetry.go b/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_telemetry.go new file mode 100644 index 00000000000..2e9683259cd --- /dev/null +++ b/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_telemetry.go @@ -0,0 +1,18 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("go.opentelemetry.io/collector/internal/receiver/samplereceiver") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/internal/receiver/samplereceiver") +} diff --git a/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_telemetry_test.go b/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_telemetry_test.go new file mode 100644 index 00000000000..cfdc5ab89e3 --- /dev/null +++ b/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_telemetry_test.go @@ -0,0 +1,63 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/otel/metric" + embeddedmetric "go.opentelemetry.io/otel/metric/embedded" + noopmetric "go.opentelemetry.io/otel/metric/noop" + "go.opentelemetry.io/otel/trace" + embeddedtrace "go.opentelemetry.io/otel/trace/embedded" + nooptrace "go.opentelemetry.io/otel/trace/noop" + + "go.opentelemetry.io/collector/component" +) + +type mockMeter struct { + noopmetric.Meter + name string +} +type mockMeterProvider struct { + embeddedmetric.MeterProvider +} + +func (m mockMeterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter { + return mockMeter{name: name} +} + +type mockTracer struct { + nooptrace.Tracer + name string +} + +type mockTracerProvider struct { + embeddedtrace.TracerProvider +} + +func (m mockTracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { + return mockTracer{name: name} +} + +func TestProviders(t *testing.T) { + set := component.TelemetrySettings{ + MeterProvider: mockMeterProvider{}, + TracerProvider: mockTracerProvider{}, + } + + meter := Meter(set) + if m, ok := meter.(mockMeter); ok { + require.Equal(t, "go.opentelemetry.io/collector/internal/receiver/samplereceiver", m.name) + } else { + require.Fail(t, "returned Meter not mockMeter") + } + + tracer := Tracer(set) + if m, ok := tracer.(mockTracer); ok { + require.Equal(t, "go.opentelemetry.io/collector/internal/receiver/samplereceiver", m.name) + } else { + require.Fail(t, "returned Meter not mockTracer") + } +} diff --git a/cmd/mdatagen/internal/samplereceiver/internal/metadata/testdata/config.yaml b/cmd/mdatagen/internal/samplereceiver/internal/metadata/testdata/config.yaml new file mode 100644 index 00000000000..c4b7edd6568 --- /dev/null +++ b/cmd/mdatagen/internal/samplereceiver/internal/metadata/testdata/config.yaml @@ -0,0 +1,127 @@ +default: +all_set: + metrics: + default.metric: + enabled: true + default.metric.to_be_removed: + enabled: true + metric.input_type: + enabled: true + optional.metric: + enabled: true + optional.metric.empty_unit: + enabled: true + resource_attributes: + map.resource.attr: + enabled: true + optional.resource.attr: + enabled: true + slice.resource.attr: + enabled: true + string.enum.resource.attr: + enabled: true + string.resource.attr: + enabled: true + string.resource.attr_disable_warning: + enabled: true + string.resource.attr_remove_warning: + enabled: true + string.resource.attr_to_be_removed: + enabled: true +none_set: + metrics: + default.metric: + enabled: false + default.metric.to_be_removed: + enabled: false + metric.input_type: + enabled: false + optional.metric: + enabled: false + optional.metric.empty_unit: + enabled: false + resource_attributes: + map.resource.attr: + enabled: false + optional.resource.attr: + enabled: false + slice.resource.attr: + enabled: false + string.enum.resource.attr: + enabled: false + string.resource.attr: + enabled: false + string.resource.attr_disable_warning: + enabled: false + string.resource.attr_remove_warning: + enabled: false + string.resource.attr_to_be_removed: + enabled: false +filter_set_include: + resource_attributes: + map.resource.attr: + enabled: true + metrics_include: + - regexp: ".*" + optional.resource.attr: + enabled: true + metrics_include: + - regexp: ".*" + slice.resource.attr: + enabled: true + metrics_include: + - regexp: ".*" + string.enum.resource.attr: + enabled: true + metrics_include: + - regexp: ".*" + string.resource.attr: + enabled: true + metrics_include: + - regexp: ".*" + string.resource.attr_disable_warning: + enabled: true + metrics_include: + - regexp: ".*" + string.resource.attr_remove_warning: + enabled: true + metrics_include: + - regexp: ".*" + string.resource.attr_to_be_removed: + enabled: true + metrics_include: + - regexp: ".*" +filter_set_exclude: + resource_attributes: + map.resource.attr: + enabled: true + metrics_exclude: + - regexp: ".*" + optional.resource.attr: + enabled: true + metrics_exclude: + - strict: "optional.resource.attr-val" + slice.resource.attr: + enabled: true + metrics_exclude: + - regexp: ".*" + string.enum.resource.attr: + enabled: true + metrics_exclude: + - strict: "one" + string.resource.attr: + enabled: true + metrics_exclude: + - strict: "string.resource.attr-val" + string.resource.attr_disable_warning: + enabled: true + metrics_exclude: + - strict: "string.resource.attr_disable_warning-val" + string.resource.attr_remove_warning: + enabled: true + metrics_exclude: + - strict: "string.resource.attr_remove_warning-val" + string.resource.attr_to_be_removed: + enabled: true + metrics_exclude: + - strict: "string.resource.attr_to_be_removed-val" diff --git a/cmd/mdatagen/metadata-sample.yaml b/cmd/mdatagen/internal/samplereceiver/metadata.yaml similarity index 85% rename from cmd/mdatagen/metadata-sample.yaml rename to cmd/mdatagen/internal/samplereceiver/metadata.yaml index b9a5f8f6c90..06d544b18af 100644 --- a/cmd/mdatagen/metadata-sample.yaml +++ b/cmd/mdatagen/internal/samplereceiver/metadata.yaml @@ -1,6 +1,7 @@ -# Sample metric metadata file with all available configurations. +# Sample metadata file with all available configurations for a receiver. -type: file +type: sample +scope_name: go.opentelemetry.io/collector/internal/receiver/samplereceiver sem_conv_version: 1.9.0 @@ -10,7 +11,10 @@ status: development: [logs] beta: [traces] stable: [metrics] - distributions: [contrib] + distributions: [] + unsupported_platforms: [freebsd, illumos] + codeowners: + active: [dmitryax] warnings: - Any additional information that should be brought to the consumer's attention @@ -134,3 +138,14 @@ metrics: aggregation_temporality: delta warnings: if_enabled: This metric is deprecated and will be removed soon. + + metric.input_type: + enabled: true + description: Monotonic cumulative sum int metric with string input_type enabled by default. + unit: s + sum: + value_type: int + input_type: string + monotonic: true + aggregation_temporality: cumulative + attributes: [ string_attr, overridden_int_attr, enum_attr, slice_attr, map_attr ] diff --git a/cmd/mdatagen/internal/samplereceiver/metrics_test.go b/cmd/mdatagen/internal/samplereceiver/metrics_test.go new file mode 100644 index 00000000000..ec5f67cf0db --- /dev/null +++ b/cmd/mdatagen/internal/samplereceiver/metrics_test.go @@ -0,0 +1,20 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package samplereceiver + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/cmd/mdatagen/internal/samplereceiver/internal/metadata" + "go.opentelemetry.io/collector/receiver/receivertest" +) + +// TestGeneratedMetrics verifies that the internal/metadata API is generated correctly. +func TestGeneratedMetrics(t *testing.T) { + mb := metadata.NewMetricsBuilder(metadata.DefaultMetricsBuilderConfig(), receivertest.NewNopCreateSettings()) + m := mb.Emit() + require.Equal(t, 0, m.ResourceMetrics().Len()) +} diff --git a/cmd/mdatagen/lint_test.go b/cmd/mdatagen/lint_test.go index 5c470f302d7..f05d6615ea3 100644 --- a/cmd/mdatagen/lint_test.go +++ b/cmd/mdatagen/lint_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/require" ) -func Test_formatIdentifier(t *testing.T) { +func TestFormatIdentifier(t *testing.T) { var tests = []struct { input string want string diff --git a/cmd/mdatagen/loader.go b/cmd/mdatagen/loader.go index 8b4b996a5e2..20b20d0dc19 100644 --- a/cmd/mdatagen/loader.go +++ b/cmd/mdatagen/loader.go @@ -7,12 +7,14 @@ import ( "context" "errors" "fmt" - "os" + "os/exec" "path/filepath" "strings" "go.opentelemetry.io/collector/confmap" + "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/confmap/provider/fileprovider" + "go.opentelemetry.io/collector/filter" "go.opentelemetry.io/collector/pdata/pcommon" ) @@ -124,11 +126,7 @@ func (m *metric) Unmarshal(parser *confmap.Conf) error { if !parser.IsSet("enabled") { return errors.New("missing required field: `enabled`") } - err := parser.Unmarshal(m) - if err != nil { - return err - } - return nil + return parser.Unmarshal(m) } func (m metric) Data() MetricData { if m.Sum != nil { @@ -156,6 +154,10 @@ type attribute struct { NameOverride string `mapstructure:"name_override"` // Enabled defines whether the attribute is enabled by default. Enabled bool `mapstructure:"enabled"` + // Include can be used to filter attributes. + Include []filter.Config `mapstructure:"include"` + // Include can be used to filter attributes. + Exclude []filter.Config `mapstructure:"exclude"` // Enum can optionally describe the set of values to which the attribute can belong. Enum []string `mapstructure:"enum"` // Type is an attribute type. @@ -199,10 +201,24 @@ func (a attribute) TestValue() string { return "" } +type ignore struct { + Top []string `mapstructure:"top"` + Any []string `mapstructure:"any"` +} + +type goLeak struct { + Skip bool `mapstructure:"skip"` + Ignore ignore `mapstructure:"ignore"` + Setup string `mapstructure:"setup"` + Teardown string `mapstructure:"teardown"` +} + type tests struct { - Config any `mapstructure:"config"` - SkipLifecycle bool `mapstructure:"skip_lifecycle"` - ExpectConsumerError bool `mapstructure:"expect_consumer_error"` + Config any `mapstructure:"config"` + SkipLifecycle bool `mapstructure:"skip_lifecycle"` + SkipShutdown bool `mapstructure:"skip_shutdown"` + GoLeak goLeak `mapstructure:"goleak"` + ExpectConsumerError bool `mapstructure:"expect_consumer_error"` } type metadata struct { @@ -221,11 +237,11 @@ type metadata struct { // Metrics that can be emitted by the component. Metrics map[metricName]metric `mapstructure:"metrics"` // ScopeName of the metrics emitted by the component. - ScopeName string `mapstructure:"-"` + ScopeName string `mapstructure:"scope_name"` // ShortFolderName is the shortened folder name of the component, removing class if present ShortFolderName string `mapstructure:"-"` - Tests *tests `mapstructure:"tests"` + Tests tests `mapstructure:"tests"` } func setAttributesFullName(attrs map[attributeName]attribute) { @@ -242,7 +258,7 @@ type templateContext struct { } func loadMetadata(filePath string) (metadata, error) { - cp, err := fileprovider.New().Retrieve(context.Background(), "file:"+filePath, nil) + cp, err := fileprovider.NewFactory().Create(confmaptest.NewNopProviderSettings()).Retrieve(context.Background(), "file:"+filePath, nil) if err != nil { return metadata{}, err } @@ -252,12 +268,18 @@ func loadMetadata(filePath string) (metadata, error) { return metadata{}, err } - md := metadata{ScopeName: scopeName(filePath), ShortFolderName: shortFolderName(filePath)} - if err := conf.Unmarshal(&md); err != nil { + md := metadata{ShortFolderName: shortFolderName(filePath)} + if err = conf.Unmarshal(&md); err != nil { return md, err } + if md.ScopeName == "" { + md.ScopeName, err = packageName() + if err != nil { + return md, err + } + } - if err := md.Validate(); err != nil { + if err = md.Validate(); err != nil { return md, err } @@ -286,15 +308,11 @@ func shortFolderName(filePath string) string { return parentFolder } -func scopeName(filePath string) string { - sn := "go.opentelemetry.io/collector" - dirs := strings.Split(filepath.Dir(filePath), string(os.PathSeparator)) - for _, dir := range dirs { - for _, cType := range componentTypes { - if strings.HasSuffix(dir, cType) { - sn += "/" + dir - } - } +func packageName() (string, error) { + cmd := exec.Command("go", "list", "-f", "{{.ImportPath}}") + output, err := cmd.Output() + if err != nil { + return "", err } - return sn + return strings.TrimSpace(string(output)), nil } diff --git a/cmd/mdatagen/loader_test.go b/cmd/mdatagen/loader_test.go index aafacc8f252..cf3d59e07ce 100644 --- a/cmd/mdatagen/loader_test.go +++ b/cmd/mdatagen/loader_test.go @@ -8,30 +8,35 @@ import ( "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" ) -func Test_loadMetadata(t *testing.T) { +func TestLoadMetadata(t *testing.T) { tests := []struct { name string want metadata wantErr string }{ { - name: "metadata-sample.yaml", + name: "internal/samplereceiver/metadata.yaml", want: metadata{ - Type: "file", + Type: "sample", SemConvVersion: "1.9.0", Status: &Status{ Class: "receiver", - Stability: map[string][]string{ - "development": {"logs"}, - "beta": {"traces"}, - "stable": {"metrics"}, + Stability: map[component.StabilityLevel][]string{ + component.StabilityLevelDevelopment: {"logs"}, + component.StabilityLevelBeta: {"traces"}, + component.StabilityLevelStable: {"metrics"}, }, - Distributions: []string{"contrib"}, - Warnings: []string{"Any additional information that should be brought to the consumer's attention"}, + Distributions: []string{}, + Codeowners: &Codeowners{ + Active: []string{"dmitryax"}, + }, + Warnings: []string{"Any additional information that should be brought to the consumer's attention"}, + UnsupportedPlatforms: []string{"freebsd", "illumos"}, }, ResourceAttributes: map[attributeName]attribute{ "string.resource.attr": { @@ -213,9 +218,21 @@ func Test_loadMetadata(t *testing.T) { Mono: Mono{Monotonic: false}, }, }, + "metric.input_type": { + Enabled: true, + Description: "Monotonic cumulative sum int metric with string input_type enabled by default.", + Unit: strPtr("s"), + Sum: &sum{ + MetricValueType: MetricValueType{pmetric.NumberDataPointValueTypeInt}, + MetricInputType: MetricInputType{InputType: "string"}, + AggregationTemporality: AggregationTemporality{Aggregation: pmetric.AggregationTemporalityCumulative}, + Mono: Mono{Monotonic: true}, + }, + Attributes: []attributeName{"string_attr", "overridden_int_attr", "enum_attr", "slice_attr", "map_attr"}, + }, }, - ScopeName: "go.opentelemetry.io/collector", - ShortFolderName: ".", + ScopeName: "go.opentelemetry.io/collector/internal/receiver/samplereceiver", + ShortFolderName: "sample", }, }, { @@ -223,7 +240,7 @@ func Test_loadMetadata(t *testing.T) { want: metadata{ Type: "subcomponent", Parent: "parentComponent", - ScopeName: "go.opentelemetry.io/collector", + ScopeName: "go.opentelemetry.io/collector/cmd/mdatagen", ShortFolderName: "testdata", }, }, diff --git a/cmd/mdatagen/main.go b/cmd/mdatagen/main.go index 4d04bd0696f..8d7d1731faa 100644 --- a/cmd/mdatagen/main.go +++ b/cmd/mdatagen/main.go @@ -43,6 +43,7 @@ func run(ymlPath string) error { } ymlDir := filepath.Dir(ymlPath) + packageName := filepath.Base(ymlDir) md, err := loadMetadata(ymlPath) if err != nil { @@ -61,6 +62,22 @@ func run(ymlPath string) error { filepath.Join(codeDir, "generated_status.go"), md, "metadata"); err != nil { return err } + if err = generateFile(filepath.Join(tmplDir, "telemetry.go.tmpl"), + filepath.Join(codeDir, "generated_telemetry.go"), md, "metadata"); err != nil { + return err + } + if err = generateFile(filepath.Join(tmplDir, "telemetry_test.go.tmpl"), + filepath.Join(codeDir, "generated_telemetry_test.go"), md, "metadata"); err != nil { + return err + } + if err = generateFile(filepath.Join(tmplDir, "component_test.go.tmpl"), + filepath.Join(ymlDir, "generated_component_test.go"), md, packageName); err != nil { + return err + } + if err = generateFile(filepath.Join(tmplDir, "package_test.go.tmpl"), + filepath.Join(ymlDir, "generated_package_test.go"), md, packageName); err != nil { + return err + } } if _, err = os.Stat(filepath.Join(ymlDir, "README.md")); err == nil { @@ -73,13 +90,6 @@ func run(ymlPath string) error { } } - if md.Tests != nil { - if err = generateFile(filepath.Join(tmplDir, "component_test.go.tmpl"), - filepath.Join(ymlDir, "generated_component_test.go"), md, md.ShortFolderName+md.Status.Class); err != nil { - return err - } - } - if len(md.Metrics) == 0 && len(md.ResourceAttributes) == 0 { return nil } @@ -164,7 +174,8 @@ func templatize(tmplFile string, md metadata) *template.Template { } return result }, - "casesTitle": cases.Title(language.English).String, + "casesTitle": cases.Title(language.English).String, + "toLowerCase": strings.ToLower, "toCamelCase": func(s string) string { caser := cases.Title(language.English).String parts := strings.Split(s, "_") @@ -193,9 +204,6 @@ func templatize(tmplFile string, md metadata) *template.Template { "isConnector": func() bool { return md.Status.Class == "connector" }, - "skipLifecycle": func() bool { - return md.Tests.SkipLifecycle - }, "supportsLogs": func() bool { for _, signals := range md.Status.Stability { for _, s := range signals { diff --git a/cmd/mdatagen/main_test.go b/cmd/mdatagen/main_test.go index df3387fd167..bfd197a42fd 100644 --- a/cmd/mdatagen/main_test.go +++ b/cmd/mdatagen/main_test.go @@ -6,23 +6,27 @@ package main import ( "bytes" "fmt" + "go/parser" + "go/token" "os" "path/filepath" "testing" "github.com/stretchr/testify/require" - md "go.opentelemetry.io/collector/cmd/mdatagen/internal/metadata" - "go.opentelemetry.io/collector/receiver/receivertest" + "go.opentelemetry.io/collector/component" ) -func Test_runContents(t *testing.T) { +func TestRunContents(t *testing.T) { tests := []struct { yml string wantMetricsGenerated bool wantConfigGenerated bool wantStatusGenerated bool - wantTestsGenerated bool + wantGoleakIgnore bool + wantGoleakSkip bool + wantGoleakSetup bool + wantGoleakTeardown bool wantErr bool }{ { @@ -46,29 +50,44 @@ func Test_runContents(t *testing.T) { }, { yml: "with_tests_receiver.yaml", - wantTestsGenerated: true, wantStatusGenerated: true, }, { yml: "with_tests_exporter.yaml", - wantTestsGenerated: true, wantStatusGenerated: true, }, { yml: "with_tests_processor.yaml", - wantTestsGenerated: true, wantStatusGenerated: true, }, { yml: "with_tests_extension.yaml", - wantTestsGenerated: true, wantStatusGenerated: true, }, { yml: "with_tests_connector.yaml", - wantTestsGenerated: true, wantStatusGenerated: true, }, + { + yml: "with_goleak_ignores.yaml", + wantStatusGenerated: true, + wantGoleakIgnore: true, + }, + { + yml: "with_goleak_skip.yaml", + wantStatusGenerated: true, + wantGoleakSkip: true, + }, + { + yml: "with_goleak_setup.yaml", + wantStatusGenerated: true, + wantGoleakSetup: true, + }, + { + yml: "with_goleak_teardown.yaml", + wantStatusGenerated: true, + wantGoleakTeardown: true, + }, } for _, tt := range tests { t.Run(tt.yml, func(t *testing.T) { @@ -109,31 +128,63 @@ foo require.NoFileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_config_test.go")) } + var contents []byte if tt.wantStatusGenerated { require.FileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_status.go")) - contents, err := os.ReadFile(filepath.Join(tmpdir, "README.md")) // nolint: gosec + contents, err = os.ReadFile(filepath.Join(tmpdir, "README.md")) // nolint: gosec require.NoError(t, err) require.NotContains(t, string(contents), "foo") } else { require.NoFileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_status.go")) - contents, err := os.ReadFile(filepath.Join(tmpdir, "README.md")) // nolint: gosec + contents, err = os.ReadFile(filepath.Join(tmpdir, "README.md")) // nolint: gosec require.NoError(t, err) require.Contains(t, string(contents), "foo") } - if tt.wantTestsGenerated { - require.FileExists(t, filepath.Join(tmpdir, "generated_component_test.go")) - contents, err := os.ReadFile(filepath.Join(tmpdir, "generated_component_test.go")) // nolint: gosec - require.NoError(t, err) - require.Contains(t, string(contents), "func Test") + require.FileExists(t, filepath.Join(tmpdir, "generated_component_test.go")) + contents, err = os.ReadFile(filepath.Join(tmpdir, "generated_component_test.go")) // nolint: gosec + require.NoError(t, err) + require.Contains(t, string(contents), "func Test") + _, err = parser.ParseFile(token.NewFileSet(), "", contents, parser.DeclarationErrors) + require.NoError(t, err) + + require.FileExists(t, filepath.Join(tmpdir, "generated_package_test.go")) + contents, err = os.ReadFile(filepath.Join(tmpdir, "generated_package_test.go")) // nolint: gosec + require.NoError(t, err) + require.Contains(t, string(contents), "func TestMain") + _, err = parser.ParseFile(token.NewFileSet(), "", contents, parser.DeclarationErrors) + require.NoError(t, err) + + if tt.wantGoleakSkip { + require.Contains(t, string(contents), "skipping goleak test") + } else { + require.NotContains(t, string(contents), "skipping goleak test") + } + + if tt.wantGoleakIgnore { + require.Contains(t, string(contents), "IgnoreTopFunction") + require.Contains(t, string(contents), "IgnoreAnyFunction") + } else { + require.NotContains(t, string(contents), "IgnoreTopFunction") + require.NotContains(t, string(contents), "IgnoreAnyFunction") + } + + if tt.wantGoleakSetup { + require.Contains(t, string(contents), "setupFunc") + } else { + require.NotContains(t, string(contents), "setupFunc") + } + + if tt.wantGoleakTeardown { + require.Contains(t, string(contents), "teardownFunc") } else { - require.NoFileExists(t, filepath.Join(tmpdir, "generated_component_test.go")) + require.NotContains(t, string(contents), "teardownFunc") } }) } } -func Test_run(t *testing.T) { +func TestRun(t *testing.T) { type args struct { ymlPath string } @@ -162,14 +213,14 @@ func Test_run(t *testing.T) { } } -func Test_inlineReplace(t *testing.T) { +func TestInlineReplace(t *testing.T) { tests := []struct { name string markdown string outputFile string componentClass string warnings []string - stability map[string][]string + stability map[component.StabilityLevel][]string distros []string codeowners *Codeowners }{ @@ -298,8 +349,11 @@ Some warning there. Some info about a component `, outputFile: "readme_with_multiple_signals.md", - stability: map[string][]string{"beta": {"metrics"}, "alpha": {"logs"}}, - distros: []string{"contrib"}, + stability: map[component.StabilityLevel][]string{ + component.StabilityLevelBeta: {"metrics"}, + component.StabilityLevelAlpha: {"logs"}, + }, + distros: []string{"contrib"}, }, { name: "readme with cmd class", @@ -310,15 +364,18 @@ Some info about a component Some info about a component `, - outputFile: "readme_with_cmd_class.md", - stability: map[string][]string{"beta": {"metrics"}, "alpha": {"logs"}}, + outputFile: "readme_with_cmd_class.md", + stability: map[component.StabilityLevel][]string{ + component.StabilityLevelBeta: {"metrics"}, + component.StabilityLevelAlpha: {"logs"}, + }, componentClass: "cmd", distros: []string{}, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - stability := map[string][]string{"beta": {"metrics"}} + stability := map[component.StabilityLevel][]string{component.StabilityLevelBeta: {"metrics"}} if len(tt.stability) > 0 { stability = tt.stability } @@ -367,7 +424,9 @@ func TestGenerateStatusMetadata(t *testing.T) { md: metadata{ Type: "foo", Status: &Status{ - Stability: map[string][]string{"beta": {"metrics"}}, + Stability: map[component.StabilityLevel][]string{ + component.StabilityLevelBeta: {"metrics"}, + }, Distributions: []string{"contrib"}, Class: "receiver", }, @@ -378,25 +437,96 @@ package metadata import ( "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" ) var ( - Type = component.MustNewType("foo") - scopeName = "" + Type = component.MustNewType("foo") ) const ( MetricsStability = component.StabilityLevelBeta ) +`, + }, + { + name: "foo component with alpha status", + md: metadata{ + Type: "foo", + Status: &Status{ + Stability: map[component.StabilityLevel][]string{ + component.StabilityLevelAlpha: {"metrics"}, + }, + Distributions: []string{"contrib"}, + Class: "receiver", + }, + }, + expected: `// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" +) + +var ( + Type = component.MustNewType("foo") +) + +const ( + MetricsStability = component.StabilityLevelAlpha +) +`, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + tmpdir := t.TempDir() + err := generateFile("templates/status.go.tmpl", + filepath.Join(tmpdir, "generated_status.go"), tt.md, "metadata") + require.NoError(t, err) + actual, err := os.ReadFile(filepath.Join(tmpdir, "generated_status.go")) // nolint: gosec + require.NoError(t, err) + require.Equal(t, tt.expected, string(actual)) + }) + } +} + +func TestGenerateTelemetryMetadata(t *testing.T) { + tests := []struct { + name string + output string + md metadata + expected string + }{ + { + name: "foo component with beta status", + md: metadata{ + Type: "foo", + Status: &Status{ + Stability: map[component.StabilityLevel][]string{ + component.StabilityLevelBeta: {"metrics"}, + }, + Distributions: []string{"contrib"}, + Class: "receiver", + }, + }, + expected: `// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter(scopeName) + return settings.MeterProvider.Meter("") } func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer(scopeName) + return settings.TracerProvider.Tracer("") } `, }, @@ -405,7 +535,9 @@ func Tracer(settings component.TelemetrySettings) trace.Tracer { md: metadata{ Type: "foo", Status: &Status{ - Stability: map[string][]string{"alpha": {"metrics"}}, + Stability: map[component.StabilityLevel][]string{ + component.StabilityLevelAlpha: {"metrics"}, + }, Distributions: []string{"contrib"}, Class: "receiver", }, @@ -420,21 +552,12 @@ import ( "go.opentelemetry.io/otel/trace" ) -var ( - Type = component.MustNewType("foo") - scopeName = "" -) - -const ( - MetricsStability = component.StabilityLevelAlpha -) - func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter(scopeName) + return settings.MeterProvider.Meter("") } func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer(scopeName) + return settings.TracerProvider.Tracer("") } `, }, @@ -443,19 +566,12 @@ func Tracer(settings component.TelemetrySettings) trace.Tracer { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { tmpdir := t.TempDir() - err := generateFile("templates/status.go.tmpl", - filepath.Join(tmpdir, "generated_status.go"), tt.md, "metadata") + err := generateFile("templates/telemetry.go.tmpl", + filepath.Join(tmpdir, "generated_telemetry.go"), tt.md, "metadata") require.NoError(t, err) - actual, err := os.ReadFile(filepath.Join(tmpdir, "generated_status.go")) // nolint: gosec + actual, err := os.ReadFile(filepath.Join(tmpdir, "generated_telemetry.go")) // nolint: gosec require.NoError(t, err) require.Equal(t, tt.expected, string(actual)) }) } } - -// TestGenerated verifies that the internal/metadata API is generated correctly. -func TestGenerated(t *testing.T) { - mb := md.NewMetricsBuilder(md.DefaultMetricsBuilderConfig(), receivertest.NewNopCreateSettings()) - m := mb.Emit() - require.Equal(t, 0, m.ResourceMetrics().Len()) -} diff --git a/cmd/mdatagen/metadata-schema.yaml b/cmd/mdatagen/metadata-schema.yaml index 879307fdd3d..1363346971e 100644 --- a/cmd/mdatagen/metadata-schema.yaml +++ b/cmd/mdatagen/metadata-schema.yaml @@ -4,6 +4,9 @@ type: # Required for subcomponents: The type of the parent component. parent: string +# Optional: Scope name for the telemetry generated by the component. If not set, name of the go package will be used. +scope_name: string + # Required for components (Optional for subcomponents): A high-level view of the development status and use of this component status: # Required: The class of the component (For example receiver) @@ -109,5 +112,16 @@ metrics: # Lifecycle tests generated for this component. tests: config: # {} by default, specific testing configuration for lifecycle tests. + # Skip lifecycle tests for this component. Not recommended for components that are not in development. skip_lifecycle: false # false by default + # Skip shutdown tests for this component. Not recommended for components that are not in development. + skip_shutdown: false # false by default + # Whether it's expected that the Consume[Logs|Metrics|Traces] method will return an error with the given configuration. expect_consumer_error: true # false by default + goleak: # {} by default generates a package_test to enable check for leaks + skip: false # set to true if goleak tests should be skipped + setup: string # Optional: supports configuring a setup function that runs before goleak checks + teardown: string # Optional: supports configuring a teardown function that runs before goleak checks + ignore: + top: [string] # Optional: array of strings representing functions that should be ignore via IgnoreTopFunction + any: [string] # Optional: array of strings representing functions that should be ignore via IgnoreAnyFunction diff --git a/cmd/mdatagen/metricdata.go b/cmd/mdatagen/metricdata.go index f4515136aae..5bf77985cc9 100644 --- a/cmd/mdatagen/metricdata.go +++ b/cmd/mdatagen/metricdata.go @@ -125,7 +125,7 @@ func (d *gauge) Unmarshal(parser *confmap.Conf) error { if err := d.MetricValueType.Unmarshal(parser); err != nil { return err } - return parser.Unmarshal(d) + return parser.Unmarshal(d, confmap.WithIgnoreUnused()) } func (d gauge) Type() string { @@ -155,7 +155,7 @@ func (d *sum) Unmarshal(parser *confmap.Conf) error { if err := d.MetricValueType.Unmarshal(parser); err != nil { return err } - return parser.Unmarshal(d) + return parser.Unmarshal(d, confmap.WithIgnoreUnused()) } // TODO: Currently, this func will not be called because of https://github.com/open-telemetry/opentelemetry-collector/issues/6671. Uncomment function and diff --git a/exporter/otlpexporter/package_test.go b/cmd/mdatagen/package_test.go similarity index 89% rename from exporter/otlpexporter/package_test.go rename to cmd/mdatagen/package_test.go index c5fb1007f5b..5cd502ca564 100644 --- a/exporter/otlpexporter/package_test.go +++ b/cmd/mdatagen/package_test.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package otlpexporter +package main import ( "testing" diff --git a/cmd/mdatagen/statusdata.go b/cmd/mdatagen/statusdata.go index d65a5c20f58..c157b82a73c 100644 --- a/cmd/mdatagen/statusdata.go +++ b/cmd/mdatagen/statusdata.go @@ -4,23 +4,21 @@ package main import ( + "errors" "sort" + "strings" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap" ) // distros is a collection of distributions that can be referenced in the metadata.yaml files. // The rules below apply to every distribution added to this list: -// - The distribution must be open source. +// - The distribution is open source and maintained by the OpenTelemetry project. // - The link must point to a publicly accessible repository. var distros = map[string]string{ - "core": "https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol", - "contrib": "https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib", - "aws": "https://github.com/aws-observability/aws-otel-collector", - "grafana": "https://github.com/grafana/agent", - "observiq": "https://github.com/observIQ/observiq-otel-collector", - "redhat": "https://github.com/os-observability/redhat-opentelemetry-collector", - "splunk": "https://github.com/signalfx/splunk-otel-collector", - "sumo": "https://github.com/SumoLogic/sumologic-otel-collector", - "liatrio": "https://github.com/liatrio/liatrio-otel-collector", + "core": "https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol", + "contrib": "https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib", } type Codeowners struct { @@ -32,13 +30,15 @@ type Codeowners struct { SeekingNew bool `mapstructure:"seeking_new"` } +type StabilityMap map[component.StabilityLevel][]string + type Status struct { - Stability map[string][]string `mapstructure:"stability"` - Distributions []string `mapstructure:"distributions"` - Class string `mapstructure:"class"` - Warnings []string `mapstructure:"warnings"` - Codeowners *Codeowners `mapstructure:"codeowners"` - UnsupportedPlatforms []string `mapstructure:"unsupported_platforms"` + Stability StabilityMap `mapstructure:"stability"` + Distributions []string `mapstructure:"distributions"` + Class string `mapstructure:"class"` + Warnings []string `mapstructure:"warnings"` + Codeowners *Codeowners `mapstructure:"codeowners"` + UnsupportedPlatforms []string `mapstructure:"unsupported_platforms"` } func (s *Status) SortedDistributions() []string { @@ -60,3 +60,31 @@ func (s *Status) SortedDistributions() []string { }) return sorted } + +func (ms *StabilityMap) Unmarshal(parser *confmap.Conf) error { + *ms = make(StabilityMap) + raw := make(map[string][]string) + err := parser.Unmarshal(&raw) + if err != nil { + return err + } + for k, v := range raw { + switch strings.ToLower(k) { + case strings.ToLower(component.StabilityLevelUnmaintained.String()): + (*ms)[component.StabilityLevelUnmaintained] = v + case strings.ToLower(component.StabilityLevelDeprecated.String()): + (*ms)[component.StabilityLevelDeprecated] = v + case strings.ToLower(component.StabilityLevelDevelopment.String()): + (*ms)[component.StabilityLevelDevelopment] = v + case strings.ToLower(component.StabilityLevelAlpha.String()): + (*ms)[component.StabilityLevelAlpha] = v + case strings.ToLower(component.StabilityLevelBeta.String()): + (*ms)[component.StabilityLevelBeta] = v + case strings.ToLower(component.StabilityLevelStable.String()): + (*ms)[component.StabilityLevelStable] = v + default: + return errors.New("invalid stability level: " + k) + } + } + return nil +} diff --git a/cmd/mdatagen/templates/component_test.go.tmpl b/cmd/mdatagen/templates/component_test.go.tmpl index 3c82b1ed2d2..ca948214d80 100644 --- a/cmd/mdatagen/templates/component_test.go.tmpl +++ b/cmd/mdatagen/templates/component_test.go.tmpl @@ -1,51 +1,69 @@ // Code generated by mdatagen. DO NOT EDIT. -{{ if len .Status.UnsupportedPlatforms -}} +{{- if len .Status.UnsupportedPlatforms }} //go:build {{ range $i, $v := .Status.UnsupportedPlatforms }}{{ if $i }} && {{ end }}!{{ . }}{{ end }} {{- end }} package {{ .Package }} import ( + {{- if not (and .Tests.SkipLifecycle .Tests.SkipShutdown) }} "context" + {{- end }} "testing" + {{- if and (not (and .Tests.SkipLifecycle .Tests.SkipShutdown)) (or isExporter isProcessor) }} + "time" + {{- end }} "github.com/stretchr/testify/require" + {{- if not (and .Tests.SkipLifecycle .Tests.SkipShutdown) }} "go.opentelemetry.io/collector/component" + {{- end }} "go.opentelemetry.io/collector/component/componenttest" -{{ if isExporter }} + "go.opentelemetry.io/collector/confmap/confmaptest" + {{- if not (and .Tests.SkipLifecycle .Tests.SkipShutdown) }} + {{- if isExporter }} "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exportertest" -{{ end }} -{{ if isProcessor }} + {{- end }} + {{- if isProcessor }} "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/processor" "go.opentelemetry.io/collector/processor/processortest" -{{ end }} -{{ if isReceiver }} + {{- end }} + {{- if isReceiver }} "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/receiver" "go.opentelemetry.io/collector/receiver/receivertest" -{{ end }} -{{ if isExtension }} + {{- end }} + {{- if isExtension }} "go.opentelemetry.io/collector/extension/extensiontest" -{{ end }} -{{ if isConnector }} - "go.opentelemetry.io/collector/consumer/consumertest" + {{- end }} + {{- if isConnector }} "go.opentelemetry.io/collector/connector" "go.opentelemetry.io/collector/connector/connectortest" -{{ end }} - "go.opentelemetry.io/collector/confmap/confmaptest" -{{ if or (isExporter) (isProcessor) }} - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/testdata" -{{ end }} + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/consumer/consumertest" + {{- end }} + {{- if or isExporter isProcessor }} + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + {{- end }} + {{- end }} ) -func TestCheckConfigStruct(t *testing.T) { - componenttest.CheckConfigStruct(NewFactory().CreateDefaultConfig()) +func TestComponentFactoryType(t *testing.T) { + require.Equal(t, "{{ .Type }}", NewFactory().Type().String()) +} + +func TestComponentConfigStruct(t *testing.T) { + require.NoError(t, componenttest.CheckConfigStruct(NewFactory().CreateDefaultConfig())) } -{{ if isExporter }} +{{ if not (and .Tests.SkipLifecycle .Tests.SkipShutdown) -}} +{{ if isExporter -}} func TestComponentLifecycle(t *testing.T) { factory := NewFactory() @@ -87,39 +105,44 @@ func TestComponentLifecycle(t *testing.T) { require.NoError(t, component.UnmarshalConfig(sub, cfg)) for _, test := range tests { + {{- if not .Tests.SkipShutdown }} t.Run(test.name + "-shutdown", func(t *testing.T) { c, err := test.createFn(context.Background(), exportertest.NewNopCreateSettings(), cfg) require.NoError(t, err) err = c.Shutdown(context.Background()) require.NoError(t, err) }) + {{- end }} + {{- if not .Tests.SkipLifecycle }} t.Run(test.name + "-lifecycle", func(t *testing.T) { - {{ if skipLifecycle }} - // TODO support lifecycle - t.SkipNow() - {{ end }} c, err := test.createFn(context.Background(), exportertest.NewNopCreateSettings(), cfg) require.NoError(t, err) host := componenttest.NewNopHost() err = c.Start(context.Background(), host) require.NoError(t, err) require.NotPanics(t, func() { - switch e := c.(type) { - case exporter.Logs: - logs := testdata.GenerateLogsManyLogRecordsSameResource(2) + switch test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() if !e.Capabilities().MutatesData { logs.MarkReadOnly() } err = e.ConsumeLogs(context.Background(), logs) - case exporter.Metrics: - metrics := testdata.GenerateMetricsTwoMetrics() + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() if !e.Capabilities().MutatesData { metrics.MarkReadOnly() } err = e.ConsumeMetrics(context.Background(), metrics) - case exporter.Traces: - traces := testdata.GenerateTracesTwoSpansSameResource() + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() if !e.Capabilities().MutatesData { traces.MarkReadOnly() } @@ -132,6 +155,7 @@ func TestComponentLifecycle(t *testing.T) { err = c.Shutdown(context.Background()) require.NoError(t, err) }) + {{- end }} } } {{ end }} @@ -178,39 +202,44 @@ func TestComponentLifecycle(t *testing.T) { require.NoError(t, component.UnmarshalConfig(sub, cfg)) for _, test := range tests { + {{- if not .Tests.SkipShutdown }} t.Run(test.name + "-shutdown", func(t *testing.T) { c, err := test.createFn(context.Background(), processortest.NewNopCreateSettings(), cfg) require.NoError(t, err) err = c.Shutdown(context.Background()) require.NoError(t, err) }) + {{- end }} + {{- if not .Tests.SkipLifecycle }} t.Run(test.name + "-lifecycle", func(t *testing.T) { - {{ if skipLifecycle }} - // TODO support lifecycle - t.SkipNow() - {{ end }} c, err := test.createFn(context.Background(), processortest.NewNopCreateSettings(), cfg) require.NoError(t, err) host := componenttest.NewNopHost() err = c.Start(context.Background(), host) require.NoError(t, err) require.NotPanics(t, func() { - switch e := c.(type) { - case processor.Logs: - logs := testdata.GenerateLogsManyLogRecordsSameResource(2) + switch test.name { + case "logs": + e, ok := c.(processor.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() if !e.Capabilities().MutatesData { logs.MarkReadOnly() } err = e.ConsumeLogs(context.Background(), logs) - case processor.Metrics: - metrics := testdata.GenerateMetricsTwoMetrics() + case "metrics": + e, ok := c.(processor.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() if !e.Capabilities().MutatesData { metrics.MarkReadOnly() } err = e.ConsumeMetrics(context.Background(), metrics) - case processor.Traces: - traces := testdata.GenerateTracesTwoSpansSameResource() + case "traces": + e, ok := c.(processor.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() if !e.Capabilities().MutatesData { traces.MarkReadOnly() } @@ -221,6 +250,7 @@ func TestComponentLifecycle(t *testing.T) { err = c.Shutdown(context.Background()) require.NoError(t, err) }) + {{- end }} } } {{ end }} @@ -267,18 +297,17 @@ func TestComponentLifecycle(t *testing.T) { require.NoError(t, component.UnmarshalConfig(sub, cfg)) for _, test := range tests { + {{- if not .Tests.SkipShutdown }} t.Run(test.name + "-shutdown", func(t *testing.T) { c, err := test.createFn(context.Background(), receivertest.NewNopCreateSettings(), cfg) require.NoError(t, err) err = c.Shutdown(context.Background()) require.NoError(t, err) }) + {{- end }} + {{- if not .Tests.SkipLifecycle }} t.Run(test.name + "-lifecycle", func(t *testing.T) { - {{ if skipLifecycle }} - // TODO support lifecycle - t.SkipNow() - {{ end }} firstRcvr, err := test.createFn(context.Background(), receivertest.NewNopCreateSettings(), cfg) require.NoError(t, err) host := componenttest.NewNopHost() @@ -290,6 +319,7 @@ func TestComponentLifecycle(t *testing.T) { require.NoError(t, secondRcvr.Start(context.Background(), host)) require.NoError(t, secondRcvr.Shutdown(context.Background())) }) + {{- end }} } } {{ end }} @@ -305,18 +335,17 @@ func TestComponentLifecycle(t *testing.T) { require.NoError(t, err) require.NoError(t, component.UnmarshalConfig(sub, cfg)) + {{- if not .Tests.SkipShutdown }} t.Run("shutdown", func(t *testing.T) { e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) require.NoError(t, err) err = e.Shutdown(context.Background()) require.NoError(t, err) }) + {{- end }} + {{- if not .Tests.SkipLifecycle }} t.Run("lifecycle", func(t *testing.T) { - {{ if skipLifecycle }} - // TODO support lifecycle - t.SkipNow() - {{ end }} firstExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) require.NoError(t, err) require.NoError(t, firstExt.Start(context.Background(), componenttest.NewNopHost())) @@ -327,6 +356,7 @@ func TestComponentLifecycle(t *testing.T) { require.NoError(t, secondExt.Start(context.Background(), componenttest.NewNopHost())) require.NoError(t, secondExt.Shutdown(context.Background())) }) + {{- end }} } {{ end }} @@ -342,7 +372,8 @@ func TestComponentLifecycle(t *testing.T) { { name: "logs_to_logs", createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { - return factory.CreateLogsToLogs(ctx, set, cfg, consumertest.NewNop()) + router := connector.NewLogsRouter(map[component.ID]consumer.Logs{component.NewID(component.DataTypeLogs): consumertest.NewNop()}) + return factory.CreateLogsToLogs(ctx, set, cfg, router) }, }, {{ end }} @@ -350,7 +381,8 @@ func TestComponentLifecycle(t *testing.T) { { name: "logs_to_metrics", createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { - return factory.CreateLogsToMetrics(ctx, set, cfg, consumertest.NewNop()) + router := connector.NewMetricsRouter(map[component.ID]consumer.Metrics{component.NewID(component.DataTypeMetrics): consumertest.NewNop()}) + return factory.CreateLogsToMetrics(ctx, set, cfg, router) }, }, {{ end }} @@ -358,7 +390,8 @@ func TestComponentLifecycle(t *testing.T) { { name: "logs_to_traces", createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { - return factory.CreateLogsToTraces(ctx, set, cfg, consumertest.NewNop()) + router := connector.NewTracesRouter(map[component.ID]consumer.Traces{component.NewID(component.DataTypeTraces): consumertest.NewNop()}) + return factory.CreateLogsToTraces(ctx, set, cfg, router) }, }, {{ end }} @@ -366,7 +399,8 @@ func TestComponentLifecycle(t *testing.T) { { name: "metrics_to_logs", createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { - return factory.CreateMetricsToLogs(ctx, set, cfg, consumertest.NewNop()) + router := connector.NewLogsRouter(map[component.ID]consumer.Logs{component.NewID(component.DataTypeLogs): consumertest.NewNop()}) + return factory.CreateMetricsToLogs(ctx, set, cfg, router) }, }, {{ end }} @@ -374,7 +408,8 @@ func TestComponentLifecycle(t *testing.T) { { name: "metrics_to_metrics", createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { - return factory.CreateMetricsToMetrics(ctx, set, cfg, consumertest.NewNop()) + router := connector.NewMetricsRouter(map[component.ID]consumer.Metrics{component.NewID(component.DataTypeMetrics): consumertest.NewNop()}) + return factory.CreateMetricsToMetrics(ctx, set, cfg, router) }, }, {{ end }} @@ -382,7 +417,8 @@ func TestComponentLifecycle(t *testing.T) { { name: "metrics_to_traces", createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { - return factory.CreateMetricsToTraces(ctx, set, cfg, consumertest.NewNop()) + router := connector.NewTracesRouter(map[component.ID]consumer.Traces{component.NewID(component.DataTypeTraces): consumertest.NewNop()}) + return factory.CreateMetricsToTraces(ctx, set, cfg, router) }, }, {{ end }} @@ -390,7 +426,8 @@ func TestComponentLifecycle(t *testing.T) { { name: "traces_to_logs", createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { - return factory.CreateTracesToLogs(ctx, set, cfg, consumertest.NewNop()) + router := connector.NewLogsRouter(map[component.ID]consumer.Logs{component.NewID(component.DataTypeLogs): consumertest.NewNop()}) + return factory.CreateTracesToLogs(ctx, set, cfg, router) }, }, {{ end }} @@ -398,7 +435,8 @@ func TestComponentLifecycle(t *testing.T) { { name: "traces_to_metrics", createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { - return factory.CreateTracesToMetrics(ctx, set, cfg, consumertest.NewNop()) + router := connector.NewMetricsRouter(map[component.ID]consumer.Metrics{component.NewID(component.DataTypeMetrics): consumertest.NewNop()}) + return factory.CreateTracesToMetrics(ctx, set, cfg, router) }, }, {{ end }} @@ -406,7 +444,8 @@ func TestComponentLifecycle(t *testing.T) { { name: "traces_to_traces", createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { - return factory.CreateTracesToTraces(ctx, set, cfg, consumertest.NewNop()) + router := connector.NewTracesRouter(map[component.ID]consumer.Traces{component.NewID(component.DataTypeTraces): consumertest.NewNop()}) + return factory.CreateTracesToTraces(ctx, set, cfg, router) }, }, {{ end }} @@ -420,21 +459,20 @@ func TestComponentLifecycle(t *testing.T) { require.NoError(t, component.UnmarshalConfig(sub, cfg)) for _, test := range tests { + {{- if not .Tests.SkipShutdown }} t.Run(test.name + "-shutdown", func(t *testing.T) { c, err := test.createFn(context.Background(), connectortest.NewNopCreateSettings(), cfg) require.NoError(t, err) err = c.Shutdown(context.Background()) require.NoError(t, err) }) + {{- end }} + {{- if not .Tests.SkipLifecycle }} t.Run(test.name + "-lifecycle", func(t *testing.T) { - {{ if skipLifecycle }} - // TODO support lifecycle - t.SkipNow() - {{ end }} firstConnector, err := test.createFn(context.Background(), connectortest.NewNopCreateSettings(), cfg) require.NoError(t, err) - host := newAssertNoErrorHost(t) + host := componenttest.NewNopHost() require.NoError(t, err) require.NoError(t, firstConnector.Start(context.Background(), host)) require.NoError(t, firstConnector.Shutdown(context.Background())) @@ -443,6 +481,45 @@ func TestComponentLifecycle(t *testing.T) { require.NoError(t, secondConnector.Start(context.Background(), host)) require.NoError(t, secondConnector.Shutdown(context.Background())) }) + {{- end }} } } -{{ end }} \ No newline at end of file +{{ end }} + +{{ if or isExporter isProcessor -}} +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} +{{- end }} +{{- end }} diff --git a/cmd/mdatagen/templates/config.go.tmpl b/cmd/mdatagen/templates/config.go.tmpl index 712602222e7..877d435754b 100644 --- a/cmd/mdatagen/templates/config.go.tmpl +++ b/cmd/mdatagen/templates/config.go.tmpl @@ -2,10 +2,12 @@ package {{ .Package }} -{{ if or .Metrics .ResourceAttributes -}} -import "go.opentelemetry.io/collector/confmap" -{{- end }} - +import ( + "go.opentelemetry.io/collector/confmap" + {{ if and .Metrics .ResourceAttributes -}} + "go.opentelemetry.io/collector/filter" + {{- end }} +) {{ if .Metrics -}} // MetricConfig provides common config for a particular metric. @@ -49,6 +51,15 @@ func DefaultMetricsConfig() MetricsConfig { // ResourceAttributeConfig provides common config for a particular resource attribute. type ResourceAttributeConfig struct { Enabled bool `mapstructure:"enabled"` + {{- if .Metrics }} + // Experimental: MetricsInclude defines a list of filters for attribute values. + // If the list is not empty, only metrics with matching resource attribute values will be emitted. + MetricsInclude []filter.Config `mapstructure:"metrics_include"` + // Experimental: MetricsExclude defines a list of filters for attribute values. + // If the list is not empty, metrics with matching resource attribute values will not be emitted. + // MetricsInclude has higher priority than MetricsExclude. + MetricsExclude []filter.Config `mapstructure:"metrics_exclude"` + {{- end }} enabledSetByUser bool } diff --git a/cmd/mdatagen/templates/metrics.go.tmpl b/cmd/mdatagen/templates/metrics.go.tmpl index c76623c40fc..14428451c1e 100644 --- a/cmd/mdatagen/templates/metrics.go.tmpl +++ b/cmd/mdatagen/templates/metrics.go.tmpl @@ -16,6 +16,9 @@ import ( {{- if .SemConvVersion }} conventions "go.opentelemetry.io/collector/semconv/v{{ .SemConvVersion }}" {{- end }} + {{ if .ResourceAttributes -}} + "go.opentelemetry.io/collector/filter" + {{- end }} ) {{ range $name, $info := .Attributes }} @@ -132,6 +135,10 @@ type MetricsBuilder struct { metricsCapacity int // maximum observed number of metrics per resource. metricsBuffer pmetric.Metrics // accumulates metrics data before emitting. buildInfo component.BuildInfo // contains version information. + {{- if .ResourceAttributes }} + resourceAttributeIncludeFilter map[string]filter.Filter + resourceAttributeExcludeFilter map[string]filter.Filter + {{- end }} {{- range $name, $metric := .Metrics }} metric{{ $name.Render }} metric{{ $name.Render }} {{- end }} @@ -177,7 +184,7 @@ func NewMetricsBuilder(mbc MetricsBuilderConfig, settings receiver.CreateSetting } {{- end }} {{- if $attr.Warnings.IfConfigured }} - if mbc.ResourceAttributes.{{ $name.Render }}.enabledSetByUser { + if mbc.ResourceAttributes.{{ $name.Render }}.enabledSetByUser || mbc.ResourceAttributes.{{ $name.Render }}.MetricsInclude != nil || mbc.ResourceAttributes.{{ $name.Render }}.MetricsExclude != nil { settings.Logger.Warn("[WARNING] `{{ $name }}` should not be configured: {{ $attr.Warnings.IfConfigured }}") } {{- end }} @@ -190,7 +197,20 @@ func NewMetricsBuilder(mbc MetricsBuilderConfig, settings receiver.CreateSetting {{- range $name, $metric := .Metrics }} metric{{ $name.Render }}: newMetric{{ $name.Render }}(mbc.Metrics.{{ $name.Render }}), {{- end }} + {{ if .ResourceAttributes -}} + resourceAttributeIncludeFilter: make(map[string]filter.Filter), + resourceAttributeExcludeFilter: make(map[string]filter.Filter), + {{- end }} } + {{- range $name, $attr := .ResourceAttributes }} + if mbc.ResourceAttributes.{{ $name.Render }}.MetricsInclude != nil { + mb.resourceAttributeIncludeFilter["{{ $name }}"] = filter.CreateFilter(mbc.ResourceAttributes.{{ $name.Render }}.MetricsInclude) + } + if mbc.ResourceAttributes.{{ $name.Render }}.MetricsExclude != nil { + mb.resourceAttributeExcludeFilter["{{ $name }}"] = filter.CreateFilter(mbc.ResourceAttributes.{{ $name.Render }}.MetricsExclude) + } + {{- end }} + for _, op := range options { op(mb) } @@ -263,6 +283,19 @@ func (mb *MetricsBuilder) EmitForResource(rmo ...ResourceMetricsOption) { for _, op := range rmo { op(rm) } + {{ if .ResourceAttributes -}} + for attr, filter := range mb.resourceAttributeIncludeFilter { + if val, ok := rm.Resource().Attributes().Get(attr); ok && !filter.Matches(val.AsString()) { + return + } + } + for attr, filter := range mb.resourceAttributeExcludeFilter { + if val, ok := rm.Resource().Attributes().Get(attr); ok && filter.Matches(val.AsString()) { + return + } + } + {{- end }} + if ils.Metrics().Len() > 0 { mb.updateCapacity(rm) rm.MoveTo(mb.metricsBuffer.ResourceMetrics().AppendEmpty()) diff --git a/cmd/mdatagen/templates/metrics_test.go.tmpl b/cmd/mdatagen/templates/metrics_test.go.tmpl index bf7b09d05a9..13342842eab 100644 --- a/cmd/mdatagen/templates/metrics_test.go.tmpl +++ b/cmd/mdatagen/templates/metrics_test.go.tmpl @@ -14,31 +14,46 @@ import ( ) -type testConfigCollection int +type testDataSet int const ( - testSetDefault testConfigCollection = iota - testSetAll - testSetNone + testDataSetDefault testDataSet = iota + testDataSetAll + testDataSetNone ) func TestMetricsBuilder(t *testing.T) { tests := []struct { - name string - configSet testConfigCollection + name string + metricsSet testDataSet + resAttrsSet testDataSet + expectEmpty bool }{ { - name: "default", - configSet: testSetDefault, + name: "default", }, { - name: "all_set", - configSet: testSetAll, + name: "all_set", + metricsSet: testDataSetAll, + resAttrsSet: testDataSetAll, }, { - name: "none_set", - configSet: testSetNone, + name: "none_set", + metricsSet: testDataSetNone, + resAttrsSet: testDataSetNone, + expectEmpty: true, }, + {{- if .ResourceAttributes }} + { + name: "filter_set_include", + resAttrsSet: testDataSetAll, + }, + { + name: "filter_set_exclude", + resAttrsSet: testDataSetAll, + expectEmpty: true, + }, + {{- end }} } for _, test := range tests { t.Run(test.name, func(t *testing.T) { @@ -52,19 +67,19 @@ func TestMetricsBuilder(t *testing.T) { expectedWarnings := 0 {{- range $name, $metric := .Metrics }} {{- if and $metric.Enabled $metric.Warnings.IfEnabled }} - if test.configSet == testSetDefault || test.configSet == testSetAll { + if test.metricsSet == testDataSetDefault || test.metricsSet == testDataSetAll { assert.Equal(t, "[WARNING] `{{ $name }}` should not be enabled: {{ $metric.Warnings.IfEnabled }}", observedLogs.All()[expectedWarnings].Message) expectedWarnings++ } {{- end }} {{- if $metric.Warnings.IfEnabledNotSet }} - if test.configSet == testSetDefault { + if test.metricsSet == testDataSetDefault { assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `{{ $name }}`: {{ $metric.Warnings.IfEnabledNotSet }}", observedLogs.All()[expectedWarnings].Message) expectedWarnings++ } {{- end }} {{- if $metric.Warnings.IfConfigured }} - if test.configSet == testSetAll || test.configSet == testSetNone { + if test.metricsSet == testDataSetAll || test.metricsSet == testDataSetNone { assert.Equal(t, "[WARNING] `{{ $name }}` should not be configured: {{ $metric.Warnings.IfConfigured }}", observedLogs.All()[expectedWarnings].Message) expectedWarnings++ } @@ -72,19 +87,19 @@ func TestMetricsBuilder(t *testing.T) { {{- end }} {{- range $name, $attr := .ResourceAttributes }} {{- if and $attr.Enabled $attr.Warnings.IfEnabled }} - if test.configSet == testSetDefault || test.configSet == testSetAll { + if test.resAttrsSet == testDataSetDefault || test.resAttrsSet == testDataSetAll { assert.Equal(t, "[WARNING] `{{ $name }}` should not be enabled: {{ $attr.Warnings.IfEnabled }}", observedLogs.All()[expectedWarnings].Message) expectedWarnings++ } {{- end }} {{- if $attr.Warnings.IfEnabledNotSet }} - if test.configSet == testSetDefault { + if test.resAttrsSet == testDataSetDefault { assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `{{ $name }}`: {{ $attr.Warnings.IfEnabledNotSet }}", observedLogs.All()[expectedWarnings].Message) expectedWarnings++ } {{- end }} {{- if $attr.Warnings.IfConfigured }} - if test.configSet == testSetAll || test.configSet == testSetNone { + if test.resAttrsSet == testDataSetAll || test.resAttrsSet == testDataSetNone { assert.Equal(t, "[WARNING] `{{ $name }}` should not be configured: {{ $attr.Warnings.IfConfigured }}", observedLogs.All()[expectedWarnings].Message) expectedWarnings++ } @@ -121,7 +136,7 @@ func TestMetricsBuilder(t *testing.T) { {{- end }} metrics := mb.Emit(WithResource(res)) - if test.configSet == testSetNone { + if test.expectEmpty { assert.Equal(t, 0, metrics.ResourceMetrics().Len()) return } @@ -131,10 +146,10 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, res, rm.Resource()) assert.Equal(t, 1, rm.ScopeMetrics().Len()) ms := rm.ScopeMetrics().At(0).Metrics() - if test.configSet == testSetDefault { + if test.metricsSet == testDataSetDefault { assert.Equal(t, defaultMetricsCount, ms.Len()) } - if test.configSet == testSetAll { + if test.metricsSet == testDataSetAll { assert.Equal(t, allMetricsCount, ms.Len()) } validatedMetrics := make(map[string]bool) diff --git a/cmd/mdatagen/templates/package_test.go.tmpl b/cmd/mdatagen/templates/package_test.go.tmpl new file mode 100644 index 00000000000..d0c8f823748 --- /dev/null +++ b/cmd/mdatagen/templates/package_test.go.tmpl @@ -0,0 +1,25 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package {{ .Package }} + +import ( + "testing" + + {{- if not .Tests.GoLeak.Skip }} + "go.uber.org/goleak" + {{- end }} +) + +func TestMain(m *testing.M) { + {{- if .Tests.GoLeak.Setup }} + {{.Tests.GoLeak.Setup}} + {{- end }} + {{- if .Tests.GoLeak.Skip }} + // skipping goleak test as per metadata.yml configuration + {{- else }} + goleak.VerifyTestMain(m {{- range $val := .Tests.GoLeak.Ignore.Top}}, goleak.IgnoreTopFunction("{{$val}}"){{end}}{{- range $val := .Tests.GoLeak.Ignore.Any}}, goleak.IgnoreAnyFunction("{{$val}}"){{end}} ) + {{- end }} + {{- if .Tests.GoLeak.Teardown }} + {{.Tests.GoLeak.Teardown}} + {{- end }} +} diff --git a/cmd/mdatagen/templates/readme.md.tmpl b/cmd/mdatagen/templates/readme.md.tmpl index ad41f11dd42..3ead446b982 100644 --- a/cmd/mdatagen/templates/readme.md.tmpl +++ b/cmd/mdatagen/templates/readme.md.tmpl @@ -7,10 +7,13 @@ {{- if ne $class "connector" }} {{- $idx := 0 }} {{- range $stability, $value := .Status.Stability }} -| {{ if not $idx }}Stability{{ else }} {{ end }} | [{{ $stability }}]{{ if ne $class "extension" }}: {{ stringsJoin $value ", " }} {{ end }} | +| {{ if not $idx }}Stability{{ else }} {{ end }} | [{{ toLowerCase $stability.String }}]{{ if ne $class "extension" }}: {{ stringsJoin $value ", " }} {{ end }} | {{- $idx = inc $idx }} {{- end }} {{- end}} +{{- if .Status.UnsupportedPlatforms }} +| Unsupported Platforms | {{ stringsJoin .Status.UnsupportedPlatforms ", " }} | +{{- end }} {{- if and (ne $class "cmd") (ne $class "pkg") }} | Distributions | [{{ stringsJoin .Status.SortedDistributions "], [" }}] | {{- end }} @@ -29,7 +32,7 @@ {{- end }} {{- end }} {{range $stability, $val := .Status.Stability}} -[{{ $stability }}]: https://github.com/open-telemetry/opentelemetry-collector#{{ $stability }} +[{{ toLowerCase $stability.String }}]: https://github.com/open-telemetry/opentelemetry-collector#{{ toLowerCase $stability.String }} {{- end }} {{- range .Status.SortedDistributions }} [{{.}}]: {{ distroURL . }} @@ -43,7 +46,7 @@ {{- range $stability, $pipelines := .Status.Stability }} {{- range $pipeline := $pipelines }} {{- $parts := stringsSplit $pipeline "_to_" }} -| {{index $parts 0}} | {{index $parts 1}} | [{{$stability}}] | +| {{index $parts 0}} | {{index $parts 1}} | [{{ toLowerCase $stability.String }}] | {{- end }} {{- end }} diff --git a/cmd/mdatagen/templates/status.go.tmpl b/cmd/mdatagen/templates/status.go.tmpl index d35cf76ff01..b90047f7dd0 100644 --- a/cmd/mdatagen/templates/status.go.tmpl +++ b/cmd/mdatagen/templates/status.go.tmpl @@ -3,28 +3,17 @@ package {{ .Package }} import ( - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" + "go.opentelemetry.io/collector/component" ) var ( Type = component.MustNewType("{{ .Type }}") - scopeName = "{{ .ScopeName }}" ) const ( {{- range $stability, $signals := .Status.Stability }} {{- range $signal := $signals }} - {{ toCamelCase $signal }}Stability = component.StabilityLevel{{ casesTitle $stability }} + {{ toCamelCase $signal }}Stability = component.StabilityLevel{{ casesTitle $stability.String }} {{- end }} {{- end }} ) - -func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter(scopeName) -} - -func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer(scopeName) -} diff --git a/cmd/mdatagen/templates/telemetry.go.tmpl b/cmd/mdatagen/templates/telemetry.go.tmpl new file mode 100644 index 00000000000..f0b430f3653 --- /dev/null +++ b/cmd/mdatagen/templates/telemetry.go.tmpl @@ -0,0 +1,17 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package {{ .Package }} + +import ( + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("{{ .ScopeName }}") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("{{ .ScopeName }}") +} diff --git a/cmd/mdatagen/templates/telemetry_test.go.tmpl b/cmd/mdatagen/templates/telemetry_test.go.tmpl new file mode 100644 index 00000000000..073a53d2aec --- /dev/null +++ b/cmd/mdatagen/templates/telemetry_test.go.tmpl @@ -0,0 +1,63 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package {{ .Package }} + +import ( + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/otel/metric" + embeddedmetric "go.opentelemetry.io/otel/metric/embedded" + noopmetric "go.opentelemetry.io/otel/metric/noop" + "go.opentelemetry.io/otel/trace" + embeddedtrace "go.opentelemetry.io/otel/trace/embedded" + nooptrace "go.opentelemetry.io/otel/trace/noop" + + "go.opentelemetry.io/collector/component" +) + +type mockMeter struct { + noopmetric.Meter + name string +} +type mockMeterProvider struct { + embeddedmetric.MeterProvider +} + +func (m mockMeterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter { + return mockMeter{name: name} +} + +type mockTracer struct { + nooptrace.Tracer + name string +} + +type mockTracerProvider struct { + embeddedtrace.TracerProvider +} + +func (m mockTracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { + return mockTracer{name: name} +} + +func TestProviders(t *testing.T) { + set := component.TelemetrySettings{ + MeterProvider: mockMeterProvider{}, + TracerProvider: mockTracerProvider{}, + } + + meter := Meter(set) + if m, ok := meter.(mockMeter); ok { + require.Equal(t, "{{ .ScopeName }}", m.name) + } else { + require.Fail(t, "returned Meter not mockMeter") + } + + tracer := Tracer(set) + if m, ok := tracer.(mockTracer); ok { + require.Equal(t, "{{ .ScopeName }}", m.name) + } else { + require.Fail(t, "returned Meter not mockTracer") + } +} diff --git a/cmd/mdatagen/templates/testdata/config.yaml.tmpl b/cmd/mdatagen/templates/testdata/config.yaml.tmpl index 8b32773ec45..394646cc297 100644 --- a/cmd/mdatagen/templates/testdata/config.yaml.tmpl +++ b/cmd/mdatagen/templates/testdata/config.yaml.tmpl @@ -29,3 +29,25 @@ none_set: enabled: false {{- end }} {{- end }} +{{- if and .Metrics .ResourceAttributes }} +filter_set_include: + resource_attributes: + {{- range $name, $attr := .ResourceAttributes }} + {{ $name }}: + enabled: true + metrics_include: + - regexp: ".*" + {{- end }} +filter_set_exclude: + resource_attributes: + {{- range $name, $attr := .ResourceAttributes }} + {{ $name }}: + enabled: true + metrics_exclude: + {{- if eq $attr.Type.String "Str" }} + - strict: {{ $attr.TestValue }} + {{- else }} + - regexp: ".*" + {{- end }} + {{- end }} +{{- end }} diff --git a/cmd/mdatagen/testdata/metrics_and_type.yaml b/cmd/mdatagen/testdata/metrics_and_type.yaml index 81d66bde9c1..2306a08b35e 100644 --- a/cmd/mdatagen/testdata/metrics_and_type.yaml +++ b/cmd/mdatagen/testdata/metrics_and_type.yaml @@ -17,3 +17,7 @@ metrics: unit: s gauge: value_type: double + +tests: + skip_lifecycle: true + skip_shutdown: true diff --git a/cmd/mdatagen/testdata/resource_attributes_only.yaml b/cmd/mdatagen/testdata/resource_attributes_only.yaml index 05e031bcf45..a6fe611fe86 100644 --- a/cmd/mdatagen/testdata/resource_attributes_only.yaml +++ b/cmd/mdatagen/testdata/resource_attributes_only.yaml @@ -15,3 +15,7 @@ resource_attributes: description: Resource attribute 1. type: string enabled: true + +tests: + skip_lifecycle: true + skip_shutdown: true diff --git a/cmd/mdatagen/testdata/status_only.yaml b/cmd/mdatagen/testdata/status_only.yaml index 2365b43f1d9..d66977249dd 100644 --- a/cmd/mdatagen/testdata/status_only.yaml +++ b/cmd/mdatagen/testdata/status_only.yaml @@ -4,3 +4,7 @@ status: stability: beta: [traces, metrics, logs] distributions: [contrib] + +tests: + skip_lifecycle: true + skip_shutdown: true diff --git a/cmd/mdatagen/testdata/with_goleak_ignores.yaml b/cmd/mdatagen/testdata/with_goleak_ignores.yaml new file mode 100644 index 00000000000..18ee688ea38 --- /dev/null +++ b/cmd/mdatagen/testdata/with_goleak_ignores.yaml @@ -0,0 +1,14 @@ +type: foobar + +status: + class: connector + stability: + beta: [traces_to_metrics, traces_to_traces, traces_to_logs, metrics_to_logs, metrics_to_metrics, metrics_to_traces, logs_to_logs, logs_to_metrics, logs_to_traces] + +tests: + goleak: + ignore: + top: + - "testfunc1" + any: + - "testfunc2" \ No newline at end of file diff --git a/cmd/mdatagen/testdata/with_goleak_setup.yaml b/cmd/mdatagen/testdata/with_goleak_setup.yaml new file mode 100644 index 00000000000..de67c767af1 --- /dev/null +++ b/cmd/mdatagen/testdata/with_goleak_setup.yaml @@ -0,0 +1,10 @@ +type: foobar + +status: + class: connector + stability: + beta: [traces_to_metrics, traces_to_traces, traces_to_logs, metrics_to_logs, metrics_to_metrics, metrics_to_traces, logs_to_logs, logs_to_metrics, logs_to_traces] + +tests: + goleak: + setup: "setupFunc()" \ No newline at end of file diff --git a/cmd/mdatagen/testdata/with_goleak_skip.yaml b/cmd/mdatagen/testdata/with_goleak_skip.yaml new file mode 100644 index 00000000000..583d8af185d --- /dev/null +++ b/cmd/mdatagen/testdata/with_goleak_skip.yaml @@ -0,0 +1,10 @@ +type: foobar + +status: + class: connector + stability: + beta: [traces_to_metrics, traces_to_traces, traces_to_logs, metrics_to_logs, metrics_to_metrics, metrics_to_traces, logs_to_logs, logs_to_metrics, logs_to_traces] + +tests: + goleak: + skip: true \ No newline at end of file diff --git a/cmd/mdatagen/testdata/with_goleak_teardown.yaml b/cmd/mdatagen/testdata/with_goleak_teardown.yaml new file mode 100644 index 00000000000..51a1dc4cf2a --- /dev/null +++ b/cmd/mdatagen/testdata/with_goleak_teardown.yaml @@ -0,0 +1,10 @@ +type: foobar + +status: + class: connector + stability: + beta: [traces_to_metrics, traces_to_traces, traces_to_logs, metrics_to_logs, metrics_to_metrics, metrics_to_traces, logs_to_logs, logs_to_metrics, logs_to_traces] + +tests: + goleak: + teardown: "teardownFunc()" \ No newline at end of file diff --git a/cmd/mdatagen/testdata/with_tests_connector.yaml b/cmd/mdatagen/testdata/with_tests_connector.yaml index ad05872698e..2c1f542cca2 100644 --- a/cmd/mdatagen/testdata/with_tests_connector.yaml +++ b/cmd/mdatagen/testdata/with_tests_connector.yaml @@ -4,6 +4,3 @@ status: class: connector stability: beta: [traces_to_metrics, traces_to_traces, traces_to_logs, metrics_to_logs, metrics_to_metrics, metrics_to_traces, logs_to_logs, logs_to_metrics, logs_to_traces] - -tests: - config: diff --git a/cmd/mdatagen/testdata/with_tests_exporter.yaml b/cmd/mdatagen/testdata/with_tests_exporter.yaml index e110f3d10e3..44c9ccc5f9b 100644 --- a/cmd/mdatagen/testdata/with_tests_exporter.yaml +++ b/cmd/mdatagen/testdata/with_tests_exporter.yaml @@ -4,6 +4,3 @@ status: class: exporter stability: beta: [traces, logs, metrics] - -tests: - config: diff --git a/cmd/mdatagen/testdata/with_tests_extension.yaml b/cmd/mdatagen/testdata/with_tests_extension.yaml index 08eb4d5cf29..1f201264155 100644 --- a/cmd/mdatagen/testdata/with_tests_extension.yaml +++ b/cmd/mdatagen/testdata/with_tests_extension.yaml @@ -4,6 +4,3 @@ status: class: extension stability: beta: [extension] - -tests: - config: diff --git a/cmd/mdatagen/testdata/with_tests_processor.yaml b/cmd/mdatagen/testdata/with_tests_processor.yaml index fa6a2238f2c..d0df3f84f0e 100644 --- a/cmd/mdatagen/testdata/with_tests_processor.yaml +++ b/cmd/mdatagen/testdata/with_tests_processor.yaml @@ -4,6 +4,3 @@ status: class: processor stability: beta: [traces, logs, metrics] - -tests: - config: diff --git a/cmd/mdatagen/testdata/with_tests_receiver.yaml b/cmd/mdatagen/testdata/with_tests_receiver.yaml index e55c6190728..f3e35dc659c 100644 --- a/cmd/mdatagen/testdata/with_tests_receiver.yaml +++ b/cmd/mdatagen/testdata/with_tests_receiver.yaml @@ -4,6 +4,3 @@ status: class: receiver stability: beta: [traces, logs, metrics] - -tests: - config: diff --git a/cmd/mdatagen/validate.go b/cmd/mdatagen/validate.go index bc56375baf9..63108f29470 100644 --- a/cmd/mdatagen/validate.go +++ b/cmd/mdatagen/validate.go @@ -8,24 +8,22 @@ import ( "fmt" "regexp" - "go.uber.org/multierr" - "go.opentelemetry.io/collector/pdata/pcommon" ) func (md *metadata) Validate() error { var errs error if err := md.validateType(); err != nil { - errs = multierr.Append(errs, err) + errs = errors.Join(errs, err) } if err := md.validateStatus(); err != nil { - errs = multierr.Append(errs, err) + errs = errors.Join(errs, err) } if err := md.validateResourceAttributes(); err != nil { - errs = multierr.Append(errs, err) + errs = errors.Join(errs, err) } if err := md.validateMetrics(); err != nil { - errs = multierr.Append(errs, err) + errs = errors.Join(errs, err) } return errs } @@ -33,14 +31,20 @@ func (md *metadata) Validate() error { // typeRegexp is used to validate the type of a component. // A type must start with an ASCII alphabetic character and // can only contain ASCII alphanumeric characters and '_'. +// We allow '/' for subcomponents. // This must be kept in sync with the regex in component/config.go. -var typeRegexp = regexp.MustCompile(`^[a-zA-Z][0-9a-zA-Z_]*$`) +var typeRegexp = regexp.MustCompile(`^[a-zA-Z][0-9a-zA-Z_]{0,62}$`) func (md *metadata) validateType() error { if md.Type == "" { return errors.New("missing type") } + if md.Parent != "" { + // subcomponents are allowed to have a '/' in their type. + return nil + } + if !typeRegexp.MatchString(md.Type) { return fmt.Errorf("invalid character(s) in type %q", md.Type) } @@ -58,11 +62,11 @@ func (md *metadata) validateStatus() error { return errors.New("missing status") } if err := md.Status.validateClass(); err != nil { - errs = multierr.Append(errs, err) + errs = errors.Join(errs, err) } if md.Parent == "" { if err := md.Status.validateStability(); err != nil { - errs = multierr.Append(errs, err) + errs = errors.Join(errs, err) } } return errs @@ -84,11 +88,8 @@ func (s *Status) validateStability() error { return errors.New("missing stability") } for stability, component := range s.Stability { - if stability != "development" && stability != "alpha" && stability != "beta" && stability != "stable" && stability != "deprecated" && stability != "unmaintained" { - errs = multierr.Append(errs, fmt.Errorf("invalid stability: %v", stability)) - } - if component == nil { - errs = multierr.Append(errs, fmt.Errorf("missing component for stability: %v", stability)) + if len(component) == 0 { + errs = errors.Join(errs, fmt.Errorf("missing component for stability: %v", stability)) } for _, c := range component { if c != "metrics" && @@ -104,7 +105,7 @@ func (s *Status) validateStability() error { c != "logs_to_metrics" && c != "logs_to_logs" && c != "extension" { - errs = multierr.Append(errs, fmt.Errorf("invalid component: %v", c)) + errs = errors.Join(errs, fmt.Errorf("invalid component: %v", c)) } } } @@ -115,11 +116,11 @@ func (md *metadata) validateResourceAttributes() error { var errs error for name, attr := range md.ResourceAttributes { if attr.Description == "" { - errs = multierr.Append(errs, fmt.Errorf("empty description for resource attribute: %v", name)) + errs = errors.Join(errs, fmt.Errorf("empty description for resource attribute: %v", name)) } empty := ValueType{ValueType: pcommon.ValueTypeEmpty} if attr.Type == empty { - errs = multierr.Append(errs, fmt.Errorf("empty type for resource attribute: %v", name)) + errs = errors.Join(errs, fmt.Errorf("empty type for resource attribute: %v", name)) } } return errs @@ -130,17 +131,17 @@ func (md *metadata) validateMetrics() error { usedAttrs := map[attributeName]bool{} for mn, m := range md.Metrics { if m.Sum == nil && m.Gauge == nil { - errs = multierr.Append(errs, fmt.Errorf("metric %v doesn't have a metric type key, "+ + errs = errors.Join(errs, fmt.Errorf("metric %v doesn't have a metric type key, "+ "one of the following has to be specified: sum, gauge", mn)) continue } if m.Sum != nil && m.Gauge != nil { - errs = multierr.Append(errs, fmt.Errorf("metric %v has more than one metric type keys, "+ + errs = errors.Join(errs, fmt.Errorf("metric %v has more than one metric type keys, "+ "only one of the following has to be specified: sum, gauge", mn)) continue } if err := m.validate(); err != nil { - errs = multierr.Append(errs, fmt.Errorf(`metric "%v": %w`, mn, err)) + errs = errors.Join(errs, fmt.Errorf(`metric "%v": %w`, mn, err)) continue } unknownAttrs := make([]attributeName, 0, len(m.Attributes)) @@ -152,26 +153,26 @@ func (md *metadata) validateMetrics() error { } } if len(unknownAttrs) > 0 { - errs = multierr.Append(errs, fmt.Errorf(`metric "%v" refers to undefined attributes: %v`, mn, unknownAttrs)) + errs = errors.Join(errs, fmt.Errorf(`metric "%v" refers to undefined attributes: %v`, mn, unknownAttrs)) } } - errs = multierr.Append(errs, md.validateAttributes(usedAttrs)) + errs = errors.Join(errs, md.validateAttributes(usedAttrs)) return errs } func (m *metric) validate() error { var errs error if m.Description == "" { - errs = multierr.Append(errs, errors.New(`missing metric description`)) + errs = errors.Join(errs, errors.New(`missing metric description`)) } if m.Unit == nil { - errs = multierr.Append(errs, errors.New(`missing metric unit`)) + errs = errors.Join(errs, errors.New(`missing metric unit`)) } if m.Sum != nil { - errs = multierr.Append(errs, m.Sum.Validate()) + errs = errors.Join(errs, m.Sum.Validate()) } if m.Gauge != nil { - errs = multierr.Append(errs, m.Gauge.Validate()) + errs = errors.Join(errs, m.Gauge.Validate()) } return errs } @@ -188,18 +189,18 @@ func (md *metadata) validateAttributes(usedAttrs map[attributeName]bool) error { unusedAttrs := make([]attributeName, 0, len(md.Attributes)) for attrName, attr := range md.Attributes { if attr.Description == "" { - errs = multierr.Append(errs, fmt.Errorf(`missing attribute description for: %v`, attrName)) + errs = errors.Join(errs, fmt.Errorf(`missing attribute description for: %v`, attrName)) } empty := ValueType{ValueType: pcommon.ValueTypeEmpty} if attr.Type == empty { - errs = multierr.Append(errs, fmt.Errorf("empty type for attribute: %v", attrName)) + errs = errors.Join(errs, fmt.Errorf("empty type for attribute: %v", attrName)) } if !usedAttrs[attrName] { unusedAttrs = append(unusedAttrs, attrName) } } if len(unusedAttrs) > 0 { - errs = multierr.Append(errs, fmt.Errorf("unused attributes: %v", unusedAttrs)) + errs = errors.Join(errs, fmt.Errorf("unused attributes: %v", unusedAttrs)) } return errs } diff --git a/cmd/mdatagen/validate_test.go b/cmd/mdatagen/validate_test.go index 4c2ddea5741..b64ca66e77c 100644 --- a/cmd/mdatagen/validate_test.go +++ b/cmd/mdatagen/validate_test.go @@ -40,11 +40,11 @@ func TestValidate(t *testing.T) { }, { name: "testdata/invalid_stability.yaml", - wantErr: "invalid stability: incorrectstability", + wantErr: "1 error(s) decoding:\n\n* error decoding 'status.stability': invalid stability level: incorrectstability", }, { name: "testdata/no_stability_component.yaml", - wantErr: "missing component for stability: beta", + wantErr: "missing component for stability: Beta", }, { name: "testdata/invalid_stability_component.yaml", diff --git a/cmd/otelcorecol/builder-config.yaml b/cmd/otelcorecol/builder-config.yaml index d528d09964d..8d8f88ad980 100644 --- a/cmd/otelcorecol/builder-config.yaml +++ b/cmd/otelcorecol/builder-config.yaml @@ -2,25 +2,34 @@ dist: module: go.opentelemetry.io/collector/cmd/otelcorecol name: otelcorecol description: Local OpenTelemetry Collector binary, testing only. - version: 0.96.0-dev - otelcol_version: 0.96.0 + version: 0.100.0-dev + otelcol_version: 0.100.0 receivers: - - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.96.0 + - gomod: go.opentelemetry.io/collector/receiver/nopreceiver v0.100.0 + - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.100.0 exporters: - - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.96.0 - - gomod: go.opentelemetry.io/collector/exporter/loggingexporter v0.96.0 - - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.96.0 - - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.96.0 + - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.100.0 + - gomod: go.opentelemetry.io/collector/exporter/loggingexporter v0.100.0 + - gomod: go.opentelemetry.io/collector/exporter/nopexporter v0.100.0 + - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.100.0 + - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.100.0 extensions: - - gomod: go.opentelemetry.io/collector/extension/ballastextension v0.96.0 - - gomod: go.opentelemetry.io/collector/extension/memorylimiterextension v0.96.0 - - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.96.0 + - gomod: go.opentelemetry.io/collector/extension/ballastextension v0.100.0 + - gomod: go.opentelemetry.io/collector/extension/memorylimiterextension v0.100.0 + - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.100.0 processors: - - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.96.0 - - gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.96.0 + - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.100.0 + - gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.100.0 connectors: - - gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.96.0 + - gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.100.0 + +providers: + - gomod: go.opentelemetry.io/collector/confmap/provider/envprovider v0.100.0 + - gomod: go.opentelemetry.io/collector/confmap/provider/fileprovider v0.100.0 + - gomod: go.opentelemetry.io/collector/confmap/provider/httpprovider v0.100.0 + - gomod: go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.100.0 + - gomod: go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.100.0 replaces: - go.opentelemetry.io/collector => ../../ @@ -49,6 +58,7 @@ replaces: - go.opentelemetry.io/collector/exporter => ../../exporter - go.opentelemetry.io/collector/exporter/debugexporter => ../../exporter/debugexporter - go.opentelemetry.io/collector/exporter/loggingexporter => ../../exporter/loggingexporter + - go.opentelemetry.io/collector/exporter/nopexporter => ../../exporter/nopexporter - go.opentelemetry.io/collector/exporter/otlpexporter => ../../exporter/otlpexporter - go.opentelemetry.io/collector/exporter/otlphttpexporter => ../../exporter/otlphttpexporter - go.opentelemetry.io/collector/extension => ../../extension @@ -58,8 +68,10 @@ replaces: - go.opentelemetry.io/collector/extension/zpagesextension => ../../extension/zpagesextension - go.opentelemetry.io/collector/featuregate => ../../featuregate - go.opentelemetry.io/collector/pdata => ../../pdata + - go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata - go.opentelemetry.io/collector/processor => ../../processor - go.opentelemetry.io/collector/receiver => ../../receiver + - go.opentelemetry.io/collector/receiver/nopreceiver => ../../receiver/nopreceiver - go.opentelemetry.io/collector/receiver/otlpreceiver => ../../receiver/otlpreceiver - go.opentelemetry.io/collector/processor/batchprocessor => ../../processor/batchprocessor - go.opentelemetry.io/collector/processor/memorylimiterprocessor => ../../processor/memorylimiterprocessor diff --git a/cmd/otelcorecol/components.go b/cmd/otelcorecol/components.go index 786743099b9..9f8a7d45b06 100644 --- a/cmd/otelcorecol/components.go +++ b/cmd/otelcorecol/components.go @@ -8,6 +8,7 @@ import ( "go.opentelemetry.io/collector/exporter" debugexporter "go.opentelemetry.io/collector/exporter/debugexporter" loggingexporter "go.opentelemetry.io/collector/exporter/loggingexporter" + nopexporter "go.opentelemetry.io/collector/exporter/nopexporter" otlpexporter "go.opentelemetry.io/collector/exporter/otlpexporter" otlphttpexporter "go.opentelemetry.io/collector/exporter/otlphttpexporter" "go.opentelemetry.io/collector/extension" @@ -19,6 +20,7 @@ import ( batchprocessor "go.opentelemetry.io/collector/processor/batchprocessor" memorylimiterprocessor "go.opentelemetry.io/collector/processor/memorylimiterprocessor" "go.opentelemetry.io/collector/receiver" + nopreceiver "go.opentelemetry.io/collector/receiver/nopreceiver" otlpreceiver "go.opentelemetry.io/collector/receiver/otlpreceiver" ) @@ -36,6 +38,7 @@ func components() (otelcol.Factories, error) { } factories.Receivers, err = receiver.MakeFactoryMap( + nopreceiver.NewFactory(), otlpreceiver.NewFactory(), ) if err != nil { @@ -45,6 +48,7 @@ func components() (otelcol.Factories, error) { factories.Exporters, err = exporter.MakeFactoryMap( debugexporter.NewFactory(), loggingexporter.NewFactory(), + nopexporter.NewFactory(), otlpexporter.NewFactory(), otlphttpexporter.NewFactory(), ) diff --git a/cmd/otelcorecol/components_test.go b/cmd/otelcorecol/components_test.go deleted file mode 100644 index 0e08cdb02d1..00000000000 --- a/cmd/otelcorecol/components_test.go +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT. - -package main - -import ( - "testing" - - "github.com/stretchr/testify/assert" - - "go.opentelemetry.io/collector/component/componenttest" -) - -func TestValidateConfigs(t *testing.T) { - factories, err := components() - assert.NoError(t, err) - - for k, factory := range factories.Receivers { - assert.Equal(t, k, factory.Type()) - assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig())) - } - - for k, factory := range factories.Processors { - assert.Equal(t, k, factory.Type()) - assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig())) - } - - for k, factory := range factories.Exporters { - assert.Equal(t, k, factory.Type()) - assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig())) - } - - for k, factory := range factories.Connectors { - assert.Equal(t, k, factory.Type()) - assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig())) - } - - for k, factory := range factories.Extensions { - assert.Equal(t, k, factory.Type()) - assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig())) - } -} diff --git a/cmd/otelcorecol/go.mod b/cmd/otelcorecol/go.mod index a9a702bd1b5..9fda292e0f7 100644 --- a/cmd/otelcorecol/go.mod +++ b/cmd/otelcorecol/go.mod @@ -5,35 +5,41 @@ module go.opentelemetry.io/collector/cmd/otelcorecol go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.96.0 - go.opentelemetry.io/collector/connector v0.96.0 - go.opentelemetry.io/collector/connector/forwardconnector v0.96.0 - go.opentelemetry.io/collector/exporter v0.96.0 - go.opentelemetry.io/collector/exporter/debugexporter v0.96.0 - go.opentelemetry.io/collector/exporter/loggingexporter v0.96.0 - go.opentelemetry.io/collector/exporter/otlpexporter v0.96.0 - go.opentelemetry.io/collector/exporter/otlphttpexporter v0.96.0 - go.opentelemetry.io/collector/extension v0.96.0 - go.opentelemetry.io/collector/extension/ballastextension v0.96.0 - go.opentelemetry.io/collector/extension/memorylimiterextension v0.96.0 - go.opentelemetry.io/collector/extension/zpagesextension v0.96.0 - go.opentelemetry.io/collector/otelcol v0.96.0 - go.opentelemetry.io/collector/processor v0.96.0 - go.opentelemetry.io/collector/processor/batchprocessor v0.96.0 - go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.96.0 - go.opentelemetry.io/collector/receiver v0.96.0 - go.opentelemetry.io/collector/receiver/otlpreceiver v0.96.0 + go.opentelemetry.io/collector/component v0.100.0 + go.opentelemetry.io/collector/confmap v0.100.0 + go.opentelemetry.io/collector/confmap/converter/expandconverter v0.100.0 + go.opentelemetry.io/collector/confmap/provider/envprovider v0.100.0 + go.opentelemetry.io/collector/confmap/provider/fileprovider v0.100.0 + go.opentelemetry.io/collector/confmap/provider/httpprovider v0.100.0 + go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.100.0 + go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.100.0 + go.opentelemetry.io/collector/connector v0.100.0 + go.opentelemetry.io/collector/connector/forwardconnector v0.100.0 + go.opentelemetry.io/collector/exporter v0.100.0 + go.opentelemetry.io/collector/exporter/debugexporter v0.100.0 + go.opentelemetry.io/collector/exporter/loggingexporter v0.100.0 + go.opentelemetry.io/collector/exporter/nopexporter v0.100.0 + go.opentelemetry.io/collector/exporter/otlpexporter v0.100.0 + go.opentelemetry.io/collector/exporter/otlphttpexporter v0.100.0 + go.opentelemetry.io/collector/extension v0.100.0 + go.opentelemetry.io/collector/extension/ballastextension v0.100.0 + go.opentelemetry.io/collector/extension/memorylimiterextension v0.100.0 + go.opentelemetry.io/collector/extension/zpagesextension v0.100.0 + go.opentelemetry.io/collector/otelcol v0.100.0 + go.opentelemetry.io/collector/processor v0.100.0 + go.opentelemetry.io/collector/processor/batchprocessor v0.100.0 + go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.100.0 + go.opentelemetry.io/collector/receiver v0.100.0 + go.opentelemetry.io/collector/receiver/nopreceiver v0.100.0 + go.opentelemetry.io/collector/receiver/otlpreceiver v0.100.0 go.uber.org/goleak v1.3.0 - golang.org/x/sys v0.17.0 + golang.org/x/sys v0.19.0 ) require ( - cloud.google.com/go/compute v1.24.0 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-logr/logr v1.4.1 // indirect @@ -42,92 +48,83 @@ require ( github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.7 // indirect + github.com/klauspost/compress v1.17.8 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mostynb/go-grpc-compression v1.2.2 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/prometheus/client_golang v1.19.0 // indirect - github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rs/cors v1.10.1 // indirect - github.com/shirou/gopsutil/v3 v3.24.1 // indirect + github.com/shirou/gopsutil/v3 v3.24.3 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/spf13/cobra v1.8.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect - github.com/yusufpapurcu/wmi v1.2.3 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.96.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.96.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.96.0 // indirect - go.opentelemetry.io/collector/config/configgrpc v0.96.0 // indirect - go.opentelemetry.io/collector/config/confighttp v0.96.0 // indirect - go.opentelemetry.io/collector/config/confignet v0.96.0 // indirect - go.opentelemetry.io/collector/config/configopaque v1.3.0 // indirect - go.opentelemetry.io/collector/config/configretry v0.96.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect - go.opentelemetry.io/collector/config/configtls v0.96.0 // indirect - go.opentelemetry.io/collector/config/internal v0.96.0 // indirect - go.opentelemetry.io/collector/confmap v0.96.0 // indirect - go.opentelemetry.io/collector/confmap/converter/expandconverter v0.96.0 // indirect - go.opentelemetry.io/collector/confmap/provider/envprovider v0.96.0 // indirect - go.opentelemetry.io/collector/confmap/provider/fileprovider v0.96.0 // indirect - go.opentelemetry.io/collector/confmap/provider/httpprovider v0.96.0 // indirect - go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.96.0 // indirect - go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.96.0 // indirect - go.opentelemetry.io/collector/consumer v0.96.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.96.0 // indirect - go.opentelemetry.io/collector/featuregate v1.3.0 // indirect - go.opentelemetry.io/collector/pdata v1.3.0 // indirect - go.opentelemetry.io/collector/semconv v0.96.0 // indirect - go.opentelemetry.io/collector/service v0.96.0 // indirect - go.opentelemetry.io/contrib/config v0.4.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect - go.opentelemetry.io/contrib/propagators/b3 v1.24.0 // indirect - go.opentelemetry.io/contrib/zpages v0.49.0 // indirect - go.opentelemetry.io/otel v1.24.0 // indirect - go.opentelemetry.io/otel/bridge/opencensus v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 // indirect - go.opentelemetry.io/otel/metric v1.24.0 // indirect - go.opentelemetry.io/otel/sdk v1.24.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect - go.opentelemetry.io/otel/trace v1.24.0 // indirect - go.opentelemetry.io/proto/otlp v1.1.0 // indirect + go.opentelemetry.io/collector v0.100.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.100.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.7.0 // indirect + go.opentelemetry.io/collector/config/configgrpc v0.100.0 // indirect + go.opentelemetry.io/collector/config/confighttp v0.100.0 // indirect + go.opentelemetry.io/collector/config/confignet v0.100.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.7.0 // indirect + go.opentelemetry.io/collector/config/configretry v0.100.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect + go.opentelemetry.io/collector/config/configtls v0.100.0 // indirect + go.opentelemetry.io/collector/config/internal v0.100.0 // indirect + go.opentelemetry.io/collector/consumer v0.100.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.100.0 // indirect + go.opentelemetry.io/collector/featuregate v1.7.0 // indirect + go.opentelemetry.io/collector/pdata v1.7.0 // indirect + go.opentelemetry.io/collector/semconv v0.100.0 // indirect + go.opentelemetry.io/collector/service v0.100.0 // indirect + go.opentelemetry.io/contrib/config v0.6.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.26.0 // indirect + go.opentelemetry.io/contrib/zpages v0.51.0 // indirect + go.opentelemetry.io/otel v1.26.0 // indirect + go.opentelemetry.io/otel/bridge/opencensus v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 // indirect + go.opentelemetry.io/otel/metric v1.26.0 // indirect + go.opentelemetry.io/otel/sdk v1.26.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + go.opentelemetry.io/otel/trace v1.26.0 // indirect + go.opentelemetry.io/proto/otlp v1.2.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/oauth2 v0.17.0 // indirect + golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect + golang.org/x/net v0.24.0 // indirect golang.org/x/text v0.14.0 // indirect - gonum.org/v1/gonum v0.14.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect - google.golang.org/grpc v1.62.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + gonum.org/v1/gonum v0.15.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.34.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -183,6 +180,8 @@ replace go.opentelemetry.io/collector/exporter/debugexporter => ../../exporter/d replace go.opentelemetry.io/collector/exporter/loggingexporter => ../../exporter/loggingexporter +replace go.opentelemetry.io/collector/exporter/nopexporter => ../../exporter/nopexporter + replace go.opentelemetry.io/collector/exporter/otlpexporter => ../../exporter/otlpexporter replace go.opentelemetry.io/collector/exporter/otlphttpexporter => ../../exporter/otlphttpexporter @@ -201,10 +200,14 @@ replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/pdata => ../../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + replace go.opentelemetry.io/collector/processor => ../../processor replace go.opentelemetry.io/collector/receiver => ../../receiver +replace go.opentelemetry.io/collector/receiver/nopreceiver => ../../receiver/nopreceiver + replace go.opentelemetry.io/collector/receiver/otlpreceiver => ../../receiver/otlpreceiver replace go.opentelemetry.io/collector/processor/batchprocessor => ../../processor/batchprocessor diff --git a/cmd/otelcorecol/go.sum b/cmd/otelcorecol/go.sum index b8a1209e827..13c5f8a3f42 100644 --- a/cmd/otelcorecol/go.sum +++ b/cmd/otelcorecol/go.sum @@ -1,21 +1,14 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= -cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg= -cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= -cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 h1:aRVqY1p2IJaBGStWMsQMpkAa83cPkCDLl80eOj0Rbz4= -cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68/go.mod h1:1a3eRNYX12fs5UABBIXS8HXVvQbX9hRB/RkEBPORpe8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= -github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= 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= @@ -24,8 +17,6 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= -github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= @@ -55,9 +46,6 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -66,7 +54,6 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= @@ -75,8 +62,8 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= @@ -85,14 +72,14 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= -github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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= @@ -117,10 +104,10 @@ github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:Om github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= @@ -128,8 +115,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/shirou/gopsutil/v3 v3.24.1 h1:R3t6ondCEvmARp3wxODhXMTLC/klMa87h2PHUw5m7QI= -github.com/shirou/gopsutil/v3 v3.24.1/go.mod h1:UU7a2MSBQa+kW1uuDq8DeEBS8kmrnQwsv2b5O513rwU= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= @@ -141,62 +128,64 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 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/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= -go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0 h1:P+/g8GpuJGYbOp2tAdKrIPUX9JO02q8Q0YNlHolpibA= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0/go.mod h1:tIKj3DbO8N9Y2xo52og3irLsPI4GW02DSMtrVgNMgxg= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= -go.opentelemetry.io/contrib/propagators/b3 v1.24.0 h1:n4xwCdTx3pZqZs2CjS/CUZAs03y3dZcGhC/FepKtEUY= -go.opentelemetry.io/contrib/propagators/b3 v1.24.0/go.mod h1:k5wRxKRU2uXx2F8uNJ4TaonuEO/V7/5xoz7kdsDACT8= -go.opentelemetry.io/contrib/zpages v0.49.0 h1:Wk217PkNBxcKWnIQpwtbZZE286K4ZY9uajnM5woSeLU= -go.opentelemetry.io/contrib/zpages v0.49.0/go.mod h1:6alLi5mmkZWbAtZMRPd1ffIgkTcsU9OTHQF2NbSOhrQ= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/bridge/opencensus v1.24.0 h1:Vlhy5ee5k5R0zASpH+9AgHiJH7xnKACI3XopO1tUZfY= -go.opentelemetry.io/otel/bridge/opencensus v1.24.0/go.mod h1:jRjVXV/X38jyrnHtvMGN8+9cejZB21JvXAAvooF2s+Q= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.24.0 h1:f2jriWfOdldanBwS9jNBdeOKAQN7b4ugAMaNu1/1k9g= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.24.0/go.mod h1:B+bcQI1yTY+N0vqMpoZbEN7+XU4tNM0DmUiOwebFJWI= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.24.0 h1:mM8nKi6/iFQ0iqst80wDHU2ge198Ye/TfN0WBS5U24Y= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.24.0/go.mod h1:0PrIIzDteLSmNyxqcGYRL4mDIo8OTuBAOI/Bn1URxac= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 h1:Mw5xcxMwlqoJd97vwPxA8isEaIoxsta9/Q51+TTJLGE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0/go.mod h1:CQNu9bj7o7mC6U7+CA/schKEYakYXWr79ucDHTMGhCM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.24.0 h1:JYE2HM7pZbOt5Jhk8ndWZTUWYOVift2cHjXVMkPdmdc= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.24.0/go.mod h1:yMb/8c6hVsnma0RpsBMNo0fEiQKeclawtgaIaOp2MLY= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 h1:s0PHtIkN+3xrbDOpt2M8OTG92cWqUESvzh2MxiR5xY8= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0/go.mod h1:hZlFbDbRt++MMPCCfSJfmhkGIWnX1h3XjkfxZUjLrIA= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= -go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= -go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= -go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= +go.opentelemetry.io/contrib/config v0.6.0 h1:M1SRD1Z15XHPGk61tMLI1up77XT5FdrqQSRrlH0fYuk= +go.opentelemetry.io/contrib/config v0.6.0/go.mod h1:t+/kzmRWLN7J+4F/dD4fFvlYCmCO63WYwy/B00IC++c= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 h1:A3SayB3rNyt+1S6qpI9mHPkeHTZbD7XILEqWnYZb2l0= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0/go.mod h1:27iA5uvhuRNmalO+iEUdVn5ZMj2qy10Mm+XRIpRmyuU= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 h1:Xs2Ncz0gNihqu9iosIZ5SkBbWo5T8JhhLJFMQL1qmLI= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0/go.mod h1:vy+2G/6NvVMpwGX/NyLqcC41fxepnuKHk16E6IZUcJc= +go.opentelemetry.io/contrib/propagators/b3 v1.26.0 h1:wgFbVA+bK2k+fGVfDOCOG4cfDAoppyr5sI2dVlh8MWM= +go.opentelemetry.io/contrib/propagators/b3 v1.26.0/go.mod h1:DDktFXxA+fyItAAM0Sbl5OBH7KOsCTjvbBdPKtoIf/k= +go.opentelemetry.io/contrib/zpages v0.51.0 h1:psVr4JTWd0qtISPj9EA6AODGJ09bvsOxWiuKqiGdSCA= +go.opentelemetry.io/contrib/zpages v0.51.0/go.mod h1:PKtp+NEp1gTTLmFHpynYgYCSkKtisPntOb9S1mQjFKg= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/bridge/opencensus v1.26.0 h1:DZzxj9QjznMVoehskOJnFP2gsTCWtDTFBDvFhPAY7nc= +go.opentelemetry.io/otel/bridge/opencensus v1.26.0/go.mod h1:rJiX0KrF5m8Tm1XE8jLczpAv5zUaDcvhKecFG0ZoFG4= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 h1:+hm+I+KigBy3M24/h1p/NHkUx/evbLH0PNcjpMyCHc4= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0/go.mod h1:NjC8142mLvvNT6biDpaMjyz78kyEHIwAJlSX0N9P5KI= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 h1:HGZWGmCVRCVyAs2GQaiHQPbDHo+ObFWeUEOd+zDnp64= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0/go.mod h1:SaH+v38LSCHddyk7RGlU9uZyQoRrKao6IBnJw6Kbn+c= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 h1:1u/AyyOqAWzy+SkPxDpahCNZParHV8Vid1RnI2clyDE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0/go.mod h1:z46paqbJ9l7c9fIPCXTqTGwhQZ5XoTIsfeFYWboizjs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 h1:Waw9Wfpo/IXzOI8bCB7DIk+0JZcqqsyn1JFnAc+iam8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0/go.mod h1:wnJIG4fOqyynOnnQF/eQb4/16VlX2EJAHhHgqIqWfAo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 h1:1wp/gyxsuYtuE/JFxsQRtcCDtMrO2qMvlfXALU5wkzI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0/go.mod h1:gbTHmghkGgqxMomVQQMur1Nba4M0MQ8AYThXDUjsJ38= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 h1:5fnmgteaar1VcAA69huatudPduNFz7guRtCmfZCooZI= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0/go.mod h1:lsPccfZiz1cb1AhBPmicWM2E4F1VynFXEvD8SEBS4TM= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 h1:0W5o9SzoR15ocYHEQfvfipzcNog1lBxOLfnex91Hk6s= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0/go.mod h1:zVZ8nz+VSggWmnh6tTsJqXQ7rU4xLwRtna1M4x5jq58= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= +go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -207,8 +196,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -223,11 +212,9 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= -golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -241,9 +228,9 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -260,28 +247,26 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= -gonum.org/v1/gonum v0.14.0/go.mod h1:AoWeoz0becf9QMWtE8iWXNXc27fK4fNeHNf/oMejGfU= +gonum.org/v1/gonum v0.15.0 h1:2lYxjRbTYyxkJxlhC+LvJIx3SsANPdRybu1tGj9/OrQ= +gonum.org/v1/gonum v0.15.0/go.mod h1:xzZVBJBtS+Mz4q0Yl2LJTk+OxOg4jiXZ7qBoM0uISGo= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= -google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= -google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c h1:9g7erC9qu44ks7UK4gDNlnk4kOxZG707xKm4jVniy6o= -google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c h1:NUsgEN92SQQqzfA+YtqYNqYmB3DMMYLlIwUZAQFVFbo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -291,10 +276,8 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/cmd/otelcorecol/main.go b/cmd/otelcorecol/main.go index 2ab2d3c7249..beaeb912ee4 100644 --- a/cmd/otelcorecol/main.go +++ b/cmd/otelcorecol/main.go @@ -7,6 +7,13 @@ import ( "log" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap" + "go.opentelemetry.io/collector/confmap/converter/expandconverter" + envprovider "go.opentelemetry.io/collector/confmap/provider/envprovider" + fileprovider "go.opentelemetry.io/collector/confmap/provider/fileprovider" + httpprovider "go.opentelemetry.io/collector/confmap/provider/httpprovider" + httpsprovider "go.opentelemetry.io/collector/confmap/provider/httpsprovider" + yamlprovider "go.opentelemetry.io/collector/confmap/provider/yamlprovider" "go.opentelemetry.io/collector/otelcol" ) @@ -14,10 +21,29 @@ func main() { info := component.BuildInfo{ Command: "otelcorecol", Description: "Local OpenTelemetry Collector binary, testing only.", - Version: "0.96.0-dev", + Version: "0.100.0-dev", } - if err := run(otelcol.CollectorSettings{BuildInfo: info, Factories: components}); err != nil { + set := otelcol.CollectorSettings{ + BuildInfo: info, + Factories: components, + ConfigProviderSettings: otelcol.ConfigProviderSettings{ + ResolverSettings: confmap.ResolverSettings{ + ProviderFactories: []confmap.ProviderFactory{ + envprovider.NewFactory(), + fileprovider.NewFactory(), + httpprovider.NewFactory(), + httpsprovider.NewFactory(), + yamlprovider.NewFactory(), + }, + ConverterFactories: []confmap.ConverterFactory{ + expandconverter.NewFactory(), + }, + }, + }, + } + + if err := run(set); err != nil { log.Fatal(err) } } diff --git a/cmd/otelcorecol/package_test.go b/cmd/otelcorecol/package_test.go index c5c48c671cc..5cd502ca564 100644 --- a/cmd/otelcorecol/package_test.go +++ b/cmd/otelcorecol/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/open-telemetry/opentelemetry-collector/issues/9165#issuecomment-1874836336 for more context. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/component/component.go b/component/component.go index 32d69f7eda0..c7f6408680a 100644 --- a/component/component.go +++ b/component/component.go @@ -9,12 +9,6 @@ import ( ) var ( - // ErrNilNextConsumer can be returned by receiver, or processor Start factory funcs that create the Component if the - // expected next Consumer is nil. - // Deprecated: [v0.96.0] The next consumer is now checked as part of the creation of the pipelines. - // This error will be removed in a future release. - ErrNilNextConsumer = errors.New("nil next Consumer") - // ErrDataTypeIsNotSupported can be returned by receiver, exporter or processor factory funcs that create the // Component if the particular telemetry data type is not supported by the receiver, exporter or processor. ErrDataTypeIsNotSupported = errors.New("telemetry type is not supported") diff --git a/component/componenttest/nop_host_test.go b/component/componenttest/nop_host_test.go index 4aada24b1be..111c8f33574 100644 --- a/component/componenttest/nop_host_test.go +++ b/component/componenttest/nop_host_test.go @@ -17,7 +17,6 @@ func TestNewNopHost(t *testing.T) { require.NotNil(t, nh) require.IsType(t, &nopHost{}, nh) - assert.Nil(t, nh.GetExporters()) // nolint: staticcheck assert.Nil(t, nh.GetExtensions()) assert.Nil(t, nh.GetFactory(component.KindReceiver, component.MustNewType("test"))) } diff --git a/component/componenttest/otelprometheuschecker.go b/component/componenttest/otelprometheuschecker.go index 878bfd0a37a..5beef52373a 100644 --- a/component/componenttest/otelprometheuschecker.go +++ b/component/componenttest/otelprometheuschecker.go @@ -196,7 +196,7 @@ func attributesForProcessorMetrics(processor component.ID) []attribute.KeyValue return []attribute.KeyValue{attribute.String(processorTag, processor.String())} } -// attributesForReceiverMetrics returns the attributes that are needed for the receiver metrics. +// attributesForExporterMetrics returns the attributes that are needed for the receiver metrics. func attributesForExporterMetrics(exporter component.ID) []attribute.KeyValue { return []attribute.KeyValue{attribute.String(exporterTag, exporter.String())} } diff --git a/component/config.go b/component/config.go index f54b3a176c2..49cc7f5219f 100644 --- a/component/config.go +++ b/component/config.go @@ -110,18 +110,25 @@ func callValidateIfPossible(v reflect.Value) error { } // Type is the component type as it is used in the config. -type Type string +type Type struct { + name string +} // String returns the string representation of the type. func (t Type) String() string { - return string(t) + return t.name +} + +// MarshalText marshals returns the Type name. +func (t Type) MarshalText() ([]byte, error) { + return []byte(t.name), nil } // typeRegexp is used to validate the type of a component. // A type must start with an ASCII alphabetic character and // can only contain ASCII alphanumeric characters and '_'. // This must be kept in sync with the regex in cmd/mdatagen/validate.go. -var typeRegexp = regexp.MustCompile(`^[a-zA-Z][0-9a-zA-Z_]*$`) +var typeRegexp = regexp.MustCompile(`^[a-zA-Z][0-9a-zA-Z_]{0,62}$`) // NewType creates a type. It returns an error if the type is invalid. // A type must @@ -130,12 +137,12 @@ var typeRegexp = regexp.MustCompile(`^[a-zA-Z][0-9a-zA-Z_]*$`) // - can only contain ASCII alphanumeric characters and '_'. func NewType(ty string) (Type, error) { if len(ty) == 0 { - return Type(""), fmt.Errorf("id must not be empty") + return Type{}, fmt.Errorf("id must not be empty") } if !typeRegexp.MatchString(ty) { - return Type(""), fmt.Errorf("invalid character(s) in type %q", ty) + return Type{}, fmt.Errorf("invalid character(s) in type %q", ty) } - return Type(ty), nil + return Type{name: ty}, nil } // MustNewType creates a type. It panics if the type is invalid. @@ -155,14 +162,18 @@ func MustNewType(strType string) Type { // collecting metrics, traces and logs, this can expand in the future. type DataType = Type +func mustNewDataType(strType string) DataType { + return MustNewType(strType) +} + // Currently supported data types. Add new data types here when new types are supported in the future. -const ( +var ( // DataTypeTraces is the data type tag for traces. - DataTypeTraces DataType = "traces" + DataTypeTraces = mustNewDataType("traces") // DataTypeMetrics is the data type tag for metrics. - DataTypeMetrics DataType = "metrics" + DataTypeMetrics = mustNewDataType("metrics") // DataTypeLogs is the data type tag for logs. - DataTypeLogs DataType = "logs" + DataTypeLogs = mustNewDataType("logs") ) diff --git a/component/config_test.go b/component/config_test.go index fcddc343d20..caed4dc20ab 100644 --- a/component/config_test.go +++ b/component/config_test.go @@ -7,13 +7,16 @@ import ( "errors" "fmt" "reflect" + "strings" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/confmap" ) -var _ fmt.Stringer = (Type)("") +var _ fmt.Stringer = Type{} type configChildStruct struct { Child errConfig @@ -395,6 +398,7 @@ func TestNewType(t *testing.T) { {name: "zipkin_encoding"}, {name: "zookeeper"}, {name: "zpages"}, + {name: strings.Repeat("a", 63)}, {name: "", shouldErr: true}, {name: "contains spaces", shouldErr: true}, @@ -403,6 +407,7 @@ func TestNewType(t *testing.T) { {name: "contains/slash", shouldErr: true}, {name: "contains:colon", shouldErr: true}, {name: "contains#hash", shouldErr: true}, + {name: strings.Repeat("a", 64), shouldErr: true}, } for _, tt := range tests { @@ -417,3 +422,28 @@ func TestNewType(t *testing.T) { }) } } + +type configWithEmbeddedStruct struct { + String string `mapstructure:"string"` + Num int `mapstructure:"num"` + embeddedUnmarshallingConfig +} + +type embeddedUnmarshallingConfig struct { +} + +func (euc *embeddedUnmarshallingConfig) Unmarshal(_ *confmap.Conf) error { + return nil // do nothing. +} +func TestStructWithEmbeddedUnmarshaling(t *testing.T) { + t.Skip("Skipping, to be fixed with https://github.com/open-telemetry/opentelemetry-collector/issues/7102") + cfgMap := confmap.NewFromStringMap(map[string]any{ + "string": "foo", + "num": 123, + }) + tc := &configWithEmbeddedStruct{} + err := UnmarshalConfig(cfgMap, tc) + require.NoError(t, err) + assert.Equal(t, "foo", tc.String) + assert.Equal(t, 123, tc.Num) +} diff --git a/component/doc.go b/component/doc.go index cef6b568edf..c7ac848a1ef 100644 --- a/component/doc.go +++ b/component/doc.go @@ -4,5 +4,5 @@ // Package component outlines the components used in the collector // and provides a foundation for the component’s creation and // termination process. A component can be either a receiver, exporter, -// processor, or an extension. +// processor, an extension, or a connector. package component // import "go.opentelemetry.io/collector/component" diff --git a/component/go.mod b/component/go.mod index 05298e470ba..41731120641 100644 --- a/component/go.mod +++ b/component/go.mod @@ -4,18 +4,18 @@ go 1.21 require ( github.com/prometheus/client_golang v1.19.0 - github.com/prometheus/client_model v0.6.0 - github.com/prometheus/common v0.48.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/config/configtelemetry v0.96.0 - go.opentelemetry.io/collector/confmap v0.96.0 - go.opentelemetry.io/collector/pdata v1.3.0 - go.opentelemetry.io/otel v1.24.0 - go.opentelemetry.io/otel/exporters/prometheus v0.46.0 - go.opentelemetry.io/otel/metric v1.24.0 - go.opentelemetry.io/otel/sdk v1.24.0 - go.opentelemetry.io/otel/sdk/metric v1.24.0 - go.opentelemetry.io/otel/trace v1.24.0 + github.com/prometheus/client_model v0.6.1 + github.com/prometheus/common v0.53.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/config/configtelemetry v0.100.0 + go.opentelemetry.io/collector/confmap v0.100.0 + go.opentelemetry.io/collector/pdata v1.7.0 + go.opentelemetry.io/otel v1.26.0 + go.opentelemetry.io/otel/exporters/prometheus v0.48.0 + go.opentelemetry.io/otel/metric v1.26.0 + go.opentelemetry.io/otel/sdk v1.26.0 + go.opentelemetry.io/otel/sdk/metric v1.26.0 + go.opentelemetry.io/otel/trace v1.26.0 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 @@ -29,20 +29,19 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - golang.org/x/net v0.20.0 // indirect - golang.org/x/sys v0.17.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/grpc v1.62.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.34.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/component/go.sum b/component/go.sum index 2f664245ecd..5467b123e44 100644 --- a/component/go.sum +++ b/component/go.sum @@ -13,10 +13,6 @@ github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsM github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -25,8 +21,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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= @@ -39,30 +35,30 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= -go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -78,16 +74,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -100,14 +96,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/component/host.go b/component/host.go index 4b6933baaef..50472a6d88c 100644 --- a/component/host.go +++ b/component/host.go @@ -27,24 +27,4 @@ type Host interface { // GetExtensions can be called by the component anytime after Component.Start() begins and // until Component.Shutdown() ends. GetExtensions() map[ID]Component - - // GetExporters returns the map of exporters. Only enabled and created exporters will be returned. - // Typically is used to find exporters by type or by full config name. Both cases - // can be done by iterating the returned map. There are typically very few exporters, - // so there are no performance implications due to iteration. - // This returns a map by DataType of maps by exporter configs to the exporter instance. - // Note that an exporter with the same name may be attached to multiple pipelines and - // thus we may have an instance of the exporter for multiple data types. - // This is an experimental function that may change or even be removed completely. - // - // GetExporters can be called by the component anytime after Component.Start() begins and - // until Component.Shutdown() ends. - // - // Deprecated: [0.79.0] This function will be removed in the future. - // Several components in the contrib repository use this function so it cannot be removed - // before those cases are removed. In most cases, use of this function can be replaced by a - // connector. See https://github.com/open-telemetry/opentelemetry-collector/issues/7370 and - // https://github.com/open-telemetry/opentelemetry-collector/pull/7390#issuecomment-1483710184 - // for additional information. - GetExporters() map[DataType]map[ID]Component } diff --git a/component/telemetry.go b/component/telemetry.go index 572b4bdd916..17ca3dcab67 100644 --- a/component/telemetry.go +++ b/component/telemetry.go @@ -15,7 +15,7 @@ import ( // TelemetrySettings provides components with APIs to report telemetry. // // Note: there is a service version of this struct, servicetelemetry.TelemetrySettings, that mirrors -// this struct with the exception of ReportComponentStatus. When adding or removing anything from +// this struct with the exception of ReportStatus. When adding or removing anything from // this struct consider whether or not the same should be done for the service version. type TelemetrySettings struct { // Logger that the factory can use during creation and can pass to the created diff --git a/config/configauth/configauth.go b/config/configauth/configauth.go index 8e7d8edb41a..aa7002c270b 100644 --- a/config/configauth/configauth.go +++ b/config/configauth/configauth.go @@ -26,6 +26,11 @@ type Authentication struct { AuthenticatorID component.ID `mapstructure:"authenticator"` } +// NewDefaultAuthentication returns a default authentication configuration. +func NewDefaultAuthentication() *Authentication { + return &Authentication{} +} + // GetServerAuthenticator attempts to select the appropriate auth.Server from the list of extensions, // based on the requested extension name. If an authenticator is not found, an error is returned. func (a Authentication) GetServerAuthenticator(extensions map[component.ID]component.Component) (auth.Server, error) { diff --git a/config/configauth/configauth_test.go b/config/configauth/configauth_test.go index 43c84ceb497..e16289a1490 100644 --- a/config/configauth/configauth_test.go +++ b/config/configauth/configauth_test.go @@ -15,6 +15,12 @@ import ( var mockID = component.MustNewID("mock") +func TestNewDefaultAuthentication(t *testing.T) { + auth := NewDefaultAuthentication() + assert.NotNil(t, auth) + assert.Empty(t, auth) +} + func TestGetServer(t *testing.T) { testCases := []struct { desc string diff --git a/config/configauth/go.mod b/config/configauth/go.mod index a58c97c3449..072dce27655 100644 --- a/config/configauth/go.mod +++ b/config/configauth/go.mod @@ -3,10 +3,10 @@ module go.opentelemetry.io/collector/config/configauth go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.96.0 - go.opentelemetry.io/collector/extension v0.96.0 - go.opentelemetry.io/collector/extension/auth v0.96.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.100.0 + go.opentelemetry.io/collector/extension v0.100.0 + go.opentelemetry.io/collector/extension/auth v0.100.0 go.uber.org/goleak v1.3.0 ) @@ -14,27 +14,26 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect - go.opentelemetry.io/collector/confmap v0.96.0 // indirect - go.opentelemetry.io/collector/pdata v1.3.0 // indirect - go.opentelemetry.io/otel v1.24.0 // indirect - go.opentelemetry.io/otel/metric v1.24.0 // indirect - go.opentelemetry.io/otel/trace v1.24.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect + go.opentelemetry.io/collector/confmap v0.100.0 // indirect + go.opentelemetry.io/collector/pdata v1.7.0 // indirect + go.opentelemetry.io/otel v1.26.0 // indirect + go.opentelemetry.io/otel/metric v1.26.0 // indirect + go.opentelemetry.io/otel/trace v1.26.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/net v0.20.0 // indirect - golang.org/x/sys v0.17.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/grpc v1.62.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.34.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/config/configauth/go.sum b/config/configauth/go.sum index f0d91ce3b4d..624dd0f4bec 100644 --- a/config/configauth/go.sum +++ b/config/configauth/go.sum @@ -12,10 +12,6 @@ github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsM github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -24,8 +20,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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= @@ -38,30 +34,30 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= -go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -77,16 +73,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -99,14 +95,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/config/configcompression/compressiontype.go b/config/configcompression/compressiontype.go index f2bf3850964..004e9558665 100644 --- a/config/configcompression/compressiontype.go +++ b/config/configcompression/compressiontype.go @@ -25,17 +25,17 @@ func (ct *Type) IsCompressed() bool { } func (ct *Type) UnmarshalText(in []byte) error { - switch typ := Type(in); typ { - case TypeGzip, - TypeZlib, - TypeDeflate, - TypeSnappy, - TypeZstd, - typeNone, - typeEmpty: + typ := Type(in) + if typ == TypeGzip || + typ == TypeZlib || + typ == TypeDeflate || + typ == TypeSnappy || + typ == TypeZstd || + typ == typeNone || + typ == typeEmpty { *ct = typ return nil - default: - return fmt.Errorf("unsupported compression type %q", typ) } + return fmt.Errorf("unsupported compression type %q", typ) + } diff --git a/config/configcompression/go.mod b/config/configcompression/go.mod index 1ac40196d85..a79f2d91f3d 100644 --- a/config/configcompression/go.mod +++ b/config/configcompression/go.mod @@ -3,7 +3,7 @@ module go.opentelemetry.io/collector/config/configcompression go 1.21 require ( - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 go.uber.org/goleak v1.3.0 ) diff --git a/config/configcompression/go.sum b/config/configcompression/go.sum index b4eccab6a53..bdd6d70ba4d 100644 --- a/config/configcompression/go.sum +++ b/config/configcompression/go.sum @@ -14,8 +14,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/config/configgrpc/configgrpc.go b/config/configgrpc/configgrpc.go index 18526262317..98d428857ce 100644 --- a/config/configgrpc/configgrpc.go +++ b/config/configgrpc/configgrpc.go @@ -30,6 +30,7 @@ import ( "go.opentelemetry.io/collector/config/configcompression" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/config/internal" "go.opentelemetry.io/collector/extension/auth" @@ -46,6 +47,14 @@ type KeepaliveClientConfig struct { PermitWithoutStream bool `mapstructure:"permit_without_stream"` } +// NewDefaultKeepaliveClientConfig returns a new instance of KeepaliveClientConfig with default values. +func NewDefaultKeepaliveClientConfig() *KeepaliveClientConfig { + return &KeepaliveClientConfig{ + Time: time.Second * 10, + Timeout: time.Second * 10, + } +} + // ClientConfig defines common settings for a gRPC client configuration. type ClientConfig struct { // The target to which the exporter is going to send traces or metrics, @@ -90,12 +99,29 @@ type ClientConfig struct { Auth *configauth.Authentication `mapstructure:"auth"` } +// NewDefaultClientConfig returns a new instance of ClientConfig with default values. +func NewDefaultClientConfig() *ClientConfig { + return &ClientConfig{ + TLSSetting: configtls.NewDefaultClientConfig(), + Keepalive: NewDefaultKeepaliveClientConfig(), + Auth: configauth.NewDefaultAuthentication(), + } +} + // KeepaliveServerConfig is the configuration for keepalive. type KeepaliveServerConfig struct { ServerParameters *KeepaliveServerParameters `mapstructure:"server_parameters"` EnforcementPolicy *KeepaliveEnforcementPolicy `mapstructure:"enforcement_policy"` } +// NewDefaultKeepaliveServerConfig returns a new instance of KeepaliveServerConfig with default values. +func NewDefaultKeepaliveServerConfig() *KeepaliveServerConfig { + return &KeepaliveServerConfig{ + ServerParameters: NewDefaultKeepaliveServerParameters(), + EnforcementPolicy: NewDefaultKeepaliveEnforcementPolicy(), + } +} + // KeepaliveServerParameters allow configuration of the keepalive.ServerParameters. // The same default values as keepalive.ServerParameters are applicable and get applied by the server. // See https://godoc.org/google.golang.org/grpc/keepalive#ServerParameters for details. @@ -107,6 +133,11 @@ type KeepaliveServerParameters struct { Timeout time.Duration `mapstructure:"timeout"` } +// NewDefaultKeepaliveServerParameters creates and returns a new instance of KeepaliveServerParameters with default settings. +func NewDefaultKeepaliveServerParameters() *KeepaliveServerParameters { + return &KeepaliveServerParameters{} +} + // KeepaliveEnforcementPolicy allow configuration of the keepalive.EnforcementPolicy. // The same default values as keepalive.EnforcementPolicy are applicable and get applied by the server. // See https://godoc.org/google.golang.org/grpc/keepalive#EnforcementPolicy for details. @@ -115,6 +146,11 @@ type KeepaliveEnforcementPolicy struct { PermitWithoutStream bool `mapstructure:"permit_without_stream"` } +// NewDefaultKeepaliveEnforcementPolicy creates and returns a new instance of KeepaliveEnforcementPolicy with default settings. +func NewDefaultKeepaliveEnforcementPolicy() *KeepaliveEnforcementPolicy { + return &KeepaliveEnforcementPolicy{} +} + // ServerConfig defines common settings for a gRPC server configuration. type ServerConfig struct { // Server net.Addr config. For transport only "tcp" and "unix" are valid options. @@ -150,8 +186,16 @@ type ServerConfig struct { IncludeMetadata bool `mapstructure:"include_metadata"` } -// SanitizedEndpoint strips the prefix of either http:// or https:// from configgrpc.ClientConfig.Endpoint. -func (gcs *ClientConfig) SanitizedEndpoint() string { +// NewDefaultServerConfig returns a new instance of ServerConfig with default values. +func NewDefaultServerConfig() *ServerConfig { + return &ServerConfig{ + Keepalive: NewDefaultKeepaliveServerConfig(), + Auth: configauth.NewDefaultAuthentication(), + } +} + +// sanitizedEndpoint strips the prefix of either http:// or https:// from configgrpc.ClientConfig.Endpoint. +func (gcs *ClientConfig) sanitizedEndpoint() string { switch { case gcs.isSchemeHTTP(): return strings.TrimPrefix(gcs.Endpoint, "http://") @@ -174,13 +218,13 @@ func (gcs *ClientConfig) isSchemeHTTPS() bool { // a non-blocking dial (the function won't wait for connections to be // established, and connecting happens in the background). To make it a blocking // dial, use grpc.WithBlock() dial option. -func (gcs *ClientConfig) ToClientConn(ctx context.Context, host component.Host, settings component.TelemetrySettings, extraOpts ...grpc.DialOption) (*grpc.ClientConn, error) { +func (gcs *ClientConfig) ToClientConn(_ context.Context, host component.Host, settings component.TelemetrySettings, extraOpts ...grpc.DialOption) (*grpc.ClientConn, error) { opts, err := gcs.toDialOptions(host, settings) if err != nil { return nil, err } opts = append(opts, extraOpts...) - return grpc.DialContext(ctx, gcs.SanitizedEndpoint(), opts...) + return grpc.NewClient(gcs.sanitizedEndpoint(), opts...) } func (gcs *ClientConfig) toDialOptions(host component.Host, settings component.TelemetrySettings) ([]grpc.DialOption, error) { @@ -193,7 +237,7 @@ func (gcs *ClientConfig) toDialOptions(host component.Host, settings component.T opts = append(opts, grpc.WithDefaultCallOptions(grpc.UseCompressor(cp))) } - tlsCfg, err := gcs.TLSSetting.LoadTLSConfig() + tlsCfg, err := gcs.TLSSetting.LoadTLSConfig(context.Background()) if err != nil { return nil, err } @@ -253,9 +297,11 @@ func (gcs *ClientConfig) toDialOptions(host component.Host, settings component.T otelOpts := []otelgrpc.Option{ otelgrpc.WithTracerProvider(settings.TracerProvider), - otelgrpc.WithMeterProvider(settings.MeterProvider), otelgrpc.WithPropagators(otel.GetTextMapPropagator()), } + if settings.MetricsLevel >= configtelemetry.LevelDetailed { + otelOpts = append(otelOpts, otelgrpc.WithMeterProvider(settings.MeterProvider)) + } // Enable OpenTelemetry observability plugin. opts = append(opts, grpc.WithStatsHandler(otelgrpc.NewClientHandler(otelOpts...))) @@ -268,13 +314,7 @@ func validateBalancerName(balancerName string) bool { } // ToServer returns a grpc.Server for the configuration -// Deprecated: [0.96.0] Use ToServerContext instead. -func (gss *ServerConfig) ToServer(host component.Host, settings component.TelemetrySettings, extraOpts ...grpc.ServerOption) (*grpc.Server, error) { - return gss.ToServerContext(context.Background(), host, settings, extraOpts...) -} - -// ToServerContext returns a grpc.Server for the configuration -func (gss *ServerConfig) ToServerContext(_ context.Context, host component.Host, settings component.TelemetrySettings, extraOpts ...grpc.ServerOption) (*grpc.Server, error) { +func (gss *ServerConfig) ToServer(_ context.Context, host component.Host, settings component.TelemetrySettings, extraOpts ...grpc.ServerOption) (*grpc.Server, error) { opts, err := gss.toServerOption(host, settings) if err != nil { return nil, err @@ -285,14 +325,14 @@ func (gss *ServerConfig) ToServerContext(_ context.Context, host component.Host, func (gss *ServerConfig) toServerOption(host component.Host, settings component.TelemetrySettings) ([]grpc.ServerOption, error) { switch gss.NetAddr.Transport { - case "tcp", "tcp4", "tcp6", "udp", "udp4", "udp6": + case confignet.TransportTypeTCP, confignet.TransportTypeTCP4, confignet.TransportTypeTCP6, confignet.TransportTypeUDP, confignet.TransportTypeUDP4, confignet.TransportTypeUDP6: internal.WarnOnUnspecifiedHost(settings.Logger, gss.NetAddr.Endpoint) } var opts []grpc.ServerOption if gss.TLSSetting != nil { - tlsCfg, err := gss.TLSSetting.LoadTLSConfig() + tlsCfg, err := gss.TLSSetting.LoadTLSConfig(context.Background()) if err != nil { return nil, err } @@ -362,9 +402,11 @@ func (gss *ServerConfig) toServerOption(host component.Host, settings component. otelOpts := []otelgrpc.Option{ otelgrpc.WithTracerProvider(settings.TracerProvider), - otelgrpc.WithMeterProvider(settings.MeterProvider), otelgrpc.WithPropagators(otel.GetTextMapPropagator()), } + if settings.MetricsLevel >= configtelemetry.LevelDetailed { + otelOpts = append(otelOpts, otelgrpc.WithMeterProvider(settings.MeterProvider)) + } // Enable OpenTelemetry observability plugin. diff --git a/config/configgrpc/configgrpc_benchmark_test.go b/config/configgrpc/configgrpc_benchmark_test.go index d1fc95f772b..1ad755f2b4f 100644 --- a/config/configgrpc/configgrpc_benchmark_test.go +++ b/config/configgrpc/configgrpc_benchmark_test.go @@ -16,10 +16,10 @@ import ( "google.golang.org/grpc/encoding/gzip" "google.golang.org/grpc/status" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/testdata" ) func BenchmarkCompressors(b *testing.B) { diff --git a/config/configgrpc/configgrpc_test.go b/config/configgrpc/configgrpc_test.go index 7d646af2b3e..6f0a98aa382 100644 --- a/config/configgrpc/configgrpc_test.go +++ b/config/configgrpc/configgrpc_test.go @@ -35,6 +35,60 @@ import ( "go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp" ) +func TestNewDefaultKeepaliveClientConfig(t *testing.T) { + expectedKeepaliveClientConfig := &KeepaliveClientConfig{ + Time: time.Second * 10, + Timeout: time.Second * 10, + } + keepaliveClientConfig := NewDefaultKeepaliveClientConfig() + assert.Equal(t, expectedKeepaliveClientConfig, keepaliveClientConfig) +} + +func TestNewDefaultClientConfig(t *testing.T) { + expected := &ClientConfig{ + TLSSetting: configtls.NewDefaultClientConfig(), + Keepalive: NewDefaultKeepaliveClientConfig(), + Auth: configauth.NewDefaultAuthentication(), + } + + result := NewDefaultClientConfig() + + assert.Equal(t, expected, result) +} +func TestNewDefaultKeepaliveServerParameters(t *testing.T) { + expectedParams := &KeepaliveServerParameters{} + params := NewDefaultKeepaliveServerParameters() + + assert.Equal(t, expectedParams, params) +} +func TestNewDefaultKeepaliveEnforcementPolicy(t *testing.T) { + expectedPolicy := &KeepaliveEnforcementPolicy{} + + policy := NewDefaultKeepaliveEnforcementPolicy() + + assert.Equal(t, expectedPolicy, policy) +} + +func TestNewDefaultKeepaliveServerConfig(t *testing.T) { + expected := &KeepaliveServerConfig{ + ServerParameters: NewDefaultKeepaliveServerParameters(), + EnforcementPolicy: NewDefaultKeepaliveEnforcementPolicy(), + } + result := NewDefaultKeepaliveServerConfig() + assert.Equal(t, expected, result) +} + +func TestNewDefaultServerConfig(t *testing.T) { + expected := &ServerConfig{ + Keepalive: NewDefaultKeepaliveServerConfig(), + Auth: configauth.NewDefaultAuthentication(), + } + + result := NewDefaultServerConfig() + + assert.Equal(t, expected, result) +} + // testBalancerBuilder facilitates testing validateBalancerName(). type testBalancerBuilder struct{} @@ -194,10 +248,10 @@ func TestAllGrpcServerSettingsExceptAuth(t *testing.T) { gss := &ServerConfig{ NetAddr: confignet.AddrConfig{ Endpoint: "localhost:1234", - Transport: "tcp", + Transport: confignet.TransportTypeTCP, }, TLSSetting: &configtls.ServerConfig{ - TLSSetting: configtls.Config{}, + Config: configtls.Config{}, ClientCAFile: "", }, MaxRecvMsgSizeMiB: 1, @@ -237,26 +291,7 @@ func TestGrpcServerAuthSettings(t *testing.T) { mockID: auth.NewServer(), }, } - srv, err := gss.ToServerContext(context.Background(), host, componenttest.NewNopTelemetrySettings()) - assert.NoError(t, err) - assert.NotNil(t, srv) -} - -func TestGrpcServerAuthSettings_Deprecated(t *testing.T) { - gss := &ServerConfig{ - NetAddr: confignet.AddrConfig{ - Endpoint: "0.0.0.0:1234", - }, - } - gss.Auth = &configauth.Authentication{ - AuthenticatorID: mockID, - } - host := &mockHost{ - ext: map[component.ID]component.Component{ - mockID: auth.NewServer(), - }, - } - srv, err := gss.ToServer(host, componenttest.NewNopTelemetrySettings()) + srv, err := gss.ToServer(context.Background(), host, componenttest.NewNopTelemetrySettings()) assert.NoError(t, err) assert.NotNil(t, srv) } @@ -278,7 +313,7 @@ func TestGRPCClientSettingsError(t *testing.T) { Endpoint: "", Compression: "", TLSSetting: configtls.ClientConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: "/doesnt/exist", }, Insecure: false, @@ -294,7 +329,7 @@ func TestGRPCClientSettingsError(t *testing.T) { Endpoint: "", Compression: "", TLSSetting: configtls.ClientConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CertFile: "/doesnt/exist", }, Insecure: false, @@ -411,7 +446,7 @@ func TestGRPCServerWarning(t *testing.T) { settings: ServerConfig{ NetAddr: confignet.AddrConfig{ Endpoint: "0.0.0.0:1234", - Transport: "tcp", + Transport: confignet.TransportTypeTCP, }, }, len: 1, @@ -420,7 +455,7 @@ func TestGRPCServerWarning(t *testing.T) { settings: ServerConfig{ NetAddr: confignet.AddrConfig{ Endpoint: "127.0.0.1:1234", - Transport: "tcp", + Transport: confignet.TransportTypeTCP, }, }, len: 0, @@ -429,7 +464,7 @@ func TestGRPCServerWarning(t *testing.T) { settings: ServerConfig{ NetAddr: confignet.AddrConfig{ Endpoint: "0.0.0.0:1234", - Transport: "unix", + Transport: confignet.TransportTypeUnix, }, }, len: 0, @@ -462,10 +497,10 @@ func TestGRPCServerSettingsError(t *testing.T) { settings: ServerConfig{ NetAddr: confignet.AddrConfig{ Endpoint: "127.0.0.1:1234", - Transport: "tcp", + Transport: confignet.TransportTypeTCP, }, TLSSetting: &configtls.ServerConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: "/doesnt/exist", }, }, @@ -476,10 +511,10 @@ func TestGRPCServerSettingsError(t *testing.T) { settings: ServerConfig{ NetAddr: confignet.AddrConfig{ Endpoint: "127.0.0.1:1234", - Transport: "tcp", + Transport: confignet.TransportTypeTCP, }, TLSSetting: &configtls.ServerConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CertFile: "/doesnt/exist", }, }, @@ -490,7 +525,7 @@ func TestGRPCServerSettingsError(t *testing.T) { settings: ServerConfig{ NetAddr: confignet.AddrConfig{ Endpoint: "127.0.0.1:1234", - Transport: "tcp", + Transport: confignet.TransportTypeTCP, }, TLSSetting: &configtls.ServerConfig{ ClientCAFile: "/doesnt/exist", @@ -500,7 +535,7 @@ func TestGRPCServerSettingsError(t *testing.T) { } for _, test := range tests { t.Run(test.err, func(t *testing.T) { - _, err := test.settings.ToServerContext(context.Background(), componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) + _, err := test.settings.ToServer(context.Background(), componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) assert.Regexp(t, test.err, err) }) } @@ -510,7 +545,7 @@ func TestGRPCServerSettings_ToListener_Error(t *testing.T) { settings := ServerConfig{ NetAddr: confignet.AddrConfig{ Endpoint: "127.0.0.1:1234567", - Transport: "tcp", + Transport: confignet.TransportTypeTCP, }, } _, err := settings.NetAddr.Listen(context.Background()) @@ -538,14 +573,14 @@ func TestHttpReception(t *testing.T) { { name: "TLS", tlsServerCreds: &configtls.ServerConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), CertFile: filepath.Join("testdata", "server.crt"), KeyFile: filepath.Join("testdata", "server.key"), }, }, tlsClientCreds: &configtls.ClientConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), }, ServerName: "localhost", @@ -554,12 +589,12 @@ func TestHttpReception(t *testing.T) { { name: "NoServerCertificates", tlsServerCreds: &configtls.ServerConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), }, }, tlsClientCreds: &configtls.ClientConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), }, ServerName: "localhost", @@ -569,7 +604,7 @@ func TestHttpReception(t *testing.T) { { name: "mTLS", tlsServerCreds: &configtls.ServerConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), CertFile: filepath.Join("testdata", "server.crt"), KeyFile: filepath.Join("testdata", "server.key"), @@ -577,7 +612,7 @@ func TestHttpReception(t *testing.T) { ClientCAFile: filepath.Join("testdata", "ca.crt"), }, tlsClientCreds: &configtls.ClientConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), CertFile: filepath.Join("testdata", "client.crt"), KeyFile: filepath.Join("testdata", "client.key"), @@ -588,7 +623,7 @@ func TestHttpReception(t *testing.T) { { name: "NoClientCertificate", tlsServerCreds: &configtls.ServerConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), CertFile: filepath.Join("testdata", "server.crt"), KeyFile: filepath.Join("testdata", "server.key"), @@ -596,7 +631,7 @@ func TestHttpReception(t *testing.T) { ClientCAFile: filepath.Join("testdata", "ca.crt"), }, tlsClientCreds: &configtls.ClientConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), }, ServerName: "localhost", @@ -606,7 +641,7 @@ func TestHttpReception(t *testing.T) { { name: "WrongClientCA", tlsServerCreds: &configtls.ServerConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), CertFile: filepath.Join("testdata", "server.crt"), KeyFile: filepath.Join("testdata", "server.key"), @@ -614,7 +649,7 @@ func TestHttpReception(t *testing.T) { ClientCAFile: filepath.Join("testdata", "server.crt"), }, tlsClientCreds: &configtls.ClientConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), CertFile: filepath.Join("testdata", "client.crt"), KeyFile: filepath.Join("testdata", "client.key"), @@ -631,13 +666,13 @@ func TestHttpReception(t *testing.T) { gss := &ServerConfig{ NetAddr: confignet.AddrConfig{ Endpoint: "localhost:0", - Transport: "tcp", + Transport: confignet.TransportTypeTCP, }, TLSSetting: test.tlsServerCreds, } ln, err := gss.NetAddr.Listen(context.Background()) assert.NoError(t, err) - s, err := gss.ToServerContext(context.Background(), componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) + s, err := gss.ToServer(context.Background(), componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) assert.NoError(t, err) ptraceotlp.RegisterGRPCServer(s, &grpcTraceServer{}) @@ -679,12 +714,12 @@ func TestReceiveOnUnixDomainSocket(t *testing.T) { gss := &ServerConfig{ NetAddr: confignet.AddrConfig{ Endpoint: socketName, - Transport: "unix", + Transport: confignet.TransportTypeUnix, }, } ln, err := gss.NetAddr.Listen(context.Background()) assert.NoError(t, err) - srv, err := gss.ToServerContext(context.Background(), componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) + srv, err := gss.ToServer(context.Background(), componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) assert.NoError(t, err) ptraceotlp.RegisterGRPCServer(srv, &grpcTraceServer{}) @@ -875,10 +910,10 @@ func TestClientInfoInterceptors(t *testing.T) { gss := &ServerConfig{ NetAddr: confignet.AddrConfig{ Endpoint: "localhost:0", - Transport: "tcp", + Transport: confignet.TransportTypeTCP, }, } - srv, err := gss.ToServerContext(context.Background(), componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) + srv, err := gss.ToServer(context.Background(), componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) require.NoError(t, err) ptraceotlp.RegisterGRPCServer(srv, mock) diff --git a/config/configgrpc/go.mod b/config/configgrpc/go.mod index 224c724c8e6..ef10d17a561 100644 --- a/config/configgrpc/go.mod +++ b/config/configgrpc/go.mod @@ -4,26 +4,27 @@ go 1.21 require ( github.com/mostynb/go-grpc-compression v1.2.2 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.96.0 - go.opentelemetry.io/collector/component v0.96.0 - go.opentelemetry.io/collector/config/configauth v0.96.0 - go.opentelemetry.io/collector/config/configcompression v0.96.0 - go.opentelemetry.io/collector/config/confignet v0.96.0 - go.opentelemetry.io/collector/config/configopaque v1.3.0 - go.opentelemetry.io/collector/config/configtls v0.96.0 - go.opentelemetry.io/collector/config/internal v0.96.0 - go.opentelemetry.io/collector/extension/auth v0.96.0 - go.opentelemetry.io/collector/pdata v1.3.0 - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 - go.opentelemetry.io/otel v1.24.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector v0.100.0 + go.opentelemetry.io/collector/component v0.100.0 + go.opentelemetry.io/collector/config/configauth v0.100.0 + go.opentelemetry.io/collector/config/configcompression v1.7.0 + go.opentelemetry.io/collector/config/confignet v0.100.0 + go.opentelemetry.io/collector/config/configopaque v1.7.0 + go.opentelemetry.io/collector/config/configtelemetry v0.100.0 + go.opentelemetry.io/collector/config/configtls v0.100.0 + go.opentelemetry.io/collector/config/internal v0.100.0 + go.opentelemetry.io/collector/extension/auth v0.100.0 + go.opentelemetry.io/collector/pdata v1.7.0 + go.opentelemetry.io/collector/pdata/testdata v0.100.0 + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 + go.opentelemetry.io/otel v1.26.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - google.golang.org/grpc v1.62.0 + google.golang.org/grpc v1.63.2 ) require ( - cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect @@ -32,38 +33,36 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.17.2 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.19.0 // indirect - github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect - go.opentelemetry.io/collector/confmap v0.96.0 // indirect - go.opentelemetry.io/collector/extension v0.96.0 // indirect - go.opentelemetry.io/collector/featuregate v1.3.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect - go.opentelemetry.io/otel/metric v1.24.0 // indirect - go.opentelemetry.io/otel/sdk v1.24.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect - go.opentelemetry.io/otel/trace v1.24.0 // indirect + go.opentelemetry.io/collector/confmap v0.100.0 // indirect + go.opentelemetry.io/collector/extension v0.100.0 // indirect + go.opentelemetry.io/collector/featuregate v1.7.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect + go.opentelemetry.io/otel/metric v1.26.0 // indirect + go.opentelemetry.io/otel/sdk v1.26.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + go.opentelemetry.io/otel/trace v1.26.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/sys v0.17.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/protobuf v1.34.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -93,6 +92,8 @@ replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/pdata => ../../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + replace go.opentelemetry.io/collector/component => ../../component replace go.opentelemetry.io/collector/consumer => ../../consumer diff --git a/config/configgrpc/go.sum b/config/configgrpc/go.sum index 6774b9cc3c9..30b59f5dc25 100644 --- a/config/configgrpc/go.sum +++ b/config/configgrpc/go.sum @@ -1,18 +1,10 @@ -cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= -cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= -cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 h1:aRVqY1p2IJaBGStWMsQMpkAa83cPkCDLl80eOj0Rbz4= -cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68/go.mod h1:1a3eRNYX12fs5UABBIXS8HXVvQbX9hRB/RkEBPORpe8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= -github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= 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= -github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= -github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -24,12 +16,8 @@ github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsM github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -45,8 +33,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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= @@ -66,34 +54,34 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 h1:UNQQKPfTDe1J81ViolILjTKPr9WetKW6uei2hFgJmFs= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= -go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 h1:A3SayB3rNyt+1S6qpI9mHPkeHTZbD7XILEqWnYZb2l0= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0/go.mod h1:27iA5uvhuRNmalO+iEUdVn5ZMj2qy10Mm+XRIpRmyuU= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -109,18 +97,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= -golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= -golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -133,16 +119,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/config/configgrpc/package_test.go b/config/configgrpc/package_test.go index 519657748da..503b6469adf 100644 --- a/config/configgrpc/package_test.go +++ b/config/configgrpc/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/open-telemetry/opentelemetry-collector/issues/9165#issuecomment-1874836336 for more context. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/config/confighttp/README.md b/config/confighttp/README.md index beb28028bdb..a0227c2402b 100644 --- a/config/confighttp/README.md +++ b/config/confighttp/README.md @@ -39,7 +39,7 @@ Example: ```yaml exporter: - otlp: + otlphttp: endpoint: otelcol2:55690 auth: authenticator: some-authenticator-extension diff --git a/config/confighttp/compression_test.go b/config/confighttp/compression_test.go index 63d9ba02ab9..794adda2ec8 100644 --- a/config/confighttp/compression_test.go +++ b/config/confighttp/compression_test.go @@ -7,6 +7,7 @@ import ( "bytes" "compress/gzip" "compress/zlib" + "context" "fmt" "io" "net/http" @@ -99,7 +100,7 @@ func TestHTTPClientCompression(t *testing.T) { Endpoint: srv.URL, Compression: tt.encoding, } - client, err := clientSettings.ToClient(componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) + client, err := clientSettings.ToClient(context.Background(), componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) require.NoError(t, err) res, err := client.Do(req) if tt.shouldError { diff --git a/config/confighttp/compressor.go b/config/confighttp/compressor.go index 3e085bead0d..660fa83ce51 100644 --- a/config/confighttp/compressor.go +++ b/config/confighttp/compressor.go @@ -28,9 +28,10 @@ var ( _ writeCloserReset = (*snappy.Writer)(nil) snappyPool = &compressor{pool: sync.Pool{New: func() any { return snappy.NewBufferedWriter(nil) }}} _ writeCloserReset = (*zstd.Encoder)(nil) - zStdPool = &compressor{pool: sync.Pool{New: func() any { zw, _ := zstd.NewWriter(nil); return zw }}} - _ writeCloserReset = (*zlib.Writer)(nil) - zLibPool = &compressor{pool: sync.Pool{New: func() any { return zlib.NewWriter(nil) }}} + // Concurrency 1 disables async decoding via goroutines. This is useful to reduce memory usage and isn't a bottleneck for compression using sync.Pool. + zStdPool = &compressor{pool: sync.Pool{New: func() any { zw, _ := zstd.NewWriter(nil, zstd.WithEncoderConcurrency(1)); return zw }}} + _ writeCloserReset = (*zlib.Writer)(nil) + zLibPool = &compressor{pool: sync.Pool{New: func() any { return zlib.NewWriter(nil) }}} ) type compressor struct { diff --git a/config/confighttp/compressor_test.go b/config/confighttp/compressor_test.go new file mode 100644 index 00000000000..29efe4190d0 --- /dev/null +++ b/config/confighttp/compressor_test.go @@ -0,0 +1,96 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// This file contains helper functions regarding compression/decompression for confighttp. + +package confighttp // import "go.opentelemetry.io/collector/config/confighttp" + +import ( + "bytes" + "fmt" + "io" + "strings" + "testing" + + "github.com/klauspost/compress/zstd" + + "go.opentelemetry.io/collector/config/configcompression" +) + +func BenchmarkCompression(b *testing.B) { + benchmarks := []struct { + codec configcompression.Type + name string + function func(*testing.B, configcompression.Type, *bytes.Buffer, []byte) + }{ + { + codec: configcompression.TypeZstd, + name: "zstdWithConcurrency", + function: benchmarkCompression, + }, + { + codec: configcompression.TypeZstd, + name: "zstdNoConcurrency", + function: benchmarkCompressionNoConcurrency, + }, + } + payload := make([]byte, 10<<20) + buffer := bytes.Buffer{} + buffer.Grow(len(payload)) + + ts := &bytes.Buffer{} + defer func() { + fmt.Printf("input => %.2f MB\n", float64(len(payload))/(1024*1024)) + fmt.Println(ts) + }() + + for i := range benchmarks { + benchmark := &benchmarks[i] + b.Run(fmt.Sprint(benchmark.name), func(b *testing.B) { + benchmark.function(b, benchmark.codec, &buffer, payload) + }) + + } +} + +func benchmarkCompression(b *testing.B, _ configcompression.Type, buf *bytes.Buffer, payload []byte) { + // Concurrency Enabled + + b.Run("compress", func(b *testing.B) { + stringReader := strings.NewReader(string(payload)) + stringReadCloser := io.NopCloser(stringReader) + var enc io.Writer + b.ResetTimer() + b.ReportAllocs() + b.SetBytes(int64(len(payload))) + for i := 0; i < b.N; i++ { + enc, _ = zstd.NewWriter(nil, zstd.WithEncoderConcurrency(5)) + enc.(writeCloserReset).Reset(buf) + _, copyErr := io.Copy(enc, stringReadCloser) + if copyErr != nil { + b.Fatal(copyErr) + } + } + }) +} + +func benchmarkCompressionNoConcurrency(b *testing.B, _ configcompression.Type, buf *bytes.Buffer, payload []byte) { + // Concurrency Disabled + + b.Run("compress", func(b *testing.B) { + stringReader := strings.NewReader(string(payload)) + stringReadCloser := io.NopCloser(stringReader) + var enc io.Writer + b.ResetTimer() + b.ReportAllocs() + b.SetBytes(int64(len(payload))) + for i := 0; i < b.N; i++ { + enc, _ = zstd.NewWriter(nil, zstd.WithEncoderConcurrency(1)) + enc.(writeCloserReset).Reset(buf) + _, copyErr := io.Copy(enc, stringReadCloser) + if copyErr != nil { + b.Fatal(copyErr) + } + } + }) +} diff --git a/config/confighttp/confighttp.go b/config/confighttp/confighttp.go index 40ec4ba0b83..067f9d3a0ab 100644 --- a/config/confighttp/confighttp.go +++ b/config/confighttp/confighttp.go @@ -4,6 +4,7 @@ package confighttp // import "go.opentelemetry.io/collector/config/confighttp" import ( + "context" "crypto/tls" "errors" "fmt" @@ -22,6 +23,7 @@ import ( "go.opentelemetry.io/collector/config/configauth" "go.opentelemetry.io/collector/config/configcompression" "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/config/internal" "go.opentelemetry.io/collector/extension/auth" @@ -115,8 +117,8 @@ func NewDefaultClientConfig() ClientConfig { } // ToClient creates an HTTP client. -func (hcs *ClientConfig) ToClient(host component.Host, settings component.TelemetrySettings) (*http.Client, error) { - tlsCfg, err := hcs.TLSSetting.LoadTLSConfig() +func (hcs *ClientConfig) ToClient(ctx context.Context, host component.Host, settings component.TelemetrySettings) (*http.Client, error) { + tlsCfg, err := hcs.TLSSetting.LoadTLSConfig(ctx) if err != nil { return nil, err } @@ -205,14 +207,17 @@ func (hcs *ClientConfig) ToClient(host component.Host, settings component.Teleme } } + otelOpts := []otelhttp.Option{ + otelhttp.WithTracerProvider(settings.TracerProvider), + otelhttp.WithPropagators(otel.GetTextMapPropagator()), + } + if settings.MetricsLevel >= configtelemetry.LevelDetailed { + otelOpts = append(otelOpts, otelhttp.WithMeterProvider(settings.MeterProvider)) + } + // wrapping http transport with otelhttp transport to enable otel instrumentation if settings.TracerProvider != nil && settings.MeterProvider != nil { - clientTransport = otelhttp.NewTransport( - clientTransport, - otelhttp.WithTracerProvider(settings.TracerProvider), - otelhttp.WithMeterProvider(settings.MeterProvider), - otelhttp.WithPropagators(otel.GetTextMapPropagator()), - ) + clientTransport = otelhttp.NewTransport(clientTransport, otelOpts...) } if hcs.CustomRoundTripper != nil { @@ -228,6 +233,11 @@ func (hcs *ClientConfig) ToClient(host component.Host, settings component.Teleme }, nil } +// Deprecated: [v0.99.0] Use ToClient instead. +func (hcs *ClientConfig) ToClientContext(ctx context.Context, host component.Host, settings component.TelemetrySettings) (*http.Client, error) { + return hcs.ToClient(ctx, host, settings) +} + // Custom RoundTripper that adds headers. type headerRoundTripper struct { transport http.RoundTripper @@ -279,8 +289,13 @@ type ServerConfig struct { ResponseHeaders map[string]configopaque.String `mapstructure:"response_headers"` } +// Deprecated: [v0.99.0] Use ToListener instead. +func (hss *ServerConfig) ToListenerContext(ctx context.Context) (net.Listener, error) { + return hss.ToListener(ctx) +} + // ToListener creates a net.Listener. -func (hss *ServerConfig) ToListener() (net.Listener, error) { +func (hss *ServerConfig) ToListener(ctx context.Context) (net.Listener, error) { listener, err := net.Listen("tcp", hss.Endpoint) if err != nil { return nil, err @@ -288,13 +303,14 @@ func (hss *ServerConfig) ToListener() (net.Listener, error) { if hss.TLSSetting != nil { var tlsCfg *tls.Config - tlsCfg, err = hss.TLSSetting.LoadTLSConfig() + tlsCfg, err = hss.TLSSetting.LoadTLSConfig(ctx) if err != nil { return nil, err } tlsCfg.NextProtos = []string{http2.NextProtoTLS, "http/1.1"} listener = tls.NewListener(listener, tlsCfg) } + return listener, nil } @@ -328,8 +344,13 @@ func WithDecoder(key string, dec func(body io.ReadCloser) (io.ReadCloser, error) } } +// Deprecated: [v0.99.0] Use ToServer instead. +func (hss *ServerConfig) ToServerContext(ctx context.Context, host component.Host, settings component.TelemetrySettings, handler http.Handler, opts ...ToServerOption) (*http.Server, error) { + return hss.ToServer(ctx, host, settings, handler, opts...) +} + // ToServer creates an http.Server from settings object. -func (hss *ServerConfig) ToServer(host component.Host, settings component.TelemetrySettings, handler http.Handler, opts ...ToServerOption) (*http.Server, error) { +func (hss *ServerConfig) ToServer(_ context.Context, host component.Host, settings component.TelemetrySettings, handler http.Handler, opts ...ToServerOption) (*http.Server, error) { internal.WarnOnUnspecifiedHost(settings.Logger, hss.Endpoint) serverOpts := &toServerOptions{} @@ -380,18 +401,20 @@ func (hss *ServerConfig) ToServer(host component.Host, settings component.Teleme handler = responseHeadersHandler(handler, hss.ResponseHeaders) } - // Enable OpenTelemetry observability plugin. - // TODO: Consider to use component ID string as prefix for all the operations. - handler = otelhttp.NewHandler( - handler, - "", + otelOpts := []otelhttp.Option{ otelhttp.WithTracerProvider(settings.TracerProvider), - otelhttp.WithMeterProvider(settings.MeterProvider), otelhttp.WithPropagators(otel.GetTextMapPropagator()), otelhttp.WithSpanNameFormatter(func(_ string, r *http.Request) string { return r.URL.Path }), - ) + } + if settings.MetricsLevel >= configtelemetry.LevelDetailed { + otelOpts = append(otelOpts, otelhttp.WithMeterProvider(settings.MeterProvider)) + } + + // Enable OpenTelemetry observability plugin. + // TODO: Consider to use component ID string as prefix for all the operations. + handler = otelhttp.NewHandler(handler, "", otelOpts...) // wrap the current handler in an interceptor that will add client.Info to the request's context handler = &clientInfoHandler{ diff --git a/config/confighttp/confighttp_test.go b/config/confighttp/confighttp_test.go index fc90f8f7caf..635f9415a2f 100644 --- a/config/confighttp/confighttp_test.go +++ b/config/confighttp/confighttp_test.go @@ -169,7 +169,7 @@ func TestAllHTTPClientSettings(t *testing.T) { t.Run(test.name, func(t *testing.T) { tt := componenttest.NewNopTelemetrySettings() tt.TracerProvider = nil - client, err := test.settings.ToClient(host, tt) + client, err := test.settings.ToClient(context.Background(), host, tt) if test.shouldError { assert.Error(t, err) return @@ -222,7 +222,7 @@ func TestPartialHTTPClientSettings(t *testing.T) { t.Run(test.name, func(t *testing.T) { tt := componenttest.NewNopTelemetrySettings() tt.TracerProvider = nil - client, err := test.settings.ToClient(host, tt) + client, err := test.settings.ToClient(context.Background(), host, tt) assert.NoError(t, err) transport := client.Transport.(*http.Transport) assert.EqualValues(t, 1024, transport.ReadBufferSize) @@ -272,7 +272,7 @@ func TestProxyURL(t *testing.T) { tt := componenttest.NewNopTelemetrySettings() tt.TracerProvider = nil - client, err := s.ToClient(componenttest.NewNopHost(), tt) + client, err := s.ToClient(context.Background(), componenttest.NewNopHost(), tt) if tC.err { require.Error(t, err) @@ -311,7 +311,7 @@ func TestHTTPClientSettingsError(t *testing.T) { settings: ClientConfig{ Endpoint: "", TLSSetting: configtls.ClientConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: "/doesnt/exist", }, Insecure: false, @@ -324,7 +324,7 @@ func TestHTTPClientSettingsError(t *testing.T) { settings: ClientConfig{ Endpoint: "", TLSSetting: configtls.ClientConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CertFile: "/doesnt/exist", }, Insecure: false, @@ -342,7 +342,7 @@ func TestHTTPClientSettingsError(t *testing.T) { } for _, test := range tests { t.Run(test.err, func(t *testing.T) { - _, err := test.settings.ToClient(host, componenttest.NewNopTelemetrySettings()) + _, err := test.settings.ToClient(context.Background(), host, componenttest.NewNopTelemetrySettings()) assert.Regexp(t, test.err, err) }) } @@ -423,7 +423,7 @@ func TestHTTPClientSettingWithAuthConfig(t *testing.T) { name: "with_auth_configuration_has_extension_and_compression", settings: ClientConfig{ Endpoint: "localhost:1234", - Auth: &configauth.Authentication{AuthenticatorID: component.NewID("mock")}, + Auth: &configauth.Authentication{AuthenticatorID: component.MustNewID("mock")}, Compression: configcompression.TypeGzip, }, shouldErr: false, @@ -451,7 +451,7 @@ func TestHTTPClientSettingWithAuthConfig(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { // Omit TracerProvider and MeterProvider in TelemetrySettings as otelhttp.Transport cannot be introspected - client, err := test.settings.ToClient(test.host, component.TelemetrySettings{Logger: zap.NewNop(), MetricsLevel: configtelemetry.LevelNone}) + client, err := test.settings.ToClient(context.Background(), test.host, component.TelemetrySettings{Logger: zap.NewNop(), MetricsLevel: configtelemetry.LevelNone}) if test.shouldErr { assert.Error(t, err) return @@ -494,7 +494,7 @@ func TestHTTPServerSettingsError(t *testing.T) { settings: ServerConfig{ Endpoint: "localhost:0", TLSSetting: &configtls.ServerConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: "/doesnt/exist", }, }, @@ -505,7 +505,7 @@ func TestHTTPServerSettingsError(t *testing.T) { settings: ServerConfig{ Endpoint: "localhost:0", TLSSetting: &configtls.ServerConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CertFile: "/doesnt/exist", }, }, @@ -523,7 +523,7 @@ func TestHTTPServerSettingsError(t *testing.T) { } for _, test := range tests { t.Run(test.err, func(t *testing.T) { - _, err := test.settings.ToListener() + _, err := test.settings.ToListener(context.Background()) assert.Regexp(t, test.err, err) }) } @@ -555,6 +555,7 @@ func TestHTTPServerWarning(t *testing.T) { set.Logger = zap.New(logger) _, err := test.settings.ToServer( + context.Background(), componenttest.NewNopHost(), set, http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { @@ -586,14 +587,14 @@ func TestHttpReception(t *testing.T) { { name: "TLS", tlsServerCreds: &configtls.ServerConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), CertFile: filepath.Join("testdata", "server.crt"), KeyFile: filepath.Join("testdata", "server.key"), }, }, tlsClientCreds: &configtls.ClientConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), }, ServerName: "localhost", @@ -602,14 +603,14 @@ func TestHttpReception(t *testing.T) { { name: "TLS (HTTP/1.1)", tlsServerCreds: &configtls.ServerConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), CertFile: filepath.Join("testdata", "server.crt"), KeyFile: filepath.Join("testdata", "server.key"), }, }, tlsClientCreds: &configtls.ClientConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), }, ServerName: "localhost", @@ -619,12 +620,12 @@ func TestHttpReception(t *testing.T) { { name: "NoServerCertificates", tlsServerCreds: &configtls.ServerConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), }, }, tlsClientCreds: &configtls.ClientConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), }, ServerName: "localhost", @@ -634,7 +635,7 @@ func TestHttpReception(t *testing.T) { { name: "mTLS", tlsServerCreds: &configtls.ServerConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), CertFile: filepath.Join("testdata", "server.crt"), KeyFile: filepath.Join("testdata", "server.key"), @@ -642,7 +643,7 @@ func TestHttpReception(t *testing.T) { ClientCAFile: filepath.Join("testdata", "ca.crt"), }, tlsClientCreds: &configtls.ClientConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), CertFile: filepath.Join("testdata", "client.crt"), KeyFile: filepath.Join("testdata", "client.key"), @@ -653,7 +654,7 @@ func TestHttpReception(t *testing.T) { { name: "NoClientCertificate", tlsServerCreds: &configtls.ServerConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), CertFile: filepath.Join("testdata", "server.crt"), KeyFile: filepath.Join("testdata", "server.key"), @@ -661,7 +662,7 @@ func TestHttpReception(t *testing.T) { ClientCAFile: filepath.Join("testdata", "ca.crt"), }, tlsClientCreds: &configtls.ClientConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), }, ServerName: "localhost", @@ -671,7 +672,7 @@ func TestHttpReception(t *testing.T) { { name: "WrongClientCA", tlsServerCreds: &configtls.ServerConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), CertFile: filepath.Join("testdata", "server.crt"), KeyFile: filepath.Join("testdata", "server.key"), @@ -679,7 +680,7 @@ func TestHttpReception(t *testing.T) { ClientCAFile: filepath.Join("testdata", "server.crt"), }, tlsClientCreds: &configtls.ClientConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), CertFile: filepath.Join("testdata", "client.crt"), KeyFile: filepath.Join("testdata", "client.key"), @@ -697,10 +698,11 @@ func TestHttpReception(t *testing.T) { Endpoint: "localhost:0", TLSSetting: tt.tlsServerCreds, } - ln, err := hss.ToListener() + ln, err := hss.ToListener(context.Background()) require.NoError(t, err) s, err := hss.ToServer( + context.Background(), componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings(), http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { @@ -731,7 +733,7 @@ func TestHttpReception(t *testing.T) { return rt, nil } } - client, errClient := hcs.ToClient(componenttest.NewNopHost(), component.TelemetrySettings{}) + client, errClient := hcs.ToClient(context.Background(), componenttest.NewNopHost(), component.TelemetrySettings{}) require.NoError(t, errClient) resp, errResp := client.Get(hcs.Endpoint) @@ -810,10 +812,11 @@ func TestHttpCors(t *testing.T) { CORS: tt.CORSConfig, } - ln, err := hss.ToListener() + ln, err := hss.ToListener(context.Background()) require.NoError(t, err) s, err := hss.ToServer( + context.Background(), componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings(), http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { @@ -854,6 +857,7 @@ func TestHttpCorsInvalidSettings(t *testing.T) { // This effectively does not enable CORS but should also not cause an error s, err := hss.ToServer( + context.Background(), componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings(), http.HandlerFunc(func(http.ResponseWriter, *http.Request) {})) @@ -883,7 +887,7 @@ func TestHttpCorsWithSettings(t *testing.T) { }, } - srv, err := hss.ToServer(host, componenttest.NewNopTelemetrySettings(), nil) + srv, err := hss.ToServer(context.Background(), host, componenttest.NewNopTelemetrySettings(), nil) require.NoError(t, err) require.NotNil(t, srv) @@ -926,10 +930,11 @@ func TestHttpServerHeaders(t *testing.T) { ResponseHeaders: tt.headers, } - ln, err := hss.ToListener() + ln, err := hss.ToListener(context.Background()) require.NoError(t, err) s, err := hss.ToServer( + context.Background(), componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings(), http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { @@ -1013,6 +1018,7 @@ func ExampleServerConfig() { Endpoint: "localhost:443", } s, err := settings.ToServer( + context.Background(), componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings(), http.HandlerFunc(func(http.ResponseWriter, *http.Request) {})) @@ -1020,7 +1026,7 @@ func ExampleServerConfig() { panic(err) } - l, err := settings.ToListener() + l, err := settings.ToListener(context.Background()) if err != nil { panic(err) } @@ -1059,7 +1065,7 @@ func TestHttpClientHeaders(t *testing.T) { Timeout: 0, Headers: tt.headers, } - client, _ := setting.ToClient(componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) + client, _ := setting.ToClient(context.Background(), componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) req, err := http.NewRequest(http.MethodGet, setting.Endpoint, nil) assert.NoError(t, err) _, err = client.Do(req) @@ -1089,13 +1095,13 @@ func TestHttpClientHostHeader(t *testing.T) { serverURL, _ := url.Parse(server.URL) setting := ClientConfig{ Endpoint: serverURL.String(), - TLSSetting: configtls.TLSClientSetting{}, + TLSSetting: configtls.ClientConfig{}, ReadBufferSize: 0, WriteBufferSize: 0, Timeout: 0, Headers: tt.headers, } - client, _ := setting.ToClient(componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) + client, _ := setting.ToClient(context.Background(), componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) req, err := http.NewRequest(http.MethodGet, setting.Endpoint, nil) assert.NoError(t, err) _, err = client.Do(req) @@ -1190,7 +1196,7 @@ func TestServerAuth(t *testing.T) { handlerCalled = true }) - srv, err := hss.ToServer(host, componenttest.NewNopTelemetrySettings(), handler) + srv, err := hss.ToServer(context.Background(), host, componenttest.NewNopTelemetrySettings(), handler) require.NoError(t, err) // test @@ -1208,7 +1214,7 @@ func TestInvalidServerAuth(t *testing.T) { }, } - srv, err := hss.ToServer(componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings(), http.NewServeMux()) + srv, err := hss.ToServer(context.Background(), componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings(), http.NewServeMux()) require.Error(t, err) require.Nil(t, srv) } @@ -1231,7 +1237,7 @@ func TestFailedServerAuth(t *testing.T) { }, } - srv, err := hss.ToServer(host, componenttest.NewNopTelemetrySettings(), http.HandlerFunc(func(http.ResponseWriter, *http.Request) {})) + srv, err := hss.ToServer(context.Background(), host, componenttest.NewNopTelemetrySettings(), http.HandlerFunc(func(http.ResponseWriter, *http.Request) {})) require.NoError(t, err) // test @@ -1255,6 +1261,7 @@ func TestServerWithErrorHandler(t *testing.T) { } srv, err := hss.ToServer( + context.Background(), componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings(), http.HandlerFunc(func(http.ResponseWriter, *http.Request) {}), @@ -1283,6 +1290,7 @@ func TestServerWithDecoder(t *testing.T) { } srv, err := hss.ToServer( + context.Background(), componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings(), http.HandlerFunc(func(http.ResponseWriter, *http.Request) {}), @@ -1340,14 +1348,14 @@ func BenchmarkHttpRequest(b *testing.B) { } tlsServerCreds := &configtls.ServerConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), CertFile: filepath.Join("testdata", "server.crt"), KeyFile: filepath.Join("testdata", "server.key"), }, } tlsClientCreds := &configtls.ClientConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: filepath.Join("testdata", "ca.crt"), }, ServerName: "localhost", @@ -1359,6 +1367,7 @@ func BenchmarkHttpRequest(b *testing.B) { } s, err := hss.ToServer( + context.Background(), componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings(), http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { @@ -1366,7 +1375,7 @@ func BenchmarkHttpRequest(b *testing.B) { require.NoError(b, errWrite) })) require.NoError(b, err) - ln, err := hss.ToListener() + ln, err := hss.ToListener(context.Background()) require.NoError(b, err) go func() { @@ -1390,12 +1399,12 @@ func BenchmarkHttpRequest(b *testing.B) { b.Run(bb.name, func(b *testing.B) { var c *http.Client if !bb.clientPerThread { - c, err = hcs.ToClient(componenttest.NewNopHost(), component.TelemetrySettings{}) + c, err = hcs.ToClient(context.Background(), componenttest.NewNopHost(), component.TelemetrySettings{}) require.NoError(b, err) } b.RunParallel(func(pb *testing.PB) { if c == nil { - c, err = hcs.ToClient(componenttest.NewNopHost(), component.TelemetrySettings{}) + c, err = hcs.ToClient(context.Background(), componenttest.NewNopHost(), component.TelemetrySettings{}) require.NoError(b, err) } for pb.Next() { diff --git a/config/confighttp/go.mod b/config/confighttp/go.mod index 48dd57e2806..819bc18d124 100644 --- a/config/confighttp/go.mod +++ b/config/confighttp/go.mod @@ -4,23 +4,24 @@ go 1.21 require ( github.com/golang/snappy v0.0.4 - github.com/klauspost/compress v1.17.7 + github.com/klauspost/compress v1.17.8 github.com/rs/cors v1.10.1 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.96.0 - go.opentelemetry.io/collector/component v0.96.0 - go.opentelemetry.io/collector/config/configauth v0.96.0 - go.opentelemetry.io/collector/config/configcompression v0.96.0 - go.opentelemetry.io/collector/config/configopaque v1.3.0 - go.opentelemetry.io/collector/config/configtelemetry v0.96.0 - go.opentelemetry.io/collector/config/configtls v0.96.0 - go.opentelemetry.io/collector/config/internal v0.96.0 - go.opentelemetry.io/collector/extension/auth v0.96.0 - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 - go.opentelemetry.io/otel v1.24.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector v0.100.0 + go.opentelemetry.io/collector/component v0.100.0 + go.opentelemetry.io/collector/config/configauth v0.100.0 + go.opentelemetry.io/collector/config/configcompression v1.7.0 + go.opentelemetry.io/collector/config/configopaque v1.7.0 + go.opentelemetry.io/collector/config/configtelemetry v0.100.0 + go.opentelemetry.io/collector/config/configtls v0.100.0 + go.opentelemetry.io/collector/config/internal v0.100.0 + go.opentelemetry.io/collector/extension v0.100.0 + go.opentelemetry.io/collector/extension/auth v0.100.0 + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 + go.opentelemetry.io/otel v1.26.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - golang.org/x/net v0.21.0 + golang.org/x/net v0.24.0 ) require ( @@ -33,33 +34,31 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.19.0 // indirect - github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector/confmap v0.96.0 // indirect - go.opentelemetry.io/collector/extension v0.96.0 // indirect - go.opentelemetry.io/collector/featuregate v1.3.0 // indirect - go.opentelemetry.io/collector/pdata v1.3.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect - go.opentelemetry.io/otel/metric v1.24.0 // indirect - go.opentelemetry.io/otel/sdk v1.24.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect - go.opentelemetry.io/otel/trace v1.24.0 // indirect + go.opentelemetry.io/collector/confmap v0.100.0 // indirect + go.opentelemetry.io/collector/featuregate v1.7.0 // indirect + go.opentelemetry.io/collector/pdata v1.7.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect + go.opentelemetry.io/otel/metric v1.26.0 // indirect + go.opentelemetry.io/otel/sdk v1.26.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + go.opentelemetry.io/otel/trace v1.26.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/sys v0.17.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/grpc v1.62.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.34.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -90,3 +89,5 @@ replace go.opentelemetry.io/collector/pdata => ../../pdata replace go.opentelemetry.io/collector/component => ../../component replace go.opentelemetry.io/collector/consumer => ../../consumer + +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata diff --git a/config/confighttp/go.sum b/config/confighttp/go.sum index 6d440490f4c..666e96bd68b 100644 --- a/config/confighttp/go.sum +++ b/config/confighttp/go.sum @@ -17,12 +17,8 @@ github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsM github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= @@ -31,14 +27,14 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= -github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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= @@ -55,34 +51,34 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= -go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 h1:Xs2Ncz0gNihqu9iosIZ5SkBbWo5T8JhhLJFMQL1qmLI= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0/go.mod h1:vy+2G/6NvVMpwGX/NyLqcC41fxepnuKHk16E6IZUcJc= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -98,16 +94,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -120,14 +116,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/config/confighttp/ratelimit_test.go b/config/confighttp/ratelimit_test.go index b06f47010cd..bd888533034 100644 --- a/config/confighttp/ratelimit_test.go +++ b/config/confighttp/ratelimit_test.go @@ -13,16 +13,17 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" ) func TestServerRateLimit(t *testing.T) { // prepare - hss := HTTPServerSettings{ + hss := ServerConfig{ Endpoint: "localhost:0", RateLimit: &RateLimit{ - RateLimiterID: component.NewID("mock"), + RateLimiterID: component.NewID(component.MustNewType("mock")), }, } @@ -30,16 +31,16 @@ func TestServerRateLimit(t *testing.T) { host := &mockHost{ ext: map[component.ID]component.Component{ - component.NewID("mock"): limiter, + component.NewID(component.MustNewType("mock")): limiter, }, } var handlerCalled bool - handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + handler := http.HandlerFunc(func(_ http.ResponseWriter, _ *http.Request) { handlerCalled = true }) - srv, err := hss.ToServer(host, componenttest.NewNopTelemetrySettings(), handler) + srv, err := hss.ToServer(context.Background(), host, componenttest.NewNopTelemetrySettings(), handler) require.NoError(t, err) // test @@ -51,34 +52,34 @@ func TestServerRateLimit(t *testing.T) { } func TestInvalidServerRateLimit(t *testing.T) { - hss := HTTPServerSettings{ + hss := ServerConfig{ RateLimit: &RateLimit{ - RateLimiterID: component.NewID("non-existing"), + RateLimiterID: component.NewID(component.MustNewType("non_existing")), }, } - srv, err := hss.ToServer(componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings(), http.NewServeMux()) + srv, err := hss.ToServer(context.Background(), componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings(), http.NewServeMux()) require.Error(t, err) require.Nil(t, srv) } func TestRejectedServerRateLimit(t *testing.T) { // prepare - hss := HTTPServerSettings{ + hss := ServerConfig{ Endpoint: "localhost:0", RateLimit: &RateLimit{ - RateLimiterID: component.NewID("mock"), + RateLimiterID: component.NewID(component.MustNewType("mock")), }, } host := &mockHost{ ext: map[component.ID]component.Component{ - component.NewID("mock"): &mockRateLimiter{ + component.NewID(component.MustNewType("mock")): &mockRateLimiter{ err: errors.New("rate limited"), }, }, } - srv, err := hss.ToServer(host, componenttest.NewNopTelemetrySettings(), http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})) + srv, err := hss.ToServer(context.Background(), host, componenttest.NewNopTelemetrySettings(), http.HandlerFunc(func(_ http.ResponseWriter, _ *http.Request) {})) require.NoError(t, err) // test diff --git a/config/confignet/confignet.go b/config/confignet/confignet.go index 09f7ec24ff6..0f34aebb69f 100644 --- a/config/confignet/confignet.go +++ b/config/confignet/confignet.go @@ -5,10 +5,56 @@ package confignet // import "go.opentelemetry.io/collector/config/confignet" import ( "context" + "fmt" "net" "time" ) +// TransportType represents a type of network transport protocol +type TransportType string + +const ( + TransportTypeTCP TransportType = "tcp" + TransportTypeTCP4 TransportType = "tcp4" + TransportTypeTCP6 TransportType = "tcp6" + TransportTypeUDP TransportType = "udp" + TransportTypeUDP4 TransportType = "udp4" + TransportTypeUDP6 TransportType = "udp6" + TransportTypeIP TransportType = "ip" + TransportTypeIP4 TransportType = "ip4" + TransportTypeIP6 TransportType = "ip6" + TransportTypeUnix TransportType = "unix" + TransportTypeUnixgram TransportType = "unixgram" + TransportTypeUnixPacket TransportType = "unixpacket" + transportTypeEmpty TransportType = "" +) + +// UnmarshalText unmarshalls text to a TransportType. +// Valid values are "tcp", "tcp4", "tcp6", "udp", "udp4", +// "udp6", "ip", "ip4", "ip6", "unix", "unixgram" and "unixpacket" +func (tt *TransportType) UnmarshalText(in []byte) error { + typ := TransportType(in) + switch typ { + case TransportTypeTCP, + TransportTypeTCP4, + TransportTypeTCP6, + TransportTypeUDP, + TransportTypeUDP4, + TransportTypeUDP6, + TransportTypeIP, + TransportTypeIP4, + TransportTypeIP6, + TransportTypeUnix, + TransportTypeUnixgram, + TransportTypeUnixPacket, + transportTypeEmpty: + *tt = typ + return nil + default: + return fmt.Errorf("unsupported transport type %q", typ) + } +} + // DialerConfig contains options for connecting to an address. type DialerConfig struct { // Timeout is the maximum amount of time a dial will wait for @@ -16,6 +62,11 @@ type DialerConfig struct { Timeout time.Duration `mapstructure:"timeout"` } +// NewDefaultDialerConfig creates a new DialerConfig with any default values set +func NewDefaultDialerConfig() DialerConfig { + return DialerConfig{} +} + // AddrConfig represents a network endpoint address. type AddrConfig struct { // Endpoint configures the address for this network connection. @@ -25,24 +76,51 @@ type AddrConfig struct { // "[fe80::1%zone]:80". The zone specifies the scope of the literal IPv6 address as defined in RFC 4007. Endpoint string `mapstructure:"endpoint"` - // Transport to use. Known protocols are "tcp", "tcp4" (IPv4-only), "tcp6" (IPv6-only), "udp", "udp4" (IPv4-only), + // Transport to use. Allowed protocols are "tcp", "tcp4" (IPv4-only), "tcp6" (IPv6-only), "udp", "udp4" (IPv4-only), // "udp6" (IPv6-only), "ip", "ip4" (IPv4-only), "ip6" (IPv6-only), "unix", "unixgram" and "unixpacket". - Transport string `mapstructure:"transport"` + Transport TransportType `mapstructure:"transport"` // DialerConfig contains options for connecting to an address. DialerConfig DialerConfig `mapstructure:"dialer"` } +// NewDefaultAddrConfig creates a new AddrConfig with any default values set +func NewDefaultAddrConfig() AddrConfig { + return AddrConfig{ + DialerConfig: NewDefaultDialerConfig(), + } +} + // Dial equivalent with net.Dialer's DialContext for this address. func (na *AddrConfig) Dial(ctx context.Context) (net.Conn, error) { d := net.Dialer{Timeout: na.DialerConfig.Timeout} - return d.DialContext(ctx, na.Transport, na.Endpoint) + return d.DialContext(ctx, string(na.Transport), na.Endpoint) } // Listen equivalent with net.ListenConfig's Listen for this address. func (na *AddrConfig) Listen(ctx context.Context) (net.Listener, error) { lc := net.ListenConfig{} - return lc.Listen(ctx, na.Transport, na.Endpoint) + return lc.Listen(ctx, string(na.Transport), na.Endpoint) +} + +func (na *AddrConfig) Validate() error { + switch na.Transport { + case TransportTypeTCP, + TransportTypeTCP4, + TransportTypeTCP6, + TransportTypeUDP, + TransportTypeUDP4, + TransportTypeUDP6, + TransportTypeIP, + TransportTypeIP4, + TransportTypeIP6, + TransportTypeUnix, + TransportTypeUnixgram, + TransportTypeUnixPacket: + return nil + default: + return fmt.Errorf("invalid transport type %q", na.Transport) + } } // TCPAddrConfig represents a TCP endpoint address. @@ -58,14 +136,21 @@ type TCPAddrConfig struct { DialerConfig DialerConfig `mapstructure:"dialer"` } +// NewDefaultTCPAddrConfig creates a new TCPAddrConfig with any default values set +func NewDefaultTCPAddrConfig() TCPAddrConfig { + return TCPAddrConfig{ + DialerConfig: NewDefaultDialerConfig(), + } +} + // Dial equivalent with net.Dialer's DialContext for this address. func (na *TCPAddrConfig) Dial(ctx context.Context) (net.Conn, error) { d := net.Dialer{Timeout: na.DialerConfig.Timeout} - return d.DialContext(ctx, "tcp", na.Endpoint) + return d.DialContext(ctx, string(TransportTypeTCP), na.Endpoint) } // Listen equivalent with net.ListenConfig's Listen for this address. func (na *TCPAddrConfig) Listen(ctx context.Context) (net.Listener, error) { lc := net.ListenConfig{} - return lc.Listen(ctx, "tcp", na.Endpoint) + return lc.Listen(ctx, string(TransportTypeTCP), na.Endpoint) } diff --git a/config/confignet/confignet_test.go b/config/confignet/confignet_test.go index f3481609562..9375561dc39 100644 --- a/config/confignet/confignet_test.go +++ b/config/confignet/confignet_test.go @@ -11,12 +11,31 @@ import ( "time" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) +func TestNewDefaultDialerConfig(t *testing.T) { + expectedDialerConfig := DialerConfig{} + dialerConfig := NewDefaultDialerConfig() + require.Equal(t, expectedDialerConfig, dialerConfig) +} + +func TestNewDefaultAddrConfig(t *testing.T) { + expectedAddrConfig := AddrConfig{} + addrConfig := NewDefaultAddrConfig() + require.Equal(t, expectedAddrConfig, addrConfig) +} + +func TestNewDefaultTCPAddrConfig(t *testing.T) { + expectedTCPAddrConfig := TCPAddrConfig{} + tcpAddrconfig := NewDefaultTCPAddrConfig() + require.Equal(t, expectedTCPAddrConfig, tcpAddrconfig) +} + func TestAddrConfigTimeout(t *testing.T) { nac := &AddrConfig{ Endpoint: "localhost:0", - Transport: "tcp", + Transport: TransportTypeTCP, DialerConfig: DialerConfig{ Timeout: -1 * time.Second, }, @@ -51,7 +70,7 @@ func TestTCPAddrConfigTimeout(t *testing.T) { func TestAddrConfig(t *testing.T) { nas := &AddrConfig{ Endpoint: "localhost:0", - Transport: "tcp", + Transport: TransportTypeTCP, } ln, err := nas.Listen(context.Background()) assert.NoError(t, err) @@ -71,7 +90,7 @@ func TestAddrConfig(t *testing.T) { nac := &AddrConfig{ Endpoint: ln.Addr().String(), - Transport: "tcp", + Transport: TransportTypeTCP, } var conn net.Conn conn, err = nac.Dial(context.Background()) @@ -83,6 +102,23 @@ func TestAddrConfig(t *testing.T) { assert.NoError(t, ln.Close()) } +func Test_NetAddr_Validate(t *testing.T) { + na := &AddrConfig{ + Transport: TransportTypeTCP, + } + assert.NoError(t, na.Validate()) + + na = &AddrConfig{ + Transport: transportTypeEmpty, + } + assert.Error(t, na.Validate()) + + na = &AddrConfig{ + Transport: "random string", + } + assert.Error(t, na.Validate()) +} + func TestTCPAddrConfig(t *testing.T) { nas := &TCPAddrConfig{ Endpoint: "localhost:0", @@ -115,3 +151,11 @@ func TestTCPAddrConfig(t *testing.T) { <-done assert.NoError(t, ln.Close()) } + +func Test_TransportType_UnmarshalText(t *testing.T) { + var tt TransportType + err := tt.UnmarshalText([]byte("tcp")) + require.NoError(t, err) + err = tt.UnmarshalText([]byte("invalid")) + require.Error(t, err) +} diff --git a/config/confignet/go.mod b/config/confignet/go.mod index cbd4d70267e..4d1f2b4813a 100644 --- a/config/confignet/go.mod +++ b/config/confignet/go.mod @@ -3,7 +3,7 @@ module go.opentelemetry.io/collector/config/confignet go 1.21 require ( - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 go.uber.org/goleak v1.3.0 ) diff --git a/config/confignet/go.sum b/config/confignet/go.sum index b4eccab6a53..bdd6d70ba4d 100644 --- a/config/confignet/go.sum +++ b/config/confignet/go.sum @@ -14,8 +14,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/config/configopaque/go.mod b/config/configopaque/go.mod index c2c9a683f4f..1f8b080f2da 100644 --- a/config/configopaque/go.mod +++ b/config/configopaque/go.mod @@ -3,8 +3,8 @@ module go.opentelemetry.io/collector/config/configopaque go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/confmap v0.96.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/confmap v0.100.0 go.uber.org/goleak v1.3.0 gopkg.in/yaml.v3 v3.0.1 ) @@ -14,13 +14,14 @@ require ( github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect ) diff --git a/config/configopaque/go.sum b/config/configopaque/go.sum index ea17c4438d6..c42b46e7c12 100644 --- a/config/configopaque/go.sum +++ b/config/configopaque/go.sum @@ -7,8 +7,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -26,12 +26,14 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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= diff --git a/config/configretry/go.mod b/config/configretry/go.mod index aeeab554eb9..9458227d2ca 100644 --- a/config/configretry/go.mod +++ b/config/configretry/go.mod @@ -3,8 +3,8 @@ module go.opentelemetry.io/collector/config/configretry go 1.21 require ( - github.com/cenkalti/backoff/v4 v4.2.1 - github.com/stretchr/testify v1.8.4 + github.com/cenkalti/backoff/v4 v4.3.0 + github.com/stretchr/testify v1.9.0 go.uber.org/goleak v1.3.0 ) diff --git a/config/configretry/go.sum b/config/configretry/go.sum index 33516e2c95b..ac136ad8627 100644 --- a/config/configretry/go.sum +++ b/config/configretry/go.sum @@ -1,5 +1,5 @@ -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 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= @@ -16,8 +16,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/config/configtelemetry/go.mod b/config/configtelemetry/go.mod index 32161410cfd..49af6aa800f 100644 --- a/config/configtelemetry/go.mod +++ b/config/configtelemetry/go.mod @@ -3,7 +3,7 @@ module go.opentelemetry.io/collector/config/configtelemetry go 1.21 require ( - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 go.uber.org/goleak v1.3.0 ) diff --git a/config/configtelemetry/go.sum b/config/configtelemetry/go.sum index b4eccab6a53..bdd6d70ba4d 100644 --- a/config/configtelemetry/go.sum +++ b/config/configtelemetry/go.sum @@ -14,8 +14,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/config/configtls/configtls.go b/config/configtls/configtls.go index bdd80cb56cb..2090f775d49 100644 --- a/config/configtls/configtls.go +++ b/config/configtls/configtls.go @@ -4,6 +4,7 @@ package configtls // import "go.opentelemetry.io/collector/config/configtls" import ( + "context" "crypto/tls" "crypto/x509" "errors" @@ -25,10 +26,6 @@ const defaultMaxTLSVersion = 0 var systemCertPool = x509.SystemCertPool -// TLSSetting exposes the common client and server TLS configurations. -// Deprecated: [v0.96.0] Use Config instead. -type TLSSetting = Config - // Config exposes the common client and server TLS configurations. // Note: Since there isn't anything specific to a server connection. Components // with server connections should use Config. @@ -75,17 +72,17 @@ type Config struct { ReloadInterval time.Duration `mapstructure:"reload_interval"` } -// TSLClientSetting contains TLS configurations that are specific to client -// connections in addition to the common configurations. -// Deprecated: [v0.96.0] Use ClientConfig instead. -type TLSClientSetting = ClientConfig +// NewDefaultConfig creates a new TLSSetting with any default values set. +func NewDefaultConfig() Config { + return Config{} +} // ClientConfig contains TLS configurations that are specific to client // connections in addition to the common configurations. This should be used by // components configuring TLS client connections. type ClientConfig struct { // squash ensures fields are correctly decoded in embedded struct. - TLSSetting `mapstructure:",squash"` + Config `mapstructure:",squash"` // These are config options specific to client connections. @@ -104,17 +101,19 @@ type ClientConfig struct { ServerName string `mapstructure:"server_name_override"` } -// TLSServerSetting contains TLS configurations that are specific to server -// connections in addition to the common configurations. -// Deprecated: [v0.96.0] Use ServerConfig instead. -type TLSServerSetting = ServerConfig +// NewDefaultClientConfig creates a new TLSClientSetting with any default values set. +func NewDefaultClientConfig() ClientConfig { + return ClientConfig{ + Config: NewDefaultConfig(), + } +} // ServerConfig contains TLS configurations that are specific to server // connections in addition to the common configurations. This should be used by // components configuring TLS server connections. type ServerConfig struct { // squash ensures fields are correctly decoded in embedded struct. - TLSSetting `mapstructure:",squash"` + Config `mapstructure:",squash"` // These are config options specific to server connections. @@ -128,6 +127,13 @@ type ServerConfig struct { ReloadClientCAFile bool `mapstructure:"client_ca_file_reload"` } +// NewDefaultServerConfig creates a new TLSServerSetting with any default values set. +func NewDefaultServerConfig() ServerConfig { + return ServerConfig{ + Config: NewDefaultConfig(), + } +} + // certReloader is a wrapper object for certificate reloading // Its GetCertificate method will either return the current certificate or reload from disk // if the last reload happened more than ReloadInterval ago @@ -173,6 +179,28 @@ func (r *certReloader) GetCertificate() (*tls.Certificate, error) { return r.cert, nil } +func (c Config) Validate() error { + if c.hasCAFile() && c.hasCAPem() { + return fmt.Errorf("provide either a CA file or the PEM-encoded string, but not both") + } + + minTLS, err := convertVersion(c.MinVersion, defaultMinTLSVersion) + if err != nil { + return fmt.Errorf("invalid TLS min_version: %w", err) + } + + maxTLS, err := convertVersion(c.MaxVersion, defaultMaxTLSVersion) + if err != nil { + return fmt.Errorf("invalid TLS max_version: %w", err) + } + + if maxTLS < minTLS && maxTLS != defaultMaxTLSVersion { + return errors.New("invalid TLS configuration: min_version cannot be greater than max_version") + } + + return nil +} + // loadTLSConfig loads TLS certificates and returns a tls.Config. // This will set the RootCAs and Certificates of a tls.Config. func (c Config) loadTLSConfig() (*tls.Config, error) { @@ -272,6 +300,15 @@ func (c Config) loadCertFile(certPath string) (*x509.CertPool, error) { func (c Config) loadCertPem(certPem []byte) (*x509.CertPool, error) { certPool := x509.NewCertPool() + if c.IncludeSystemCACertsPool { + scp, err := systemCertPool() + if err != nil { + return nil, err + } + if scp != nil { + certPool = scp + } + } if !certPool.AppendCertsFromPEM(certPem) { return nil, fmt.Errorf("failed to parse cert") } @@ -339,13 +376,20 @@ func (c Config) loadCert(caPath string) (*x509.CertPool, error) { return certPool, nil } +// LoadTLSConfigContext loads the TLS configuration. +// +// Deprecated: [v0.99.0] Use LoadTLSConfig instead. +func (c ClientConfig) LoadTLSConfigContext(ctx context.Context) (*tls.Config, error) { + return c.LoadTLSConfig(ctx) +} + // LoadTLSConfig loads the TLS configuration. -func (c ClientConfig) LoadTLSConfig() (*tls.Config, error) { +func (c ClientConfig) LoadTLSConfig(_ context.Context) (*tls.Config, error) { if c.Insecure && !c.hasCA() { return nil, nil } - tlsCfg, err := c.TLSSetting.loadTLSConfig() + tlsCfg, err := c.loadTLSConfig() if err != nil { return nil, fmt.Errorf("failed to load TLS config: %w", err) } @@ -354,8 +398,15 @@ func (c ClientConfig) LoadTLSConfig() (*tls.Config, error) { return tlsCfg, nil } +// LoadTLSConfigContext loads the TLS configuration. +// +// Deprecated: [v0.99.0] Use LoadTLSConfig instead. +func (c ServerConfig) LoadTLSConfigContext(ctx context.Context) (*tls.Config, error) { + return c.LoadTLSConfig(ctx) +} + // LoadTLSConfig loads the TLS configuration. -func (c ServerConfig) LoadTLSConfig() (*tls.Config, error) { +func (c ServerConfig) LoadTLSConfig(_ context.Context) (*tls.Config, error) { tlsCfg, err := c.loadTLSConfig() if err != nil { return nil, fmt.Errorf("failed to load TLS config: %w", err) diff --git a/config/configtls/configtls_test.go b/config/configtls/configtls_test.go index 47a50f58a3e..91c0e871055 100644 --- a/config/configtls/configtls_test.go +++ b/config/configtls/configtls_test.go @@ -4,6 +4,7 @@ package configtls import ( + "context" "crypto/tls" "crypto/x509" "errors" @@ -20,6 +21,28 @@ import ( "go.opentelemetry.io/collector/config/configopaque" ) +func TestNewDefaultConfig(t *testing.T) { + expectedConfig := Config{} + config := NewDefaultConfig() + require.Equal(t, expectedConfig, config) +} + +func TestNewDefaultClientConfig(t *testing.T) { + expectedConfig := ClientConfig{ + Config: NewDefaultConfig(), + } + config := NewDefaultClientConfig() + require.Equal(t, expectedConfig, config) +} + +func TestNewDefaultServerConfig(t *testing.T) { + expectedConfig := ServerConfig{ + Config: NewDefaultConfig(), + } + config := NewDefaultServerConfig() + require.Equal(t, expectedConfig, config) +} + func TestOptionsToConfig(t *testing.T) { tests := []struct { name string @@ -36,7 +59,7 @@ func TestOptionsToConfig(t *testing.T) { }, { name: "should load system CA and custom CA", - options: TLSSetting{IncludeSystemCACertsPool: true, CAFile: filepath.Join("testdata", "ca-1.crt")}, + options: Config{IncludeSystemCACertsPool: true, CAFile: filepath.Join("testdata", "ca-1.crt")}, }, { name: "should fail with invalid CA file path", @@ -249,12 +272,12 @@ func readFilePanics(filePath string) configopaque.String { func TestLoadTLSClientConfigError(t *testing.T) { tlsSetting := ClientConfig{ - TLSSetting: Config{ + Config: Config{ CertFile: "doesnt/exist", KeyFile: "doesnt/exist", }, } - _, err := tlsSetting.LoadTLSConfig() + _, err := tlsSetting.LoadTLSConfig(context.Background()) assert.Error(t, err) } @@ -262,19 +285,19 @@ func TestLoadTLSClientConfig(t *testing.T) { tlsSetting := ClientConfig{ Insecure: true, } - tlsCfg, err := tlsSetting.LoadTLSConfig() + tlsCfg, err := tlsSetting.LoadTLSConfig(context.Background()) assert.NoError(t, err) assert.Nil(t, tlsCfg) tlsSetting = ClientConfig{} - tlsCfg, err = tlsSetting.LoadTLSConfig() + tlsCfg, err = tlsSetting.LoadTLSConfig(context.Background()) assert.NoError(t, err) assert.NotNil(t, tlsCfg) tlsSetting = ClientConfig{ InsecureSkipVerify: true, } - tlsCfg, err = tlsSetting.LoadTLSConfig() + tlsCfg, err = tlsSetting.LoadTLSConfig(context.Background()) assert.NoError(t, err) assert.NotNil(t, tlsCfg) assert.True(t, tlsCfg.InsecureSkipVerify) @@ -282,24 +305,24 @@ func TestLoadTLSClientConfig(t *testing.T) { func TestLoadTLSServerConfigError(t *testing.T) { tlsSetting := ServerConfig{ - TLSSetting: Config{ + Config: Config{ CertFile: "doesnt/exist", KeyFile: "doesnt/exist", }, } - _, err := tlsSetting.LoadTLSConfig() + _, err := tlsSetting.LoadTLSConfig(context.Background()) assert.Error(t, err) tlsSetting = ServerConfig{ ClientCAFile: "doesnt/exist", } - _, err = tlsSetting.LoadTLSConfig() + _, err = tlsSetting.LoadTLSConfig(context.Background()) assert.Error(t, err) } func TestLoadTLSServerConfig(t *testing.T) { tlsSetting := ServerConfig{} - tlsCfg, err := tlsSetting.LoadTLSConfig() + tlsCfg, err := tlsSetting.LoadTLSConfig(context.Background()) assert.NoError(t, err) assert.NotNil(t, tlsCfg) } @@ -315,7 +338,7 @@ func TestLoadTLSServerConfigReload(t *testing.T) { ReloadClientCAFile: true, } - tlsCfg, err := tlsSetting.LoadTLSConfig() + tlsCfg, err := tlsSetting.LoadTLSConfig(context.Background()) assert.NoError(t, err) assert.NotNil(t, tlsCfg) @@ -346,7 +369,7 @@ func TestLoadTLSServerConfigFailingReload(t *testing.T) { ReloadClientCAFile: true, } - tlsCfg, err := tlsSetting.LoadTLSConfig() + tlsCfg, err := tlsSetting.LoadTLSConfig(context.Background()) assert.NoError(t, err) assert.NotNil(t, tlsCfg) @@ -377,7 +400,7 @@ func TestLoadTLSServerConfigFailingInitialLoad(t *testing.T) { ReloadClientCAFile: true, } - tlsCfg, err := tlsSetting.LoadTLSConfig() + tlsCfg, err := tlsSetting.LoadTLSConfig(context.Background()) assert.Error(t, err) assert.Nil(t, tlsCfg) } @@ -391,7 +414,7 @@ func TestLoadTLSServerConfigWrongPath(t *testing.T) { ReloadClientCAFile: true, } - tlsCfg, err := tlsSetting.LoadTLSConfig() + tlsCfg, err := tlsSetting.LoadTLSConfig(context.Background()) assert.Error(t, err) assert.Nil(t, tlsCfg) } @@ -407,7 +430,7 @@ func TestLoadTLSServerConfigFailing(t *testing.T) { ReloadClientCAFile: true, } - tlsCfg, err := tlsSetting.LoadTLSConfig() + tlsCfg, err := tlsSetting.LoadTLSConfig(context.Background()) assert.NoError(t, err) assert.NotNil(t, tlsCfg) @@ -633,6 +656,37 @@ func TestMinMaxTLSVersions(t *testing.T) { } } +func TestConfigValidate(t *testing.T) { + tests := []struct { + name string + tlsConfig Config + errorTxt string + }{ + {name: `TLS Config ["", ""] to be valid`, tlsConfig: Config{MinVersion: "", MaxVersion: ""}}, + {name: `TLS Config ["", "1.3"] to be valid`, tlsConfig: Config{MinVersion: "", MaxVersion: "1.3"}}, + {name: `TLS Config ["1.2", ""] to be valid`, tlsConfig: Config{MinVersion: "1.2", MaxVersion: ""}}, + {name: `TLS Config ["1.3", "1.3"] to be valid`, tlsConfig: Config{MinVersion: "1.3", MaxVersion: "1.3"}}, + {name: `TLS Config ["1.0", "1.1"] to be valid`, tlsConfig: Config{MinVersion: "1.0", MaxVersion: "1.1"}}, + {name: `TLS Config ["asd", ""] to give [Error]`, tlsConfig: Config{MinVersion: "asd", MaxVersion: ""}, errorTxt: `invalid TLS min_version: unsupported TLS version: "asd"`}, + {name: `TLS Config ["", "asd"] to give [Error]`, tlsConfig: Config{MinVersion: "", MaxVersion: "asd"}, errorTxt: `invalid TLS max_version: unsupported TLS version: "asd"`}, + {name: `TLS Config ["0.4", ""] to give [Error]`, tlsConfig: Config{MinVersion: "0.4", MaxVersion: ""}, errorTxt: `invalid TLS min_version: unsupported TLS version: "0.4"`}, + {name: `TLS Config ["1.2", "1.1"] to give [Error]`, tlsConfig: Config{MinVersion: "1.2", MaxVersion: "1.1"}, errorTxt: `invalid TLS configuration: min_version cannot be greater than max_version`}, + {name: `TLS Config with both CA File and PEM`, tlsConfig: Config{CAFile: "test", CAPem: "test"}, errorTxt: `provide either a CA file or the PEM-encoded string, but not both`}, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + err := test.tlsConfig.Validate() + + if test.errorTxt == "" { + assert.Nil(t, err) + } else { + assert.EqualError(t, err, test.errorTxt) + } + }) + } +} + func TestCipherSuites(t *testing.T) { tests := []struct { name string @@ -686,13 +740,93 @@ func TestSystemCertPool(t *testing.T) { anError := errors.New("my error") tests := []struct { name string - tlsSetting TLSSetting + tlsConfig Config + wantErr error + systemCertFn func() (*x509.CertPool, error) + }{ + { + name: "not using system cert pool", + tlsConfig: Config{ + IncludeSystemCACertsPool: false, + CAFile: filepath.Join("testdata", "ca-1.crt"), + }, + wantErr: nil, + systemCertFn: x509.SystemCertPool, + }, + { + name: "using system cert pool", + tlsConfig: Config{ + IncludeSystemCACertsPool: true, + CAFile: filepath.Join("testdata", "ca-1.crt"), + }, + wantErr: nil, + systemCertFn: x509.SystemCertPool, + }, + { + name: "error loading system cert pool", + tlsConfig: Config{ + IncludeSystemCACertsPool: true, + CAFile: filepath.Join("testdata", "ca-1.crt"), + }, + wantErr: anError, + systemCertFn: func() (*x509.CertPool, error) { + return nil, anError + }, + }, + { + name: "nil system cert pool", + tlsConfig: Config{ + IncludeSystemCACertsPool: true, + CAFile: filepath.Join("testdata", "ca-1.crt"), + }, + wantErr: nil, + systemCertFn: func() (*x509.CertPool, error) { + return nil, nil + }, + }, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + oldSystemCertPool := systemCertPool + systemCertPool = test.systemCertFn + defer func() { + systemCertPool = oldSystemCertPool + }() + + serverConfig := ServerConfig{ + Config: test.tlsConfig, + } + c, err := serverConfig.LoadTLSConfig(context.Background()) + if test.wantErr != nil { + assert.ErrorContains(t, err, test.wantErr.Error()) + } else { + assert.NotNil(t, c.RootCAs) + } + + clientConfig := ClientConfig{ + Config: test.tlsConfig, + } + c, err = clientConfig.LoadTLSConfig(context.Background()) + if test.wantErr != nil { + assert.ErrorContains(t, err, test.wantErr.Error()) + } else { + assert.NotNil(t, c.RootCAs) + } + }) + } +} + +func TestSystemCertPool_loadCert(t *testing.T) { + anError := errors.New("my error") + tests := []struct { + name string + tlsConfig Config wantErr error systemCertFn func() (*x509.CertPool, error) }{ { name: "not using system cert pool", - tlsSetting: TLSSetting{ + tlsConfig: Config{ IncludeSystemCACertsPool: false, }, wantErr: nil, @@ -700,7 +834,7 @@ func TestSystemCertPool(t *testing.T) { }, { name: "using system cert pool", - tlsSetting: TLSSetting{ + tlsConfig: Config{ IncludeSystemCACertsPool: true, }, wantErr: nil, @@ -708,7 +842,7 @@ func TestSystemCertPool(t *testing.T) { }, { name: "error loading system cert pool", - tlsSetting: TLSSetting{ + tlsConfig: Config{ IncludeSystemCACertsPool: true, }, wantErr: anError, @@ -718,7 +852,7 @@ func TestSystemCertPool(t *testing.T) { }, { name: "nil system cert pool", - tlsSetting: TLSSetting{ + tlsConfig: Config{ IncludeSystemCACertsPool: true, }, wantErr: nil, @@ -734,7 +868,7 @@ func TestSystemCertPool(t *testing.T) { defer func() { systemCertPool = oldSystemCertPool }() - certPool, err := test.tlsSetting.loadCert(filepath.Join("testdata", "ca-1.crt")) + certPool, err := test.tlsConfig.loadCert(filepath.Join("testdata", "ca-1.crt")) if test.wantErr != nil { assert.Equal(t, test.wantErr, err) } else { diff --git a/config/configtls/go.mod b/config/configtls/go.mod index 865c82a969e..bad5e7c38f8 100644 --- a/config/configtls/go.mod +++ b/config/configtls/go.mod @@ -4,8 +4,8 @@ go 1.21 require ( github.com/fsnotify/fsnotify v1.7.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/config/configopaque v1.3.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/config/configopaque v1.7.0 ) require ( diff --git a/config/configtls/go.sum b/config/configtls/go.sum index 352be822f6e..a9394e0eca4 100644 --- a/config/configtls/go.sum +++ b/config/configtls/go.sum @@ -9,8 +9,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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= @@ -23,12 +23,14 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/config/internal/go.mod b/config/internal/go.mod index 7d5daac8dab..cdadc8016e1 100644 --- a/config/internal/go.mod +++ b/config/internal/go.mod @@ -3,8 +3,8 @@ module go.opentelemetry.io/collector/config/internal go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.96.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector v0.100.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 ) @@ -13,7 +13,7 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/featuregate v1.3.0 // indirect + go.opentelemetry.io/collector/featuregate v1.7.0 // indirect go.uber.org/multierr v1.11.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -31,3 +31,5 @@ replace go.opentelemetry.io/collector/pdata => ../../pdata replace go.opentelemetry.io/collector/consumer => ../../consumer replace go.opentelemetry.io/collector/component => ../../component + +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata diff --git a/config/internal/go.sum b/config/internal/go.sum index d7bcd0e2f73..c961debf0d0 100644 --- a/config/internal/go.sum +++ b/config/internal/go.sum @@ -10,8 +10,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= diff --git a/config/internal/warning.go b/config/internal/warning.go index 28d55bfd4dc..f9e32fc1c64 100644 --- a/config/internal/warning.go +++ b/config/internal/warning.go @@ -38,7 +38,7 @@ func shouldWarn(endpoint string) bool { // WarnOnUnspecifiedHost emits a warning if an endpoint has an unspecified host. func WarnOnUnspecifiedHost(logger *zap.Logger, endpoint string) { - if shouldWarn(endpoint) { + if !localhostgate.UseLocalHostAsDefaultHostfeatureGate.IsEnabled() && shouldWarn(endpoint) { logger.Warn( "Using the 0.0.0.0 address exposes this server to every network interface, which may facilitate Denial of Service attacks. Enable the feature gate to change the default and remove this warning.", zap.String( diff --git a/confmap/confmap.go b/confmap/confmap.go index 213e4a332d9..655ccc07315 100644 --- a/confmap/confmap.go +++ b/confmap/confmap.go @@ -5,8 +5,11 @@ package confmap // import "go.opentelemetry.io/collector/confmap" import ( "encoding" + "errors" "fmt" "reflect" + "slices" + "strings" "github.com/go-viper/mapstructure/v2" "github.com/knadh/koanf/maps" @@ -157,14 +160,24 @@ func decodeConfig(m *Conf, result any, errorUnused bool) error { mapstructure.StringToTimeDurationHookFunc(), mapstructure.TextUnmarshallerHookFunc(), unmarshalerHookFunc(result), + // after the main unmarshaler hook is called, + // we unmarshal the embedded structs if present to merge with the result: + unmarshalerEmbeddedStructsHookFunc(), zeroSliceHookFunc(), + negativeUintHookFunc(), ), } decoder, err := mapstructure.NewDecoder(dc) if err != nil { return err } - return decoder.Decode(m.ToStringMap()) + if err = decoder.Decode(m.ToStringMap()); err != nil { + if strings.HasPrefix(err.Error(), "error decoding ''") { + return errors.Unwrap(err) + } + return err + } + return nil } // encoderConfig returns a default encoder.EncoderConfig that includes @@ -232,35 +245,77 @@ func expandNilStructPointersHookFunc() mapstructure.DecodeHookFuncValue { // This is needed in combination with ComponentID, which may produce equal IDs for different strings, // and an error needs to be returned in that case, otherwise the last equivalent ID overwrites the previous one. func mapKeyStringToMapKeyTextUnmarshalerHookFunc() mapstructure.DecodeHookFuncType { - return func(f reflect.Type, t reflect.Type, data any) (any, error) { - if f.Kind() != reflect.Map || f.Key().Kind() != reflect.String { + return func(from reflect.Type, to reflect.Type, data any) (any, error) { + if from.Kind() != reflect.Map || from.Key().Kind() != reflect.String { return data, nil } - if t.Kind() != reflect.Map { + if to.Kind() != reflect.Map { return data, nil } - if _, ok := reflect.New(t.Key()).Interface().(encoding.TextUnmarshaler); !ok { + // Checks that the key type of to implements the TextUnmarshaler interface. + if _, ok := reflect.New(to.Key()).Interface().(encoding.TextUnmarshaler); !ok { return data, nil } - m := reflect.MakeMap(reflect.MapOf(t.Key(), reflect.TypeOf(true))) + // Create a map with key value of to's key to bool. + fieldNameSet := reflect.MakeMap(reflect.MapOf(to.Key(), reflect.TypeOf(true))) for k := range data.(map[string]any) { - tKey := reflect.New(t.Key()) + // Create a new value of the to's key type. + tKey := reflect.New(to.Key()) + + // Use tKey to unmarshal the key of the map. if err := tKey.Interface().(encoding.TextUnmarshaler).UnmarshalText([]byte(k)); err != nil { return nil, err } - - if m.MapIndex(reflect.Indirect(tKey)).IsValid() { + // Checks if the key has already been decoded in a previous iteration. + if fieldNameSet.MapIndex(reflect.Indirect(tKey)).IsValid() { return nil, fmt.Errorf("duplicate name %q after unmarshaling %v", k, tKey) } - m.SetMapIndex(reflect.Indirect(tKey), reflect.ValueOf(true)) + fieldNameSet.SetMapIndex(reflect.Indirect(tKey), reflect.ValueOf(true)) } return data, nil } } +// unmarshalerEmbeddedStructsHookFunc provides a mechanism for embedded structs to define their own unmarshal logic, +// by implementing the Unmarshaler interface. +func unmarshalerEmbeddedStructsHookFunc() mapstructure.DecodeHookFuncValue { + return func(from reflect.Value, to reflect.Value) (any, error) { + if to.Type().Kind() != reflect.Struct { + return from.Interface(), nil + } + fromAsMap, ok := from.Interface().(map[string]any) + if !ok { + return from.Interface(), nil + } + for i := 0; i < to.Type().NumField(); i++ { + // embedded structs passed in via `squash` cannot be pointers. We just check if they are structs: + f := to.Type().Field(i) + if f.IsExported() && slices.Contains(strings.Split(f.Tag.Get("mapstructure"), ","), "squash") { + if unmarshaler, ok := to.Field(i).Addr().Interface().(Unmarshaler); ok { + if err := unmarshaler.Unmarshal(NewFromStringMap(fromAsMap)); err != nil { + return nil, err + } + // the struct we receive from this unmarshaling only contains fields related to the embedded struct. + // we merge this partially unmarshaled struct with the rest of the result. + // note we already unmarshaled the main struct earlier, and therefore merge with it. + conf := New() + if err := conf.Marshal(unmarshaler); err != nil { + return nil, err + } + resultMap := conf.ToStringMap() + for k, v := range resultMap { + fromAsMap[k] = v + } + } + } + } + return fromAsMap, nil + } +} + // Provides a mechanism for individual structs to define their own unmarshal logic, // by implementing the Unmarshaler interface. func unmarshalerHookFunc(result any) mapstructure.DecodeHookFuncValue { @@ -368,3 +423,36 @@ func zeroSliceHookFunc() mapstructure.DecodeHookFuncValue { return from.Interface(), nil } } + +// This hook is used to solve the issue: https://github.com/open-telemetry/opentelemetry-collector/issues/9060 +// Decoding should fail when converting a negative integer to any type of unsigned integer. This prevents +// negative values being decoded as large uint values. +// TODO: This should be removed as a part of https://github.com/open-telemetry/opentelemetry-collector/issues/9532 +func negativeUintHookFunc() mapstructure.DecodeHookFuncValue { + return func(from reflect.Value, to reflect.Value) (interface{}, error) { + if from.CanInt() && from.Int() < 0 && to.CanUint() { + return nil, fmt.Errorf("cannot convert negative value %v to an unsigned integer", from.Int()) + } + return from.Interface(), nil + } +} + +type moduleFactory[T any, S any] interface { + Create(s S) T +} + +type createConfmapFunc[T any, S any] func(s S) T + +type confmapModuleFactory[T any, S any] struct { + f createConfmapFunc[T, S] +} + +func (c confmapModuleFactory[T, S]) Create(s S) T { + return c.f(s) +} + +func newConfmapModuleFactory[T any, S any](f createConfmapFunc[T, S]) moduleFactory[T, S] { + return confmapModuleFactory[T, S]{ + f: f, + } +} diff --git a/confmap/confmap_test.go b/confmap/confmap_test.go index 6680a1bc517..a1ea94e1fe4 100644 --- a/confmap/confmap_test.go +++ b/confmap/confmap_test.go @@ -5,6 +5,7 @@ package confmap import ( "errors" + "fmt" "os" "path/filepath" "strings" @@ -213,6 +214,74 @@ func TestMapKeyStringToMapKeyTextUnmarshalerHookFunc(t *testing.T) { assert.Equal(t, map[TestID]string{"string": "this is a string"}, cfg.Map) } +type UintConfig struct { + UintTest uint32 `mapstructure:"uint_test"` +} + +func TestUintUnmarshalerSuccess(t *testing.T) { + tests := []struct { + name string + testValue int + }{ + { + name: "Test convert 0 to uint", + testValue: 0, + }, + { + name: "Test positive uint conversion", + testValue: 1000, + }, + } + + for _, tt := range tests { + tt := tt + + t.Run(tt.name, func(t *testing.T) { + stringMap := map[string]any{ + "uint_test": tt.testValue, + } + conf := NewFromStringMap(stringMap) + cfg := &UintConfig{} + err := conf.Unmarshal(cfg) + + assert.NoError(t, err) + assert.Equal(t, cfg.UintTest, uint32(tt.testValue)) + }) + } +} + +func TestUint64Unmarshaler(t *testing.T) { + negativeInt := -1000 + testValue := uint64(negativeInt) + + type Uint64Config struct { + UintTest uint64 `mapstructure:"uint_test"` + } + stringMap := map[string]any{ + "uint_test": testValue, + } + + conf := NewFromStringMap(stringMap) + cfg := &Uint64Config{} + err := conf.Unmarshal(cfg) + + assert.NoError(t, err) + assert.Equal(t, cfg.UintTest, testValue) +} + +func TestUintUnmarshalerFailure(t *testing.T) { + testValue := -1000 + stringMap := map[string]any{ + "uint_test": testValue, + } + conf := NewFromStringMap(stringMap) + cfg := &UintConfig{} + err := conf.Unmarshal(cfg) + + assert.Error(t, err) + assert.Contains(t, err.Error(), fmt.Sprintf("* error decoding 'uint_test': cannot convert negative value %v to an unsigned integer", testValue)) +} + func TestMapKeyStringToMapKeyTextUnmarshalerHookFuncDuplicateID(t *testing.T) { stringMap := map[string]any{ "bool": true, @@ -309,8 +378,78 @@ func newConfFromFile(t testing.TB, fileName string) map[string]any { } type testConfig struct { - Next *nextConfig `mapstructure:"next"` - Another string `mapstructure:"another"` + Next *nextConfig `mapstructure:"next"` + Another string `mapstructure:"another"` + EmbeddedConfig `mapstructure:",squash"` + EmbeddedConfig2 `mapstructure:",squash"` +} + +type testConfigWithoutUnmarshaler struct { + Next *nextConfig `mapstructure:"next"` + Another string `mapstructure:"another"` + EmbeddedConfig `mapstructure:",squash"` + EmbeddedConfig2 `mapstructure:",squash"` +} + +type testConfigWithEmbeddedError struct { + Next *nextConfig `mapstructure:"next"` + Another string `mapstructure:"another"` + EmbeddedConfigWithError `mapstructure:",squash"` +} + +type testConfigWithMarshalError struct { + Next *nextConfig `mapstructure:"next"` + Another string `mapstructure:"another"` + EmbeddedConfigWithMarshalError `mapstructure:",squash"` +} + +func (tc *testConfigWithEmbeddedError) Unmarshal(component *Conf) error { + if err := component.Unmarshal(tc, WithIgnoreUnused()); err != nil { + return err + } + return nil +} + +type EmbeddedConfig struct { + Some string `mapstructure:"some"` +} + +func (ec *EmbeddedConfig) Unmarshal(component *Conf) error { + if err := component.Unmarshal(ec, WithIgnoreUnused()); err != nil { + return err + } + ec.Some += " is also called" + return nil +} + +type EmbeddedConfig2 struct { + Some2 string `mapstructure:"some_2"` +} + +func (ec *EmbeddedConfig2) Unmarshal(component *Conf) error { + if err := component.Unmarshal(ec, WithIgnoreUnused()); err != nil { + return err + } + ec.Some2 += " also called2" + return nil +} + +type EmbeddedConfigWithError struct { +} + +func (ecwe *EmbeddedConfigWithError) Unmarshal(_ *Conf) error { + return errors.New("embedded error") +} + +type EmbeddedConfigWithMarshalError struct { +} + +func (ecwe EmbeddedConfigWithMarshalError) Marshal(_ *Conf) error { + return errors.New("marshaling error") +} + +func (ecwe EmbeddedConfigWithMarshalError) Unmarshal(_ *Conf) error { + return nil } func (tc *testConfig) Unmarshal(component *Conf) error { @@ -340,12 +479,59 @@ func TestUnmarshaler(t *testing.T) { "string": "make sure this", }, "another": "make sure this", + "some": "make sure this", + "some_2": "this better be", }) tc := &testConfig{} assert.NoError(t, cfgMap.Unmarshal(tc)) assert.Equal(t, "make sure this", tc.Another) assert.Equal(t, "make sure this is called", tc.Next.String) + assert.Equal(t, "make sure this is also called", tc.EmbeddedConfig.Some) + assert.Equal(t, "this better be also called2", tc.EmbeddedConfig2.Some2) +} + +func TestEmbeddedUnmarshaler(t *testing.T) { + cfgMap := NewFromStringMap(map[string]any{ + "next": map[string]any{ + "string": "make sure this", + }, + "another": "make sure this", + "some": "make sure this", + "some_2": "this better be", + }) + + tc := &testConfigWithoutUnmarshaler{} + assert.NoError(t, cfgMap.Unmarshal(tc)) + assert.Equal(t, "make sure this", tc.Another) + assert.Equal(t, "make sure this is called", tc.Next.String) + assert.Equal(t, "make sure this is also called", tc.EmbeddedConfig.Some) + assert.Equal(t, "this better be also called2", tc.EmbeddedConfig2.Some2) +} + +func TestEmbeddedUnmarshalerError(t *testing.T) { + cfgMap := NewFromStringMap(map[string]any{ + "next": map[string]any{ + "string": "make sure this", + }, + "another": "make sure this", + "some": "make sure this", + }) + + tc := &testConfigWithEmbeddedError{} + assert.EqualError(t, cfgMap.Unmarshal(tc), "embedded error") +} + +func TestEmbeddedMarshalerError(t *testing.T) { + cfgMap := NewFromStringMap(map[string]any{ + "next": map[string]any{ + "string": "make sure this", + }, + "another": "make sure this", + }) + + tc := &testConfigWithMarshalError{} + assert.EqualError(t, cfgMap.Unmarshal(tc), "error running encode hook: marshaling error") } func TestUnmarshalerKeepAlreadyInitialized(t *testing.T) { @@ -496,3 +682,148 @@ func TestZeroSliceHookFunc(t *testing.T) { }) } } + +type C struct { + Modifiers []string `mapstructure:"modifiers"` +} + +func (c *C) Unmarshal(conf *Conf) error { + if err := conf.Unmarshal(c); err != nil { + return err + } + c.Modifiers = append(c.Modifiers, "C.Unmarshal") + return nil +} + +type B struct { + Modifiers []string `mapstructure:"modifiers"` + C C `mapstructure:"c"` +} + +func (b *B) Unmarshal(conf *Conf) error { + if err := conf.Unmarshal(b); err != nil { + return err + } + b.Modifiers = append(b.Modifiers, "B.Unmarshal") + b.C.Modifiers = append(b.C.Modifiers, "B.Unmarshal") + return nil +} + +type A struct { + Modifiers []string `mapstructure:"modifiers"` + B B `mapstructure:"b"` +} + +func (a *A) Unmarshal(conf *Conf) error { + if err := conf.Unmarshal(a); err != nil { + return err + } + a.Modifiers = append(a.Modifiers, "A.Unmarshal") + a.B.Modifiers = append(a.B.Modifiers, "A.Unmarshal") + a.B.C.Modifiers = append(a.B.C.Modifiers, "A.Unmarshal") + return nil +} + +type Wrapper struct { + A A `mapstructure:"a"` +} + +// Test that calling the Unmarshal method on configuration structs is done from the inside out. +func TestNestedUnmarshalerImplementations(t *testing.T) { + conf := NewFromStringMap(map[string]any{"a": map[string]any{ + "modifiers": []string{"conf.Unmarshal"}, + "b": map[string]any{ + "modifiers": []string{"conf.Unmarshal"}, + "c": map[string]any{ + "modifiers": []string{"conf.Unmarshal"}, + }, + }, + }}) + + // Use a wrapper struct until we deprecate component.UnmarshalConfig + w := &Wrapper{} + assert.NoError(t, conf.Unmarshal(w)) + + a := w.A + assert.Equal(t, []string{"conf.Unmarshal", "A.Unmarshal"}, a.Modifiers) + assert.Equal(t, []string{"conf.Unmarshal", "B.Unmarshal", "A.Unmarshal"}, a.B.Modifiers) + assert.Equal(t, []string{"conf.Unmarshal", "C.Unmarshal", "B.Unmarshal", "A.Unmarshal"}, a.B.C.Modifiers) +} + +// Test that unmarshaling the same conf twice works. +func TestUnmarshalDouble(t *testing.T) { + conf := NewFromStringMap(map[string]any{ + "str": "test", + }) + + type Struct struct { + Str string `mapstructure:"str"` + } + s := &Struct{} + assert.NoError(t, conf.Unmarshal(s)) + assert.Equal(t, "test", s.Str) + + type Struct2 struct { + Str string `mapstructure:"str"` + } + s2 := &Struct2{} + assert.NoError(t, conf.Unmarshal(s2)) + assert.Equal(t, "test", s2.Str) +} + +type EmbeddedStructWithUnmarshal struct { + Foo string `mapstructure:"foo"` + success string +} + +func (e *EmbeddedStructWithUnmarshal) Unmarshal(c *Conf) error { + if err := c.Unmarshal(e, WithIgnoreUnused()); err != nil { + return err + } + e.success = "success" + return nil +} + +type configWithUnmarshalFromEmbeddedStruct struct { + EmbeddedStructWithUnmarshal +} + +type topLevel struct { + Cfg *configWithUnmarshalFromEmbeddedStruct `mapstructure:"toplevel"` +} + +// Test that Unmarshal is called on the embedded struct on the struct. +func TestUnmarshalThroughEmbeddedStruct(t *testing.T) { + c := NewFromStringMap(map[string]any{ + "toplevel": map[string]any{ + "foo": "bar", + }, + }) + cfg := &topLevel{} + err := c.Unmarshal(cfg) + require.NoError(t, err) + require.Equal(t, "success", cfg.Cfg.EmbeddedStructWithUnmarshal.success) + require.Equal(t, "bar", cfg.Cfg.EmbeddedStructWithUnmarshal.Foo) +} + +type configWithOwnUnmarshalAndEmbeddedSquashedStruct struct { + EmbeddedStructWithUnmarshal `mapstructure:",squash"` +} + +type topLevelSquashedEmbedded struct { + Cfg *configWithOwnUnmarshalAndEmbeddedSquashedStruct `mapstructure:"toplevel"` +} + +// Test that the Unmarshal method is called on the squashed, embedded struct. +func TestUnmarshalOwnThroughEmbeddedSquashedStruct(t *testing.T) { + c := NewFromStringMap(map[string]any{ + "toplevel": map[string]any{ + "foo": "bar", + }, + }) + cfg := &topLevelSquashedEmbedded{} + err := c.Unmarshal(cfg) + require.NoError(t, err) + require.Equal(t, "success", cfg.Cfg.EmbeddedStructWithUnmarshal.success) + require.Equal(t, "bar", cfg.Cfg.EmbeddedStructWithUnmarshal.Foo) +} diff --git a/confmap/confmaptest/provider_settings.go b/confmap/confmaptest/provider_settings.go new file mode 100644 index 00000000000..8d36b36efca --- /dev/null +++ b/confmap/confmaptest/provider_settings.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package confmaptest // import "go.opentelemetry.io/collector/confmap/confmaptest" + +import ( + "go.uber.org/zap" + + "go.opentelemetry.io/collector/confmap" +) + +func NewNopProviderSettings() confmap.ProviderSettings { + return confmap.ProviderSettings{Logger: zap.NewNop()} +} diff --git a/confmap/converter.go b/confmap/converter.go index 17316d10304..2dce87e496e 100644 --- a/confmap/converter.go +++ b/confmap/converter.go @@ -8,9 +8,20 @@ import ( ) // ConverterSettings are the settings to initialize a Converter. -// Any Converter should take this as a parameter in its constructor. type ConverterSettings struct{} +// ConverterFactory defines a factory that can be used to instantiate +// new instances of a Converter. +type ConverterFactory = moduleFactory[Converter, ConverterSettings] + +// CreateConverterFunc is a function that creates a Converter instance. +type CreateConverterFunc = createConfmapFunc[Converter, ConverterSettings] + +// NewConverterFactory can be used to create a ConverterFactory. +func NewConverterFactory(f CreateConverterFunc) ConverterFactory { + return newConfmapModuleFactory(f) +} + // Converter is a converter interface for the confmap.Conf that allows distributions // (in the future components as well) to build backwards compatible config converters. type Converter interface { diff --git a/confmap/converter/expandconverter/expand.go b/confmap/converter/expandconverter/expand.go index dc3a89812c4..f07617cd3d6 100644 --- a/confmap/converter/expandconverter/expand.go +++ b/confmap/converter/expandconverter/expand.go @@ -5,42 +5,62 @@ package expandconverter // import "go.opentelemetry.io/collector/confmap/convert import ( "context" + "fmt" "os" + "regexp" + + "go.uber.org/zap" "go.opentelemetry.io/collector/confmap" ) -type converter struct{} +type converter struct { + logger *zap.Logger + + // Record of which env vars we have logged a warning for + loggedDeprecations map[string]struct{} +} // New returns a confmap.Converter, that expands all environment variables for a given confmap.Conf. // // Notice: This API is experimental. -func New(confmap.ConverterSettings) confmap.Converter { - return converter{} +// +// Deprecated: [v0.99.0] Use NewFactory instead. +func New(_ confmap.ConverterSettings) confmap.Converter { + return converter{ + loggedDeprecations: make(map[string]struct{}), + logger: zap.NewNop(), // TODO: pass logger in ConverterSettings + } +} + +// NewFactory returns a factory for a confmap.Converter, +// which expands all environment variables for a given confmap.Conf. +func NewFactory() confmap.ConverterFactory { + return confmap.NewConverterFactory(New) } -func (converter) Convert(_ context.Context, conf *confmap.Conf) error { +func (c converter) Convert(_ context.Context, conf *confmap.Conf) error { out := make(map[string]any) for _, k := range conf.AllKeys() { - out[k] = expandStringValues(conf.Get(k)) + out[k] = c.expandStringValues(conf.Get(k)) } return conf.Merge(confmap.NewFromStringMap(out)) } -func expandStringValues(value any) any { +func (c converter) expandStringValues(value any) any { switch v := value.(type) { case string: - return expandEnv(v) + return c.expandEnv(v) case []any: nslice := make([]any, 0, len(v)) for _, vint := range v { - nslice = append(nslice, expandStringValues(vint)) + nslice = append(nslice, c.expandStringValues(vint)) } return nslice case map[string]any: nmap := map[string]any{} for mk, mv := range v { - nmap[mk] = expandStringValues(mv) + nmap[mk] = c.expandStringValues(mv) } return nmap default: @@ -48,8 +68,16 @@ func expandStringValues(value any) any { } } -func expandEnv(s string) string { +func (c converter) expandEnv(s string) string { return os.Expand(s, func(str string) string { + // Matches on $VAR style environment variables + // in order to make sure we don't log a warning for ${VAR} + var regex = regexp.MustCompile(fmt.Sprintf(`\$%s`, regexp.QuoteMeta(str))) + if _, exists := c.loggedDeprecations[str]; !exists && regex.MatchString(s) { + msg := fmt.Sprintf("Variable substitution using $VAR will be deprecated in favor of ${VAR} and ${env:VAR}, please update $%s", str) + c.logger.Warn(msg, zap.String("variable", str)) + c.loggedDeprecations[str] = struct{}{} + } // This allows escaping environment variable substitution via $$, e.g. // - $FOO will be substituted with env var FOO // - $$FOO will be replaced with $FOO diff --git a/confmap/converter/expandconverter/expand_test.go b/confmap/converter/expandconverter/expand_test.go index 731dd52e9b6..424a8be0319 100644 --- a/confmap/converter/expandconverter/expand_test.go +++ b/confmap/converter/expandconverter/expand_test.go @@ -5,11 +5,15 @@ package expandconverter import ( "context" + "fmt" "path/filepath" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" + "go.uber.org/zap/zaptest/observer" "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/confmaptest" @@ -45,7 +49,7 @@ func TestNewExpandConverter(t *testing.T) { require.NoError(t, err, "Unable to get config") // Test that expanded configs are the same with the simple config with no env vars. - require.NoError(t, New(confmap.ConverterSettings{}).Convert(context.Background(), conf)) + require.NoError(t, createConverter().Convert(context.Background(), conf)) assert.Equal(t, expectedCfgMap.ToStringMap(), conf.ToStringMap()) }) } @@ -64,7 +68,7 @@ func TestNewExpandConverter_EscapedMaps(t *testing.T) { "recv": "$MAP_VALUE", }}, ) - require.NoError(t, New(confmap.ConverterSettings{}).Convert(context.Background(), conf)) + require.NoError(t, createConverter().Convert(context.Background(), conf)) expectedMap := map[string]any{ "test_string_map": map[string]any{ @@ -101,7 +105,7 @@ func TestNewExpandConverter_EscapedEnvVars(t *testing.T) { // escaped $ alone "recv.7": "$", }} - require.NoError(t, New(confmap.ConverterSettings{}).Convert(context.Background(), conf)) + require.NoError(t, createConverter().Convert(context.Background(), conf)) assert.Equal(t, expectedMap, conf.ToStringMap()) } @@ -154,8 +158,101 @@ func TestNewExpandConverterHostPort(t *testing.T) { for _, tt := range testCases { t.Run(tt.name, func(t *testing.T) { conf := confmap.NewFromStringMap(tt.input) - require.NoError(t, New(confmap.ConverterSettings{}).Convert(context.Background(), conf)) + require.NoError(t, createConverter().Convert(context.Background(), conf)) assert.Equal(t, tt.expected, conf.ToStringMap()) }) } } + +func NewTestConverter() (confmap.Converter, *observer.ObservedLogs) { + core, logs := observer.New(zapcore.InfoLevel) + conv := converter{loggedDeprecations: make(map[string]struct{}), logger: zap.New(core)} + return conv, logs +} + +func TestDeprecatedWarning(t *testing.T) { + msgTemplate := `Variable substitution using $VAR will be deprecated in favor of ${VAR} and ${env:VAR}, please update $%s` + t.Setenv("HOST", "127.0.0.1") + t.Setenv("PORT", "4317") + + t.Setenv("HOST_NAME", "127.0.0.2") + t.Setenv("HOST.NAME", "127.0.0.3") + + var testCases = []struct { + name string + input map[string]any + expectedOutput map[string]any + expectedWarnings []string + }{ + { + name: "no warning", + input: map[string]any{ + "test": "${HOST}:${PORT}", + }, + expectedOutput: map[string]any{ + "test": "127.0.0.1:4317", + }, + expectedWarnings: []string{}, + }, + { + name: "one deprecated var", + input: map[string]any{ + "test": "${HOST}:$PORT", + }, + expectedOutput: map[string]any{ + "test": "127.0.0.1:4317", + }, + expectedWarnings: []string{"PORT"}, + }, + { + name: "two deprecated vars", + input: map[string]any{ + "test": "$HOST:$PORT", + }, + expectedOutput: map[string]any{ + "test": "127.0.0.1:4317", + }, + expectedWarnings: []string{"HOST", "PORT"}, + }, + { + name: "one depracated serveral times", + input: map[string]any{ + "test": "$HOST,$HOST", + "test2": "$HOST", + }, + expectedOutput: map[string]any{ + "test": "127.0.0.1,127.0.0.1", + "test2": "127.0.0.1", + }, + expectedWarnings: []string{"HOST"}, + }, + { + name: "one warning", + input: map[string]any{ + "test": "$HOST_NAME,${HOST.NAME}", + }, + expectedOutput: map[string]any{ + "test": "127.0.0.2,127.0.0.3", + }, + expectedWarnings: []string{"HOST_NAME"}, + }, + } + for _, tt := range testCases { + t.Run(tt.name, func(t *testing.T) { + conf := confmap.NewFromStringMap(tt.input) + conv, logs := NewTestConverter() + require.NoError(t, conv.Convert(context.Background(), conf)) + + assert.Equal(t, tt.expectedOutput, conf.ToStringMap()) + assert.Equal(t, len(tt.expectedWarnings), len(logs.All())) + for i, variable := range tt.expectedWarnings { + errorMsg := fmt.Sprintf(msgTemplate, variable) + assert.Equal(t, errorMsg, logs.All()[i].Message) + } + }) + } +} + +func createConverter() confmap.Converter { + return NewFactory().Create(confmap.ConverterSettings{}) +} diff --git a/confmap/converter/expandconverter/go.mod b/confmap/converter/expandconverter/go.mod index 81efa808243..9e9492973b4 100644 --- a/confmap/converter/expandconverter/go.mod +++ b/confmap/converter/expandconverter/go.mod @@ -3,9 +3,10 @@ module go.opentelemetry.io/collector/confmap/converter/expandconverter go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/confmap v0.96.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/confmap v0.100.0 go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( @@ -13,7 +14,7 @@ require ( github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect diff --git a/confmap/converter/expandconverter/go.sum b/confmap/converter/expandconverter/go.sum index 69f4a4f6724..e70f902d5f5 100644 --- a/confmap/converter/expandconverter/go.sum +++ b/confmap/converter/expandconverter/go.sum @@ -6,8 +6,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -18,12 +18,14 @@ github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zx github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= 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.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/confmap/doc_test.go b/confmap/doc_test.go new file mode 100644 index 00000000000..d026bc2d733 --- /dev/null +++ b/confmap/doc_test.go @@ -0,0 +1,97 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package confmap_test + +import ( + "fmt" + "slices" + "time" + + "go.opentelemetry.io/collector/confmap" +) + +type DiskScrape struct { + Disk string `mapstructure:"disk"` + Scrape time.Duration `mapstructure:"scrape"` +} + +// We can annotate a struct with mapstructure field annotations. +func Example_simpleUnmarshaling() { + conf := confmap.NewFromStringMap(map[string]any{ + "disk": "c", + "scrape": "5s", + }) + scrapeInfo := &DiskScrape{} + if err := conf.Unmarshal(scrapeInfo); err != nil { + panic(err) + } + fmt.Printf("Configuration contains the following:\nDisk: %q\nScrape: %s\n", scrapeInfo.Disk, scrapeInfo.Scrape) + //Output: Configuration contains the following: + // Disk: "c" + // Scrape: 5s +} + +type CPUScrape struct { + Enabled bool `mapstructure:"enabled"` +} + +type ComputerScrape struct { + DiskScrape `mapstructure:",squash"` + CPUScrape `mapstructure:",squash"` +} + +// We can unmarshal embedded structs with mapstructure field annotations. +func Example_embeddedUnmarshaling() { + conf := confmap.NewFromStringMap(map[string]any{ + "disk": "c", + "scrape": "5s", + "enabled": true, + }) + scrapeInfo := &ComputerScrape{} + if err := conf.Unmarshal(scrapeInfo); err != nil { + panic(err) + } + fmt.Printf("Configuration contains the following:\nDisk: %q\nScrape: %s\nEnabled: %v\n", scrapeInfo.Disk, scrapeInfo.Scrape, scrapeInfo.Enabled) + //Output: Configuration contains the following: + // Disk: "c" + // Scrape: 5s + // Enabled: true +} + +type NetworkScrape struct { + Enabled bool `mapstructure:"enabled"` + Networks []string `mapstructure:"networks"` + Wifi bool `mapstructure:"wifi"` +} + +func (n *NetworkScrape) Unmarshal(c *confmap.Conf) error { + if err := c.Unmarshal(n, confmap.WithIgnoreUnused()); err != nil { + return err + } + if slices.Contains(n.Networks, "wlan0") { + n.Wifi = true + } + return nil +} + +type RouterScrape struct { + NetworkScrape `mapstructure:",squash"` +} + +// We can unmarshal an embedded struct with a custom `Unmarshal` method. +func Example_embeddedManualUnmarshaling() { + conf := confmap.NewFromStringMap(map[string]any{ + "networks": []string{"eth0", "eth1", "wlan0"}, + "enabled": true, + }) + scrapeInfo := &RouterScrape{} + if err := conf.Unmarshal(scrapeInfo); err != nil { + panic(err) + } + fmt.Printf("Configuration contains the following:\nNetworks: %q\nWifi: %v\nEnabled: %v\n", scrapeInfo.Networks, scrapeInfo.Wifi, scrapeInfo.Enabled) + //Output: Configuration contains the following: + // Networks: ["eth0" "eth1" "wlan0"] + // Wifi: true + // Enabled: true +} diff --git a/confmap/expand_test.go b/confmap/expand_test.go index 98ad790feeb..c1dc6646152 100644 --- a/confmap/expand_test.go +++ b/confmap/expand_test.go @@ -42,7 +42,7 @@ func TestResolverExpandEnvVars(t *testing.T) { for _, test := range testCases { t.Run(test.name, func(t *testing.T) { - resolver, err := NewResolver(ResolverSettings{URIs: []string{filepath.Join("testdata", test.name)}, Providers: makeMapProvidersMap(fileProvider, envProvider), Converters: nil}) + resolver, err := NewResolver(ResolverSettings{URIs: []string{filepath.Join("testdata", test.name)}, ProviderFactories: []ProviderFactory{fileProvider, envProvider}, ConverterFactories: nil}) require.NoError(t, err) // Test that expanded configs are the same with the simple config with no env vars. @@ -65,7 +65,7 @@ func TestResolverDoneNotExpandOldEnvVars(t *testing.T) { return NewRetrieved("some string") }) - resolver, err := NewResolver(ResolverSettings{URIs: []string{"test:"}, Providers: makeMapProvidersMap(fileProvider, envProvider, emptySchemeProvider), Converters: nil}) + resolver, err := NewResolver(ResolverSettings{URIs: []string{"test:"}, ProviderFactories: []ProviderFactory{fileProvider, envProvider, emptySchemeProvider}, ConverterFactories: nil}) require.NoError(t, err) // Test that expanded configs are the same with the simple config with no env vars. @@ -86,7 +86,7 @@ func TestResolverExpandMapAndSliceValues(t *testing.T) { return NewRetrieved(receiverExtraMapValue) }) - resolver, err := NewResolver(ResolverSettings{URIs: []string{"input:"}, Providers: makeMapProvidersMap(provider, testProvider), Converters: nil}) + resolver, err := NewResolver(ResolverSettings{URIs: []string{"input:"}, ProviderFactories: []ProviderFactory{provider, testProvider}, ConverterFactories: nil}) require.NoError(t, err) cfgMap, err := resolver.Resolve(context.Background()) @@ -295,7 +295,7 @@ func TestResolverExpandStringValues(t *testing.T) { return NewRetrieved(uri[5:]) }) - resolver, err := NewResolver(ResolverSettings{URIs: []string{"input:"}, Providers: makeMapProvidersMap(provider, newEnvProvider(), testProvider), Converters: nil}) + resolver, err := NewResolver(ResolverSettings{URIs: []string{"input:"}, ProviderFactories: []ProviderFactory{provider, newEnvProvider(), testProvider}, ConverterFactories: nil}) require.NoError(t, err) cfgMap, err := resolver.Resolve(context.Background()) @@ -305,7 +305,7 @@ func TestResolverExpandStringValues(t *testing.T) { } } -func newEnvProvider() Provider { +func newEnvProvider() ProviderFactory { return newFakeProvider("env", func(_ context.Context, uri string, _ WatcherFunc) (*Retrieved, error) { switch uri { case "env:COMPLEX_VALUE": @@ -369,7 +369,7 @@ func TestResolverExpandReturnError(t *testing.T) { return nil, myErr }) - resolver, err := NewResolver(ResolverSettings{URIs: []string{"input:"}, Providers: makeMapProvidersMap(provider, testProvider), Converters: nil}) + resolver, err := NewResolver(ResolverSettings{URIs: []string{"input:"}, ProviderFactories: []ProviderFactory{provider, testProvider}, ConverterFactories: nil}) require.NoError(t, err) _, err = resolver.Resolve(context.Background()) @@ -388,7 +388,7 @@ func TestResolverInfiniteExpand(t *testing.T) { return NewRetrieved(receiverValue) }) - resolver, err := NewResolver(ResolverSettings{URIs: []string{"input:"}, Providers: makeMapProvidersMap(provider, testProvider), Converters: nil}) + resolver, err := NewResolver(ResolverSettings{URIs: []string{"input:"}, ProviderFactories: []ProviderFactory{provider, testProvider}, ConverterFactories: nil}) require.NoError(t, err) _, err = resolver.Resolve(context.Background()) @@ -404,7 +404,7 @@ func TestResolverExpandInvalidScheme(t *testing.T) { panic("must not be called") }) - resolver, err := NewResolver(ResolverSettings{URIs: []string{"input:"}, Providers: makeMapProvidersMap(provider, testProvider), Converters: nil}) + resolver, err := NewResolver(ResolverSettings{URIs: []string{"input:"}, ProviderFactories: []ProviderFactory{provider, testProvider}, ConverterFactories: nil}) require.NoError(t, err) _, err = resolver.Resolve(context.Background()) @@ -421,7 +421,7 @@ func TestResolverExpandInvalidOpaqueValue(t *testing.T) { panic("must not be called") }) - resolver, err := NewResolver(ResolverSettings{URIs: []string{"input:"}, Providers: makeMapProvidersMap(provider, testProvider), Converters: nil}) + resolver, err := NewResolver(ResolverSettings{URIs: []string{"input:"}, ProviderFactories: []ProviderFactory{provider, testProvider}, ConverterFactories: nil}) require.NoError(t, err) _, err = resolver.Resolve(context.Background()) @@ -437,7 +437,7 @@ func TestResolverExpandUnsupportedScheme(t *testing.T) { panic("must not be called") }) - resolver, err := NewResolver(ResolverSettings{URIs: []string{"input:"}, Providers: makeMapProvidersMap(provider, testProvider), Converters: nil}) + resolver, err := NewResolver(ResolverSettings{URIs: []string{"input:"}, ProviderFactories: []ProviderFactory{provider, testProvider}, ConverterFactories: nil}) require.NoError(t, err) _, err = resolver.Resolve(context.Background()) @@ -453,7 +453,7 @@ func TestResolverExpandStringValueInvalidReturnValue(t *testing.T) { return NewRetrieved([]any{1243}) }) - resolver, err := NewResolver(ResolverSettings{URIs: []string{"input:"}, Providers: makeMapProvidersMap(provider, testProvider), Converters: nil}) + resolver, err := NewResolver(ResolverSettings{URIs: []string{"input:"}, ProviderFactories: []ProviderFactory{provider, testProvider}, ConverterFactories: nil}) require.NoError(t, err) _, err = resolver.Resolve(context.Background()) diff --git a/confmap/go.mod b/confmap/go.mod index 869cdedbe72..10e84cb18b5 100644 --- a/confmap/go.mod +++ b/confmap/go.mod @@ -6,16 +6,16 @@ require ( github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 github.com/knadh/koanf/maps v0.1.1 github.com/knadh/koanf/providers/confmap v0.1.0 - github.com/knadh/koanf/v2 v2.1.0 - github.com/stretchr/testify v1.8.4 + github.com/knadh/koanf/v2 v2.1.1 + github.com/stretchr/testify v1.9.0 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 + go.uber.org/zap v1.27.0 gopkg.in/yaml.v3 v3.0.1 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/kr/text v0.2.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect diff --git a/confmap/go.sum b/confmap/go.sum index 386dd5d4525..e70f902d5f5 100644 --- a/confmap/go.sum +++ b/confmap/go.sum @@ -1,4 +1,3 @@ -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= @@ -7,8 +6,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -19,12 +18,14 @@ github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zx github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= 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.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/confmap/provider.go b/confmap/provider.go index 91c2a60065a..95c0581327e 100644 --- a/confmap/provider.go +++ b/confmap/provider.go @@ -6,11 +6,30 @@ package confmap // import "go.opentelemetry.io/collector/confmap" import ( "context" "fmt" + + "go.uber.org/zap" ) // ProviderSettings are the settings to initialize a Provider. -// Any Provider should take this as a parameter in its constructor. -type ProviderSettings struct{} +type ProviderSettings struct { + // Logger is a zap.Logger that will be passed to Providers. + // Providers should be able to rely on the Logger being non-nil; + // when instantiating a Provider with a ProviderFactory, + // nil Logger references should be replaced with a no-op Logger. + Logger *zap.Logger +} + +// ProviderFactory defines a factory that can be used to instantiate +// new instances of a Provider. +type ProviderFactory = moduleFactory[Provider, ProviderSettings] + +// CreateProviderFunc is a function that creates a Provider instance. +type CreateProviderFunc = createConfmapFunc[Provider, ProviderSettings] + +// NewProviderFactory can be used to create a ProviderFactory. +func NewProviderFactory(f CreateProviderFunc) ProviderFactory { + return newConfmapModuleFactory(f) +} // Provider is an interface that helps to retrieve a config map and watch for any // changes to the config map. Implementations may load the config from a file, diff --git a/confmap/provider/envprovider/go.mod b/confmap/provider/envprovider/go.mod index 86036ea552f..9e9fed7326c 100644 --- a/confmap/provider/envprovider/go.mod +++ b/confmap/provider/envprovider/go.mod @@ -3,9 +3,10 @@ module go.opentelemetry.io/collector/confmap/provider/envprovider go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/confmap v0.96.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/confmap v0.100.0 go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require ( @@ -13,7 +14,7 @@ require ( github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect diff --git a/confmap/provider/envprovider/go.sum b/confmap/provider/envprovider/go.sum index 69f4a4f6724..e70f902d5f5 100644 --- a/confmap/provider/envprovider/go.sum +++ b/confmap/provider/envprovider/go.sum @@ -6,8 +6,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -18,12 +18,14 @@ github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zx github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= 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.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/confmap/provider/envprovider/provider.go b/confmap/provider/envprovider/provider.go index 61e8df8fbbf..c153893cb87 100644 --- a/confmap/provider/envprovider/provider.go +++ b/confmap/provider/envprovider/provider.go @@ -9,37 +9,51 @@ import ( "os" "strings" + "go.uber.org/zap" + "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/provider/internal" ) const schemeName = "env" -type provider struct{} +type provider struct { + logger *zap.Logger +} // NewWithSettings returns a new confmap.Provider that reads the configuration from the given environment variable. // // This Provider supports "env" scheme, and can be called with a selector: // `env:NAME_OF_ENVIRONMENT_VARIABLE` -func NewWithSettings(confmap.ProviderSettings) confmap.Provider { - return &provider{} +// +// Deprecated: [v0.99.0] Use NewFactory instead. +func NewWithSettings(ps confmap.ProviderSettings) confmap.Provider { + return &provider{ + logger: ps.Logger, + } } -// New returns a new confmap.Provider that reads the configuration from the given environment variable. +// NewFactory returns a factory for a confmap.Provider that reads the configuration from the given environment variable. // // This Provider supports "env" scheme, and can be called with a selector: // `env:NAME_OF_ENVIRONMENT_VARIABLE` -// Deprecated: [v0.94.0] Use NewWithSettings instead. -func New() confmap.Provider { - return NewWithSettings(confmap.ProviderSettings{}) +func NewFactory() confmap.ProviderFactory { + return confmap.NewProviderFactory(NewWithSettings) } func (emp *provider) Retrieve(_ context.Context, uri string, _ confmap.WatcherFunc) (*confmap.Retrieved, error) { if !strings.HasPrefix(uri, schemeName+":") { return nil, fmt.Errorf("%q uri is not supported by %q provider", uri, schemeName) } + envVarName := uri[len(schemeName)+1:] + val, exists := os.LookupEnv(envVarName) + if !exists { + emp.logger.Warn("Configuration references unset environment variable", zap.String("name", envVarName)) + } else if len(val) == 0 { + emp.logger.Info("Configuration references empty environment variable", zap.String("name", envVarName)) + } - return internal.NewRetrievedFromYAML([]byte(os.Getenv(uri[len(schemeName)+1:]))) + return internal.NewRetrievedFromYAML([]byte(val)) } func (*provider) Scheme() string { diff --git a/confmap/provider/envprovider/provider_test.go b/confmap/provider/envprovider/provider_test.go index d7bb0e2d992..c5fcbd91eee 100644 --- a/confmap/provider/envprovider/provider_test.go +++ b/confmap/provider/envprovider/provider_test.go @@ -9,6 +9,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/zap" + "go.uber.org/zap/zaptest/observer" "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/confmaptest" @@ -25,18 +27,18 @@ exporters: ` func TestValidateProviderScheme(t *testing.T) { - assert.NoError(t, confmaptest.ValidateProviderScheme(New())) + assert.NoError(t, confmaptest.ValidateProviderScheme(createProvider())) } func TestEmptyName(t *testing.T) { - env := New() + env := createProvider() _, err := env.Retrieve(context.Background(), "", nil) require.Error(t, err) assert.NoError(t, env.Shutdown(context.Background())) } func TestUnsupportedScheme(t *testing.T) { - env := New() + env := createProvider() _, err := env.Retrieve(context.Background(), "https://", nil) assert.Error(t, err) assert.NoError(t, env.Shutdown(context.Background())) @@ -45,7 +47,7 @@ func TestUnsupportedScheme(t *testing.T) { func TestInvalidYAML(t *testing.T) { const envName = "invalid-yaml" t.Setenv(envName, "[invalid,") - env := New() + env := createProvider() _, err := env.Retrieve(context.Background(), envSchemePrefix+envName, nil) assert.Error(t, err) assert.NoError(t, env.Shutdown(context.Background())) @@ -55,7 +57,7 @@ func TestEnv(t *testing.T) { const envName = "default-config" t.Setenv(envName, validYAML) - env := New() + env := createProvider() ret, err := env.Retrieve(context.Background(), envSchemePrefix+envName, nil) require.NoError(t, err) retMap, err := ret.AsConf() @@ -68,3 +70,74 @@ func TestEnv(t *testing.T) { assert.NoError(t, env.Shutdown(context.Background())) } + +func TestEnvWithLogger(t *testing.T) { + const envName = "default-config" + t.Setenv(envName, validYAML) + core, ol := observer.New(zap.WarnLevel) + logger := zap.New(core) + + env := NewWithSettings(confmap.ProviderSettings{Logger: logger}) + ret, err := env.Retrieve(context.Background(), envSchemePrefix+envName, nil) + require.NoError(t, err) + retMap, err := ret.AsConf() + assert.NoError(t, err) + expectedMap := confmap.NewFromStringMap(map[string]any{ + "processors::batch": nil, + "exporters::otlp::endpoint": "localhost:4317", + }) + assert.Equal(t, expectedMap.ToStringMap(), retMap.ToStringMap()) + + assert.NoError(t, env.Shutdown(context.Background())) + assert.Equal(t, 0, ol.Len()) +} + +func TestUnsetEnvWithLoggerWarn(t *testing.T) { + const envName = "default-config" + core, ol := observer.New(zap.WarnLevel) + logger := zap.New(core) + + env := NewWithSettings(confmap.ProviderSettings{Logger: logger}) + ret, err := env.Retrieve(context.Background(), envSchemePrefix+envName, nil) + require.NoError(t, err) + retMap, err := ret.AsConf() + assert.NoError(t, err) + expectedMap := confmap.NewFromStringMap(map[string]any{}) + assert.Equal(t, expectedMap.ToStringMap(), retMap.ToStringMap()) + + assert.NoError(t, env.Shutdown(context.Background())) + + assert.Equal(t, 1, ol.Len()) + logLine := ol.All()[0] + assert.Equal(t, "Configuration references unset environment variable", logLine.Message) + assert.Equal(t, zap.WarnLevel, logLine.Level) + assert.Equal(t, envName, logLine.Context[0].String) +} + +func TestEmptyEnvWithLoggerWarn(t *testing.T) { + const envName = "default-config" + t.Setenv(envName, "") + + core, ol := observer.New(zap.InfoLevel) + logger := zap.New(core) + + env := NewWithSettings(confmap.ProviderSettings{Logger: logger}) + ret, err := env.Retrieve(context.Background(), envSchemePrefix+envName, nil) + require.NoError(t, err) + retMap, err := ret.AsConf() + assert.NoError(t, err) + expectedMap := confmap.NewFromStringMap(map[string]any{}) + assert.Equal(t, expectedMap.ToStringMap(), retMap.ToStringMap()) + + assert.NoError(t, env.Shutdown(context.Background())) + + assert.Equal(t, 1, ol.Len()) + logLine := ol.All()[0] + assert.Equal(t, "Configuration references empty environment variable", logLine.Message) + assert.Equal(t, zap.InfoLevel, logLine.Level) + assert.Equal(t, envName, logLine.Context[0].String) +} + +func createProvider() confmap.Provider { + return NewFactory().Create(confmaptest.NewNopProviderSettings()) +} diff --git a/confmap/provider/fileprovider/go.mod b/confmap/provider/fileprovider/go.mod index bc546c4634b..08d0c0393b2 100644 --- a/confmap/provider/fileprovider/go.mod +++ b/confmap/provider/fileprovider/go.mod @@ -3,8 +3,8 @@ module go.opentelemetry.io/collector/confmap/provider/fileprovider go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/confmap v0.96.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/confmap v0.100.0 go.uber.org/goleak v1.3.0 ) @@ -13,11 +13,12 @@ require ( github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/confmap/provider/fileprovider/go.sum b/confmap/provider/fileprovider/go.sum index 69f4a4f6724..e70f902d5f5 100644 --- a/confmap/provider/fileprovider/go.sum +++ b/confmap/provider/fileprovider/go.sum @@ -6,8 +6,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -18,12 +18,14 @@ github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zx github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= 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.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/confmap/provider/fileprovider/provider.go b/confmap/provider/fileprovider/provider.go index a4da3af387f..b1723ad16c6 100644 --- a/confmap/provider/fileprovider/provider.go +++ b/confmap/provider/fileprovider/provider.go @@ -18,7 +18,7 @@ const schemeName = "file" type provider struct{} -// New returns a new confmap.Provider that reads the configuration from a file. +// NewWithSettings returns a new confmap.Provider that reads the configuration from a file. // // This Provider supports "file" scheme, and can be called with a "uri" that follows: // @@ -33,11 +33,13 @@ type provider struct{} // `file:/path/to/file` - absolute path (unix, windows) // `file:c:/path/to/file` - absolute path including drive-letter (windows) // `file:c:\path\to\file` - absolute path including drive-letter (windows) +// +// Deprecated: [v0.99.0] Use NewFactory instead. func NewWithSettings(confmap.ProviderSettings) confmap.Provider { return &provider{} } -// New returns a new confmap.Provider that reads the configuration from a file. +// NewFactory returns a factory for a confmap.Provider that reads the configuration from a file. // // This Provider supports "file" scheme, and can be called with a "uri" that follows: // @@ -52,9 +54,8 @@ func NewWithSettings(confmap.ProviderSettings) confmap.Provider { // `file:/path/to/file` - absolute path (unix, windows) // `file:c:/path/to/file` - absolute path including drive-letter (windows) // `file:c:\path\to\file` - absolute path including drive-letter (windows) -// Deprecated: [v0.94.0] Use NewWithSettings instead. -func New() confmap.Provider { - return NewWithSettings(confmap.ProviderSettings{}) +func NewFactory() confmap.ProviderFactory { + return confmap.NewProviderFactory(NewWithSettings) } func (fmp *provider) Retrieve(_ context.Context, uri string, _ confmap.WatcherFunc) (*confmap.Retrieved, error) { diff --git a/confmap/provider/fileprovider/provider_test.go b/confmap/provider/fileprovider/provider_test.go index dfc70756d99..022bf8f1758 100644 --- a/confmap/provider/fileprovider/provider_test.go +++ b/confmap/provider/fileprovider/provider_test.go @@ -19,25 +19,25 @@ import ( const fileSchemePrefix = schemeName + ":" func TestValidateProviderScheme(t *testing.T) { - assert.NoError(t, confmaptest.ValidateProviderScheme(New())) + assert.NoError(t, confmaptest.ValidateProviderScheme(createProvider())) } func TestEmptyName(t *testing.T) { - fp := New() + fp := createProvider() _, err := fp.Retrieve(context.Background(), "", nil) require.Error(t, err) require.NoError(t, fp.Shutdown(context.Background())) } func TestUnsupportedScheme(t *testing.T) { - fp := New() + fp := createProvider() _, err := fp.Retrieve(context.Background(), "https://", nil) assert.Error(t, err) assert.NoError(t, fp.Shutdown(context.Background())) } func TestNonExistent(t *testing.T) { - fp := New() + fp := createProvider() _, err := fp.Retrieve(context.Background(), fileSchemePrefix+filepath.Join("testdata", "non-existent.yaml"), nil) assert.Error(t, err) _, err = fp.Retrieve(context.Background(), fileSchemePrefix+absolutePath(t, filepath.Join("testdata", "non-existent.yaml")), nil) @@ -46,7 +46,7 @@ func TestNonExistent(t *testing.T) { } func TestInvalidYAML(t *testing.T) { - fp := New() + fp := createProvider() _, err := fp.Retrieve(context.Background(), fileSchemePrefix+filepath.Join("testdata", "invalid-yaml.yaml"), nil) assert.Error(t, err) _, err = fp.Retrieve(context.Background(), fileSchemePrefix+absolutePath(t, filepath.Join("testdata", "invalid-yaml.yaml")), nil) @@ -55,7 +55,7 @@ func TestInvalidYAML(t *testing.T) { } func TestRelativePath(t *testing.T) { - fp := New() + fp := createProvider() ret, err := fp.Retrieve(context.Background(), fileSchemePrefix+filepath.Join("testdata", "default-config.yaml"), nil) require.NoError(t, err) retMap, err := ret.AsConf() @@ -69,7 +69,7 @@ func TestRelativePath(t *testing.T) { } func TestAbsolutePath(t *testing.T) { - fp := New() + fp := createProvider() ret, err := fp.Retrieve(context.Background(), fileSchemePrefix+absolutePath(t, filepath.Join("testdata", "default-config.yaml")), nil) require.NoError(t, err) retMap, err := ret.AsConf() @@ -87,3 +87,7 @@ func absolutePath(t *testing.T, relativePath string) string { require.NoError(t, err) return filepath.Join(dir, relativePath) } + +func createProvider() confmap.Provider { + return NewFactory().Create(confmaptest.NewNopProviderSettings()) +} diff --git a/confmap/provider/httpprovider/go.mod b/confmap/provider/httpprovider/go.mod index 130befa5dea..e1e476ae46c 100644 --- a/confmap/provider/httpprovider/go.mod +++ b/confmap/provider/httpprovider/go.mod @@ -3,8 +3,8 @@ module go.opentelemetry.io/collector/confmap/provider/httpprovider go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/confmap v0.96.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/confmap v0.100.0 go.uber.org/goleak v1.3.0 ) @@ -13,11 +13,12 @@ require ( github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/confmap/provider/httpprovider/go.sum b/confmap/provider/httpprovider/go.sum index 69f4a4f6724..e70f902d5f5 100644 --- a/confmap/provider/httpprovider/go.sum +++ b/confmap/provider/httpprovider/go.sum @@ -6,8 +6,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -18,12 +18,14 @@ github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zx github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= 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.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/confmap/provider/httpprovider/provider.go b/confmap/provider/httpprovider/provider.go index 966faa510fb..6ed2b6d104c 100644 --- a/confmap/provider/httpprovider/provider.go +++ b/confmap/provider/httpprovider/provider.go @@ -13,16 +13,17 @@ import ( // This Provider supports "http" scheme. // // One example for HTTP URI is: http://localhost:3333/getConfig +// +// Deprecated: [v0.99.0] Use NewFactory instead. func NewWithSettings(set confmap.ProviderSettings) confmap.Provider { return configurablehttpprovider.New(configurablehttpprovider.HTTPScheme, set) } -// New returns a new confmap.Provider that reads the configuration from a http server. +// NewFactory returns a factory for a confmap.Provider that reads the configuration from a http server. // // This Provider supports "http" scheme. // // One example for HTTP URI is: http://localhost:3333/getConfig -// Deprecated: [v0.94.0] Use NewWithSettings instead. -func New() confmap.Provider { - return NewWithSettings(confmap.ProviderSettings{}) +func NewFactory() confmap.ProviderFactory { + return confmap.NewProviderFactory(NewWithSettings) } diff --git a/confmap/provider/httpprovider/provider_test.go b/confmap/provider/httpprovider/provider_test.go index b649b5d3d08..2a49c65ecaa 100644 --- a/confmap/provider/httpprovider/provider_test.go +++ b/confmap/provider/httpprovider/provider_test.go @@ -9,10 +9,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/confmap/confmaptest" ) func TestSupportedScheme(t *testing.T) { - fp := New() + fp := NewFactory().Create(confmaptest.NewNopProviderSettings()) assert.Equal(t, "http", fp.Scheme()) require.NoError(t, fp.Shutdown(context.Background())) } diff --git a/confmap/provider/httpsprovider/go.mod b/confmap/provider/httpsprovider/go.mod index 5bb4b5ae1d4..7275e193e52 100644 --- a/confmap/provider/httpsprovider/go.mod +++ b/confmap/provider/httpsprovider/go.mod @@ -3,8 +3,8 @@ module go.opentelemetry.io/collector/confmap/provider/httpsprovider go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/confmap v0.96.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/confmap v0.100.0 go.uber.org/goleak v1.3.0 ) @@ -13,11 +13,12 @@ require ( github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/confmap/provider/httpsprovider/go.sum b/confmap/provider/httpsprovider/go.sum index 69f4a4f6724..e70f902d5f5 100644 --- a/confmap/provider/httpsprovider/go.sum +++ b/confmap/provider/httpsprovider/go.sum @@ -6,8 +6,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -18,12 +18,14 @@ github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zx github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= 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.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/confmap/provider/httpsprovider/provider.go b/confmap/provider/httpsprovider/provider.go index 6db2cc9b151..0ee3672cf86 100644 --- a/confmap/provider/httpsprovider/provider.go +++ b/confmap/provider/httpsprovider/provider.go @@ -8,23 +8,24 @@ import ( "go.opentelemetry.io/collector/confmap/provider/internal/configurablehttpprovider" ) -// New returns a new confmap.Provider that reads the configuration from a https server. +// NewWithSettings returns a new confmap.Provider that reads the configuration from a https server. // // This Provider supports "https" scheme. One example of an HTTPS URI is: https://localhost:3333/getConfig // // To add extra CA certificates you need to install certificates in the system pool. This procedure is operating system // dependent. E.g.: on Linux please refer to the `update-ca-trust` command. +// +// Deprecated: [v0.99.0] Use NewFactory instead. func NewWithSettings(set confmap.ProviderSettings) confmap.Provider { return configurablehttpprovider.New(configurablehttpprovider.HTTPSScheme, set) } -// New returns a new confmap.Provider that reads the configuration from a https server. +// NewFactory returns a factory for a confmap.Provider that reads the configuration from a https server. // // This Provider supports "https" scheme. One example of an HTTPS URI is: https://localhost:3333/getConfig // // To add extra CA certificates you need to install certificates in the system pool. This procedure is operating system // dependent. E.g.: on Linux please refer to the `update-ca-trust` command. -// Deprecated: [v0.94.0] Use NewWithSettings instead. -func New() confmap.Provider { - return NewWithSettings(confmap.ProviderSettings{}) +func NewFactory() confmap.ProviderFactory { + return confmap.NewProviderFactory(NewWithSettings) } diff --git a/confmap/provider/httpsprovider/provider_test.go b/confmap/provider/httpsprovider/provider_test.go index f488fcc6abd..e1d895f510c 100644 --- a/confmap/provider/httpsprovider/provider_test.go +++ b/confmap/provider/httpsprovider/provider_test.go @@ -7,9 +7,11 @@ import ( "testing" "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/confmap/confmaptest" ) func TestSupportedScheme(t *testing.T) { - fp := New() + fp := NewFactory().Create(confmaptest.NewNopProviderSettings()) assert.Equal(t, "https", fp.Scheme()) } diff --git a/confmap/provider/internal/configurablehttpprovider/provider_test.go b/confmap/provider/internal/configurablehttpprovider/provider_test.go index ad4659879c4..125c1cbdd80 100644 --- a/confmap/provider/internal/configurablehttpprovider/provider_test.go +++ b/confmap/provider/internal/configurablehttpprovider/provider_test.go @@ -123,7 +123,7 @@ func generateCertificate(hostname string) (cert string, key string, err error) { } func TestFunctionalityDownloadFileHTTP(t *testing.T) { - fp := newConfigurableHTTPProvider(HTTPScheme, confmap.ProviderSettings{}) + fp := newConfigurableHTTPProvider(HTTPScheme, confmaptest.NewNopProviderSettings()) ts := httptest.NewServer(http.HandlerFunc(answerGet)) defer ts.Close() _, err := fp.Retrieve(context.Background(), ts.URL, nil) @@ -211,7 +211,7 @@ func TestFunctionalityDownloadFileHTTPS(t *testing.T) { for _, tt := range tests { t.Run(tt.testName, func(t *testing.T) { - fp := newConfigurableHTTPProvider(HTTPSScheme, confmap.ProviderSettings{}) + fp := newConfigurableHTTPProvider(HTTPSScheme, confmaptest.NewNopProviderSettings()) // Parse url of the test server to get the port number. tsURL, err := url.Parse(ts.URL) require.NoError(t, err) @@ -230,19 +230,19 @@ func TestFunctionalityDownloadFileHTTPS(t *testing.T) { } func TestUnsupportedScheme(t *testing.T) { - fp := New(HTTPScheme, confmap.ProviderSettings{}) + fp := New(HTTPScheme, confmaptest.NewNopProviderSettings()) _, err := fp.Retrieve(context.Background(), "https://...", nil) assert.Error(t, err) assert.NoError(t, fp.Shutdown(context.Background())) - fp = New(HTTPSScheme, confmap.ProviderSettings{}) + fp = New(HTTPSScheme, confmaptest.NewNopProviderSettings()) _, err = fp.Retrieve(context.Background(), "http://...", nil) assert.Error(t, err) assert.NoError(t, fp.Shutdown(context.Background())) } func TestEmptyURI(t *testing.T) { - fp := New(HTTPScheme, confmap.ProviderSettings{}) + fp := New(HTTPScheme, confmaptest.NewNopProviderSettings()) ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusBadRequest) })) @@ -253,7 +253,7 @@ func TestEmptyURI(t *testing.T) { } func TestRetrieveFromShutdownServer(t *testing.T) { - fp := New(HTTPScheme, confmap.ProviderSettings{}) + fp := New(HTTPScheme, confmaptest.NewNopProviderSettings()) ts := httptest.NewServer(http.HandlerFunc(func(http.ResponseWriter, *http.Request) {})) ts.Close() _, err := fp.Retrieve(context.Background(), ts.URL, nil) @@ -262,7 +262,7 @@ func TestRetrieveFromShutdownServer(t *testing.T) { } func TestNonExistent(t *testing.T) { - fp := New(HTTPScheme, confmap.ProviderSettings{}) + fp := New(HTTPScheme, confmaptest.NewNopProviderSettings()) ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusNotFound) })) @@ -273,7 +273,7 @@ func TestNonExistent(t *testing.T) { } func TestInvalidYAML(t *testing.T) { - fp := New(HTTPScheme, confmap.ProviderSettings{}) + fp := New(HTTPScheme, confmaptest.NewNopProviderSettings()) ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusOK) _, err := w.Write([]byte("wrong : [")) @@ -288,17 +288,17 @@ func TestInvalidYAML(t *testing.T) { } func TestScheme(t *testing.T) { - fp := New(HTTPScheme, confmap.ProviderSettings{}) + fp := New(HTTPScheme, confmaptest.NewNopProviderSettings()) assert.Equal(t, "http", fp.Scheme()) require.NoError(t, fp.Shutdown(context.Background())) } func TestValidateProviderScheme(t *testing.T) { - assert.NoError(t, confmaptest.ValidateProviderScheme(New(HTTPScheme, confmap.ProviderSettings{}))) + assert.NoError(t, confmaptest.ValidateProviderScheme(New(HTTPScheme, confmaptest.NewNopProviderSettings()))) } func TestInvalidTransport(t *testing.T) { - fp := New("foo", confmap.ProviderSettings{}) + fp := New("foo", confmaptest.NewNopProviderSettings()) _, err := fp.Retrieve(context.Background(), "foo://..", nil) assert.Error(t, err) diff --git a/confmap/provider/yamlprovider/go.mod b/confmap/provider/yamlprovider/go.mod index 482eaa6531c..a44885cae0d 100644 --- a/confmap/provider/yamlprovider/go.mod +++ b/confmap/provider/yamlprovider/go.mod @@ -3,8 +3,8 @@ module go.opentelemetry.io/collector/confmap/provider/yamlprovider go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/confmap v0.96.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/confmap v0.100.0 go.uber.org/goleak v1.3.0 ) @@ -13,11 +13,12 @@ require ( github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/confmap/provider/yamlprovider/go.sum b/confmap/provider/yamlprovider/go.sum index 69f4a4f6724..e70f902d5f5 100644 --- a/confmap/provider/yamlprovider/go.sum +++ b/confmap/provider/yamlprovider/go.sum @@ -6,8 +6,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -18,12 +18,14 @@ github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zx github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= 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.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/confmap/provider/yamlprovider/provider.go b/confmap/provider/yamlprovider/provider.go index 45fca8a1fc4..4f5c327ce4b 100644 --- a/confmap/provider/yamlprovider/provider.go +++ b/confmap/provider/yamlprovider/provider.go @@ -25,11 +25,13 @@ type provider struct{} // Examples: // `yaml:processors::batch::timeout: 2s` // `yaml:processors::batch/foo::timeout: 3s` +// +// Deprecated: [v0.99.0] Use NewFactory instead. func NewWithSettings(confmap.ProviderSettings) confmap.Provider { return &provider{} } -// New returns a new confmap.Provider that allows to provide yaml bytes. +// NewFactory returns a factory for a confmap.Provider that allows to provide yaml bytes. // // This Provider supports "yaml" scheme, and can be called with a "uri" that follows: // @@ -38,9 +40,8 @@ func NewWithSettings(confmap.ProviderSettings) confmap.Provider { // Examples: // `yaml:processors::batch::timeout: 2s` // `yaml:processors::batch/foo::timeout: 3s` -// Deprecated: [v0.94.0] Use NewWithSettings instead. -func New() confmap.Provider { - return NewWithSettings(confmap.ProviderSettings{}) +func NewFactory() confmap.ProviderFactory { + return confmap.NewProviderFactory(NewWithSettings) } func (s *provider) Retrieve(_ context.Context, uri string, _ confmap.WatcherFunc) (*confmap.Retrieved, error) { diff --git a/confmap/provider/yamlprovider/provider_test.go b/confmap/provider/yamlprovider/provider_test.go index 6e366c1c273..4abee7e8580 100644 --- a/confmap/provider/yamlprovider/provider_test.go +++ b/confmap/provider/yamlprovider/provider_test.go @@ -9,29 +9,30 @@ import ( "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/confmaptest" ) func TestValidateProviderScheme(t *testing.T) { - assert.NoError(t, confmaptest.ValidateProviderScheme(New())) + assert.NoError(t, confmaptest.ValidateProviderScheme(createProvider())) } func TestEmpty(t *testing.T) { - sp := New() + sp := createProvider() _, err := sp.Retrieve(context.Background(), "", nil) assert.Error(t, err) assert.NoError(t, sp.Shutdown(context.Background())) } func TestInvalidYAML(t *testing.T) { - sp := New() + sp := createProvider() _, err := sp.Retrieve(context.Background(), "yaml:[invalid,", nil) assert.Error(t, err) assert.NoError(t, sp.Shutdown(context.Background())) } func TestOneValue(t *testing.T) { - sp := New() + sp := createProvider() ret, err := sp.Retrieve(context.Background(), "yaml:processors::batch::timeout: 2s", nil) assert.NoError(t, err) retMap, err := ret.AsConf() @@ -47,7 +48,7 @@ func TestOneValue(t *testing.T) { } func TestNamedComponent(t *testing.T) { - sp := New() + sp := createProvider() ret, err := sp.Retrieve(context.Background(), "yaml:processors::batch/foo::timeout: 3s", nil) assert.NoError(t, err) retMap, err := ret.AsConf() @@ -63,7 +64,7 @@ func TestNamedComponent(t *testing.T) { } func TestMapEntry(t *testing.T) { - sp := New() + sp := createProvider() ret, err := sp.Retrieve(context.Background(), "yaml:processors: {batch/foo::timeout: 3s, batch::timeout: 2s}", nil) assert.NoError(t, err) retMap, err := ret.AsConf() @@ -82,7 +83,7 @@ func TestMapEntry(t *testing.T) { } func TestArrayEntry(t *testing.T) { - sp := New() + sp := createProvider() ret, err := sp.Retrieve(context.Background(), "yaml:service::extensions: [zpages, zpages/foo]", nil) assert.NoError(t, err) retMap, err := ret.AsConf() @@ -99,7 +100,7 @@ func TestArrayEntry(t *testing.T) { } func TestNewLine(t *testing.T) { - sp := New() + sp := createProvider() ret, err := sp.Retrieve(context.Background(), "yaml:processors::batch/foo::timeout: 3s\nprocessors::batch::timeout: 2s", nil) assert.NoError(t, err) retMap, err := ret.AsConf() @@ -118,7 +119,7 @@ func TestNewLine(t *testing.T) { } func TestDotSeparator(t *testing.T) { - sp := New() + sp := createProvider() ret, err := sp.Retrieve(context.Background(), "yaml:processors.batch.timeout: 4s", nil) assert.NoError(t, err) retMap, err := ret.AsConf() @@ -126,3 +127,7 @@ func TestDotSeparator(t *testing.T) { assert.Equal(t, map[string]any{"processors.batch.timeout": "4s"}, retMap.ToStringMap()) assert.NoError(t, sp.Shutdown(context.Background())) } + +func createProvider() confmap.Provider { + return NewFactory().Create(confmaptest.NewNopProviderSettings()) +} diff --git a/confmap/resolver.go b/confmap/resolver.go index f056d18d1ec..05f7f964d03 100644 --- a/confmap/resolver.go +++ b/confmap/resolver.go @@ -11,6 +11,7 @@ import ( "strings" "go.uber.org/multierr" + "go.uber.org/zap" ) // follows drive-letter specification: @@ -33,12 +34,32 @@ type ResolverSettings struct { // It is required to have at least one location. URIs []string + // ProviderFactories is a list of Provider creation functions. + // It is required to have at least one ProviderFactory + // if a Provider is not given. + ProviderFactories []ProviderFactory + // Providers is a map of pairs . // It is required to have at least one Provider. + // + // Deprecated: [v0.99.0] Use ProviderFactories instead Providers map[string]Provider - // MapConverters is a slice of Converter. + // ProviderSettings contains settings that will be passed to Provider + // factories when instantiating Providers. + ProviderSettings ProviderSettings + + // ConverterFactories is a slice of Converter creation functions. + ConverterFactories []ConverterFactory + + // Converters is a slice of Converters. + // + // Deprecated: [v0.99.0] Use ConverterFactories instead Converters []Converter + + // ConverterSettings contains settings that will be passed to Converter + // factories when instantiating Converters. + ConverterSettings ConverterSettings } // NewResolver returns a new Resolver that resolves configuration from multiple URIs. @@ -65,10 +86,42 @@ func NewResolver(set ResolverSettings) (*Resolver, error) { return nil, errors.New("invalid map resolver config: no URIs") } - if len(set.Providers) == 0 { + if len(set.ProviderFactories) == 0 && len(set.Providers) == 0 { return nil, errors.New("invalid map resolver config: no Providers") } + if set.ProviderSettings.Logger == nil { + set.ProviderSettings.Logger = zap.NewNop() + } + + var providers map[string]Provider + var converters []Converter + + if len(set.Providers) != 0 { + if len(set.ProviderFactories) != 0 { + return nil, errors.New("only one of ResolverSettings.Providers and ResolverSettings.ProviderFactories can be used") + } + providers = set.Providers + } else { + providers = make(map[string]Provider, len(set.ProviderFactories)) + for _, factory := range set.ProviderFactories { + provider := factory.Create(set.ProviderSettings) + providers[provider.Scheme()] = provider + } + } + + if len(set.Converters) != 0 { + if len(set.ConverterFactories) != 0 { + return nil, errors.New("only one of ResolverSettings.Converters and ResolverSettings.ConverterFactories can be used") + } + converters = set.Converters + } else { + converters = make([]Converter, len(set.ConverterFactories)) + for i, factory := range set.ConverterFactories { + converters[i] = factory.Create(set.ConverterSettings) + } + } + // Safe copy, ensures the slices and maps cannot be changed from the caller. uris := make([]location, len(set.URIs)) for i, uri := range set.URIs { @@ -83,28 +136,21 @@ func NewResolver(set ResolverSettings) (*Resolver, error) { if err != nil { return nil, err } - if _, ok := set.Providers[lURI.scheme]; !ok { + if _, ok := providers[lURI.scheme]; !ok { return nil, fmt.Errorf("unsupported scheme on URI %q", uri) } uris[i] = lURI } - providersCopy := make(map[string]Provider, len(set.Providers)) - for k, v := range set.Providers { - providersCopy[k] = v - } - convertersCopy := make([]Converter, len(set.Converters)) - copy(convertersCopy, set.Converters) return &Resolver{ uris: uris, - providers: providersCopy, - converters: convertersCopy, + providers: providers, + converters: converters, watcher: make(chan error, 1), }, nil } // Resolve returns the configuration as a Conf, or error otherwise. -// // Should never be called concurrently with itself, Watch or Shutdown. func (mr *Resolver) Resolve(ctx context.Context) (*Conf, error) { // First check if already an active watching, close that if any. diff --git a/confmap/resolver_test.go b/confmap/resolver_test.go index aa1442d161a..122009d0e0e 100644 --- a/confmap/resolver_test.go +++ b/confmap/resolver_test.go @@ -13,6 +13,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/zap" ) type mockProvider struct { @@ -47,22 +48,49 @@ func (m *mockProvider) Shutdown(context.Context) error { return m.errS } +func newMockProvider(m *mockProvider) ProviderFactory { + return NewProviderFactory(func(_ ProviderSettings) Provider { + return m + }) +} + type fakeProvider struct { scheme string ret func(ctx context.Context, uri string, watcher WatcherFunc) (*Retrieved, error) + logger *zap.Logger } -func newFileProvider(t testing.TB) Provider { +func newFileProvider(t testing.TB) ProviderFactory { return newFakeProvider("file", func(_ context.Context, uri string, _ WatcherFunc) (*Retrieved, error) { return NewRetrieved(newConfFromFile(t, uri[5:])) }) } -func newFakeProvider(scheme string, ret func(ctx context.Context, uri string, watcher WatcherFunc) (*Retrieved, error)) Provider { - return &fakeProvider{ +func newFakeProvider(scheme string, ret func(ctx context.Context, uri string, watcher WatcherFunc) (*Retrieved, error)) ProviderFactory { + return NewProviderFactory(func(ps ProviderSettings) Provider { + return &fakeProvider{ + scheme: scheme, + ret: ret, + logger: ps.Logger, + } + }) +} + +func newObservableFileProvider(t testing.TB) (ProviderFactory, *fakeProvider) { + return newObservableProvider("file", func(_ context.Context, uri string, _ WatcherFunc) (*Retrieved, error) { + return NewRetrieved(newConfFromFile(t, uri[5:])) + }) +} + +func newObservableProvider(scheme string, ret func(ctx context.Context, uri string, watcher WatcherFunc) (*Retrieved, error)) (ProviderFactory, *fakeProvider) { + fp := &fakeProvider{ scheme: scheme, ret: ret, } + return NewProviderFactory(func(ps ProviderSettings) Provider { + fp.logger = ps.Logger + return fp + }), fp } func (f *fakeProvider) Retrieve(ctx context.Context, uri string, watcher WatcherFunc) (*Retrieved, error) { @@ -85,16 +113,8 @@ func (m *mockConverter) Convert(context.Context, *Conf) error { return errors.New("converter_err") } -func makeMapProvidersMap(providers ...Provider) map[string]Provider { - ret := make(map[string]Provider, len(providers)) - for _, provider := range providers { - ret[provider.Scheme()] = provider - } - return ret -} - func TestNewResolverInvalidScheme(t *testing.T) { - _, err := NewResolver(ResolverSettings{URIs: []string{"s_3:has invalid char"}, Providers: makeMapProvidersMap(&mockProvider{scheme: "s_3"})}) + _, err := NewResolver(ResolverSettings{URIs: []string{"s_3:has invalid char"}, ProviderFactories: []ProviderFactory{newMockProvider(&mockProvider{scheme: "s_3"})}}) assert.EqualError(t, err, `invalid uri: "s_3:has invalid char"`) } @@ -171,7 +191,17 @@ func TestResolverErrors(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - resolver, err := NewResolver(ResolverSettings{URIs: tt.locations, Providers: makeMapProvidersMap(tt.providers...), Converters: tt.converters}) + mockProviderFuncs := make([]ProviderFactory, len(tt.providers)) + for i, provider := range tt.providers { + p := provider + mockProviderFuncs[i] = NewProviderFactory(func(_ ProviderSettings) Provider { return p }) + } + converterFuncs := make([]ConverterFactory, len(tt.converters)) + for i, converter := range tt.converters { + c := converter + converterFuncs[i] = NewConverterFactory(func(_ ConverterSettings) Converter { return c }) + } + resolver, err := NewResolver(ResolverSettings{URIs: tt.locations, ProviderFactories: mockProviderFuncs, ConverterFactories: converterFuncs}) if tt.expectBuildErr { assert.Error(t, err) return @@ -251,10 +281,12 @@ func TestBackwardsCompatibilityForFilePath(t *testing.T) { t.Run(tt.name, func(t *testing.T) { resolver, err := NewResolver(ResolverSettings{ URIs: []string{tt.location}, - Providers: makeMapProvidersMap(newFakeProvider("file", func(_ context.Context, uri string, _ WatcherFunc) (*Retrieved, error) { - return nil, errors.New(uri) - })), - Converters: nil}) + ProviderFactories: []ProviderFactory{ + newFakeProvider("file", func(_ context.Context, uri string, _ WatcherFunc) (*Retrieved, error) { + return nil, errors.New(uri) + }), + }, + ConverterFactories: nil}) if tt.expectBuildErr { assert.Error(t, err) return @@ -270,11 +302,13 @@ func TestResolver(t *testing.T) { numCalls := atomic.Int32{} resolver, err := NewResolver(ResolverSettings{ URIs: []string{"mock:"}, - Providers: makeMapProvidersMap(&mockProvider{retM: map[string]any{}, closeFunc: func(context.Context) error { - numCalls.Add(1) - return nil - }}), - Converters: nil}) + ProviderFactories: []ProviderFactory{ + newMockProvider(&mockProvider{retM: map[string]any{}, closeFunc: func(context.Context) error { + numCalls.Add(1) + return nil + }}), + }, + ConverterFactories: nil}) require.NoError(t, err) _, errN := resolver.Resolve(context.Background()) assert.NoError(t, errN) @@ -303,33 +337,33 @@ func TestResolver(t *testing.T) { func TestResolverNewLinesInOpaqueValue(t *testing.T) { _, err := NewResolver(ResolverSettings{ - URIs: []string{"mock:receivers:\n nop:\n"}, - Providers: makeMapProvidersMap(&mockProvider{retM: map[string]any{}}), - Converters: nil}) + URIs: []string{"mock:receivers:\n nop:\n"}, + ProviderFactories: []ProviderFactory{newMockProvider(&mockProvider{retM: map[string]any{}})}, + ConverterFactories: nil}) assert.NoError(t, err) } func TestResolverNoLocations(t *testing.T) { _, err := NewResolver(ResolverSettings{ - URIs: []string{}, - Providers: makeMapProvidersMap(&mockProvider{}), - Converters: nil}) + URIs: []string{}, + ProviderFactories: []ProviderFactory{newMockProvider(&mockProvider{})}, + ConverterFactories: nil}) assert.Error(t, err) } func TestResolverNoProviders(t *testing.T) { _, err := NewResolver(ResolverSettings{ - URIs: []string{filepath.Join("testdata", "config.yaml")}, - Providers: nil, - Converters: nil}) + URIs: []string{filepath.Join("testdata", "config.yaml")}, + ProviderFactories: nil, + ConverterFactories: nil}) assert.Error(t, err) } func TestResolverShutdownClosesWatch(t *testing.T) { resolver, err := NewResolver(ResolverSettings{ - URIs: []string{filepath.Join("testdata", "config.yaml")}, - Providers: makeMapProvidersMap(newFileProvider(t)), - Converters: nil}) + URIs: []string{filepath.Join("testdata", "config.yaml")}, + ProviderFactories: []ProviderFactory{newFileProvider(t)}, + ConverterFactories: nil}) require.NoError(t, err) _, errN := resolver.Resolve(context.Background()) assert.NoError(t, errN) @@ -347,3 +381,51 @@ func TestResolverShutdownClosesWatch(t *testing.T) { assert.NoError(t, resolver.Shutdown(context.Background())) watcherWG.Wait() } + +func TestCantConfigureTwoProviderSettings(t *testing.T) { + _, err := NewResolver(ResolverSettings{ + URIs: []string{filepath.Join("testdata", "config.yaml")}, + ProviderFactories: []ProviderFactory{newFileProvider(t)}, + Providers: map[string]Provider{"mock": &mockProvider{}}, + ConverterFactories: nil, + }) + require.Error(t, err) +} + +func TestCantConfigureTwoConverterSettings(t *testing.T) { + _, err := NewResolver(ResolverSettings{ + URIs: []string{filepath.Join("testdata", "config.yaml")}, + ProviderFactories: []ProviderFactory{newFileProvider(t)}, + ConverterFactories: []ConverterFactory{NewConverterFactory(func(_ ConverterSettings) Converter { return &mockConverter{} })}, + Converters: []Converter{&mockConverter{err: errors.New("converter_err")}}, + }) + require.Error(t, err) +} + +func TestTakesInstantiatedProviders(t *testing.T) { + _, err := NewResolver(ResolverSettings{ + URIs: []string{filepath.Join("testdata", "config.yaml")}, + Providers: map[string]Provider{"mock": &mockProvider{}}, + ConverterFactories: nil, + }) + require.NoError(t, err) +} + +func TestTakesInstantiatedConverters(t *testing.T) { + _, err := NewResolver(ResolverSettings{ + URIs: []string{filepath.Join("testdata", "config.yaml")}, + ProviderFactories: []ProviderFactory{newFileProvider(t)}, + Converters: []Converter{&mockConverter{err: errors.New("converter_err")}}, + }) + require.NoError(t, err) +} + +func TestProvidesDefaultLogger(t *testing.T) { + factory, provider := newObservableFileProvider(t) + _, err := NewResolver(ResolverSettings{ + URIs: []string{filepath.Join("testdata", "config.yaml")}, + ProviderFactories: []ProviderFactory{factory}, + }) + require.NoError(t, err) + require.NotNil(t, provider.logger) +} diff --git a/connector/connectortest/connector.go b/connector/connectortest/connector.go index d30fb65b6a5..0aad0b71142 100644 --- a/connector/connectortest/connector.go +++ b/connector/connectortest/connector.go @@ -6,6 +6,8 @@ package connectortest // import "go.opentelemetry.io/collector/connector/connect import ( "context" + "github.com/google/uuid" + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/connector" @@ -18,7 +20,7 @@ var nopType = component.MustNewType("nop") // NewNopCreateSettings returns a new nop settings for Create* functions. func NewNopCreateSettings() connector.CreateSettings { return connector.CreateSettings{ - ID: component.NewID(nopType), + ID: component.NewIDWithName(nopType, uuid.NewString()), TelemetrySettings: componenttest.NewNopTelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo(), } diff --git a/connector/forwardconnector/generated_component_test.go b/connector/forwardconnector/generated_component_test.go new file mode 100644 index 00000000000..9bbe4e5aa5f --- /dev/null +++ b/connector/forwardconnector/generated_component_test.go @@ -0,0 +1,88 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package forwardconnector + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/connector/connectortest" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/consumer/consumertest" +) + +func TestComponentFactoryType(t *testing.T) { + require.Equal(t, "forward", NewFactory().Type().String()) +} + +func TestComponentConfigStruct(t *testing.T) { + require.NoError(t, componenttest.CheckConfigStruct(NewFactory().CreateDefaultConfig())) +} + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "logs_to_logs", + createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { + router := connector.NewLogsRouter(map[component.ID]consumer.Logs{component.NewID(component.DataTypeLogs): consumertest.NewNop()}) + return factory.CreateLogsToLogs(ctx, set, cfg, router) + }, + }, + + { + name: "metrics_to_metrics", + createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { + router := connector.NewMetricsRouter(map[component.ID]consumer.Metrics{component.NewID(component.DataTypeMetrics): consumertest.NewNop()}) + return factory.CreateMetricsToMetrics(ctx, set, cfg, router) + }, + }, + + { + name: "traces_to_traces", + createFn: func(ctx context.Context, set connector.CreateSettings, cfg component.Config) (component.Component, error) { + router := connector.NewTracesRouter(map[component.ID]consumer.Traces{component.NewID(component.DataTypeTraces): consumertest.NewNop()}) + return factory.CreateTracesToTraces(ctx, set, cfg, router) + }, + }, + } + + cm, err := confmaptest.LoadConf("metadata.yaml") + require.NoError(t, err) + cfg := factory.CreateDefaultConfig() + sub, err := cm.Sub("tests::config") + require.NoError(t, err) + require.NoError(t, component.UnmarshalConfig(sub, cfg)) + + for _, test := range tests { + t.Run(test.name+"-shutdown", func(t *testing.T) { + c, err := test.createFn(context.Background(), connectortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + firstConnector, err := test.createFn(context.Background(), connectortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + require.NoError(t, err) + require.NoError(t, firstConnector.Start(context.Background(), host)) + require.NoError(t, firstConnector.Shutdown(context.Background())) + secondConnector, err := test.createFn(context.Background(), connectortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondConnector.Start(context.Background(), host)) + require.NoError(t, secondConnector.Shutdown(context.Background())) + }) + } +} diff --git a/connector/forwardconnector/package_test.go b/connector/forwardconnector/generated_package_test.go similarity index 62% rename from connector/forwardconnector/package_test.go rename to connector/forwardconnector/generated_package_test.go index 54cc0fd73ce..6ea5f1097be 100644 --- a/connector/forwardconnector/package_test.go +++ b/connector/forwardconnector/generated_package_test.go @@ -1,5 +1,4 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 +// Code generated by mdatagen. DO NOT EDIT. package forwardconnector diff --git a/connector/forwardconnector/go.mod b/connector/forwardconnector/go.mod index 656652fbfe1..0f27694a228 100644 --- a/connector/forwardconnector/go.mod +++ b/connector/forwardconnector/go.mod @@ -3,13 +3,14 @@ module go.opentelemetry.io/collector/connector/forwardconnector go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.96.0 - go.opentelemetry.io/collector/connector v0.96.0 - go.opentelemetry.io/collector/consumer v0.96.0 - go.opentelemetry.io/collector/pdata v1.3.0 - go.opentelemetry.io/otel/metric v1.24.0 - go.opentelemetry.io/otel/trace v1.24.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.100.0 + go.opentelemetry.io/collector/confmap v0.100.0 + go.opentelemetry.io/collector/connector v0.100.0 + go.opentelemetry.io/collector/consumer v0.100.0 + go.opentelemetry.io/collector/pdata v1.7.0 + go.opentelemetry.io/otel/metric v1.26.0 + go.opentelemetry.io/otel/trace v1.26.0 go.uber.org/goleak v1.3.0 ) @@ -21,35 +22,34 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.19.0 // indirect - github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector v0.96.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect - go.opentelemetry.io/collector/confmap v0.96.0 // indirect - go.opentelemetry.io/otel v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect - go.opentelemetry.io/otel/sdk v1.24.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect + go.opentelemetry.io/collector v0.100.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect + go.opentelemetry.io/otel v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect + go.opentelemetry.io/otel/sdk v1.26.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/sys v0.17.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/grpc v1.62.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.34.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -61,6 +61,8 @@ replace go.opentelemetry.io/collector/connector => ../ replace go.opentelemetry.io/collector/pdata => ../../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/consumer => ../../consumer diff --git a/connector/forwardconnector/go.sum b/connector/forwardconnector/go.sum index 06616cda85d..4394e616fe3 100644 --- a/connector/forwardconnector/go.sum +++ b/connector/forwardconnector/go.sum @@ -14,13 +14,11 @@ github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsM github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +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/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -29,8 +27,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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= @@ -48,32 +46,32 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= -go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -89,16 +87,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -111,14 +109,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/connector/forwardconnector/internal/metadata/generated_status.go b/connector/forwardconnector/internal/metadata/generated_status.go index 201502cd3e2..25007e42e02 100644 --- a/connector/forwardconnector/internal/metadata/generated_status.go +++ b/connector/forwardconnector/internal/metadata/generated_status.go @@ -3,15 +3,11 @@ package metadata import ( - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" ) var ( - Type = component.MustNewType("forward") - scopeName = "go.opentelemetry.io/collector/connector/forwardconnector" + Type = component.MustNewType("forward") ) const ( @@ -19,11 +15,3 @@ const ( MetricsToMetricsStability = component.StabilityLevelBeta LogsToLogsStability = component.StabilityLevelBeta ) - -func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter(scopeName) -} - -func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer(scopeName) -} diff --git a/connector/forwardconnector/internal/metadata/generated_telemetry.go b/connector/forwardconnector/internal/metadata/generated_telemetry.go new file mode 100644 index 00000000000..bf218aec069 --- /dev/null +++ b/connector/forwardconnector/internal/metadata/generated_telemetry.go @@ -0,0 +1,18 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("go.opentelemetry.io/collector/connector/forwardconnector") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/connector/forwardconnector") +} diff --git a/connector/forwardconnector/internal/metadata/generated_telemetry_test.go b/connector/forwardconnector/internal/metadata/generated_telemetry_test.go new file mode 100644 index 00000000000..658ab380f97 --- /dev/null +++ b/connector/forwardconnector/internal/metadata/generated_telemetry_test.go @@ -0,0 +1,63 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/otel/metric" + embeddedmetric "go.opentelemetry.io/otel/metric/embedded" + noopmetric "go.opentelemetry.io/otel/metric/noop" + "go.opentelemetry.io/otel/trace" + embeddedtrace "go.opentelemetry.io/otel/trace/embedded" + nooptrace "go.opentelemetry.io/otel/trace/noop" + + "go.opentelemetry.io/collector/component" +) + +type mockMeter struct { + noopmetric.Meter + name string +} +type mockMeterProvider struct { + embeddedmetric.MeterProvider +} + +func (m mockMeterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter { + return mockMeter{name: name} +} + +type mockTracer struct { + nooptrace.Tracer + name string +} + +type mockTracerProvider struct { + embeddedtrace.TracerProvider +} + +func (m mockTracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { + return mockTracer{name: name} +} + +func TestProviders(t *testing.T) { + set := component.TelemetrySettings{ + MeterProvider: mockMeterProvider{}, + TracerProvider: mockTracerProvider{}, + } + + meter := Meter(set) + if m, ok := meter.(mockMeter); ok { + require.Equal(t, "go.opentelemetry.io/collector/connector/forwardconnector", m.name) + } else { + require.Fail(t, "returned Meter not mockMeter") + } + + tracer := Tracer(set) + if m, ok := tracer.(mockTracer); ok { + require.Equal(t, "go.opentelemetry.io/collector/connector/forwardconnector", m.name) + } else { + require.Fail(t, "returned Meter not mockTracer") + } +} diff --git a/connector/go.mod b/connector/go.mod index 3e1b6496f98..fcf88fdc3e4 100644 --- a/connector/go.mod +++ b/connector/go.mod @@ -3,11 +3,13 @@ module go.opentelemetry.io/collector/connector go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.96.0 - go.opentelemetry.io/collector/component v0.96.0 - go.opentelemetry.io/collector/consumer v0.96.0 - go.opentelemetry.io/collector/pdata v1.3.0 + github.com/google/uuid v1.6.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector v0.100.0 + go.opentelemetry.io/collector/component v0.100.0 + go.opentelemetry.io/collector/consumer v0.100.0 + go.opentelemetry.io/collector/pdata v1.7.0 + go.opentelemetry.io/collector/pdata/testdata v0.100.0 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 @@ -21,34 +23,33 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.19.0 // indirect - github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect - go.opentelemetry.io/collector/confmap v0.96.0 // indirect - go.opentelemetry.io/otel v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect - go.opentelemetry.io/otel/metric v1.24.0 // indirect - go.opentelemetry.io/otel/sdk v1.24.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect - go.opentelemetry.io/otel/trace v1.24.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/sys v0.17.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect + go.opentelemetry.io/collector/confmap v0.100.0 // indirect + go.opentelemetry.io/otel v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect + go.opentelemetry.io/otel/metric v1.26.0 // indirect + go.opentelemetry.io/otel/sdk v1.26.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + go.opentelemetry.io/otel/trace v1.26.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/grpc v1.62.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.34.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -65,3 +66,5 @@ replace go.opentelemetry.io/collector/consumer => ../consumer replace go.opentelemetry.io/collector/featuregate => ../featuregate replace go.opentelemetry.io/collector/pdata => ../pdata + +replace go.opentelemetry.io/collector/pdata/testdata => ../pdata/testdata diff --git a/connector/go.sum b/connector/go.sum index 06616cda85d..4394e616fe3 100644 --- a/connector/go.sum +++ b/connector/go.sum @@ -14,13 +14,11 @@ github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsM github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +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/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -29,8 +27,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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= @@ -48,32 +46,32 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= -go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -89,16 +87,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -111,14 +109,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/connector/logs_router.go b/connector/logs_router.go index e5594327ffc..0db9ea7799d 100644 --- a/connector/logs_router.go +++ b/connector/logs_router.go @@ -13,12 +13,6 @@ import ( "go.opentelemetry.io/collector/internal/fanoutconsumer" ) -// Deprecated: [v0.92.0] use LogsRouterAndConsumer -type LogsRouter interface { - Consumer(...component.ID) (consumer.Logs, error) - PipelineIDs() []component.ID -} - // LogsRouterAndConsumer feeds the first consumer.Logs in each of the specified pipelines. type LogsRouterAndConsumer interface { consumer.Logs @@ -29,17 +23,17 @@ type LogsRouterAndConsumer interface { type logsRouter struct { consumer.Logs - consumers map[component.ID]consumer.Logs + baseRouter[consumer.Logs] } func NewLogsRouter(cm map[component.ID]consumer.Logs) LogsRouterAndConsumer { consumers := make([]consumer.Logs, 0, len(cm)) - for _, consumer := range cm { - consumers = append(consumers, consumer) + for _, cons := range cm { + consumers = append(consumers, cons) } return &logsRouter{ - Logs: fanoutconsumer.NewLogs(consumers), - consumers: cm, + Logs: fanoutconsumer.NewLogs(consumers), + baseRouter: newBaseRouter(fanoutconsumer.NewLogs, cm), } } diff --git a/connector/logs_router_test.go b/connector/logs_router_test.go index accce0a03cd..a4074762ac1 100644 --- a/connector/logs_router_test.go +++ b/connector/logs_router_test.go @@ -14,8 +14,8 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/testdata" ) type mutatingLogsSink struct { diff --git a/connector/metrics_router.go b/connector/metrics_router.go index 8e2b8e900a1..3e688261bfe 100644 --- a/connector/metrics_router.go +++ b/connector/metrics_router.go @@ -4,21 +4,11 @@ package connector // import "go.opentelemetry.io/collector/connector" import ( - "fmt" - - "go.uber.org/multierr" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/internal/fanoutconsumer" ) -// Deprecated: [v0.92.0] use MetricsRouterAndConsumer. -type MetricsRouter interface { - Consumer(...component.ID) (consumer.Metrics, error) - PipelineIDs() []component.ID -} - // MetricsRouterAndConsumer feeds the first consumer.Metrics in each of the specified pipelines. type MetricsRouterAndConsumer interface { consumer.Metrics @@ -29,7 +19,7 @@ type MetricsRouterAndConsumer interface { type metricsRouter struct { consumer.Metrics - consumers map[component.ID]consumer.Metrics + baseRouter[consumer.Metrics] } func NewMetricsRouter(cm map[component.ID]consumer.Metrics) MetricsRouterAndConsumer { @@ -38,38 +28,9 @@ func NewMetricsRouter(cm map[component.ID]consumer.Metrics) MetricsRouterAndCons consumers = append(consumers, cons) } return &metricsRouter{ - Metrics: fanoutconsumer.NewMetrics(consumers), - consumers: cm, - } -} - -func (r *metricsRouter) PipelineIDs() []component.ID { - ids := make([]component.ID, 0, len(r.consumers)) - for id := range r.consumers { - ids = append(ids, id) - } - return ids -} - -func (r *metricsRouter) Consumer(pipelineIDs ...component.ID) (consumer.Metrics, error) { - if len(pipelineIDs) == 0 { - return nil, fmt.Errorf("missing consumers") - } - consumers := make([]consumer.Metrics, 0, len(pipelineIDs)) - var errors error - for _, pipelineID := range pipelineIDs { - c, ok := r.consumers[pipelineID] - if ok { - consumers = append(consumers, c) - } else { - errors = multierr.Append(errors, fmt.Errorf("missing consumer: %q", pipelineID)) - } - } - if errors != nil { - // TODO potentially this could return a NewMetrics with the valid consumers - return nil, errors + Metrics: fanoutconsumer.NewMetrics(consumers), + baseRouter: newBaseRouter(fanoutconsumer.NewMetrics, cm), } - return fanoutconsumer.NewMetrics(consumers), nil } func (r *metricsRouter) privateFunc() {} diff --git a/connector/metrics_router_test.go b/connector/metrics_router_test.go index 62dd54c11e0..c3fe824992a 100644 --- a/connector/metrics_router_test.go +++ b/connector/metrics_router_test.go @@ -14,8 +14,8 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/testdata" ) type mutatingMetricsSink struct { diff --git a/connector/router.go b/connector/router.go new file mode 100644 index 00000000000..bba7ee76bba --- /dev/null +++ b/connector/router.go @@ -0,0 +1,55 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package connector // import "go.opentelemetry.io/collector/connector" + +import ( + "fmt" + + "go.uber.org/multierr" + + "go.opentelemetry.io/collector/component" +) + +type baseRouter[T any] struct { + fanout func([]T) T + consumers map[component.ID]T +} + +func newBaseRouter[T any](fanout func([]T) T, cm map[component.ID]T) baseRouter[T] { + consumers := make(map[component.ID]T, len(cm)) + for k, v := range cm { + consumers[k] = v + } + return baseRouter[T]{fanout: fanout, consumers: consumers} +} + +func (r *baseRouter[T]) PipelineIDs() []component.ID { + ids := make([]component.ID, 0, len(r.consumers)) + for id := range r.consumers { + ids = append(ids, id) + } + return ids +} + +func (r *baseRouter[T]) Consumer(pipelineIDs ...component.ID) (T, error) { + var ret T + if len(pipelineIDs) == 0 { + return ret, fmt.Errorf("missing consumers") + } + consumers := make([]T, 0, len(pipelineIDs)) + var errors error + for _, pipelineID := range pipelineIDs { + c, ok := r.consumers[pipelineID] + if ok { + consumers = append(consumers, c) + } else { + errors = multierr.Append(errors, fmt.Errorf("missing consumer: %q", pipelineID)) + } + } + if errors != nil { + // TODO potentially this could return a NewTraces with the valid consumers + return ret, errors + } + return r.fanout(consumers), nil +} diff --git a/connector/traces_router.go b/connector/traces_router.go index 97c31d7920c..84eb889c05a 100644 --- a/connector/traces_router.go +++ b/connector/traces_router.go @@ -4,21 +4,11 @@ package connector // import "go.opentelemetry.io/collector/connector" import ( - "fmt" - - "go.uber.org/multierr" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/internal/fanoutconsumer" ) -// Deprecated: [v0.92.0] use TracesRouterAndConsumer -type TracesRouter interface { - Consumer(...component.ID) (consumer.Traces, error) - PipelineIDs() []component.ID -} - // TracesRouterAndConsumer feeds the first consumer.Traces in each of the specified pipelines. type TracesRouterAndConsumer interface { consumer.Traces @@ -29,47 +19,18 @@ type TracesRouterAndConsumer interface { type tracesRouter struct { consumer.Traces - consumers map[component.ID]consumer.Traces + baseRouter[consumer.Traces] } func NewTracesRouter(cm map[component.ID]consumer.Traces) TracesRouterAndConsumer { consumers := make([]consumer.Traces, 0, len(cm)) - for _, c := range cm { - consumers = append(consumers, c) + for _, cons := range cm { + consumers = append(consumers, cons) } return &tracesRouter{ - Traces: fanoutconsumer.NewTraces(consumers), - consumers: cm, - } -} - -func (r *tracesRouter) PipelineIDs() []component.ID { - ids := make([]component.ID, 0, len(r.consumers)) - for id := range r.consumers { - ids = append(ids, id) - } - return ids -} - -func (r *tracesRouter) Consumer(pipelineIDs ...component.ID) (consumer.Traces, error) { - if len(pipelineIDs) == 0 { - return nil, fmt.Errorf("missing consumers") - } - consumers := make([]consumer.Traces, 0, len(pipelineIDs)) - var errors error - for _, pipelineID := range pipelineIDs { - c, ok := r.consumers[pipelineID] - if ok { - consumers = append(consumers, c) - } else { - errors = multierr.Append(errors, fmt.Errorf("missing consumer: %q", pipelineID)) - } - } - if errors != nil { - // TODO potentially this could return a NewTraces with the valid consumers - return nil, errors + Traces: fanoutconsumer.NewTraces(consumers), + baseRouter: newBaseRouter(fanoutconsumer.NewTraces, cm), } - return fanoutconsumer.NewTraces(consumers), nil } func (r *tracesRouter) privateFunc() {} diff --git a/connector/traces_router_test.go b/connector/traces_router_test.go index 33a2124ed3e..8c93b10528a 100644 --- a/connector/traces_router_test.go +++ b/connector/traces_router_test.go @@ -14,8 +14,8 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/testdata" ) type mutatingTracesSink struct { diff --git a/consumer/consumererror/signalerrors_test.go b/consumer/consumererror/signalerrors_test.go index 141db20202c..475d3173bb9 100644 --- a/consumer/consumererror/signalerrors_test.go +++ b/consumer/consumererror/signalerrors_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/internal/testdata" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestTraces(t *testing.T) { diff --git a/consumer/consumertest/sink_test.go b/consumer/consumertest/sink_test.go index 24c1f6fac8b..bd29ebc6aef 100644 --- a/consumer/consumertest/sink_test.go +++ b/consumer/consumertest/sink_test.go @@ -10,10 +10,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestTracesSink(t *testing.T) { diff --git a/consumer/go.mod b/consumer/go.mod index a0d4cd6f95f..f054b0b3a0d 100644 --- a/consumer/go.mod +++ b/consumer/go.mod @@ -3,44 +3,35 @@ module go.opentelemetry.io/collector/consumer go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.96.0 - go.opentelemetry.io/collector/pdata v1.3.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/pdata v1.7.0 + go.opentelemetry.io/collector/pdata/testdata v0.100.0 go.uber.org/goleak v1.3.0 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kr/text v0.2.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/sys v0.17.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/grpc v1.62.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.34.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) -replace go.opentelemetry.io/collector => ../ - -replace go.opentelemetry.io/collector/component => ../component - -replace go.opentelemetry.io/collector/confmap => ../confmap - -replace go.opentelemetry.io/collector/featuregate => ../featuregate - replace go.opentelemetry.io/collector/pdata => ../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../pdata/testdata + retract ( v0.76.0 // Depends on retracted pdata v1.0.0-rc10 module, use v0.76.1 v0.69.0 // Release failed, use v0.69.1 ) - -replace go.opentelemetry.io/collector/config/configtelemetry => ../config/configtelemetry diff --git a/consumer/go.sum b/consumer/go.sum index 834ba473908..458a9f2f0c1 100644 --- a/consumer/go.sum +++ b/consumer/go.sum @@ -4,10 +4,6 @@ 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/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -30,8 +26,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -47,16 +43,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -69,14 +65,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/docs/design.md b/docs/design.md deleted file mode 100644 index 51ed65bbbe5..00000000000 --- a/docs/design.md +++ /dev/null @@ -1,205 +0,0 @@ -# OpenTelemetry Collector Architecture - -This document describes the architecture design and implementation of the -OpenTelemetry Collector. - -## Summary - -OpenTelemetry Collector is an executable that can receive telemetry data, optionally process it, and export it further. - -The Collector supports several popular open-source protocols for receiving and sending telemetry data as well as offering a pluggable architecture for adding more protocols. - -Data receiving, processing, and exporting is done using [Pipelines](#pipelines). The Collector can be configured to have one or more pipelines. Each pipeline includes: - -- a set of [Receivers](#receivers) that receive the data -- a series of optional [Processors](#processors) that get the data from receivers and process it -- a set of [Exporters](#exporters) which get the data from processors and send it further outside the Collector. - -The same receiver can be included in multiple pipelines and multiple pipelines can include the same Exporter. - -## Pipelines - -A pipeline defines a path the data follows in the Collector starting from reception, then further processing or modification and finally exiting the Collector via exporters. - -Pipelines can operate on 3 telemetry data types: traces, metrics, and logs. The data type is a property of the pipeline defined by its configuration. Receivers, processors, and exporters used in a pipeline must support the particular data type otherwise `ErrDataTypeIsNotSupported` will be reported when the configuration is loaded. A pipeline can be depicted the following way: - -![Pipelines](images/design-pipelines.png) - -There can be one or more receivers in a pipeline. Data from all receivers is pushed to the first processor, which performs a processing on it and then pushes it to the next processor (or it may drop the data, e.g. if it is a “sampling” processor) and so on until the last processor in the pipeline pushes the data to the exporters. Each exporter gets a copy of each data element. The last processor uses a `fanoutconsumer` to fan out the data to multiple exporters. - -The pipeline is constructed during Collector startup based on pipeline definition in the configuration. - -A pipeline configuration typically looks like this: - -```yaml -service: - pipelines: # section that can contain multiple subsections, one per pipeline - traces: # type of the pipeline - receivers: [otlp, jaeger, zipkin] - processors: [memory_limiter, batch] - exporters: [otlp, jaeger, zipkin] -``` - -The above example defines a pipeline for “traces” type of telemetry data, with 3 receivers, 2 processors and 3 exporters. - -For details of config file format see [this document](https://docs.google.com/document/d/1NeheFG7DmcUYo_h2vLtNRlia9x5wOJMlV4QKEK05FhQ/edit#). - -### Receivers - -Receivers typically listen on a network port and receive telemetry data. Usually one receiver is configured to send received data to one pipeline, however it is also possible to configure the same receiver to send the same received data to multiple pipelines. This can be done by simply listing the same receiver in the “receivers” key of several pipelines: - -```yaml -receivers: - otlp: - protocols: - grpc: - endpoint: localhost:4317 - -service: - pipelines: - traces: # a pipeline of “traces” type - receivers: [otlp] - processors: [memory_limiter, batch] - exporters: [jaeger] - traces/2: # another pipeline of “traces” type - receivers: [otlp] - processors: [batch] - exporters: [opencensus] -``` - -In the above example `otlp` receiver will send the same data to pipeline `traces` and to pipeline `traces/2`. (Note: the configuration uses composite key names in the form of `type[/name]` as defined in [this document](https://docs.google.com/document/d/1NeheFG7DmcUYo_h2vLtNRlia9x5wOJMlV4QKEK05FhQ/edit#)). - -When the Collector loads this config the result will look like this (part of processors and exporters are omitted from the diagram for brevity): - - -![Receivers](images/design-receivers.png) - -Important: when the same receiver is referenced in more than one pipeline the Collector will create only one receiver instance at runtime that will send the data to a fan out consumer, which in turn will send the data to the first processor of each pipeline. The data propagation from receiver to the fan out consumer and then to processors is done via a synchronous function call. This means that if one processor blocks the call the other pipelines that are attached to this receiver will be blocked from receiving the same data and the receiver itself will stop processing and forwarding newly received data. - -### Exporters - -Exporters typically forward the data they get to a destination on a network (but they can also send it elsewhere, e.g `logging` exporter writes the telemetry data to the logging destination). - -The configuration allows to have multiple exporters of the same type, even in the same pipeline. For example one can have 2 `otlp` exporters defined each one sending to a different OTLP endpoint, e.g.: - -```yaml -exporters: - otlp/1: - endpoint: example.com:4317 - otlp/2: - endpoint: localhost:14317 -``` - -Usually an exporter gets the data from one pipeline, however it is possible to configure multiple pipelines to send data to the same exporter, e.g.: - -```yaml -exporters: - jaeger: - protocols: - grpc: - endpoint: localhost:14250 - -service: - pipelines: - traces: # a pipeline of “traces” type - receivers: [zipkin] - processors: [memory_limiter] - exporters: [jaeger] - traces/2: # another pipeline of “traces” type - receivers: [otlp] - processors: [batch] - exporters: [jaeger] -``` - -In the above example `jaeger` exporter will get data from pipeline `traces` and from pipeline `traces/2`. When the Collector loads this config the result will look like this (part of processors and receivers are omitted from the diagram for brevity): - - -![Exporters](images/design-exporters.png) - -### Processors - -A pipeline can contain sequentially connected processors. The first processor gets the data from one or more receivers that are configured for the pipeline, the last processor sends the data to one or more exporters that are configured for the pipeline. All processors between the first and last receive the data strictly only from one preceding processor and send data strictly only to the succeeding processor. - -Processors can transform the data before forwarding it (i.e. add or remove attributes from spans), they can drop the data simply by deciding not to forward it (this is for example how the `probabilisticsampler` processor works), they can also generate new data. - -The same name of the processor can be referenced in the `processors` key of multiple pipelines. In this case the same configuration will be used for each of these processors however each pipeline will always get its own instance of the processor. Each of these processors will have its own state, the processors are never shared between pipelines. For example if `batch` processor is used in several pipelines each pipeline will have its own batch processor (although each batch processor will be configured exactly the same way if they reference the same key in the configuration). As an example, given the following configuration: - -```yaml -processors: - batch: - send_batch_size: 10000 - timeout: 10s - -service: - pipelines: - traces: # a pipeline of “traces” type - receivers: [zipkin] - processors: [batch] - exporters: [jaeger] - traces/2: # another pipeline of “traces” type - receivers: [otlp] - processors: [batch] - exporters: [otlp] -``` - -When the Collector loads this config the result will look like this: - - -![Processors](images/design-processors.png) - -Note that each `batch` processor is an independent instance, although both are configured the same way, i.e. each have a `send_batch_size` of 10000. - -The same name of the processor MUST NOT be referenced multiple times in the `processors` key of a single pipeline. - -## Running as an Agent - -On a typical VM/container, there are user applications running in some -processes/pods with OpenTelemetry Library (Library). Previously, Library did -all the recording, collecting, sampling and aggregation on traces/metrics/logs, -and exported them to other persistent storage backends via the Library -exporters, or displayed them on local zpages. This pattern has several -drawbacks, for example: - -1. For each OpenTelemetry Library, exporters/zpages need to be re-implemented - in native languages. -2. In some programming languages (e.g Ruby, PHP), it is difficult to do the - stats aggregation in process. -3. To enable exporting OpenTelemetry spans/stats/metrics, application users - need to manually add library exporters and redeploy their binaries. This is - especially difficult when there’s already an incident and users want to use - OpenTelemetry to investigate what’s going on right away. -4. Application users need to take the responsibility in configuring and - initializing exporters. This is error-prone (e.g they may not set up the - correct credentials\monitored resources), and users may be reluctant to - “pollute” their code with OpenTelemetry. - -To resolve the issues above, you can run OpenTelemetry Collector as an Agent. -The Agent runs as a daemon in the VM/container and can be deployed independent -of Library. Once Agent is deployed and running, it should be able to retrieve -traces/metrics/logs from Library, export them to other backends. We MAY also -give Agent the ability to push configurations (e.g sampling probability) to -Library. For those languages that cannot do stats aggregation in process, they -should also be able to send raw measurements and have Agent do the aggregation. - - -![agent-architecture](images/design-collector-agent.png) - -For developers/maintainers of other libraries: Agent can also -accept traces/metrics/logs from other tracing/monitoring libraries, such as -Zipkin, Prometheus, etc. This is done by adding specific receivers. See -[Receivers](#receivers) for details. - -## Running as a Gateway - -The OpenTelemetry Collector can run as a Gateway instance and receives spans -and metrics exported by one or more Agents or Libraries, or by -tasks/agents that emit in one of the supported protocols. The Collector is -configured to send data to the configured exporter(s). The following figure -summarizes the deployment architecture: - - -![OpenTelemetry Collector Architecture](images/design-collector-service.png "OpenTelemetry Collector Architecture") - -The OpenTelemetry Collector can also be deployed in other configurations, such -as receiving data from other agents or clients in one of the formats supported -by its receivers. diff --git a/docs/ga-roadmap.md b/docs/ga-roadmap.md index 2f204ac9f74..c3497140f75 100644 --- a/docs/ga-roadmap.md +++ b/docs/ga-roadmap.md @@ -1,167 +1,57 @@ -# Collector GA Roadmap +# Collector v1 Roadmap -This document defines the roadmap followed by the OpenTelemetry Collector, -along with tentative dates and requirements for GA (stability). - -In this document, the term “OpenTelemetry Collector packages" refers to all the golang -modules and packages that are part of the “OpenTelemetry Collector” ecosystem which -include the [core](https://github.com/open-telemetry/opentelemetry-collector) and -[contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib). - -In this document, the terms "OpenTelemetry Collector" and "Collector" both specifically -refer to the entire OpenTelemetry Collector ecosystem’s including core and contrib. -These terms do not refer to the specification or the Client libraries in this document. - -## Current Status - -The OpenTelemetry Collector ecosystem right now has a lot of packages that are in different -stages of stability (experimental, alpha, beta, etc.). All these packages have different -public APIs/Interfaces (e.g. code API, configuration, etc.). - -A significant amount of legacy code was inherited from the Collector's ancestor -[OpenCensus Service](https://github.com/census-instrumentation/opencensus-service), since then -the Collector changed the internal data model and other significant changes were made. - -Trying to mark the entire ecosystem GA, at the same moment, will be a significant effort and -will take a significant amount of time. +This document contains the roadmap for the Collector. The main goal of this roadmap is to provide clarity on the areas of focus in order to release a v1 of the Collector. ## Proposal -This document proposes a GA Roadmap based on multiple phases, where different parts of the -collector will be released as stable at different moments of time. - -At this moment we are completely defining only the first two phases of the process, and the -next phases will be defined at a later stage once the Collector maintainers will have -better understanding of the process and implications. - -The primary focus is on the tracing parts. When other signal's data models (proto definition) -will be marked as stable, the amount of work necessary to stabilize their APIs will be minimal: -`pdata` is auto-generated so all changes that we do for trace will apply to all of them, -`consumer` is minimal interface, `component` as well. - -Metrics components such as (`receiver/prometheus`, `exporter/prometheusremotewrite`) are -explicitly left out of this roadmap document because metrics data model is not complete. -When that work finishes, we can add them to the Phase 3, or later. - -### Phase 1 - -**Key Results:** At the end of this phase the Collector’s core API will be marked as Stable. - -At the end of this phase we want to achieve core APIs stability. This will allow developers -to implement custom components and extend the collector will be marked as stable. -The complete list of the packages/modules will be finalized during the first action item of -this phase, but the tentative list is: - -* `consumer` - * Official internal data model `pdata`. - * Interfaces and utils to build a Consumer for (trace, metrics, logs). -* `config` - * Core `config` including service definition, component definition will be stabilized. - * To be determined which config helpers will be marked as stable (e.g. configgrpc, etc.). -* `component` - * Interfaces and utils to build a Collector component (receiver, processor, exporter, extension). -* `obsreport` - * Focus on the public API of this package. It is out of scope to ensure stability for the - metrics emitted (focus in phase 2). -* `service` - * Public API to construct a OpenTelemetry Collector Service. - -**Action Items:** - -* Create a new milestone for this phase, create issues for all the other action items and add -them to the milestone. -* Agreement on all packages/modules that will be marked as stable during this phase. -* Write a version doc as per [version and stability document](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md). - * Previously it was discussed that for the Collector it is fine to release stable golang modules - that contain APIs marked as experimental. - * Define status schema (experimental/stable), what are they applicable to every module. -* Investigate if splitting into smaller, more granular, modules is possible. - * Define the modules schema, try to not break everyone. - See [here](https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository). - * Investigate how can we release multiple golang modules from the same repo, without asking - people that consume them to use a replace statement. See problem in contrib. - * Investigate how to release test-only utils. -* Review all public APIs and godocs for modules that we want to release in this phase. - * Fix all critical issues, and remove unnecessary (“When in doubt leave it out”) public APIs. - * Remove all already deprecated code from the stable modules. -* Transition to opentelemetry-go trace library from opencensus? -* Investigate if any config helper needs to be released as stable, if any do the review of -the public API, godoc and configuration. -* Investigate tools that check for API compatibility for go modules, enable them for modules -that we mark as stable. - -### Phase 2 - -**Key Results:** At the end of this phase the Collector’s end-to-end support for OTLP traces -only be marked as GA. - -At the end of this phase we want to ensure that the Collector can be run in production, it can receive -OTLP trace traffic and emit OTLP trace traffic. The complete list of the packages/modules will be -finalized during the first part of this phase, but the tentative list is: - -* `receiver` - * `receiverhelper` - without scraper utils in this phase. - * `otlp` -* `processor` - * `processorhelper` - * `batch` - * `memory_limiter` -* `exporter` - * `exporterhelper` - * `otlp` - * `otlphttp` -* `extension` - * `extensionhelper` - * `healthcheck` -* `obsreport` - * Stabilize the observability metrics (user public metrics). - -**Action Items:** - -* Create a new milestone for this phase, create issues for all the other action items and add them -to the milestone. -* Agreement on all packages/modules that will be marked as stable during this phase. -* Review all public APIs and godocs for modules that we want to release in this phase. - * Fix all critical issues, and remove unnecessary (“When in doubt leave it out”) public APIs. - * Remove all already deprecated code from the stable modules. -* Review all public configuration for all the modules, fix issues. -* Setup a proper loadtest environment and continuously publish results. -* Ensure correctness tests produce the expected results, improve until confident that a binary -that passes them is good to be shipped. -* Enable security checks on every PR (currently some are ignored like `codeql`). - -### Phase 3 - -**Key Results:** At the end of this phase all Collector’s core components (receivers, -processors, exporters, extensions) for traces only will be marked as GA. - -At the end of this phase we want to ensure that the Collector can be run in production, it can receive the -trace traffic and emit OTLP trace traffic. The complete list of the packages/modules will be finalized -during the first part of this phase, but the tentative list is: - -* `receiver` - * `jaeger` - * `opencensus` - * `zipkin` -* `processor` - * `spantransformer` - there are good reasons to merge `attributes` and `span`. - * `resource` - * `filter` - we will consider offering a filter processor for all telemetry signals not just for metrics -* `exporter` - * `jaeger` - * `opencensus` - * `zipkin` -* `extension` - * `pprof` - * `zpages` - -TODO: Add action items list. - -### Phase N - -TODO: Add more phases if/when necessary. - -## Alternatives - -One alternative proposal is to try to GA all packages at the same time. This proposal was rejected -because of the complexity and size of the ecosystem that may force the GA process to take too much time. +The proposed approach to delivering a stable release of the OpenTelemetry Collector is to produce a distribution of the Collector that contains a minimum set of components which have been stabilized. By doing so, the project contributors will ensure dependencies of those components have also been released under a stable version. + +The proposed distribution is set to include the following components only: + +- OTLP receiver +- OTLP exporter +- OTLP HTTP exporter + +These modules depend on a list of other modules, the full list is available in issue [#9375](https://github.com/open-telemetry/opentelemetry-collector/issues/9375). + +All stabilized modules will conform to the API expectations outlined in the [VERSIONING.md](../VERSIONING.md) document. + +## Out of scope + +Explicitly, the following are not in the scope of v1 for the purposes of this document: + +* stabilization of additional components/APIs needed by distribution maintainers. Vendors are not the audience +* Collector Builder +* telemetrygen +* mdatagen +* Operator + +Those components are free to pursue v1 at their own pace and may be the focus of future stability work. + +## Additional Requirements + +The following is a list of requirements for this minimal Collector distribution to be deemed as 1.0: + +* The Collector must be observable + * Metrics and traces should be produced for data in the hot path + * Metrics should be documented in the end-user documentation + * Metrics, or a subset of them, should be marked as stable in the documentation + * Logs should be produced for Collector lifecycle events + * Stability expectations and lifecycle for telemetry should be documented, so that users can know what they can rely on for their dashboards and alerts +* The Collector must be scalable + * Backpressure from the exporter all the way back to the receiver should be supported + * Queueing must be supported to handle increased loads + * Performance metrics are in place and follow best practices for benchmarking + * Individual components must: + * Have their lifecycle expectations enshrined in tests + * Have goleak enabled +* End-user documentation should be provided as part of the official project’s documentation under opentelemetry.io, including: + * Getting started with the Collector + * Available (stable) components and how to use them + * Blueprints for common use cases + * Error scenarios and error propagation + * Troubleshooting and how to obtain telemetry from the Collector for the purposes of bug reporting + * Queueing, batching, and handling of backpressure +* The Collector must be supported + * Processes, workflows and expectations regarding support, bug reporting and questions should be documented. + * A minimum support period for 1.0 is documented, similarly to [API and SDK](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md#api-support) stability guarantees. diff --git a/docs/images/design-collector-agent.png b/docs/images/design-collector-agent.png deleted file mode 100644 index 7f50eb66fa6b61b3350e34e93ff3296b97a3d20b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 98922 zcmZ^KWmr_-*EWo!fPgR{-K}&tNQV;A-7VdNw35;w(xsqucS)C|bV`Gigfzmt$KSu6 z5ASvHVTN<&#NKPKweHyAFO_659}+)ALPElnmy=ROLV}DUA>9i?eE|Lw_Uu7F5)vhn zyp*^)+;A@g2x%r&yR-uj?7@VrRPtP}b?&~gR`QKjl_DP9B z|Mw39(-wmWVl$A@LZ~VK`}ZLLTK(V+YFNO3|KQlM0cQbulG6X@0uWuZ|MMLxj4CJQ z-S$1_f3HSOiCn_*KUW9G$f2~^BE~;o!myG5`xhH9Mfktpv5~PLf%kvkUHjjSe45!K z8}Q>oXD$~jB;mE4Vy?Pajqt8n8F_Zcjn39wJ}sal0Kd67`fSkT5pFXaNyMeF))OUJ zHnPy*s`&N+rUV84=P3J35B3pcb)Xb(I_Ud8n~eJ@n}N?{SDZVGcrVz0+f`D=oQ79 z8WgDo1u<)+p3c)e+QfL3G%tS#);lbQ$Z!D6cPkylo;io@oAu= zM9!Em)#{YarUw7UTN&^F=YS18IIy{-wkS<03Jx4qOeg*`@TTAZnJdcnF?FmeqylYw z(PMr{`1WGWax`0f^RN>u3+qQ1jAl@9x7bY3ZQHo@_R5yaZiao0+^wjzvGDTuxbnUL zF1&EJaIL9RaNIdI65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aAM`4O;dmp*~4p=S=e&KAJ7}1Dl z5w;z2`?adG5NTsgOxig&qsdGrNw&dJDB7hezT<1vLa{vWqe$G#mvXWx1Ql0 z9`{CFx?6EXIu3pa+%Xu+KrZVSBbb1F>&>hSLxy&o;gp87d(NwVC6iAnB^G&rp{!aX zyVX8Fh|V1$t4w;ZIo=&#c1P!;r-ua>kCMaZ`$Dj`$;)@}7f*J$jd^GT_btZ68A-!X zaUWnFe@ey^n1ERqhrd{_5N4Qzl7Lio7Z?+`9Uo%Miy61g95i>3vc0i^A}azm^BrI4 zhBiE=F(&@7tf9JW)E$fU;n;wDvXvrSNeq#PO!?lg#zlSng1EWX*lkrmmxz^)*G(= zhT*PyxY{maha8G*2(T3l(Gz|Tb;iNN)7rj^OogX9hRYB}_tQ7JI*|lFfe?;Ms~l+~2+uW^ z#7#Btz~(V`_DL$y7mW#rr#LU3s07-R%U;9f59uU*mq@vdY=(4bijmf=MUFi&y1 z!Vn(*$K2^;q;z(Lz1Oq5S}I(@#n(RGUp?*UILFVH@C&!VikM&XG~ytvBNG4{#3VjX zv(gemks-Aj%gtFktJKdoqS@MY*Jv;hzx6fIOZQf1cG80!-i#0yvO^)iEj-P!m~6w~ z;ba+|?hqRjh_op0T#iShtbhb#6`4x8g!03&7??}R ze^my-7|V-(DxrvTu%i15xCVXAS7bp^g^7SsrS9U3`Lv`&Q<<0yKQ9$KFK{(pT{lpi zPE!7mE;P0%4-YUb5v~>ro>-JWj3FovaN9?(7R`ATz)=!;iW)0CH>bUbT4ahDlSi)9 SZslFzPgY7%GE2h1_x}KSE48u! diff --git a/docs/images/design-collector-service.png b/docs/images/design-collector-service.png deleted file mode 100644 index 83f75e950f868f99d122dd81f15d1c451417eb7d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 109843 zcmd43cR1GV8wY&TO(G&08M&oMWu#=rEqiBVugYFUWMo!agzUX%3fW{eD0>sKLT1Qb zH}Cn?^Zcsk_xz4`9PjZS??070_xF2U=XK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Au1KhfqQw$)4@LZEgilC5(OJ46dMOiFqQDsrdHA#fY9FJV$#zD2=h{GQKi6 z>il+Q!GnI20Bm9fAr9X$c+n5hRPh>W&i}=kL-Zs5hFmye5||?G@u8X~@h)ZXeUvLp ziCwee9*K0z>o1x9n}x`%6HWU!8Q*s#o9B8nIh_GI*fT_z4810L2cnTO4!itvRdM-NM<>VndosY`5bqb3k z_oeE-y`#jE*Nc@a3B?HA_5k410&@;x5-{{YSv*IQ8;X$Tl ngU_!TSr%r8e*6%(sl_Uzq4X^$m8d9v6 diff --git a/docs/images/design-exporters.png b/docs/images/design-exporters.png deleted file mode 100644 index d19d41d36d31bee1572f75ac4832dd2965d77f9b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 36684 zcmeFZbyQSs|2L{Q${^Ar-2y5Nf}nIGrGNrb($d{9fV6<1sDQMAfFLkPcO$8EcjwSU zpKAl&&;6YBzQ6aJf6qE=vF^2QWY6q<#rOKucZWPulEJx3e)YnI3pjGJk}4N2V4yEt zxabML0)A7n)RA-H0__DkNij87-Q{wuvL{_9Cnv9O<#oQeWf-jTf;J=K_U3Qex4)Cq zS_5RI?x@m{x86>XYAz8{B@jcBH%Z#JV;RheCk~gP!(ZKanJ`X1VdXdO>si|N8wnTz1@oF4zbDpC3_b zg2<|l&%e4KNs7Y$^@E{j@n8QB+X(i7A*dBo1L^pLQ4U^h{lFSvQH z6X0L`&rf7kANjxkAKzDyp4K->CMrGUKQ{y27_6fA-}mPOpC-77btw2z0Y~cJ_XoZt z|H{Aa7bZy?0iJH|kCFMU|GFPq-;EgV0d&Gzd|8?_Cq`qZ@=)y5XsgC=?S1DBUdlu6ntHOkp z%9G>XbXDf1&aa_X$X`r$6Sx$7tv@RE&3E&DMKNm)6V zkBLUh2ev3HzO_Wdgd935e%oXmQqHQ6cg+me%6Ah-+?TSP_hzE!MqGJm{|>ot9c)8o zTs`ek^_{1gFHVkjla6+VY^1I$39d_eET(_EW~bSCgG1L+hRW&P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lD95z}NJP`alhl7kesx0{+ZR Ltxc{N9gO%7`w4bK diff --git a/docs/images/design-receivers.png b/docs/images/design-receivers.png deleted file mode 100644 index ca1f647bb695b83020c12210e4b57b67a23b4204..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 47509 zcmeFZc{r8r*FU^zSB7NUNJZM%W*LiQ+O%b!LMlT@kuhVGu?Ur!WX_nm%rhkkh0L=k zk~y=Kyz8pI&+UGm-*LSE{Eqi{|9JlEw(sk@&S9Nvt*5SEIQE@^ZDF;~QQ_HF+MK3_ID(Cnv0fr{bZY zr_wnZ#X?*XkXK64Qep`|d6JeRfp#RnHnq6Eot%gN9T`@&m9+~riL9CMyBH1 z7u_Vw&F4${wsLFQM`o+M&L&IUS)UU+K#K83p>Ze@G6L$q{+TA|BS(hguC7$2`mewJ z^Rohq#FvuffBxVT$?1&>UsidKX8HH)kVgrq@uUCqLj>F;InF!nCsssu_xJyP3qvU1 z_uoc_{G#Ya3WKX_P{sVuF_54!`Tv^A-&dVaM3E}C2nf;o{*TELU^-U+%>C~JIMn|a z)0q(QiQ?6}Ty(uPml%j$f3^Sk#pZDK6&rNB%ucoQT)$A)_t=v+Oc!f5jEGmcnhF$7 z5{}B^7-9YfNB`Ttnc}|nUk$m`mv1N%%%_tXN-tnEoUM~(+GpSxWazcMR@yH8!*||o z?4?g{)h)Y?0juXV*YhryJTO5Q99#YpXE%6{TKen3Uu%6=Y*yF{<-lx6n|f!fXb>#ecZ%oCh1Y=q{dmdd%>#OuHu0&`)S)5LTTRMQJi0h-_sJ-| zxfb5%kCaj5E&Zt^7jiEO{ea=xj8?nZb}jg2rK?1rdBu~%;_dtF&bS}Lpu}SJRcfi# z(6yPKcWsg@s&P_xN~OL}MD%89KeKq8Mi^xErXzDvr})?4@Dd~f-ouXVQoVIvUSbI! zy>>>vvnP(8RuJD|g^Zu|PfLnjKgHKckd82GKL zT;>bmZ@uc0OGI=i8N*uPJN}|TTF${xmb392T@_P_RwCwY#WZZ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FnR&?FU^}T-}&I=BZI`i>H&|-1d zJsWhPE6GkgHsRd6_y|{fvb!WrHCa0X!YSkR#Hn4G5SOB_mq3`j4XcQ2@uRE7u&78& zS?DOpg-=BwCD~sNIgMgK+9V2^tzTs}wC?wDcG`$I6WsqmY3Pu8^4l?E>36u!CkxAB zQ4|*p+yn>;(-s=c$a!5R z;A#1-x(^qVN*oTM`vbM^4DoEIbKzCh(E}aQ-st$9jz$;EEI&)V8jd&pGs=n`@%ViL zv)~w^;e3C2IQk&Za0}I3q=;Aea3|8eoaUR{HxDwlOUxQomwqymF~Asjw+Yx3tG_sJO1YaDe%`I^Mx@Xd0J7?_KeLM5Bc);(7uBlF$mP5q90a#RRmjD0& diff --git a/docs/images/opentelemetry-service-deployment-models.png b/docs/images/opentelemetry-service-deployment-models.png deleted file mode 100644 index b977c0de0158d69345d8255672d6b9e382e5b2b9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 78430 zcmeFZbyU>-zb}f(V<3-#NE?9CD%~m)LwAQrw{*^+qM#t4L$@?TN(>F7A|Txi4Barq zP(ut1b3fyLe*4_B@4kE8v(EnG{&8@*23Ql{?)+tFuZ7ibUODyW z31>b3JUmgSBtK5$t+&(|cc&weBJMt`okoH2LF8Z8pR3NeLjH#0Dbt^azX$)k`gY!# zKR><|`}6QWzt`)p|MrrXMG4;>G)y$e;cf)+OiHujk<`qUyNX1wA6Rc-sz}-rij^RP802B0|3@%`%m^ zu%k01m{vc z*AyCr4MX652SWX5huD*z7GY~2GZkijWjq5amr9y>aKl1xcPneO9nKc!=VhD071!f_ zjr@+&EZuKqHtT4@tXD_Up^00~_DILEw(9Y=nu>a?;1@Fo7nMWHYI*^?Y>Beke1IS82hD8W!*oQRjDU3n;J7v4;J%W)4Fvo+^3x@i;ligq%R@Ao;VooEl3L$sjhn)8jKuk;#?y+O|)lj%F=X==FAY$x@(+rWH6Twj2W)Vzx)Zn%7cDTf_ z@QaLJo}7~la&<&T{>s|$hc_nSPQ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BV~3#y(Em76>j%Lwt8Mcku+A zf*<)0GfbU>wG2W>aCQ{?kJ_OR$UXhP2-h_~ZAte9?-wpEf8LI2J1P19hh=4ZpC$b- z<=Xl5|4Ma}zOhETs`3}p;vb&>FTD668KhK5Dhz*hbpGXm{~OADd-BDX;fcT0miY9w z|HAfniN0OHKUDsQN}fH<{Fe&;&k4Xkg6r_`d}gkQ@|rMZ{>lH|Fo4lNNu=EkRKwS? t+}$Ve-+A@Y-|hTr`RE@d${U|f@V3+iJo&b5a?s!(S^GNUA{{RO-uE_uZ diff --git a/docs/images/zpages-example.png b/docs/images/zpages-example.png deleted file mode 100644 index 168004dd6fcef7cdf2cae1483b98340ec502dd6f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 373980 zcmcG0bySpV+wYJHh#(=-7_@{mLrX}vbV_%3hbT%(N;gP1NLzpm-5t{1o#&pt-~E2y zT4yab=Z~}365067JoDUfUB9{smY02niB5zLfj}@N#6=V#kh^IR2nya^RPd8Io0CEa zhu&}&@urP(Zy^XP%r4a-o9vq{3M@^~yVTz`rgsGo=R^YVAgDfeubkTg}?_%PJ zXq2si6mL`?;%n8v_r=u4SFm+LF)SMG$QV8U=?{a|sgX~?Vi}v^6>K$2@*D3Yfn%4 z4$BwU(bZmYU+ap>QAF<}2+lq3#`}GGihYd;(fJVvLx)hD2{v{eAm-u71&#`$;s&ba z{~9yb%J>y;u9a6VAvr79Kn!6CZHqEON}EDFEPUzBvC!9qQkEz}5erEZ4&sVnnnR-q z3v_k$zEY+Pa{l&WpEzZs+0OXB-Ja{1u$uNq$=~U3YT3d$=dUf>u46BFTlDUEaG5?) zH}o$z9<9-=RmzP1jA|GDjFsd58?W~Q?@{PH-YevbKZq}^e${nie}98e@8t&7>{~G* zOH{kB&zLwgGJ864-Z?xDqDN-HA+U{NYx?+huT%unB-GOU38n~UdeDBE50+WdgA&5XYQvGb5~z`DpzLA%3Cfixy~SBpJCC|r3c z1X%}H=*0=rlgANQr*FR)z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-%29!0aG75H`1&_#uZh*o_cfJWrm)y>yl z_+~?IfVp9bQ8rHuXbqdv0og74>m`tB%XrA)=wlLx%aftL{O1Di(EeP8uAw-0RfPJ)f<$0=TLKU_{cyRKzzPleXd3DLiy?#=v>EV^OJn-4 zORERIYv!@5Hf#Zd0CGf6-(Z#LKV1fJV_*8wq!0P*yVxwaeS!&5V*L1*6XKvkL%u*l z%{KkeAH90`LiR8dJN-X;l8F?Csc#0+fa}-S;LPHf@NnCIBTW4*lKn4xC*=Q0$3ZbL5H^7n7w{~YVDb ../../featuregate replace go.opentelemetry.io/collector/pdata => ../../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + replace go.opentelemetry.io/collector/receiver => ../../receiver replace go.opentelemetry.io/collector/extension => ../../extension diff --git a/exporter/debugexporter/go.sum b/exporter/debugexporter/go.sum index dbdb92fd3bb..7bbf6704ff6 100644 --- a/exporter/debugexporter/go.sum +++ b/exporter/debugexporter/go.sum @@ -1,7 +1,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -16,13 +16,11 @@ github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsM github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +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/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -31,8 +29,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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= @@ -50,32 +48,32 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= -go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -91,16 +89,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -113,14 +111,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/exporter/debugexporter/internal/metadata/generated_status.go b/exporter/debugexporter/internal/metadata/generated_status.go index 18587820654..608b23c1536 100644 --- a/exporter/debugexporter/internal/metadata/generated_status.go +++ b/exporter/debugexporter/internal/metadata/generated_status.go @@ -3,15 +3,11 @@ package metadata import ( - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" ) var ( - Type = component.MustNewType("debug") - scopeName = "go.opentelemetry.io/collector/exporter/debugexporter" + Type = component.MustNewType("debug") ) const ( @@ -19,11 +15,3 @@ const ( MetricsStability = component.StabilityLevelDevelopment LogsStability = component.StabilityLevelDevelopment ) - -func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter(scopeName) -} - -func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer(scopeName) -} diff --git a/exporter/debugexporter/internal/metadata/generated_telemetry.go b/exporter/debugexporter/internal/metadata/generated_telemetry.go new file mode 100644 index 00000000000..abe43e7fa07 --- /dev/null +++ b/exporter/debugexporter/internal/metadata/generated_telemetry.go @@ -0,0 +1,18 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("go.opentelemetry.io/collector/exporter/debugexporter") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/exporter/debugexporter") +} diff --git a/exporter/debugexporter/internal/metadata/generated_telemetry_test.go b/exporter/debugexporter/internal/metadata/generated_telemetry_test.go new file mode 100644 index 00000000000..ed6c580e677 --- /dev/null +++ b/exporter/debugexporter/internal/metadata/generated_telemetry_test.go @@ -0,0 +1,63 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/otel/metric" + embeddedmetric "go.opentelemetry.io/otel/metric/embedded" + noopmetric "go.opentelemetry.io/otel/metric/noop" + "go.opentelemetry.io/otel/trace" + embeddedtrace "go.opentelemetry.io/otel/trace/embedded" + nooptrace "go.opentelemetry.io/otel/trace/noop" + + "go.opentelemetry.io/collector/component" +) + +type mockMeter struct { + noopmetric.Meter + name string +} +type mockMeterProvider struct { + embeddedmetric.MeterProvider +} + +func (m mockMeterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter { + return mockMeter{name: name} +} + +type mockTracer struct { + nooptrace.Tracer + name string +} + +type mockTracerProvider struct { + embeddedtrace.TracerProvider +} + +func (m mockTracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { + return mockTracer{name: name} +} + +func TestProviders(t *testing.T) { + set := component.TelemetrySettings{ + MeterProvider: mockMeterProvider{}, + TracerProvider: mockTracerProvider{}, + } + + meter := Meter(set) + if m, ok := meter.(mockMeter); ok { + require.Equal(t, "go.opentelemetry.io/collector/exporter/debugexporter", m.name) + } else { + require.Fail(t, "returned Meter not mockMeter") + } + + tracer := Tracer(set) + if m, ok := tracer.(mockTracer); ok { + require.Equal(t, "go.opentelemetry.io/collector/exporter/debugexporter", m.name) + } else { + require.Fail(t, "returned Meter not mockTracer") + } +} diff --git a/exporter/exporterbatcher/batch_func.go b/exporter/exporterbatcher/batch_func.go new file mode 100644 index 00000000000..0298276ba7b --- /dev/null +++ b/exporter/exporterbatcher/batch_func.go @@ -0,0 +1,24 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package exporterbatcher // import "go.opentelemetry.io/collector/exporter/exporterbatcher" + +import "context" + +// BatchMergeFunc is a function that merges two requests into a single request. +// Do not mutate the requests passed to the function if error can be returned after mutation or if the exporter is +// marked as not mutable. +// Experimental: This API is at the early stage of development and may change without backward compatibility +// until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. +type BatchMergeFunc[T any] func(context.Context, T, T) (T, error) + +// BatchMergeSplitFunc is a function that merge and/or splits one or two requests into multiple requests based on the +// configured limit provided in MaxSizeConfig. +// All the returned requests MUST have a number of items that does not exceed the maximum number of items. +// Size of the last returned request MUST be less or equal than the size of any other returned request. +// The original request MUST not be mutated if error is returned after mutation or if the exporter is +// marked as not mutable. The length of the returned slice MUST not be 0. The optionalReq argument can be nil, +// make sure to check it before using. +// Experimental: This API is at the early stage of development and may change without backward compatibility +// until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. +type BatchMergeSplitFunc[T any] func(ctx context.Context, cfg MaxSizeConfig, optionalReq T, req T) ([]T, error) diff --git a/exporter/exporterbatcher/config.go b/exporter/exporterbatcher/config.go new file mode 100644 index 00000000000..239dc2dd4fe --- /dev/null +++ b/exporter/exporterbatcher/config.go @@ -0,0 +1,70 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package exporterbatcher // import "go.opentelemetry.io/collector/exporter/exporterbatcher" + +import ( + "errors" + "time" +) + +// Config defines a configuration for batching requests based on a timeout and a minimum number of items. +// MaxSizeItems defines batch splitting functionality if it's more than zero. +// Experimental: This API is at the early stage of development and may change without backward compatibility +// until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. +type Config struct { + // Enabled indicates whether to not enqueue batches before sending to the consumerSender. + Enabled bool `mapstructure:"enabled"` + + // FlushTimeout sets the time after which a batch will be sent regardless of its size. + FlushTimeout time.Duration `mapstructure:"flush_timeout"` + + MinSizeConfig `mapstructure:",squash"` + MaxSizeConfig `mapstructure:",squash"` +} + +// MinSizeConfig defines the configuration for the minimum number of items in a batch. +// Experimental: This API is at the early stage of development and may change without backward compatibility +// until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. +type MinSizeConfig struct { + // MinSizeItems is the number of items (spans, data points or log records for OTLP) at which the batch should be + // sent regardless of the timeout. There is no guarantee that the batch size always greater than this value. + // This option requires the Request to implement RequestItemsCounter interface. Otherwise, it will be ignored. + MinSizeItems int `mapstructure:"min_size_items"` +} + +// MaxSizeConfig defines the configuration for the maximum number of items in a batch. +// Experimental: This API is at the early stage of development and may change without backward compatibility +// until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. +type MaxSizeConfig struct { + // MaxSizeItems is the maximum number of the batch items, i.e. spans, data points or log records for OTLP. + // If the batch size exceeds this value, it will be broken up into smaller batches if possible. + // Setting this value to zero disables the maximum size limit. + MaxSizeItems int `mapstructure:"max_size_items"` +} + +func (c Config) Validate() error { + if c.MinSizeItems < 0 { + return errors.New("min_size_items must be greater than or equal to zero") + } + if c.MaxSizeItems < 0 { + return errors.New("max_size_items must be greater than or equal to zero") + } + if c.MaxSizeItems != 0 && c.MaxSizeItems < c.MinSizeItems { + return errors.New("max_size_items must be greater than or equal to min_size_items") + } + if c.FlushTimeout <= 0 { + return errors.New("timeout must be greater than zero") + } + return nil +} + +func NewDefaultConfig() Config { + return Config{ + Enabled: true, + FlushTimeout: 200 * time.Millisecond, + MinSizeConfig: MinSizeConfig{ + MinSizeItems: 8192, + }, + } +} diff --git a/exporter/exporterbatcher/config_test.go b/exporter/exporterbatcher/config_test.go new file mode 100644 index 00000000000..337f83ce318 --- /dev/null +++ b/exporter/exporterbatcher/config_test.go @@ -0,0 +1,30 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package exporterbatcher + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestConfig_Validate(t *testing.T) { + cfg := NewDefaultConfig() + assert.NoError(t, cfg.Validate()) + + cfg.MinSizeItems = -1 + assert.EqualError(t, cfg.Validate(), "min_size_items must be greater than or equal to zero") + + cfg = NewDefaultConfig() + cfg.FlushTimeout = 0 + assert.EqualError(t, cfg.Validate(), "timeout must be greater than zero") + + cfg.MaxSizeItems = -1 + assert.EqualError(t, cfg.Validate(), "max_size_items must be greater than or equal to zero") + + cfg = NewDefaultConfig() + cfg.MaxSizeItems = 20000 + cfg.MinSizeItems = 20001 + assert.EqualError(t, cfg.Validate(), "max_size_items must be greater than or equal to min_size_items") +} diff --git a/exporter/exporterhelper/README.md b/exporter/exporterhelper/README.md index 06ce55ae626..e32c948c924 100644 --- a/exporter/exporterhelper/README.md +++ b/exporter/exporterhelper/README.md @@ -31,10 +31,6 @@ valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". ### Persistent Queue -**Status: [alpha]** - -> :warning: The capability is under development. To use it, a storage extension needs to be set up. - To use the persistent queue, the following setting needs to be set: - `sending_queue` @@ -44,7 +40,7 @@ To use the persistent queue, the following setting needs to be set: The maximum number of batches stored to disk can be controlled using `sending_queue.queue_size` parameter (which, similarly as for in-memory buffering, defaults to 1000 batches). -When persistent queue is enabled, the batches are being buffered using the provided storage extension - [filestorage] is a popular and safe choice. If the collector instance is killed while having some items in the persistent queue, on restart the items will be be picked and the exporting is continued. +When persistent queue is enabled, the batches are being buffered using the provided storage extension - [filestorage] is a popular and safe choice. If the collector instance is killed while having some items in the persistent queue, on restart the items will be picked and the exporting is continued. ``` ┌─Consumer #1─┐ @@ -66,19 +62,19 @@ When persistent queue is enabled, the batches are being buffered using the provi │ │ │ │ │ │ │ 3 │ ├───► (in progress) write read └─────┬─────┘ ├───►│ └───┘ │ index index │ │ │ │ - ▲ │ │ └─────────────┘ - │ │ │ - │ currently │ ┌─Consumer #4─┐ - │ dispatched │ │ ┌───┐ │ Temporary - │ └───►│ │ 4 │ ├───► failure - │ │ └───┘ │ │ - │ │ │ │ - │ └─────────────┘ │ - │ ▲ │ - │ └── Retry ───────┤ - │ │ - │ │ - └────────────────────────────────────── Requeuing ◄────── Retry limit exceeded ───┘ + │ │ └─────────────┘ + │ │ + currently │ ┌─Consumer #4─┐ + dispatched │ │ ┌───┐ │ Temporary + └───►│ │ 4 │ ├───► failure + │ └───┘ │ │ + │ │ │ + └─────────────┘ │ + ▲ │ + └── Retry ───────┤ + │ + │ + X ◄────── Retry limit exceeded ───┘ ``` Example: diff --git a/exporter/exporterhelper/batch_sender.go b/exporter/exporterhelper/batch_sender.go new file mode 100644 index 00000000000..29065bfe980 --- /dev/null +++ b/exporter/exporterhelper/batch_sender.go @@ -0,0 +1,223 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package exporterhelper // import "go.opentelemetry.io/collector/exporter/exporterhelper" + +import ( + "context" + "sync" + "sync/atomic" + "time" + + "go.uber.org/zap" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exporterbatcher" +) + +// batchSender is a component that places requests into batches before passing them to the downstream senders. +// Batches are sent out with any of the following conditions: +// - batch size reaches cfg.MinSizeItems +// - cfg.FlushTimeout is elapsed since the timestamp when the previous batch was sent out. +// - concurrencyLimit is reached. +type batchSender struct { + baseRequestSender + cfg exporterbatcher.Config + mergeFunc exporterbatcher.BatchMergeFunc[Request] + mergeSplitFunc exporterbatcher.BatchMergeSplitFunc[Request] + + // concurrencyLimit is the maximum number of goroutines that can be blocked by the batcher. + // If this number is reached and all the goroutines are busy, the batch will be sent right away. + // Populated from the number of queue consumers if queue is enabled. + concurrencyLimit uint64 + activeRequests atomic.Uint64 + + resetTimerCh chan struct{} + + mu sync.Mutex + activeBatch *batch + + logger *zap.Logger + + shutdownCh chan struct{} + stopped *atomic.Bool +} + +// newBatchSender returns a new batch consumer component. +func newBatchSender(cfg exporterbatcher.Config, set exporter.CreateSettings, + mf exporterbatcher.BatchMergeFunc[Request], msf exporterbatcher.BatchMergeSplitFunc[Request]) *batchSender { + bs := &batchSender{ + activeBatch: newEmptyBatch(), + cfg: cfg, + logger: set.Logger, + mergeFunc: mf, + mergeSplitFunc: msf, + shutdownCh: make(chan struct{}), + stopped: &atomic.Bool{}, + resetTimerCh: make(chan struct{}), + } + return bs +} + +func (bs *batchSender) Start(_ context.Context, _ component.Host) error { + timer := time.NewTimer(bs.cfg.FlushTimeout) + go func() { + for { + select { + case <-bs.shutdownCh: + bs.mu.Lock() + if bs.activeBatch.request != nil { + bs.exportActiveBatch() + } + bs.mu.Unlock() + if !timer.Stop() { + <-timer.C + } + return + case <-timer.C: + bs.mu.Lock() + if bs.activeBatch.request != nil { + bs.exportActiveBatch() + } + bs.mu.Unlock() + timer.Reset(bs.cfg.FlushTimeout) + case <-bs.resetTimerCh: + if !timer.Stop() { + <-timer.C + } + timer.Reset(bs.cfg.FlushTimeout) + } + } + }() + + return nil +} + +type batch struct { + ctx context.Context + request Request + done chan struct{} + err error +} + +func newEmptyBatch() *batch { + return &batch{ + ctx: context.Background(), + done: make(chan struct{}), + } +} + +// exportActiveBatch exports the active batch asynchronously and replaces it with a new one. +// Caller must hold the lock. +func (bs *batchSender) exportActiveBatch() { + go func(b *batch) { + b.err = b.request.Export(b.ctx) + close(b.done) + }(bs.activeBatch) + bs.activeBatch = newEmptyBatch() +} + +// isActiveBatchReady returns true if the active batch is ready to be exported. +// The batch is ready if it has reached the minimum size or the concurrency limit is reached. +// Caller must hold the lock. +func (bs *batchSender) isActiveBatchReady() bool { + return bs.activeBatch.request.ItemsCount() >= bs.cfg.MinSizeItems || + (bs.concurrencyLimit > 0 && bs.activeRequests.Load() >= bs.concurrencyLimit) +} + +func (bs *batchSender) send(ctx context.Context, req Request) error { + // Stopped batch sender should act as pass-through to allow the queue to be drained. + if bs.stopped.Load() { + return bs.nextSender.send(ctx, req) + } + + if bs.cfg.MaxSizeItems > 0 { + return bs.sendMergeSplitBatch(ctx, req) + } + return bs.sendMergeBatch(ctx, req) +} + +// sendMergeSplitBatch sends the request to the batch which may be split into multiple requests. +func (bs *batchSender) sendMergeSplitBatch(ctx context.Context, req Request) error { + bs.mu.Lock() + bs.activeRequests.Add(1) + defer bs.activeRequests.Add(^uint64(0)) + + reqs, err := bs.mergeSplitFunc(ctx, bs.cfg.MaxSizeConfig, bs.activeBatch.request, req) + if err != nil || len(reqs) == 0 { + bs.mu.Unlock() + return err + } + if len(reqs) == 1 || bs.activeBatch.request != nil { + bs.updateActiveBatch(ctx, reqs[0]) + batch := bs.activeBatch + if bs.isActiveBatchReady() || len(reqs) > 1 { + bs.exportActiveBatch() + bs.resetTimerCh <- struct{}{} + } + bs.mu.Unlock() + <-batch.done + if batch.err != nil { + return batch.err + } + reqs = reqs[1:] + } else { + bs.mu.Unlock() + } + + // Intentionally do not put the last request in the active batch to not block it. + // TODO: Consider including the partial request in the error to avoid double publishing. + for _, r := range reqs { + if err := r.Export(ctx); err != nil { + return err + } + } + return nil +} + +// sendMergeBatch sends the request to the batch and waits for the batch to be exported. +func (bs *batchSender) sendMergeBatch(ctx context.Context, req Request) error { + bs.mu.Lock() + bs.activeRequests.Add(1) + defer bs.activeRequests.Add(^uint64(0)) + + if bs.activeBatch.request != nil { + var err error + req, err = bs.mergeFunc(ctx, bs.activeBatch.request, req) + if err != nil { + bs.mu.Unlock() + return err + } + } + bs.updateActiveBatch(ctx, req) + batch := bs.activeBatch + if bs.isActiveBatchReady() { + bs.exportActiveBatch() + bs.resetTimerCh <- struct{}{} + } + bs.mu.Unlock() + <-batch.done + return batch.err +} + +// updateActiveBatch update the active batch to the new merged request and context. +// The context is only set once and is not updated after the first call. +// Merging the context would be complex and require an additional goroutine to handle the context cancellation. +// We take the approach of using the context from the first request since it's likely to have the shortest timeout. +func (bs *batchSender) updateActiveBatch(ctx context.Context, req Request) { + if bs.activeBatch.request == nil { + bs.activeBatch.ctx = ctx + } + bs.activeBatch.request = req +} + +func (bs *batchSender) Shutdown(context.Context) error { + bs.stopped.Store(true) + close(bs.shutdownCh) + // Wait for the active requests to finish. + for bs.activeRequests.Load() > 0 { + time.Sleep(10 * time.Millisecond) + } + return nil +} diff --git a/exporter/exporterhelper/batch_sender_test.go b/exporter/exporterhelper/batch_sender_test.go new file mode 100644 index 00000000000..15d05b066f4 --- /dev/null +++ b/exporter/exporterhelper/batch_sender_test.go @@ -0,0 +1,448 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package exporterhelper // import "go.opentelemetry.io/collector/exporter/exporterhelper" + +import ( + "context" + "errors" + "fmt" + "sync" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/exporter/exporterbatcher" + "go.opentelemetry.io/collector/exporter/exporterqueue" +) + +func TestBatchSender_Merge(t *testing.T) { + cfg := exporterbatcher.NewDefaultConfig() + cfg.MinSizeItems = 10 + cfg.FlushTimeout = 100 * time.Millisecond + + tests := []struct { + name string + batcherOption Option + }{ + { + name: "split_disabled", + batcherOption: WithBatcher(cfg, WithRequestBatchFuncs(fakeBatchMergeFunc, fakeBatchMergeSplitFunc)), + }, + { + name: "split_high_limit", + batcherOption: func() Option { + c := cfg + c.MaxSizeItems = 1000 + return WithBatcher(c, WithRequestBatchFuncs(fakeBatchMergeFunc, fakeBatchMergeSplitFunc)) + }(), + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + be := queueBatchExporter(t, tt.batcherOption) + + require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) + t.Cleanup(func() { + require.NoError(t, be.Shutdown(context.Background())) + }) + + sink := newFakeRequestSink() + + require.NoError(t, be.send(context.Background(), &fakeRequest{items: 8, sink: sink})) + require.NoError(t, be.send(context.Background(), &fakeRequest{items: 3, sink: sink})) + + // the first two requests should be merged into one and sent by reaching the minimum items size + assert.Eventually(t, func() bool { + return sink.requestsCount.Load() == 1 && sink.itemsCount.Load() == 11 + }, 50*time.Millisecond, 10*time.Millisecond) + + require.NoError(t, be.send(context.Background(), &fakeRequest{items: 3, sink: sink})) + require.NoError(t, be.send(context.Background(), &fakeRequest{items: 1, sink: sink})) + + // the third and fifth requests should be sent by reaching the timeout + // the fourth request should be ignored because of the merge error. + time.Sleep(50 * time.Millisecond) + + // should be ignored because of the merge error. + require.NoError(t, be.send(context.Background(), &fakeRequest{items: 3, sink: sink, + mergeErr: errors.New("merge error")})) + + assert.Equal(t, uint64(1), sink.requestsCount.Load()) + assert.Eventually(t, func() bool { + return sink.requestsCount.Load() == 2 && sink.itemsCount.Load() == 15 + }, 100*time.Millisecond, 10*time.Millisecond) + }) + } +} + +func TestBatchSender_BatchExportError(t *testing.T) { + cfg := exporterbatcher.NewDefaultConfig() + cfg.MinSizeItems = 10 + tests := []struct { + name string + batcherOption Option + expectedRequests uint64 + expectedItems uint64 + }{ + { + name: "merge_only", + batcherOption: WithBatcher(cfg, WithRequestBatchFuncs(fakeBatchMergeFunc, fakeBatchMergeSplitFunc)), + }, + { + name: "merge_without_split_triggered", + batcherOption: func() Option { + c := cfg + c.MaxSizeItems = 200 + return WithBatcher(c, WithRequestBatchFuncs(fakeBatchMergeFunc, fakeBatchMergeSplitFunc)) + }(), + }, + { + name: "merge_with_split_triggered", + batcherOption: func() Option { + c := cfg + c.MaxSizeItems = 20 + return WithBatcher(c, WithRequestBatchFuncs(fakeBatchMergeFunc, fakeBatchMergeSplitFunc)) + }(), + expectedRequests: 1, + expectedItems: 20, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + be := queueBatchExporter(t, tt.batcherOption) + + require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) + t.Cleanup(func() { + require.NoError(t, be.Shutdown(context.Background())) + }) + + sink := newFakeRequestSink() + + require.NoError(t, be.send(context.Background(), &fakeRequest{items: 4, sink: sink})) + require.NoError(t, be.send(context.Background(), &fakeRequest{items: 4, sink: sink})) + + // the first two requests should be blocked by the batchSender. + time.Sleep(50 * time.Millisecond) + assert.Equal(t, uint64(0), sink.requestsCount.Load()) + + // the third request should trigger the export and cause an error. + errReq := &fakeRequest{items: 20, exportErr: errors.New("transient error"), sink: sink} + require.NoError(t, be.send(context.Background(), errReq)) + + // the batch should be dropped since the queue doesn't have requeuing enabled. + assert.Eventually(t, func() bool { + return sink.requestsCount.Load() == tt.expectedRequests && + sink.itemsCount.Load() == tt.expectedItems && + be.batchSender.(*batchSender).activeRequests.Load() == uint64(0) && + be.queueSender.(*queueSender).queue.Size() == 0 + }, 100*time.Millisecond, 10*time.Millisecond) + }) + } +} + +func TestBatchSender_MergeOrSplit(t *testing.T) { + cfg := exporterbatcher.NewDefaultConfig() + cfg.MinSizeItems = 5 + cfg.MaxSizeItems = 10 + cfg.FlushTimeout = 100 * time.Millisecond + be := queueBatchExporter(t, WithBatcher(cfg, WithRequestBatchFuncs(fakeBatchMergeFunc, fakeBatchMergeSplitFunc))) + + require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) + t.Cleanup(func() { + require.NoError(t, be.Shutdown(context.Background())) + }) + + sink := newFakeRequestSink() + + // should be sent right away by reaching the minimum items size. + require.NoError(t, be.send(context.Background(), &fakeRequest{items: 8, sink: sink})) + assert.Eventually(t, func() bool { + return sink.requestsCount.Load() == 1 && sink.itemsCount.Load() == 8 + }, 50*time.Millisecond, 10*time.Millisecond) + + // big request should be broken down into two requests, both are sent right away. + require.NoError(t, be.send(context.Background(), &fakeRequest{items: 17, sink: sink})) + + assert.Eventually(t, func() bool { + return sink.requestsCount.Load() == 3 && sink.itemsCount.Load() == 25 + }, 50*time.Millisecond, 10*time.Millisecond) + + // request that cannot be split should be dropped. + require.NoError(t, be.send(context.Background(), &fakeRequest{items: 11, sink: sink, + mergeErr: errors.New("split error")})) + + // big request should be broken down into two requests, both are sent right away. + require.NoError(t, be.send(context.Background(), &fakeRequest{items: 13, sink: sink})) + + assert.Eventually(t, func() bool { + return sink.requestsCount.Load() == 5 && sink.itemsCount.Load() == 38 + }, 50*time.Millisecond, 10*time.Millisecond) + + fmt.Println("TestBatchSender_MergeOrSplit") +} + +func TestBatchSender_Shutdown(t *testing.T) { + batchCfg := exporterbatcher.NewDefaultConfig() + batchCfg.MinSizeItems = 10 + be := queueBatchExporter(t, WithBatcher(batchCfg, WithRequestBatchFuncs(fakeBatchMergeFunc, fakeBatchMergeSplitFunc))) + + require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) + + sink := newFakeRequestSink() + require.NoError(t, be.send(context.Background(), &fakeRequest{items: 3, sink: sink})) + + // To make the request reached the batchSender before shutdown. + time.Sleep(50 * time.Millisecond) + + require.NoError(t, be.Shutdown(context.Background())) + + // shutdown should force sending the batch + assert.Equal(t, uint64(1), sink.requestsCount.Load()) + assert.Equal(t, uint64(3), sink.itemsCount.Load()) +} + +func TestBatchSender_Disabled(t *testing.T) { + cfg := exporterbatcher.NewDefaultConfig() + cfg.Enabled = false + cfg.MaxSizeItems = 5 + be, err := newBaseExporter(defaultSettings, defaultType, newNoopObsrepSender, + WithBatcher(cfg, WithRequestBatchFuncs(fakeBatchMergeFunc, fakeBatchMergeSplitFunc))) + require.NotNil(t, be) + require.NoError(t, err) + + require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) + t.Cleanup(func() { + require.NoError(t, be.Shutdown(context.Background())) + }) + + sink := newFakeRequestSink() + // should be sent right away without splitting because batching is disabled. + require.NoError(t, be.send(context.Background(), &fakeRequest{items: 8, sink: sink})) + assert.Equal(t, uint64(1), sink.requestsCount.Load()) + assert.Equal(t, uint64(8), sink.itemsCount.Load()) +} + +func TestBatchSender_InvalidMergeSplitFunc(t *testing.T) { + invalidMergeSplitFunc := func(_ context.Context, _ exporterbatcher.MaxSizeConfig, _ Request, req2 Request) ([]Request, + error) { + // reply with invalid 0 length slice if req2 is more than 20 items + if req2.(*fakeRequest).items > 20 { + return []Request{}, nil + } + // otherwise reply with a single request. + return []Request{req2}, nil + } + cfg := exporterbatcher.NewDefaultConfig() + cfg.FlushTimeout = 50 * time.Millisecond + cfg.MaxSizeItems = 20 + be := queueBatchExporter(t, WithBatcher(cfg, WithRequestBatchFuncs(fakeBatchMergeFunc, invalidMergeSplitFunc))) + + require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) + t.Cleanup(func() { + require.NoError(t, be.Shutdown(context.Background())) + }) + + sink := newFakeRequestSink() + // first request should be ignored due to invalid merge/split function. + require.NoError(t, be.send(context.Background(), &fakeRequest{items: 30, sink: sink})) + // second request should be sent after reaching the timeout. + require.NoError(t, be.send(context.Background(), &fakeRequest{items: 15, sink: sink})) + assert.Eventually(t, func() bool { + return sink.requestsCount.Load() == 1 && sink.itemsCount.Load() == 15 + }, 100*time.Millisecond, 10*time.Millisecond) +} + +func TestBatchSender_PostShutdown(t *testing.T) { + be, err := newBaseExporter(defaultSettings, defaultType, newNoopObsrepSender, + WithBatcher(exporterbatcher.NewDefaultConfig(), WithRequestBatchFuncs(fakeBatchMergeFunc, + fakeBatchMergeSplitFunc))) + require.NotNil(t, be) + require.NoError(t, err) + assert.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) + assert.NoError(t, be.Shutdown(context.Background())) + + // Closed batch sender should act as a pass-through to not block queue draining. + sink := newFakeRequestSink() + require.NoError(t, be.send(context.Background(), &fakeRequest{items: 8, sink: sink})) + assert.Equal(t, uint64(1), sink.requestsCount.Load()) + assert.Equal(t, uint64(8), sink.itemsCount.Load()) +} + +func TestBatchSender_ConcurrencyLimitReached(t *testing.T) { + qCfg := exporterqueue.NewDefaultConfig() + qCfg.NumConsumers = 2 + be, err := newBaseExporter(defaultSettings, defaultType, newNoopObsrepSender, + WithBatcher(exporterbatcher.NewDefaultConfig(), WithRequestBatchFuncs(fakeBatchMergeFunc, fakeBatchMergeSplitFunc)), + WithRequestQueue(qCfg, exporterqueue.NewMemoryQueueFactory[Request]())) + require.NotNil(t, be) + require.NoError(t, err) + assert.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) + t.Cleanup(func() { + assert.NoError(t, be.Shutdown(context.Background())) + }) + + sink := newFakeRequestSink() + assert.NoError(t, be.send(context.Background(), &fakeRequest{items: 8, sink: sink})) + + // the second request should be sent by reaching max concurrency limit. + assert.NoError(t, be.send(context.Background(), &fakeRequest{items: 8, sink: sink})) + + assert.Eventually(t, func() bool { + return sink.requestsCount.Load() == 1 && sink.itemsCount.Load() == 16 + }, 100*time.Millisecond, 10*time.Millisecond) +} + +func TestBatchSender_BatchBlocking(t *testing.T) { + bCfg := exporterbatcher.NewDefaultConfig() + bCfg.MinSizeItems = 3 + be, err := newBaseExporter(defaultSettings, defaultType, newNoopObsrepSender, + WithBatcher(bCfg, WithRequestBatchFuncs(fakeBatchMergeFunc, fakeBatchMergeSplitFunc))) + require.NotNil(t, be) + require.NoError(t, err) + require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) + + sink := newFakeRequestSink() + + // send 6 blocking requests + wg := sync.WaitGroup{} + for i := 0; i < 6; i++ { + wg.Add(1) + go func() { + assert.NoError(t, be.send(context.Background(), &fakeRequest{items: 1, sink: sink, delay: 10 * time.Millisecond})) + wg.Done() + }() + } + wg.Wait() + + // should be sent in two batches since the batch size is 3 + assert.Equal(t, uint64(2), sink.requestsCount.Load()) + assert.Equal(t, uint64(6), sink.itemsCount.Load()) + + require.NoError(t, be.Shutdown(context.Background())) +} + +// Validate that the batch is cancelled once the first request in the request is cancelled +func TestBatchSender_BatchCancelled(t *testing.T) { + bCfg := exporterbatcher.NewDefaultConfig() + bCfg.MinSizeItems = 2 + be, err := newBaseExporter(defaultSettings, defaultType, newNoopObsrepSender, + WithBatcher(bCfg, WithRequestBatchFuncs(fakeBatchMergeFunc, fakeBatchMergeSplitFunc))) + require.NotNil(t, be) + require.NoError(t, err) + require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) + + sink := newFakeRequestSink() + + // send 2 blocking requests + wg := sync.WaitGroup{} + ctx, cancel := context.WithCancel(context.Background()) + wg.Add(1) + go func() { + assert.ErrorIs(t, be.send(ctx, &fakeRequest{items: 1, sink: sink, delay: 100 * time.Millisecond}), context.Canceled) + wg.Done() + }() + wg.Add(1) + go func() { + time.Sleep(20 * time.Millisecond) // ensure this call is the second + assert.ErrorIs(t, be.send(context.Background(), &fakeRequest{items: 1, sink: sink, delay: 100 * time.Millisecond}), context.Canceled) + wg.Done() + }() + cancel() // canceling the first request should cancel the whole batch + wg.Wait() + + // nothing should be delivered + assert.Equal(t, uint64(0), sink.requestsCount.Load()) + assert.Equal(t, uint64(0), sink.itemsCount.Load()) + + require.NoError(t, be.Shutdown(context.Background())) +} + +func TestBatchSender_DrainActiveRequests(t *testing.T) { + bCfg := exporterbatcher.NewDefaultConfig() + bCfg.MinSizeItems = 2 + be, err := newBaseExporter(defaultSettings, defaultType, newNoopObsrepSender, + WithBatcher(bCfg, WithRequestBatchFuncs(fakeBatchMergeFunc, fakeBatchMergeSplitFunc))) + require.NotNil(t, be) + require.NoError(t, err) + require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) + + sink := newFakeRequestSink() + + // send 3 blocking requests with a timeout + go func() { + assert.NoError(t, be.send(context.Background(), &fakeRequest{items: 1, sink: sink, delay: 40 * time.Millisecond})) + }() + go func() { + assert.NoError(t, be.send(context.Background(), &fakeRequest{items: 1, sink: sink, delay: 40 * time.Millisecond})) + }() + go func() { + assert.NoError(t, be.send(context.Background(), &fakeRequest{items: 1, sink: sink, delay: 40 * time.Millisecond})) + }() + + // give time for the first two requests to be batched + time.Sleep(20 * time.Millisecond) + + // Shutdown should force the active batch to be dispatched and wait for all batches to be delivered. + // It should take 120 milliseconds to complete. + require.NoError(t, be.Shutdown(context.Background())) + + assert.Equal(t, uint64(2), sink.requestsCount.Load()) + assert.Equal(t, uint64(3), sink.itemsCount.Load()) +} + +func TestBatchSender_WithBatcherOption(t *testing.T) { + tests := []struct { + name string + opts []Option + expectedErr bool + }{ + { + name: "no_funcs_set", + opts: []Option{WithBatcher(exporterbatcher.NewDefaultConfig())}, + expectedErr: true, + }, + { + name: "funcs_set_internally", + opts: []Option{withBatchFuncs(fakeBatchMergeFunc, fakeBatchMergeSplitFunc), WithBatcher(exporterbatcher.NewDefaultConfig())}, + expectedErr: false, + }, + { + name: "funcs_set_twice", + opts: []Option{ + withBatchFuncs(fakeBatchMergeFunc, fakeBatchMergeSplitFunc), + WithBatcher(exporterbatcher.NewDefaultConfig(), WithRequestBatchFuncs(fakeBatchMergeFunc, + fakeBatchMergeSplitFunc)), + }, + expectedErr: true, + }, + { + name: "nil_funcs", + opts: []Option{WithBatcher(exporterbatcher.NewDefaultConfig(), WithRequestBatchFuncs(nil, nil))}, + expectedErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + be, err := newBaseExporter(defaultSettings, defaultType, newNoopObsrepSender, tt.opts...) + if tt.expectedErr { + assert.Nil(t, be) + assert.Error(t, err) + } else { + assert.NotNil(t, be) + assert.NoError(t, err) + } + }) + } +} + +func queueBatchExporter(t *testing.T, batchOption Option) *baseExporter { + be, err := newBaseExporter(defaultSettings, defaultType, newNoopObsrepSender, batchOption, + WithRequestQueue(exporterqueue.NewDefaultConfig(), exporterqueue.NewMemoryQueueFactory[Request]())) + require.NotNil(t, be) + require.NoError(t, err) + return be +} diff --git a/exporter/exporterhelper/common.go b/exporter/exporterhelper/common.go index 509570960e8..aa84e9019f2 100644 --- a/exporter/exporterhelper/common.go +++ b/exporter/exporterhelper/common.go @@ -5,6 +5,7 @@ package exporterhelper // import "go.opentelemetry.io/collector/exporter/exporte import ( "context" + "fmt" "go.uber.org/multierr" "go.uber.org/zap" @@ -13,6 +14,7 @@ import ( "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exporterbatcher" "go.opentelemetry.io/collector/exporter/exporterqueue" ) @@ -42,41 +44,45 @@ func (b *baseRequestSender) setNextSender(nextSender requestSender) { type obsrepSenderFactory func(obsrep *ObsReport) requestSender // Option apply changes to baseExporter. -type Option func(*baseExporter) +type Option func(*baseExporter) error // WithStart overrides the default Start function for an exporter. // The default start function does nothing and always returns nil. func WithStart(start component.StartFunc) Option { - return func(o *baseExporter) { + return func(o *baseExporter) error { o.StartFunc = start + return nil } } // WithShutdown overrides the default Shutdown function for an exporter. // The default shutdown function does nothing and always returns nil. func WithShutdown(shutdown component.ShutdownFunc) Option { - return func(o *baseExporter) { + return func(o *baseExporter) error { o.ShutdownFunc = shutdown + return nil } } // WithTimeout overrides the default TimeoutSettings for an exporter. // The default TimeoutSettings is 5 seconds. func WithTimeout(timeoutSettings TimeoutSettings) Option { - return func(o *baseExporter) { + return func(o *baseExporter) error { o.timeoutSender.cfg = timeoutSettings + return nil } } // WithRetry overrides the default configretry.BackOffConfig for an exporter. // The default configretry.BackOffConfig is to disable retries. func WithRetry(config configretry.BackOffConfig) Option { - return func(o *baseExporter) { + return func(o *baseExporter) error { if !config.Enabled { o.exportFailureMessage += " Try enabling retry_on_failure config option to retry on retryable errors." - return + return nil } o.retrySender = newRetrySender(config, o.set) + return nil } } @@ -84,13 +90,13 @@ func WithRetry(config configretry.BackOffConfig) Option { // The default QueueSettings is to disable queueing. // This option cannot be used with the new exporter helpers New[Traces|Metrics|Logs]RequestExporter. func WithQueue(config QueueSettings) Option { - return func(o *baseExporter) { + return func(o *baseExporter) error { if o.marshaler == nil || o.unmarshaler == nil { - panic("WithQueue option is not available for the new request exporters, use WithRequestQueue instead") + return fmt.Errorf("WithQueue option is not available for the new request exporters, use WithRequestQueue instead") } if !config.Enabled { o.exportFailureMessage += " Try enabling sending_queue to survive temporary failures." - return + return nil } qf := exporterqueue.NewPersistentQueueFactory[Request](config.StorageID, exporterqueue.PersistentQueueSettings[Request]{ Marshaler: o.marshaler, @@ -105,27 +111,29 @@ func WithQueue(config QueueSettings) Option { QueueSize: config.QueueSize, }) o.queueSender = newQueueSender(q, o.set, config.NumConsumers, o.exportFailureMessage) + return nil } } // WithRequestQueue enables queueing for an exporter. // This option should be used with the new exporter helpers New[Traces|Metrics|Logs]RequestExporter. -// This API is at the early stage of development and may change without backward compatibility +// Experimental: This API is at the early stage of development and may change without backward compatibility // until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. func WithRequestQueue(cfg exporterqueue.Config, queueFactory exporterqueue.Factory[Request]) Option { - return func(o *baseExporter) { + return func(o *baseExporter) error { if o.marshaler != nil || o.unmarshaler != nil { - panic("WithRequestQueue option must be used with the new request exporters only, use WithQueue instead") + return fmt.Errorf("WithRequestQueue option must be used with the new request exporters only, use WithQueue instead") } if !cfg.Enabled { o.exportFailureMessage += " Try enabling sending_queue to survive temporary failures." - return + return nil } set := exporterqueue.Settings{ DataType: o.signal, ExporterSettings: o.set, } o.queueSender = newQueueSender(queueFactory(context.Background(), set, cfg), o.set, cfg.NumConsumers, o.exportFailureMessage) + return nil } } @@ -133,24 +141,80 @@ func WithRequestQueue(cfg exporterqueue.Config, queueFactory exporterqueue.Facto // The default is non-mutable data. // TODO: Verify if we can change the default to be mutable as we do for processors. func WithCapabilities(capabilities consumer.Capabilities) Option { - return func(o *baseExporter) { + return func(o *baseExporter) error { o.consumerOptions = append(o.consumerOptions, consumer.WithCapabilities(capabilities)) + return nil + } +} + +// BatcherOption apply changes to batcher sender. +type BatcherOption func(*batchSender) error + +// WithRequestBatchFuncs sets the functions for merging and splitting batches for an exporter built for custom request types. +func WithRequestBatchFuncs(mf exporterbatcher.BatchMergeFunc[Request], msf exporterbatcher.BatchMergeSplitFunc[Request]) BatcherOption { + return func(bs *batchSender) error { + if mf == nil || msf == nil { + return fmt.Errorf("WithRequestBatchFuncs must be provided with non-nil functions") + } + if bs.mergeFunc != nil || bs.mergeSplitFunc != nil { + return fmt.Errorf("WithRequestBatchFuncs can only be used once with request-based exporters") + } + bs.mergeFunc = mf + bs.mergeSplitFunc = msf + return nil + } +} + +// WithBatcher enables batching for an exporter based on custom request types. +// For now, it can be used only with the New[Traces|Metrics|Logs]RequestExporter exporter helpers and +// WithRequestBatchFuncs provided. +// This API is at the early stage of development and may change without backward compatibility +// until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. +func WithBatcher(cfg exporterbatcher.Config, opts ...BatcherOption) Option { + return func(o *baseExporter) error { + if !cfg.Enabled { + return nil + } + + bs := newBatchSender(cfg, o.set, o.batchMergeFunc, o.batchMergeSplitfunc) + for _, opt := range opts { + if err := opt(bs); err != nil { + return err + } + } + if bs.mergeFunc == nil || bs.mergeSplitFunc == nil { + return fmt.Errorf("WithRequestBatchFuncs must be provided for the batcher applied to the request-based exporters") + } + o.batchSender = bs + return nil } } // withMarshaler is used to set the request marshaler for the new exporter helper. // It must be provided as the first option when creating a new exporter helper. func withMarshaler(marshaler exporterqueue.Marshaler[Request]) Option { - return func(o *baseExporter) { + return func(o *baseExporter) error { o.marshaler = marshaler + return nil } } // withUnmarshaler is used to set the request unmarshaler for the new exporter helper. // It must be provided as the first option when creating a new exporter helper. func withUnmarshaler(unmarshaler exporterqueue.Unmarshaler[Request]) Option { - return func(o *baseExporter) { + return func(o *baseExporter) error { o.unmarshaler = unmarshaler + return nil + } +} + +// withBatchFuncs is used to set the functions for merging and splitting batches for OLTP-based exporters. +// It must be provided as the first option when creating a new exporter helper. +func withBatchFuncs(mf exporterbatcher.BatchMergeFunc[Request], msf exporterbatcher.BatchMergeSplitFunc[Request]) Option { + return func(o *baseExporter) error { + o.batchMergeFunc = mf + o.batchMergeSplitfunc = msf + return nil } } @@ -159,9 +223,13 @@ type baseExporter struct { component.StartFunc component.ShutdownFunc + signal component.DataType + + batchMergeFunc exporterbatcher.BatchMergeFunc[Request] + batchMergeSplitfunc exporterbatcher.BatchMergeSplitFunc[Request] + marshaler exporterqueue.Marshaler[Request] unmarshaler exporterqueue.Unmarshaler[Request] - signal component.DataType set exporter.CreateSettings obsrep *ObsReport @@ -172,6 +240,7 @@ type baseExporter struct { // Chain of senders that the exporter helper applies before passing the data to the actual exporter. // The data is handled by each sender in the respective order starting from the queueSender. // Most of the senders are optional, and initialized with a no-op path-through sender. + batchSender requestSender queueSender requestSender obsrepSender requestSender retrySender requestSender @@ -189,6 +258,7 @@ func newBaseExporter(set exporter.CreateSettings, signal component.DataType, osf be := &baseExporter{ signal: signal, + batchSender: &baseRequestSender{}, queueSender: &baseRequestSender{}, obsrepSender: osf(obsReport), retrySender: &baseRequestSender{}, @@ -199,10 +269,23 @@ func newBaseExporter(set exporter.CreateSettings, signal component.DataType, osf } for _, op := range options { - op(be) + err = multierr.Append(err, op(be)) + } + if err != nil { + return nil, err } + be.connectSenders() + if bs, ok := be.batchSender.(*batchSender); ok { + // If queue sender is enabled assign to the batch sender the same number of workers. + if qs, ok := be.queueSender.(*queueSender); ok { + bs.concurrencyLimit = uint64(qs.numConsumers) + } + // Batcher sender mutates the data. + be.consumerOptions = append(be.consumerOptions, consumer.WithCapabilities(consumer.Capabilities{MutatesData: true})) + } + return be, nil } @@ -218,7 +301,8 @@ func (be *baseExporter) send(ctx context.Context, req Request) error { // connectSenders connects the senders in the predefined order. func (be *baseExporter) connectSenders() { - be.queueSender.setNextSender(be.obsrepSender) + be.queueSender.setNextSender(be.batchSender) + be.batchSender.setNextSender(be.obsrepSender) be.obsrepSender.setNextSender(be.retrySender) be.retrySender.setNextSender(be.timeoutSender) } @@ -229,7 +313,12 @@ func (be *baseExporter) Start(ctx context.Context, host component.Host) error { return err } - // If no error then start the queueSender. + // If no error then start the batchSender. + if err := be.batchSender.Start(ctx, host); err != nil { + return err + } + + // Last start the queueSender. return be.queueSender.Start(ctx, host) } @@ -237,6 +326,8 @@ func (be *baseExporter) Shutdown(ctx context.Context) error { return multierr.Combine( // First shutdown the retry sender, so the queue sender can flush the queue without retries. be.retrySender.Shutdown(ctx), + // Then shutdown the batch sender + be.batchSender.Shutdown(ctx), // Then shutdown the queue sender. be.queueSender.Shutdown(ctx), // Last shutdown the wrapped exporter itself. diff --git a/exporter/exporterhelper/common_test.go b/exporter/exporterhelper/common_test.go index e3a584b17b1..e134affeaaa 100644 --- a/exporter/exporterhelper/common_test.go +++ b/exporter/exporterhelper/common_test.go @@ -71,16 +71,15 @@ func TestQueueOptionsWithRequestExporter(t *testing.T) { require.Nil(t, err) require.Nil(t, bs.marshaler) require.Nil(t, bs.unmarshaler) - require.Panics(t, func() { - _, _ = newBaseExporter(exportertest.NewNopCreateSettings(), defaultType, newNoopObsrepSender, - WithRetry(configretry.NewDefaultBackOffConfig()), WithQueue(NewDefaultQueueSettings())) - }) - require.Panics(t, func() { - _, _ = newBaseExporter(exportertest.NewNopCreateSettings(), defaultType, newNoopObsrepSender, - withMarshaler(mockRequestMarshaler), withUnmarshaler(mockRequestUnmarshaler(&mockRequest{})), - WithRetry(configretry.NewDefaultBackOffConfig()), - WithRequestQueue(exporterqueue.NewDefaultConfig(), exporterqueue.NewMemoryQueueFactory[Request]())) - }) + _, err = newBaseExporter(exportertest.NewNopCreateSettings(), defaultType, newNoopObsrepSender, + WithRetry(configretry.NewDefaultBackOffConfig()), WithQueue(NewDefaultQueueSettings())) + require.Error(t, err) + + _, err = newBaseExporter(exportertest.NewNopCreateSettings(), defaultType, newNoopObsrepSender, + withMarshaler(mockRequestMarshaler), withUnmarshaler(mockRequestUnmarshaler(&mockRequest{})), + WithRetry(configretry.NewDefaultBackOffConfig()), + WithRequestQueue(exporterqueue.NewDefaultConfig(), exporterqueue.NewMemoryQueueFactory[Request]())) + require.Error(t, err) } func TestBaseExporterLogging(t *testing.T) { diff --git a/exporter/exporterhelper/logs.go b/exporter/exporterhelper/logs.go index ce70230e321..2706ec7fe92 100644 --- a/exporter/exporterhelper/logs.go +++ b/exporter/exporterhelper/logs.go @@ -82,12 +82,15 @@ func NewLogsExporter( if pusher == nil { return nil, errNilPushLogsData } - logsOpts := []Option{withMarshaler(logsRequestMarshaler), withUnmarshaler(newLogsRequestUnmarshalerFunc(pusher))} + logsOpts := []Option{ + withMarshaler(logsRequestMarshaler), withUnmarshaler(newLogsRequestUnmarshalerFunc(pusher)), + withBatchFuncs(mergeLogs, mergeSplitLogs), + } return NewLogsRequestExporter(ctx, set, requestFromLogs(pusher), append(logsOpts, options...)...) } // RequestFromLogsFunc converts plog.Logs data into a user-defined request. -// This API is at the early stage of development and may change without backward compatibility +// Experimental: This API is at the early stage of development and may change without backward compatibility // until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. type RequestFromLogsFunc func(context.Context, plog.Logs) (Request, error) @@ -99,7 +102,7 @@ func requestFromLogs(pusher consumer.ConsumeLogsFunc) RequestFromLogsFunc { } // NewLogsRequestExporter creates new logs exporter based on custom LogsConverter and RequestSender. -// This API is at the early stage of development and may change without backward compatibility +// Experimental: This API is at the early stage of development and may change without backward compatibility // until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. func NewLogsRequestExporter( _ context.Context, diff --git a/exporter/exporterhelper/logs_batch.go b/exporter/exporterhelper/logs_batch.go new file mode 100644 index 00000000000..296538bc0e0 --- /dev/null +++ b/exporter/exporterhelper/logs_batch.go @@ -0,0 +1,137 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package exporterhelper // import "go.opentelemetry.io/collector/exporter/exporterhelper" + +import ( + "context" + "errors" + + "go.opentelemetry.io/collector/exporter/exporterbatcher" + "go.opentelemetry.io/collector/pdata/plog" +) + +// mergeLogs merges two logs requests into one. +func mergeLogs(_ context.Context, r1 Request, r2 Request) (Request, error) { + lr1, ok1 := r1.(*logsRequest) + lr2, ok2 := r2.(*logsRequest) + if !ok1 || !ok2 { + return nil, errors.New("invalid input type") + } + lr2.ld.ResourceLogs().MoveAndAppendTo(lr1.ld.ResourceLogs()) + return lr1, nil +} + +// mergeSplitLogs splits and/or merges the logs into multiple requests based on the MaxSizeConfig. +func mergeSplitLogs(_ context.Context, cfg exporterbatcher.MaxSizeConfig, r1 Request, r2 Request) ([]Request, error) { + var ( + res []Request + destReq *logsRequest + capacityLeft = cfg.MaxSizeItems + ) + for _, req := range []Request{r1, r2} { + if req == nil { + continue + } + srcReq, ok := req.(*logsRequest) + if !ok { + return nil, errors.New("invalid input type") + } + if srcReq.ld.LogRecordCount() <= capacityLeft { + if destReq == nil { + destReq = srcReq + } else { + srcReq.ld.ResourceLogs().MoveAndAppendTo(destReq.ld.ResourceLogs()) + } + capacityLeft -= destReq.ld.LogRecordCount() + continue + } + + for { + extractedLogs := extractLogs(srcReq.ld, capacityLeft) + if extractedLogs.LogRecordCount() == 0 { + break + } + capacityLeft -= extractedLogs.LogRecordCount() + if destReq == nil { + destReq = &logsRequest{ld: extractedLogs, pusher: srcReq.pusher} + } else { + extractedLogs.ResourceLogs().MoveAndAppendTo(destReq.ld.ResourceLogs()) + } + // Create new batch once capacity is reached. + if capacityLeft == 0 { + res = append(res, destReq) + destReq = nil + capacityLeft = cfg.MaxSizeItems + } + } + } + + if destReq != nil { + res = append(res, destReq) + } + return res, nil +} + +// extractLogs extracts logs from the input logs and returns a new logs with the specified number of log records. +func extractLogs(srcLogs plog.Logs, count int) plog.Logs { + destLogs := plog.NewLogs() + srcLogs.ResourceLogs().RemoveIf(func(srcRL plog.ResourceLogs) bool { + if count == 0 { + return false + } + needToExtract := resourceLogsCount(srcRL) > count + if needToExtract { + srcRL = extractResourceLogs(srcRL, count) + } + count -= resourceLogsCount(srcRL) + srcRL.MoveTo(destLogs.ResourceLogs().AppendEmpty()) + return !needToExtract + }) + return destLogs +} + +// extractResourceLogs extracts resource logs and returns a new resource logs with the specified number of log records. +func extractResourceLogs(srcRL plog.ResourceLogs, count int) plog.ResourceLogs { + destRL := plog.NewResourceLogs() + destRL.SetSchemaUrl(srcRL.SchemaUrl()) + srcRL.Resource().CopyTo(destRL.Resource()) + srcRL.ScopeLogs().RemoveIf(func(srcSL plog.ScopeLogs) bool { + if count == 0 { + return false + } + needToExtract := srcSL.LogRecords().Len() > count + if needToExtract { + srcSL = extractScopeLogs(srcSL, count) + } + count -= srcSL.LogRecords().Len() + srcSL.MoveTo(destRL.ScopeLogs().AppendEmpty()) + return !needToExtract + }) + return destRL +} + +// extractScopeLogs extracts scope logs and returns a new scope logs with the specified number of log records. +func extractScopeLogs(srcSL plog.ScopeLogs, count int) plog.ScopeLogs { + destSL := plog.NewScopeLogs() + destSL.SetSchemaUrl(srcSL.SchemaUrl()) + srcSL.Scope().CopyTo(destSL.Scope()) + srcSL.LogRecords().RemoveIf(func(srcLR plog.LogRecord) bool { + if count == 0 { + return false + } + srcLR.MoveTo(destSL.LogRecords().AppendEmpty()) + count-- + return true + }) + return destSL +} + +// resourceLogsCount calculates the total number of log records in the plog.ResourceLogs. +func resourceLogsCount(rl plog.ResourceLogs) int { + count := 0 + for k := 0; k < rl.ScopeLogs().Len(); k++ { + count += rl.ScopeLogs().At(k).LogRecords().Len() + } + return count +} diff --git a/exporter/exporterhelper/logs_batch_test.go b/exporter/exporterhelper/logs_batch_test.go new file mode 100644 index 00000000000..72255ff551e --- /dev/null +++ b/exporter/exporterhelper/logs_batch_test.go @@ -0,0 +1,159 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package exporterhelper + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/exporter/exporterbatcher" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/testdata" +) + +func TestMergeLogs(t *testing.T) { + lr1 := &logsRequest{ld: testdata.GenerateLogs(2)} + lr2 := &logsRequest{ld: testdata.GenerateLogs(3)} + res, err := mergeLogs(context.Background(), lr1, lr2) + assert.Nil(t, err) + assert.Equal(t, 5, res.(*logsRequest).ld.LogRecordCount()) +} + +func TestMergeLogsInvalidInput(t *testing.T) { + lr1 := &tracesRequest{td: testdata.GenerateTraces(2)} + lr2 := &logsRequest{ld: testdata.GenerateLogs(3)} + _, err := mergeLogs(context.Background(), lr1, lr2) + assert.Error(t, err) +} + +func TestMergeSplitLogs(t *testing.T) { + tests := []struct { + name string + cfg exporterbatcher.MaxSizeConfig + lr1 Request + lr2 Request + expected []*logsRequest + }{ + { + name: "both_requests_empty", + cfg: exporterbatcher.MaxSizeConfig{MaxSizeItems: 10}, + lr1: &logsRequest{ld: plog.NewLogs()}, + lr2: &logsRequest{ld: plog.NewLogs()}, + expected: []*logsRequest{{ld: plog.NewLogs()}}, + }, + { + name: "both_requests_nil", + cfg: exporterbatcher.MaxSizeConfig{MaxSizeItems: 10}, + lr1: nil, + lr2: nil, + expected: []*logsRequest{}, + }, + { + name: "first_request_empty", + cfg: exporterbatcher.MaxSizeConfig{MaxSizeItems: 10}, + lr1: &logsRequest{ld: plog.NewLogs()}, + lr2: &logsRequest{ld: testdata.GenerateLogs(5)}, + expected: []*logsRequest{{ld: testdata.GenerateLogs(5)}}, + }, + { + name: "first_requests_nil", + cfg: exporterbatcher.MaxSizeConfig{MaxSizeItems: 10}, + lr1: nil, + lr2: &logsRequest{ld: testdata.GenerateLogs(5)}, + expected: []*logsRequest{{ld: testdata.GenerateLogs(5)}}, + }, + { + name: "first_nil_second_empty", + cfg: exporterbatcher.MaxSizeConfig{MaxSizeItems: 10}, + lr1: nil, + lr2: &logsRequest{ld: plog.NewLogs()}, + expected: []*logsRequest{{ld: plog.NewLogs()}}, + }, + { + name: "merge_only", + cfg: exporterbatcher.MaxSizeConfig{MaxSizeItems: 10}, + lr1: &logsRequest{ld: testdata.GenerateLogs(4)}, + lr2: &logsRequest{ld: testdata.GenerateLogs(6)}, + expected: []*logsRequest{{ld: func() plog.Logs { + logs := testdata.GenerateLogs(4) + testdata.GenerateLogs(6).ResourceLogs().MoveAndAppendTo(logs.ResourceLogs()) + return logs + }()}}, + }, + { + name: "split_only", + cfg: exporterbatcher.MaxSizeConfig{MaxSizeItems: 4}, + lr1: nil, + lr2: &logsRequest{ld: testdata.GenerateLogs(10)}, + expected: []*logsRequest{ + {ld: testdata.GenerateLogs(4)}, + {ld: testdata.GenerateLogs(4)}, + {ld: testdata.GenerateLogs(2)}, + }, + }, + { + name: "merge_and_split", + cfg: exporterbatcher.MaxSizeConfig{MaxSizeItems: 10}, + lr1: &logsRequest{ld: testdata.GenerateLogs(8)}, + lr2: &logsRequest{ld: testdata.GenerateLogs(20)}, + expected: []*logsRequest{ + {ld: func() plog.Logs { + logs := testdata.GenerateLogs(8) + testdata.GenerateLogs(2).ResourceLogs().MoveAndAppendTo(logs.ResourceLogs()) + return logs + }()}, + {ld: testdata.GenerateLogs(10)}, + {ld: testdata.GenerateLogs(8)}, + }, + }, + { + name: "scope_logs_split", + cfg: exporterbatcher.MaxSizeConfig{MaxSizeItems: 4}, + lr1: &logsRequest{ld: func() plog.Logs { + ld := testdata.GenerateLogs(4) + ld.ResourceLogs().At(0).ScopeLogs().AppendEmpty().LogRecords().AppendEmpty().Body().SetStr("extra log") + return ld + }()}, + lr2: &logsRequest{ld: testdata.GenerateLogs(2)}, + expected: []*logsRequest{ + {ld: testdata.GenerateLogs(4)}, + {ld: func() plog.Logs { + ld := testdata.GenerateLogs(0) + ld.ResourceLogs().At(0).ScopeLogs().At(0).LogRecords().AppendEmpty().Body().SetStr("extra log") + testdata.GenerateLogs(2).ResourceLogs().MoveAndAppendTo(ld.ResourceLogs()) + return ld + }()}, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + res, err := mergeSplitLogs(context.Background(), tt.cfg, tt.lr1, tt.lr2) + assert.Nil(t, err) + assert.Equal(t, len(tt.expected), len(res)) + for i, r := range res { + assert.Equal(t, tt.expected[i], r.(*logsRequest)) + } + }) + + } +} + +func TestMergeSplitLogsInvalidInput(t *testing.T) { + r1 := &tracesRequest{td: testdata.GenerateTraces(2)} + r2 := &logsRequest{ld: testdata.GenerateLogs(3)} + _, err := mergeSplitLogs(context.Background(), exporterbatcher.MaxSizeConfig{}, r1, r2) + assert.Error(t, err) +} + +func TestExtractLogs(t *testing.T) { + for i := 0; i < 10; i++ { + ld := testdata.GenerateLogs(10) + extractedLogs := extractLogs(ld, i) + assert.Equal(t, i, extractedLogs.LogRecordCount()) + assert.Equal(t, 10-i, ld.LogRecordCount()) + } +} diff --git a/exporter/exporterhelper/logs_test.go b/exporter/exporterhelper/logs_test.go index e42af577b2c..827a383e279 100644 --- a/exporter/exporterhelper/logs_test.go +++ b/exporter/exporterhelper/logs_test.go @@ -28,8 +28,8 @@ import ( "go.opentelemetry.io/collector/exporter/exportertest" "go.opentelemetry.io/collector/exporter/internal/queue" "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/testdata" ) const ( diff --git a/exporter/exporterhelper/metrics.go b/exporter/exporterhelper/metrics.go index ab7d65dae65..83db18229dd 100644 --- a/exporter/exporterhelper/metrics.go +++ b/exporter/exporterhelper/metrics.go @@ -82,12 +82,15 @@ func NewMetricsExporter( if pusher == nil { return nil, errNilPushMetricsData } - metricsOpts := []Option{withMarshaler(metricsRequestMarshaler), withUnmarshaler(newMetricsRequestUnmarshalerFunc(pusher))} + metricsOpts := []Option{ + withMarshaler(metricsRequestMarshaler), withUnmarshaler(newMetricsRequestUnmarshalerFunc(pusher)), + withBatchFuncs(mergeMetrics, mergeSplitMetrics), + } return NewMetricsRequestExporter(ctx, set, requestFromMetrics(pusher), append(metricsOpts, options...)...) } // RequestFromMetricsFunc converts pdata.Metrics into a user-defined request. -// This API is at the early stage of development and may change without backward compatibility +// Experimental: This API is at the early stage of development and may change without backward compatibility // until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. type RequestFromMetricsFunc func(context.Context, pmetric.Metrics) (Request, error) @@ -99,7 +102,7 @@ func requestFromMetrics(pusher consumer.ConsumeMetricsFunc) RequestFromMetricsFu } // NewMetricsRequestExporter creates a new metrics exporter based on a custom MetricsConverter and RequestSender. -// This API is at the early stage of development and may change without backward compatibility +// Experimental: This API is at the early stage of development and may change without backward compatibility // until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. func NewMetricsRequestExporter( _ context.Context, diff --git a/exporter/exporterhelper/metrics_batch.go b/exporter/exporterhelper/metrics_batch.go new file mode 100644 index 00000000000..1a6448c8496 --- /dev/null +++ b/exporter/exporterhelper/metrics_batch.go @@ -0,0 +1,236 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package exporterhelper // import "go.opentelemetry.io/collector/exporter/exporterhelper" + +import ( + "context" + "errors" + + "go.opentelemetry.io/collector/exporter/exporterbatcher" + "go.opentelemetry.io/collector/pdata/pmetric" +) + +// mergeMetrics merges two metrics requests into one. +func mergeMetrics(_ context.Context, r1 Request, r2 Request) (Request, error) { + mr1, ok1 := r1.(*metricsRequest) + mr2, ok2 := r2.(*metricsRequest) + if !ok1 || !ok2 { + return nil, errors.New("invalid input type") + } + mr2.md.ResourceMetrics().MoveAndAppendTo(mr1.md.ResourceMetrics()) + return mr1, nil +} + +// mergeSplitMetrics splits and/or merges the metrics into multiple requests based on the MaxSizeConfig. +func mergeSplitMetrics(_ context.Context, cfg exporterbatcher.MaxSizeConfig, r1 Request, r2 Request) ([]Request, error) { + var ( + res []Request + destReq *metricsRequest + capacityLeft = cfg.MaxSizeItems + ) + for _, req := range []Request{r1, r2} { + if req == nil { + continue + } + srcReq, ok := req.(*metricsRequest) + if !ok { + return nil, errors.New("invalid input type") + } + if srcReq.md.DataPointCount() <= capacityLeft { + if destReq == nil { + destReq = srcReq + } else { + srcReq.md.ResourceMetrics().MoveAndAppendTo(destReq.md.ResourceMetrics()) + } + capacityLeft -= destReq.md.DataPointCount() + continue + } + + for { + extractedMetrics := extractMetrics(srcReq.md, capacityLeft) + if extractedMetrics.DataPointCount() == 0 { + break + } + capacityLeft -= extractedMetrics.DataPointCount() + if destReq == nil { + destReq = &metricsRequest{md: extractedMetrics, pusher: srcReq.pusher} + } else { + extractedMetrics.ResourceMetrics().MoveAndAppendTo(destReq.md.ResourceMetrics()) + } + // Create new batch once capacity is reached. + if capacityLeft == 0 { + res = append(res, destReq) + destReq = nil + capacityLeft = cfg.MaxSizeItems + } + } + } + + if destReq != nil { + res = append(res, destReq) + } + + return res, nil +} + +// extractMetrics extracts metrics from srcMetrics until count of data points is reached. +func extractMetrics(srcMetrics pmetric.Metrics, count int) pmetric.Metrics { + destMetrics := pmetric.NewMetrics() + srcMetrics.ResourceMetrics().RemoveIf(func(srcRM pmetric.ResourceMetrics) bool { + if count == 0 { + return false + } + needToExtract := resourceDataPointsCount(srcRM) > count + if needToExtract { + srcRM = extractResourceMetrics(srcRM, count) + } + count -= resourceDataPointsCount(srcRM) + srcRM.MoveTo(destMetrics.ResourceMetrics().AppendEmpty()) + return !needToExtract + }) + return destMetrics +} + +// extractResourceMetrics extracts resource metrics and returns a new resource metrics with the specified number of data points. +func extractResourceMetrics(srcRM pmetric.ResourceMetrics, count int) pmetric.ResourceMetrics { + destRM := pmetric.NewResourceMetrics() + destRM.SetSchemaUrl(srcRM.SchemaUrl()) + srcRM.Resource().CopyTo(destRM.Resource()) + srcRM.ScopeMetrics().RemoveIf(func(srcSM pmetric.ScopeMetrics) bool { + if count == 0 { + return false + } + needToExtract := scopeDataPointsCount(srcSM) > count + if needToExtract { + srcSM = extractScopeMetrics(srcSM, count) + } + count -= scopeDataPointsCount(srcSM) + srcSM.MoveTo(destRM.ScopeMetrics().AppendEmpty()) + return !needToExtract + }) + return destRM +} + +// extractScopeMetrics extracts scope metrics and returns a new scope metrics with the specified number of data points. +func extractScopeMetrics(srcSM pmetric.ScopeMetrics, count int) pmetric.ScopeMetrics { + destSM := pmetric.NewScopeMetrics() + destSM.SetSchemaUrl(srcSM.SchemaUrl()) + srcSM.Scope().CopyTo(destSM.Scope()) + srcSM.Metrics().RemoveIf(func(srcMetric pmetric.Metric) bool { + if count == 0 { + return false + } + needToExtract := metricDataPointCount(srcMetric) > count + if needToExtract { + srcMetric = extractMetricDataPoints(srcMetric, count) + } + count -= metricDataPointCount(srcMetric) + srcMetric.MoveTo(destSM.Metrics().AppendEmpty()) + return !needToExtract + }) + return destSM +} + +func extractMetricDataPoints(srcMetric pmetric.Metric, count int) pmetric.Metric { + destMetric := pmetric.NewMetric() + switch srcMetric.Type() { + case pmetric.MetricTypeGauge: + extractGaugeDataPoints(srcMetric.Gauge(), count, destMetric.SetEmptyGauge()) + case pmetric.MetricTypeSum: + extractSumDataPoints(srcMetric.Sum(), count, destMetric.SetEmptySum()) + case pmetric.MetricTypeHistogram: + extractHistogramDataPoints(srcMetric.Histogram(), count, destMetric.SetEmptyHistogram()) + case pmetric.MetricTypeExponentialHistogram: + extractExponentialHistogramDataPoints(srcMetric.ExponentialHistogram(), count, + destMetric.SetEmptyExponentialHistogram()) + case pmetric.MetricTypeSummary: + extractSummaryDataPoints(srcMetric.Summary(), count, destMetric.SetEmptySummary()) + } + return destMetric +} + +func extractGaugeDataPoints(srcGauge pmetric.Gauge, count int, destGauge pmetric.Gauge) { + srcGauge.DataPoints().RemoveIf(func(srcDP pmetric.NumberDataPoint) bool { + if count == 0 { + return false + } + srcDP.MoveTo(destGauge.DataPoints().AppendEmpty()) + count-- + return true + }) +} + +func extractSumDataPoints(srcSum pmetric.Sum, count int, destSum pmetric.Sum) { + srcSum.DataPoints().RemoveIf(func(srcDP pmetric.NumberDataPoint) bool { + if count == 0 { + return false + } + srcDP.MoveTo(destSum.DataPoints().AppendEmpty()) + count-- + return true + }) +} + +func extractHistogramDataPoints(srcHistogram pmetric.Histogram, count int, destHistogram pmetric.Histogram) { + srcHistogram.DataPoints().RemoveIf(func(srcDP pmetric.HistogramDataPoint) bool { + if count == 0 { + return false + } + srcDP.MoveTo(destHistogram.DataPoints().AppendEmpty()) + count-- + return true + }) +} + +func extractExponentialHistogramDataPoints(srcExponentialHistogram pmetric.ExponentialHistogram, count int, destExponentialHistogram pmetric.ExponentialHistogram) { + srcExponentialHistogram.DataPoints().RemoveIf(func(srcDP pmetric.ExponentialHistogramDataPoint) bool { + if count == 0 { + return false + } + srcDP.MoveTo(destExponentialHistogram.DataPoints().AppendEmpty()) + count-- + return true + }) +} + +func extractSummaryDataPoints(srcSummary pmetric.Summary, count int, destSummary pmetric.Summary) { + srcSummary.DataPoints().RemoveIf(func(srcDP pmetric.SummaryDataPoint) bool { + if count == 0 { + return false + } + srcDP.MoveTo(destSummary.DataPoints().AppendEmpty()) + count-- + return true + }) +} + +func resourceDataPointsCount(rm pmetric.ResourceMetrics) (count int) { + for i := 0; i < rm.ScopeMetrics().Len(); i++ { + count += scopeDataPointsCount(rm.ScopeMetrics().At(i)) + } + return count +} + +func scopeDataPointsCount(sm pmetric.ScopeMetrics) (count int) { + for i := 0; i < sm.Metrics().Len(); i++ { + count += metricDataPointCount(sm.Metrics().At(i)) + } + return count +} + +func metricDataPointCount(m pmetric.Metric) int { + switch m.Type() { + case pmetric.MetricTypeGauge: + return m.Gauge().DataPoints().Len() + case pmetric.MetricTypeSum: + return m.Sum().DataPoints().Len() + case pmetric.MetricTypeHistogram: + return m.Histogram().DataPoints().Len() + case pmetric.MetricTypeExponentialHistogram: + return m.ExponentialHistogram().DataPoints().Len() + case pmetric.MetricTypeSummary: + return m.Summary().DataPoints().Len() + } + return 0 +} diff --git a/exporter/exporterhelper/metrics_batch_test.go b/exporter/exporterhelper/metrics_batch_test.go new file mode 100644 index 00000000000..9a5bc9815a9 --- /dev/null +++ b/exporter/exporterhelper/metrics_batch_test.go @@ -0,0 +1,166 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package exporterhelper + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/exporter/exporterbatcher" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/testdata" +) + +func TestMergeMetrics(t *testing.T) { + mr1 := &metricsRequest{md: testdata.GenerateMetrics(2)} + mr2 := &metricsRequest{md: testdata.GenerateMetrics(3)} + res, err := mergeMetrics(context.Background(), mr1, mr2) + assert.Nil(t, err) + assert.Equal(t, 5, res.(*metricsRequest).md.MetricCount()) +} + +func TestMergeMetricsInvalidInput(t *testing.T) { + mr1 := &tracesRequest{td: testdata.GenerateTraces(2)} + mr2 := &metricsRequest{md: testdata.GenerateMetrics(3)} + _, err := mergeMetrics(context.Background(), mr1, mr2) + assert.Error(t, err) +} + +func TestMergeSplitMetrics(t *testing.T) { + tests := []struct { + name string + cfg exporterbatcher.MaxSizeConfig + mr1 Request + mr2 Request + expected []*metricsRequest + }{ + { + name: "both_requests_empty", + cfg: exporterbatcher.MaxSizeConfig{MaxSizeItems: 10}, + mr1: &metricsRequest{md: pmetric.NewMetrics()}, + mr2: &metricsRequest{md: pmetric.NewMetrics()}, + expected: []*metricsRequest{{md: pmetric.NewMetrics()}}, + }, + { + name: "both_requests_nil", + cfg: exporterbatcher.MaxSizeConfig{MaxSizeItems: 10}, + mr1: nil, + mr2: nil, + expected: []*metricsRequest{}, + }, + { + name: "first_request_empty", + cfg: exporterbatcher.MaxSizeConfig{MaxSizeItems: 10}, + mr1: &metricsRequest{md: pmetric.NewMetrics()}, + mr2: &metricsRequest{md: testdata.GenerateMetrics(5)}, + expected: []*metricsRequest{{md: testdata.GenerateMetrics(5)}}, + }, + { + name: "first_requests_nil", + cfg: exporterbatcher.MaxSizeConfig{MaxSizeItems: 10}, + mr1: nil, + mr2: &metricsRequest{md: testdata.GenerateMetrics(5)}, + expected: []*metricsRequest{{md: testdata.GenerateMetrics(5)}}, + }, + { + name: "first_nil_second_empty", + cfg: exporterbatcher.MaxSizeConfig{MaxSizeItems: 10}, + mr1: nil, + mr2: &metricsRequest{md: pmetric.NewMetrics()}, + expected: []*metricsRequest{{md: pmetric.NewMetrics()}}, + }, + { + name: "merge_only", + cfg: exporterbatcher.MaxSizeConfig{MaxSizeItems: 60}, + mr1: &metricsRequest{md: testdata.GenerateMetrics(10)}, + mr2: &metricsRequest{md: testdata.GenerateMetrics(14)}, + expected: []*metricsRequest{{md: func() pmetric.Metrics { + metrics := testdata.GenerateMetrics(10) + testdata.GenerateMetrics(14).ResourceMetrics().MoveAndAppendTo(metrics.ResourceMetrics()) + return metrics + }()}}, + }, + { + name: "split_only", + cfg: exporterbatcher.MaxSizeConfig{MaxSizeItems: 14}, + mr1: nil, + mr2: &metricsRequest{md: testdata.GenerateMetrics(15)}, // 15 metrics, 30 data points + expected: []*metricsRequest{ + {md: testdata.GenerateMetrics(7)}, // 7 metrics, 14 data points + {md: testdata.GenerateMetrics(7)}, // 7 metrics, 14 data points + {md: testdata.GenerateMetrics(1)}, // 1 metric, 2 data points + }, + }, + { + name: "split_and_merge", + cfg: exporterbatcher.MaxSizeConfig{MaxSizeItems: 28}, + mr1: &metricsRequest{md: testdata.GenerateMetrics(7)}, // 7 metrics, 14 data points + mr2: &metricsRequest{md: testdata.GenerateMetrics(25)}, // 25 metrics, 50 data points + expected: []*metricsRequest{ + {md: func() pmetric.Metrics { + metrics := testdata.GenerateMetrics(7) + testdata.GenerateMetrics(7).ResourceMetrics().MoveAndAppendTo(metrics.ResourceMetrics()) + return metrics + }()}, + {md: testdata.GenerateMetrics(14)}, // 14 metrics, 28 data points + {md: testdata.GenerateMetrics(4)}, // 4 metrics, 8 data points + }, + }, + { + name: "scope_metrics_split", + cfg: exporterbatcher.MaxSizeConfig{MaxSizeItems: 8}, + mr1: &metricsRequest{md: func() pmetric.Metrics { + md := testdata.GenerateMetrics(4) + extraScopeMetrics := md.ResourceMetrics().At(0).ScopeMetrics().AppendEmpty() + testdata.GenerateMetrics(4).ResourceMetrics().At(0).ScopeMetrics().At(0).MoveTo(extraScopeMetrics) + extraScopeMetrics.Scope().SetName("extra scope") + return md + }()}, + mr2: nil, + expected: []*metricsRequest{ + {md: testdata.GenerateMetrics(4)}, + {md: func() pmetric.Metrics { + md := testdata.GenerateMetrics(4) + md.ResourceMetrics().At(0).ScopeMetrics().At(0).Scope().SetName("extra scope") + return md + }()}, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + res, err := mergeSplitMetrics(context.Background(), tt.cfg, tt.mr1, tt.mr2) + assert.Nil(t, err) + assert.Equal(t, len(tt.expected), len(res)) + for i := range res { + assert.Equal(t, tt.expected[i], res[i].(*metricsRequest)) + } + }) + } +} + +func TestMergeSplitMetricsInvalidInput(t *testing.T) { + r1 := &tracesRequest{td: testdata.GenerateTraces(2)} + r2 := &metricsRequest{md: testdata.GenerateMetrics(3)} + _, err := mergeSplitMetrics(context.Background(), exporterbatcher.MaxSizeConfig{MaxSizeItems: 10}, r1, r2) + assert.Error(t, err) +} + +func TestExtractMetrics(t *testing.T) { + for i := 0; i < 20; i++ { + md := testdata.GenerateMetrics(10) + extractedMetrics := extractMetrics(md, i) + assert.Equal(t, i, extractedMetrics.DataPointCount()) + assert.Equal(t, 20-i, md.DataPointCount()) + } +} + +func TestExtractMetricsInvalidMetric(t *testing.T) { + md := testdata.GenerateMetricsMetricTypeInvalid() + extractedMetrics := extractMetrics(md, 10) + assert.Equal(t, testdata.GenerateMetricsMetricTypeInvalid(), extractedMetrics) + assert.Equal(t, 0, md.ResourceMetrics().Len()) +} diff --git a/exporter/exporterhelper/metrics_test.go b/exporter/exporterhelper/metrics_test.go index ddbefeb71f2..6ae88c4feaf 100644 --- a/exporter/exporterhelper/metrics_test.go +++ b/exporter/exporterhelper/metrics_test.go @@ -28,8 +28,8 @@ import ( "go.opentelemetry.io/collector/exporter/exportertest" "go.opentelemetry.io/collector/exporter/internal/queue" "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/testdata" ) const ( diff --git a/exporter/exporterhelper/obsexporter.go b/exporter/exporterhelper/obsexporter.go index f42c0195f49..ed490144242 100644 --- a/exporter/exporterhelper/obsexporter.go +++ b/exporter/exporterhelper/obsexporter.go @@ -20,7 +20,7 @@ import ( ) const ( - exporterScope = obsmetrics.Scope + obsmetrics.NameSep + obsmetrics.ExporterKey + exporterScope = obsmetrics.Scope + obsmetrics.SpanNameSep + obsmetrics.ExporterKey ) // ObsReport is a helper to add observability to an exporter. @@ -78,55 +78,55 @@ func (or *ObsReport) createOtelMetrics(cfg ObsReportSettings) error { var errors, err error or.sentSpans, err = meter.Int64Counter( - obsmetrics.ExporterPrefix+obsmetrics.SentSpansKey, + obsmetrics.ExporterMetricPrefix+obsmetrics.SentSpansKey, metric.WithDescription("Number of spans successfully sent to destination."), metric.WithUnit("1")) errors = multierr.Append(errors, err) or.failedToSendSpans, err = meter.Int64Counter( - obsmetrics.ExporterPrefix+obsmetrics.FailedToSendSpansKey, + obsmetrics.ExporterMetricPrefix+obsmetrics.FailedToSendSpansKey, metric.WithDescription("Number of spans in failed attempts to send to destination."), metric.WithUnit("1")) errors = multierr.Append(errors, err) or.failedToEnqueueSpans, err = meter.Int64Counter( - obsmetrics.ExporterPrefix+obsmetrics.FailedToEnqueueSpansKey, + obsmetrics.ExporterMetricPrefix+obsmetrics.FailedToEnqueueSpansKey, metric.WithDescription("Number of spans failed to be added to the sending queue."), metric.WithUnit("1")) errors = multierr.Append(errors, err) or.sentMetricPoints, err = meter.Int64Counter( - obsmetrics.ExporterPrefix+obsmetrics.SentMetricPointsKey, + obsmetrics.ExporterMetricPrefix+obsmetrics.SentMetricPointsKey, metric.WithDescription("Number of metric points successfully sent to destination."), metric.WithUnit("1")) errors = multierr.Append(errors, err) or.failedToSendMetricPoints, err = meter.Int64Counter( - obsmetrics.ExporterPrefix+obsmetrics.FailedToSendMetricPointsKey, + obsmetrics.ExporterMetricPrefix+obsmetrics.FailedToSendMetricPointsKey, metric.WithDescription("Number of metric points in failed attempts to send to destination."), metric.WithUnit("1")) errors = multierr.Append(errors, err) or.failedToEnqueueMetricPoints, err = meter.Int64Counter( - obsmetrics.ExporterPrefix+obsmetrics.FailedToEnqueueMetricPointsKey, + obsmetrics.ExporterMetricPrefix+obsmetrics.FailedToEnqueueMetricPointsKey, metric.WithDescription("Number of metric points failed to be added to the sending queue."), metric.WithUnit("1")) errors = multierr.Append(errors, err) or.sentLogRecords, err = meter.Int64Counter( - obsmetrics.ExporterPrefix+obsmetrics.SentLogRecordsKey, + obsmetrics.ExporterMetricPrefix+obsmetrics.SentLogRecordsKey, metric.WithDescription("Number of log record successfully sent to destination."), metric.WithUnit("1")) errors = multierr.Append(errors, err) or.failedToSendLogRecords, err = meter.Int64Counter( - obsmetrics.ExporterPrefix+obsmetrics.FailedToSendLogRecordsKey, + obsmetrics.ExporterMetricPrefix+obsmetrics.FailedToSendLogRecordsKey, metric.WithDescription("Number of log records in failed attempts to send to destination."), metric.WithUnit("1")) errors = multierr.Append(errors, err) or.failedToEnqueueLogRecords, err = meter.Int64Counter( - obsmetrics.ExporterPrefix+obsmetrics.FailedToEnqueueLogRecordsKey, + obsmetrics.ExporterMetricPrefix+obsmetrics.FailedToEnqueueLogRecordsKey, metric.WithDescription("Number of log records failed to be added to the sending queue."), metric.WithUnit("1")) errors = multierr.Append(errors, err) diff --git a/exporter/exporterhelper/queue_sender.go b/exporter/exporterhelper/queue_sender.go index 3092c60c98f..3e539d7f9a0 100644 --- a/exporter/exporterhelper/queue_sender.go +++ b/exporter/exporterhelper/queue_sender.go @@ -31,7 +31,9 @@ var ( type QueueSettings struct { // Enabled indicates whether to not enqueue batches before sending to the consumerSender. Enabled bool `mapstructure:"enabled"` - // NumConsumers is the number of consumers from the queue. + // NumConsumers is the number of consumers from the queue. Defaults to 10. + // If batching is enabled, a combined batch cannot contain more requests than the number of consumers. + // So it's recommended to set higher number of consumers if batching is enabled. NumConsumers int `mapstructure:"num_consumers"` // QueueSize is the maximum number of batches allowed in queue at a given time. QueueSize int `mapstructure:"queue_size"` @@ -73,6 +75,7 @@ type queueSender struct { baseRequestSender fullName string queue exporterqueue.Queue[Request] + numConsumers int traceAttribute attribute.KeyValue logger *zap.Logger meter otelmetric.Meter @@ -87,6 +90,7 @@ func newQueueSender(q exporterqueue.Queue[Request], set exporter.CreateSettings, qs := &queueSender{ fullName: set.ID.String(), queue: q, + numConsumers: numConsumers, traceAttribute: attribute.String(obsmetrics.ExporterKey, set.ID.String()), logger: set.TelemetrySettings.Logger, meter: set.TelemetrySettings.MeterProvider.Meter(scopeName), diff --git a/exporter/exporterhelper/request.go b/exporter/exporterhelper/request.go index 03276f9c19e..fa6856d385a 100644 --- a/exporter/exporterhelper/request.go +++ b/exporter/exporterhelper/request.go @@ -8,7 +8,7 @@ import ( ) // Request represents a single request that can be sent to an external endpoint. -// This API is at the early stage of development and may change without backward compatibility +// Experimental: This API is at the early stage of development and may change without backward compatibility // until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. type Request interface { // Export exports the request to an external endpoint. @@ -23,7 +23,7 @@ type Request interface { // temporary failures. For example, if some items failed to process and can be retried, this interface allows to // return a new Request that contains the items left to be sent. Otherwise, the original Request should be returned. // If not implemented, the original Request will be returned assuming the error is applied to the whole Request. -// This API is at the early stage of development and may change without backward compatibility +// Experimental: This API is at the early stage of development and may change without backward compatibility // until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. type RequestErrorHandler interface { Request @@ -33,10 +33,12 @@ type RequestErrorHandler interface { } // RequestMarshaler is a function that can marshal a Request into bytes. +// // Deprecated: [v0.94.0] Use exporterqueue.Marshaler[Request] instead. type RequestMarshaler func(req Request) ([]byte, error) // RequestUnmarshaler is a function that can unmarshal bytes into a Request. +// // Deprecated: [v0.94.0] Use exporterqueue.Unmarshaler[Request] instead. type RequestUnmarshaler func(data []byte) (Request, error) diff --git a/exporter/exporterhelper/request_test.go b/exporter/exporterhelper/request_test.go index 18e8228f946..fe373c67e12 100644 --- a/exporter/exporterhelper/request_test.go +++ b/exporter/exporterhelper/request_test.go @@ -5,25 +5,117 @@ package exporterhelper import ( "context" + "sync/atomic" + "time" + "go.opentelemetry.io/collector/exporter/exporterbatcher" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" ) +type fakeRequestSink struct { + requestsCount *atomic.Uint64 + itemsCount *atomic.Uint64 +} + +func newFakeRequestSink() *fakeRequestSink { + return &fakeRequestSink{ + requestsCount: &atomic.Uint64{}, + itemsCount: &atomic.Uint64{}, + } +} + type fakeRequest struct { - items int - err error + items int + exportErr error + mergeErr error + delay time.Duration + sink *fakeRequestSink } -func (r fakeRequest) Export(context.Context) error { - return r.err +func (r *fakeRequest) Export(ctx context.Context) error { + select { + case <-ctx.Done(): + return ctx.Err() + case <-time.After(r.delay): + } + if r.exportErr != nil { + return r.exportErr + } + if r.sink != nil { + r.sink.requestsCount.Add(1) + r.sink.itemsCount.Add(uint64(r.items)) + } + return nil } -func (r fakeRequest) ItemsCount() int { +func (r *fakeRequest) ItemsCount() int { return r.items } +func fakeBatchMergeFunc(_ context.Context, r1 Request, r2 Request) (Request, error) { + if r1 == nil { + return r2, nil + } + fr1 := r1.(*fakeRequest) + fr2 := r2.(*fakeRequest) + if fr2.mergeErr != nil { + return nil, fr2.mergeErr + } + return &fakeRequest{ + items: fr1.items + fr2.items, + sink: fr1.sink, + exportErr: fr2.exportErr, + delay: fr1.delay + fr2.delay, + }, nil +} + +func fakeBatchMergeSplitFunc(ctx context.Context, cfg exporterbatcher.MaxSizeConfig, r1 Request, r2 Request) ([]Request, error) { + maxItems := cfg.MaxSizeItems + if maxItems == 0 { + r, err := fakeBatchMergeFunc(ctx, r1, r2) + return []Request{r}, err + } + + if r2.(*fakeRequest).mergeErr != nil { + return nil, r2.(*fakeRequest).mergeErr + } + + fr2 := r2.(*fakeRequest) + fr2 = &fakeRequest{items: fr2.items, sink: fr2.sink, exportErr: fr2.exportErr, delay: fr2.delay} + var res []Request + + // fill fr1 to maxItems if it's not nil + if r1 != nil { + fr1 := r1.(*fakeRequest) + fr1 = &fakeRequest{items: fr1.items, sink: fr1.sink, exportErr: fr1.exportErr, delay: fr1.delay} + if fr2.items <= maxItems-fr1.items { + fr1.items += fr2.items + if fr2.exportErr != nil { + fr1.exportErr = fr2.exportErr + } + return []Request{fr1}, nil + } + // if split is needed, we don't propagate exportErr from fr2 to fr1 to test more cases + fr2.items -= maxItems - fr1.items + fr1.items = maxItems + res = append(res, fr1) + } + + // split fr2 to maxItems + for { + if fr2.items <= maxItems { + res = append(res, &fakeRequest{items: fr2.items, sink: fr2.sink, exportErr: fr2.exportErr, delay: fr2.delay}) + break + } + res = append(res, &fakeRequest{items: maxItems, sink: fr2.sink, exportErr: fr2.exportErr, delay: fr2.delay}) + fr2.items -= maxItems + } + + return res, nil +} + type fakeRequestConverter struct { metricsError error tracesError error @@ -32,13 +124,13 @@ type fakeRequestConverter struct { } func (frc *fakeRequestConverter) requestFromMetricsFunc(_ context.Context, md pmetric.Metrics) (Request, error) { - return fakeRequest{items: md.DataPointCount(), err: frc.requestError}, frc.metricsError + return &fakeRequest{items: md.DataPointCount(), exportErr: frc.requestError}, frc.metricsError } func (frc *fakeRequestConverter) requestFromTracesFunc(_ context.Context, md ptrace.Traces) (Request, error) { - return fakeRequest{items: md.SpanCount(), err: frc.requestError}, frc.tracesError + return &fakeRequest{items: md.SpanCount(), exportErr: frc.requestError}, frc.tracesError } func (frc *fakeRequestConverter) requestFromLogsFunc(_ context.Context, md plog.Logs) (Request, error) { - return fakeRequest{items: md.LogRecordCount(), err: frc.requestError}, frc.logsError + return &fakeRequest{items: md.LogRecordCount(), exportErr: frc.requestError}, frc.logsError } diff --git a/exporter/exporterhelper/retry_sender_test.go b/exporter/exporterhelper/retry_sender_test.go index 96b4904f372..d3863097326 100644 --- a/exporter/exporterhelper/retry_sender_test.go +++ b/exporter/exporterhelper/retry_sender_test.go @@ -22,7 +22,7 @@ import ( "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/exporter/exporterqueue" "go.opentelemetry.io/collector/exporter/exportertest" - "go.opentelemetry.io/collector/internal/testdata" + "go.opentelemetry.io/collector/pdata/testdata" ) func mockRequestUnmarshaler(mr Request) exporterqueue.Unmarshaler[Request] { diff --git a/exporter/exporterhelper/traces.go b/exporter/exporterhelper/traces.go index 778c0d63989..6f5f39f3de5 100644 --- a/exporter/exporterhelper/traces.go +++ b/exporter/exporterhelper/traces.go @@ -82,12 +82,15 @@ func NewTracesExporter( if pusher == nil { return nil, errNilPushTraceData } - tracesOpts := []Option{withMarshaler(tracesRequestMarshaler), withUnmarshaler(newTraceRequestUnmarshalerFunc(pusher))} + tracesOpts := []Option{ + withMarshaler(tracesRequestMarshaler), withUnmarshaler(newTraceRequestUnmarshalerFunc(pusher)), + withBatchFuncs(mergeTraces, mergeSplitTraces), + } return NewTracesRequestExporter(ctx, set, requestFromTraces(pusher), append(tracesOpts, options...)...) } // RequestFromTracesFunc converts ptrace.Traces into a user-defined Request. -// This API is at the early stage of development and may change without backward compatibility +// Experimental: This API is at the early stage of development and may change without backward compatibility // until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. type RequestFromTracesFunc func(context.Context, ptrace.Traces) (Request, error) @@ -99,7 +102,7 @@ func requestFromTraces(pusher consumer.ConsumeTracesFunc) RequestFromTracesFunc } // NewTracesRequestExporter creates a new traces exporter based on a custom TracesConverter and RequestSender. -// This API is at the early stage of development and may change without backward compatibility +// Experimental: This API is at the early stage of development and may change without backward compatibility // until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. func NewTracesRequestExporter( _ context.Context, diff --git a/exporter/exporterhelper/traces_batch.go b/exporter/exporterhelper/traces_batch.go new file mode 100644 index 00000000000..1bdada95b7b --- /dev/null +++ b/exporter/exporterhelper/traces_batch.go @@ -0,0 +1,139 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package exporterhelper // import "go.opentelemetry.io/collector/exporter/exporterhelper" + +import ( + "context" + "errors" + + "go.opentelemetry.io/collector/exporter/exporterbatcher" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +// mergeTraces merges two traces requests into one. +func mergeTraces(_ context.Context, r1 Request, r2 Request) (Request, error) { + tr1, ok1 := r1.(*tracesRequest) + tr2, ok2 := r2.(*tracesRequest) + if !ok1 || !ok2 { + return nil, errors.New("invalid input type") + } + tr2.td.ResourceSpans().MoveAndAppendTo(tr1.td.ResourceSpans()) + return tr1, nil +} + +// mergeSplitTraces splits and/or merges the traces into multiple requests based on the MaxSizeConfig. +func mergeSplitTraces(_ context.Context, cfg exporterbatcher.MaxSizeConfig, r1 Request, r2 Request) ([]Request, error) { + var ( + res []Request + destReq *tracesRequest + capacityLeft = cfg.MaxSizeItems + ) + for _, req := range []Request{r1, r2} { + if req == nil { + continue + } + srcReq, ok := req.(*tracesRequest) + if !ok { + return nil, errors.New("invalid input type") + } + if srcReq.td.SpanCount() <= capacityLeft { + if destReq == nil { + destReq = srcReq + } else { + srcReq.td.ResourceSpans().MoveAndAppendTo(destReq.td.ResourceSpans()) + } + capacityLeft -= destReq.td.SpanCount() + continue + } + + for { + extractedTraces := extractTraces(srcReq.td, capacityLeft) + if extractedTraces.SpanCount() == 0 { + break + } + capacityLeft -= extractedTraces.SpanCount() + if destReq == nil { + destReq = &tracesRequest{td: extractedTraces, pusher: srcReq.pusher} + } else { + extractedTraces.ResourceSpans().MoveAndAppendTo(destReq.td.ResourceSpans()) + } + // Create new batch once capacity is reached. + if capacityLeft == 0 { + res = append(res, destReq) + destReq = nil + capacityLeft = cfg.MaxSizeItems + } + } + } + + if destReq != nil { + res = append(res, destReq) + } + return res, nil +} + +// extractTraces extracts a new traces with a maximum number of spans. +func extractTraces(srcTraces ptrace.Traces, count int) ptrace.Traces { + destTraces := ptrace.NewTraces() + srcTraces.ResourceSpans().RemoveIf(func(srcRS ptrace.ResourceSpans) bool { + if count == 0 { + return false + } + needToExtract := resourceTracesCount(srcRS) > count + if needToExtract { + srcRS = extractResourceSpans(srcRS, count) + } + count -= resourceTracesCount(srcRS) + srcRS.MoveTo(destTraces.ResourceSpans().AppendEmpty()) + return !needToExtract + }) + return destTraces +} + +// extractResourceSpans extracts spans and returns a new resource spans with the specified number of spans. +func extractResourceSpans(srcRS ptrace.ResourceSpans, count int) ptrace.ResourceSpans { + destRS := ptrace.NewResourceSpans() + destRS.SetSchemaUrl(srcRS.SchemaUrl()) + srcRS.Resource().CopyTo(destRS.Resource()) + srcRS.ScopeSpans().RemoveIf(func(srcSS ptrace.ScopeSpans) bool { + if count == 0 { + return false + } + needToExtract := srcSS.Spans().Len() > count + if needToExtract { + srcSS = extractScopeSpans(srcSS, count) + } + count -= srcSS.Spans().Len() + srcSS.MoveTo(destRS.ScopeSpans().AppendEmpty()) + return !needToExtract + }) + srcRS.Resource().CopyTo(destRS.Resource()) + return destRS +} + +// extractScopeSpans extracts spans and returns a new scope spans with the specified number of spans. +func extractScopeSpans(srcSS ptrace.ScopeSpans, count int) ptrace.ScopeSpans { + destSS := ptrace.NewScopeSpans() + destSS.SetSchemaUrl(srcSS.SchemaUrl()) + srcSS.Scope().CopyTo(destSS.Scope()) + srcSS.Spans().RemoveIf(func(srcSpan ptrace.Span) bool { + if count == 0 { + return false + } + srcSpan.MoveTo(destSS.Spans().AppendEmpty()) + count-- + return true + }) + return destSS +} + +// resourceTracesCount calculates the total number of spans in the pdata.ResourceSpans. +func resourceTracesCount(rs ptrace.ResourceSpans) int { + count := 0 + rs.ScopeSpans().RemoveIf(func(ss ptrace.ScopeSpans) bool { + count += ss.Spans().Len() + return false + }) + return count +} diff --git a/exporter/exporterhelper/traces_batch_test.go b/exporter/exporterhelper/traces_batch_test.go new file mode 100644 index 00000000000..5779b731b63 --- /dev/null +++ b/exporter/exporterhelper/traces_batch_test.go @@ -0,0 +1,159 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package exporterhelper + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/exporter/exporterbatcher" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/testdata" +) + +func TestMergeTraces(t *testing.T) { + tr1 := &tracesRequest{td: testdata.GenerateTraces(2)} + tr2 := &tracesRequest{td: testdata.GenerateTraces(3)} + res, err := mergeTraces(context.Background(), tr1, tr2) + assert.Nil(t, err) + assert.Equal(t, 5, res.(*tracesRequest).td.SpanCount()) +} + +func TestMergeTracesInvalidInput(t *testing.T) { + tr1 := &logsRequest{ld: testdata.GenerateLogs(2)} + tr2 := &tracesRequest{td: testdata.GenerateTraces(3)} + _, err := mergeTraces(context.Background(), tr1, tr2) + assert.Error(t, err) +} + +func TestMergeSplitTraces(t *testing.T) { + tests := []struct { + name string + cfg exporterbatcher.MaxSizeConfig + tr1 Request + tr2 Request + expected []*tracesRequest + }{ + { + name: "both_requests_empty", + cfg: exporterbatcher.MaxSizeConfig{MaxSizeItems: 10}, + tr1: &tracesRequest{td: ptrace.NewTraces()}, + tr2: &tracesRequest{td: ptrace.NewTraces()}, + expected: []*tracesRequest{{td: ptrace.NewTraces()}}, + }, + { + name: "both_requests_nil", + cfg: exporterbatcher.MaxSizeConfig{MaxSizeItems: 10}, + tr1: nil, + tr2: nil, + expected: []*tracesRequest{}, + }, + { + name: "first_request_empty", + cfg: exporterbatcher.MaxSizeConfig{MaxSizeItems: 10}, + tr1: &tracesRequest{td: ptrace.NewTraces()}, + tr2: &tracesRequest{td: testdata.GenerateTraces(5)}, + expected: []*tracesRequest{{td: testdata.GenerateTraces(5)}}, + }, + { + name: "second_request_empty", + cfg: exporterbatcher.MaxSizeConfig{MaxSizeItems: 10}, + tr1: &tracesRequest{td: testdata.GenerateTraces(5)}, + tr2: &tracesRequest{td: ptrace.NewTraces()}, + expected: []*tracesRequest{{td: testdata.GenerateTraces(5)}}, + }, + { + name: "first_nil_second_empty", + cfg: exporterbatcher.MaxSizeConfig{MaxSizeItems: 10}, + tr1: nil, + tr2: &tracesRequest{td: ptrace.NewTraces()}, + expected: []*tracesRequest{{td: ptrace.NewTraces()}}, + }, + { + name: "merge_only", + cfg: exporterbatcher.MaxSizeConfig{MaxSizeItems: 10}, + tr1: &tracesRequest{td: testdata.GenerateTraces(5)}, + tr2: &tracesRequest{td: testdata.GenerateTraces(5)}, + expected: []*tracesRequest{{td: func() ptrace.Traces { + td := testdata.GenerateTraces(5) + testdata.GenerateTraces(5).ResourceSpans().MoveAndAppendTo(td.ResourceSpans()) + return td + }()}}, + }, + { + name: "split_only", + cfg: exporterbatcher.MaxSizeConfig{MaxSizeItems: 4}, + tr1: nil, + tr2: &tracesRequest{td: testdata.GenerateTraces(10)}, + expected: []*tracesRequest{ + {td: testdata.GenerateTraces(4)}, + {td: testdata.GenerateTraces(4)}, + {td: testdata.GenerateTraces(2)}, + }, + }, + { + name: "split_and_merge", + cfg: exporterbatcher.MaxSizeConfig{MaxSizeItems: 10}, + tr1: &tracesRequest{td: testdata.GenerateTraces(4)}, + tr2: &tracesRequest{td: testdata.GenerateTraces(20)}, + expected: []*tracesRequest{ + {td: func() ptrace.Traces { + td := testdata.GenerateTraces(4) + testdata.GenerateTraces(6).ResourceSpans().MoveAndAppendTo(td.ResourceSpans()) + return td + }()}, + {td: testdata.GenerateTraces(10)}, + {td: testdata.GenerateTraces(4)}, + }, + }, + { + name: "scope_spans_split", + cfg: exporterbatcher.MaxSizeConfig{MaxSizeItems: 10}, + tr1: &tracesRequest{td: func() ptrace.Traces { + td := testdata.GenerateTraces(10) + extraScopeTraces := testdata.GenerateTraces(5) + extraScopeTraces.ResourceSpans().At(0).ScopeSpans().At(0).Scope().SetName("extra scope") + extraScopeTraces.ResourceSpans().MoveAndAppendTo(td.ResourceSpans()) + return td + }()}, + tr2: nil, + expected: []*tracesRequest{ + {td: testdata.GenerateTraces(10)}, + {td: func() ptrace.Traces { + td := testdata.GenerateTraces(5) + td.ResourceSpans().At(0).ScopeSpans().At(0).Scope().SetName("extra scope") + return td + }()}, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + res, err := mergeSplitTraces(context.Background(), tt.cfg, tt.tr1, tt.tr2) + assert.Nil(t, err) + assert.Equal(t, len(tt.expected), len(res)) + for i := range res { + assert.Equal(t, tt.expected[i], res[i].(*tracesRequest)) + } + }) + } +} + +func TestMergeSplitTracesInvalidInput(t *testing.T) { + r1 := &tracesRequest{td: testdata.GenerateTraces(2)} + r2 := &metricsRequest{md: testdata.GenerateMetrics(3)} + _, err := mergeSplitTraces(context.Background(), exporterbatcher.MaxSizeConfig{MaxSizeItems: 10}, r1, r2) + assert.Error(t, err) +} + +func TestExtractTraces(t *testing.T) { + for i := 0; i < 10; i++ { + td := testdata.GenerateTraces(10) + extractedTraces := extractTraces(td, i) + assert.Equal(t, i, extractedTraces.SpanCount()) + assert.Equal(t, 10-i, td.SpanCount()) + } +} diff --git a/exporter/exporterhelper/traces_test.go b/exporter/exporterhelper/traces_test.go index 0c8bec25f5f..42810bc8bb1 100644 --- a/exporter/exporterhelper/traces_test.go +++ b/exporter/exporterhelper/traces_test.go @@ -28,8 +28,8 @@ import ( "go.opentelemetry.io/collector/exporter/exportertest" "go.opentelemetry.io/collector/exporter/internal/queue" "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/testdata" ) const ( diff --git a/exporter/exporterqueue/config.go b/exporter/exporterqueue/config.go index ac888a0c227..fcc0e0e57b1 100644 --- a/exporter/exporterqueue/config.go +++ b/exporter/exporterqueue/config.go @@ -11,7 +11,7 @@ import ( // Config defines configuration for queueing requests before exporting. // It's supposed to be used with the new exporter helpers New[Traces|Metrics|Logs]RequestExporter. -// This API is at the early stage of development and may change without backward compatibility +// Experimental: This API is at the early stage of development and may change without backward compatibility // until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. type Config struct { // Enabled indicates whether to not enqueue batches before exporting. @@ -23,7 +23,7 @@ type Config struct { } // NewDefaultConfig returns the default Config. -// This API is at the early stage of development and may change without backward compatibility +// Experimental: This API is at the early stage of development and may change without backward compatibility // until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. func NewDefaultConfig() Config { return Config{ @@ -51,7 +51,7 @@ func (qCfg *Config) Validate() error { // The struct is provided to be added in the exporter configuration as one struct under the "sending_queue" key. // The exporter helper Go interface requires the fields to be provided separately to WithRequestQueue and // NewPersistentQueueFactory. -// This API is at the early stage of development and may change without backward compatibility +// Experimental: This API is at the early stage of development and may change without backward compatibility // until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. type PersistentQueueConfig struct { Config `mapstructure:",squash"` diff --git a/exporter/exporterqueue/queue.go b/exporter/exporterqueue/queue.go index 556dce9f9c2..5b568851b66 100644 --- a/exporter/exporterqueue/queue.go +++ b/exporter/exporterqueue/queue.go @@ -11,9 +11,14 @@ import ( "go.opentelemetry.io/collector/exporter/internal/queue" ) +// ErrQueueIsFull is the error that Queue returns when full. +// Experimental: This API is at the early stage of development and may change without backward compatibility +// until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. +var ErrQueueIsFull = queue.ErrQueueIsFull + // Queue defines a producer-consumer exchange which can be backed by e.g. the memory-based ring buffer queue // (boundedMemoryQueue) or via a disk-based queue (persistentQueue) -// This API is at the early stage of development and may change without backward compatibility +// Experimental: This API is at the early stage of development and may change without backward compatibility // until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. type Queue[T any] queue.Queue[T] @@ -24,22 +29,22 @@ type Settings struct { } // Marshaler is a function that can marshal a request into bytes. -// This API is at the early stage of development and may change without backward compatibility +// Experimental: This API is at the early stage of development and may change without backward compatibility // until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. type Marshaler[T any] func(T) ([]byte, error) // Unmarshaler is a function that can unmarshal bytes into a request. -// This API is at the early stage of development and may change without backward compatibility +// Experimental: This API is at the early stage of development and may change without backward compatibility // until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. type Unmarshaler[T any] func([]byte) (T, error) // Factory is a function that creates a new queue. -// This API is at the early stage of development and may change without backward compatibility +// Experimental: This API is at the early stage of development and may change without backward compatibility // until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. type Factory[T any] func(context.Context, Settings, Config) Queue[T] // NewMemoryQueueFactory returns a factory to create a new memory queue. -// This API is at the early stage of development and may change without backward compatibility +// Experimental: This API is at the early stage of development and may change without backward compatibility // until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. func NewMemoryQueueFactory[T itemsCounter]() Factory[T] { return func(_ context.Context, _ Settings, cfg Config) Queue[T] { @@ -51,7 +56,7 @@ func NewMemoryQueueFactory[T itemsCounter]() Factory[T] { } // PersistentQueueSettings defines developer settings for the persistent queue factory. -// This API is at the early stage of development and may change without backward compatibility +// Experimental: This API is at the early stage of development and may change without backward compatibility // until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. type PersistentQueueSettings[T any] struct { // Marshaler is used to serialize queue elements before storing them in the persistent storage. @@ -62,7 +67,7 @@ type PersistentQueueSettings[T any] struct { // NewPersistentQueueFactory returns a factory to create a new persistent queue. // If cfg.StorageID is nil then it falls back to memory queue. -// This API is at the early stage of development and may change without backward compatibility +// Experimental: This API is at the early stage of development and may change without backward compatibility // until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. func NewPersistentQueueFactory[T itemsCounter](storageID *component.ID, factorySettings PersistentQueueSettings[T]) Factory[T] { if storageID == nil { @@ -90,7 +95,7 @@ func sizerFromConfig[T itemsCounter](Config) queue.Sizer[T] { return &queue.RequestSizer[T]{} } -func capacityFromConfig(cfg Config) int { +func capacityFromConfig(cfg Config) int64 { // TODO: Handle other ways to measure the queue size once they are added. - return cfg.QueueSize + return int64(cfg.QueueSize) } diff --git a/exporter/exportertest/nop_exporter.go b/exporter/exportertest/nop_exporter.go index e7e9f350331..6589d867bec 100644 --- a/exporter/exportertest/nop_exporter.go +++ b/exporter/exportertest/nop_exporter.go @@ -6,6 +6,8 @@ package exportertest // import "go.opentelemetry.io/collector/exporter/exportert import ( "context" + "github.com/google/uuid" + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/consumer/consumertest" @@ -17,7 +19,7 @@ var nopType = component.MustNewType("nop") // NewNopCreateSettings returns a new nop settings for Create*Exporter functions. func NewNopCreateSettings() exporter.CreateSettings { return exporter.CreateSettings{ - ID: component.NewID(nopType), + ID: component.NewIDWithName(nopType, uuid.NewString()), TelemetrySettings: componenttest.NewNopTelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo(), } diff --git a/exporter/go.mod b/exporter/go.mod index e353c8a8bd8..47b4d59cfe9 100644 --- a/exporter/go.mod +++ b/exporter/go.mod @@ -3,25 +3,27 @@ module go.opentelemetry.io/collector/exporter go 1.21 require ( - github.com/cenkalti/backoff/v4 v4.2.1 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.96.0 - go.opentelemetry.io/collector/component v0.96.0 - go.opentelemetry.io/collector/config/configretry v0.96.0 - go.opentelemetry.io/collector/config/configtelemetry v0.96.0 - go.opentelemetry.io/collector/consumer v0.96.0 - go.opentelemetry.io/collector/extension v0.96.0 - go.opentelemetry.io/collector/pdata v1.3.0 - go.opentelemetry.io/collector/receiver v0.96.0 - go.opentelemetry.io/otel v1.24.0 - go.opentelemetry.io/otel/metric v1.24.0 - go.opentelemetry.io/otel/sdk v1.24.0 - go.opentelemetry.io/otel/trace v1.24.0 + github.com/cenkalti/backoff/v4 v4.3.0 + github.com/google/uuid v1.6.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector v0.100.0 + go.opentelemetry.io/collector/component v0.100.0 + go.opentelemetry.io/collector/config/configretry v0.100.0 + go.opentelemetry.io/collector/config/configtelemetry v0.100.0 + go.opentelemetry.io/collector/consumer v0.100.0 + go.opentelemetry.io/collector/extension v0.100.0 + go.opentelemetry.io/collector/pdata v1.7.0 + go.opentelemetry.io/collector/pdata/testdata v0.100.0 + go.opentelemetry.io/collector/receiver v0.100.0 + go.opentelemetry.io/otel v1.26.0 + go.opentelemetry.io/otel/metric v1.26.0 + go.opentelemetry.io/otel/sdk v1.26.0 + go.opentelemetry.io/otel/trace v1.26.0 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 - golang.org/x/sys v0.17.0 - google.golang.org/grpc v1.62.0 + golang.org/x/sys v0.19.0 + google.golang.org/grpc v1.63.2 ) require ( @@ -32,27 +34,26 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.19.0 // indirect - github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector/confmap v0.96.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect - golang.org/x/net v0.21.0 // indirect + go.opentelemetry.io/collector/confmap v0.100.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + golang.org/x/net v0.24.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/protobuf v1.34.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -70,6 +71,8 @@ replace go.opentelemetry.io/collector/featuregate => ../featuregate replace go.opentelemetry.io/collector/pdata => ../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../pdata/testdata + replace go.opentelemetry.io/collector/receiver => ../receiver retract v0.76.0 // Depends on retracted pdata v1.0.0-rc10 module diff --git a/exporter/go.sum b/exporter/go.sum index dbdb92fd3bb..7bbf6704ff6 100644 --- a/exporter/go.sum +++ b/exporter/go.sum @@ -1,7 +1,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -16,13 +16,11 @@ github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsM github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +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/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -31,8 +29,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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= @@ -50,32 +48,32 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= -go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -91,16 +89,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -113,14 +111,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/exporter/internal/common/logging_exporter.go b/exporter/internal/common/logging_exporter.go index 026018465f4..1d34f1f5620 100644 --- a/exporter/internal/common/logging_exporter.go +++ b/exporter/internal/common/logging_exporter.go @@ -1,6 +1,10 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +// NOTE: If you are making changes to this file, consider whether you want to make similar changes +// to the Debug exporter in /exporter/debugexporter/exporter.go, which has similar logic. +// This is especially important for security issues. + package common // import "go.opentelemetry.io/collector/exporter/internal/common" import ( diff --git a/exporter/internal/common/logging_exporter_test.go b/exporter/internal/common/logging_exporter_test.go index e087b52cd1a..763f649daba 100644 --- a/exporter/internal/common/logging_exporter_test.go +++ b/exporter/internal/common/logging_exporter_test.go @@ -13,10 +13,10 @@ import ( "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/exporter/exportertest" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestLoggingTracesExporterNoErrors(t *testing.T) { diff --git a/exporter/internal/otlptext/logs_test.go b/exporter/internal/otlptext/logs_test.go index 1055c30d2d2..a1d15676d1a 100644 --- a/exporter/internal/otlptext/logs_test.go +++ b/exporter/internal/otlptext/logs_test.go @@ -13,9 +13,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestLogsText(t *testing.T) { diff --git a/exporter/internal/otlptext/metrics_test.go b/exporter/internal/otlptext/metrics_test.go index 989b65b399e..b2772b17953 100644 --- a/exporter/internal/otlptext/metrics_test.go +++ b/exporter/internal/otlptext/metrics_test.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestMetricsText(t *testing.T) { diff --git a/exporter/internal/otlptext/traces_test.go b/exporter/internal/otlptext/traces_test.go index f3a7fdad6ab..2c4b69280a1 100644 --- a/exporter/internal/otlptext/traces_test.go +++ b/exporter/internal/otlptext/traces_test.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestTracesText(t *testing.T) { diff --git a/exporter/internal/queue/bounded_memory_queue.go b/exporter/internal/queue/bounded_memory_queue.go index 9f85e8496bf..98e1b281176 100644 --- a/exporter/internal/queue/bounded_memory_queue.go +++ b/exporter/internal/queue/bounded_memory_queue.go @@ -16,43 +16,38 @@ import ( // the producer are dropped. type boundedMemoryQueue[T any] struct { component.StartFunc - *queueCapacityLimiter[T] - items chan queueRequest[T] + *sizedChannel[memQueueEl[T]] + sizer Sizer[T] } // MemoryQueueSettings defines internal parameters for boundedMemoryQueue creation. type MemoryQueueSettings[T any] struct { Sizer Sizer[T] - Capacity int + Capacity int64 } // NewBoundedMemoryQueue constructs the new queue of specified capacity, and with an optional // callback for dropped items (e.g. useful to emit metrics). func NewBoundedMemoryQueue[T any](set MemoryQueueSettings[T]) Queue[T] { return &boundedMemoryQueue[T]{ - queueCapacityLimiter: newQueueCapacityLimiter[T](set.Sizer, set.Capacity), - items: make(chan queueRequest[T], set.Capacity), + sizedChannel: newSizedChannel[memQueueEl[T]](set.Capacity, nil, 0), + sizer: set.Sizer, } } // Offer is used by the producer to submit new item to the queue. Calling this method on a stopped queue will panic. func (q *boundedMemoryQueue[T]) Offer(ctx context.Context, req T) error { - if !q.queueCapacityLimiter.claim(req) { - return ErrQueueIsFull - } - q.items <- queueRequest[T]{ctx: ctx, req: req} - return nil + return q.sizedChannel.push(memQueueEl[T]{ctx: ctx, req: req}, q.sizer.Sizeof(req), nil) } // Consume applies the provided function on the head of queue. // The call blocks until there is an item available or the queue is stopped. // The function returns true when an item is consumed or false if the queue is stopped and emptied. func (q *boundedMemoryQueue[T]) Consume(consumeFunc func(context.Context, T) error) bool { - item, ok := <-q.items + item, ok := q.sizedChannel.pop(func(el memQueueEl[T]) int64 { return q.sizer.Sizeof(el.req) }) if !ok { return false } - q.queueCapacityLimiter.release(item.req) // the memory queue doesn't handle consume errors _ = consumeFunc(item.ctx, item.req) return true @@ -60,11 +55,11 @@ func (q *boundedMemoryQueue[T]) Consume(consumeFunc func(context.Context, T) err // Shutdown closes the queue channel to initiate draining of the queue. func (q *boundedMemoryQueue[T]) Shutdown(context.Context) error { - close(q.items) + q.sizedChannel.shutdown() return nil } -type queueRequest[T any] struct { +type memQueueEl[T any] struct { req T ctx context.Context } diff --git a/exporter/internal/queue/bounded_memory_queue_test.go b/exporter/internal/queue/bounded_memory_queue_test.go index d861893eda9..ae98dca41f1 100644 --- a/exporter/internal/queue/bounded_memory_queue_test.go +++ b/exporter/internal/queue/bounded_memory_queue_test.go @@ -133,7 +133,7 @@ func benchmarkQueueUsage(b *testing.B, sizer Sizer[fakeReq], requestsCount int) func queueUsage(tb testing.TB, sizer Sizer[fakeReq], requestsCount int) { var wg sync.WaitGroup wg.Add(requestsCount) - q := NewBoundedMemoryQueue[fakeReq](MemoryQueueSettings[fakeReq]{Sizer: sizer, Capacity: 10 * requestsCount}) + q := NewBoundedMemoryQueue[fakeReq](MemoryQueueSettings[fakeReq]{Sizer: sizer, Capacity: int64(10 * requestsCount)}) consumers := NewQueueConsumers(q, 1, func(context.Context, fakeReq) error { wg.Done() return nil @@ -156,3 +156,11 @@ func TestZeroSizeNoConsumers(t *testing.T) { assert.NoError(t, q.Shutdown(context.Background())) } + +type fakeReq struct { + itemsCount int +} + +func (r fakeReq) ItemsCount() int { + return r.itemsCount +} diff --git a/exporter/internal/queue/persistent_queue.go b/exporter/internal/queue/persistent_queue.go index b6e5d2be4dd..07b0d1fb628 100644 --- a/exporter/internal/queue/persistent_queue.go +++ b/exporter/internal/queue/persistent_queue.go @@ -10,7 +10,6 @@ import ( "fmt" "strconv" "sync" - "sync/atomic" "go.uber.org/multierr" "go.uber.org/zap" @@ -44,7 +43,10 @@ import ( // index index x // xxxx deleted type persistentQueue[T any] struct { - *queueCapacityLimiter[T] + // sizedChannel is used by the persistent queue for two purposes: + // 1. a communication channel notifying the consumer that a new item is available. + // 2. capacity control based on the size of the items. + *sizedChannel[permanentQueueEl] set PersistentQueueSettings[T] logger *zap.Logger @@ -53,14 +55,10 @@ type persistentQueue[T any] struct { // isRequestSized indicates whether the queue is sized by the number of requests. isRequestSized bool - putChan chan struct{} - // mu guards everything declared below. mu sync.Mutex readIndex uint64 writeIndex uint64 - initIndexSize uint64 - initQueueSize *atomic.Uint64 currentlyDispatchedItems []uint64 refClient int64 stopped bool @@ -86,7 +84,7 @@ var ( type PersistentQueueSettings[T any] struct { Sizer Sizer[T] - Capacity int + Capacity int64 DataType component.DataType StorageID component.ID Marshaler func(req T) ([]byte, error) @@ -98,12 +96,9 @@ type PersistentQueueSettings[T any] struct { func NewPersistentQueue[T any](set PersistentQueueSettings[T]) Queue[T] { _, isRequestSized := set.Sizer.(*RequestSizer[T]) return &persistentQueue[T]{ - queueCapacityLimiter: newQueueCapacityLimiter[T](set.Sizer, set.Capacity), - set: set, - logger: set.ExporterSettings.Logger, - initQueueSize: &atomic.Uint64{}, - isRequestSized: isRequestSized, - putChan: make(chan struct{}, set.Capacity), + set: set, + logger: set.ExporterSettings.Logger, + isRequestSized: isRequestSized, } } @@ -148,39 +143,49 @@ func (pq *persistentQueue[T]) initPersistentContiguousStorage(ctx context.Contex pq.readIndex = 0 pq.writeIndex = 0 } - pq.initIndexSize = pq.writeIndex - pq.readIndex - // Ensure the communication channel has the same size as the queue - for i := 0; i < int(pq.initIndexSize); i++ { - pq.putChan <- struct{}{} - } + initIndexSize := pq.writeIndex - pq.readIndex + + var ( + initEls []permanentQueueEl + initQueueSize uint64 + ) - // Read snapshot of the queue size from storage. It's not a problem if the value cannot be fetched, - // or it's not accurate. The queue size will be corrected once the recovered queue is drained. - if pq.initIndexSize > 0 { + // Pre-allocate the communication channel with the size of the restored queue. + if initIndexSize > 0 { + initQueueSize = initIndexSize // If the queue is sized by the number of requests, no need to read the queue size from storage. - if pq.isRequestSized { - pq.initQueueSize.Store(pq.initIndexSize) - return + if !pq.isRequestSized { + if restoredQueueSize, err := pq.restoreQueueSizeFromStorage(ctx); err == nil { + initQueueSize = restoredQueueSize + } } - res, err := pq.client.Get(ctx, queueSizeKey) - if err == nil { - var restoredQueueSize uint64 - restoredQueueSize, err = bytesToItemIndex(res) - pq.initQueueSize.Store(restoredQueueSize) - } - if err != nil { - if errors.Is(err, errValueNotSet) { - pq.logger.Warn("Cannot read the queue size snapshot from storage. "+ - "The reported queue size will be inaccurate until the initial queue is drained. "+ - "It's expected when the items sized queue enabled for the first time", zap.Error(err)) - } else { - pq.logger.Error("Failed to read the queue size snapshot from storage. "+ - "The reported queue size will be inaccurate until the initial queue is drained.", zap.Error(err)) - } + // Ensure the communication channel filled with evenly sized elements up to the total restored queue size. + initEls = make([]permanentQueueEl, initIndexSize) + } + + pq.sizedChannel = newSizedChannel[permanentQueueEl](pq.set.Capacity, initEls, int64(initQueueSize)) +} + +// permanentQueueEl is the type of the elements passed to the sizedChannel by the persistentQueue. +type permanentQueueEl struct{} + +// restoreQueueSizeFromStorage restores the queue size from storage. +func (pq *persistentQueue[T]) restoreQueueSizeFromStorage(ctx context.Context) (uint64, error) { + val, err := pq.client.Get(ctx, queueSizeKey) + if err != nil { + if errors.Is(err, errValueNotSet) { + pq.logger.Warn("Cannot read the queue size snapshot from storage. "+ + "The reported queue size will be inaccurate until the initial queue is drained. "+ + "It's expected when the items sized queue enabled for the first time", zap.Error(err)) + } else { + pq.logger.Error("Failed to read the queue size snapshot from storage. "+ + "The reported queue size will be inaccurate until the initial queue is drained.", zap.Error(err)) } + return 0, err } + return bytesToItemIndex(val) } // Consume applies the provided function on the head of queue. @@ -188,14 +193,24 @@ func (pq *persistentQueue[T]) initPersistentContiguousStorage(ctx context.Contex // The function returns true when an item is consumed or false if the queue is stopped. func (pq *persistentQueue[T]) Consume(consumeFunc func(context.Context, T) error) bool { for { + var ( + req T + onProcessingFinished func(error) + consumed bool + ) + // If we are stopped we still process all the other events in the channel before, but we // return fast in the `getNextItem`, so we will free the channel fast and get to the stop. - _, ok := <-pq.putChan + _, ok := pq.sizedChannel.pop(func(permanentQueueEl) int64 { + req, onProcessingFinished, consumed = pq.getNextItem(context.Background()) + if !consumed { + return 0 + } + return pq.set.Sizer.Sizeof(req) + }) if !ok { return false } - - req, onProcessingFinished, consumed := pq.getNextItem(context.Background()) if consumed { onProcessingFinished(consumeFunc(context.Background(), req)) return true @@ -203,31 +218,24 @@ func (pq *persistentQueue[T]) Consume(consumeFunc func(context.Context, T) error } } -// Size returns the current size of the queue. -func (pq *persistentQueue[T]) Size() int { - return int(pq.initQueueSize.Load()) + pq.queueCapacityLimiter.Size() -} - func (pq *persistentQueue[T]) Shutdown(ctx context.Context) error { - close(pq.putChan) + // If the queue is not initialized, there is nothing to shut down. + if pq.client == nil { + return nil + } + pq.mu.Lock() defer pq.mu.Unlock() + backupErr := pq.backupQueueSize(ctx) + pq.sizedChannel.shutdown() // Mark this queue as stopped, so consumer don't start any more work. pq.stopped = true - return multierr.Combine( - pq.backupQueueSize(ctx), - pq.unrefClient(ctx), - ) + return multierr.Combine(backupErr, pq.unrefClient(ctx)) } // backupQueueSize writes the current queue size to storage. The value is used to recover the queue size // in case if the collector is killed. func (pq *persistentQueue[T]) backupQueueSize(ctx context.Context) error { - // Client can be nil if the queue is not initialized yet. - if pq.client == nil { - return nil - } - // No need to write the queue size if the queue is sized by the number of requests. // That information is already stored as difference between read and write indexes. if pq.isRequestSized { @@ -258,34 +266,31 @@ func (pq *persistentQueue[T]) Offer(ctx context.Context, req T) error { // putInternal is the internal version that requires caller to hold the mutex lock. func (pq *persistentQueue[T]) putInternal(ctx context.Context, req T) error { - if !pq.queueCapacityLimiter.claim(req) { - pq.logger.Warn("Maximum queue capacity reached") - return ErrQueueIsFull - } + err := pq.sizedChannel.push(permanentQueueEl{}, pq.set.Sizer.Sizeof(req), func() error { + itemKey := getItemKey(pq.writeIndex) + newIndex := pq.writeIndex + 1 + + reqBuf, err := pq.set.Marshaler(req) + if err != nil { + return err + } - itemKey := getItemKey(pq.writeIndex) - newIndex := pq.writeIndex + 1 + // Carry out a transaction where we both add the item and update the write index + ops := []storage.Operation{ + storage.SetOperation(writeIndexKey, itemIndexToBytes(newIndex)), + storage.SetOperation(itemKey, reqBuf), + } + if storageErr := pq.client.Batch(ctx, ops...); storageErr != nil { + return storageErr + } - reqBuf, err := pq.set.Marshaler(req) + pq.writeIndex = newIndex + return nil + }) if err != nil { - pq.queueCapacityLimiter.release(req) return err } - // Carry out a transaction where we both add the item and update the write index - ops := []storage.Operation{ - storage.SetOperation(writeIndexKey, itemIndexToBytes(newIndex)), - storage.SetOperation(itemKey, reqBuf), - } - if storageErr := pq.client.Batch(ctx, ops...); storageErr != nil { - pq.queueCapacityLimiter.release(req) - return storageErr - } - - pq.writeIndex = newIndex - // Inform the loop that there's some data to process - pq.putChan <- struct{}{} - // Back up the queue size to storage every 10 writes. The stored value is used to recover the queue size // in case if the collector is killed. The recovered queue size is allowed to be inaccurate. if (pq.writeIndex % 10) == 5 { @@ -337,16 +342,6 @@ func (pq *persistentQueue[T]) getNextItem(ctx context.Context) (T, func(error), return request, nil, false } - pq.releaseCapacity(request) - - // Back up the queue size to storage on every 10 reads. The stored value is used to recover the queue size - // in case if the collector is killed. The recovered queue size is allowed to be inaccurate. - if (pq.writeIndex % 10) == 0 { - if qsErr := pq.backupQueueSize(ctx); qsErr != nil { - pq.logger.Error("Error writing queue size to storage", zap.Error(err)) - } - } - // Increase the reference count, so the client is not closed while the request is being processed. // The client cannot be closed because we hold the lock since last we checked `stopped`. pq.refClient++ @@ -371,29 +366,18 @@ func (pq *persistentQueue[T]) getNextItem(ctx context.Context) (T, func(error), pq.logger.Error("Error deleting item from queue", zap.Error(err)) } - }, true -} - -// releaseCapacity releases the capacity of the queue. The caller must hold the mutex. -func (pq *persistentQueue[T]) releaseCapacity(req T) { - // If the recovered queue size is not emptied yet, decrease it first. - if pq.initIndexSize > 0 { - pq.initIndexSize-- - if pq.initIndexSize == 0 { - pq.initQueueSize.Store(0) - return - } - reqSize := pq.queueCapacityLimiter.sizeOf(req) - if pq.initQueueSize.Load() < reqSize { - pq.initQueueSize.Store(0) - return + // Back up the queue size to storage on every 10 reads. The stored value is used to recover the queue size + // in case if the collector is killed. The recovered queue size is allowed to be inaccurate. + if (pq.readIndex % 10) == 0 { + if qsErr := pq.backupQueueSize(ctx); qsErr != nil { + pq.logger.Error("Error writing queue size to storage", zap.Error(err)) + } } - pq.initQueueSize.Add(^(reqSize - 1)) - return - } - // Otherwise, decrease the current queue size. - pq.queueCapacityLimiter.release(req) + // Ensure the used size and the channel size are in sync. + pq.sizedChannel.syncSize() + + }, true } // retrieveAndEnqueueNotDispatchedReqs gets the items for which sending was not finished, cleans the storage diff --git a/exporter/internal/queue/persistent_queue_test.go b/exporter/internal/queue/persistent_queue_test.go index 2b525fa792f..6385088d5b1 100644 --- a/exporter/internal/queue/persistent_queue_test.go +++ b/exporter/internal/queue/persistent_queue_test.go @@ -54,7 +54,7 @@ func (nh *mockHost) GetExtensions() map[component.ID]component.Component { } // createAndStartTestPersistentQueue creates and starts a fake queue with the given capacity and number of consumers. -func createAndStartTestPersistentQueue(t *testing.T, sizer Sizer[tracesRequest], capacity int, numConsumers int, +func createAndStartTestPersistentQueue(t *testing.T, sizer Sizer[tracesRequest], capacity int64, numConsumers int, consumeFunc func(_ context.Context, item tracesRequest) error) Queue[tracesRequest] { pq := NewPersistentQueue[tracesRequest](PersistentQueueSettings[tracesRequest]{ Sizer: sizer, @@ -90,16 +90,16 @@ func createTestPersistentQueueWithClient(client storage.Client) *persistentQueue return pq } -func createTestPersistentQueueWithRequestsCapacity(t testing.TB, ext storage.Extension, capacity int) *persistentQueue[tracesRequest] { +func createTestPersistentQueueWithRequestsCapacity(t testing.TB, ext storage.Extension, capacity int64) *persistentQueue[tracesRequest] { return createTestPersistentQueueWithCapacityLimiter(t, ext, &RequestSizer[tracesRequest]{}, capacity) } -func createTestPersistentQueueWithItemsCapacity(t testing.TB, ext storage.Extension, capacity int) *persistentQueue[tracesRequest] { +func createTestPersistentQueueWithItemsCapacity(t testing.TB, ext storage.Extension, capacity int64) *persistentQueue[tracesRequest] { return createTestPersistentQueueWithCapacityLimiter(t, ext, &ItemsSizer[tracesRequest]{}, capacity) } func createTestPersistentQueueWithCapacityLimiter(t testing.TB, ext storage.Extension, sizer Sizer[tracesRequest], - capacity int) *persistentQueue[tracesRequest] { + capacity int64) *persistentQueue[tracesRequest] { pq := NewPersistentQueue[tracesRequest](PersistentQueueSettings[tracesRequest]{ Sizer: sizer, Capacity: capacity, @@ -117,7 +117,7 @@ func TestPersistentQueue_FullCapacity(t *testing.T) { tests := []struct { name string sizer Sizer[tracesRequest] - capacity int + capacity int64 sizeMultiplier int }{ { @@ -518,8 +518,6 @@ func TestPersistentQueueStartWithNonDispatched(t *testing.T) { require.NoError(t, err) } - // get one item out, but don't mark it as processed - <-ps.putChan require.True(t, ps.Consume(func(context.Context, tracesRequest) error { // put one more item in require.NoError(t, ps.Offer(context.Background(), req)) @@ -847,34 +845,132 @@ func TestPersistentQueue_ItemsCapacityUsageIsNotPreserved(t *testing.T) { newPQ := createTestPersistentQueueWithItemsCapacity(t, ext, 100) - // The queue items size cannot be restored to the previous size. Falls back to 0. - assert.Equal(t, 0, newPQ.Size()) + // The queue items size cannot be restored, fall back to request-based size + assert.Equal(t, 2, newPQ.Size()) assert.NoError(t, newPQ.Offer(context.Background(), newTracesRequest(2, 5))) - // Only new items are reflected - assert.Equal(t, 10, newPQ.Size()) + // Only new items are correctly reflected + assert.Equal(t, 12, newPQ.Size()) - // Consuming old items should does not affect the size. + // Consuming a restored request should reduce the restored size by 20 but it should not go to below zero assert.True(t, newPQ.Consume(func(_ context.Context, traces tracesRequest) error { assert.Equal(t, 20, traces.traces.SpanCount()) return nil })) - assert.Equal(t, 10, newPQ.Size()) + assert.Equal(t, 0, newPQ.Size()) + // Consuming another restored request should not affect the restored size since it's already dropped to 0. assert.True(t, newPQ.Consume(func(_ context.Context, traces tracesRequest) error { assert.Equal(t, 25, traces.traces.SpanCount()) return nil })) - assert.Equal(t, 10, newPQ.Size()) + assert.Equal(t, 0, newPQ.Size()) + + // Adding another batch should update the size accordingly + assert.NoError(t, newPQ.Offer(context.Background(), newTracesRequest(5, 5))) + assert.Equal(t, 25, newPQ.Size()) assert.True(t, newPQ.Consume(func(_ context.Context, traces tracesRequest) error { assert.Equal(t, 10, traces.traces.SpanCount()) return nil })) + assert.Equal(t, 15, newPQ.Size()) + + assert.NoError(t, newPQ.Shutdown(context.Background())) +} + +// This test covers the case when the queue is restarted with the less capacity than needed to restore the queued items. +// In that case, the queue has to be restored anyway even if it exceeds the capacity limit. +func TestPersistentQueue_RequestCapacityLessAfterRestart(t *testing.T) { + ext := NewMockStorageExtension(nil) + pq := createTestPersistentQueueWithRequestsCapacity(t, ext, 100) + + assert.Equal(t, 0, pq.Size()) + + assert.NoError(t, pq.Offer(context.Background(), newTracesRequest(4, 10))) + assert.NoError(t, pq.Offer(context.Background(), newTracesRequest(2, 10))) + assert.NoError(t, pq.Offer(context.Background(), newTracesRequest(5, 5))) + assert.NoError(t, pq.Offer(context.Background(), newTracesRequest(1, 5))) + + // Read the first request just to populate the read index in the storage. + // Otherwise, the write index won't be restored either. + assert.True(t, pq.Consume(func(_ context.Context, traces tracesRequest) error { + assert.Equal(t, 40, traces.traces.SpanCount()) + return nil + })) + assert.Equal(t, 3, pq.Size()) + + assert.NoError(t, pq.Shutdown(context.Background())) + + // The queue is restarted with the less capacity than needed to restore the queued items, but with the same + // underlying storage. No need to drop requests that are over capacity since they are already in the storage. + newPQ := createTestPersistentQueueWithRequestsCapacity(t, ext, 2) + + // The queue items size cannot be restored, fall back to request-based size + assert.Equal(t, 3, newPQ.Size()) + + // Queue is full + assert.Error(t, newPQ.Offer(context.Background(), newTracesRequest(2, 5))) + + assert.True(t, newPQ.Consume(func(_ context.Context, traces tracesRequest) error { + assert.Equal(t, 20, traces.traces.SpanCount()) + return nil + })) + assert.Equal(t, 2, newPQ.Size()) + + // Still full + assert.Error(t, newPQ.Offer(context.Background(), newTracesRequest(2, 5))) + + assert.True(t, newPQ.Consume(func(_ context.Context, traces tracesRequest) error { + assert.Equal(t, 25, traces.traces.SpanCount()) + return nil + })) + assert.Equal(t, 1, newPQ.Size()) + + // Now it can accept new items + assert.NoError(t, newPQ.Offer(context.Background(), newTracesRequest(2, 5))) + + assert.NoError(t, newPQ.Shutdown(context.Background())) +} + +// This test covers the case when the persistent storage is recovered from a snapshot which has +// bigger value for the used size than the size of the actual items in the storage. +func TestPersistentQueue_RestoredUsedSizeIsCorrectedOnDrain(t *testing.T) { + ext := NewMockStorageExtension(nil) + pq := createTestPersistentQueueWithItemsCapacity(t, ext, 1000) + + assert.Equal(t, 0, pq.Size()) + + for i := 0; i < 6; i++ { + assert.NoError(t, pq.Offer(context.Background(), newTracesRequest(2, 5))) + } + assert.Equal(t, 60, pq.Size()) + + // Consume 30 items + for i := 0; i < 3; i++ { + assert.True(t, pq.Consume(func(context.Context, tracesRequest) error { return nil })) + } + // The used size is now 30, but the snapshot should have 50, because it's taken every 5 read/writes. + assert.Equal(t, 30, pq.Size()) + + // Create a new queue pointed to the same storage + newPQ := createTestPersistentQueueWithItemsCapacity(t, ext, 1000) + + // This is an incorrect size restored from the snapshot. + // In reality the size should be 30. Once the queue is drained, it will be updated to the correct size. + assert.Equal(t, 50, newPQ.Size()) + + assert.True(t, newPQ.Consume(func(context.Context, tracesRequest) error { return nil })) + assert.True(t, newPQ.Consume(func(context.Context, tracesRequest) error { return nil })) + assert.Equal(t, 30, newPQ.Size()) + + // Now the size must be correctly reflected + assert.True(t, newPQ.Consume(func(context.Context, tracesRequest) error { return nil })) assert.Equal(t, 0, newPQ.Size()) assert.NoError(t, newPQ.Shutdown(context.Background())) + assert.NoError(t, pq.Shutdown(context.Background())) } func requireCurrentlyDispatchedItemsEqual(t *testing.T, pq *persistentQueue[tracesRequest], compare []uint64) { diff --git a/exporter/internal/queue/queue.go b/exporter/internal/queue/queue.go index 0ae0703b05d..35bc504579e 100644 --- a/exporter/internal/queue/queue.go +++ b/exporter/internal/queue/queue.go @@ -34,3 +34,26 @@ type Queue[T any] interface { // Capacity returns the capacity of the queue. Capacity() int } + +type itemsCounter interface { + ItemsCount() int +} + +// Sizer is an interface that returns the size of the given element. +type Sizer[T any] interface { + Sizeof(T) int64 +} + +// ItemsSizer is a Sizer implementation that returns the size of a queue element as the number of items it contains. +type ItemsSizer[T itemsCounter] struct{} + +func (is *ItemsSizer[T]) Sizeof(el T) int64 { + return int64(el.ItemsCount()) +} + +// RequestSizer is a Sizer implementation that returns the size of a queue element as one request. +type RequestSizer[T any] struct{} + +func (rs *RequestSizer[T]) Sizeof(T) int64 { + return 1 +} diff --git a/exporter/internal/queue/queue_capacity.go b/exporter/internal/queue/queue_capacity.go deleted file mode 100644 index 1995febcd63..00000000000 --- a/exporter/internal/queue/queue_capacity.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package queue // import "go.opentelemetry.io/collector/exporter/internal/queue" - -import ( - "sync/atomic" -) - -type itemsCounter interface { - ItemsCount() int -} - -// Sizer is an interface that returns the size of the given element. -type Sizer[T any] interface { - SizeOf(T) uint64 -} - -// ItemsSizer is a Sizer implementation that returns the size of a queue element as the number of items it contains. -type ItemsSizer[T itemsCounter] struct{} - -func (is *ItemsSizer[T]) SizeOf(el T) uint64 { - return uint64(el.ItemsCount()) -} - -// RequestSizer is a Sizer implementation that returns the size of a queue element as one request. -type RequestSizer[T any] struct{} - -func (rs *RequestSizer[T]) SizeOf(T) uint64 { - return 1 -} - -type queueCapacityLimiter[T any] struct { - used *atomic.Uint64 - cap uint64 - sz Sizer[T] -} - -func (bcl queueCapacityLimiter[T]) Capacity() int { - return int(bcl.cap) -} - -func (bcl queueCapacityLimiter[T]) Size() int { - return int(bcl.used.Load()) -} - -func (bcl queueCapacityLimiter[T]) claim(el T) bool { - size := bcl.sizeOf(el) - if bcl.used.Add(size) > bcl.cap { - bcl.releaseSize(size) - return false - } - return true -} - -func (bcl queueCapacityLimiter[T]) release(el T) { - bcl.releaseSize(bcl.sizeOf(el)) -} - -func (bcl queueCapacityLimiter[T]) releaseSize(size uint64) { - bcl.used.Add(^(size - 1)) -} - -func (bcl queueCapacityLimiter[T]) sizeOf(el T) uint64 { - return bcl.sz.SizeOf(el) -} - -func newQueueCapacityLimiter[T any](sizer Sizer[T], capacity int) *queueCapacityLimiter[T] { - return &queueCapacityLimiter[T]{ - used: &atomic.Uint64{}, - cap: uint64(capacity), - sz: sizer, - } -} diff --git a/exporter/internal/queue/queue_capacity_test.go b/exporter/internal/queue/queue_capacity_test.go deleted file mode 100644 index 3dd6ad2b898..00000000000 --- a/exporter/internal/queue/queue_capacity_test.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package queue - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestRequestsCapacityLimiter(t *testing.T) { - rl := newQueueCapacityLimiter[fakeReq](&RequestSizer[fakeReq]{}, 2) - assert.Equal(t, 0, rl.Size()) - assert.Equal(t, 2, rl.Capacity()) - - req := fakeReq{itemsCount: 5} - - assert.True(t, rl.claim(req)) - assert.Equal(t, 1, rl.Size()) - - assert.True(t, rl.claim(req)) - assert.Equal(t, 2, rl.Size()) - - assert.False(t, rl.claim(req)) - assert.Equal(t, 2, rl.Size()) - - rl.release(req) - assert.Equal(t, 1, rl.Size()) -} - -func TestItemsCapacityLimiter(t *testing.T) { - rl := newQueueCapacityLimiter[fakeReq](&ItemsSizer[fakeReq]{}, 7) - assert.Equal(t, 0, rl.Size()) - assert.Equal(t, 7, rl.Capacity()) - - req := fakeReq{itemsCount: 3} - - assert.True(t, rl.claim(req)) - assert.Equal(t, 3, rl.Size()) - - assert.True(t, rl.claim(req)) - assert.Equal(t, 6, rl.Size()) - - assert.False(t, rl.claim(req)) - assert.Equal(t, 6, rl.Size()) - - rl.release(req) - assert.Equal(t, 3, rl.Size()) -} - -type fakeReq struct { - itemsCount int -} - -func (r fakeReq) ItemsCount() int { - return r.itemsCount -} diff --git a/exporter/internal/queue/sized_channel.go b/exporter/internal/queue/sized_channel.go new file mode 100644 index 00000000000..1702a38ac2f --- /dev/null +++ b/exporter/internal/queue/sized_channel.go @@ -0,0 +1,104 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package queue // import "go.opentelemetry.io/collector/exporter/internal/queue" + +import "sync/atomic" + +// sizedChannel is a channel wrapper for sized elements with a capacity set to a total size of all the elements. +// The channel will accept elements until the total size of the elements reaches the capacity. +type sizedChannel[T any] struct { + used *atomic.Int64 + + // We need to store the capacity in a separate field because the capacity of the channel can be higher. + // It happens when we restore a persistent queue from a disk that is bigger than the pre-configured capacity. + cap int64 + ch chan T +} + +// newSizedChannel creates a sized elements channel. Each element is assigned a size by the provided sizer. +// chanCapacity is the capacity of the underlying channel which usually should be equal to the capacity of the queue to +// avoid blocking the producer. Optionally, the channel can be preloaded with the elements and their total size. +func newSizedChannel[T any](capacity int64, els []T, totalSize int64) *sizedChannel[T] { + used := &atomic.Int64{} + used.Store(totalSize) + + chCap := capacity + if chCap < int64(len(els)) { + chCap = int64(len(els)) + } + + ch := make(chan T, chCap) + for _, el := range els { + ch <- el + } + + return &sizedChannel[T]{ + used: used, + cap: capacity, + ch: ch, + } +} + +// push puts the element into the queue with the given sized if there is enough capacity. +// Returns an error if the queue is full. The callback is called before the element is committed to the queue. +// If the callback returns an error, the element is not put into the queue and the error is returned. +// The size is the size of the element MUST be positive. +func (vcq *sizedChannel[T]) push(el T, size int64, callback func() error) error { + if vcq.used.Add(size) > vcq.cap { + vcq.used.Add(-size) + return ErrQueueIsFull + } + if callback != nil { + if err := callback(); err != nil { + vcq.used.Add(-size) + return err + } + } + vcq.ch <- el + return nil +} + +// pop removes the element from the queue and returns it. +// The call blocks until there is an item available or the queue is stopped. +// The function returns true when an item is consumed or false if the queue is stopped and emptied. +// The callback is called before the element is removed from the queue. It must return the size of the element. +func (vcq *sizedChannel[T]) pop(callback func(T) (size int64)) (T, bool) { + el, ok := <-vcq.ch + if !ok { + return el, false + } + + size := callback(el) + + // The used size and the channel size might be not in sync with the queue in case it's restored from the disk + // because we don't flush the current queue size on the disk on every read/write. + // In that case we need to make sure it doesn't go below 0. + if vcq.used.Add(-size) < 0 { + vcq.used.Store(0) + } + return el, true +} + +// syncSize updates the used size to 0 if the queue is empty. +// The caller must ensure that this call is not called concurrently with push. +// It's used by the persistent queue to ensure the used value correctly reflects the reality which may not be always +// the case in case if the queue size is restored from the disk after a crash. +func (vcq *sizedChannel[T]) syncSize() { + if len(vcq.ch) == 0 { + vcq.used.Store(0) + } +} + +// shutdown closes the queue channel to initiate draining of the queue. +func (vcq *sizedChannel[T]) shutdown() { + close(vcq.ch) +} + +func (vcq *sizedChannel[T]) Size() int { + return int(vcq.used.Load()) +} + +func (vcq *sizedChannel[T]) Capacity() int { + return int(vcq.cap) +} diff --git a/exporter/internal/queue/sized_channel_test.go b/exporter/internal/queue/sized_channel_test.go new file mode 100644 index 00000000000..02cd4bf8e68 --- /dev/null +++ b/exporter/internal/queue/sized_channel_test.go @@ -0,0 +1,44 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package queue + +import ( + "errors" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestSizedCapacityChannel(t *testing.T) { + q := newSizedChannel[int](7, nil, 0) + assert.NoError(t, q.push(1, 1, nil)) + assert.Equal(t, 1, q.Size()) + assert.Equal(t, 7, q.Capacity()) + + // failed callback should not allow the element to be added + assert.Error(t, q.push(2, 2, func() error { return errors.New("failed") })) + assert.Equal(t, 1, q.Size()) + + assert.NoError(t, q.push(3, 3, nil)) + assert.Equal(t, 4, q.Size()) + + // should not be able to send to the full queue + assert.Error(t, q.push(4, 4, nil)) + assert.Equal(t, 4, q.Size()) + + el, ok := q.pop(func(el int) int64 { return int64(el) }) + assert.Equal(t, 1, el) + assert.True(t, ok) + assert.Equal(t, 3, q.Size()) + + el, ok = q.pop(func(el int) int64 { return int64(el) }) + assert.Equal(t, 3, el) + assert.True(t, ok) + assert.Equal(t, 0, q.Size()) + + q.shutdown() + el, ok = q.pop(func(el int) int64 { return int64(el) }) + assert.False(t, ok) + assert.Equal(t, 0, el) +} diff --git a/exporter/loggingexporter/generated_component_test.go b/exporter/loggingexporter/generated_component_test.go new file mode 100644 index 00000000000..e5902b96208 --- /dev/null +++ b/exporter/loggingexporter/generated_component_test.go @@ -0,0 +1,151 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package loggingexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentFactoryType(t *testing.T) { + require.Equal(t, "logging", NewFactory().Type().String()) +} + +func TestComponentConfigStruct(t *testing.T) { + require.NoError(t, componenttest.CheckConfigStruct(NewFactory().CreateDefaultConfig())) +} + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "logs", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateLogsExporter(ctx, set, cfg) + }, + }, + + { + name: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + cm, err := confmaptest.LoadConf("metadata.yaml") + require.NoError(t, err) + cfg := factory.CreateDefaultConfig() + sub, err := cm.Sub("tests::config") + require.NoError(t, err) + require.NoError(t, component.UnmarshalConfig(sub, cfg)) + + for _, test := range tests { + t.Run(test.name+"-shutdown", func(t *testing.T) { + c, err := test.createFn(context.Background(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + c, err := test.createFn(context.Background(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + err = c.Start(context.Background(), host) + require.NoError(t, err) + require.NotPanics(t, func() { + switch test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + require.NoError(t, err) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/loggingexporter/package_test.go b/exporter/loggingexporter/generated_package_test.go similarity index 62% rename from exporter/loggingexporter/package_test.go rename to exporter/loggingexporter/generated_package_test.go index 0c1b40739cc..14eb697fde5 100644 --- a/exporter/loggingexporter/package_test.go +++ b/exporter/loggingexporter/generated_package_test.go @@ -1,5 +1,4 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 +// Code generated by mdatagen. DO NOT EDIT. package loggingexporter diff --git a/exporter/loggingexporter/go.mod b/exporter/loggingexporter/go.mod index 97dac63f6aa..d817b35d6a6 100644 --- a/exporter/loggingexporter/go.mod +++ b/exporter/loggingexporter/go.mod @@ -4,57 +4,57 @@ module go.opentelemetry.io/collector/exporter/loggingexporter go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.96.0 - go.opentelemetry.io/collector/config/configtelemetry v0.96.0 - go.opentelemetry.io/collector/confmap v0.96.0 - go.opentelemetry.io/collector/exporter v0.96.0 - go.opentelemetry.io/otel/metric v1.24.0 - go.opentelemetry.io/otel/trace v1.24.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.100.0 + go.opentelemetry.io/collector/config/configtelemetry v0.100.0 + go.opentelemetry.io/collector/confmap v0.100.0 + go.opentelemetry.io/collector/exporter v0.100.0 + go.opentelemetry.io/collector/pdata v1.7.0 + go.opentelemetry.io/otel/metric v1.26.0 + go.opentelemetry.io/otel/trace v1.26.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.19.0 // indirect - github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector v0.96.0 // indirect - go.opentelemetry.io/collector/config/configretry v0.96.0 // indirect - go.opentelemetry.io/collector/consumer v0.96.0 // indirect - go.opentelemetry.io/collector/extension v0.96.0 // indirect - go.opentelemetry.io/collector/pdata v1.3.0 // indirect - go.opentelemetry.io/collector/receiver v0.96.0 // indirect - go.opentelemetry.io/otel v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect - go.opentelemetry.io/otel/sdk v1.24.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect + go.opentelemetry.io/collector v0.100.0 // indirect + go.opentelemetry.io/collector/config/configretry v0.100.0 // indirect + go.opentelemetry.io/collector/consumer v0.100.0 // indirect + go.opentelemetry.io/collector/extension v0.100.0 // indirect + go.opentelemetry.io/collector/receiver v0.100.0 // indirect + go.opentelemetry.io/otel v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect + go.opentelemetry.io/otel/sdk v1.26.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/sys v0.17.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/grpc v1.62.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.34.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -74,6 +74,8 @@ replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/pdata => ../../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + replace go.opentelemetry.io/collector/receiver => ../../receiver retract ( diff --git a/exporter/loggingexporter/go.sum b/exporter/loggingexporter/go.sum index dbdb92fd3bb..7bbf6704ff6 100644 --- a/exporter/loggingexporter/go.sum +++ b/exporter/loggingexporter/go.sum @@ -1,7 +1,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -16,13 +16,11 @@ github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsM github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +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/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -31,8 +29,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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= @@ -50,32 +48,32 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= -go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -91,16 +89,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -113,14 +111,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/exporter/loggingexporter/internal/metadata/generated_status.go b/exporter/loggingexporter/internal/metadata/generated_status.go index 64c84dcae1f..ce3f313e8e0 100644 --- a/exporter/loggingexporter/internal/metadata/generated_status.go +++ b/exporter/loggingexporter/internal/metadata/generated_status.go @@ -3,15 +3,11 @@ package metadata import ( - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" ) var ( - Type = component.MustNewType("logging") - scopeName = "go.opentelemetry.io/collector/exporter/loggingexporter" + Type = component.MustNewType("logging") ) const ( @@ -19,11 +15,3 @@ const ( MetricsStability = component.StabilityLevelDeprecated LogsStability = component.StabilityLevelDeprecated ) - -func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter(scopeName) -} - -func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer(scopeName) -} diff --git a/exporter/loggingexporter/internal/metadata/generated_telemetry.go b/exporter/loggingexporter/internal/metadata/generated_telemetry.go new file mode 100644 index 00000000000..121a4370066 --- /dev/null +++ b/exporter/loggingexporter/internal/metadata/generated_telemetry.go @@ -0,0 +1,18 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("go.opentelemetry.io/collector/exporter/loggingexporter") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/exporter/loggingexporter") +} diff --git a/exporter/loggingexporter/internal/metadata/generated_telemetry_test.go b/exporter/loggingexporter/internal/metadata/generated_telemetry_test.go new file mode 100644 index 00000000000..deab99a089e --- /dev/null +++ b/exporter/loggingexporter/internal/metadata/generated_telemetry_test.go @@ -0,0 +1,63 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/otel/metric" + embeddedmetric "go.opentelemetry.io/otel/metric/embedded" + noopmetric "go.opentelemetry.io/otel/metric/noop" + "go.opentelemetry.io/otel/trace" + embeddedtrace "go.opentelemetry.io/otel/trace/embedded" + nooptrace "go.opentelemetry.io/otel/trace/noop" + + "go.opentelemetry.io/collector/component" +) + +type mockMeter struct { + noopmetric.Meter + name string +} +type mockMeterProvider struct { + embeddedmetric.MeterProvider +} + +func (m mockMeterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter { + return mockMeter{name: name} +} + +type mockTracer struct { + nooptrace.Tracer + name string +} + +type mockTracerProvider struct { + embeddedtrace.TracerProvider +} + +func (m mockTracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { + return mockTracer{name: name} +} + +func TestProviders(t *testing.T) { + set := component.TelemetrySettings{ + MeterProvider: mockMeterProvider{}, + TracerProvider: mockTracerProvider{}, + } + + meter := Meter(set) + if m, ok := meter.(mockMeter); ok { + require.Equal(t, "go.opentelemetry.io/collector/exporter/loggingexporter", m.name) + } else { + require.Fail(t, "returned Meter not mockMeter") + } + + tracer := Tracer(set) + if m, ok := tracer.(mockTracer); ok { + require.Equal(t, "go.opentelemetry.io/collector/exporter/loggingexporter", m.name) + } else { + require.Fail(t, "returned Meter not mockTracer") + } +} diff --git a/exporter/nopexporter/Makefile b/exporter/nopexporter/Makefile new file mode 100644 index 00000000000..ded7a36092d --- /dev/null +++ b/exporter/nopexporter/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common diff --git a/exporter/nopexporter/README.md b/exporter/nopexporter/README.md new file mode 100644 index 00000000000..99b54523fb0 --- /dev/null +++ b/exporter/nopexporter/README.md @@ -0,0 +1,27 @@ +# No-op Exporter + + +| Status | | +| ------------- |-----------| +| Stability | [beta]: traces, metrics, logs | +| Distributions | [core], [contrib] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fnop%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fnop) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fnop%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fnop) | + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib + + +Serves as a placeholder exporter in a pipeline. This can be useful if you want +to e.g. start a Collector with only extensions enabled, or for testing Collector +pipeline throughput without worrying about an exporter. + +## Getting Started + +All that is required to enable the No-op exporter is to include it in the +exporter definitions. It takes no configuration. + +```yaml +exporters: + nop: +``` diff --git a/exporter/nopexporter/doc.go b/exporter/nopexporter/doc.go new file mode 100644 index 00000000000..00261565191 --- /dev/null +++ b/exporter/nopexporter/doc.go @@ -0,0 +1,7 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:generate mdatagen metadata.yaml + +// Package nopexporter serves as a placeholder exporter. +package nopexporter // import "go.opentelemetry.io/collector/exporter/nopexporter" diff --git a/exporter/nopexporter/generated_component_test.go b/exporter/nopexporter/generated_component_test.go new file mode 100644 index 00000000000..675dee1a0ee --- /dev/null +++ b/exporter/nopexporter/generated_component_test.go @@ -0,0 +1,151 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package nopexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentFactoryType(t *testing.T) { + require.Equal(t, "nop", NewFactory().Type().String()) +} + +func TestComponentConfigStruct(t *testing.T) { + require.NoError(t, componenttest.CheckConfigStruct(NewFactory().CreateDefaultConfig())) +} + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "logs", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateLogsExporter(ctx, set, cfg) + }, + }, + + { + name: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + cm, err := confmaptest.LoadConf("metadata.yaml") + require.NoError(t, err) + cfg := factory.CreateDefaultConfig() + sub, err := cm.Sub("tests::config") + require.NoError(t, err) + require.NoError(t, component.UnmarshalConfig(sub, cfg)) + + for _, test := range tests { + t.Run(test.name+"-shutdown", func(t *testing.T) { + c, err := test.createFn(context.Background(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + c, err := test.createFn(context.Background(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + err = c.Start(context.Background(), host) + require.NoError(t, err) + require.NotPanics(t, func() { + switch test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + require.NoError(t, err) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/extension/extensiontest/package_test.go b/exporter/nopexporter/generated_package_test.go similarity index 51% rename from extension/extensiontest/package_test.go rename to exporter/nopexporter/generated_package_test.go index 22f7af4bd14..1bcb87f7640 100644 --- a/extension/extensiontest/package_test.go +++ b/exporter/nopexporter/generated_package_test.go @@ -1,7 +1,6 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 +// Code generated by mdatagen. DO NOT EDIT. -package extensiontest +package nopexporter import ( "testing" diff --git a/exporter/nopexporter/go.mod b/exporter/nopexporter/go.mod new file mode 100644 index 00000000000..5d3489ccf93 --- /dev/null +++ b/exporter/nopexporter/go.mod @@ -0,0 +1,80 @@ +module go.opentelemetry.io/collector/exporter/nopexporter + +go 1.21 + +toolchain go1.21.6 + +require ( + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.100.0 + go.opentelemetry.io/collector/confmap v0.100.0 + go.opentelemetry.io/collector/consumer v0.100.0 + go.opentelemetry.io/collector/exporter v0.100.0 + go.opentelemetry.io/collector/pdata v1.7.0 + go.opentelemetry.io/otel/metric v1.26.0 + go.opentelemetry.io/otel/trace v1.26.0 + go.uber.org/goleak v1.3.0 +) + +require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/knadh/koanf/maps v0.1.1 // indirect + github.com/knadh/koanf/providers/confmap v0.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.53.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect + go.opentelemetry.io/collector/receiver v0.100.0 // indirect + go.opentelemetry.io/otel v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect + go.opentelemetry.io/otel/sdk v1.26.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.34.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + +replace go.opentelemetry.io/collector/component => ../../component + +replace go.opentelemetry.io/collector/consumer => ../../consumer + +replace go.opentelemetry.io/collector/exporter => ../ + +replace go.opentelemetry.io/collector/pdata => ../../pdata + +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + +replace go.opentelemetry.io/collector/config/configretry => ../../config/configretry + +replace go.opentelemetry.io/collector/receiver => ../../receiver + +replace go.opentelemetry.io/collector => ../.. + +replace go.opentelemetry.io/collector/featuregate => ../../featuregate + +replace go.opentelemetry.io/collector/confmap => ../../confmap + +replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry + +replace go.opentelemetry.io/collector/extension => ../../extension diff --git a/exporter/nopexporter/go.sum b/exporter/nopexporter/go.sum new file mode 100644 index 00000000000..7bbf6704ff6 --- /dev/null +++ b/exporter/nopexporter/go.sum @@ -0,0 +1,124 @@ +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +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= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +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/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= +github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= +github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= +github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +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/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +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= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +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/exporter/nopexporter/internal/metadata/generated_status.go b/exporter/nopexporter/internal/metadata/generated_status.go new file mode 100644 index 00000000000..1901cab9ee6 --- /dev/null +++ b/exporter/nopexporter/internal/metadata/generated_status.go @@ -0,0 +1,17 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" +) + +var ( + Type = component.MustNewType("nop") +) + +const ( + TracesStability = component.StabilityLevelBeta + MetricsStability = component.StabilityLevelBeta + LogsStability = component.StabilityLevelBeta +) diff --git a/exporter/nopexporter/internal/metadata/generated_telemetry.go b/exporter/nopexporter/internal/metadata/generated_telemetry.go new file mode 100644 index 00000000000..db41096278d --- /dev/null +++ b/exporter/nopexporter/internal/metadata/generated_telemetry.go @@ -0,0 +1,18 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("go.opentelemetry.io/collector/exporter/nopexporter") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/exporter/nopexporter") +} diff --git a/exporter/nopexporter/internal/metadata/generated_telemetry_test.go b/exporter/nopexporter/internal/metadata/generated_telemetry_test.go new file mode 100644 index 00000000000..13312b17e0d --- /dev/null +++ b/exporter/nopexporter/internal/metadata/generated_telemetry_test.go @@ -0,0 +1,63 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/otel/metric" + embeddedmetric "go.opentelemetry.io/otel/metric/embedded" + noopmetric "go.opentelemetry.io/otel/metric/noop" + "go.opentelemetry.io/otel/trace" + embeddedtrace "go.opentelemetry.io/otel/trace/embedded" + nooptrace "go.opentelemetry.io/otel/trace/noop" + + "go.opentelemetry.io/collector/component" +) + +type mockMeter struct { + noopmetric.Meter + name string +} +type mockMeterProvider struct { + embeddedmetric.MeterProvider +} + +func (m mockMeterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter { + return mockMeter{name: name} +} + +type mockTracer struct { + nooptrace.Tracer + name string +} + +type mockTracerProvider struct { + embeddedtrace.TracerProvider +} + +func (m mockTracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { + return mockTracer{name: name} +} + +func TestProviders(t *testing.T) { + set := component.TelemetrySettings{ + MeterProvider: mockMeterProvider{}, + TracerProvider: mockTracerProvider{}, + } + + meter := Meter(set) + if m, ok := meter.(mockMeter); ok { + require.Equal(t, "go.opentelemetry.io/collector/exporter/nopexporter", m.name) + } else { + require.Fail(t, "returned Meter not mockMeter") + } + + tracer := Tracer(set) + if m, ok := tracer.(mockTracer); ok { + require.Equal(t, "go.opentelemetry.io/collector/exporter/nopexporter", m.name) + } else { + require.Fail(t, "returned Meter not mockTracer") + } +} diff --git a/exporter/nopexporter/metadata.yaml b/exporter/nopexporter/metadata.yaml new file mode 100644 index 00000000000..3c61e2e6433 --- /dev/null +++ b/exporter/nopexporter/metadata.yaml @@ -0,0 +1,7 @@ +type: nop + +status: + class: exporter + stability: + beta: [traces, metrics, logs] + distributions: [core, contrib] diff --git a/exporter/nopexporter/nop_exporter.go b/exporter/nopexporter/nop_exporter.go new file mode 100644 index 00000000000..16adf430cea --- /dev/null +++ b/exporter/nopexporter/nop_exporter.go @@ -0,0 +1,46 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package nopexporter // import "go.opentelemetry.io/collector/exporter/nopexporter" + +import ( + "context" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/nopexporter/internal/metadata" +) + +// NewFactory returns an exporter.Factory that constructs nop exporters. +func NewFactory() exporter.Factory { + return exporter.NewFactory( + metadata.Type, + func() component.Config { return &struct{}{} }, + exporter.WithTraces(createTracesExporter, metadata.TracesStability), + exporter.WithMetrics(createMetricsExporter, metadata.MetricsStability), + exporter.WithLogs(createLogsExporter, metadata.LogsStability), + ) +} + +func createTracesExporter(context.Context, exporter.CreateSettings, component.Config) (exporter.Traces, error) { + return nopInstance, nil +} + +func createMetricsExporter(context.Context, exporter.CreateSettings, component.Config) (exporter.Metrics, error) { + return nopInstance, nil +} + +func createLogsExporter(context.Context, exporter.CreateSettings, component.Config) (exporter.Logs, error) { + return nopInstance, nil +} + +var nopInstance = &nopExporter{ + Consumer: consumertest.NewNop(), +} + +type nopExporter struct { + component.StartFunc + component.ShutdownFunc + consumertest.Consumer +} diff --git a/exporter/nopexporter/nop_exporter_test.go b/exporter/nopexporter/nop_exporter_test.go new file mode 100644 index 00000000000..80baefc9631 --- /dev/null +++ b/exporter/nopexporter/nop_exporter_test.go @@ -0,0 +1,45 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package nopexporter + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestNewNopFactory(t *testing.T) { + factory := NewFactory() + require.NotNil(t, factory) + assert.Equal(t, component.MustNewType("nop"), factory.Type()) + cfg := factory.CreateDefaultConfig() + assert.Equal(t, &struct{}{}, cfg) + + traces, err := factory.CreateTracesExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + assert.NoError(t, traces.Start(context.Background(), componenttest.NewNopHost())) + assert.NoError(t, traces.ConsumeTraces(context.Background(), ptrace.NewTraces())) + assert.NoError(t, traces.Shutdown(context.Background())) + + metrics, err := factory.CreateMetricsExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + assert.NoError(t, metrics.Start(context.Background(), componenttest.NewNopHost())) + assert.NoError(t, metrics.ConsumeMetrics(context.Background(), pmetric.NewMetrics())) + assert.NoError(t, metrics.Shutdown(context.Background())) + + logs, err := factory.CreateLogsExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + assert.NoError(t, logs.Start(context.Background(), componenttest.NewNopHost())) + assert.NoError(t, logs.ConsumeLogs(context.Background(), plog.NewLogs())) + assert.NoError(t, logs.Shutdown(context.Background())) +} diff --git a/exporter/otlpexporter/config.go b/exporter/otlpexporter/config.go index 61440c3a9e3..62956f293ed 100644 --- a/exporter/otlpexporter/config.go +++ b/exporter/otlpexporter/config.go @@ -5,6 +5,10 @@ package otlpexporter // import "go.opentelemetry.io/collector/exporter/otlpexpor import ( "errors" + "fmt" + "net" + "strconv" + "strings" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configgrpc" @@ -22,10 +26,34 @@ type Config struct { } func (c *Config) Validate() error { - if c.SanitizedEndpoint() == "" { + endpoint := c.sanitizedEndpoint() + if endpoint == "" { return errors.New(`requires a non-empty "endpoint"`) } + + // Validate that the port is in the address + _, port, err := net.SplitHostPort(endpoint) + if err != nil { + return err + } + if _, err := strconv.Atoi(port); err != nil { + return fmt.Errorf(`invalid port "%s"`, port) + } + return nil } +func (c *Config) sanitizedEndpoint() string { + switch { + case strings.HasPrefix(c.Endpoint, "http://"): + return strings.TrimPrefix(c.Endpoint, "http://") + case strings.HasPrefix(c.Endpoint, "https://"): + return strings.TrimPrefix(c.Endpoint, "https://") + case strings.HasPrefix(c.Endpoint, "dns:///"): + return strings.TrimPrefix(c.Endpoint, "dns:///") + default: + return c.Endpoint + } +} + var _ component.Config = (*Config)(nil) diff --git a/exporter/otlpexporter/config_test.go b/exporter/otlpexporter/config_test.go index c024eb0af88..7a644b7ef0e 100644 --- a/exporter/otlpexporter/config_test.go +++ b/exporter/otlpexporter/config_test.go @@ -62,7 +62,7 @@ func TestUnmarshalConfig(t *testing.T) { Endpoint: "1.2.3.4:1234", Compression: "gzip", TLSSetting: configtls.ClientConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: "/var/lib/mycert.pem", }, Insecure: false, @@ -91,6 +91,10 @@ func TestUnmarshalInvalidConfig(t *testing.T) { name: "no_endpoint", errorMsg: `requires a non-empty "endpoint"`, }, + { + name: "https_endpoint", + errorMsg: `requires a non-empty "endpoint"`, + }, { name: "http_endpoint", errorMsg: `requires a non-empty "endpoint"`, @@ -103,6 +107,18 @@ func TestUnmarshalInvalidConfig(t *testing.T) { name: "invalid_retry", errorMsg: `'randomization_factor' must be within [0, 1]`, }, + { + name: "invalid_tls", + errorMsg: `invalid TLS min_version: unsupported TLS version: "asd"`, + }, + { + name: "missing_port", + errorMsg: `missing port in address`, + }, + { + name: "invalid_port", + errorMsg: `invalid port "port"`, + }, } { t.Run(test.name, func(t *testing.T) { cfg := factory.CreateDefaultConfig() @@ -114,3 +130,10 @@ func TestUnmarshalInvalidConfig(t *testing.T) { } } + +func TestValidDNSEndpoint(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig().(*Config) + cfg.Endpoint = "dns:///backend.example.com:4317" + assert.NoError(t, cfg.Validate()) +} diff --git a/exporter/otlpexporter/factory_test.go b/exporter/otlpexporter/factory_test.go index 45db95986b4..d89c8fe2ead 100644 --- a/exporter/otlpexporter/factory_test.go +++ b/exporter/otlpexporter/factory_test.go @@ -140,7 +140,7 @@ func TestCreateTracesExporter(t *testing.T) { ClientConfig: configgrpc.ClientConfig{ Endpoint: endpoint, TLSSetting: configtls.ClientConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: filepath.Join("testdata", "test_cert.pem"), }, }, @@ -153,7 +153,7 @@ func TestCreateTracesExporter(t *testing.T) { ClientConfig: configgrpc.ClientConfig{ Endpoint: endpoint, TLSSetting: configtls.ClientConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: "nosuchfile", }, }, diff --git a/exporter/otlpexporter/generated_component_test.go b/exporter/otlpexporter/generated_component_test.go new file mode 100644 index 00000000000..27a3b7da3d0 --- /dev/null +++ b/exporter/otlpexporter/generated_component_test.go @@ -0,0 +1,151 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package otlpexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentFactoryType(t *testing.T) { + require.Equal(t, "otlp", NewFactory().Type().String()) +} + +func TestComponentConfigStruct(t *testing.T) { + require.NoError(t, componenttest.CheckConfigStruct(NewFactory().CreateDefaultConfig())) +} + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "logs", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateLogsExporter(ctx, set, cfg) + }, + }, + + { + name: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + cm, err := confmaptest.LoadConf("metadata.yaml") + require.NoError(t, err) + cfg := factory.CreateDefaultConfig() + sub, err := cm.Sub("tests::config") + require.NoError(t, err) + require.NoError(t, component.UnmarshalConfig(sub, cfg)) + + for _, test := range tests { + t.Run(test.name+"-shutdown", func(t *testing.T) { + c, err := test.createFn(context.Background(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + c, err := test.createFn(context.Background(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + err = c.Start(context.Background(), host) + require.NoError(t, err) + require.NotPanics(t, func() { + switch test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + require.NoError(t, err) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/otlpexporter/generated_package_test.go b/exporter/otlpexporter/generated_package_test.go new file mode 100644 index 00000000000..9612d731def --- /dev/null +++ b/exporter/otlpexporter/generated_package_test.go @@ -0,0 +1,13 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package otlpexporter + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/exporter/otlpexporter/go.mod b/exporter/otlpexporter/go.mod index 8762e4cc0f9..6ba890c33a8 100644 --- a/exporter/otlpexporter/go.mod +++ b/exporter/otlpexporter/go.mod @@ -3,31 +3,32 @@ module go.opentelemetry.io/collector/exporter/otlpexporter go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.96.0 - go.opentelemetry.io/collector/component v0.96.0 - go.opentelemetry.io/collector/config/configauth v0.96.0 - go.opentelemetry.io/collector/config/configcompression v0.96.0 - go.opentelemetry.io/collector/config/configgrpc v0.96.0 - go.opentelemetry.io/collector/config/configopaque v1.3.0 - go.opentelemetry.io/collector/config/configretry v0.96.0 - go.opentelemetry.io/collector/config/configtls v0.96.0 - go.opentelemetry.io/collector/confmap v0.96.0 - go.opentelemetry.io/collector/consumer v0.96.0 - go.opentelemetry.io/collector/exporter v0.96.0 - go.opentelemetry.io/collector/pdata v1.3.0 - go.opentelemetry.io/otel/metric v1.24.0 - go.opentelemetry.io/otel/trace v1.24.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector v0.100.0 + go.opentelemetry.io/collector/component v0.100.0 + go.opentelemetry.io/collector/config/configauth v0.100.0 + go.opentelemetry.io/collector/config/configcompression v1.7.0 + go.opentelemetry.io/collector/config/configgrpc v0.100.0 + go.opentelemetry.io/collector/config/configopaque v1.7.0 + go.opentelemetry.io/collector/config/configretry v0.100.0 + go.opentelemetry.io/collector/config/configtls v0.100.0 + go.opentelemetry.io/collector/confmap v0.100.0 + go.opentelemetry.io/collector/consumer v0.100.0 + go.opentelemetry.io/collector/exporter v0.100.0 + go.opentelemetry.io/collector/pdata v1.7.0 + go.opentelemetry.io/collector/pdata/testdata v0.100.0 + go.opentelemetry.io/otel/metric v1.26.0 + go.opentelemetry.io/otel/trace v1.26.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 - google.golang.org/grpc v1.62.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda + google.golang.org/grpc v1.63.2 + google.golang.org/protobuf v1.34.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect @@ -35,15 +36,15 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.17.4 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect @@ -51,32 +52,35 @@ require ( github.com/mostynb/go-grpc-compression v1.2.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.19.0 // indirect - github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector/config/confignet v0.96.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect - go.opentelemetry.io/collector/config/internal v0.96.0 // indirect - go.opentelemetry.io/collector/extension v0.96.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.96.0 // indirect - go.opentelemetry.io/collector/featuregate v1.3.0 // indirect - go.opentelemetry.io/collector/receiver v0.96.0 // indirect - go.opentelemetry.io/contrib/config v0.4.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect - go.opentelemetry.io/otel v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 // indirect - go.opentelemetry.io/otel/sdk v1.24.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect - go.opentelemetry.io/proto/otlp v1.1.0 // indirect + go.opentelemetry.io/collector/config/confignet v0.100.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect + go.opentelemetry.io/collector/config/internal v0.100.0 // indirect + go.opentelemetry.io/collector/extension v0.100.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.100.0 // indirect + go.opentelemetry.io/collector/featuregate v1.7.0 // indirect + go.opentelemetry.io/collector/receiver v0.100.0 // indirect + go.opentelemetry.io/contrib/config v0.6.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 // indirect + go.opentelemetry.io/otel v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 // indirect + go.opentelemetry.io/otel/sdk v1.26.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + go.opentelemetry.io/proto/otlp v1.2.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/sys v0.17.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -110,6 +114,8 @@ replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/pdata => ../../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + replace go.opentelemetry.io/collector/receiver => ../../receiver replace go.opentelemetry.io/collector/consumer => ../../consumer diff --git a/exporter/otlpexporter/go.sum b/exporter/otlpexporter/go.sum index d617159313d..0180159064d 100644 --- a/exporter/otlpexporter/go.sum +++ b/exporter/otlpexporter/go.sum @@ -1,20 +1,12 @@ -cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= -cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= -cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 h1:aRVqY1p2IJaBGStWMsQMpkAa83cPkCDLl80eOj0Rbz4= -cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68/go.mod h1:1a3eRNYX12fs5UABBIXS8HXVvQbX9hRB/RkEBPORpe8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= -github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= 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= -github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= -github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -26,17 +18,15 @@ github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsM github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= +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/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -49,8 +39,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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= @@ -70,46 +60,52 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= -go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 h1:UNQQKPfTDe1J81ViolILjTKPr9WetKW6uei2hFgJmFs= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 h1:Mw5xcxMwlqoJd97vwPxA8isEaIoxsta9/Q51+TTJLGE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0/go.mod h1:CQNu9bj7o7mC6U7+CA/schKEYakYXWr79ucDHTMGhCM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 h1:s0PHtIkN+3xrbDOpt2M8OTG92cWqUESvzh2MxiR5xY8= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0/go.mod h1:hZlFbDbRt++MMPCCfSJfmhkGIWnX1h3XjkfxZUjLrIA= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= -go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= -go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= -go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= +go.opentelemetry.io/contrib/config v0.6.0 h1:M1SRD1Z15XHPGk61tMLI1up77XT5FdrqQSRrlH0fYuk= +go.opentelemetry.io/contrib/config v0.6.0/go.mod h1:t+/kzmRWLN7J+4F/dD4fFvlYCmCO63WYwy/B00IC++c= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 h1:A3SayB3rNyt+1S6qpI9mHPkeHTZbD7XILEqWnYZb2l0= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0/go.mod h1:27iA5uvhuRNmalO+iEUdVn5ZMj2qy10Mm+XRIpRmyuU= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 h1:+hm+I+KigBy3M24/h1p/NHkUx/evbLH0PNcjpMyCHc4= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0/go.mod h1:NjC8142mLvvNT6biDpaMjyz78kyEHIwAJlSX0N9P5KI= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 h1:HGZWGmCVRCVyAs2GQaiHQPbDHo+ObFWeUEOd+zDnp64= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0/go.mod h1:SaH+v38LSCHddyk7RGlU9uZyQoRrKao6IBnJw6Kbn+c= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 h1:1u/AyyOqAWzy+SkPxDpahCNZParHV8Vid1RnI2clyDE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0/go.mod h1:z46paqbJ9l7c9fIPCXTqTGwhQZ5XoTIsfeFYWboizjs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 h1:Waw9Wfpo/IXzOI8bCB7DIk+0JZcqqsyn1JFnAc+iam8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0/go.mod h1:wnJIG4fOqyynOnnQF/eQb4/16VlX2EJAHhHgqIqWfAo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 h1:1wp/gyxsuYtuE/JFxsQRtcCDtMrO2qMvlfXALU5wkzI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0/go.mod h1:gbTHmghkGgqxMomVQQMur1Nba4M0MQ8AYThXDUjsJ38= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 h1:5fnmgteaar1VcAA69huatudPduNFz7guRtCmfZCooZI= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0/go.mod h1:lsPccfZiz1cb1AhBPmicWM2E4F1VynFXEvD8SEBS4TM= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 h1:0W5o9SzoR15ocYHEQfvfipzcNog1lBxOLfnex91Hk6s= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0/go.mod h1:zVZ8nz+VSggWmnh6tTsJqXQ7rU4xLwRtna1M4x5jq58= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= +go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -125,18 +121,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= -golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= -golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -149,20 +143,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/exporter/otlpexporter/internal/metadata/generated_status.go b/exporter/otlpexporter/internal/metadata/generated_status.go index 4b0d0f0ecd5..c9cff844fa2 100644 --- a/exporter/otlpexporter/internal/metadata/generated_status.go +++ b/exporter/otlpexporter/internal/metadata/generated_status.go @@ -3,15 +3,11 @@ package metadata import ( - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" ) var ( - Type = component.MustNewType("otlp") - scopeName = "go.opentelemetry.io/collector/exporter/otlpexporter" + Type = component.MustNewType("otlp") ) const ( @@ -19,11 +15,3 @@ const ( TracesStability = component.StabilityLevelStable MetricsStability = component.StabilityLevelStable ) - -func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter(scopeName) -} - -func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer(scopeName) -} diff --git a/exporter/otlpexporter/internal/metadata/generated_telemetry.go b/exporter/otlpexporter/internal/metadata/generated_telemetry.go new file mode 100644 index 00000000000..ee872915b19 --- /dev/null +++ b/exporter/otlpexporter/internal/metadata/generated_telemetry.go @@ -0,0 +1,18 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("go.opentelemetry.io/collector/exporter/otlpexporter") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/exporter/otlpexporter") +} diff --git a/exporter/otlpexporter/internal/metadata/generated_telemetry_test.go b/exporter/otlpexporter/internal/metadata/generated_telemetry_test.go new file mode 100644 index 00000000000..8ad8ad95063 --- /dev/null +++ b/exporter/otlpexporter/internal/metadata/generated_telemetry_test.go @@ -0,0 +1,63 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/otel/metric" + embeddedmetric "go.opentelemetry.io/otel/metric/embedded" + noopmetric "go.opentelemetry.io/otel/metric/noop" + "go.opentelemetry.io/otel/trace" + embeddedtrace "go.opentelemetry.io/otel/trace/embedded" + nooptrace "go.opentelemetry.io/otel/trace/noop" + + "go.opentelemetry.io/collector/component" +) + +type mockMeter struct { + noopmetric.Meter + name string +} +type mockMeterProvider struct { + embeddedmetric.MeterProvider +} + +func (m mockMeterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter { + return mockMeter{name: name} +} + +type mockTracer struct { + nooptrace.Tracer + name string +} + +type mockTracerProvider struct { + embeddedtrace.TracerProvider +} + +func (m mockTracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { + return mockTracer{name: name} +} + +func TestProviders(t *testing.T) { + set := component.TelemetrySettings{ + MeterProvider: mockMeterProvider{}, + TracerProvider: mockTracerProvider{}, + } + + meter := Meter(set) + if m, ok := meter.(mockMeter); ok { + require.Equal(t, "go.opentelemetry.io/collector/exporter/otlpexporter", m.name) + } else { + require.Fail(t, "returned Meter not mockMeter") + } + + tracer := Tracer(set) + if m, ok := tracer.(mockTracer); ok { + require.Equal(t, "go.opentelemetry.io/collector/exporter/otlpexporter", m.name) + } else { + require.Fail(t, "returned Meter not mockTracer") + } +} diff --git a/exporter/otlpexporter/metadata.yaml b/exporter/otlpexporter/metadata.yaml index 820930b1dc5..f24e40e1f91 100644 --- a/exporter/otlpexporter/metadata.yaml +++ b/exporter/otlpexporter/metadata.yaml @@ -6,3 +6,7 @@ status: stable: [traces, metrics] beta: [logs] distributions: [core, contrib] + +tests: + config: + endpoint: otelcol:4317 \ No newline at end of file diff --git a/exporter/otlpexporter/otlp_test.go b/exporter/otlpexporter/otlp_test.go index d1c4f622bc0..345c9cbf645 100644 --- a/exporter/otlpexporter/otlp_test.go +++ b/exporter/otlpexporter/otlp_test.go @@ -31,13 +31,13 @@ import ( "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exportertest" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/plog/plogotlp" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp" "go.opentelemetry.io/collector/pdata/ptrace" "go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp" + "go.opentelemetry.io/collector/pdata/testdata" ) type mockReceiver struct { diff --git a/exporter/otlpexporter/testdata/invalid_configs.yaml b/exporter/otlpexporter/testdata/invalid_configs.yaml index 73c24e3f13e..69fd873be3f 100644 --- a/exporter/otlpexporter/testdata/invalid_configs.yaml +++ b/exporter/otlpexporter/testdata/invalid_configs.yaml @@ -11,6 +11,8 @@ no_endpoint: multiplier: 1.3 max_interval: 60s max_elapsed_time: 10m +https_endpoint: + endpoint: https:// http_endpoint: endpoint: http:// timeout: 10s @@ -53,3 +55,49 @@ invalid_retry: multiplier: 1.3 max_interval: 60s max_elapsed_time: 10m +invalid_tls: + tls: + min_version: asd + endpoint: example.com:443 + timeout: 10s + sending_queue: + enabled: true + num_consumers: 2 + queue_size: 10 + retry_on_failure: + enabled: true + initial_interval: 10s + randomization_factor: 0.7 + multiplier: 1.3 + max_interval: 60s + max_elapsed_time: 10m +missing_port: + endpoint: example.com + timeout: 10s + sending_queue: + enabled: true + num_consumers: 2 + queue_size: 10 + retry_on_failure: + enabled: true + initial_interval: 10s + randomization_factor: 0.7 + multiplier: 1.3 + max_interval: 60s + max_elapsed_time: 10m +invalid_port: + endpoint: example.com:port + timeout: 10s + sending_queue: + enabled: true + num_consumers: 2 + queue_size: 10 + retry_on_failure: + enabled: true + initial_interval: 10s + randomization_factor: 0.7 + multiplier: 1.3 + max_interval: 60s + max_elapsed_time: 10m + + diff --git a/exporter/otlphttpexporter/config_test.go b/exporter/otlphttpexporter/config_test.go index 04bb1041036..e158891dd75 100644 --- a/exporter/otlphttpexporter/config_test.go +++ b/exporter/otlphttpexporter/config_test.go @@ -60,7 +60,7 @@ func TestUnmarshalConfig(t *testing.T) { }, Endpoint: "https://1.2.3.4:1234", TLSSetting: configtls.ClientConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: "/var/lib/mycert.pem", CertFile: "certfile", KeyFile: "keyfile", diff --git a/exporter/otlphttpexporter/factory_test.go b/exporter/otlphttpexporter/factory_test.go index a36a9548d95..d81b0c7bd55 100644 --- a/exporter/otlphttpexporter/factory_test.go +++ b/exporter/otlphttpexporter/factory_test.go @@ -97,7 +97,7 @@ func TestCreateTracesExporter(t *testing.T) { ClientConfig: confighttp.ClientConfig{ Endpoint: endpoint, TLSSetting: configtls.ClientConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: filepath.Join("testdata", "test_cert.pem"), }, }, @@ -110,7 +110,7 @@ func TestCreateTracesExporter(t *testing.T) { ClientConfig: confighttp.ClientConfig{ Endpoint: endpoint, TLSSetting: configtls.ClientConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CAFile: "nosuchfile", }, }, diff --git a/exporter/otlphttpexporter/generated_component_test.go b/exporter/otlphttpexporter/generated_component_test.go new file mode 100644 index 00000000000..443b94841b4 --- /dev/null +++ b/exporter/otlphttpexporter/generated_component_test.go @@ -0,0 +1,151 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package otlphttpexporter + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" +) + +func TestComponentFactoryType(t *testing.T) { + require.Equal(t, "otlphttp", NewFactory().Type().String()) +} + +func TestComponentConfigStruct(t *testing.T) { + require.NoError(t, componenttest.CheckConfigStruct(NewFactory().CreateDefaultConfig())) +} + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "logs", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateLogsExporter(ctx, set, cfg) + }, + }, + + { + name: "metrics", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsExporter(ctx, set, cfg) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) + }, + }, + } + + cm, err := confmaptest.LoadConf("metadata.yaml") + require.NoError(t, err) + cfg := factory.CreateDefaultConfig() + sub, err := cm.Sub("tests::config") + require.NoError(t, err) + require.NoError(t, component.UnmarshalConfig(sub, cfg)) + + for _, test := range tests { + t.Run(test.name+"-shutdown", func(t *testing.T) { + c, err := test.createFn(context.Background(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + c, err := test.createFn(context.Background(), exportertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + err = c.Start(context.Background(), host) + require.NoError(t, err) + require.NotPanics(t, func() { + switch test.name { + case "logs": + e, ok := c.(exporter.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(exporter.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(exporter.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + + require.NoError(t, err) + + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/exporter/otlphttpexporter/package_test.go b/exporter/otlphttpexporter/generated_package_test.go similarity index 62% rename from exporter/otlphttpexporter/package_test.go rename to exporter/otlphttpexporter/generated_package_test.go index 07858386cc4..625e0cd9304 100644 --- a/exporter/otlphttpexporter/package_test.go +++ b/exporter/otlphttpexporter/generated_package_test.go @@ -1,5 +1,4 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 +// Code generated by mdatagen. DO NOT EDIT. package otlphttpexporter diff --git a/exporter/otlphttpexporter/go.mod b/exporter/otlphttpexporter/go.mod index 20043caf0b6..2c9f641f43b 100644 --- a/exporter/otlphttpexporter/go.mod +++ b/exporter/otlphttpexporter/go.mod @@ -3,30 +3,30 @@ module go.opentelemetry.io/collector/exporter/otlphttpexporter go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.96.0 - go.opentelemetry.io/collector/component v0.96.0 - go.opentelemetry.io/collector/config/configcompression v0.96.0 - go.opentelemetry.io/collector/config/confighttp v0.96.0 - go.opentelemetry.io/collector/config/configopaque v1.3.0 - go.opentelemetry.io/collector/config/configretry v0.96.0 - go.opentelemetry.io/collector/config/configtls v0.96.0 - go.opentelemetry.io/collector/confmap v0.96.0 - go.opentelemetry.io/collector/consumer v0.96.0 - go.opentelemetry.io/collector/exporter v0.96.0 - go.opentelemetry.io/collector/pdata v1.3.0 - go.opentelemetry.io/otel/metric v1.24.0 - go.opentelemetry.io/otel/trace v1.24.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector v0.100.0 + go.opentelemetry.io/collector/component v0.100.0 + go.opentelemetry.io/collector/config/configcompression v1.7.0 + go.opentelemetry.io/collector/config/confighttp v0.100.0 + go.opentelemetry.io/collector/config/configopaque v1.7.0 + go.opentelemetry.io/collector/config/configretry v0.100.0 + go.opentelemetry.io/collector/config/configtls v0.100.0 + go.opentelemetry.io/collector/confmap v0.100.0 + go.opentelemetry.io/collector/consumer v0.100.0 + go.opentelemetry.io/collector/exporter v0.100.0 + go.opentelemetry.io/collector/pdata v1.7.0 + go.opentelemetry.io/otel/metric v1.26.0 + go.opentelemetry.io/otel/trace v1.26.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 - google.golang.org/grpc v1.62.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda + google.golang.org/grpc v1.63.2 + google.golang.org/protobuf v1.34.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect @@ -35,48 +35,51 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.7 // indirect + github.com/klauspost/compress v1.17.8 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.19.0 // indirect - github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rs/cors v1.10.1 // indirect - go.opentelemetry.io/collector/config/configauth v0.96.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect - go.opentelemetry.io/collector/config/internal v0.96.0 // indirect - go.opentelemetry.io/collector/extension v0.96.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.96.0 // indirect - go.opentelemetry.io/collector/featuregate v1.3.0 // indirect - go.opentelemetry.io/collector/receiver v0.96.0 // indirect - go.opentelemetry.io/contrib/config v0.4.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect - go.opentelemetry.io/otel v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 // indirect - go.opentelemetry.io/otel/sdk v1.24.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect - go.opentelemetry.io/proto/otlp v1.1.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.100.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect + go.opentelemetry.io/collector/config/internal v0.100.0 // indirect + go.opentelemetry.io/collector/extension v0.100.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.100.0 // indirect + go.opentelemetry.io/collector/featuregate v1.7.0 // indirect + go.opentelemetry.io/collector/receiver v0.100.0 // indirect + go.opentelemetry.io/contrib/config v0.6.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 // indirect + go.opentelemetry.io/otel v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 // indirect + go.opentelemetry.io/otel/sdk v1.26.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + go.opentelemetry.io/proto/otlp v1.2.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/sys v0.17.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -110,6 +113,8 @@ replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/pdata => ../../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + replace go.opentelemetry.io/collector/receiver => ../../receiver replace go.opentelemetry.io/collector/consumer => ../../consumer diff --git a/exporter/otlphttpexporter/go.sum b/exporter/otlphttpexporter/go.sum index 9d2b7f63d76..b8a1052e14f 100644 --- a/exporter/otlphttpexporter/go.sum +++ b/exporter/otlphttpexporter/go.sum @@ -1,7 +1,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -20,31 +20,29 @@ github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsM github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= +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/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= -github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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= @@ -62,48 +60,54 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= -go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 h1:Mw5xcxMwlqoJd97vwPxA8isEaIoxsta9/Q51+TTJLGE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0/go.mod h1:CQNu9bj7o7mC6U7+CA/schKEYakYXWr79ucDHTMGhCM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 h1:s0PHtIkN+3xrbDOpt2M8OTG92cWqUESvzh2MxiR5xY8= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0/go.mod h1:hZlFbDbRt++MMPCCfSJfmhkGIWnX1h3XjkfxZUjLrIA= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= -go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= -go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= -go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= +go.opentelemetry.io/contrib/config v0.6.0 h1:M1SRD1Z15XHPGk61tMLI1up77XT5FdrqQSRrlH0fYuk= +go.opentelemetry.io/contrib/config v0.6.0/go.mod h1:t+/kzmRWLN7J+4F/dD4fFvlYCmCO63WYwy/B00IC++c= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 h1:Xs2Ncz0gNihqu9iosIZ5SkBbWo5T8JhhLJFMQL1qmLI= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0/go.mod h1:vy+2G/6NvVMpwGX/NyLqcC41fxepnuKHk16E6IZUcJc= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 h1:+hm+I+KigBy3M24/h1p/NHkUx/evbLH0PNcjpMyCHc4= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0/go.mod h1:NjC8142mLvvNT6biDpaMjyz78kyEHIwAJlSX0N9P5KI= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 h1:HGZWGmCVRCVyAs2GQaiHQPbDHo+ObFWeUEOd+zDnp64= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0/go.mod h1:SaH+v38LSCHddyk7RGlU9uZyQoRrKao6IBnJw6Kbn+c= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 h1:1u/AyyOqAWzy+SkPxDpahCNZParHV8Vid1RnI2clyDE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0/go.mod h1:z46paqbJ9l7c9fIPCXTqTGwhQZ5XoTIsfeFYWboizjs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 h1:Waw9Wfpo/IXzOI8bCB7DIk+0JZcqqsyn1JFnAc+iam8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0/go.mod h1:wnJIG4fOqyynOnnQF/eQb4/16VlX2EJAHhHgqIqWfAo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 h1:1wp/gyxsuYtuE/JFxsQRtcCDtMrO2qMvlfXALU5wkzI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0/go.mod h1:gbTHmghkGgqxMomVQQMur1Nba4M0MQ8AYThXDUjsJ38= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 h1:5fnmgteaar1VcAA69huatudPduNFz7guRtCmfZCooZI= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0/go.mod h1:lsPccfZiz1cb1AhBPmicWM2E4F1VynFXEvD8SEBS4TM= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 h1:0W5o9SzoR15ocYHEQfvfipzcNog1lBxOLfnex91Hk6s= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0/go.mod h1:zVZ8nz+VSggWmnh6tTsJqXQ7rU4xLwRtna1M4x5jq58= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= +go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -119,16 +123,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -141,18 +145,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/exporter/otlphttpexporter/internal/metadata/generated_status.go b/exporter/otlphttpexporter/internal/metadata/generated_status.go index d9f62544a6f..8af2905a456 100644 --- a/exporter/otlphttpexporter/internal/metadata/generated_status.go +++ b/exporter/otlphttpexporter/internal/metadata/generated_status.go @@ -3,15 +3,11 @@ package metadata import ( - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" ) var ( - Type = component.MustNewType("otlphttp") - scopeName = "go.opentelemetry.io/collector/exporter/otlphttpexporter" + Type = component.MustNewType("otlphttp") ) const ( @@ -19,11 +15,3 @@ const ( TracesStability = component.StabilityLevelStable MetricsStability = component.StabilityLevelStable ) - -func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter(scopeName) -} - -func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer(scopeName) -} diff --git a/exporter/otlphttpexporter/internal/metadata/generated_telemetry.go b/exporter/otlphttpexporter/internal/metadata/generated_telemetry.go new file mode 100644 index 00000000000..8b014c784fb --- /dev/null +++ b/exporter/otlphttpexporter/internal/metadata/generated_telemetry.go @@ -0,0 +1,18 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("go.opentelemetry.io/collector/exporter/otlphttpexporter") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/exporter/otlphttpexporter") +} diff --git a/exporter/otlphttpexporter/internal/metadata/generated_telemetry_test.go b/exporter/otlphttpexporter/internal/metadata/generated_telemetry_test.go new file mode 100644 index 00000000000..bc1d66d9cfb --- /dev/null +++ b/exporter/otlphttpexporter/internal/metadata/generated_telemetry_test.go @@ -0,0 +1,63 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/otel/metric" + embeddedmetric "go.opentelemetry.io/otel/metric/embedded" + noopmetric "go.opentelemetry.io/otel/metric/noop" + "go.opentelemetry.io/otel/trace" + embeddedtrace "go.opentelemetry.io/otel/trace/embedded" + nooptrace "go.opentelemetry.io/otel/trace/noop" + + "go.opentelemetry.io/collector/component" +) + +type mockMeter struct { + noopmetric.Meter + name string +} +type mockMeterProvider struct { + embeddedmetric.MeterProvider +} + +func (m mockMeterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter { + return mockMeter{name: name} +} + +type mockTracer struct { + nooptrace.Tracer + name string +} + +type mockTracerProvider struct { + embeddedtrace.TracerProvider +} + +func (m mockTracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { + return mockTracer{name: name} +} + +func TestProviders(t *testing.T) { + set := component.TelemetrySettings{ + MeterProvider: mockMeterProvider{}, + TracerProvider: mockTracerProvider{}, + } + + meter := Meter(set) + if m, ok := meter.(mockMeter); ok { + require.Equal(t, "go.opentelemetry.io/collector/exporter/otlphttpexporter", m.name) + } else { + require.Fail(t, "returned Meter not mockMeter") + } + + tracer := Tracer(set) + if m, ok := tracer.(mockTracer); ok { + require.Equal(t, "go.opentelemetry.io/collector/exporter/otlphttpexporter", m.name) + } else { + require.Fail(t, "returned Meter not mockTracer") + } +} diff --git a/exporter/otlphttpexporter/metadata.yaml b/exporter/otlphttpexporter/metadata.yaml index 14cae78d175..5e1c41d3243 100644 --- a/exporter/otlphttpexporter/metadata.yaml +++ b/exporter/otlphttpexporter/metadata.yaml @@ -6,3 +6,8 @@ status: stable: [traces, metrics] beta: [logs] distributions: [core, contrib] + +tests: + config: + endpoint: "https://1.2.3.4:1234" + diff --git a/exporter/otlphttpexporter/otlp.go b/exporter/otlphttpexporter/otlp.go index 6ebc50e2cc0..ea02be512f4 100644 --- a/exporter/otlphttpexporter/otlp.go +++ b/exporter/otlphttpexporter/otlp.go @@ -23,6 +23,7 @@ import ( "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" + "go.opentelemetry.io/collector/internal/httphelper" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/plog/plogotlp" "go.opentelemetry.io/collector/pdata/pmetric" @@ -77,8 +78,8 @@ func newExporter(cfg component.Config, set exporter.CreateSettings) (*baseExport // start actually creates the HTTP client. The client construction is deferred till this point as this // is the only place we get hold of Extensions which are required to construct auth round tripper. -func (e *baseExporter) start(_ context.Context, host component.Host) error { - client, err := e.config.ClientConfig.ToClient(host, e.settings) +func (e *baseExporter) start(ctx context.Context, host component.Host) error { + client, err := e.config.ClientConfig.ToClient(ctx, host, e.settings) if err != nil { return err } @@ -184,16 +185,18 @@ func (e *baseExporter) export(ctx context.Context, url string, request []byte, p respStatus := readResponseStatus(resp) // Format the error message. Use the status if it is present in the response. + var errString string var formattedErr error if respStatus != nil { - formattedErr = fmt.Errorf( + errString = fmt.Sprintf( "error exporting items, request to %s responded with HTTP Status Code %d, Message=%s, Details=%v", url, resp.StatusCode, respStatus.Message, respStatus.Details) } else { - formattedErr = fmt.Errorf( + errString = fmt.Sprintf( "error exporting items, request to %s responded with HTTP Status Code %d", url, resp.StatusCode) } + formattedErr = httphelper.NewStatusFromMsgAndHTTPCode(errString, resp.StatusCode).Err() if isRetryableStatusCode(resp.StatusCode) { // A retry duration of 0 seconds will trigger the default backoff policy @@ -301,6 +304,9 @@ func handlePartialSuccessResponse(resp *http.Response, partialSuccessHandler par type partialSuccessHandler func(bytes []byte, contentType string) error func (e *baseExporter) tracesPartialSuccessHandler(protoBytes []byte, contentType string) error { + if protoBytes == nil { + return nil + } exportResponse := ptraceotlp.NewExportResponse() switch contentType { case protobufContentType: @@ -328,6 +334,9 @@ func (e *baseExporter) tracesPartialSuccessHandler(protoBytes []byte, contentTyp } func (e *baseExporter) metricsPartialSuccessHandler(protoBytes []byte, contentType string) error { + if protoBytes == nil { + return nil + } exportResponse := pmetricotlp.NewExportResponse() switch contentType { case protobufContentType: @@ -355,6 +364,9 @@ func (e *baseExporter) metricsPartialSuccessHandler(protoBytes []byte, contentTy } func (e *baseExporter) logsPartialSuccessHandler(protoBytes []byte, contentType string) error { + if protoBytes == nil { + return nil + } exportResponse := plogotlp.NewExportResponse() switch contentType { case protobufContentType: diff --git a/exporter/otlphttpexporter/otlp_test.go b/exporter/otlphttpexporter/otlp_test.go index 0116803d816..e886e655482 100644 --- a/exporter/otlphttpexporter/otlp_test.go +++ b/exporter/otlphttpexporter/otlp_test.go @@ -37,6 +37,41 @@ import ( "go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp" ) +const tracesTelemetryType = "traces" +const metricsTelemetryType = "metrics" +const logsTelemetryType = "logs" + +type responseSerializer interface { + MarshalJSON() ([]byte, error) + MarshalProto() ([]byte, error) +} + +type responseSerializerProvider = func() responseSerializer + +func provideTracesResponseSerializer() responseSerializer { + response := ptraceotlp.NewExportResponse() + partial := response.PartialSuccess() + partial.SetErrorMessage("hello") + partial.SetRejectedSpans(1) + return response +} + +func provideMetricsResponseSerializer() responseSerializer { + response := pmetricotlp.NewExportResponse() + partial := response.PartialSuccess() + partial.SetErrorMessage("hello") + partial.SetRejectedDataPoints(1) + return response +} + +func provideLogsResponseSerializer() responseSerializer { + response := plogotlp.NewExportResponse() + partial := response.PartialSuccess() + partial.SetErrorMessage("hello") + partial.SetRejectedLogRecords(1) + return response +} + func TestErrorResponses(t *testing.T) { errMsgPrefix := func(srv *httptest.Server) string { return fmt.Sprintf("error exporting items, request to %s/v1/traces responded with HTTP Status Code ", srv.URL) @@ -93,12 +128,12 @@ func TestErrorResponses(t *testing.T) { isPermErr: true, }, { - name: "419", + name: "429", responseStatus: http.StatusTooManyRequests, - responseBody: status.New(codes.InvalidArgument, "Quota exceeded"), + responseBody: status.New(codes.ResourceExhausted, "Quota exceeded"), err: func(srv *httptest.Server) error { return exporterhelper.NewThrottleRetry( - errors.New(errMsgPrefix(srv)+"429, Message=Quota exceeded, Details=[]"), + status.New(codes.ResourceExhausted, errMsgPrefix(srv)+"429, Message=Quota exceeded, Details=[]").Err(), time.Duration(0)*time.Second) }, }, @@ -114,7 +149,7 @@ func TestErrorResponses(t *testing.T) { responseBody: status.New(codes.InvalidArgument, "Bad gateway"), err: func(srv *httptest.Server) error { return exporterhelper.NewThrottleRetry( - errors.New(errMsgPrefix(srv)+"502, Message=Bad gateway, Details=[]"), + status.New(codes.Unavailable, errMsgPrefix(srv)+"502, Message=Bad gateway, Details=[]").Err(), time.Duration(0)*time.Second) }, }, @@ -124,7 +159,7 @@ func TestErrorResponses(t *testing.T) { responseBody: status.New(codes.InvalidArgument, "Server overloaded"), err: func(srv *httptest.Server) error { return exporterhelper.NewThrottleRetry( - errors.New(errMsgPrefix(srv)+"503, Message=Server overloaded, Details=[]"), + status.New(codes.Unavailable, errMsgPrefix(srv)+"503, Message=Server overloaded, Details=[]").Err(), time.Duration(0)*time.Second) }, }, @@ -135,7 +170,7 @@ func TestErrorResponses(t *testing.T) { headers: map[string]string{"Retry-After": "30"}, err: func(srv *httptest.Server) error { return exporterhelper.NewThrottleRetry( - errors.New(errMsgPrefix(srv)+"503, Message=Server overloaded, Details=[]"), + status.New(codes.Unavailable, errMsgPrefix(srv)+"503, Message=Server overloaded, Details=[]").Err(), time.Duration(30)*time.Second) }, }, @@ -145,7 +180,7 @@ func TestErrorResponses(t *testing.T) { responseBody: status.New(codes.InvalidArgument, "Gateway timeout"), err: func(srv *httptest.Server) error { return exporterhelper.NewThrottleRetry( - errors.New(errMsgPrefix(srv)+"504, Message=Gateway timeout, Details=[]"), + status.New(codes.Unavailable, errMsgPrefix(srv)+"504, Message=Gateway timeout, Details=[]").Err(), time.Duration(0)*time.Second) }, }, @@ -155,7 +190,7 @@ func TestErrorResponses(t *testing.T) { responseBody: status.New(codes.InvalidArgument, strings.Repeat("a", maxHTTPResponseReadBytes+1)), err: func(srv *httptest.Server) error { return exporterhelper.NewThrottleRetry( - errors.New(errMsgPrefix(srv)+"503"), + status.New(codes.Unavailable, errMsgPrefix(srv)+"503").Err(), time.Duration(0)*time.Second) }, }, @@ -467,22 +502,66 @@ func TestPartialResponse_missingHeaderButHasBody(t *testing.T) { exp, err := newExporter(cfg, set) require.NoError(t, err) - response := ptraceotlp.NewExportResponse() - partial := response.PartialSuccess() - partial.SetErrorMessage("hello") - partial.SetRejectedSpans(1) - data, err := response.MarshalProto() - require.NoError(t, err) - resp := &http.Response{ - // `-1` indicates a missing Content-Length header in the Go http standard library - ContentLength: -1, - Body: io.NopCloser(bytes.NewReader(data)), - Header: map[string][]string{ - "Content-Type": {"application/x-protobuf"}, + contentTypes := []struct { + contentType string + }{ + {contentType: protobufContentType}, + {contentType: jsonContentType}, + } + + telemetryTypes := []struct { + telemetryType string + handler partialSuccessHandler + serializer responseSerializerProvider + }{ + { + telemetryType: tracesTelemetryType, + handler: exp.tracesPartialSuccessHandler, + serializer: provideTracesResponseSerializer, + }, + { + telemetryType: metricsTelemetryType, + handler: exp.metricsPartialSuccessHandler, + serializer: provideMetricsResponseSerializer, + }, + { + telemetryType: logsTelemetryType, + handler: exp.logsPartialSuccessHandler, + serializer: provideLogsResponseSerializer, }, } - err = handlePartialSuccessResponse(resp, exp.tracesPartialSuccessHandler) - assert.NoError(t, err) + + for _, ct := range contentTypes { + for _, tt := range telemetryTypes { + t.Run(tt.telemetryType+" "+ct.contentType, func(t *testing.T) { + serializer := tt.serializer() + + var data []byte + var err error + + switch ct.contentType { + case jsonContentType: + data, err = serializer.MarshalJSON() + case protobufContentType: + data, err = serializer.MarshalProto() + default: + require.Fail(t, "unsupported content type: %s", ct.contentType) + } + require.NoError(t, err) + + resp := &http.Response{ + // `-1` indicates a missing Content-Length header in the Go http standard library + ContentLength: -1, + Body: io.NopCloser(bytes.NewReader(data)), + Header: map[string][]string{ + "Content-Type": {ct.contentType}, + }, + } + err = handlePartialSuccessResponse(resp, tt.handler) + assert.NoError(t, err) + }) + } + } } func TestPartialResponse_missingHeaderAndBody(t *testing.T) { @@ -491,16 +570,47 @@ func TestPartialResponse_missingHeaderAndBody(t *testing.T) { exp, err := newExporter(cfg, set) require.NoError(t, err) - resp := &http.Response{ - // `-1` indicates a missing Content-Length header in the Go http standard library - ContentLength: -1, - Body: io.NopCloser(bytes.NewReader([]byte{})), - Header: map[string][]string{ - "Content-Type": {"application/x-protobuf"}, + contentTypes := []struct { + contentType string + }{ + {contentType: protobufContentType}, + {contentType: jsonContentType}, + } + + telemetryTypes := []struct { + telemetryType string + handler partialSuccessHandler + }{ + { + telemetryType: tracesTelemetryType, + handler: exp.tracesPartialSuccessHandler, + }, + { + telemetryType: metricsTelemetryType, + handler: exp.metricsPartialSuccessHandler, + }, + { + telemetryType: logsTelemetryType, + handler: exp.logsPartialSuccessHandler, }, } - err = handlePartialSuccessResponse(resp, exp.tracesPartialSuccessHandler) - assert.Nil(t, err) + + for _, ct := range contentTypes { + for _, tt := range telemetryTypes { + t.Run(tt.telemetryType+" "+ct.contentType, func(t *testing.T) { + resp := &http.Response{ + // `-1` indicates a missing Content-Length header in the Go http standard library + ContentLength: -1, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{ + "Content-Type": {ct.contentType}, + }, + } + err = handlePartialSuccessResponse(resp, tt.handler) + assert.Nil(t, err) + }) + } + } } func TestPartialResponse_nonErrUnexpectedEOFError(t *testing.T) { @@ -524,53 +634,147 @@ func TestPartialSuccess_shortContentLengthHeader(t *testing.T) { exp, err := newExporter(cfg, set) require.NoError(t, err) - response := ptraceotlp.NewExportResponse() - partial := response.PartialSuccess() - partial.SetErrorMessage("hello") - partial.SetRejectedSpans(1) - data, err := response.MarshalProto() - require.NoError(t, err) - resp := &http.Response{ - ContentLength: 3, - Body: io.NopCloser(bytes.NewReader(data)), - Header: map[string][]string{ - "Content-Type": {"application/x-protobuf"}, + contentTypes := []struct { + contentType string + }{ + {contentType: protobufContentType}, + {contentType: jsonContentType}, + } + + telemetryTypes := []struct { + telemetryType string + handler partialSuccessHandler + serializer responseSerializerProvider + }{ + { + telemetryType: tracesTelemetryType, + handler: exp.tracesPartialSuccessHandler, + serializer: provideTracesResponseSerializer, + }, + { + telemetryType: metricsTelemetryType, + handler: exp.metricsPartialSuccessHandler, + serializer: provideMetricsResponseSerializer, + }, + { + telemetryType: logsTelemetryType, + handler: exp.logsPartialSuccessHandler, + serializer: provideLogsResponseSerializer, }, } - // For short content-length, a real error happens. - err = handlePartialSuccessResponse(resp, exp.tracesPartialSuccessHandler) - assert.Error(t, err) + + for _, ct := range contentTypes { + for _, tt := range telemetryTypes { + t.Run(tt.telemetryType+" "+ct.contentType, func(t *testing.T) { + serializer := tt.serializer() + + var data []byte + var err error + + switch ct.contentType { + case jsonContentType: + data, err = serializer.MarshalJSON() + case protobufContentType: + data, err = serializer.MarshalProto() + default: + require.Fail(t, "unsupported content type: %s", ct.contentType) + } + require.NoError(t, err) + + resp := &http.Response{ + ContentLength: 3, + Body: io.NopCloser(bytes.NewReader(data)), + Header: map[string][]string{ + "Content-Type": {ct.contentType}, + }, + } + // For short content-length, a real error happens. + err = handlePartialSuccessResponse(resp, tt.handler) + assert.Error(t, err) + }) + } + } } func TestPartialSuccess_longContentLengthHeader(t *testing.T) { - cfg := createDefaultConfig() - set := exportertest.NewNopCreateSettings() + contentTypes := []struct { + contentType string + }{ + {contentType: protobufContentType}, + {contentType: jsonContentType}, + } - logger, observed := observer.New(zap.DebugLevel) - set.TelemetrySettings.Logger = zap.New(logger) + telemetryTypes := []struct { + telemetryType string + serializer responseSerializerProvider + }{ + { + telemetryType: tracesTelemetryType, + serializer: provideTracesResponseSerializer, + }, + { + telemetryType: metricsTelemetryType, + serializer: provideMetricsResponseSerializer, + }, + { + telemetryType: logsTelemetryType, + serializer: provideLogsResponseSerializer, + }, + } - exp, err := newExporter(cfg, set) - require.NoError(t, err) + for _, ct := range contentTypes { + for _, tt := range telemetryTypes { + t.Run(tt.telemetryType+" "+ct.contentType, func(t *testing.T) { + cfg := createDefaultConfig() + set := exportertest.NewNopCreateSettings() + logger, observed := observer.New(zap.DebugLevel) + set.TelemetrySettings.Logger = zap.New(logger) + exp, err := newExporter(cfg, set) + require.NoError(t, err) - response := ptraceotlp.NewExportResponse() - partial := response.PartialSuccess() - partial.SetErrorMessage("hello") - partial.SetRejectedSpans(1) - data, err := response.MarshalProto() - require.NoError(t, err) - resp := &http.Response{ - ContentLength: 4096, - Body: io.NopCloser(bytes.NewReader(data)), - Header: map[string][]string{ - "Content-Type": {"application/x-protobuf"}, - }, + serializer := tt.serializer() + + var handler partialSuccessHandler + + switch tt.telemetryType { + case tracesTelemetryType: + handler = exp.tracesPartialSuccessHandler + case metricsTelemetryType: + handler = exp.metricsPartialSuccessHandler + case logsTelemetryType: + handler = exp.logsPartialSuccessHandler + default: + require.Fail(t, "unsupported telemetry type: %s", ct.contentType) + } + + var data []byte + + switch ct.contentType { + case jsonContentType: + data, err = serializer.MarshalJSON() + case protobufContentType: + data, err = serializer.MarshalProto() + default: + require.Fail(t, "unsupported content type: %s", ct.contentType) + } + require.NoError(t, err) + + resp := &http.Response{ + ContentLength: 4096, + Body: io.NopCloser(bytes.NewReader(data)), + Header: map[string][]string{ + "Content-Type": {ct.contentType}, + }, + } + // No real error happens for long content length, so the partial + // success is handled as success with a warning. + err = handlePartialSuccessResponse(resp, handler) + assert.NoError(t, err) + assert.Len(t, observed.FilterLevelExact(zap.WarnLevel).All(), 1) + assert.Contains(t, observed.FilterLevelExact(zap.WarnLevel).All()[0].Message, "Partial success") + }) + } } - // No real error happens for long content length, so the partial - // success is handled as success with a warning. - err = handlePartialSuccessResponse(resp, exp.tracesPartialSuccessHandler) - assert.NoError(t, err) - assert.Len(t, observed.FilterLevelExact(zap.WarnLevel).All(), 1) - assert.Contains(t, observed.FilterLevelExact(zap.WarnLevel).All()[0].Message, "Partial success") } func TestPartialSuccessInvalidResponseBody(t *testing.T) { diff --git a/extension/auth/go.mod b/extension/auth/go.mod index 8b1b0ba6a45..661499d5720 100644 --- a/extension/auth/go.mod +++ b/extension/auth/go.mod @@ -3,11 +3,11 @@ module go.opentelemetry.io/collector/extension/auth go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.96.0 - go.opentelemetry.io/collector/extension v0.96.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.100.0 + go.opentelemetry.io/collector/extension v0.100.0 go.uber.org/goleak v1.3.0 - google.golang.org/grpc v1.62.0 + google.golang.org/grpc v1.63.2 ) require ( @@ -18,33 +18,32 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.19.0 // indirect - github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect - go.opentelemetry.io/collector/confmap v0.96.0 // indirect - go.opentelemetry.io/collector/pdata v1.3.0 // indirect - go.opentelemetry.io/otel v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect - go.opentelemetry.io/otel/metric v1.24.0 // indirect - go.opentelemetry.io/otel/sdk v1.24.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect - go.opentelemetry.io/otel/trace v1.24.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect + go.opentelemetry.io/collector/confmap v0.100.0 // indirect + go.opentelemetry.io/collector/pdata v1.7.0 // indirect + go.opentelemetry.io/otel v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect + go.opentelemetry.io/otel/metric v1.26.0 // indirect + go.opentelemetry.io/otel/sdk v1.26.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + go.opentelemetry.io/otel/trace v1.26.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/net v0.20.0 // indirect - golang.org/x/sys v0.17.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/protobuf v1.34.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/auth/go.sum b/extension/auth/go.sum index 2f664245ecd..5467b123e44 100644 --- a/extension/auth/go.sum +++ b/extension/auth/go.sum @@ -13,10 +13,6 @@ github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsM github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -25,8 +21,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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= @@ -39,30 +35,30 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= -go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -78,16 +74,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -100,14 +96,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/extension/ballastextension/generated_component_test.go b/extension/ballastextension/generated_component_test.go new file mode 100644 index 00000000000..779e5631778 --- /dev/null +++ b/extension/ballastextension/generated_component_test.go @@ -0,0 +1,51 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package ballastextension + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentFactoryType(t *testing.T) { + require.Equal(t, "memory_ballast", NewFactory().Type().String()) +} + +func TestComponentConfigStruct(t *testing.T) { + require.NoError(t, componenttest.CheckConfigStruct(NewFactory().CreateDefaultConfig())) +} + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + cm, err := confmaptest.LoadConf("metadata.yaml") + require.NoError(t, err) + cfg := factory.CreateDefaultConfig() + sub, err := cm.Sub("tests::config") + require.NoError(t, err) + require.NoError(t, component.UnmarshalConfig(sub, cfg)) + t.Run("shutdown", func(t *testing.T) { + e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run("lifecycle", func(t *testing.T) { + firstExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, firstExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, firstExt.Shutdown(context.Background())) + + secondExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, secondExt.Shutdown(context.Background())) + }) +} diff --git a/extension/ballastextension/package_test.go b/extension/ballastextension/generated_package_test.go similarity index 62% rename from extension/ballastextension/package_test.go rename to extension/ballastextension/generated_package_test.go index 9035e22edbc..3f80a3e2754 100644 --- a/extension/ballastextension/package_test.go +++ b/extension/ballastextension/generated_package_test.go @@ -1,5 +1,4 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 +// Code generated by mdatagen. DO NOT EDIT. package ballastextension diff --git a/extension/ballastextension/go.mod b/extension/ballastextension/go.mod index a6035aa3fca..8d895a863d1 100644 --- a/extension/ballastextension/go.mod +++ b/extension/ballastextension/go.mod @@ -4,13 +4,13 @@ module go.opentelemetry.io/collector/extension/ballastextension go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.96.0 - go.opentelemetry.io/collector/component v0.96.0 - go.opentelemetry.io/collector/confmap v0.96.0 - go.opentelemetry.io/collector/extension v0.96.0 - go.opentelemetry.io/otel/metric v1.24.0 - go.opentelemetry.io/otel/trace v1.24.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector v0.100.0 + go.opentelemetry.io/collector/component v0.100.0 + go.opentelemetry.io/collector/confmap v0.100.0 + go.opentelemetry.io/collector/extension v0.100.0 + go.opentelemetry.io/otel/metric v1.26.0 + go.opentelemetry.io/otel/trace v1.26.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 ) @@ -24,36 +24,36 @@ require ( github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/prometheus/client_golang v1.19.0 // indirect - github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - github.com/shirou/gopsutil/v3 v3.24.1 // indirect + github.com/shirou/gopsutil/v3 v3.24.3 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect - github.com/yusufpapurcu/wmi v1.2.3 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect - go.opentelemetry.io/collector/pdata v1.3.0 // indirect - go.opentelemetry.io/otel v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect - go.opentelemetry.io/otel/sdk v1.24.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect + go.opentelemetry.io/collector/pdata v1.7.0 // indirect + go.opentelemetry.io/otel v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect + go.opentelemetry.io/otel/sdk v1.26.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/sys v0.17.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/grpc v1.62.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.34.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -77,3 +77,5 @@ retract ( ) replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry + +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata diff --git a/extension/ballastextension/go.sum b/extension/ballastextension/go.sum index 9394f812d28..6d9bf441a16 100644 --- a/extension/ballastextension/go.sum +++ b/extension/ballastextension/go.sum @@ -16,22 +16,20 @@ github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsM github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +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/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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= @@ -48,45 +46,47 @@ github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/shirou/gopsutil/v3 v3.24.1 h1:R3t6ondCEvmARp3wxODhXMTLC/klMa87h2PHUw5m7QI= -github.com/shirou/gopsutil/v3 v3.24.1/go.mod h1:UU7a2MSBQa+kW1uuDq8DeEBS8kmrnQwsv2b5O513rwU= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 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.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= -go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -102,8 +102,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -114,9 +114,9 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -129,14 +129,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/extension/ballastextension/internal/metadata/generated_status.go b/extension/ballastextension/internal/metadata/generated_status.go index c6407064c52..54e3d38805d 100644 --- a/extension/ballastextension/internal/metadata/generated_status.go +++ b/extension/ballastextension/internal/metadata/generated_status.go @@ -3,25 +3,13 @@ package metadata import ( - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" ) var ( - Type = component.MustNewType("memory_ballast") - scopeName = "go.opentelemetry.io/collector/extension/ballastextension" + Type = component.MustNewType("memory_ballast") ) const ( ExtensionStability = component.StabilityLevelDeprecated ) - -func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter(scopeName) -} - -func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer(scopeName) -} diff --git a/extension/ballastextension/internal/metadata/generated_telemetry.go b/extension/ballastextension/internal/metadata/generated_telemetry.go new file mode 100644 index 00000000000..ddd7d808462 --- /dev/null +++ b/extension/ballastextension/internal/metadata/generated_telemetry.go @@ -0,0 +1,18 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("go.opentelemetry.io/collector/extension/ballastextension") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/extension/ballastextension") +} diff --git a/extension/ballastextension/internal/metadata/generated_telemetry_test.go b/extension/ballastextension/internal/metadata/generated_telemetry_test.go new file mode 100644 index 00000000000..6eeac05298b --- /dev/null +++ b/extension/ballastextension/internal/metadata/generated_telemetry_test.go @@ -0,0 +1,63 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/otel/metric" + embeddedmetric "go.opentelemetry.io/otel/metric/embedded" + noopmetric "go.opentelemetry.io/otel/metric/noop" + "go.opentelemetry.io/otel/trace" + embeddedtrace "go.opentelemetry.io/otel/trace/embedded" + nooptrace "go.opentelemetry.io/otel/trace/noop" + + "go.opentelemetry.io/collector/component" +) + +type mockMeter struct { + noopmetric.Meter + name string +} +type mockMeterProvider struct { + embeddedmetric.MeterProvider +} + +func (m mockMeterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter { + return mockMeter{name: name} +} + +type mockTracer struct { + nooptrace.Tracer + name string +} + +type mockTracerProvider struct { + embeddedtrace.TracerProvider +} + +func (m mockTracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { + return mockTracer{name: name} +} + +func TestProviders(t *testing.T) { + set := component.TelemetrySettings{ + MeterProvider: mockMeterProvider{}, + TracerProvider: mockTracerProvider{}, + } + + meter := Meter(set) + if m, ok := meter.(mockMeter); ok { + require.Equal(t, "go.opentelemetry.io/collector/extension/ballastextension", m.name) + } else { + require.Fail(t, "returned Meter not mockMeter") + } + + tracer := Tracer(set) + if m, ok := tracer.(mockTracer); ok { + require.Equal(t, "go.opentelemetry.io/collector/extension/ballastextension", m.name) + } else { + require.Fail(t, "returned Meter not mockTracer") + } +} diff --git a/extension/extensiontest/nop_extension.go b/extension/extensiontest/nop_extension.go index f92ff388d94..134eee042a7 100644 --- a/extension/extensiontest/nop_extension.go +++ b/extension/extensiontest/nop_extension.go @@ -6,6 +6,8 @@ package extensiontest // import "go.opentelemetry.io/collector/extension/extensi import ( "context" + "github.com/google/uuid" + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/extension" @@ -16,7 +18,7 @@ var nopType = component.MustNewType("nop") // NewNopCreateSettings returns a new nop settings for extension.Factory Create* functions. func NewNopCreateSettings() extension.CreateSettings { return extension.CreateSettings{ - ID: component.NewID(nopType), + ID: component.NewIDWithName(nopType, uuid.NewString()), TelemetrySettings: componenttest.NewNopTelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo(), } diff --git a/extension/go.mod b/extension/go.mod index 61adfe39b85..c6f3813997e 100644 --- a/extension/go.mod +++ b/extension/go.mod @@ -3,9 +3,10 @@ module go.opentelemetry.io/collector/extension go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.96.0 - go.opentelemetry.io/collector/confmap v0.96.0 + github.com/google/uuid v1.6.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.100.0 + go.opentelemetry.io/collector/confmap v0.100.0 go.uber.org/goleak v1.3.0 ) @@ -17,33 +18,32 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.19.0 // indirect - github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect - go.opentelemetry.io/collector/pdata v1.3.0 // indirect - go.opentelemetry.io/otel v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect - go.opentelemetry.io/otel/metric v1.24.0 // indirect - go.opentelemetry.io/otel/sdk v1.24.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect - go.opentelemetry.io/otel/trace v1.24.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect + go.opentelemetry.io/collector/pdata v1.7.0 // indirect + go.opentelemetry.io/otel v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect + go.opentelemetry.io/otel/metric v1.26.0 // indirect + go.opentelemetry.io/otel/sdk v1.26.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + go.opentelemetry.io/otel/trace v1.26.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/net v0.20.0 // indirect - golang.org/x/sys v0.17.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/grpc v1.62.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.34.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/go.sum b/extension/go.sum index 2f664245ecd..a0f02ecceb9 100644 --- a/extension/go.sum +++ b/extension/go.sum @@ -13,20 +13,18 @@ github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsM github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +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/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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= @@ -39,30 +37,30 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= -go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -78,16 +76,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -100,14 +98,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/extension/memorylimiterextension/generated_component_test.go b/extension/memorylimiterextension/generated_component_test.go new file mode 100644 index 00000000000..7580d8a30c9 --- /dev/null +++ b/extension/memorylimiterextension/generated_component_test.go @@ -0,0 +1,45 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package memorylimiterextension + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentFactoryType(t *testing.T) { + require.Equal(t, "memory_limiter", NewFactory().Type().String()) +} + +func TestComponentConfigStruct(t *testing.T) { + require.NoError(t, componenttest.CheckConfigStruct(NewFactory().CreateDefaultConfig())) +} + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + cm, err := confmaptest.LoadConf("metadata.yaml") + require.NoError(t, err) + cfg := factory.CreateDefaultConfig() + sub, err := cm.Sub("tests::config") + require.NoError(t, err) + require.NoError(t, component.UnmarshalConfig(sub, cfg)) + t.Run("lifecycle", func(t *testing.T) { + firstExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, firstExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, firstExt.Shutdown(context.Background())) + + secondExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, secondExt.Shutdown(context.Background())) + }) +} diff --git a/extension/memorylimiterextension/generated_package_test.go b/extension/memorylimiterextension/generated_package_test.go new file mode 100644 index 00000000000..92a130658b4 --- /dev/null +++ b/extension/memorylimiterextension/generated_package_test.go @@ -0,0 +1,13 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package memorylimiterextension + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/memorylimiterextension/go.mod b/extension/memorylimiterextension/go.mod index b44b779bdc9..3a10b662bd5 100644 --- a/extension/memorylimiterextension/go.mod +++ b/extension/memorylimiterextension/go.mod @@ -3,12 +3,14 @@ module go.opentelemetry.io/collector/extension/memorylimiterextension go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.96.0 - go.opentelemetry.io/collector/component v0.96.0 - go.opentelemetry.io/collector/extension v0.96.0 - go.opentelemetry.io/otel/metric v1.24.0 - go.opentelemetry.io/otel/trace v1.24.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector v0.100.0 + go.opentelemetry.io/collector/component v0.100.0 + go.opentelemetry.io/collector/confmap v0.100.0 + go.opentelemetry.io/collector/extension v0.100.0 + go.opentelemetry.io/otel/metric v1.26.0 + go.opentelemetry.io/otel/trace v1.26.0 + go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 ) @@ -21,37 +23,36 @@ require ( github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/prometheus/client_golang v1.19.0 // indirect - github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - github.com/shirou/gopsutil/v3 v3.24.1 // indirect + github.com/shirou/gopsutil/v3 v3.24.3 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect - github.com/yusufpapurcu/wmi v1.2.3 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect - go.opentelemetry.io/collector/confmap v0.96.0 // indirect - go.opentelemetry.io/collector/pdata v1.3.0 // indirect - go.opentelemetry.io/otel v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect - go.opentelemetry.io/otel/sdk v1.24.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect + go.opentelemetry.io/collector/pdata v1.7.0 // indirect + go.opentelemetry.io/otel v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect + go.opentelemetry.io/otel/sdk v1.26.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/sys v0.17.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/grpc v1.62.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.34.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -70,3 +71,5 @@ replace go.opentelemetry.io/collector/pdata => ../../pdata replace go.opentelemetry.io/collector/consumer => ../../consumer replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry + +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata diff --git a/extension/memorylimiterextension/go.sum b/extension/memorylimiterextension/go.sum index 9394f812d28..6d9bf441a16 100644 --- a/extension/memorylimiterextension/go.sum +++ b/extension/memorylimiterextension/go.sum @@ -16,22 +16,20 @@ github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsM github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +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/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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= @@ -48,45 +46,47 @@ github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/shirou/gopsutil/v3 v3.24.1 h1:R3t6ondCEvmARp3wxODhXMTLC/klMa87h2PHUw5m7QI= -github.com/shirou/gopsutil/v3 v3.24.1/go.mod h1:UU7a2MSBQa+kW1uuDq8DeEBS8kmrnQwsv2b5O513rwU= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 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.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= -go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -102,8 +102,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -114,9 +114,9 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -129,14 +129,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/extension/memorylimiterextension/internal/metadata/generated_status.go b/extension/memorylimiterextension/internal/metadata/generated_status.go index 5f0f98ec044..21472c5d5aa 100644 --- a/extension/memorylimiterextension/internal/metadata/generated_status.go +++ b/extension/memorylimiterextension/internal/metadata/generated_status.go @@ -3,25 +3,13 @@ package metadata import ( - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" ) var ( - Type = component.MustNewType("memory_limiter") - scopeName = "go.opentelemetry.io/collector/extension/memorylimiterextension" + Type = component.MustNewType("memory_limiter") ) const ( ExtensionStability = component.StabilityLevelDevelopment ) - -func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter(scopeName) -} - -func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer(scopeName) -} diff --git a/extension/memorylimiterextension/internal/metadata/generated_telemetry.go b/extension/memorylimiterextension/internal/metadata/generated_telemetry.go new file mode 100644 index 00000000000..c90ad7e67da --- /dev/null +++ b/extension/memorylimiterextension/internal/metadata/generated_telemetry.go @@ -0,0 +1,18 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("go.opentelemetry.io/collector/extension/memorylimiterextension") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/extension/memorylimiterextension") +} diff --git a/extension/memorylimiterextension/internal/metadata/generated_telemetry_test.go b/extension/memorylimiterextension/internal/metadata/generated_telemetry_test.go new file mode 100644 index 00000000000..b2c1e454273 --- /dev/null +++ b/extension/memorylimiterextension/internal/metadata/generated_telemetry_test.go @@ -0,0 +1,63 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/otel/metric" + embeddedmetric "go.opentelemetry.io/otel/metric/embedded" + noopmetric "go.opentelemetry.io/otel/metric/noop" + "go.opentelemetry.io/otel/trace" + embeddedtrace "go.opentelemetry.io/otel/trace/embedded" + nooptrace "go.opentelemetry.io/otel/trace/noop" + + "go.opentelemetry.io/collector/component" +) + +type mockMeter struct { + noopmetric.Meter + name string +} +type mockMeterProvider struct { + embeddedmetric.MeterProvider +} + +func (m mockMeterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter { + return mockMeter{name: name} +} + +type mockTracer struct { + nooptrace.Tracer + name string +} + +type mockTracerProvider struct { + embeddedtrace.TracerProvider +} + +func (m mockTracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { + return mockTracer{name: name} +} + +func TestProviders(t *testing.T) { + set := component.TelemetrySettings{ + MeterProvider: mockMeterProvider{}, + TracerProvider: mockTracerProvider{}, + } + + meter := Meter(set) + if m, ok := meter.(mockMeter); ok { + require.Equal(t, "go.opentelemetry.io/collector/extension/memorylimiterextension", m.name) + } else { + require.Fail(t, "returned Meter not mockMeter") + } + + tracer := Tracer(set) + if m, ok := tracer.(mockTracer); ok { + require.Equal(t, "go.opentelemetry.io/collector/extension/memorylimiterextension", m.name) + } else { + require.Fail(t, "returned Meter not mockTracer") + } +} diff --git a/extension/memorylimiterextension/metadata.yaml b/extension/memorylimiterextension/metadata.yaml index 75f16b8f750..26cafc9b5ad 100644 --- a/extension/memorylimiterextension/metadata.yaml +++ b/extension/memorylimiterextension/metadata.yaml @@ -5,3 +5,11 @@ status: stability: development: [extension] distributions: [] + +tests: + config: + check_interval: 5s + limit_mib: 400 + spike_limit_mib: 50 + # TODO: https://github.com/open-telemetry/opentelemetry-collector/issues/9686 + skip_shutdown: true diff --git a/extension/zpagesextension/generated_component_test.go b/extension/zpagesextension/generated_component_test.go new file mode 100644 index 00000000000..df6ede48a05 --- /dev/null +++ b/extension/zpagesextension/generated_component_test.go @@ -0,0 +1,51 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package zpagesextension + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentFactoryType(t *testing.T) { + require.Equal(t, "zpages", NewFactory().Type().String()) +} + +func TestComponentConfigStruct(t *testing.T) { + require.NoError(t, componenttest.CheckConfigStruct(NewFactory().CreateDefaultConfig())) +} + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + cm, err := confmaptest.LoadConf("metadata.yaml") + require.NoError(t, err) + cfg := factory.CreateDefaultConfig() + sub, err := cm.Sub("tests::config") + require.NoError(t, err) + require.NoError(t, component.UnmarshalConfig(sub, cfg)) + t.Run("shutdown", func(t *testing.T) { + e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run("lifecycle", func(t *testing.T) { + firstExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, firstExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, firstExt.Shutdown(context.Background())) + + secondExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, secondExt.Shutdown(context.Background())) + }) +} diff --git a/extension/zpagesextension/package_test.go b/extension/zpagesextension/generated_package_test.go similarity index 62% rename from extension/zpagesextension/package_test.go rename to extension/zpagesextension/generated_package_test.go index 40ce0f11cc4..a34cf6a2031 100644 --- a/extension/zpagesextension/package_test.go +++ b/extension/zpagesextension/generated_package_test.go @@ -1,5 +1,4 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 +// Code generated by mdatagen. DO NOT EDIT. package zpagesextension diff --git a/extension/zpagesextension/go.mod b/extension/zpagesextension/go.mod index 4e795a8d6ac..1af25bfbed5 100644 --- a/extension/zpagesextension/go.mod +++ b/extension/zpagesextension/go.mod @@ -3,60 +3,63 @@ module go.opentelemetry.io/collector/extension/zpagesextension go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.96.0 - go.opentelemetry.io/collector/component v0.96.0 - go.opentelemetry.io/collector/config/confignet v0.96.0 - go.opentelemetry.io/collector/confmap v0.96.0 - go.opentelemetry.io/collector/extension v0.96.0 - go.opentelemetry.io/contrib/zpages v0.49.0 - go.opentelemetry.io/otel/metric v1.24.0 - go.opentelemetry.io/otel/sdk v1.24.0 - go.opentelemetry.io/otel/trace v1.24.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector v0.100.0 + go.opentelemetry.io/collector/component v0.100.0 + go.opentelemetry.io/collector/config/confignet v0.100.0 + go.opentelemetry.io/collector/confmap v0.100.0 + go.opentelemetry.io/collector/extension v0.100.0 + go.opentelemetry.io/contrib/zpages v0.51.0 + go.opentelemetry.io/otel/metric v1.26.0 + go.opentelemetry.io/otel/sdk v1.26.0 + go.opentelemetry.io/otel/trace v1.26.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.19.0 // indirect - github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect - go.opentelemetry.io/collector/pdata v1.3.0 // indirect - go.opentelemetry.io/contrib/config v0.4.0 // indirect - go.opentelemetry.io/otel v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect - go.opentelemetry.io/proto/otlp v1.1.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect + go.opentelemetry.io/collector/pdata v1.7.0 // indirect + go.opentelemetry.io/contrib/config v0.6.0 // indirect + go.opentelemetry.io/otel v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + go.opentelemetry.io/proto/otlp v1.2.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/sys v0.17.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/grpc v1.62.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.34.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -82,3 +85,5 @@ retract ( ) replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry + +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata diff --git a/extension/zpagesextension/go.sum b/extension/zpagesextension/go.sum index 1210952ad72..fe7454c4610 100644 --- a/extension/zpagesextension/go.sum +++ b/extension/zpagesextension/go.sum @@ -1,7 +1,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -15,22 +15,20 @@ github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsM github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= +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/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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= @@ -43,44 +41,50 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= -go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= -go.opentelemetry.io/contrib/zpages v0.49.0 h1:Wk217PkNBxcKWnIQpwtbZZE286K4ZY9uajnM5woSeLU= -go.opentelemetry.io/contrib/zpages v0.49.0/go.mod h1:6alLi5mmkZWbAtZMRPd1ffIgkTcsU9OTHQF2NbSOhrQ= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 h1:Mw5xcxMwlqoJd97vwPxA8isEaIoxsta9/Q51+TTJLGE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0/go.mod h1:CQNu9bj7o7mC6U7+CA/schKEYakYXWr79ucDHTMGhCM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 h1:s0PHtIkN+3xrbDOpt2M8OTG92cWqUESvzh2MxiR5xY8= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0/go.mod h1:hZlFbDbRt++MMPCCfSJfmhkGIWnX1h3XjkfxZUjLrIA= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= -go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= -go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= -go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= +go.opentelemetry.io/contrib/config v0.6.0 h1:M1SRD1Z15XHPGk61tMLI1up77XT5FdrqQSRrlH0fYuk= +go.opentelemetry.io/contrib/config v0.6.0/go.mod h1:t+/kzmRWLN7J+4F/dD4fFvlYCmCO63WYwy/B00IC++c= +go.opentelemetry.io/contrib/zpages v0.51.0 h1:psVr4JTWd0qtISPj9EA6AODGJ09bvsOxWiuKqiGdSCA= +go.opentelemetry.io/contrib/zpages v0.51.0/go.mod h1:PKtp+NEp1gTTLmFHpynYgYCSkKtisPntOb9S1mQjFKg= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 h1:+hm+I+KigBy3M24/h1p/NHkUx/evbLH0PNcjpMyCHc4= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0/go.mod h1:NjC8142mLvvNT6biDpaMjyz78kyEHIwAJlSX0N9P5KI= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 h1:HGZWGmCVRCVyAs2GQaiHQPbDHo+ObFWeUEOd+zDnp64= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0/go.mod h1:SaH+v38LSCHddyk7RGlU9uZyQoRrKao6IBnJw6Kbn+c= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 h1:1u/AyyOqAWzy+SkPxDpahCNZParHV8Vid1RnI2clyDE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0/go.mod h1:z46paqbJ9l7c9fIPCXTqTGwhQZ5XoTIsfeFYWboizjs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 h1:Waw9Wfpo/IXzOI8bCB7DIk+0JZcqqsyn1JFnAc+iam8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0/go.mod h1:wnJIG4fOqyynOnnQF/eQb4/16VlX2EJAHhHgqIqWfAo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 h1:1wp/gyxsuYtuE/JFxsQRtcCDtMrO2qMvlfXALU5wkzI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0/go.mod h1:gbTHmghkGgqxMomVQQMur1Nba4M0MQ8AYThXDUjsJ38= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 h1:5fnmgteaar1VcAA69huatudPduNFz7guRtCmfZCooZI= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0/go.mod h1:lsPccfZiz1cb1AhBPmicWM2E4F1VynFXEvD8SEBS4TM= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 h1:0W5o9SzoR15ocYHEQfvfipzcNog1lBxOLfnex91Hk6s= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0/go.mod h1:zVZ8nz+VSggWmnh6tTsJqXQ7rU4xLwRtna1M4x5jq58= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= +go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -96,16 +100,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -118,18 +122,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/extension/zpagesextension/internal/metadata/generated_status.go b/extension/zpagesextension/internal/metadata/generated_status.go index 21ba9b8e88e..ee7c714b77a 100644 --- a/extension/zpagesextension/internal/metadata/generated_status.go +++ b/extension/zpagesextension/internal/metadata/generated_status.go @@ -3,25 +3,13 @@ package metadata import ( - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" ) var ( - Type = component.MustNewType("zpages") - scopeName = "go.opentelemetry.io/collector/extension/zpagesextension" + Type = component.MustNewType("zpages") ) const ( ExtensionStability = component.StabilityLevelBeta ) - -func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter(scopeName) -} - -func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer(scopeName) -} diff --git a/extension/zpagesextension/internal/metadata/generated_telemetry.go b/extension/zpagesextension/internal/metadata/generated_telemetry.go new file mode 100644 index 00000000000..d545bbbe394 --- /dev/null +++ b/extension/zpagesextension/internal/metadata/generated_telemetry.go @@ -0,0 +1,18 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("go.opentelemetry.io/collector/extension/zpagesextension") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/extension/zpagesextension") +} diff --git a/extension/zpagesextension/internal/metadata/generated_telemetry_test.go b/extension/zpagesextension/internal/metadata/generated_telemetry_test.go new file mode 100644 index 00000000000..53ce3364bc1 --- /dev/null +++ b/extension/zpagesextension/internal/metadata/generated_telemetry_test.go @@ -0,0 +1,63 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/otel/metric" + embeddedmetric "go.opentelemetry.io/otel/metric/embedded" + noopmetric "go.opentelemetry.io/otel/metric/noop" + "go.opentelemetry.io/otel/trace" + embeddedtrace "go.opentelemetry.io/otel/trace/embedded" + nooptrace "go.opentelemetry.io/otel/trace/noop" + + "go.opentelemetry.io/collector/component" +) + +type mockMeter struct { + noopmetric.Meter + name string +} +type mockMeterProvider struct { + embeddedmetric.MeterProvider +} + +func (m mockMeterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter { + return mockMeter{name: name} +} + +type mockTracer struct { + nooptrace.Tracer + name string +} + +type mockTracerProvider struct { + embeddedtrace.TracerProvider +} + +func (m mockTracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { + return mockTracer{name: name} +} + +func TestProviders(t *testing.T) { + set := component.TelemetrySettings{ + MeterProvider: mockMeterProvider{}, + TracerProvider: mockTracerProvider{}, + } + + meter := Meter(set) + if m, ok := meter.(mockMeter); ok { + require.Equal(t, "go.opentelemetry.io/collector/extension/zpagesextension", m.name) + } else { + require.Fail(t, "returned Meter not mockMeter") + } + + tracer := Tracer(set) + if m, ok := tracer.(mockTracer); ok { + require.Equal(t, "go.opentelemetry.io/collector/extension/zpagesextension", m.name) + } else { + require.Fail(t, "returned Meter not mockTracer") + } +} diff --git a/featuregate/go.mod b/featuregate/go.mod index 4382445ec39..8f955c5df51 100644 --- a/featuregate/go.mod +++ b/featuregate/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/hashicorp/go-version v1.6.0 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 ) diff --git a/featuregate/go.sum b/featuregate/go.sum index f198f93ff2e..f57a6bb525d 100644 --- a/featuregate/go.sum +++ b/featuregate/go.sum @@ -16,8 +16,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= diff --git a/filter/Makefile b/filter/Makefile new file mode 100644 index 00000000000..39734bfaebb --- /dev/null +++ b/filter/Makefile @@ -0,0 +1 @@ +include ../Makefile.Common diff --git a/filter/config.go b/filter/config.go new file mode 100644 index 00000000000..e5b12c4f014 --- /dev/null +++ b/filter/config.go @@ -0,0 +1,72 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package filter // import "go.opentelemetry.io/collector/filter" + +import ( + "errors" + "regexp" +) + +// Config configures the matching behavior of a FilterSet. +type Config struct { + Strict string `mapstructure:"strict"` + Regex string `mapstructure:"regexp"` +} + +func (c Config) Validate() error { + if c.Strict == "" && c.Regex == "" { + return errors.New("must specify either strict or regex") + } + if c.Strict != "" && c.Regex != "" { + return errors.New("strict and regex cannot be used together") + } + + if c.Regex != "" { + _, err := regexp.Compile(c.Regex) + if err != nil { + return err + } + } + + return nil +} + +type CombinedFilter struct { + stricts map[any]struct{} + regexes []*regexp.Regexp +} + +// CreateFilter creates a Filter from yaml config. +func CreateFilter(configs []Config) Filter { + cf := &CombinedFilter{ + stricts: make(map[any]struct{}), + } + for _, config := range configs { + if config.Strict != "" { + cf.stricts[config.Strict] = struct{}{} + } + + if config.Regex != "" { + // Validate() call above ensures that the regex is valid. + re := regexp.MustCompile(config.Regex) + cf.regexes = append(cf.regexes, re) + } + } + return cf +} + +func (cf *CombinedFilter) Matches(toMatch any) bool { + _, ok := cf.stricts[toMatch] + if ok { + return ok + } + if str, ok := toMatch.(string); ok { + for _, re := range cf.regexes { + if re.MatchString(str) { + return true + } + } + } + return false +} diff --git a/filter/config_test.go b/filter/config_test.go new file mode 100644 index 00000000000..c321580ed40 --- /dev/null +++ b/filter/config_test.go @@ -0,0 +1,113 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package filter + +import ( + "path/filepath" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/confmap" + "go.opentelemetry.io/collector/confmap/confmaptest" +) + +func readTestdataConfigYamls(t *testing.T, filename string) map[string][]Config { + testFile := filepath.Join("testdata", filename) + v, err := confmaptest.LoadConf(testFile) + require.NoError(t, err) + + cfgs := map[string][]Config{} + require.NoErrorf(t, v.Unmarshal(&cfgs, confmap.WithIgnoreUnused()), "unable to unmarshal yaml from file %v", testFile) + return cfgs +} + +func TestConfig(t *testing.T) { + actualConfigs := readTestdataConfigYamls(t, "config.yaml") + expectedConfigs := map[string][]Config{ + "regexp/default": { + { + Regex: "one|two", + }, + }, + "strict/default": { + { + Strict: "strict", + }, + }, + } + + for testName, actualCfg := range actualConfigs { + t.Run(testName, func(t *testing.T) { + expCfg, ok := expectedConfigs[testName] + assert.True(t, ok) + assert.Equal(t, expCfg, actualCfg) + + for _, cfg := range actualCfg { + assert.NoError(t, cfg.Validate()) + } + fs := CreateFilter(actualCfg) + assert.NotNil(t, fs) + }) + } +} + +func TestMatches(t *testing.T) { + cfg := []Config{ + { + Strict: "a", + }, + { + Strict: "b", + }, + { + Regex: "a|b|c", + }, + } + + for _, c := range cfg { + assert.NoError(t, c.Validate()) + } + fs := CreateFilter(cfg) + + assert.True(t, fs.Matches("a")) + assert.True(t, fs.Matches("b")) + assert.True(t, fs.Matches("c")) +} + +func TestConfigInvalid(t *testing.T) { + actualConfigs := readTestdataConfigYamls(t, "config_invalid.yaml") + expectedConfigs := map[string][]Config{ + "invalid/regexp": { + { + Regex: "(.*[", + }, + }, + "invalid/config_empty": { + { + Regex: "", + Strict: "", + }, + }, + "invalid/config_both_set": { + { + Regex: "1", + Strict: "1", + }, + }, + } + + for testName, actualCfg := range actualConfigs { + t.Run(testName, func(t *testing.T) { + expCfg, ok := expectedConfigs[testName] + assert.True(t, ok) + assert.Equal(t, expCfg, actualCfg) + + for _, cfg := range actualCfg { + assert.Error(t, cfg.Validate()) + } + }) + } +} diff --git a/filter/doc.go b/filter/doc.go new file mode 100644 index 00000000000..3750c1ccd76 --- /dev/null +++ b/filter/doc.go @@ -0,0 +1,5 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package filter provides an interface for matching strings against a set of string filters. +package filter // import "go.opentelemetry.io/collector/filter" diff --git a/filter/filter.go b/filter/filter.go new file mode 100644 index 00000000000..4bee571fdde --- /dev/null +++ b/filter/filter.go @@ -0,0 +1,11 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package filter // import "go.opentelemetry.io/collector/filter" + +// Filter is an interface for matching values against a set of filters. +type Filter interface { + // Matches returns true if the given value matches at least one + // of the filters encapsulated by the Filter. + Matches(any) bool +} diff --git a/filter/go.mod b/filter/go.mod new file mode 100644 index 00000000000..16234c14a89 --- /dev/null +++ b/filter/go.mod @@ -0,0 +1,24 @@ +module go.opentelemetry.io/collector/filter + +go 1.21 + +require ( + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/confmap v0.100.0 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/knadh/koanf/maps v0.1.1 // indirect + github.com/knadh/koanf/providers/confmap v0.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + +replace go.opentelemetry.io/collector/confmap => ../confmap diff --git a/filter/go.sum b/filter/go.sum new file mode 100644 index 00000000000..4fac02f5c47 --- /dev/null +++ b/filter/go.sum @@ -0,0 +1,28 @@ +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-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= +github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= +github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= +github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +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= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +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= diff --git a/filter/testdata/config.yaml b/filter/testdata/config.yaml new file mode 100644 index 00000000000..82778b24f34 --- /dev/null +++ b/filter/testdata/config.yaml @@ -0,0 +1,8 @@ +# Yaml form of the configuration for Filters +# This configuration can be embedded into other component's yamls +# The top level here are just test names and do not represent part of the actual configuration. + +regexp/default: + - regexp: "one|two" +strict/default: + - strict: "strict" diff --git a/filter/testdata/config_invalid.yaml b/filter/testdata/config_invalid.yaml new file mode 100644 index 00000000000..4e7bc85e6f4 --- /dev/null +++ b/filter/testdata/config_invalid.yaml @@ -0,0 +1,12 @@ +# Yaml form of the configuration for Filters +# This configuration can be embedded into other component's yamls +# The top level here are just test names and do not represent part of the actual configuration. + +invalid/regexp: + - regexp: "(.*[" +invalid/config_empty: + - regexp: "" + strict: "" +invalid/config_both_set: + - regexp: "1" + strict: "1" diff --git a/go.mod b/go.mod index 79c836ef8ef..0b0e01d1d21 100644 --- a/go.mod +++ b/go.mod @@ -3,22 +3,24 @@ module go.opentelemetry.io/collector go 1.21 require ( - github.com/shirou/gopsutil/v3 v3.24.1 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.96.0 - go.opentelemetry.io/collector/confmap v0.96.0 - go.opentelemetry.io/collector/consumer v0.96.0 - go.opentelemetry.io/collector/featuregate v1.3.0 - go.opentelemetry.io/collector/pdata v1.3.0 - go.opentelemetry.io/contrib/config v0.4.0 + github.com/shirou/gopsutil/v3 v3.24.3 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.100.0 + go.opentelemetry.io/collector/confmap v0.100.0 + go.opentelemetry.io/collector/consumer v0.100.0 + go.opentelemetry.io/collector/featuregate v1.7.0 + go.opentelemetry.io/collector/pdata v1.7.0 + go.opentelemetry.io/collector/pdata/testdata v0.100.0 + go.opentelemetry.io/contrib/config v0.6.0 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 + google.golang.org/grpc v1.63.2 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.1 // indirect @@ -26,13 +28,12 @@ require ( github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect @@ -41,31 +42,33 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/prometheus/client_golang v1.19.0 // indirect - github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect - github.com/yusufpapurcu/wmi v1.2.3 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect - go.opentelemetry.io/otel v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 // indirect - go.opentelemetry.io/otel/metric v1.24.0 // indirect - go.opentelemetry.io/otel/sdk v1.24.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect - go.opentelemetry.io/otel/trace v1.24.0 // indirect - go.opentelemetry.io/proto/otlp v1.1.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/sys v0.17.0 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect + go.opentelemetry.io/otel v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 // indirect + go.opentelemetry.io/otel/metric v1.26.0 // indirect + go.opentelemetry.io/otel/sdk v1.26.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + go.opentelemetry.io/otel/trace v1.26.0 // indirect + go.opentelemetry.io/proto/otlp v1.2.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/grpc v1.62.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/protobuf v1.34.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -81,6 +84,8 @@ replace go.opentelemetry.io/collector/featuregate => ./featuregate replace go.opentelemetry.io/collector/pdata => ./pdata +replace go.opentelemetry.io/collector/pdata/testdata => ./pdata/testdata + retract ( v0.76.0 // Depends on retracted pdata v1.0.0-rc10 module, use v0.76.1 v0.69.0 // Release failed, use v0.69.1 diff --git a/go.sum b/go.sum index f060cc531e2..3ce50f26a17 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -18,17 +18,13 @@ github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsM github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -39,8 +35,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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= @@ -62,58 +58,66 @@ github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/shirou/gopsutil/v3 v3.24.1 h1:R3t6ondCEvmARp3wxODhXMTLC/klMa87h2PHUw5m7QI= -github.com/shirou/gopsutil/v3 v3.24.1/go.mod h1:UU7a2MSBQa+kW1uuDq8DeEBS8kmrnQwsv2b5O513rwU= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 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.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= -go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 h1:Mw5xcxMwlqoJd97vwPxA8isEaIoxsta9/Q51+TTJLGE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0/go.mod h1:CQNu9bj7o7mC6U7+CA/schKEYakYXWr79ucDHTMGhCM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 h1:s0PHtIkN+3xrbDOpt2M8OTG92cWqUESvzh2MxiR5xY8= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0/go.mod h1:hZlFbDbRt++MMPCCfSJfmhkGIWnX1h3XjkfxZUjLrIA= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= -go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= -go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= -go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.opentelemetry.io/contrib/config v0.6.0 h1:M1SRD1Z15XHPGk61tMLI1up77XT5FdrqQSRrlH0fYuk= +go.opentelemetry.io/contrib/config v0.6.0/go.mod h1:t+/kzmRWLN7J+4F/dD4fFvlYCmCO63WYwy/B00IC++c= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 h1:+hm+I+KigBy3M24/h1p/NHkUx/evbLH0PNcjpMyCHc4= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0/go.mod h1:NjC8142mLvvNT6biDpaMjyz78kyEHIwAJlSX0N9P5KI= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 h1:HGZWGmCVRCVyAs2GQaiHQPbDHo+ObFWeUEOd+zDnp64= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0/go.mod h1:SaH+v38LSCHddyk7RGlU9uZyQoRrKao6IBnJw6Kbn+c= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 h1:1u/AyyOqAWzy+SkPxDpahCNZParHV8Vid1RnI2clyDE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0/go.mod h1:z46paqbJ9l7c9fIPCXTqTGwhQZ5XoTIsfeFYWboizjs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 h1:Waw9Wfpo/IXzOI8bCB7DIk+0JZcqqsyn1JFnAc+iam8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0/go.mod h1:wnJIG4fOqyynOnnQF/eQb4/16VlX2EJAHhHgqIqWfAo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 h1:1wp/gyxsuYtuE/JFxsQRtcCDtMrO2qMvlfXALU5wkzI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0/go.mod h1:gbTHmghkGgqxMomVQQMur1Nba4M0MQ8AYThXDUjsJ38= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 h1:5fnmgteaar1VcAA69huatudPduNFz7guRtCmfZCooZI= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0/go.mod h1:lsPccfZiz1cb1AhBPmicWM2E4F1VynFXEvD8SEBS4TM= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 h1:0W5o9SzoR15ocYHEQfvfipzcNog1lBxOLfnex91Hk6s= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0/go.mod h1:zVZ8nz+VSggWmnh6tTsJqXQ7rU4xLwRtna1M4x5jq58= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= +go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -129,8 +133,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -141,9 +145,9 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -156,18 +160,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/internal/e2e/go.mod b/internal/e2e/go.mod index 70e5da18f40..7ba98c47f7d 100644 --- a/internal/e2e/go.mod +++ b/internal/e2e/go.mod @@ -3,26 +3,27 @@ module go.opentelemetry.io/collector/internal/e2e go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.96.0 - go.opentelemetry.io/collector/component v0.96.0 - go.opentelemetry.io/collector/config/configgrpc v0.96.0 - go.opentelemetry.io/collector/config/confighttp v0.96.0 - go.opentelemetry.io/collector/config/configretry v0.96.0 - go.opentelemetry.io/collector/config/configtls v0.96.0 - go.opentelemetry.io/collector/consumer v0.96.0 - go.opentelemetry.io/collector/exporter v0.96.0 - go.opentelemetry.io/collector/exporter/otlpexporter v0.95.0 - go.opentelemetry.io/collector/exporter/otlphttpexporter v0.95.0 - go.opentelemetry.io/collector/pdata v1.3.0 - go.opentelemetry.io/collector/receiver v0.96.0 - go.opentelemetry.io/collector/receiver/otlpreceiver v0.95.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector v0.100.0 + go.opentelemetry.io/collector/component v0.100.0 + go.opentelemetry.io/collector/config/configgrpc v0.100.0 + go.opentelemetry.io/collector/config/confighttp v0.100.0 + go.opentelemetry.io/collector/config/configretry v0.100.0 + go.opentelemetry.io/collector/config/configtls v0.100.0 + go.opentelemetry.io/collector/consumer v0.100.0 + go.opentelemetry.io/collector/exporter v0.100.0 + go.opentelemetry.io/collector/exporter/otlpexporter v0.99.0 + go.opentelemetry.io/collector/exporter/otlphttpexporter v0.99.0 + go.opentelemetry.io/collector/pdata v1.7.0 + go.opentelemetry.io/collector/pdata/testdata v0.100.0 + go.opentelemetry.io/collector/receiver v0.100.0 + go.opentelemetry.io/collector/receiver/otlpreceiver v0.99.0 go.uber.org/goleak v1.3.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect @@ -31,15 +32,15 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.7 // indirect + github.com/klauspost/compress v1.17.8 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect @@ -47,43 +48,46 @@ require ( github.com/mostynb/go-grpc-compression v1.2.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.19.0 // indirect - github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rs/cors v1.10.1 // indirect - go.opentelemetry.io/collector/config/configauth v0.96.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.96.0 // indirect - go.opentelemetry.io/collector/config/confignet v0.96.0 // indirect - go.opentelemetry.io/collector/config/configopaque v1.3.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect - go.opentelemetry.io/collector/config/internal v0.96.0 // indirect - go.opentelemetry.io/collector/confmap v0.96.0 // indirect - go.opentelemetry.io/collector/extension v0.96.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.96.0 // indirect - go.opentelemetry.io/collector/featuregate v1.3.0 // indirect - go.opentelemetry.io/contrib/config v0.4.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect - go.opentelemetry.io/otel v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 // indirect - go.opentelemetry.io/otel/metric v1.24.0 // indirect - go.opentelemetry.io/otel/sdk v1.24.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect - go.opentelemetry.io/otel/trace v1.24.0 // indirect - go.opentelemetry.io/proto/otlp v1.1.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.100.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.7.0 // indirect + go.opentelemetry.io/collector/config/confignet v0.100.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.7.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect + go.opentelemetry.io/collector/config/internal v0.100.0 // indirect + go.opentelemetry.io/collector/confmap v0.100.0 // indirect + go.opentelemetry.io/collector/extension v0.100.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.100.0 // indirect + go.opentelemetry.io/collector/featuregate v1.7.0 // indirect + go.opentelemetry.io/contrib/config v0.6.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 // indirect + go.opentelemetry.io/otel v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 // indirect + go.opentelemetry.io/otel/metric v1.26.0 // indirect + go.opentelemetry.io/otel/sdk v1.26.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + go.opentelemetry.io/otel/trace v1.26.0 // indirect + go.opentelemetry.io/proto/otlp v1.2.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/sys v0.17.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/grpc v1.62.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.34.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -115,6 +119,8 @@ replace go.opentelemetry.io/collector/exporter/otlphttpexporter => ../../exporte replace go.opentelemetry.io/collector/pdata => ../../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + replace go.opentelemetry.io/collector/consumer => ../../consumer replace go.opentelemetry.io/collector/receiver/otlpreceiver => ../../receiver/otlpreceiver diff --git a/internal/e2e/go.sum b/internal/e2e/go.sum index 6dc69bb0e99..ee0cdcbf90e 100644 --- a/internal/e2e/go.sum +++ b/internal/e2e/go.sum @@ -1,20 +1,12 @@ -cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= -cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= -cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 h1:aRVqY1p2IJaBGStWMsQMpkAa83cPkCDLl80eOj0Rbz4= -cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68/go.mod h1:1a3eRNYX12fs5UABBIXS8HXVvQbX9hRB/RkEBPORpe8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= -github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= 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= -github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= -github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= @@ -28,31 +20,29 @@ github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsM github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= +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/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= -github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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= @@ -72,50 +62,56 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= -go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 h1:UNQQKPfTDe1J81ViolILjTKPr9WetKW6uei2hFgJmFs= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 h1:Mw5xcxMwlqoJd97vwPxA8isEaIoxsta9/Q51+TTJLGE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0/go.mod h1:CQNu9bj7o7mC6U7+CA/schKEYakYXWr79ucDHTMGhCM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 h1:s0PHtIkN+3xrbDOpt2M8OTG92cWqUESvzh2MxiR5xY8= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0/go.mod h1:hZlFbDbRt++MMPCCfSJfmhkGIWnX1h3XjkfxZUjLrIA= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= -go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= -go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= -go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= +go.opentelemetry.io/contrib/config v0.6.0 h1:M1SRD1Z15XHPGk61tMLI1up77XT5FdrqQSRrlH0fYuk= +go.opentelemetry.io/contrib/config v0.6.0/go.mod h1:t+/kzmRWLN7J+4F/dD4fFvlYCmCO63WYwy/B00IC++c= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 h1:A3SayB3rNyt+1S6qpI9mHPkeHTZbD7XILEqWnYZb2l0= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0/go.mod h1:27iA5uvhuRNmalO+iEUdVn5ZMj2qy10Mm+XRIpRmyuU= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 h1:Xs2Ncz0gNihqu9iosIZ5SkBbWo5T8JhhLJFMQL1qmLI= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0/go.mod h1:vy+2G/6NvVMpwGX/NyLqcC41fxepnuKHk16E6IZUcJc= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 h1:+hm+I+KigBy3M24/h1p/NHkUx/evbLH0PNcjpMyCHc4= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0/go.mod h1:NjC8142mLvvNT6biDpaMjyz78kyEHIwAJlSX0N9P5KI= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 h1:HGZWGmCVRCVyAs2GQaiHQPbDHo+ObFWeUEOd+zDnp64= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0/go.mod h1:SaH+v38LSCHddyk7RGlU9uZyQoRrKao6IBnJw6Kbn+c= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 h1:1u/AyyOqAWzy+SkPxDpahCNZParHV8Vid1RnI2clyDE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0/go.mod h1:z46paqbJ9l7c9fIPCXTqTGwhQZ5XoTIsfeFYWboizjs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 h1:Waw9Wfpo/IXzOI8bCB7DIk+0JZcqqsyn1JFnAc+iam8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0/go.mod h1:wnJIG4fOqyynOnnQF/eQb4/16VlX2EJAHhHgqIqWfAo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 h1:1wp/gyxsuYtuE/JFxsQRtcCDtMrO2qMvlfXALU5wkzI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0/go.mod h1:gbTHmghkGgqxMomVQQMur1Nba4M0MQ8AYThXDUjsJ38= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 h1:5fnmgteaar1VcAA69huatudPduNFz7guRtCmfZCooZI= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0/go.mod h1:lsPccfZiz1cb1AhBPmicWM2E4F1VynFXEvD8SEBS4TM= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 h1:0W5o9SzoR15ocYHEQfvfipzcNog1lBxOLfnex91Hk6s= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0/go.mod h1:zVZ8nz+VSggWmnh6tTsJqXQ7rU4xLwRtna1M4x5jq58= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= +go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -131,18 +127,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= -golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= -golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -155,20 +149,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/internal/e2e/otlphttp_test.go b/internal/e2e/otlphttp_test.go index 59627ab4b17..b173dcf59d7 100644 --- a/internal/e2e/otlphttp_test.go +++ b/internal/e2e/otlphttp_test.go @@ -28,10 +28,10 @@ import ( "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exportertest" "go.opentelemetry.io/collector/exporter/otlphttpexporter" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/internal/testutil" "go.opentelemetry.io/collector/pdata/ptrace" "go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp" + "go.opentelemetry.io/collector/pdata/testdata" "go.opentelemetry.io/collector/receiver/otlpreceiver" "go.opentelemetry.io/collector/receiver/receivertest" ) diff --git a/internal/fanoutconsumer/logs_test.go b/internal/fanoutconsumer/logs_test.go index 8c247cb1232..c1b91a7a4e8 100644 --- a/internal/fanoutconsumer/logs_test.go +++ b/internal/fanoutconsumer/logs_test.go @@ -12,7 +12,7 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestLogsNotMultiplexing(t *testing.T) { diff --git a/internal/fanoutconsumer/metrics_test.go b/internal/fanoutconsumer/metrics_test.go index efb39ec552a..51e00791a76 100644 --- a/internal/fanoutconsumer/metrics_test.go +++ b/internal/fanoutconsumer/metrics_test.go @@ -12,7 +12,7 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestMetricsNotMultiplexing(t *testing.T) { diff --git a/internal/fanoutconsumer/traces_test.go b/internal/fanoutconsumer/traces_test.go index 120c6524715..829e4cd9069 100644 --- a/internal/fanoutconsumer/traces_test.go +++ b/internal/fanoutconsumer/traces_test.go @@ -12,7 +12,7 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestTracesNotMultiplexing(t *testing.T) { diff --git a/internal/httphelper/helper.go b/internal/httphelper/helper.go new file mode 100644 index 00000000000..be7d4a3a986 --- /dev/null +++ b/internal/httphelper/helper.go @@ -0,0 +1,36 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package httphelper // import "go.opentelemetry.io/collector/internal/httphelper" + +import ( + "net/http" + + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +// NewStatusFromMsgAndHTTPCode returns a gRPC status based on an error message string and a http status code. +// This function is shared between the http receiver and http exporter for error propagation. +func NewStatusFromMsgAndHTTPCode(errMsg string, statusCode int) *status.Status { + var c codes.Code + // Mapping based on https://github.com/grpc/grpc/blob/master/doc/http-grpc-status-mapping.md + // 429 mapping to ResourceExhausted and 400 mapping to StatusBadRequest are exceptions. + switch statusCode { + case http.StatusBadRequest: + c = codes.InvalidArgument + case http.StatusUnauthorized: + c = codes.Unauthenticated + case http.StatusForbidden: + c = codes.PermissionDenied + case http.StatusNotFound: + c = codes.Unimplemented + case http.StatusTooManyRequests: + c = codes.ResourceExhausted + case http.StatusBadGateway, http.StatusServiceUnavailable, http.StatusGatewayTimeout: + c = codes.Unavailable + default: + c = codes.Unknown + } + return status.New(c, errMsg) +} diff --git a/internal/httphelper/helper_test.go b/internal/httphelper/helper_test.go new file mode 100644 index 00000000000..a2c96ed0e09 --- /dev/null +++ b/internal/httphelper/helper_test.go @@ -0,0 +1,83 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package httphelper + +import ( + "net/http" + "testing" + + "github.com/stretchr/testify/assert" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func Test_ErrorMsgAndHTTPCodeToStatus(t *testing.T) { + tests := []struct { + name string + errMsg string + statusCode int + expected *status.Status + }{ + { + name: "Bad Request", + errMsg: "test", + statusCode: http.StatusBadRequest, + expected: status.New(codes.InvalidArgument, "test"), + }, + { + name: "Unauthorized", + errMsg: "test", + statusCode: http.StatusUnauthorized, + expected: status.New(codes.Unauthenticated, "test"), + }, + { + name: "Forbidden", + errMsg: "test", + statusCode: http.StatusForbidden, + expected: status.New(codes.PermissionDenied, "test"), + }, + { + name: "Not Found", + errMsg: "test", + statusCode: http.StatusNotFound, + expected: status.New(codes.Unimplemented, "test"), + }, + { + name: "Too Many Requests", + errMsg: "test", + statusCode: http.StatusTooManyRequests, + expected: status.New(codes.ResourceExhausted, "test"), + }, + { + name: "Bad Gateway", + errMsg: "test", + statusCode: http.StatusBadGateway, + expected: status.New(codes.Unavailable, "test"), + }, + { + name: "Service Unavailable", + errMsg: "test", + statusCode: http.StatusServiceUnavailable, + expected: status.New(codes.Unavailable, "test"), + }, + { + name: "Gateway Timeout", + errMsg: "test", + statusCode: http.StatusGatewayTimeout, + expected: status.New(codes.Unavailable, "test"), + }, + { + name: "Unsupported Media Type", + errMsg: "test", + statusCode: http.StatusUnsupportedMediaType, + expected: status.New(codes.Unknown, "test"), + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + result := NewStatusFromMsgAndHTTPCode(tt.errMsg, tt.statusCode) + assert.Equal(t, tt.expected, result) + }) + } +} diff --git a/internal/localhostgate/featuregate.go b/internal/localhostgate/featuregate.go index e1b02fca044..78c19622967 100644 --- a/internal/localhostgate/featuregate.go +++ b/internal/localhostgate/featuregate.go @@ -18,9 +18,9 @@ import ( const UseLocalHostAsDefaultHostID = "component.UseLocalHostAsDefaultHost" -// useLocalHostAsDefaultHostfeatureGate is the feature gate that controls whether +// UseLocalHostAsDefaultHostfeatureGate is the feature gate that controls whether // server-like receivers and extensions such as the OTLP receiver use localhost as the default host for their endpoints. -var useLocalHostAsDefaultHostfeatureGate = mustRegisterOrLoad( +var UseLocalHostAsDefaultHostfeatureGate = mustRegisterOrLoad( featuregate.GlobalRegistry(), UseLocalHostAsDefaultHostID, featuregate.StageAlpha, @@ -51,7 +51,7 @@ func mustRegisterOrLoad(reg *featuregate.Registry, id string, stage featuregate. // EndpointForPort gets the endpoint for a given port using localhost or 0.0.0.0 depending on the feature gate. func EndpointForPort(port int) string { host := "localhost" - if !useLocalHostAsDefaultHostfeatureGate.IsEnabled() { + if !UseLocalHostAsDefaultHostfeatureGate.IsEnabled() { host = "0.0.0.0" } return fmt.Sprintf("%s:%d", host, port) @@ -59,7 +59,7 @@ func EndpointForPort(port int) string { // LogAboutUseLocalHostAsDefault logs about the upcoming change from 0.0.0.0 to localhost on server-like components. func LogAboutUseLocalHostAsDefault(logger *zap.Logger) { - if !useLocalHostAsDefaultHostfeatureGate.IsEnabled() { + if !UseLocalHostAsDefaultHostfeatureGate.IsEnabled() { logger.Warn( "The default endpoints for all servers in components will change to use localhost instead of 0.0.0.0 in a future version. Use the feature gate to preview the new default.", zap.String("feature gate ID", UseLocalHostAsDefaultHostID), diff --git a/internal/localhostgate/featuregate_test.go b/internal/localhostgate/featuregate_test.go index ef09519ac9c..bde051c4f15 100644 --- a/internal/localhostgate/featuregate_test.go +++ b/internal/localhostgate/featuregate_test.go @@ -50,7 +50,7 @@ func TestEndpointForPort(t *testing.T) { for _, tt := range tests { t.Run(tt.endpoint, func(t *testing.T) { - defer setFeatureGateForTest(t, useLocalHostAsDefaultHostfeatureGate, tt.enabled)() + defer setFeatureGateForTest(t, UseLocalHostAsDefaultHostfeatureGate, tt.enabled)() assert.Equal(t, EndpointForPort(tt.port), tt.endpoint) }) } diff --git a/internal/memorylimiter/config_test.go b/internal/memorylimiter/config_test.go index ca7a243f861..29db1dc6def 100644 --- a/internal/memorylimiter/config_test.go +++ b/internal/memorylimiter/config_test.go @@ -93,3 +93,13 @@ func TestConfigValidate(t *testing.T) { }) } } + +func TestUnmarshalInvalidConfig(t *testing.T) { + cm, err := confmaptest.LoadConf(filepath.Join("testdata", "negative_unsigned_limits_config.yaml")) + require.NoError(t, err) + cfg := &Config{} + err = component.UnmarshalConfig(cm, cfg) + require.Error(t, err) + require.Contains(t, err.Error(), "error decoding 'limit_mib': cannot convert negative value -2000 to an unsigned integer") + require.Contains(t, err.Error(), "error decoding 'spike_limit_mib': cannot convert negative value -2300 to an unsigned integer") +} diff --git a/internal/memorylimiter/testdata/negative_unsigned_limits_config.yaml b/internal/memorylimiter/testdata/negative_unsigned_limits_config.yaml new file mode 100644 index 00000000000..3a2ef3a5b99 --- /dev/null +++ b/internal/memorylimiter/testdata/negative_unsigned_limits_config.yaml @@ -0,0 +1,13 @@ +# check_interval is the time between measurements of memory usage for the +# purposes of avoiding going over the limits. Defaults to zero, so no +# checks will be performed. Values below 1 second are not recommended since +# it can result in unnecessary CPU consumption. +check_interval: 5s + +# Maximum amount of memory, in MiB, targeted to be allocated by the process heap. +# Note that typically the total memory usage of process will be about 50MiB higher +# than this value. +limit_mib: -2000 + +# The maximum, in MiB, spike expected between the measurements of memory usage. +spike_limit_mib: -2300 diff --git a/internal/obsreportconfig/obsmetrics/obs_exporter.go b/internal/obsreportconfig/obsmetrics/obs_exporter.go index 50a2724070c..b87270f5e5a 100644 --- a/internal/obsreportconfig/obsmetrics/obs_exporter.go +++ b/internal/obsreportconfig/obsmetrics/obs_exporter.go @@ -30,8 +30,9 @@ const ( ) var ( - ExporterPrefix = ExporterKey + NameSep - ExportTraceDataOperationSuffix = NameSep + "traces" - ExportMetricsOperationSuffix = NameSep + "metrics" - ExportLogsOperationSuffix = NameSep + "logs" + ExporterPrefix = ExporterKey + SpanNameSep + ExporterMetricPrefix = ExporterKey + MetricNameSep + ExportTraceDataOperationSuffix = SpanNameSep + "traces" + ExportMetricsOperationSuffix = SpanNameSep + "metrics" + ExportLogsOperationSuffix = SpanNameSep + "logs" ) diff --git a/internal/obsreportconfig/obsmetrics/obs_processor.go b/internal/obsreportconfig/obsmetrics/obs_processor.go index 75084014ec5..3cbd8fc4a83 100644 --- a/internal/obsreportconfig/obsmetrics/obs_processor.go +++ b/internal/obsreportconfig/obsmetrics/obs_processor.go @@ -18,5 +18,5 @@ const ( ) var ( - ProcessorPrefix = ProcessorKey + NameSep + ProcessorMetricPrefix = ProcessorKey + MetricNameSep ) diff --git a/internal/obsreportconfig/obsmetrics/obs_receiver.go b/internal/obsreportconfig/obsmetrics/obs_receiver.go index d70148c1ff9..bcb6306f81b 100644 --- a/internal/obsreportconfig/obsmetrics/obs_receiver.go +++ b/internal/obsreportconfig/obsmetrics/obs_receiver.go @@ -30,8 +30,9 @@ const ( ) var ( - ReceiverPrefix = ReceiverKey + NameSep - ReceiveTraceDataOperationSuffix = NameSep + "TraceDataReceived" - ReceiverMetricsOperationSuffix = NameSep + "MetricsReceived" - ReceiverLogsOperationSuffix = NameSep + "LogsReceived" + ReceiverPrefix = ReceiverKey + SpanNameSep + ReceiverMetricPrefix = ReceiverKey + MetricNameSep + ReceiveTraceDataOperationSuffix = SpanNameSep + "TraceDataReceived" + ReceiverMetricsOperationSuffix = SpanNameSep + "MetricsReceived" + ReceiverLogsOperationSuffix = SpanNameSep + "LogsReceived" ) diff --git a/internal/obsreportconfig/obsmetrics/obs_scraper.go b/internal/obsreportconfig/obsmetrics/obs_scraper.go index 7e2b73d127f..4254891f33a 100644 --- a/internal/obsreportconfig/obsmetrics/obs_scraper.go +++ b/internal/obsreportconfig/obsmetrics/obs_scraper.go @@ -16,6 +16,7 @@ const ( ) const ( - ScraperPrefix = ScraperKey + NameSep - ScraperMetricsOperationSuffix = NameSep + "MetricsScraped" + ScraperPrefix = ScraperKey + SpanNameSep + ScraperMetricPrefix = ScraperKey + MetricNameSep + ScraperMetricsOperationSuffix = SpanNameSep + "MetricsScraped" ) diff --git a/internal/obsreportconfig/obsmetrics/obsmetrics.go b/internal/obsreportconfig/obsmetrics/obsmetrics.go index 84baf6d9c34..02ce450d3a9 100644 --- a/internal/obsreportconfig/obsmetrics/obsmetrics.go +++ b/internal/obsreportconfig/obsmetrics/obsmetrics.go @@ -7,6 +7,7 @@ package obsmetrics // import "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" const ( - NameSep = "/" - Scope = "go.opentelemetry.io/collector/obsreport" + SpanNameSep = "/" + MetricNameSep = "_" + Scope = "go.opentelemetry.io/collector/obsreport" ) diff --git a/internal/obsreportconfig/obsreportconfig.go b/internal/obsreportconfig/obsreportconfig.go index aed6813460c..dc5d4915569 100644 --- a/internal/obsreportconfig/obsreportconfig.go +++ b/internal/obsreportconfig/obsreportconfig.go @@ -7,14 +7,6 @@ import ( "go.opentelemetry.io/collector/featuregate" ) -// UseOtelForInternalMetricsfeatureGate is the feature gate that controls whether the collector uses open -// telemetrySettings for internal metrics. -var UseOtelForInternalMetricsfeatureGate = featuregate.GlobalRegistry().MustRegister( - "telemetry.useOtelForInternalMetrics", - featuregate.StageStable, - featuregate.WithRegisterDescription("controls whether the collector uses OpenTelemetry for internal metrics"), - featuregate.WithRegisterToVersion("0.95.0")) - // DisableHighCardinalityMetricsfeatureGate is the feature gate that controls whether the collector should enable // potentially high cardinality metrics. The gate will be removed when the collector allows for view configuration. var DisableHighCardinalityMetricsfeatureGate = featuregate.GlobalRegistry().MustRegister( diff --git a/internal/tools/go.mod b/internal/tools/go.mod index c5dda5ebbdc..b1049839b5a 100644 --- a/internal/tools/go.mod +++ b/internal/tools/go.mod @@ -5,18 +5,18 @@ go 1.21 require ( github.com/a8m/envsubst v1.4.2 github.com/client9/misspell v0.3.4 - github.com/golangci/golangci-lint v1.56.2 + github.com/golangci/golangci-lint v1.57.2 github.com/google/addlicense v1.1.1 github.com/jcchavezs/porto v0.6.0 github.com/pavius/impi v0.0.3 - go.opentelemetry.io/build-tools/checkfile v0.12.0 - go.opentelemetry.io/build-tools/chloggen v0.12.0 - go.opentelemetry.io/build-tools/crosslink v0.12.1-0.20240121161735-d70c842b1bf5 - go.opentelemetry.io/build-tools/multimod v0.12.0 - go.opentelemetry.io/build-tools/semconvgen v0.12.0 + go.opentelemetry.io/build-tools/checkfile v0.13.0 + go.opentelemetry.io/build-tools/chloggen v0.13.0 + go.opentelemetry.io/build-tools/crosslink v0.13.0 + go.opentelemetry.io/build-tools/multimod v0.13.0 + go.opentelemetry.io/build-tools/semconvgen v0.13.0 golang.org/x/exp v0.0.0-20240119083558-1b970713d09a - golang.org/x/tools v0.18.0 - golang.org/x/vuln v1.0.4 + golang.org/x/tools v0.20.0 + golang.org/x/vuln v1.1.0 ) require ( @@ -24,10 +24,10 @@ require ( 4d63.com/gochecknoglobals v0.2.1 // indirect dario.cat/mergo v1.0.0 // indirect github.com/4meepo/tagalign v1.3.3 // indirect - github.com/Abirdcfly/dupword v0.0.13 // indirect + github.com/Abirdcfly/dupword v0.0.14 // indirect github.com/Antonboom/errname v0.1.12 // indirect github.com/Antonboom/nilnil v0.1.7 // indirect - github.com/Antonboom/testifylint v1.1.2 // indirect + github.com/Antonboom/testifylint v1.2.0 // indirect github.com/BurntSushi/toml v1.3.2 // indirect github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect github.com/GaijinEntertainment/go-exhaustruct/v3 v3.2.0 // indirect @@ -37,7 +37,7 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect github.com/alecthomas/assert/v2 v2.3.0 // indirect github.com/alecthomas/go-check-sumtype v0.1.4 // indirect - github.com/alexkohler/nakedret/v2 v2.0.2 // indirect + github.com/alexkohler/nakedret/v2 v2.0.4 // indirect github.com/alexkohler/prealloc v1.0.0 // indirect github.com/alingse/asasalint v0.0.11 // indirect github.com/ashanbrown/forbidigo v1.6.0 // indirect @@ -51,27 +51,27 @@ require ( github.com/breml/errchkjson v0.3.6 // indirect github.com/butuzov/ireturn v0.3.0 // indirect github.com/butuzov/mirror v1.1.0 // indirect - github.com/catenacyber/perfsprint v0.6.0 // indirect + github.com/catenacyber/perfsprint v0.7.1 // indirect github.com/ccojocar/zxcvbn-go v1.0.2 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/charithe/durationcheck v0.0.10 // indirect github.com/chavacava/garif v0.1.0 // indirect + github.com/ckaznocha/intrange v0.1.1 // indirect github.com/cloudflare/circl v1.3.7 // indirect github.com/curioswitch/go-reassign v0.2.0 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect - github.com/daixiang0/gci v0.12.1 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/denis-tingaikin/go-header v0.4.3 // indirect + github.com/daixiang0/gci v0.12.3 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/denis-tingaikin/go-header v0.5.0 // indirect github.com/emirpasic/gods v1.18.1 // indirect - github.com/esimonov/ifshort v1.0.4 // indirect github.com/ettle/strcase v0.2.0 // indirect github.com/fatih/color v1.16.0 // indirect github.com/fatih/structtag v1.2.0 // indirect github.com/firefart/nonamedreturns v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fzipp/gocyclo v0.6.0 // indirect - github.com/ghostiam/protogetter v0.3.4 // indirect - github.com/go-critic/go-critic v0.11.1 // indirect + github.com/ghostiam/protogetter v0.3.5 // indirect + github.com/go-critic/go-critic v0.11.2 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.5.0 // indirect github.com/go-git/go-git/v5 v5.11.0 // indirect @@ -87,15 +87,12 @@ require ( github.com/gobwas/glob v0.2.3 // indirect github.com/gofrs/flock v0.8.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect - github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe // indirect github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e // indirect - github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 // indirect - github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca // indirect github.com/golangci/misspell v0.4.1 // indirect + github.com/golangci/plugin-module-register v0.1.1 // indirect github.com/golangci/revgrep v0.5.2 // indirect - github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect + github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/gordonklaus/ineffassign v0.1.0 // indirect github.com/gostaticanalysis/analysisutil v0.7.1 // indirect @@ -107,19 +104,20 @@ require ( github.com/hexops/gotextdiff v1.0.3 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/jgautheron/goconst v1.7.0 // indirect + github.com/jgautheron/goconst v1.7.1 // indirect github.com/jingyugao/rowserrcheck v1.1.1 // indirect github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect - github.com/jjti/go-spancheck v0.5.2 // indirect + github.com/jjti/go-spancheck v0.5.3 // indirect github.com/julz/importas v0.1.0 // indirect + github.com/karamaru-alpha/copyloopvar v1.0.10 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/kisielk/errcheck v1.7.0 // indirect github.com/kisielk/gotool v1.0.0 // indirect - github.com/kkHAIKE/contextcheck v1.1.4 // indirect + github.com/kkHAIKE/contextcheck v1.1.5 // indirect github.com/kulti/thelper v0.6.3 // indirect - github.com/kunwardeep/paralleltest v1.0.9 // indirect + github.com/kunwardeep/paralleltest v1.0.10 // indirect github.com/kyoh86/exportloopref v0.1.11 // indirect - github.com/ldez/gomoddirectives v0.2.3 // indirect + github.com/ldez/gomoddirectives v0.2.4 // indirect github.com/ldez/tagliatelle v0.5.0 // indirect github.com/leonklingele/grouper v1.1.1 // indirect github.com/lufeee/execinquery v1.2.1 // indirect @@ -131,8 +129,6 @@ require ( github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.9 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect - github.com/mbilski/exhaustivestruct v1.2.0 // indirect github.com/mgechev/revive v1.3.7 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect @@ -140,23 +136,26 @@ require ( github.com/nakabonne/nestif v0.3.1 // indirect github.com/nishanths/exhaustive v0.12.0 // indirect github.com/nishanths/predeclared v0.2.2 // indirect - github.com/nunnatsa/ginkgolinter v0.15.2 // indirect + github.com/nunnatsa/ginkgolinter v0.16.2 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect - github.com/pelletier/go-toml/v2 v2.1.0 // indirect + github.com/pelletier/go-toml/v2 v2.2.0 // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/polyfloyd/go-errorlint v1.4.8 // indirect - github.com/prometheus/client_golang v1.17.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.45.0 // indirect - github.com/prometheus/procfs v0.11.1 // indirect - github.com/quasilyte/go-ruleguard v0.4.0 // indirect + github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/quasilyte/go-ruleguard v0.4.2 // indirect github.com/quasilyte/gogrep v0.5.0 // indirect github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect - github.com/ryancurrah/gomodguard v1.3.0 // indirect + github.com/ryancurrah/gomodguard v1.3.1 // indirect github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect + github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect github.com/sashamelentyev/interfacebloat v1.1.0 // indirect github.com/sashamelentyev/usestdlibvars v1.25.0 // indirect github.com/securego/gosec/v2 v2.19.0 // indirect @@ -164,28 +163,27 @@ require ( github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/sivchari/containedctx v1.0.3 // indirect - github.com/sivchari/nosnakecase v1.7.0 // indirect github.com/sivchari/tenv v1.7.1 // indirect github.com/skeema/knownhosts v1.2.1 // indirect github.com/sonatard/noctx v0.0.2 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect github.com/sourcegraph/go-diff v0.7.0 // indirect github.com/spf13/afero v1.11.0 // indirect - github.com/spf13/cast v1.5.1 // indirect + github.com/spf13/cast v1.6.0 // indirect github.com/spf13/cobra v1.8.0 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.16.0 // indirect + github.com/spf13/viper v1.18.2 // indirect github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect - github.com/stretchr/objx v0.5.0 // indirect - github.com/stretchr/testify v1.8.4 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/stretchr/objx v0.5.2 // indirect + github.com/stretchr/testify v1.9.0 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect github.com/tdakkota/asciicheck v0.2.0 // indirect github.com/tetafro/godot v1.4.16 // indirect github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 // indirect github.com/timonwong/loggercheck v0.9.4 // indirect - github.com/tomarrell/wrapcheck/v2 v2.8.1 // indirect + github.com/tomarrell/wrapcheck/v2 v2.8.3 // indirect github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect github.com/ultraware/funlen v0.1.0 // indirect github.com/ultraware/whitespace v0.1.0 // indirect @@ -196,27 +194,26 @@ require ( github.com/yeya24/promlinter v0.2.0 // indirect github.com/ykadowak/zerologlint v0.1.5 // indirect gitlab.com/bosi/decorder v0.4.1 // indirect - go-simpler.org/musttag v0.8.0 // indirect - go-simpler.org/sloglint v0.4.0 // indirect - go.opentelemetry.io/build-tools v0.12.0 // indirect + go-simpler.org/musttag v0.9.0 // indirect + go-simpler.org/sloglint v0.5.0 // indirect + go.opentelemetry.io/build-tools v0.13.0 // indirect + go.uber.org/automaxprocs v1.5.3 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect - golang.org/x/crypto v0.19.0 // indirect - golang.org/x/exp/typeparams v0.0.0-20231219180239-dc181d75b848 // indirect - golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.17.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/crypto v0.22.0 // indirect + golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f // indirect + golang.org/x/mod v0.17.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sync v0.7.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - honnef.co/go/tools v0.4.6 // indirect + honnef.co/go/tools v0.4.7 // indirect mvdan.cc/gofumpt v0.6.0 // indirect - mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect - mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect mvdan.cc/unparam v0.0.0-20240104100049-c549a3470d14 // indirect ) diff --git a/internal/tools/go.sum b/internal/tools/go.sum index b0c915fbf3d..f2935d93a15 100644 --- a/internal/tools/go.sum +++ b/internal/tools/go.sum @@ -39,14 +39,14 @@ dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/4meepo/tagalign v1.3.3 h1:ZsOxcwGD/jP4U/aw7qeWu58i7dwYemfy5Y+IF1ACoNw= github.com/4meepo/tagalign v1.3.3/go.mod h1:Q9c1rYMZJc9dPRkbQPpcBNCLEmY2njbAsXhQOZFE2dE= -github.com/Abirdcfly/dupword v0.0.13 h1:SMS17YXypwP000fA7Lr+kfyBQyW14tTT+nRv9ASwUUo= -github.com/Abirdcfly/dupword v0.0.13/go.mod h1:Ut6Ue2KgF/kCOawpW4LnExT+xZLQviJPE4klBPMK/5Y= +github.com/Abirdcfly/dupword v0.0.14 h1:3U4ulkc8EUo+CaT105/GJ1BQwtgyj6+VaBVbAX11Ba8= +github.com/Abirdcfly/dupword v0.0.14/go.mod h1:VKDAbxdY8YbKUByLGg8EETzYSuC4crm9WwI6Y3S0cLI= github.com/Antonboom/errname v0.1.12 h1:oh9ak2zUtsLp5oaEd/erjB4GPu9w19NyoIskZClDcQY= github.com/Antonboom/errname v0.1.12/go.mod h1:bK7todrzvlaZoQagP1orKzWXv59X/x0W0Io2XT1Ssro= github.com/Antonboom/nilnil v0.1.7 h1:ofgL+BA7vlA1K2wNQOsHzLJ2Pw5B5DpWRLdDAVvvTow= github.com/Antonboom/nilnil v0.1.7/go.mod h1:TP+ScQWVEq0eSIxqU8CbdT5DFWoHp0MbP+KMUO1BKYQ= -github.com/Antonboom/testifylint v1.1.2 h1:IdLRermiLRogxY5AumBL4sP0A+qKHQM/AP1Xd7XOTKc= -github.com/Antonboom/testifylint v1.1.2/go.mod h1:9PFi+vWa8zzl4/B/kqmFJcw85ZUv8ReyBzuQCd30+WI= +github.com/Antonboom/testifylint v1.2.0 h1:015bxD8zc5iY8QwTp4+RG9I4kIbqwvGX9TrBbb7jGdM= +github.com/Antonboom/testifylint v1.2.0/go.mod h1:rkmEqjqVnHDRNsinyN6fPSLnoajzFwsCcguJgwADBkw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= @@ -77,8 +77,8 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alexkohler/nakedret/v2 v2.0.2 h1:qnXuZNvv3/AxkAb22q/sEsEpcA99YxLFACDtEw9TPxE= -github.com/alexkohler/nakedret/v2 v2.0.2/go.mod h1:2b8Gkk0GsOrqQv/gPWjNLDSKwG8I5moSXG1K4VIBcTQ= +github.com/alexkohler/nakedret/v2 v2.0.4 h1:yZuKmjqGi0pSmjGpOC016LtPJysIL0WEUiaXW5SUnNg= +github.com/alexkohler/nakedret/v2 v2.0.4/go.mod h1:bF5i0zF2Wo2o4X4USt9ntUWve6JbFv02Ff4vlkmS/VU= github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw= github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQRnw= @@ -112,8 +112,8 @@ github.com/butuzov/ireturn v0.3.0/go.mod h1:A09nIiwiqzN/IoVo9ogpa0Hzi9fex1kd9PSD github.com/butuzov/mirror v1.1.0 h1:ZqX54gBVMXu78QLoiqdwpl2mgmoOJTk7s4p4o+0avZI= github.com/butuzov/mirror v1.1.0/go.mod h1:8Q0BdQU6rC6WILDiBM60DBfvV78OLJmMmixe7GF45AE= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= -github.com/catenacyber/perfsprint v0.6.0 h1:VSv95RRkk5+BxrU/YTPcnxuMEWar1iMK5Vyh3fWcBfs= -github.com/catenacyber/perfsprint v0.6.0/go.mod h1:/wclWYompEyjUD2FuIIDVKNkqz7IgBIWXIH3V0Zol50= +github.com/catenacyber/perfsprint v0.7.1 h1:PGW5G/Kxn+YrN04cRAZKC+ZuvlVwolYMrIyyTJ/rMmc= +github.com/catenacyber/perfsprint v0.7.1/go.mod h1:/wclWYompEyjUD2FuIIDVKNkqz7IgBIWXIH3V0Zol50= github.com/ccojocar/zxcvbn-go v1.0.2 h1:na/czXU8RrhXO4EZme6eQJLR4PzcGsahsBOAwU6I3Vg= github.com/ccojocar/zxcvbn-go v1.0.2/go.mod h1:g1qkXtUSvHP8lhHp5GrSmTz6uWALGRMQdw6Qnz/hi60= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -128,6 +128,8 @@ github.com/chavacava/garif v0.1.0/go.mod h1:XMyYCkEL58DF0oyW4qDjjnPWONs2HBqYKI+U github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/ckaznocha/intrange v0.1.1 h1:gHe4LfqCspWkh8KpJFs20fJz3XRHFBFUV9yI7Itu83Q= +github.com/ckaznocha/intrange v0.1.1/go.mod h1:RWffCw/vKBwHeOEwWdCikAtY0q4gGt8VhJZEEA5n+RE= github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= @@ -139,13 +141,14 @@ github.com/curioswitch/go-reassign v0.2.0 h1:G9UZyOcpk/d7Gd6mqYgd8XYWFMw/znxwGDU github.com/curioswitch/go-reassign v0.2.0/go.mod h1:x6OpXuWvgfQaMGks2BZybTngWjT84hqJfKoO8Tt/Roc= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= -github.com/daixiang0/gci v0.12.1 h1:ugsG+KRYny1VK4oqrX4Vtj70bo4akYKa0tgT1DXMYiY= -github.com/daixiang0/gci v0.12.1/go.mod h1:xtHP9N7AHdNvtRNfcx9gwTDfw7FRJx4bZUsiEfiNNAI= +github.com/daixiang0/gci v0.12.3 h1:yOZI7VAxAGPQmkb1eqt5g/11SUlwoat1fSblGLmdiQc= +github.com/daixiang0/gci v0.12.3/go.mod h1:xtHP9N7AHdNvtRNfcx9gwTDfw7FRJx4bZUsiEfiNNAI= 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= -github.com/denis-tingaikin/go-header v0.4.3 h1:tEaZKAlqql6SKCY++utLmkPLd6K8IBM20Ha7UVm+mtU= -github.com/denis-tingaikin/go-header v0.4.3/go.mod h1:0wOCWuN71D5qIgE2nz9KrKmuYBAC2Mra5RassOIQ2/c= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/denis-tingaikin/go-header v0.5.0 h1:SRdnP5ZKvcO9KKRP1KJrhFR3RrlGuD+42t4429eC9k8= +github.com/denis-tingaikin/go-header v0.5.0/go.mod h1:mMenU5bWrok6Wl2UsZjy+1okegmwQ3UgWl4V1D8gjlY= github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= @@ -154,8 +157,6 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/esimonov/ifshort v1.0.4 h1:6SID4yGWfRae/M7hkVDVVyppy8q/v9OuxNdmjLQStBA= -github.com/esimonov/ifshort v1.0.4/go.mod h1:Pe8zjlRrJ80+q2CxHLfEOfTwxCZ4O+MuhcHcfgNWTk0= github.com/ettle/strcase v0.2.0 h1:fGNiVF21fHXpX1niBgk0aROov1LagYsOwV/xqKDKR/Q= github.com/ettle/strcase v0.2.0/go.mod h1:DajmHElDSaX76ITe3/VHVyMin4LWSJN5Z909Wp+ED1A= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= @@ -170,12 +171,12 @@ github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nos github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= -github.com/ghostiam/protogetter v0.3.4 h1:5SZ+lZSNmNkSbGVSF9hUHhv/b7ELF9Rwchoq7btYo6c= -github.com/ghostiam/protogetter v0.3.4/go.mod h1:A0JgIhs0fgVnotGinjQiKaFVG3waItLJNwPmcMzDnvk= +github.com/ghostiam/protogetter v0.3.5 h1:+f7UiF8XNd4w3a//4DnusQ2SZjPkUjxkMEfjbxOK4Ug= +github.com/ghostiam/protogetter v0.3.5/go.mod h1:7lpeDnEJ1ZjL/YtyoN99ljO4z0pd3H0d18/t2dPBxHw= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= -github.com/go-critic/go-critic v0.11.1 h1:/zBseUSUMytnRqxjlsYNbDDxpu3R2yH8oLXo/FOE8b8= -github.com/go-critic/go-critic v0.11.1/go.mod h1:aZVQR7+gazH6aDEQx4356SD7d8ez8MipYjXbEl5JAKA= +github.com/go-critic/go-critic v0.11.2 h1:81xH/2muBphEgPtcwH1p6QD+KzXl2tMSi3hXjBSxDnM= +github.com/go-critic/go-critic v0.11.2/go.mod h1:OePaicfjsf+KPy33yq4gzv6CO7TEQ9Rom6ns1KsJnl8= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= @@ -255,26 +256,20 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 h1:23T5iq8rbUYlhpt5DB4XJkc6BU31uODLD1o1gKvZmD0= -github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= -github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe h1:6RGUuS7EGotKx6J5HIP8ZtyMdiDscjMLfRBSPuzVVeo= -github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe/go.mod h1:gjqyPShc/m8pEMpk0a3SeagVb0kaqvhscv+i9jI5ZhQ= github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e h1:ULcKCDV1LOZPFxGZaA6TlQbiM3J2GCPnkx/bGF6sX/g= github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e/go.mod h1:Pm5KhLPA8gSnQwrQ6ukebRcapGb/BG9iUkdaiCcGHJM= -github.com/golangci/golangci-lint v1.56.2 h1:dgQzlWHgNbCqJjuxRJhFEnHDVrrjuTGQHJ3RIZMpp/o= -github.com/golangci/golangci-lint v1.56.2/go.mod h1:7CfNO675+EY7j84jihO4iAqDQ80s3HCjcc5M6B7SlZQ= -github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= -github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= -github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA= -github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= +github.com/golangci/golangci-lint v1.57.2 h1:NNhxfZyL5He1WWDrIvl1a4n5bvWZBcgAqBwlJAAgLTw= +github.com/golangci/golangci-lint v1.57.2/go.mod h1:ApiG3S3Ca23QyfGp5BmsorTiVxJpr5jGiNS0BkdSidg= github.com/golangci/misspell v0.4.1 h1:+y73iSicVy2PqyX7kmUefHusENlrP9YwuHZHPLGQj/g= github.com/golangci/misspell v0.4.1/go.mod h1:9mAN1quEo3DlpbaIKKyEvRxK1pwqR9s/Sea1bJCtlNI= +github.com/golangci/plugin-module-register v0.1.1 h1:TCmesur25LnyJkpsVrupv1Cdzo+2f7zX0H6Jkw1Ol6c= +github.com/golangci/plugin-module-register v0.1.1/go.mod h1:TTpqoB6KkwOJMV8u7+NyXMrkwwESJLOkfl9TxR1DGFc= github.com/golangci/revgrep v0.5.2 h1:EndcWoRhcnfj2NHQ+28hyuXpLMF+dQmCN+YaeeIl4FU= github.com/golangci/revgrep v0.5.2/go.mod h1:bjAMA+Sh/QUfTDcHzxfyHxr4xKvllVr/0sCv2e7jJHA= -github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys= -github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= +github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed h1:IURFTjxeTfNFP0hTEi1YKjB/ub8zkpaOqFFMApi2EAs= +github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed/go.mod h1:XLXN8bNw4CGRPaqgl3bv/lhz7bsGPh4/xSaMTbo2vkQ= github.com/google/addlicense v1.1.1 h1:jpVf9qPbU8rz5MxKo7d+RMcNHkqxi4YJi/laauX4aAE= github.com/google/addlicense v1.1.1/go.mod h1:Sm/DHu7Jk+T5miFHHehdIjbi4M5+dJDRS3Cq0rncIxA= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -341,14 +336,14 @@ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOl github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jcchavezs/porto v0.6.0 h1:AgQLGwsXaxDkPj4Y+paFkVGLAR4n/1RRF0xV5UKinwg= github.com/jcchavezs/porto v0.6.0/go.mod h1:fESH0gzDHiutHRdX2hv27ojnOVFco37hg1W6E9EZF4A= -github.com/jgautheron/goconst v1.7.0 h1:cEqH+YBKLsECnRSd4F4TK5ri8t/aXtt/qoL0Ft252B0= -github.com/jgautheron/goconst v1.7.0/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= +github.com/jgautheron/goconst v1.7.1 h1:VpdAG7Ca7yvvJk5n8dMwQhfEZJh95kl/Hl9S1OI5Jkk= +github.com/jgautheron/goconst v1.7.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9BjwUk7KlCh6S9EAGWBt1oExIUv9WyNCiRz5amv48= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= -github.com/jjti/go-spancheck v0.5.2 h1:WXTZG3efY/ji1Vi8mkH+23O3bLeKR6hp3tI3YB7XwKk= -github.com/jjti/go-spancheck v0.5.2/go.mod h1:ARPNI1JRG1V2Rjnd6/2f2NEfghjSVDZGVmruNKlnXU0= +github.com/jjti/go-spancheck v0.5.3 h1:vfq4s2IB8T3HvbpiwDTYgVPj1Ze/ZSXrTtaZRTc7CuM= +github.com/jjti/go-spancheck v0.5.3/go.mod h1:eQdOX1k3T+nAKvZDyLC3Eby0La4dZ+I19iOl5NzSPFE= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -360,14 +355,16 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/julz/importas v0.1.0 h1:F78HnrsjY3cR7j0etXy5+TU1Zuy7Xt08X/1aJnH5xXY= github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= +github.com/karamaru-alpha/copyloopvar v1.0.10 h1:8HYDy6KQYqTmD7JuhZMWS1nwPru9889XI24ROd/+WXI= +github.com/karamaru-alpha/copyloopvar v1.0.10/go.mod h1:u7CIfztblY0jZLOQZgH3oYsJzpC2A7S6u/lfgSXHy0k= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/errcheck v1.7.0 h1:+SbscKmWJ5mOK/bO1zS60F5I9WwZDWOfRsC4RwfwRV0= github.com/kisielk/errcheck v1.7.0/go.mod h1:1kLL+jV4e+CFfueBmI1dSK2ADDyQnlrnrY/FqKluHJQ= github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kkHAIKE/contextcheck v1.1.4 h1:B6zAaLhOEEcjvUgIYEqystmnFk1Oemn8bvJhbt0GMb8= -github.com/kkHAIKE/contextcheck v1.1.4/go.mod h1:1+i/gWqokIa+dm31mqGLZhZJ7Uh44DJGZVmr6QRBNJg= +github.com/kkHAIKE/contextcheck v1.1.5 h1:CdnJh63tcDe53vG+RebdpdXJTc9atMgGqdx8LXxiilg= +github.com/kkHAIKE/contextcheck v1.1.5/go.mod h1:O930cpht4xb1YQpK+1+AgoM3mFsvxr7uyFptcnWTYUA= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= @@ -380,12 +377,12 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kulti/thelper v0.6.3 h1:ElhKf+AlItIu+xGnI990no4cE2+XaSu1ULymV2Yulxs= github.com/kulti/thelper v0.6.3/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= -github.com/kunwardeep/paralleltest v1.0.9 h1:3Sr2IfFNcsMmlqPk1cjTUbJ4zofKPGyHxenwPebgTug= -github.com/kunwardeep/paralleltest v1.0.9/go.mod h1:2C7s65hONVqY7Q5Efj5aLzRCNLjw2h4eMc9EcypGjcY= +github.com/kunwardeep/paralleltest v1.0.10 h1:wrodoaKYzS2mdNVnc4/w31YaXFtsc21PCTdvWJ/lDDs= +github.com/kunwardeep/paralleltest v1.0.10/go.mod h1:2C7s65hONVqY7Q5Efj5aLzRCNLjw2h4eMc9EcypGjcY= github.com/kyoh86/exportloopref v0.1.11 h1:1Z0bcmTypkL3Q4k+IDHMWTcnCliEZcaPiIe0/ymEyhQ= github.com/kyoh86/exportloopref v0.1.11/go.mod h1:qkV4UF1zGl6EkF1ox8L5t9SwyeBAZ3qLMd6up458uqA= -github.com/ldez/gomoddirectives v0.2.3 h1:y7MBaisZVDYmKvt9/l1mjNCiSA1BVn34U0ObUcJwlhA= -github.com/ldez/gomoddirectives v0.2.3/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= +github.com/ldez/gomoddirectives v0.2.4 h1:j3YjBIjEBbqZ0NKtBNzr8rtMHTOrLPeiwTkfUJZ3alg= +github.com/ldez/gomoddirectives v0.2.4/go.mod h1:oWu9i62VcQDYp9EQ0ONTfqLNh+mDLWWDO+SO0qSQw5g= github.com/ldez/tagliatelle v0.5.0 h1:epgfuYt9v0CG3fms0pEgIMNPuFf/LpPIfjk4kyqSioo= github.com/ldez/tagliatelle v0.5.0/go.mod h1:rj1HmWiL1MiKQuOONhd09iySTEkUuE/8+5jtPYz9xa4= github.com/leonklingele/grouper v1.1.1 h1:suWXRU57D4/Enn6pXR0QVqqWWrnJ9Osrz+5rjt8ivzU= @@ -412,10 +409,6 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= -github.com/mbilski/exhaustivestruct v1.2.0 h1:wCBmUnSYufAHO6J4AVWY6ff+oxWxsVFrwgOdMUQePUo= -github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= github.com/mgechev/revive v1.3.7 h1:502QY0vQGe9KtYJ9FpxMz9rL+Fc/P13CI5POL4uHCcE= github.com/mgechev/revive v1.3.7/go.mod h1:RJ16jUbF0OWC3co/+XTxmFNgEpUPwnnA0BRllX2aDNA= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -437,8 +430,8 @@ github.com/nishanths/exhaustive v0.12.0 h1:vIY9sALmw6T/yxiASewa4TQcFsVYZQQRUQJhK github.com/nishanths/exhaustive v0.12.0/go.mod h1:mEZ95wPIZW+x8kC4TgC+9YCUgiST7ecevsVDTgc2obs= github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk= github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= -github.com/nunnatsa/ginkgolinter v0.15.2 h1:N2ORxUxPU56R9gsfLIlVVvCv/V/VVou5qVI1oBKBNHg= -github.com/nunnatsa/ginkgolinter v0.15.2/go.mod h1:oYxE7dt1vZI8cK2rZOs3RgTaBN2vggkqnENmoJ8kVvc= +github.com/nunnatsa/ginkgolinter v0.16.2 h1:8iLqHIZvN4fTLDC0Ke9tbSZVcyVHoBs0HIbnVSxfHJk= +github.com/nunnatsa/ginkgolinter v0.16.2/go.mod h1:4tWRinDN1FeJgU+iJANW/kz7xKN5nYRAOfJDQUS9dOQ= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= @@ -454,25 +447,28 @@ github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT9 github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= github.com/pavius/impi v0.0.3 h1:DND6MzU+BLABhOZXbELR3FU8b+zDgcq4dOCNLhiTYuI= github.com/pavius/impi v0.0.3/go.mod h1:x/hU0bfdWIhuOT1SKwiJg++yvkk6EuOtJk8WtDZqgr8= -github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= -github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -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/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/polyfloyd/go-errorlint v1.4.8 h1:jiEjKDH33ouFktyez7sckv6pHWif9B7SuS8cutDXFHw= github.com/polyfloyd/go-errorlint v1.4.8/go.mod h1:NNCxFcFjZcw3xNjVdCchERkEM6Oz7wta2XJVxRftwO4= +github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= +github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -483,17 +479,17 @@ github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8 github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= -github.com/quasilyte/go-ruleguard v0.4.0 h1:DyM6r+TKL+xbKB4Nm7Afd1IQh9kEUKQs2pboWGKtvQo= -github.com/quasilyte/go-ruleguard v0.4.0/go.mod h1:Eu76Z/R8IXtViWUIHkE3p8gdH3/PKk1eh3YGfaEof10= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/quasilyte/go-ruleguard v0.4.2 h1:htXcXDK6/rO12kiTHKfHuqR4kr3Y4M0J0rOL6CH/BYs= +github.com/quasilyte/go-ruleguard v0.4.2/go.mod h1:GJLgqsLeo4qgavUoL8JeGFNS7qcisx3awV/w9eWTmNI= github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo= github.com/quasilyte/gogrep v0.5.0/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl980XxGFEZSS6KlBGIV0diGdySzxATTWoqaU= @@ -504,12 +500,18 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryancurrah/gomodguard v1.3.0 h1:q15RT/pd6UggBXVBuLps8BXRvl5GPBcwVA7BJHMLuTw= -github.com/ryancurrah/gomodguard v1.3.0/go.mod h1:ggBxb3luypPEzqVtq33ee7YSN35V28XeGnid8dnni50= +github.com/ryancurrah/gomodguard v1.3.1 h1:fH+fUg+ngsQO0ruZXXHnA/2aNllWA1whly4a6UvyzGE= +github.com/ryancurrah/gomodguard v1.3.1/go.mod h1:DGFHzEhi6iJ0oIDfMuo3TgrS+L9gZvrEfmjjuelnRU0= github.com/ryanrolds/sqlclosecheck v0.5.1 h1:dibWW826u0P8jNLsLN+En7+RqWWTYrjCB9fJfSfdyCU= github.com/ryanrolds/sqlclosecheck v0.5.1/go.mod h1:2g3dUjoS6AL4huFdv6wn55WpLIDjY7ZgUR4J8HOO/XQ= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/sanposhiho/wastedassign/v2 v2.0.7 h1:J+6nrY4VW+gC9xFzUc+XjPD3g3wF3je/NsJFwFK7Uxc= github.com/sanposhiho/wastedassign/v2 v2.0.7/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= +github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4= +github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY= github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tMEOsumirXcOJqAw= github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= github.com/sashamelentyev/usestdlibvars v1.25.0 h1:IK8SI2QyFzy/2OD2PYnhy84dpfNo9qADrRt6LH8vSzU= @@ -530,28 +532,26 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sivchari/containedctx v1.0.3 h1:x+etemjbsh2fB5ewm5FeLNi5bUjK0V8n0RB+Wwfd0XE= github.com/sivchari/containedctx v1.0.3/go.mod h1:c1RDvCbnJLtH4lLcYD/GqwiBSSf4F5Qk0xld2rBqzJ4= -github.com/sivchari/nosnakecase v1.7.0 h1:7QkpWIRMe8x25gckkFd2A5Pi6Ymo0qgr4JrhGt95do8= -github.com/sivchari/nosnakecase v1.7.0/go.mod h1:CwDzrzPea40/GB6uynrNLiorAlgFRvRbFSgJx2Gs+QY= github.com/sivchari/tenv v1.7.1 h1:PSpuD4bu6fSmtWMxSGWcvqUUgIn7k3yOJhOIzVWn8Ak= github.com/sivchari/tenv v1.7.1/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ= github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= github.com/sonatard/noctx v0.0.2 h1:L7Dz4De2zDQhW8S0t+KUjY0MAQJd6SgVwhzNIc4ok00= github.com/sonatard/noctx v0.0.2/go.mod h1:kzFz+CzWSjQ2OzIm46uJZoXuBpa2+0y3T36U18dWqIo= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/sourcegraph/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCpA8G0= github.com/sourcegraph/go-diff v0.7.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= +github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YEwQ0= github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= github.com/stbenjam/no-sprintf-host-port v0.1.1 h1:tYugd/yrm1O0dV+ThCbaKZh195Dfm07ysF0U6JQXczc= @@ -559,8 +559,9 @@ github.com/stbenjam/no-sprintf-host-port v0.1.1/go.mod h1:TLhvtIvONRzdmkFiio4O8L github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -569,10 +570,11 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 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.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +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= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c h1:+aPplBwWcHBo6q9xrfWdMrT9o4kltkmmvpemgIjep/8= github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c/go.mod h1:SbErYREK7xXdsRiigaQiQkI9McGRzYMvlKYaP3Nimdk= github.com/tdakkota/asciicheck v0.2.0 h1:o8jvnUANo0qXtnslk2d3nMKTFNlOnJjRrNcj0j9qkHM= @@ -587,8 +589,8 @@ github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 h1:quvGphlmUVU+n github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966/go.mod h1:27bSVNWSBOHm+qRp1T9qzaIpsWEP6TbUnei/43HK+PQ= github.com/timonwong/loggercheck v0.9.4 h1:HKKhqrjcVj8sxL7K77beXh0adEm6DLjV/QOGeMXEVi4= github.com/timonwong/loggercheck v0.9.4/go.mod h1:caz4zlPcgvpEkXgVnAJGowHAMW2NwHaNlpS8xDbVhTg= -github.com/tomarrell/wrapcheck/v2 v2.8.1 h1:HxSqDSN0sAt0yJYsrcYVoEeyM4aI9yAm3KQpIXDJRhQ= -github.com/tomarrell/wrapcheck/v2 v2.8.1/go.mod h1:/n2Q3NZ4XFT50ho6Hbxg+RV1uyo2Uow/Vdm9NQcl5SE= +github.com/tomarrell/wrapcheck/v2 v2.8.3 h1:5ov+Cbhlgi7s/a42BprYoxsr73CbdMUTzE3bRDFASUs= +github.com/tomarrell/wrapcheck/v2 v2.8.3/go.mod h1:g9vNIyhb5/9TQgumxQyOEqDHsmGYcGsVMOx/xGkqdMo= github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw= github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/ultraware/funlen v0.1.0 h1:BuqclbkY6pO+cvxoq7OsktIXZpgBSkYTQtmwhAK81vI= @@ -618,33 +620,35 @@ gitlab.com/bosi/decorder v0.4.1 h1:VdsdfxhstabyhZovHafFw+9eJ6eU0d2CkFNJcZz/NU4= gitlab.com/bosi/decorder v0.4.1/go.mod h1:jecSqWUew6Yle1pCr2eLWTensJMmsxHsBwt+PVbkAqA= go-simpler.org/assert v0.7.0 h1:OzWWZqfNxt8cLS+MlUp6Tgk1HjPkmgdKBq9qvy8lZsA= go-simpler.org/assert v0.7.0/go.mod h1:74Eqh5eI6vCK6Y5l3PI8ZYFXG4Sa+tkr70OIPJAUr28= -go-simpler.org/musttag v0.8.0 h1:DR4UTgetNNhPRNo02rkK1hwDTRzAPotN+ZqYpdtEwWc= -go-simpler.org/musttag v0.8.0/go.mod h1:fiNdCkXt2S6je9Eblma3okjnlva9NT1Eg/WUt19rWu8= -go-simpler.org/sloglint v0.4.0 h1:UVJuUJo63iNQNFEOtZ6o1xAgagVg/giVLLvG9nNLobI= -go-simpler.org/sloglint v0.4.0/go.mod h1:v6zJ++j/thFPhefs2wEXoCKwT10yo5nkBDYRCXyqgNQ= +go-simpler.org/musttag v0.9.0 h1:Dzt6/tyP9ONr5g9h9P3cnYWCxeBFRkd0uJL/w+1Mxos= +go-simpler.org/musttag v0.9.0/go.mod h1:gA9nThnalvNSKpEoyp3Ko4/vCX2xTpqKoUtNqXOnVR4= +go-simpler.org/sloglint v0.5.0 h1:2YCcd+YMuYpuqthCgubcF5lBSjb6berc5VMOYUHKrpY= +go-simpler.org/sloglint v0.5.0/go.mod h1:EUknX5s8iXqf18KQxKnaBHUPVriiPnOrPjjJcsaTcSQ= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opentelemetry.io/build-tools v0.12.0 h1:ZqK1GuqBp9Mf1RthYO3/jjf9tPWzeHMcVDo0itFi/lI= -go.opentelemetry.io/build-tools v0.12.0/go.mod h1:I76Qvv9cN055XJfTHw9t257EUd5Yp0EofeTMESlZuRU= -go.opentelemetry.io/build-tools/checkfile v0.12.0 h1:1g3iBxjPuack0pEvqkTiEcyh0uJvKXkQg8IMJkhiFX0= -go.opentelemetry.io/build-tools/checkfile v0.12.0/go.mod h1:0Ql58QUUwr2jaQJSjFKkAFkT/Eent7eEOKiQ1+R+zvA= -go.opentelemetry.io/build-tools/chloggen v0.12.0 h1:BFj/1bNIGxOs1GykGjhV4gycz1nqVWI/xVDUaVfNibw= -go.opentelemetry.io/build-tools/chloggen v0.12.0/go.mod h1:zuYbAo3TkrHo3C7lCrM5dHWSS50BDr0UfRYtyBFv2dQ= -go.opentelemetry.io/build-tools/crosslink v0.12.1-0.20240121161735-d70c842b1bf5 h1:3XxFDNe5QBv6qPqUJK/ihejuTpJfCPSFyoJuP8DHKew= -go.opentelemetry.io/build-tools/crosslink v0.12.1-0.20240121161735-d70c842b1bf5/go.mod h1:pHYd1joKyVZPA5sf6gOrbzfbY8VFDiXFp0fVi68whAU= -go.opentelemetry.io/build-tools/multimod v0.12.0 h1:DKi+A+4EaKrOZDTNDDZz3ijiAduEQDo8j1rzWUaGUHo= -go.opentelemetry.io/build-tools/multimod v0.12.0/go.mod h1:w03q3WgZs7reoBNnmfdClkKdTIA/IHM8ric5E2jEDD0= -go.opentelemetry.io/build-tools/semconvgen v0.12.0 h1:AsjYFwo8sSLAjwjklj+yVwm2xogJUxRf5pxflATg9N0= -go.opentelemetry.io/build-tools/semconvgen v0.12.0/go.mod h1:SRmou8pp+7gBmf1AvdxOTwVts74Syyrgm1/Qx7R8mis= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= -go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= +go.opentelemetry.io/build-tools v0.13.0 h1:0I3jJQ2zcJU8k4ZjyHNqUBX2Len1UvBIOzVP4b50g9A= +go.opentelemetry.io/build-tools v0.13.0/go.mod h1:PEtg5iWjNI9WAlKXP/xll/hgbq/Cp4Ma4T1ssKB2T0Q= +go.opentelemetry.io/build-tools/checkfile v0.13.0 h1:Nq13fOLpF9T+y4birZbfv6JurFC1Pla5UwC+t0GMbAo= +go.opentelemetry.io/build-tools/checkfile v0.13.0/go.mod h1:fRNphqnBebBiwL1A3OofgCDiJ6enb73uKGIO+n0gHPI= +go.opentelemetry.io/build-tools/chloggen v0.13.0 h1:C30r8ecNuJ30T3+vSvFJhaXUjUpx6r07nM3weDCpS7U= +go.opentelemetry.io/build-tools/chloggen v0.13.0/go.mod h1:1Ueg04+D2eU7Lm80RqS4DYTdtkHwTmulQZL0tUI4iAk= +go.opentelemetry.io/build-tools/crosslink v0.13.0 h1:R0V89bTYzoJpasiOIYiQo6txL/ZTzMdEuthJ4gLUTF8= +go.opentelemetry.io/build-tools/crosslink v0.13.0/go.mod h1:aYIwOj9b3Nmgm6nIZZk28tF/JjpicI8xenEVUeoVNp0= +go.opentelemetry.io/build-tools/multimod v0.13.0 h1:HGAP3zCM8vOTNJSQbjQ5VbKZSctIZxppPBxRTzye7ic= +go.opentelemetry.io/build-tools/multimod v0.13.0/go.mod h1:CxZp68c4PIN+bYlVOGB2FvE5zZMBuGz7cGSHv2L7pSc= +go.opentelemetry.io/build-tools/semconvgen v0.13.0 h1:gGCCXzAQa4/9osvjQr/twTSiPFloxJOz01/segikweI= +go.opentelemetry.io/build-tools/semconvgen v0.13.0/go.mod h1:Xwolx7cXWG3QYYLvDMeO4+IkZGna+4SkI6qadeLDkW4= +go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= +go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -656,8 +660,8 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= -golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -672,8 +676,8 @@ golang.org/x/exp v0.0.0-20240119083558-1b970713d09a h1:Q8/wZp0KX97QFTc2ywcOE0YRj golang.org/x/exp v0.0.0-20240119083558-1b970713d09a/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= -golang.org/x/exp/typeparams v0.0.0-20231219180239-dc181d75b848 h1:UhRVJ0i7bF9n/Hd8YjW3eKjlPVBHzbQdxrBgjbSKl64= -golang.org/x/exp/typeparams v0.0.0-20231219180239-dc181d75b848/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f h1:phY1HzDcf18Aq9A8KkmRtY9WvOFIxN8wgfvy6Zm1DV8= +golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -702,8 +706,8 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= -golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -744,8 +748,8 @@ golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -765,8 +769,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -822,8 +826,8 @@ golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 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= @@ -831,8 +835,8 @@ golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= -golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= +golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -896,7 +900,6 @@ golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= @@ -911,10 +914,10 @@ golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= -golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= -golang.org/x/vuln v1.0.4 h1:SP0mPeg2PmGCu03V+61EcQiOjmpri2XijexKdzv8Z1I= -golang.org/x/vuln v1.0.4/go.mod h1:NbJdUQhX8jY++FtuhrXs2Eyx0yePo9pF7nPlIjo9aaQ= +golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= +golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= +golang.org/x/vuln v1.1.0 h1:ECEdI+aEtjpF90eqEcDL5Q11DWSZAw5PJQWlp0+gWqc= +golang.org/x/vuln v1.1.0/go.mod h1:HT/Ar8fE34tbxWG2s7PYjVl+iIE4Er36/940Z+K540Y= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -994,8 +997,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1024,14 +1027,10 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.4.6 h1:oFEHCKeID7to/3autwsWfnuv69j3NsfcXbvJKuIcep8= -honnef.co/go/tools v0.4.6/go.mod h1:+rnGS1THNh8zMwnd2oVOTL9QF6vmfyG6ZXBULae2uc0= +honnef.co/go/tools v0.4.7 h1:9MDAWxMoSnB6QoSqiVr7P5mtkT9pOc1kSxchzPCnqJs= +honnef.co/go/tools v0.4.7/go.mod h1:+rnGS1THNh8zMwnd2oVOTL9QF6vmfyG6ZXBULae2uc0= mvdan.cc/gofumpt v0.6.0 h1:G3QvahNDmpD+Aek/bNOLrFR2XC6ZAdo62dZu65gmwGo= mvdan.cc/gofumpt v0.6.0/go.mod h1:4L0wf+kgIPZtcCWXynNS2e6bhmj73umwnuXSZarixzA= -mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed h1:WX1yoOaKQfddO/mLzdV4wptyWgoH/6hwLs7QHTixo0I= -mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= -mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphDJbHOQO1DFFFTeBo= -mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= mvdan.cc/unparam v0.0.0-20240104100049-c549a3470d14 h1:zCr3iRRgdk5eIikZNDphGcM6KGVTx3Yu+/Uu9Es254w= mvdan.cc/unparam v0.0.0-20240104100049-c549a3470d14/go.mod h1:ZzZjEpJDOmx8TdVU6umamY3Xy0UAQUI2DHbf05USVbI= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/obsreport/doc.go b/obsreport/doc.go deleted file mode 100644 index ca75b9ac670..00000000000 --- a/obsreport/doc.go +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package obsreport provides unified and consistent observability signals ( -// metrics, tracing, etc) for components of the OpenTelemetry collector. -// -// The function Configure is used to control which signals are going to be -// generated. It provides functions for the typical operations of receivers, -// processors, and exporters. -// -// Receivers should use the respective start and end according to the data type -// being received, ie.: -// -// - Traces receive operations should use the pair: -// StartTracesOp/EndTracesOp -// -// - Metrics receive operations should use the pair: -// StartMetricsOp/EndMetricsOp -// -// - Logs receive operations should use the pair: -// StartLogsOp/EndLogsOp -// -// Similar for exporters: -// -// - Traces export operations should use the pair: -// StartTracesOp/EndTracesOp -// -// - Metrics export operations should use the pair: -// StartMetricsOp/EndMetricsOp -// -// - Metrics export operations should use the pair: -// StartLogsOp/EndLogsOp -// -// The package is capable of generating legacy metrics by using the -// observability package allowing a controlled transition from legacy to the -// new metrics. The goal is to eventually remove the legacy metrics and use only -// the new metrics. -// -// The main differences regarding the legacy metrics are: -// -// 1. "Amount of metric data" is measured as metric points (ie.: a single value -// in time), contrast it with number of time series used legacy. Number of -// metric data points is a more general concept regarding various metric -// formats. -// -// 2. Exporters measure the number of items, ie.: number of spans or metric -// points, that were sent and the ones for which the attempt to send failed. -// For more information about this see Notes below about reporting data loss. -// -// 3. All measurements of "amount of data" used in the new metrics for receivers -// and exporters should reflect their native formats, not the internal format -// used in the Collector. This is to facilitate reconciliation between Collector, -// client and backend. For instance: certain metric formats do not provide -// direct support for histograms and have predefined conventions to represent -// those, this conversion may end with a different number of time series and -// data points than the internal Collector format. -// -// Notes: -// -// * Data loss should be recorded only when the component itself remove the data -// from the pipeline. Legacy metrics for receivers used "dropped" in their names -// but these could be non-zero under normal operations and reflected no actual -// data loss when exporters with "sending_queue" are used. New metrics were renamed -// to avoid this misunderstanding. Here are the general recommendations to report data loss: -// -// - Receivers reporting errors to clients typically result in the client -// re-sending the same data so it is more correct to report "receive errors", -// not actual data loss. -// -// - Exporters need to report individual failures to send data, but on -// typical production pipelines processors usually take care of retries, -// so these should be reported as "send errors". -// -// - Data "filtered out" should have its own metrics and not be confused -// with dropped data. -// -// # Naming Convention for New Metrics -// -// Common Metrics: -// Metrics shared by different components should follow the convention below: -// -// `/` -// -// As a label the metric should have at least `{=""}` where -// `` is the name used in the configuration for the instance of the -// component, eg.: -// -// `receiver/accepted_spans{receiver="otlp",...}` -// `exporter/sent_spans{exporter="otlp/prod",...}` -// -// Component Specific Metrics: -// These metrics are implemented by specific components, eg.: batch processor. -// The general pattern is the same as the common metrics but with the addition -// of the component type (as it appears in the configuration) before the actual -// metric: -// -// `//` -// -// Even metrics exclusive to a single type should follow the conventions above -// and also include the type (as written in the configuration) as part of the -// metric name since there could be multiple instances of the same type in -// different pipelines, eg.: -// -// `processor/batch/batch_size_trigger_send{processor="batch/dev",...}` -package obsreport // import "go.opentelemetry.io/collector/obsreport" diff --git a/obsreport/obsreporttest/deprecated.go b/obsreport/obsreporttest/deprecated.go deleted file mode 100644 index b822191ee4e..00000000000 --- a/obsreport/obsreporttest/deprecated.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package obsreporttest // import "go.opentelemetry.io/collector/obsreport/obsreporttest" - -import ( - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" -) - -// Deprecated: [0.93.0] Use componenttest.TestTelemetry instead -type TestTelemetry = componenttest.TestTelemetry - -// SetupTelemetry does setup the testing environment to check the metrics recorded by receivers, producers or exporters. -// The caller must pass the ID of the component that intends to test, so the CreateSettings and Check methods will use. -// The caller should defer a call to Shutdown the returned TestTelemetry. -// -// Deprecated: [0.93.0] Use componenttest.SetupTelemetry instead -func SetupTelemetry(id component.ID) (TestTelemetry, error) { - return componenttest.SetupTelemetry(id) -} - -// CheckScraperMetrics checks that for the current exported values for metrics scraper metrics match given values. -// When this function is called it is required to also call SetupTelemetry as first thing. -// -// Deprecated: [0.93.0] Use TestTelemetry.CheckScraperMetrics instead -func CheckScraperMetrics(tts TestTelemetry, receiver component.ID, scraper component.ID, scrapedMetricPoints, erroredMetricPoints int64) error { - return tts.CheckScraperMetrics(receiver, scraper, scrapedMetricPoints, erroredMetricPoints) -} diff --git a/obsreport/obsreporttest/package_test.go b/obsreport/obsreporttest/package_test.go deleted file mode 100644 index 97b3f7f9210..00000000000 --- a/obsreport/obsreporttest/package_test.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package obsreporttest - -import ( - "testing" - - "go.uber.org/goleak" -) - -func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) -} diff --git a/otelcol/collector.go b/otelcol/collector.go index 3fd5cb2ca31..bca6e9b86dc 100644 --- a/otelcol/collector.go +++ b/otelcol/collector.go @@ -99,8 +99,9 @@ type Collector struct { configProvider ConfigProvider - service *service.Service - state *atomic.Int32 + serviceConfig *service.Config + service *service.Service + state *atomic.Int32 // shutdownChan is used to terminate the collector. shutdownChan chan struct{} @@ -115,6 +116,9 @@ func NewCollector(set CollectorSettings) (*Collector, error) { var err error configProvider := set.ConfigProvider + set.ConfigProviderSettings.ResolverSettings.ProviderSettings = confmap.ProviderSettings{Logger: zap.NewNop()} + set.ConfigProviderSettings.ResolverSettings.ConverterSettings = confmap.ConverterSettings{} + if configProvider == nil { configProvider, err = NewConfigProvider(set.ConfigProviderSettings) if err != nil { @@ -182,6 +186,8 @@ func (col *Collector) setupConfigurationComponents(ctx context.Context) error { return fmt.Errorf("invalid configuration: %w", err) } + col.serviceConfig = &cfg.Service + col.service, err = service.New(ctx, service.Settings{ BuildInfo: col.set.BuildInfo, CollectorConf: conf, @@ -239,6 +245,7 @@ func (col *Collector) DryRun(ctx context.Context) error { // Run starts the collector according to the given configuration, and waits for it to complete. // Consecutive calls to Run are not allowed, Run shouldn't be called once a collector is shut down. +// Sets up the control logic for config reloading and shutdown. func (col *Collector) Run(ctx context.Context) error { if err := col.setupConfigurationComponents(ctx); err != nil { col.setCollectorState(StateClosed) @@ -254,6 +261,8 @@ func (col *Collector) Run(ctx context.Context) error { signal.Notify(col.signalsChannel, os.Interrupt, syscall.SIGTERM) } + // Control loop: selects between channels for various interrupts - when this loop is broken, the collector exits. + // If a configuration reload fails, we return without waiting for graceful shutdown. LOOP: for { select { diff --git a/otelcol/collector_test.go b/otelcol/collector_test.go index c56d56fc728..b96a6fc15db 100644 --- a/otelcol/collector_test.go +++ b/otelcol/collector_test.go @@ -421,16 +421,33 @@ func TestCollectorClosedStateOnStartUpError(t *testing.T) { } func TestCollectorDryRun(t *testing.T) { - // Load a bad config causing startup to fail - set := CollectorSettings{ - BuildInfo: component.NewDefaultBuildInfo(), - Factories: nopFactories, - ConfigProviderSettings: newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-invalid.yaml")}), + tests := map[string]struct { + settings CollectorSettings + expectedErr string + }{ + "invalid_processor": { + settings: CollectorSettings{ + BuildInfo: component.NewDefaultBuildInfo(), + Factories: nopFactories, + ConfigProviderSettings: newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-invalid.yaml")}), + }, + expectedErr: `service::pipelines::traces: references processor "invalid" which is not configured`, + }, } - col, err := NewCollector(set) - require.NoError(t, err) - require.Error(t, col.DryRun(context.Background())) + for name, test := range tests { + t.Run(name, func(t *testing.T) { + col, err := NewCollector(test.settings) + require.NoError(t, err) + + err = col.DryRun(context.Background()) + if test.expectedErr == "" { + require.NoError(t, err) + } else { + require.EqualError(t, err, test.expectedErr) + } + }) + } } func TestPassConfmapToServiceFailure(t *testing.T) { @@ -439,8 +456,8 @@ func TestPassConfmapToServiceFailure(t *testing.T) { Factories: nopFactories, ConfigProviderSettings: ConfigProviderSettings{ ResolverSettings: confmap.ResolverSettings{ - URIs: []string{filepath.Join("testdata", "otelcol-invalid.yaml")}, - Providers: makeMapProvidersMap(newFailureProvider()), + URIs: []string{filepath.Join("testdata", "otelcol-invalid.yaml")}, + ProviderFactories: []confmap.ProviderFactory{confmap.NewProviderFactory(newFailureProvider)}, }, }, } @@ -463,7 +480,7 @@ func startCollector(ctx context.Context, t *testing.T, col *Collector) *sync.Wai type failureProvider struct{} -func newFailureProvider() confmap.Provider { +func newFailureProvider(_ confmap.ProviderSettings) confmap.Provider { return &failureProvider{} } diff --git a/otelcol/collector_windows.go b/otelcol/collector_windows.go index f443d930b17..cc0a3611628 100644 --- a/otelcol/collector_windows.go +++ b/otelcol/collector_windows.go @@ -18,6 +18,7 @@ import ( "golang.org/x/sys/windows/svc/eventlog" "go.opentelemetry.io/collector/featuregate" + "go.opentelemetry.io/collector/service" ) type windowsService struct { @@ -76,11 +77,6 @@ func (s *windowsService) Execute(args []string, requests <-chan svc.ChangeReques } func (s *windowsService) start(elog *eventlog.Log, colErrorChannel chan error) error { - // Append to new slice instead of the already existing s.settings.LoggingOptions slice to not change that. - s.settings.LoggingOptions = append( - []zap.Option{zap.WrapCore(withWindowsCore(elog))}, - s.settings.LoggingOptions..., - ) // Parse all the flags manually. if err := s.flags.Parse(os.Args[1:]); err != nil { return err @@ -96,6 +92,18 @@ func (s *windowsService) start(elog *eventlog.Log, colErrorChannel chan error) e return err } + // The logging options need to be in place before the collector Run method is called + // since the telemetry creates the logger at the time of the Run method call. + // However, the zap.WrapCore function needs to read the serviceConfig to determine + // if the Windows Event Log should be used, however, the serviceConfig is also + // only read at the time of the Run method call. To work around this, we pass the + // serviceConfig as a pointer to the logging options, and then read its value + // when the zap.Logger is created by the telemetry. + s.col.set.LoggingOptions = append( + s.col.set.LoggingOptions, + zap.WrapCore(withWindowsCore(elog, &s.col.serviceConfig)), + ) + // col.Run blocks until receiving a SIGTERM signal, so needs to be started // asynchronously, but it will exit early if an error occurs on startup go func() { @@ -192,8 +200,18 @@ func (w windowsEventLogCore) Sync() error { return w.core.Sync() } -func withWindowsCore(elog *eventlog.Log) func(zapcore.Core) zapcore.Core { +func withWindowsCore(elog *eventlog.Log, serviceConfig **service.Config) func(zapcore.Core) zapcore.Core { return func(core zapcore.Core) zapcore.Core { + if serviceConfig != nil { + for _, output := range (*serviceConfig).Telemetry.Logs.OutputPaths { + if output != "stdout" && output != "stderr" { + // A log file was specified in the configuration, so we should not use the Windows Event Log + return core + } + } + } + + // Use the Windows Event Log encoderConfig := zap.NewProductionEncoderConfig() encoderConfig.LineEnding = "\r\n" return windowsEventLogCore{core, elog, zapcore.NewConsoleEncoder(encoderConfig)} diff --git a/otelcol/collector_windows_service_test.go b/otelcol/collector_windows_service_test.go new file mode 100644 index 00000000000..999fa87bbbc --- /dev/null +++ b/otelcol/collector_windows_service_test.go @@ -0,0 +1,185 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:build windows && win32service + +package otelcol + +import ( + "encoding/xml" + "fmt" + "os" + "os/exec" + "path/filepath" + "testing" + "time" + + "github.com/stretchr/testify/require" + "golang.org/x/sys/windows/svc" + "golang.org/x/sys/windows/svc/mgr" +) + +const ( + collectorServiceName = "otelcorecol" +) + +// Test the collector as a Windows service. +// The test assumes that the service and respective event source are already created. +// The test also must be executed with administrative privileges. +func TestCollectorAsService(t *testing.T) { + collector_executable, err := filepath.Abs(filepath.Join("..", "bin", "otelcorecol_windows_amd64")) + require.NoError(t, err) + _, err = os.Stat(collector_executable) + require.NoError(t, err) + + scm, err := mgr.Connect() + require.NoError(t, err) + defer scm.Disconnect() + + service, err := scm.OpenService(collectorServiceName) + require.NoError(t, err) + defer service.Close() + + tests := []struct { + name string + configFile string + expectStartFailure bool + customSetup func(*testing.T) + customValidation func(*testing.T) + }{ + { + name: "Default", + configFile: filepath.Join("..", "examples", "local", "otel-config.yaml"), + }, + { + name: "ConfigFileNotFound", + configFile: filepath.Join(".", "non", "existent", "otel-config.yaml"), + expectStartFailure: true, + }, + { + name: "LogToFile", + configFile: filepath.Join(".", "testdata", "otel-log-to-file.yaml"), + customSetup: func(t *testing.T) { + // Create the folder and clean the log file if it exists + programDataPath := os.Getenv("ProgramData") + logsPath := filepath.Join(programDataPath, "OpenTelemetry", "Collector", "Logs") + err := os.MkdirAll(logsPath, os.ModePerm) + require.NoError(t, err) + + logFilePath := filepath.Join(logsPath, "otelcol.log") + err = os.Remove(logFilePath) + if err != nil && !os.IsNotExist(err) { + require.NoError(t, err) + } + }, + customValidation: func(t *testing.T) { + // Check that the log file was created + programDataPath := os.Getenv("ProgramData") + logsPath := filepath.Join(programDataPath, "OpenTelemetry", "Collector", "Logs") + logFilePath := filepath.Join(logsPath, "otelcol.log") + fileinfo, err := os.Stat(logFilePath) + require.NoError(t, err) + require.NotEmpty(t, fileinfo.Size()) + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + serviceConfig, err := service.Config() + require.NoError(t, err) + + // Setup the command line to launch the collector as a service + fullConfigPath, err := filepath.Abs(tt.configFile) + require.NoError(t, err) + + serviceConfig.BinaryPathName = fmt.Sprintf("\"%s\" --config \"%s\"", collector_executable, fullConfigPath) + err = service.UpdateConfig(serviceConfig) + require.NoError(t, err) + + if tt.customSetup != nil { + tt.customSetup(t) + } + + startTime := time.Now() + + err = service.Start() + require.NoError(t, err) + + expectedState := svc.Running + if tt.expectStartFailure { + expectedState = svc.Stopped + } else { + defer func() { + _, err = service.Control(svc.Stop) + require.NoError(t, err) + + require.Eventually(t, func() bool { + status, _ := service.Query() + return status.State == svc.Stopped + }, 10*time.Second, 500*time.Millisecond) + }() + } + + // Wait for the service to reach the expected state + require.Eventually(t, func() bool { + status, _ := service.Query() + return status.State == expectedState + }, 10*time.Second, 500*time.Millisecond) + + if tt.customValidation != nil { + tt.customValidation(t) + } else { + // Read the events from the otelcorecol source and check that they were emitted after the service + // command started. This is a simple validation that the messages are being logged on the + // Windows event log. + cmd := exec.Command("wevtutil.exe", "qe", "Application", "/c:1", "/rd:true", "/f:RenderedXml", "/q:*[System[Provider[@Name='otelcorecol']]]") + out, err := cmd.CombinedOutput() + require.NoError(t, err) + + var e Event + require.NoError(t, xml.Unmarshal([]byte(out), &e)) + + eventTime, err := time.Parse("2006-01-02T15:04:05.9999999Z07:00", e.System.TimeCreated.SystemTime) + require.NoError(t, err) + + require.True(t, eventTime.After(startTime.In(time.UTC))) + } + }) + } +} + +// Helper types to read the XML events from the event log using wevtutil +type Event struct { + XMLName xml.Name `xml:"Event"` + System System `xml:"System"` + Data string `xml:"EventData>Data"` +} + +type System struct { + Provider Provider `xml:"Provider"` + EventID int `xml:"EventID"` + Version int `xml:"Version"` + Level int `xml:"Level"` + Task int `xml:"Task"` + Opcode int `xml:"Opcode"` + Keywords string `xml:"Keywords"` + TimeCreated TimeCreated `xml:"TimeCreated"` + EventRecordID int `xml:"EventRecordID"` + Execution Execution `xml:"Execution"` + Channel string `xml:"Channel"` + Computer string `xml:"Computer"` +} + +type Provider struct { + Name string `xml:"Name,attr"` +} + +type TimeCreated struct { + SystemTime string `xml:"SystemTime,attr"` +} + +type Execution struct { + ProcessID string `xml:"ProcessID,attr"` + ThreadID string `xml:"ThreadID,attr"` +} diff --git a/otelcol/command.go b/otelcol/command.go index f510687c31b..9db850bcc13 100644 --- a/otelcol/command.go +++ b/otelcol/command.go @@ -41,6 +41,7 @@ func NewCommand(set CollectorSettings) *cobra.Command { return rootCmd } +// Puts command line flags from flags into the CollectorSettings, to be used during config resolution. func updateSettingsUsingFlags(set *CollectorSettings, flags *flag.FlagSet) error { if set.ConfigProvider == nil { resolverSet := &set.ConfigProviderSettings.ResolverSettings @@ -55,7 +56,7 @@ func updateSettingsUsingFlags(set *CollectorSettings, flags *flag.FlagSet) error // Provide a default set of providers and converters if none have been specified. // TODO: Remove this after CollectorSettings.ConfigProvider is removed and instead // do it in the builder. - if len(resolverSet.Providers) == 0 && len(resolverSet.Converters) == 0 { + if len(resolverSet.ProviderFactories) == 0 && len(resolverSet.ConverterFactories) == 0 { set.ConfigProviderSettings = newDefaultConfigProviderSettings(resolverSet.URIs) } } diff --git a/otelcol/command_components.go b/otelcol/command_components.go index 83dd4670375..da13d6779a7 100644 --- a/otelcol/command_components.go +++ b/otelcol/command_components.go @@ -5,11 +5,17 @@ package otelcol // import "go.opentelemetry.io/collector/otelcol" import ( "fmt" + "sort" "github.com/spf13/cobra" "gopkg.in/yaml.v3" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/extension" + "go.opentelemetry.io/collector/processor" + "go.opentelemetry.io/collector/receiver" ) type componentWithStability struct { @@ -41,59 +47,59 @@ func newComponentsCommand(set CollectorSettings) *cobra.Command { } components := componentsOutput{} - for con := range factories.Connectors { + for _, con := range sortFactoriesByType[connector.Factory](factories.Connectors) { components.Connectors = append(components.Connectors, componentWithStability{ - Name: con, + Name: con.Type(), Stability: map[string]string{ - "logs-to-logs": factories.Connectors[con].LogsToLogsStability().String(), - "logs-to-metrics": factories.Connectors[con].LogsToMetricsStability().String(), - "logs-to-traces": factories.Connectors[con].LogsToTracesStability().String(), + "logs-to-logs": con.LogsToLogsStability().String(), + "logs-to-metrics": con.LogsToMetricsStability().String(), + "logs-to-traces": con.LogsToTracesStability().String(), - "metrics-to-logs": factories.Connectors[con].MetricsToLogsStability().String(), - "metrics-to-metrics": factories.Connectors[con].MetricsToMetricsStability().String(), - "metrics-to-traces": factories.Connectors[con].MetricsToTracesStability().String(), + "metrics-to-logs": con.MetricsToLogsStability().String(), + "metrics-to-metrics": con.MetricsToMetricsStability().String(), + "metrics-to-traces": con.MetricsToTracesStability().String(), - "traces-to-logs": factories.Connectors[con].TracesToLogsStability().String(), - "traces-to-metrics": factories.Connectors[con].TracesToMetricsStability().String(), - "traces-to-traces": factories.Connectors[con].TracesToTracesStability().String(), + "traces-to-logs": con.TracesToLogsStability().String(), + "traces-to-metrics": con.TracesToMetricsStability().String(), + "traces-to-traces": con.TracesToTracesStability().String(), }, }) } - for ext := range factories.Extensions { + for _, ext := range sortFactoriesByType[extension.Factory](factories.Extensions) { components.Extensions = append(components.Extensions, componentWithStability{ - Name: ext, + Name: ext.Type(), Stability: map[string]string{ - "extension": factories.Extensions[ext].ExtensionStability().String(), + "extension": ext.ExtensionStability().String(), }, }) } - for prs := range factories.Processors { + for _, prs := range sortFactoriesByType[processor.Factory](factories.Processors) { components.Processors = append(components.Processors, componentWithStability{ - Name: prs, + Name: prs.Type(), Stability: map[string]string{ - "logs": factories.Processors[prs].LogsProcessorStability().String(), - "metrics": factories.Processors[prs].MetricsProcessorStability().String(), - "traces": factories.Processors[prs].TracesProcessorStability().String(), + "logs": prs.LogsProcessorStability().String(), + "metrics": prs.MetricsProcessorStability().String(), + "traces": prs.TracesProcessorStability().String(), }, }) } - for rcv := range factories.Receivers { + for _, rcv := range sortFactoriesByType[receiver.Factory](factories.Receivers) { components.Receivers = append(components.Receivers, componentWithStability{ - Name: rcv, + Name: rcv.Type(), Stability: map[string]string{ - "logs": factories.Receivers[rcv].LogsReceiverStability().String(), - "metrics": factories.Receivers[rcv].MetricsReceiverStability().String(), - "traces": factories.Receivers[rcv].TracesReceiverStability().String(), + "logs": rcv.LogsReceiverStability().String(), + "metrics": rcv.MetricsReceiverStability().String(), + "traces": rcv.TracesReceiverStability().String(), }, }) } - for exp := range factories.Exporters { + for _, exp := range sortFactoriesByType[exporter.Factory](factories.Exporters) { components.Exporters = append(components.Exporters, componentWithStability{ - Name: exp, + Name: exp.Type(), Stability: map[string]string{ - "logs": factories.Exporters[exp].LogsExporterStability().String(), - "metrics": factories.Exporters[exp].MetricsExporterStability().String(), - "traces": factories.Exporters[exp].TracesExporterStability().String(), + "logs": exp.LogsExporterStability().String(), + "metrics": exp.MetricsExporterStability().String(), + "traces": exp.TracesExporterStability().String(), }, }) } @@ -107,3 +113,24 @@ func newComponentsCommand(set CollectorSettings) *cobra.Command { }, } } + +func sortFactoriesByType[T component.Factory](factories map[component.Type]T) []T { + // Gather component types (factories map keys) + componentTypes := make([]component.Type, 0, len(factories)) + for componentType := range factories { + componentTypes = append(componentTypes, componentType) + } + + // Sort component types as strings + sort.Slice(componentTypes, func(i, j int) bool { + return componentTypes[i].String() < componentTypes[j].String() + }) + + // Build and return list of factories, sorted by component types + sortedFactories := make([]T, 0, len(factories)) + for _, componentType := range componentTypes { + sortedFactories = append(sortedFactories, factories[componentType]) + } + + return sortedFactories +} diff --git a/otelcol/command_components_test.go b/otelcol/command_components_test.go index 141fb586010..c4e3c7fbf29 100644 --- a/otelcol/command_components_test.go +++ b/otelcol/command_components_test.go @@ -5,19 +5,17 @@ package otelcol import ( "bytes" + "os" "path/filepath" "strings" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" "go.opentelemetry.io/collector/component" ) -var nopType = component.MustNewType("nop") - func TestNewBuildSubCommand(t *testing.T) { cfgProvider, err := NewConfigProvider(newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-nop.yaml")})) require.NoError(t, err) @@ -30,56 +28,7 @@ func TestNewBuildSubCommand(t *testing.T) { cmd := NewCommand(set) cmd.SetArgs([]string{"components"}) - ExpectedYamlStruct := componentsOutput{ - BuildInfo: component.NewDefaultBuildInfo(), - Receivers: []componentWithStability{{ - Name: nopType, - Stability: map[string]string{ - "logs": "Stable", - "metrics": "Stable", - "traces": "Stable", - }, - }}, - Processors: []componentWithStability{{ - Name: nopType, - Stability: map[string]string{ - "logs": "Stable", - "metrics": "Stable", - "traces": "Stable", - }, - }}, - Exporters: []componentWithStability{{ - Name: nopType, - Stability: map[string]string{ - "logs": "Stable", - "metrics": "Stable", - "traces": "Stable", - }, - }}, - Connectors: []componentWithStability{{ - Name: nopType, - Stability: map[string]string{ - "logs-to-logs": "Development", - "logs-to-metrics": "Development", - "logs-to-traces": "Development", - - "metrics-to-logs": "Development", - "metrics-to-metrics": "Development", - "metrics-to-traces": "Development", - - "traces-to-logs": "Development", - "traces-to-metrics": "Development", - "traces-to-traces": "Development", - }, - }}, - Extensions: []componentWithStability{{ - Name: nopType, - Stability: map[string]string{ - "extension": "Stable", - }, - }}, - } - ExpectedOutput, err := yaml.Marshal(ExpectedYamlStruct) + ExpectedOutput, err := os.ReadFile(filepath.Join("testdata", "components-output.yaml")) require.NoError(t, err) b := bytes.NewBufferString("") @@ -89,5 +38,5 @@ func TestNewBuildSubCommand(t *testing.T) { // Trim new line at the end of the two strings to make a better comparison as string() adds an extra new // line that makes the test fail. - assert.Equal(t, strings.Trim(string(ExpectedOutput), "\n"), strings.Trim(b.String(), "\n")) + assert.Equal(t, strings.ReplaceAll(strings.ReplaceAll(string(ExpectedOutput), "\n", ""), "\r", ""), strings.ReplaceAll(strings.ReplaceAll(b.String(), "\n", ""), "\r", "")) } diff --git a/otelcol/command_test.go b/otelcol/command_test.go index d599441c658..69e1a943d2b 100644 --- a/otelcol/command_test.go +++ b/otelcol/command_test.go @@ -52,9 +52,9 @@ func TestAddFlagToSettings(t *testing.T) { set := CollectorSettings{ ConfigProviderSettings: ConfigProviderSettings{ ResolverSettings: confmap.ResolverSettings{ - URIs: []string{filepath.Join("testdata", "otelcol-invalid.yaml")}, - Providers: map[string]confmap.Provider{"file": fileprovider.NewWithSettings(confmap.ProviderSettings{})}, - Converters: []confmap.Converter{expandconverter.New(confmap.ConverterSettings{})}, + URIs: []string{filepath.Join("testdata", "otelcol-invalid.yaml")}, + ProviderFactories: []confmap.ProviderFactory{fileprovider.NewFactory()}, + ConverterFactories: []confmap.ConverterFactory{expandconverter.NewFactory()}, }, }, } @@ -80,16 +80,16 @@ func TestAddDefaultConfmapModules(t *testing.T) { err = updateSettingsUsingFlags(&set, flgs) require.NoError(t, err) require.Len(t, set.ConfigProviderSettings.ResolverSettings.URIs, 1) - require.Len(t, set.ConfigProviderSettings.ResolverSettings.Converters, 1) - require.Len(t, set.ConfigProviderSettings.ResolverSettings.Providers, 5) + require.Len(t, set.ConfigProviderSettings.ResolverSettings.ConverterFactories, 1) + require.Len(t, set.ConfigProviderSettings.ResolverSettings.ProviderFactories, 5) } func TestInvalidCollectorSettings(t *testing.T) { set := CollectorSettings{ ConfigProviderSettings: ConfigProviderSettings{ ResolverSettings: confmap.ResolverSettings{ - Converters: []confmap.Converter{expandconverter.New(confmap.ConverterSettings{})}, - URIs: []string{"--config=otelcol-nop.yaml"}, + ConverterFactories: []confmap.ConverterFactory{expandconverter.NewFactory()}, + URIs: []string{"--config=otelcol-nop.yaml"}, }, }, } @@ -101,9 +101,9 @@ func TestInvalidCollectorSettings(t *testing.T) { func TestNewCommandInvalidComponent(t *testing.T) { set := ConfigProviderSettings{ ResolverSettings: confmap.ResolverSettings{ - URIs: []string{filepath.Join("testdata", "otelcol-invalid.yaml")}, - Providers: map[string]confmap.Provider{"file": fileprovider.NewWithSettings(confmap.ProviderSettings{})}, - Converters: []confmap.Converter{expandconverter.New(confmap.ConverterSettings{})}, + URIs: []string{filepath.Join("testdata", "otelcol-invalid.yaml")}, + ProviderFactories: []confmap.ProviderFactory{fileprovider.NewFactory()}, + ConverterFactories: []confmap.ConverterFactory{expandconverter.NewFactory()}, }, } diff --git a/otelcol/command_validate_test.go b/otelcol/command_validate_test.go index b215a77ffbf..30d291d4a56 100644 --- a/otelcol/command_validate_test.go +++ b/otelcol/command_validate_test.go @@ -26,9 +26,9 @@ func TestValidateSubCommandInvalidComponents(t *testing.T) { cfgProvider, err := NewConfigProvider( ConfigProviderSettings{ ResolverSettings: confmap.ResolverSettings{ - URIs: []string{filepath.Join("testdata", "otelcol-invalid-components.yaml")}, - Providers: map[string]confmap.Provider{"file": fileprovider.NewWithSettings(confmap.ProviderSettings{})}, - Converters: []confmap.Converter{expandconverter.New(confmap.ConverterSettings{})}, + URIs: []string{filepath.Join("testdata", "otelcol-invalid-components.yaml")}, + ProviderFactories: []confmap.ProviderFactory{fileprovider.NewFactory()}, + ConverterFactories: []confmap.ConverterFactory{expandconverter.NewFactory()}, }, }) require.NoError(t, err) diff --git a/otelcol/config.go b/otelcol/config.go index 9345405b4fd..7c27bd40201 100644 --- a/otelcol/config.go +++ b/otelcol/config.go @@ -12,8 +12,9 @@ import ( ) var ( - errMissingExporters = errors.New("no exporter configuration specified in config") - errMissingReceivers = errors.New("no receiver configuration specified in config") + errMissingExporters = errors.New("no exporter configuration specified in config") + errMissingReceivers = errors.New("no receiver configuration specified in config") + errEmptyConfigurationFile = errors.New("empty configuration file") ) // Config defines the configuration for the various elements of collector or agent. @@ -42,6 +43,11 @@ type Config struct { // invalid cases that we currently don't check for but which we may want to add in // the future (e.g. disallowing receiving and exporting on the same endpoint). func (cfg *Config) Validate() error { + // There must be at least one property set in the configuration file. + if len(cfg.Receivers) == 0 && len(cfg.Exporters) == 0 && len(cfg.Processors) == 0 && len(cfg.Connectors) == 0 && len(cfg.Extensions) == 0 { + return errEmptyConfigurationFile + } + // Currently, there is no default receiver enabled. // The configuration must specify at least one receiver to be valid. if len(cfg.Receivers) == 0 { diff --git a/otelcol/config_test.go b/otelcol/config_test.go index e482e6c8ae8..c1677c07220 100644 --- a/otelcol/config_test.go +++ b/otelcol/config_test.go @@ -54,6 +54,19 @@ func TestConfigValidate(t *testing.T) { }, expected: nil, }, + { + name: "empty configuration file", + cfgFn: func() *Config { + cfg := generateConfig() + cfg.Receivers = nil + cfg.Connectors = nil + cfg.Processors = nil + cfg.Exporters = nil + cfg.Extensions = nil + return cfg + }, + expected: errEmptyConfigurationFile, + }, { name: "missing-exporters", cfgFn: func() *Config { diff --git a/otelcol/configprovider.go b/otelcol/configprovider.go index fa43aa64ae6..477541fd4bd 100644 --- a/otelcol/configprovider.go +++ b/otelcol/configprovider.go @@ -132,27 +132,17 @@ func (cm *configProvider) GetConfmap(ctx context.Context) (*confmap.Conf, error) } func newDefaultConfigProviderSettings(uris []string) ConfigProviderSettings { - converterSet := confmap.ConverterSettings{} - providerSet := confmap.ProviderSettings{} return ConfigProviderSettings{ ResolverSettings: confmap.ResolverSettings{ URIs: uris, - Providers: makeMapProvidersMap( - fileprovider.NewWithSettings(providerSet), - envprovider.NewWithSettings(providerSet), - yamlprovider.NewWithSettings(providerSet), - httpprovider.NewWithSettings(providerSet), - httpsprovider.NewWithSettings(providerSet), - ), - Converters: []confmap.Converter{expandconverter.New(converterSet)}, + ProviderFactories: []confmap.ProviderFactory{ + fileprovider.NewFactory(), + envprovider.NewFactory(), + yamlprovider.NewFactory(), + httpprovider.NewFactory(), + httpsprovider.NewFactory(), + }, + ConverterFactories: []confmap.ConverterFactory{expandconverter.NewFactory()}, }, } } - -func makeMapProvidersMap(providers ...confmap.Provider) map[string]confmap.Provider { - ret := make(map[string]confmap.Provider, len(providers)) - for _, provider := range providers { - ret[provider.Scheme()] = provider - } - return ret -} diff --git a/otelcol/configprovider_test.go b/otelcol/configprovider_test.go index a1c5be3eb49..b9ad46cb70d 100644 --- a/otelcol/configprovider_test.go +++ b/otelcol/configprovider_test.go @@ -48,11 +48,10 @@ func TestConfigProviderYaml(t *testing.T) { require.NoError(t, err) uriLocation := "yaml:" + string(yamlBytes) - provider := yamlprovider.New() set := ConfigProviderSettings{ ResolverSettings: confmap.ResolverSettings{ - URIs: []string{uriLocation}, - Providers: map[string]confmap.Provider{provider.Scheme(): provider}, + URIs: []string{uriLocation}, + ProviderFactories: []confmap.ProviderFactory{yamlprovider.NewFactory()}, }, } @@ -73,11 +72,10 @@ func TestConfigProviderYaml(t *testing.T) { func TestConfigProviderFile(t *testing.T) { uriLocation := "file:" + filepath.Join("testdata", "otelcol-nop.yaml") - provider := fileprovider.New() set := ConfigProviderSettings{ ResolverSettings: confmap.ResolverSettings{ - URIs: []string{uriLocation}, - Providers: map[string]confmap.Provider{provider.Scheme(): provider}, + URIs: []string{uriLocation}, + ProviderFactories: []confmap.ProviderFactory{fileprovider.NewFactory()}, }, } @@ -101,11 +99,10 @@ func TestConfigProviderFile(t *testing.T) { func TestGetConfmap(t *testing.T) { uriLocation := "file:" + filepath.Join("testdata", "otelcol-nop.yaml") - provider := fileprovider.New() set := ConfigProviderSettings{ ResolverSettings: confmap.ResolverSettings{ - URIs: []string{uriLocation}, - Providers: map[string]confmap.Provider{provider.Scheme(): provider}, + URIs: []string{uriLocation}, + ProviderFactories: []confmap.ProviderFactory{fileprovider.NewFactory()}, }, } diff --git a/otelcol/factories_test.go b/otelcol/factories_test.go index 645d59c7db2..965ea91844b 100644 --- a/otelcol/factories_test.go +++ b/otelcol/factories_test.go @@ -4,6 +4,7 @@ package otelcol import ( + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/connector" "go.opentelemetry.io/collector/connector/connectortest" "go.opentelemetry.io/collector/exporter" @@ -28,7 +29,7 @@ func nopFactories() (Factories, error) { return Factories{}, err } - if factories.Receivers, err = receiver.MakeFactoryMap(receivertest.NewNopFactory()); err != nil { + if factories.Receivers, err = receiver.MakeFactoryMap(receivertest.NewNopFactory(), receivertest.NewNopFactoryForType(component.DataTypeLogs)); err != nil { return Factories{}, err } diff --git a/otelcol/go.mod b/otelcol/go.mod index 78caf027f15..a24906b5d07 100644 --- a/otelcol/go.mod +++ b/otelcol/go.mod @@ -4,34 +4,35 @@ go 1.21 require ( github.com/spf13/cobra v1.8.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.96.0 - go.opentelemetry.io/collector/config/configtelemetry v0.96.0 - go.opentelemetry.io/collector/confmap v0.96.0 - go.opentelemetry.io/collector/confmap/converter/expandconverter v0.96.0 - go.opentelemetry.io/collector/confmap/provider/envprovider v0.96.0 - go.opentelemetry.io/collector/confmap/provider/fileprovider v0.96.0 - go.opentelemetry.io/collector/confmap/provider/httpprovider v0.96.0 - go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.96.0 - go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.96.0 - go.opentelemetry.io/collector/connector v0.96.0 - go.opentelemetry.io/collector/exporter v0.96.0 - go.opentelemetry.io/collector/extension v0.96.0 - go.opentelemetry.io/collector/featuregate v1.3.0 - go.opentelemetry.io/collector/processor v0.96.0 - go.opentelemetry.io/collector/receiver v0.96.0 - go.opentelemetry.io/collector/service v0.96.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.100.0 + go.opentelemetry.io/collector/config/configtelemetry v0.100.0 + go.opentelemetry.io/collector/confmap v0.100.0 + go.opentelemetry.io/collector/confmap/converter/expandconverter v0.100.0 + go.opentelemetry.io/collector/confmap/provider/envprovider v0.100.0 + go.opentelemetry.io/collector/confmap/provider/fileprovider v0.100.0 + go.opentelemetry.io/collector/confmap/provider/httpprovider v0.100.0 + go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.100.0 + go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.100.0 + go.opentelemetry.io/collector/connector v0.100.0 + go.opentelemetry.io/collector/exporter v0.100.0 + go.opentelemetry.io/collector/extension v0.100.0 + go.opentelemetry.io/collector/featuregate v1.7.0 + go.opentelemetry.io/collector/processor v0.100.0 + go.opentelemetry.io/collector/receiver v0.100.0 + go.opentelemetry.io/collector/service v0.100.0 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 - golang.org/x/sys v0.17.0 - google.golang.org/grpc v1.62.0 + golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa + golang.org/x/sys v0.19.0 + google.golang.org/grpc v1.63.2 gopkg.in/yaml.v3 v3.0.1 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.1 // indirect @@ -40,15 +41,14 @@ require ( github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect @@ -57,43 +57,44 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/prometheus/client_golang v1.19.0 // indirect - github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - github.com/shirou/gopsutil/v3 v3.24.1 // indirect + github.com/shirou/gopsutil/v3 v3.24.3 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect - github.com/yusufpapurcu/wmi v1.2.3 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.96.0 // indirect - go.opentelemetry.io/collector/consumer v0.96.0 // indirect - go.opentelemetry.io/collector/pdata v1.3.0 // indirect - go.opentelemetry.io/collector/semconv v0.96.0 // indirect - go.opentelemetry.io/contrib/config v0.4.0 // indirect - go.opentelemetry.io/contrib/propagators/b3 v1.24.0 // indirect - go.opentelemetry.io/otel v1.24.0 // indirect - go.opentelemetry.io/otel/bridge/opencensus v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 // indirect - go.opentelemetry.io/otel/metric v1.24.0 // indirect - go.opentelemetry.io/otel/sdk v1.24.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect - go.opentelemetry.io/otel/trace v1.24.0 // indirect - go.opentelemetry.io/proto/otlp v1.1.0 // indirect - golang.org/x/net v0.21.0 // indirect + go.opentelemetry.io/collector v0.100.0 // indirect + go.opentelemetry.io/collector/consumer v0.100.0 // indirect + go.opentelemetry.io/collector/pdata v1.7.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.100.0 // indirect + go.opentelemetry.io/collector/semconv v0.100.0 // indirect + go.opentelemetry.io/contrib/config v0.6.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.26.0 // indirect + go.opentelemetry.io/otel v1.26.0 // indirect + go.opentelemetry.io/otel/bridge/opencensus v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 // indirect + go.opentelemetry.io/otel/metric v1.26.0 // indirect + go.opentelemetry.io/otel/sdk v1.26.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + go.opentelemetry.io/otel/trace v1.26.0 // indirect + go.opentelemetry.io/proto/otlp v1.2.0 // indirect + golang.org/x/net v0.24.0 // indirect golang.org/x/text v0.14.0 // indirect - gonum.org/v1/gonum v0.14.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/protobuf v1.32.0 // indirect + gonum.org/v1/gonum v0.15.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/protobuf v1.34.0 // indirect ) replace go.opentelemetry.io/collector => ../ @@ -106,6 +107,8 @@ replace go.opentelemetry.io/collector/component => ../component replace go.opentelemetry.io/collector/pdata => ../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../pdata/testdata + replace go.opentelemetry.io/collector/extension/zpagesextension => ../extension/zpagesextension replace go.opentelemetry.io/collector/extension => ../extension diff --git a/otelcol/go.sum b/otelcol/go.sum index c0bb0cbd6fd..ccfb176713a 100644 --- a/otelcol/go.sum +++ b/otelcol/go.sum @@ -2,8 +2,8 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -42,16 +42,12 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= @@ -60,8 +56,8 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= @@ -74,8 +70,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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= @@ -98,17 +94,17 @@ github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:Om github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/shirou/gopsutil/v3 v3.24.1 h1:R3t6ondCEvmARp3wxODhXMTLC/klMa87h2PHUw5m7QI= -github.com/shirou/gopsutil/v3 v3.24.1/go.mod h1:UU7a2MSBQa+kW1uuDq8DeEBS8kmrnQwsv2b5O513rwU= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= @@ -120,58 +116,60 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 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/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= -go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= -go.opentelemetry.io/contrib/propagators/b3 v1.24.0 h1:n4xwCdTx3pZqZs2CjS/CUZAs03y3dZcGhC/FepKtEUY= -go.opentelemetry.io/contrib/propagators/b3 v1.24.0/go.mod h1:k5wRxKRU2uXx2F8uNJ4TaonuEO/V7/5xoz7kdsDACT8= -go.opentelemetry.io/contrib/zpages v0.49.0 h1:Wk217PkNBxcKWnIQpwtbZZE286K4ZY9uajnM5woSeLU= -go.opentelemetry.io/contrib/zpages v0.49.0/go.mod h1:6alLi5mmkZWbAtZMRPd1ffIgkTcsU9OTHQF2NbSOhrQ= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/bridge/opencensus v1.24.0 h1:Vlhy5ee5k5R0zASpH+9AgHiJH7xnKACI3XopO1tUZfY= -go.opentelemetry.io/otel/bridge/opencensus v1.24.0/go.mod h1:jRjVXV/X38jyrnHtvMGN8+9cejZB21JvXAAvooF2s+Q= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.24.0 h1:f2jriWfOdldanBwS9jNBdeOKAQN7b4ugAMaNu1/1k9g= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.24.0/go.mod h1:B+bcQI1yTY+N0vqMpoZbEN7+XU4tNM0DmUiOwebFJWI= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.24.0 h1:mM8nKi6/iFQ0iqst80wDHU2ge198Ye/TfN0WBS5U24Y= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.24.0/go.mod h1:0PrIIzDteLSmNyxqcGYRL4mDIo8OTuBAOI/Bn1URxac= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 h1:Mw5xcxMwlqoJd97vwPxA8isEaIoxsta9/Q51+TTJLGE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0/go.mod h1:CQNu9bj7o7mC6U7+CA/schKEYakYXWr79ucDHTMGhCM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.24.0 h1:JYE2HM7pZbOt5Jhk8ndWZTUWYOVift2cHjXVMkPdmdc= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.24.0/go.mod h1:yMb/8c6hVsnma0RpsBMNo0fEiQKeclawtgaIaOp2MLY= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 h1:s0PHtIkN+3xrbDOpt2M8OTG92cWqUESvzh2MxiR5xY8= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0/go.mod h1:hZlFbDbRt++MMPCCfSJfmhkGIWnX1h3XjkfxZUjLrIA= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= -go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= -go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= -go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= +go.opentelemetry.io/contrib/config v0.6.0 h1:M1SRD1Z15XHPGk61tMLI1up77XT5FdrqQSRrlH0fYuk= +go.opentelemetry.io/contrib/config v0.6.0/go.mod h1:t+/kzmRWLN7J+4F/dD4fFvlYCmCO63WYwy/B00IC++c= +go.opentelemetry.io/contrib/propagators/b3 v1.26.0 h1:wgFbVA+bK2k+fGVfDOCOG4cfDAoppyr5sI2dVlh8MWM= +go.opentelemetry.io/contrib/propagators/b3 v1.26.0/go.mod h1:DDktFXxA+fyItAAM0Sbl5OBH7KOsCTjvbBdPKtoIf/k= +go.opentelemetry.io/contrib/zpages v0.51.0 h1:psVr4JTWd0qtISPj9EA6AODGJ09bvsOxWiuKqiGdSCA= +go.opentelemetry.io/contrib/zpages v0.51.0/go.mod h1:PKtp+NEp1gTTLmFHpynYgYCSkKtisPntOb9S1mQjFKg= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/bridge/opencensus v1.26.0 h1:DZzxj9QjznMVoehskOJnFP2gsTCWtDTFBDvFhPAY7nc= +go.opentelemetry.io/otel/bridge/opencensus v1.26.0/go.mod h1:rJiX0KrF5m8Tm1XE8jLczpAv5zUaDcvhKecFG0ZoFG4= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 h1:+hm+I+KigBy3M24/h1p/NHkUx/evbLH0PNcjpMyCHc4= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0/go.mod h1:NjC8142mLvvNT6biDpaMjyz78kyEHIwAJlSX0N9P5KI= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 h1:HGZWGmCVRCVyAs2GQaiHQPbDHo+ObFWeUEOd+zDnp64= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0/go.mod h1:SaH+v38LSCHddyk7RGlU9uZyQoRrKao6IBnJw6Kbn+c= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 h1:1u/AyyOqAWzy+SkPxDpahCNZParHV8Vid1RnI2clyDE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0/go.mod h1:z46paqbJ9l7c9fIPCXTqTGwhQZ5XoTIsfeFYWboizjs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 h1:Waw9Wfpo/IXzOI8bCB7DIk+0JZcqqsyn1JFnAc+iam8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0/go.mod h1:wnJIG4fOqyynOnnQF/eQb4/16VlX2EJAHhHgqIqWfAo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 h1:1wp/gyxsuYtuE/JFxsQRtcCDtMrO2qMvlfXALU5wkzI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0/go.mod h1:gbTHmghkGgqxMomVQQMur1Nba4M0MQ8AYThXDUjsJ38= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 h1:5fnmgteaar1VcAA69huatudPduNFz7guRtCmfZCooZI= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0/go.mod h1:lsPccfZiz1cb1AhBPmicWM2E4F1VynFXEvD8SEBS4TM= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 h1:0W5o9SzoR15ocYHEQfvfipzcNog1lBxOLfnex91Hk6s= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0/go.mod h1:zVZ8nz+VSggWmnh6tTsJqXQ7rU4xLwRtna1M4x5jq58= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= +go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -182,8 +180,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -198,8 +196,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -214,9 +212,9 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -233,26 +231,26 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= -gonum.org/v1/gonum v0.14.0/go.mod h1:AoWeoz0becf9QMWtE8iWXNXc27fK4fNeHNf/oMejGfU= +gonum.org/v1/gonum v0.15.0 h1:2lYxjRbTYyxkJxlhC+LvJIx3SsANPdRybu1tGj9/OrQ= +gonum.org/v1/gonum v0.15.0/go.mod h1:xzZVBJBtS+Mz4q0Yl2LJTk+OxOg4jiXZ7qBoM0uISGo= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -262,10 +260,8 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/otelcol/internal/configunmarshaler/configs.go b/otelcol/internal/configunmarshaler/configs.go index ab226d3b670..05cc8b11296 100644 --- a/otelcol/internal/configunmarshaler/configs.go +++ b/otelcol/internal/configunmarshaler/configs.go @@ -5,7 +5,8 @@ package configunmarshaler // import "go.opentelemetry.io/collector/otelcol/inter import ( "fmt" - "reflect" + + "golang.org/x/exp/maps" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/confmap" @@ -34,7 +35,7 @@ func (c *Configs[F]) Unmarshal(conf *confmap.Conf) error { // Find factory based on component kind and type that we read from config source. factory, ok := c.factories[id.Type()] if !ok { - return errorUnknownType(id, reflect.ValueOf(c.factories).MapKeys()) + return errorUnknownType(id, maps.Keys(c.factories)) } // Create the default config for this component. @@ -56,7 +57,7 @@ func (c *Configs[F]) Configs() map[component.ID]component.Config { return c.cfgs } -func errorUnknownType(id component.ID, factories []reflect.Value) error { +func errorUnknownType(id component.ID, factories []component.Type) error { return fmt.Errorf("unknown type: %q for id: %q (valid values: %v)", id.Type(), id, factories) } diff --git a/otelcol/internal/configunmarshaler/configs_test.go b/otelcol/internal/configunmarshaler/configs_test.go index f6cd2865281..56c48e773f5 100644 --- a/otelcol/internal/configunmarshaler/configs_test.go +++ b/otelcol/internal/configunmarshaler/configs_test.go @@ -104,7 +104,7 @@ func TestUnmarshalError(t *testing.T) { conf: confmap.NewFromStringMap(map[string]any{ "nosuch" + tk.kind: nil, }), - expectedError: "unknown type: \"nosuch" + tk.kind + "\"", + expectedError: "unknown type: \"nosuch" + tk.kind + "\" for id: \"nosuch" + tk.kind + "\" (valid values: [nop])", }, { name: "duplicate", diff --git a/otelcol/otelcoltest/config.go b/otelcol/otelcoltest/config.go index fc2957d893a..6191eb9dbec 100644 --- a/otelcol/otelcoltest/config.go +++ b/otelcol/otelcoltest/config.go @@ -21,13 +21,13 @@ func LoadConfig(fileName string, factories otelcol.Factories) (*otelcol.Config, provider, err := otelcol.NewConfigProvider(otelcol.ConfigProviderSettings{ ResolverSettings: confmap.ResolverSettings{ URIs: []string{fileName}, - Providers: makeMapProvidersMap( - fileprovider.NewWithSettings(confmap.ProviderSettings{}), - envprovider.NewWithSettings(confmap.ProviderSettings{}), - yamlprovider.NewWithSettings(confmap.ProviderSettings{}), - httpprovider.NewWithSettings(confmap.ProviderSettings{}), - ), - Converters: []confmap.Converter{expandconverter.New(confmap.ConverterSettings{})}, + ProviderFactories: []confmap.ProviderFactory{ + fileprovider.NewFactory(), + envprovider.NewFactory(), + yamlprovider.NewFactory(), + httpprovider.NewFactory(), + }, + ConverterFactories: []confmap.ConverterFactory{expandconverter.NewFactory()}, }, }) if err != nil { @@ -44,11 +44,3 @@ func LoadConfigAndValidate(fileName string, factories otelcol.Factories) (*otelc } return cfg, cfg.Validate() } - -func makeMapProvidersMap(providers ...confmap.Provider) map[string]confmap.Provider { - ret := make(map[string]confmap.Provider, len(providers)) - for _, provider := range providers { - ret[provider.Scheme()] = provider - } - return ret -} diff --git a/otelcol/testdata/components-output.yaml b/otelcol/testdata/components-output.yaml new file mode 100644 index 00000000000..929ae01945b --- /dev/null +++ b/otelcol/testdata/components-output.yaml @@ -0,0 +1,43 @@ +buildinfo: + command: otelcol + description: OpenTelemetry Collector + version: latest +receivers: + - name: nop + stability: + logs: Stable + metrics: Stable + traces: Stable + - name: nop_logs + stability: + logs: Stable + metrics: Undefined + traces: Undefined +processors: + - name: nop + stability: + logs: Stable + metrics: Stable + traces: Stable +exporters: + - name: nop + stability: + logs: Stable + metrics: Stable + traces: Stable +connectors: + - name: nop + stability: + logs-to-logs: Development + logs-to-metrics: Development + logs-to-traces: Development + metrics-to-logs: Development + metrics-to-metrics: Development + metrics-to-traces: Development + traces-to-logs: Development + traces-to-metrics: Development + traces-to-traces: Development +extensions: + - name: nop + stability: + extension: Stable diff --git a/otelcol/testdata/otel-log-to-file.yaml b/otelcol/testdata/otel-log-to-file.yaml new file mode 100644 index 00000000000..e618aca22fc --- /dev/null +++ b/otelcol/testdata/otel-log-to-file.yaml @@ -0,0 +1,30 @@ +extensions: + zpages: + +receivers: + otlp: + protocols: + grpc: + http: + +exporters: + debug: + verbosity: detailed + +service: + telemetry: + logs: + level: warn + output_paths: + # The folder need to be created prior to starting the collector + - ${ProgramData}\OpenTelemetry\Collector\Logs\otelcol.log + + pipelines: + traces: + receivers: [otlp] + exporters: [debug] + metrics: + receivers: [otlp] + exporters: [debug] + + extensions: [zpages] diff --git a/otelcol/testdata/otelcol-invalid-receiver-type.yaml b/otelcol/testdata/otelcol-invalid-receiver-type.yaml new file mode 100644 index 00000000000..5837810fcca --- /dev/null +++ b/otelcol/testdata/otelcol-invalid-receiver-type.yaml @@ -0,0 +1,18 @@ +receivers: + nop_logs: + +processors: + nop: + +exporters: + nop: + +service: + telemetry: + metrics: + address: localhost:8888 + pipelines: + traces: + receivers: [nop_logs] + processors: [nop] + exporters: [nop] diff --git a/otelcol/unmarshaler.go b/otelcol/unmarshaler.go index 643e396db42..a522d9fa60d 100644 --- a/otelcol/unmarshaler.go +++ b/otelcol/unmarshaler.go @@ -59,7 +59,7 @@ func unmarshal(v *confmap.Conf, factories Factories) (*configSettings, error) { InitialFields: map[string]any(nil), }, Metrics: telemetry.MetricsConfig{ - Level: configtelemetry.LevelBasic, + Level: configtelemetry.LevelNormal, Address: ":8888", }, }, diff --git a/pdata/go.mod b/pdata/go.mod index 5adab7efc2d..81fa331f77c 100644 --- a/pdata/go.mod +++ b/pdata/go.mod @@ -5,25 +5,24 @@ go 1.21 require ( github.com/gogo/protobuf v1.3.2 github.com/json-iterator/go v1.1.12 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 - google.golang.org/grpc v1.62.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/grpc v1.63.2 + google.golang.org/protobuf v1.34.0 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect - golang.org/x/net v0.20.0 // indirect - golang.org/x/sys v0.16.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/pdata/go.sum b/pdata/go.sum index 989737ec2ef..93e99b1aad8 100644 --- a/pdata/go.sum +++ b/pdata/go.sum @@ -4,10 +4,6 @@ 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/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -35,8 +31,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -52,16 +48,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -74,14 +70,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/pdata/internal/cmd/pdatagen/internal/pmetric_package.go b/pdata/internal/cmd/pdatagen/internal/pmetric_package.go index 95487c00f8f..68aee5219f9 100644 --- a/pdata/internal/cmd/pdatagen/internal/pmetric_package.go +++ b/pdata/internal/cmd/pdatagen/internal/pmetric_package.go @@ -115,6 +115,10 @@ var metric = &messageValueStruct{ defaultVal: `""`, testVal: `"1"`, }, + &sliceField{ + fieldName: "Metadata", + returnSlice: mapStruct, + }, &oneOfField{ typeName: "MetricType", originFieldName: "Data", diff --git a/pdata/internal/data/protogen/metrics/v1/metrics.pb.go b/pdata/internal/data/protogen/metrics/v1/metrics.pb.go index 4ef4f4d5f63..3649bd83f81 100644 --- a/pdata/internal/data/protogen/metrics/v1/metrics.pb.go +++ b/pdata/internal/data/protogen/metrics/v1/metrics.pb.go @@ -467,6 +467,14 @@ type Metric struct { // *Metric_ExponentialHistogram // *Metric_Summary Data isMetric_Data `protobuf_oneof:"data"` + // Additional metadata attributes that describe the metric. [Optional]. + // Attributes are non-identifying. + // Consumers SHOULD NOT need to be aware of these attributes. + // These attributes MAY be used to encode information allowing + // for lossless roundtrip translation to / from another data model. + // Attribute keys MUST be unique (it is not allowed to have more than one + // attribute with the same key). + Metadata []v11.KeyValue `protobuf:"bytes,12,rep,name=metadata,proto3" json:"metadata"` } func (m *Metric) Reset() { *m = Metric{} } @@ -593,6 +601,13 @@ func (m *Metric) GetSummary() *Summary { return nil } +func (m *Metric) GetMetadata() []v11.KeyValue { + if m != nil { + return m.Metadata + } + return nil +} + // XXX_OneofWrappers is for the internal use of the proto package. func (*Metric) XXX_OneofWrappers() []interface{} { return []interface{}{ @@ -1963,105 +1978,105 @@ func init() { } var fileDescriptor_3c3112f9fa006917 = []byte{ - // 1553 bytes of a gzipped FileDescriptorProto + // 1568 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xcd, 0x4f, 0x1b, 0x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7, 0x9b, + 0x5a, 0xb5, 0xa1, 0xed, 0x34, 0x5a, 0xda, 0x5e, 0xb3, 0x96, 0x0d, 0xa1, 0x3f, 0xc3, 0xe2, 0x05, + 0x85, 0x9d, 0x86, 0x86, 0x6b, 0xab, 0x0d, 0x5c, 0xad, 0x55, 0xb5, 0xfd, 0xf2, 0xd6, 0x5e, 0x4d, + 0xdb, 0x2e, 0x37, 0x1f, 0x65, 0x95, 0xca, 0xff, 0x95, 0xd7, 0x67, 0x39, 0xe5, 0xcd, 0x59, 0x4e, + 0xf9, 0xe9, 0x2c, 0xa7, 0xbc, 0x7c, 0x97, 0x0b, 0xbd, 0x79, 0x97, 0x0b, 0x7d, 0xff, 0x2e, 0x17, + 0x82, 0x9b, 0x3a, 0x9b, 0x50, 0x51, 0x95, 0x8c, 0xff, 0x35, 0x64, 0x57, 0x2c, 0xec, 0x2a, 0x4f, + 0x6b, 0x1f, 0x9c, 0x0f, 0xef, 0x03, 0x59, 0x97, 0x5a, 0x03, 0xdf, 0xec, 0xfe, 0x17, 0xce, 0x35, + 0x7a, 0xd4, 0x6a, 0x9d, 0x83, 0x48, 0x78, 0xff, 0x73, 0x87, 0x53, 0xdc, 0x5f, 0x3e, 0x88, 0x4b, + 0xab, 0xfb, 0xbf, 0x05, 0x00, 0x00, 0xff, 0xff, 0x00, 0xa3, 0x78, 0x2c, 0xfd, 0x13, 0x00, 0x00, } func (m *MetricsData) Marshal() (dAtA []byte, err error) { @@ -2245,6 +2260,20 @@ func (m *Metric) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Metadata) > 0 { + for iNdEx := len(m.Metadata) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Metadata[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMetrics(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + } + } if m.Data != nil { { size := m.Data.Size() @@ -3386,6 +3415,12 @@ func (m *Metric) Size() (n int) { if m.Data != nil { n += m.Data.Size() } + if len(m.Metadata) > 0 { + for _, e := range m.Metadata { + l = e.Size() + n += 1 + l + sovMetrics(uint64(l)) + } + } return n } @@ -4580,6 +4615,40 @@ func (m *Metric) Unmarshal(dAtA []byte) error { } m.Data = &Metric_Summary{v} iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMetrics + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Metadata = append(m.Metadata, v11.KeyValue{}) + if err := m.Metadata[len(m.Metadata)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipMetrics(dAtA[iNdEx:]) diff --git a/pdata/internal/data/protogen/trace/v1/trace.pb.go b/pdata/internal/data/protogen/trace/v1/trace.pb.go index 71f32df0f70..c1fcf0764e0 100644 --- a/pdata/internal/data/protogen/trace/v1/trace.pb.go +++ b/pdata/internal/data/protogen/trace/v1/trace.pb.go @@ -51,16 +51,25 @@ const ( SpanFlags_SPAN_FLAGS_DO_NOT_USE SpanFlags = 0 // Bits 0-7 are used for trace flags. SpanFlags_SPAN_FLAGS_TRACE_FLAGS_MASK SpanFlags = 255 + // Bits 8 and 9 are used to indicate that the parent span or link span is remote. + // Bit 8 (`HAS_IS_REMOTE`) indicates whether the value is known. + // Bit 9 (`IS_REMOTE`) indicates whether the span or link is remote. + SpanFlags_SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK SpanFlags = 256 + SpanFlags_SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK SpanFlags = 512 ) var SpanFlags_name = map[int32]string{ 0: "SPAN_FLAGS_DO_NOT_USE", 255: "SPAN_FLAGS_TRACE_FLAGS_MASK", + 256: "SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK", + 512: "SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK", } var SpanFlags_value = map[string]int32{ - "SPAN_FLAGS_DO_NOT_USE": 0, - "SPAN_FLAGS_TRACE_FLAGS_MASK": 255, + "SPAN_FLAGS_DO_NOT_USE": 0, + "SPAN_FLAGS_TRACE_FLAGS_MASK": 255, + "SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK": 256, + "SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK": 512, } func (x SpanFlags) String() string { @@ -388,20 +397,27 @@ type Span struct { // The `span_id` of this span's parent span. If this is a root span, then this // field must be empty. The ID is an 8-byte array. ParentSpanId go_opentelemetry_io_collector_pdata_internal_data.SpanID `protobuf:"bytes,4,opt,name=parent_span_id,json=parentSpanId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.SpanID" json:"parent_span_id"` - // Flags, a bit field. 8 least significant bits are the trace - // flags as defined in W3C Trace Context specification. Readers - // MUST not assume that 24 most significant bits will be zero. - // To read the 8-bit W3C trace flag, use `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`. + // Flags, a bit field. + // + // Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace + // Context specification. To read the 8-bit W3C trace flag, use + // `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`. + // + // See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions. + // + // Bits 8 and 9 represent the 3 states of whether a span's parent + // is remote. The states are (unknown, is not remote, is remote). + // To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`. + // To read whether the span is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`. // // When creating span messages, if the message is logically forwarded from another source // with an equivalent flags fields (i.e., usually another OTLP span message), the field SHOULD // be copied as-is. If creating from a source that does not have an equivalent flags field - // (such as a runtime representation of an OpenTelemetry span), the high 24 bits MUST + // (such as a runtime representation of an OpenTelemetry span), the high 22 bits MUST // be set to zero. + // Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero. // // [Optional]. - // - // See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions. Flags uint32 `protobuf:"fixed32,16,opt,name=flags,proto3" json:"flags,omitempty"` // A description of the span's operation. // @@ -687,14 +703,23 @@ type Span_Link struct { // dropped_attributes_count is the number of dropped attributes. If the value is 0, // then no attributes were dropped. DroppedAttributesCount uint32 `protobuf:"varint,5,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"` - // Flags, a bit field. 8 least significant bits are the trace - // flags as defined in W3C Trace Context specification. Readers - // MUST not assume that 24 most significant bits will be zero. - // When creating new spans, the most-significant 24-bits MUST be - // zero. To read the 8-bit W3C trace flag (use flags & - // SPAN_FLAGS_TRACE_FLAGS_MASK). [Optional]. + // Flags, a bit field. + // + // Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace + // Context specification. To read the 8-bit W3C trace flag, use + // `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`. // // See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions. + // + // Bits 8 and 9 represent the 3 states of whether the link is remote. + // The states are (unknown, is not remote, is remote). + // To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`. + // To read whether the link is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`. + // + // Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero. + // When creating new spans, bits 10-31 (most-significant 22-bits) MUST be zero. + // + // [Optional]. Flags uint32 `protobuf:"fixed32,6,opt,name=flags,proto3" json:"flags,omitempty"` } @@ -833,75 +858,77 @@ func init() { } var fileDescriptor_5c407ac9c675a601 = []byte{ - // 1073 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0x38, 0xfe, 0x93, 0xbc, 0x24, 0xee, 0x76, 0x70, 0xa3, 0x25, 0x14, 0xc7, 0xb2, 0x2a, - 0x61, 0x5a, 0xc9, 0x26, 0xe9, 0x25, 0x1c, 0x10, 0x75, 0xec, 0x0d, 0x18, 0x27, 0x76, 0x34, 0x6b, - 0x47, 0x02, 0x21, 0x2d, 0x5b, 0xef, 0xd4, 0xac, 0x62, 0xcf, 0xae, 0x76, 0xc7, 0x51, 0xfb, 0x2d, - 0xb8, 0xf2, 0x09, 0x90, 0x80, 0x33, 0x37, 0xee, 0x15, 0xa7, 0x1e, 0x11, 0x87, 0x0a, 0x25, 0x17, - 0xbe, 0x45, 0xd1, 0xcc, 0xec, 0xda, 0xeb, 0x28, 0x72, 0x1a, 0x89, 0x5e, 0xb8, 0x24, 0x33, 0xef, - 0xcf, 0xef, 0xf7, 0x7b, 0x6f, 0xde, 0x8c, 0x17, 0xaa, 0x9e, 0x4f, 0x19, 0xa7, 0x63, 0x3a, 0xa1, - 0x3c, 0x78, 0x51, 0xf7, 0x03, 0x8f, 0x7b, 0x75, 0x1e, 0xd8, 0x43, 0x5a, 0x3f, 0xdf, 0x55, 0x8b, - 0x9a, 0x34, 0xe2, 0xfb, 0x0b, 0x91, 0xca, 0x58, 0x53, 0x01, 0xe7, 0xbb, 0xdb, 0xc5, 0x91, 0x37, - 0xf2, 0x54, 0xb6, 0x58, 0x29, 0xf7, 0xf6, 0xc3, 0xeb, 0xd0, 0x87, 0xde, 0x64, 0xe2, 0x31, 0x01, - 0xaf, 0x56, 0x51, 0x6c, 0xed, 0xba, 0xd8, 0x80, 0x86, 0xde, 0x34, 0x50, 0x62, 0xe2, 0xb5, 0x8a, - 0xaf, 0x7c, 0x07,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xbb, 0x66, 0xbf, 0xd1, - 0x1f, 0x98, 0x56, 0xb3, 0xd7, 0x32, 0x44, 0x23, 0x8c, 0xbe, 0x96, 0xc2, 0x18, 0x0a, 0x49, 0x73, - 0xaf, 0xa3, 0xa1, 0xab, 0xa1, 0x06, 0x21, 0x3d, 0xa2, 0xa5, 0xbf, 0xca, 0xac, 0x22, 0x2d, 0xfd, - 0xf0, 0x4b, 0x58, 0x13, 0xad, 0x3d, 0x94, 0x3f, 0x0d, 0x71, 0x6f, 0x0f, 0x8f, 0x1a, 0x5f, 0x98, - 0x56, 0xab, 0x67, 0x75, 0x7b, 0x7d, 0x6b, 0x60, 0x1a, 0x5a, 0x0a, 0x97, 0xe1, 0x83, 0x84, 0xab, - 0x4f, 0x1a, 0x4d, 0x23, 0x5a, 0x1f, 0x37, 0xcc, 0x8e, 0xf6, 0x06, 0x1d, 0xfc, 0x82, 0x5e, 0x5e, - 0x94, 0xd0, 0xab, 0x8b, 0x12, 0xfa, 0xfb, 0xa2, 0x84, 0x7e, 0xb8, 0x2c, 0xa5, 0x5e, 0x5d, 0x96, - 0x52, 0x7f, 0x5e, 0x96, 0x52, 0xb0, 0xe3, 0x7a, 0x4b, 0x6b, 0x3e, 0x50, 0xdf, 0x8d, 0x27, 0xc2, - 0x78, 0x82, 0xbe, 0x69, 0xde, 0x7a, 0xe2, 0xd5, 0xb7, 0xe9, 0x88, 0xb2, 0xd9, 0x87, 0xf2, 0xcf, - 0xe9, 0xfb, 0x3d, 0x9f, 0xb2, 0xfe, 0x0c, 0x42, 0x82, 0xab, 0x6b, 0x57, 0x3b, 0xdd, 0x7d, 0x9a, - 0x93, 0x19, 0x8f, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xc0, 0xd4, 0x18, 0xf8, 0x6e, 0x0b, 0x00, - 0x00, + // 1112 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0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0x69, 0x80, 0xee, 0x02, 0x22, 0xd4, 0x3b, 0x1f, 0xbe, 0x2a, 0xc2, 0xaf, 0x11, 0xea, 0x2d, + 0x04, 0x1f, 0x00, 0xb8, 0x8c, 0x85, 0xfe, 0xa3, 0x29, 0x23, 0x91, 0xbe, 0x26, 0x26, 0xee, 0xfd, + 0x4b, 0x46, 0xb8, 0x43, 0x9e, 0x1e, 0xb9, 0xa3, 0x69, 0x32, 0xb6, 0x29, 0x00, 0xf4, 0x00, 0x74, + 0x2f, 0x0c, 0x26, 0x13, 0xe2, 0x39, 0x73, 0xab, 0x33, 0x08, 0xa6, 0x94, 0xe9, 0x50, 0x51, 0x6a, + 0x9b, 0xf8, 0x66, 0xec, 0x6f, 0xce, 0xdc, 0x2d, 0xee, 0x45, 0x0f, 0x21, 0x4f, 0x4e, 0x08, 0x65, + 0x91, 0xbe, 0xfe, 0x4a, 0x57, 0x97, 0x77, 0xca, 0xe0, 0x09, 0x38, 0xce, 0x43, 0x1f, 0x42, 0x29, + 0xe1, 0x96, 0x96, 0x98, 0x77, 0x43, 0xf0, 0xa2, 0xd8, 0x27, 0x72, 0x62, 0xce, 0x8f, 0x21, 0x37, + 0xf2, 0xe9, 0x71, 0xa4, 0x6f, 0x2e, 0xa9, 0x7b, 0x91, 0x72, 0xdf, 0xa7, 0xc7, 0x58, 0x66, 0xa1, + 0x3a, 0xbc, 0x91, 0x10, 0x0a, 0x43, 0xcc, 0x57, 0x14, 0x7c, 0xd7, 0x63, 0x17, 0x4f, 0x88, 0xe9, + 0x76, 0x21, 0xcf, 0xe7, 0x76, 0x1a, 0xe9, 0xd7, 0xc4, 0x53, 0x71, 0xfb, 0x12, 0x3e, 0x11, 0x1b, + 0x37, 0x39, 0xce, 0xdc, 0xfa, 0x43, 0x81, 0x9c, 0x28, 0x01, 0xdd, 0x86, 0xe2, 0xb9, 0x23, 0x56, + 0xc4, 0x11, 0x6f, 0xb0, 0xf4, 0xf9, 0x26, 0x23, 0x99, 0x4d, 0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 0xc3, 0xc3, 0x0b, 0x00, 0x00, } func (m *TracesData) Marshal() (dAtA []byte, err error) { diff --git a/pdata/pmetric/generated_metric.go b/pdata/pmetric/generated_metric.go index 839628520df..ecf2dba29ef 100644 --- a/pdata/pmetric/generated_metric.go +++ b/pdata/pmetric/generated_metric.go @@ -9,6 +9,7 @@ package pmetric import ( "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" + "go.opentelemetry.io/collector/pdata/pcommon" ) // Metric represents one metric as a collection of datapoints. @@ -79,6 +80,11 @@ func (ms Metric) SetUnit(v string) { ms.orig.Unit = v } +// Metadata returns the Metadata associated with this Metric. +func (ms Metric) Metadata() pcommon.Map { + return pcommon.Map(internal.NewMap(&ms.orig.Metadata, ms.state)) +} + // Type returns the type of the data for this Metric. // Calling this function on zero-initialized Metric will cause a panic. func (ms Metric) Type() MetricType { @@ -233,6 +239,7 @@ func (ms Metric) CopyTo(dest Metric) { dest.SetName(ms.Name()) dest.SetDescription(ms.Description()) dest.SetUnit(ms.Unit()) + ms.Metadata().CopyTo(dest.Metadata()) switch ms.Type() { case MetricTypeGauge: ms.Gauge().CopyTo(dest.SetEmptyGauge()) diff --git a/pdata/pmetric/generated_metric_test.go b/pdata/pmetric/generated_metric_test.go index 920891b6096..e761f14a321 100644 --- a/pdata/pmetric/generated_metric_test.go +++ b/pdata/pmetric/generated_metric_test.go @@ -13,6 +13,7 @@ import ( "go.opentelemetry.io/collector/pdata/internal" otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" + "go.opentelemetry.io/collector/pdata/pcommon" ) func TestMetric_MoveTo(t *testing.T) { @@ -65,6 +66,13 @@ func TestMetric_Unit(t *testing.T) { assert.Panics(t, func() { newMetric(&otlpmetrics.Metric{}, &sharedState).SetUnit("1") }) } +func TestMetric_Metadata(t *testing.T) { + ms := NewMetric() + assert.Equal(t, pcommon.NewMap(), ms.Metadata()) + internal.FillTestMap(internal.Map(ms.Metadata())) + assert.Equal(t, pcommon.Map(internal.GenerateTestMap()), ms.Metadata()) +} + func TestMetric_Type(t *testing.T) { tv := NewMetric() assert.Equal(t, MetricTypeEmpty, tv.Type()) @@ -175,6 +183,7 @@ func fillTestMetric(tv Metric) { tv.orig.Name = "test_name" tv.orig.Description = "test_description" tv.orig.Unit = "1" + internal.FillTestMap(internal.NewMap(&tv.orig.Metadata, tv.state)) tv.orig.Data = &otlpmetrics.Metric_Sum{Sum: &otlpmetrics.Sum{}} fillTestSum(newSum(tv.orig.GetSum(), tv.state)) } diff --git a/pdata/pmetric/json.go b/pdata/pmetric/json.go index c8b76b0e6ec..394b8af7c65 100644 --- a/pdata/pmetric/json.go +++ b/pdata/pmetric/json.go @@ -106,6 +106,11 @@ func (ms Metric) unmarshalJsoniter(iter *jsoniter.Iterator) { ms.orig.Description = iter.ReadString() case "unit": ms.orig.Unit = iter.ReadString() + case "metadata": + iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { + ms.orig.Metadata = append(ms.orig.Metadata, json.ReadAttribute(iter)) + return true + }) case "sum": ms.SetEmptySum().unmarshalJsoniter(iter) case "gauge": diff --git a/pdata/pmetric/json_test.go b/pdata/pmetric/json_test.go index cebc40e8e41..552eee39edf 100644 --- a/pdata/pmetric/json_test.go +++ b/pdata/pmetric/json_test.go @@ -21,11 +21,13 @@ var metricsOTLP = func() Metrics { il := rm.ScopeMetrics().AppendEmpty() il.Scope().SetName("name") il.Scope().SetVersion("version") - il.Metrics().AppendEmpty().SetName("testMetric") + m := il.Metrics().AppendEmpty() + m.SetName("testMetric") + m.Metadata().PutStr("metadatakey", "metadatavalue") return md }() -var metricsJSON = `{"resourceMetrics":[{"resource":{"attributes":[{"key":"host.name","value":{"stringValue":"testHost"}}]},"scopeMetrics":[{"scope":{"name":"name","version":"version"},"metrics":[{"name":"testMetric"}]}]}]}` +var metricsJSON = `{"resourceMetrics":[{"resource":{"attributes":[{"key":"host.name","value":{"stringValue":"testHost"}}]},"scopeMetrics":[{"scope":{"name":"name","version":"version"},"metrics":[{"name":"testMetric","metadata":[{"key":"metadatakey","value":{"stringValue":"metadatavalue"}}]}]}]}]}` func TestMetricsJSON(t *testing.T) { encoder := &JSONMarshaler{} diff --git a/pdata/testdata/Makefile b/pdata/testdata/Makefile new file mode 100644 index 00000000000..ded7a36092d --- /dev/null +++ b/pdata/testdata/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common diff --git a/internal/testdata/common.go b/pdata/testdata/common.go similarity index 100% rename from internal/testdata/common.go rename to pdata/testdata/common.go diff --git a/pdata/testdata/go.mod b/pdata/testdata/go.mod new file mode 100644 index 00000000000..a92f19a2e54 --- /dev/null +++ b/pdata/testdata/go.mod @@ -0,0 +1,21 @@ +module go.opentelemetry.io/collector/pdata/testdata + +go 1.21 + +require go.opentelemetry.io/collector/pdata v1.7.0 + +require ( + github.com/gogo/protobuf v1.3.2 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.34.0 // indirect +) + +replace go.opentelemetry.io/collector/pdata => ../ diff --git a/pdata/testdata/go.sum b/pdata/testdata/go.sum new file mode 100644 index 00000000000..54657892220 --- /dev/null +++ b/pdata/testdata/go.sum @@ -0,0 +1,68 @@ +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= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +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/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +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= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +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/internal/testdata/log.go b/pdata/testdata/log.go similarity index 100% rename from internal/testdata/log.go rename to pdata/testdata/log.go diff --git a/internal/testdata/metric.go b/pdata/testdata/metric.go similarity index 100% rename from internal/testdata/metric.go rename to pdata/testdata/metric.go diff --git a/internal/testdata/resource.go b/pdata/testdata/resource.go similarity index 100% rename from internal/testdata/resource.go rename to pdata/testdata/resource.go diff --git a/internal/testdata/trace.go b/pdata/testdata/trace.go similarity index 100% rename from internal/testdata/trace.go rename to pdata/testdata/trace.go diff --git a/processor/batchprocessor/batch_processor.go b/processor/batchprocessor/batch_processor.go index 4853eef524a..60c6fa10ef6 100644 --- a/processor/batchprocessor/batch_processor.go +++ b/processor/batchprocessor/batch_processor.go @@ -129,7 +129,9 @@ func newBatchProcessor(set processor.CreateSettings, cfg *Config, batchFunc func metadataLimit: int(cfg.MetadataCardinalityLimit), } if len(bp.metadataKeys) == 0 { - bp.batcher = &singleShardBatcher{batcher: bp.newShard(nil)} + s := bp.newShard(nil) + s.start() + bp.batcher = &singleShardBatcher{batcher: s} } else { bp.batcher = &multiShardBatcher{ batchProcessor: bp, @@ -156,8 +158,6 @@ func (bp *batchProcessor) newShard(md map[string][]string) *shard { exportCtx: exportCtx, batch: bp.batchFunc(), } - b.processor.goroutines.Add(1) - go b.start() return b } @@ -180,6 +180,11 @@ func (bp *batchProcessor) Shutdown(context.Context) error { } func (b *shard) start() { + b.processor.goroutines.Add(1) + go b.startLoop() +} + +func (b *shard) startLoop() { defer b.processor.goroutines.Done() // timerCh ensures we only block when there is a @@ -320,6 +325,8 @@ func (mb *multiShardBatcher) consume(ctx context.Context, data any) error { var loaded bool b, loaded = mb.batchers.LoadOrStore(aset, mb.newShard(md)) if !loaded { + // Start the goroutine only if we added the object to the map, otherwise is already started. + b.(*shard).start() mb.size++ } mb.lock.Unlock() diff --git a/processor/batchprocessor/batch_processor_test.go b/processor/batchprocessor/batch_processor_test.go index a3a618c0f3e..6e8033fb387 100644 --- a/processor/batchprocessor/batch_processor_test.go +++ b/processor/batchprocessor/batch_processor_test.go @@ -20,10 +20,10 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/testdata" "go.opentelemetry.io/collector/processor/processortest" ) diff --git a/processor/batchprocessor/generated_component_test.go b/processor/batchprocessor/generated_component_test.go new file mode 100644 index 00000000000..656dad9986b --- /dev/null +++ b/processor/batchprocessor/generated_component_test.go @@ -0,0 +1,150 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package batchprocessor + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/processor" + "go.opentelemetry.io/collector/processor/processortest" +) + +func TestComponentFactoryType(t *testing.T) { + require.Equal(t, "batch", NewFactory().Type().String()) +} + +func TestComponentConfigStruct(t *testing.T) { + require.NoError(t, componenttest.CheckConfigStruct(NewFactory().CreateDefaultConfig())) +} + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "logs", + createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateLogsProcessor(ctx, set, cfg, consumertest.NewNop()) + }, + }, + + { + name: "metrics", + createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsProcessor(ctx, set, cfg, consumertest.NewNop()) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesProcessor(ctx, set, cfg, consumertest.NewNop()) + }, + }, + } + + cm, err := confmaptest.LoadConf("metadata.yaml") + require.NoError(t, err) + cfg := factory.CreateDefaultConfig() + sub, err := cm.Sub("tests::config") + require.NoError(t, err) + require.NoError(t, component.UnmarshalConfig(sub, cfg)) + + for _, test := range tests { + t.Run(test.name+"-shutdown", func(t *testing.T) { + c, err := test.createFn(context.Background(), processortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + c, err := test.createFn(context.Background(), processortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + err = c.Start(context.Background(), host) + require.NoError(t, err) + require.NotPanics(t, func() { + switch test.name { + case "logs": + e, ok := c.(processor.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(processor.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(processor.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/processor/batchprocessor/package_test.go b/processor/batchprocessor/generated_package_test.go similarity index 62% rename from processor/batchprocessor/package_test.go rename to processor/batchprocessor/generated_package_test.go index 58d64e47b57..d8cd79854bc 100644 --- a/processor/batchprocessor/package_test.go +++ b/processor/batchprocessor/generated_package_test.go @@ -1,5 +1,4 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 +// Code generated by mdatagen. DO NOT EDIT. package batchprocessor diff --git a/processor/batchprocessor/go.mod b/processor/batchprocessor/go.mod index 7dd14964033..eeeeba8a4a1 100644 --- a/processor/batchprocessor/go.mod +++ b/processor/batchprocessor/go.mod @@ -4,22 +4,23 @@ go 1.21 require ( github.com/prometheus/client_golang v1.19.0 - github.com/prometheus/client_model v0.6.0 - github.com/prometheus/common v0.48.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.96.0 - go.opentelemetry.io/collector/component v0.96.0 - go.opentelemetry.io/collector/config/configtelemetry v0.96.0 - go.opentelemetry.io/collector/confmap v0.96.0 - go.opentelemetry.io/collector/consumer v0.96.0 - go.opentelemetry.io/collector/pdata v1.3.0 - go.opentelemetry.io/collector/processor v0.96.0 - go.opentelemetry.io/otel v1.24.0 - go.opentelemetry.io/otel/exporters/prometheus v0.46.0 - go.opentelemetry.io/otel/metric v1.24.0 - go.opentelemetry.io/otel/sdk v1.24.0 - go.opentelemetry.io/otel/sdk/metric v1.24.0 - go.opentelemetry.io/otel/trace v1.24.0 + github.com/prometheus/client_model v0.6.1 + github.com/prometheus/common v0.53.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector v0.100.0 + go.opentelemetry.io/collector/component v0.100.0 + go.opentelemetry.io/collector/config/configtelemetry v0.100.0 + go.opentelemetry.io/collector/confmap v0.100.0 + go.opentelemetry.io/collector/consumer v0.100.0 + go.opentelemetry.io/collector/pdata v1.7.0 + go.opentelemetry.io/collector/pdata/testdata v0.100.0 + go.opentelemetry.io/collector/processor v0.100.0 + go.opentelemetry.io/otel v1.26.0 + go.opentelemetry.io/otel/exporters/prometheus v0.48.0 + go.opentelemetry.io/otel/metric v1.26.0 + go.opentelemetry.io/otel/sdk v1.26.0 + go.opentelemetry.io/otel/sdk/metric v1.26.0 + go.opentelemetry.io/otel/trace v1.26.0 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 @@ -33,23 +34,23 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/sys v0.17.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/grpc v1.62.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.34.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -65,6 +66,8 @@ replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/pdata => ../../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + replace go.opentelemetry.io/collector/consumer => ../../consumer retract ( diff --git a/processor/batchprocessor/go.sum b/processor/batchprocessor/go.sum index 06616cda85d..4394e616fe3 100644 --- a/processor/batchprocessor/go.sum +++ b/processor/batchprocessor/go.sum @@ -14,13 +14,11 @@ github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsM github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +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/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -29,8 +27,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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= @@ -48,32 +46,32 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= -go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -89,16 +87,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -111,14 +109,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/processor/batchprocessor/internal/metadata/generated_status.go b/processor/batchprocessor/internal/metadata/generated_status.go index b3956d2b0a2..c77d7c0a539 100644 --- a/processor/batchprocessor/internal/metadata/generated_status.go +++ b/processor/batchprocessor/internal/metadata/generated_status.go @@ -3,15 +3,11 @@ package metadata import ( - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" ) var ( - Type = component.MustNewType("batch") - scopeName = "go.opentelemetry.io/collector/processor/batchprocessor" + Type = component.MustNewType("batch") ) const ( @@ -19,11 +15,3 @@ const ( MetricsStability = component.StabilityLevelBeta LogsStability = component.StabilityLevelBeta ) - -func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter(scopeName) -} - -func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer(scopeName) -} diff --git a/processor/batchprocessor/internal/metadata/generated_telemetry.go b/processor/batchprocessor/internal/metadata/generated_telemetry.go new file mode 100644 index 00000000000..9a1991a4795 --- /dev/null +++ b/processor/batchprocessor/internal/metadata/generated_telemetry.go @@ -0,0 +1,18 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("go.opentelemetry.io/collector/processor/batchprocessor") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/processor/batchprocessor") +} diff --git a/processor/batchprocessor/internal/metadata/generated_telemetry_test.go b/processor/batchprocessor/internal/metadata/generated_telemetry_test.go new file mode 100644 index 00000000000..22002cbff85 --- /dev/null +++ b/processor/batchprocessor/internal/metadata/generated_telemetry_test.go @@ -0,0 +1,63 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/otel/metric" + embeddedmetric "go.opentelemetry.io/otel/metric/embedded" + noopmetric "go.opentelemetry.io/otel/metric/noop" + "go.opentelemetry.io/otel/trace" + embeddedtrace "go.opentelemetry.io/otel/trace/embedded" + nooptrace "go.opentelemetry.io/otel/trace/noop" + + "go.opentelemetry.io/collector/component" +) + +type mockMeter struct { + noopmetric.Meter + name string +} +type mockMeterProvider struct { + embeddedmetric.MeterProvider +} + +func (m mockMeterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter { + return mockMeter{name: name} +} + +type mockTracer struct { + nooptrace.Tracer + name string +} + +type mockTracerProvider struct { + embeddedtrace.TracerProvider +} + +func (m mockTracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { + return mockTracer{name: name} +} + +func TestProviders(t *testing.T) { + set := component.TelemetrySettings{ + MeterProvider: mockMeterProvider{}, + TracerProvider: mockTracerProvider{}, + } + + meter := Meter(set) + if m, ok := meter.(mockMeter); ok { + require.Equal(t, "go.opentelemetry.io/collector/processor/batchprocessor", m.name) + } else { + require.Fail(t, "returned Meter not mockMeter") + } + + tracer := Tracer(set) + if m, ok := tracer.(mockTracer); ok { + require.Equal(t, "go.opentelemetry.io/collector/processor/batchprocessor", m.name) + } else { + require.Fail(t, "returned Meter not mockTracer") + } +} diff --git a/processor/batchprocessor/metadata.yaml b/processor/batchprocessor/metadata.yaml index f535dc6c6c7..d96e0f80d9b 100644 --- a/processor/batchprocessor/metadata.yaml +++ b/processor/batchprocessor/metadata.yaml @@ -5,3 +5,5 @@ status: stability: beta: [traces, metrics, logs] distributions: [core, contrib] + +tests: diff --git a/processor/batchprocessor/metrics.go b/processor/batchprocessor/metrics.go index d10727813eb..95fe7f28e16 100644 --- a/processor/batchprocessor/metrics.go +++ b/processor/batchprocessor/metrics.go @@ -8,18 +8,17 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/metric" + noopmetric "go.opentelemetry.io/otel/metric/noop" "go.uber.org/multierr" + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" "go.opentelemetry.io/collector/processor" + "go.opentelemetry.io/collector/processor/batchprocessor/internal/metadata" "go.opentelemetry.io/collector/processor/processorhelper" ) -const ( - scopeName = "go.opentelemetry.io/collector/processor/batchprocessor" -) - type trigger int const ( @@ -50,16 +49,25 @@ func newBatchProcessorTelemetry(set processor.CreateSettings, currentMetadataCar detailed: set.MetricsLevel == configtelemetry.LevelDetailed, } - if err := bpt.createOtelMetrics(set.MeterProvider, currentMetadataCardinality); err != nil { + if err := bpt.createOtelMetrics(set.TelemetrySettings, currentMetadataCardinality); err != nil { return nil, err } return bpt, nil } -func (bpt *batchProcessorTelemetry) createOtelMetrics(mp metric.MeterProvider, currentMetadataCardinality func() int) error { - var errors, err error - meter := mp.Meter(scopeName) +func (bpt *batchProcessorTelemetry) createOtelMetrics(set component.TelemetrySettings, currentMetadataCardinality func() int) error { + var ( + errors, err error + meter metric.Meter + ) + + // BatchProcessor are emitted starting from Normal level only. + if bpt.level >= configtelemetry.LevelNormal { + meter = metadata.Meter(set) + } else { + meter = noopmetric.Meter{} + } bpt.batchSizeTriggerSend, err = meter.Int64Counter( processorhelper.BuildCustomMetricName(typeStr, "batch_size_trigger_send"), diff --git a/processor/batchprocessor/splitlogs_test.go b/processor/batchprocessor/splitlogs_test.go index d112cd1069e..74ac51c8521 100644 --- a/processor/batchprocessor/splitlogs_test.go +++ b/processor/batchprocessor/splitlogs_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestSplitLogs_noop(t *testing.T) { diff --git a/processor/batchprocessor/splitmetrics_test.go b/processor/batchprocessor/splitmetrics_test.go index e81cc73b5db..fd40ec8f9fb 100644 --- a/processor/batchprocessor/splitmetrics_test.go +++ b/processor/batchprocessor/splitmetrics_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestSplitMetrics_noop(t *testing.T) { diff --git a/processor/batchprocessor/splittraces_test.go b/processor/batchprocessor/splittraces_test.go index 5316aab66a2..62d8b1e0e4d 100644 --- a/processor/batchprocessor/splittraces_test.go +++ b/processor/batchprocessor/splittraces_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestSplitTraces_noop(t *testing.T) { diff --git a/processor/go.mod b/processor/go.mod index ebb68ddd8da..e569ac163d8 100644 --- a/processor/go.mod +++ b/processor/go.mod @@ -3,15 +3,17 @@ module go.opentelemetry.io/collector/processor go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.96.0 - go.opentelemetry.io/collector/component v0.96.0 - go.opentelemetry.io/collector/config/configtelemetry v0.96.0 - go.opentelemetry.io/collector/consumer v0.96.0 - go.opentelemetry.io/collector/pdata v1.3.0 - go.opentelemetry.io/otel v1.24.0 - go.opentelemetry.io/otel/metric v1.24.0 - go.opentelemetry.io/otel/trace v1.24.0 + github.com/google/uuid v1.6.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector v0.100.0 + go.opentelemetry.io/collector/component v0.100.0 + go.opentelemetry.io/collector/config/configtelemetry v0.100.0 + go.opentelemetry.io/collector/consumer v0.100.0 + go.opentelemetry.io/collector/pdata v1.7.0 + go.opentelemetry.io/collector/pdata/testdata v0.100.0 + go.opentelemetry.io/otel v1.26.0 + go.opentelemetry.io/otel/metric v1.26.0 + go.opentelemetry.io/otel/trace v1.26.0 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 @@ -25,30 +27,29 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.19.0 // indirect - github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector/confmap v0.96.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect - go.opentelemetry.io/otel/sdk v1.24.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/sys v0.17.0 // indirect + go.opentelemetry.io/collector/confmap v0.100.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect + go.opentelemetry.io/otel/sdk v1.26.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/grpc v1.62.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.34.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -64,4 +65,6 @@ replace go.opentelemetry.io/collector/featuregate => ../featuregate replace go.opentelemetry.io/collector/pdata => ../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../pdata/testdata + replace go.opentelemetry.io/collector/config/configtelemetry => ../config/configtelemetry diff --git a/processor/go.sum b/processor/go.sum index 06616cda85d..4394e616fe3 100644 --- a/processor/go.sum +++ b/processor/go.sum @@ -14,13 +14,11 @@ github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsM github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +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/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -29,8 +27,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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= @@ -48,32 +46,32 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= -go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -89,16 +87,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -111,14 +109,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/processor/memorylimiterprocessor/generated_component_test.go b/processor/memorylimiterprocessor/generated_component_test.go new file mode 100644 index 00000000000..7144d4a3901 --- /dev/null +++ b/processor/memorylimiterprocessor/generated_component_test.go @@ -0,0 +1,144 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package memorylimiterprocessor + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/processor" + "go.opentelemetry.io/collector/processor/processortest" +) + +func TestComponentFactoryType(t *testing.T) { + require.Equal(t, "memory_limiter", NewFactory().Type().String()) +} + +func TestComponentConfigStruct(t *testing.T) { + require.NoError(t, componenttest.CheckConfigStruct(NewFactory().CreateDefaultConfig())) +} + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "logs", + createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateLogsProcessor(ctx, set, cfg, consumertest.NewNop()) + }, + }, + + { + name: "metrics", + createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsProcessor(ctx, set, cfg, consumertest.NewNop()) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesProcessor(ctx, set, cfg, consumertest.NewNop()) + }, + }, + } + + cm, err := confmaptest.LoadConf("metadata.yaml") + require.NoError(t, err) + cfg := factory.CreateDefaultConfig() + sub, err := cm.Sub("tests::config") + require.NoError(t, err) + require.NoError(t, component.UnmarshalConfig(sub, cfg)) + + for _, test := range tests { + t.Run(test.name+"-lifecycle", func(t *testing.T) { + c, err := test.createFn(context.Background(), processortest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + err = c.Start(context.Background(), host) + require.NoError(t, err) + require.NotPanics(t, func() { + switch test.name { + case "logs": + e, ok := c.(processor.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(processor.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(processor.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/processor/memorylimiterprocessor/package_test.go b/processor/memorylimiterprocessor/generated_package_test.go similarity index 63% rename from processor/memorylimiterprocessor/package_test.go rename to processor/memorylimiterprocessor/generated_package_test.go index 77bee80493d..969659943d8 100644 --- a/processor/memorylimiterprocessor/package_test.go +++ b/processor/memorylimiterprocessor/generated_package_test.go @@ -1,5 +1,4 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 +// Code generated by mdatagen. DO NOT EDIT. package memorylimiterprocessor diff --git a/processor/memorylimiterprocessor/go.mod b/processor/memorylimiterprocessor/go.mod index a82f08150c3..87ab2ea6753 100644 --- a/processor/memorylimiterprocessor/go.mod +++ b/processor/memorylimiterprocessor/go.mod @@ -3,14 +3,15 @@ module go.opentelemetry.io/collector/processor/memorylimiterprocessor go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.96.0 - go.opentelemetry.io/collector/component v0.96.0 - go.opentelemetry.io/collector/consumer v0.96.0 - go.opentelemetry.io/collector/pdata v1.3.0 - go.opentelemetry.io/collector/processor v0.96.0 - go.opentelemetry.io/otel/metric v1.24.0 - go.opentelemetry.io/otel/trace v1.24.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector v0.100.0 + go.opentelemetry.io/collector/component v0.100.0 + go.opentelemetry.io/collector/confmap v0.100.0 + go.opentelemetry.io/collector/consumer v0.100.0 + go.opentelemetry.io/collector/pdata v1.7.0 + go.opentelemetry.io/collector/processor v0.100.0 + go.opentelemetry.io/otel/metric v1.26.0 + go.opentelemetry.io/otel/trace v1.26.0 go.uber.org/goleak v1.3.0 ) @@ -23,11 +24,11 @@ require ( github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect @@ -36,27 +37,27 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/prometheus/client_golang v1.19.0 // indirect - github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - github.com/shirou/gopsutil/v3 v3.24.1 // indirect + github.com/shirou/gopsutil/v3 v3.24.3 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect - github.com/yusufpapurcu/wmi v1.2.3 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect - go.opentelemetry.io/collector/confmap v0.96.0 // indirect - go.opentelemetry.io/otel v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect - go.opentelemetry.io/otel/sdk v1.24.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.100.0 // indirect + go.opentelemetry.io/otel v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect + go.opentelemetry.io/otel/sdk v1.26.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/sys v0.17.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/grpc v1.62.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.34.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -72,6 +73,8 @@ replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/pdata => ../../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + replace go.opentelemetry.io/collector/consumer => ../../consumer retract ( diff --git a/processor/memorylimiterprocessor/go.sum b/processor/memorylimiterprocessor/go.sum index 7a84d36f2e3..a2c03ed5c2f 100644 --- a/processor/memorylimiterprocessor/go.sum +++ b/processor/memorylimiterprocessor/go.sum @@ -16,15 +16,13 @@ github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsM github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +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/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -33,8 +31,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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= @@ -56,46 +54,48 @@ github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/shirou/gopsutil/v3 v3.24.1 h1:R3t6ondCEvmARp3wxODhXMTLC/klMa87h2PHUw5m7QI= -github.com/shirou/gopsutil/v3 v3.24.1/go.mod h1:UU7a2MSBQa+kW1uuDq8DeEBS8kmrnQwsv2b5O513rwU= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 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.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= -go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -111,8 +111,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -123,9 +123,9 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -138,14 +138,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/processor/memorylimiterprocessor/internal/metadata/generated_status.go b/processor/memorylimiterprocessor/internal/metadata/generated_status.go index 0b2058d89df..bd77272f645 100644 --- a/processor/memorylimiterprocessor/internal/metadata/generated_status.go +++ b/processor/memorylimiterprocessor/internal/metadata/generated_status.go @@ -3,15 +3,11 @@ package metadata import ( - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" ) var ( - Type = component.MustNewType("memory_limiter") - scopeName = "go.opentelemetry.io/collector/processor/memorylimiterprocessor" + Type = component.MustNewType("memory_limiter") ) const ( @@ -19,11 +15,3 @@ const ( MetricsStability = component.StabilityLevelBeta LogsStability = component.StabilityLevelBeta ) - -func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter(scopeName) -} - -func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer(scopeName) -} diff --git a/processor/memorylimiterprocessor/internal/metadata/generated_telemetry.go b/processor/memorylimiterprocessor/internal/metadata/generated_telemetry.go new file mode 100644 index 00000000000..9ae63c09a87 --- /dev/null +++ b/processor/memorylimiterprocessor/internal/metadata/generated_telemetry.go @@ -0,0 +1,18 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("go.opentelemetry.io/collector/processor/memorylimiterprocessor") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/processor/memorylimiterprocessor") +} diff --git a/processor/memorylimiterprocessor/internal/metadata/generated_telemetry_test.go b/processor/memorylimiterprocessor/internal/metadata/generated_telemetry_test.go new file mode 100644 index 00000000000..21c22f3a34c --- /dev/null +++ b/processor/memorylimiterprocessor/internal/metadata/generated_telemetry_test.go @@ -0,0 +1,63 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/otel/metric" + embeddedmetric "go.opentelemetry.io/otel/metric/embedded" + noopmetric "go.opentelemetry.io/otel/metric/noop" + "go.opentelemetry.io/otel/trace" + embeddedtrace "go.opentelemetry.io/otel/trace/embedded" + nooptrace "go.opentelemetry.io/otel/trace/noop" + + "go.opentelemetry.io/collector/component" +) + +type mockMeter struct { + noopmetric.Meter + name string +} +type mockMeterProvider struct { + embeddedmetric.MeterProvider +} + +func (m mockMeterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter { + return mockMeter{name: name} +} + +type mockTracer struct { + nooptrace.Tracer + name string +} + +type mockTracerProvider struct { + embeddedtrace.TracerProvider +} + +func (m mockTracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { + return mockTracer{name: name} +} + +func TestProviders(t *testing.T) { + set := component.TelemetrySettings{ + MeterProvider: mockMeterProvider{}, + TracerProvider: mockTracerProvider{}, + } + + meter := Meter(set) + if m, ok := meter.(mockMeter); ok { + require.Equal(t, "go.opentelemetry.io/collector/processor/memorylimiterprocessor", m.name) + } else { + require.Fail(t, "returned Meter not mockMeter") + } + + tracer := Tracer(set) + if m, ok := tracer.(mockTracer); ok { + require.Equal(t, "go.opentelemetry.io/collector/processor/memorylimiterprocessor", m.name) + } else { + require.Fail(t, "returned Meter not mockTracer") + } +} diff --git a/processor/memorylimiterprocessor/internal/mock_exporter.go b/processor/memorylimiterprocessor/internal/mock_exporter.go index 1a55c9299e9..fee7503dd26 100644 --- a/processor/memorylimiterprocessor/internal/mock_exporter.go +++ b/processor/memorylimiterprocessor/internal/mock_exporter.go @@ -8,14 +8,15 @@ import ( "sync/atomic" "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/pdata/plog" ) type MockExporter struct { - destAvailable int64 - acceptedLogCount int64 - deliveredLogCount int64 - Logs []plog.Logs + destAvailable atomic.Bool + acceptedLogCount atomic.Int64 + deliveredLogCount atomic.Int64 + Logs consumertest.LogsSink } var _ consumer.Logs = (*MockExporter)(nil) @@ -24,15 +25,15 @@ func (e *MockExporter) Capabilities() consumer.Capabilities { return consumer.Capabilities{} } -func (e *MockExporter) ConsumeLogs(_ context.Context, ld plog.Logs) error { - atomic.AddInt64(&e.acceptedLogCount, int64(ld.LogRecordCount())) +func (e *MockExporter) ConsumeLogs(ctx context.Context, ld plog.Logs) error { + e.acceptedLogCount.Add(int64(ld.LogRecordCount())) - if atomic.LoadInt64(&e.destAvailable) == 1 { + if e.destAvailable.Load() { // Destination is available, immediately deliver. - atomic.AddInt64(&e.deliveredLogCount, int64(ld.LogRecordCount())) + e.deliveredLogCount.Add(int64(ld.LogRecordCount())) } else { // Destination is not available. Queue the logs in the exporter. - e.Logs = append(e.Logs, ld) + return e.Logs.ConsumeLogs(ctx, ld) } return nil } @@ -40,28 +41,32 @@ func (e *MockExporter) ConsumeLogs(_ context.Context, ld plog.Logs) error { func (e *MockExporter) SetDestAvailable(available bool) { if available { // Pretend we delivered all queued accepted logs. - atomic.AddInt64(&e.deliveredLogCount, atomic.LoadInt64(&e.acceptedLogCount)) + e.deliveredLogCount.Add(int64(e.Logs.LogRecordCount())) // Get rid of the delivered logs so that memory can be collected. - e.Logs = nil + e.Logs.Reset() // Now mark destination available so that subsequent ConsumeLogs // don't queue the logs anymore. - atomic.StoreInt64(&e.destAvailable, 1) - + e.destAvailable.Store(true) } else { - atomic.StoreInt64(&e.destAvailable, 0) + e.destAvailable.Store(false) } } func (e *MockExporter) AcceptedLogCount() int { - return int(atomic.LoadInt64(&e.acceptedLogCount)) + return int(e.acceptedLogCount.Load()) } func (e *MockExporter) DeliveredLogCount() int { - return int(atomic.LoadInt64(&e.deliveredLogCount)) + return int(e.deliveredLogCount.Load()) } func NewMockExporter() *MockExporter { - return &MockExporter{} + return &MockExporter{ + destAvailable: atomic.Bool{}, + acceptedLogCount: atomic.Int64{}, + deliveredLogCount: atomic.Int64{}, + Logs: consumertest.LogsSink{}, + } } diff --git a/processor/memorylimiterprocessor/memorylimiter_test.go b/processor/memorylimiterprocessor/memorylimiter_test.go index 626bf877d7c..10bc8d7911c 100644 --- a/processor/memorylimiterprocessor/memorylimiter_test.go +++ b/processor/memorylimiterprocessor/memorylimiter_test.go @@ -99,8 +99,10 @@ func TestNoDataLoss(t *testing.T) { // And eventually the exporter must confirm that it delivered exact number of produced logs. require.Eventually(t, func() bool { - return receiver.ProduceCount == exporter.DeliveredLogCount() - }, 5*time.Second, 1*time.Millisecond) + d := exporter.DeliveredLogCount() + t.Logf("received: %d, expected: %d\n", d, receiver.ProduceCount) + return receiver.ProduceCount == d + }, 5*time.Second, 100*time.Millisecond) // Double check that the number of logs accepted by exporter matches the number of produced by receiver. assert.Equal(t, receiver.ProduceCount, exporter.AcceptedLogCount()) diff --git a/processor/memorylimiterprocessor/metadata.yaml b/processor/memorylimiterprocessor/metadata.yaml index bc9e1829149..92f9d2f821b 100644 --- a/processor/memorylimiterprocessor/metadata.yaml +++ b/processor/memorylimiterprocessor/metadata.yaml @@ -5,3 +5,11 @@ status: stability: beta: [traces, metrics, logs] distributions: [core, contrib] + +tests: + config: + check_interval: 5s + limit_mib: 400 + spike_limit_mib: 50 + # TODO: https://github.com/open-telemetry/opentelemetry-collector/issues/9687 + skip_shutdown: true diff --git a/processor/processorhelper/obsreport.go b/processor/processorhelper/obsreport.go index 9d1188f1408..17b20704f0d 100644 --- a/processor/processorhelper/obsreport.go +++ b/processor/processorhelper/obsreport.go @@ -19,21 +19,21 @@ import ( ) var ( - processorScope = obsmetrics.Scope + obsmetrics.NameSep + obsmetrics.ProcessorKey + processorScope = obsmetrics.Scope + obsmetrics.SpanNameSep + obsmetrics.ProcessorKey ) // BuildCustomMetricName is used to be build a metric name following // the standards used in the Collector. The configType should be the same // value used to identify the type on the config. func BuildCustomMetricName(configType, metric string) string { - componentPrefix := obsmetrics.ProcessorPrefix - if !strings.HasSuffix(componentPrefix, obsmetrics.NameSep) { - componentPrefix += obsmetrics.NameSep + componentPrefix := obsmetrics.ProcessorMetricPrefix + if !strings.HasSuffix(componentPrefix, obsmetrics.MetricNameSep) { + componentPrefix += obsmetrics.MetricNameSep } if configType == "" { return componentPrefix } - return componentPrefix + configType + obsmetrics.NameSep + metric + return componentPrefix + configType + obsmetrics.MetricNameSep + metric } // ObsReport is a helper to add observability to a processor. @@ -87,63 +87,63 @@ func (or *ObsReport) createOtelMetrics(cfg ObsReportSettings) error { var errors, err error or.acceptedSpansCounter, err = meter.Int64Counter( - obsmetrics.ProcessorPrefix+obsmetrics.AcceptedSpansKey, + obsmetrics.ProcessorMetricPrefix+obsmetrics.AcceptedSpansKey, metric.WithDescription("Number of spans successfully pushed into the next component in the pipeline."), metric.WithUnit("1"), ) errors = multierr.Append(errors, err) or.refusedSpansCounter, err = meter.Int64Counter( - obsmetrics.ProcessorPrefix+obsmetrics.RefusedSpansKey, + obsmetrics.ProcessorMetricPrefix+obsmetrics.RefusedSpansKey, metric.WithDescription("Number of spans that were rejected by the next component in the pipeline."), metric.WithUnit("1"), ) errors = multierr.Append(errors, err) or.droppedSpansCounter, err = meter.Int64Counter( - obsmetrics.ProcessorPrefix+obsmetrics.DroppedSpansKey, + obsmetrics.ProcessorMetricPrefix+obsmetrics.DroppedSpansKey, metric.WithDescription("Number of spans that were dropped."), metric.WithUnit("1"), ) errors = multierr.Append(errors, err) or.acceptedMetricPointsCounter, err = meter.Int64Counter( - obsmetrics.ProcessorPrefix+obsmetrics.AcceptedMetricPointsKey, + obsmetrics.ProcessorMetricPrefix+obsmetrics.AcceptedMetricPointsKey, metric.WithDescription("Number of metric points successfully pushed into the next component in the pipeline."), metric.WithUnit("1"), ) errors = multierr.Append(errors, err) or.refusedMetricPointsCounter, err = meter.Int64Counter( - obsmetrics.ProcessorPrefix+obsmetrics.RefusedMetricPointsKey, + obsmetrics.ProcessorMetricPrefix+obsmetrics.RefusedMetricPointsKey, metric.WithDescription("Number of metric points that were rejected by the next component in the pipeline."), metric.WithUnit("1"), ) errors = multierr.Append(errors, err) or.droppedMetricPointsCounter, err = meter.Int64Counter( - obsmetrics.ProcessorPrefix+obsmetrics.DroppedMetricPointsKey, + obsmetrics.ProcessorMetricPrefix+obsmetrics.DroppedMetricPointsKey, metric.WithDescription("Number of metric points that were dropped."), metric.WithUnit("1"), ) errors = multierr.Append(errors, err) or.acceptedLogRecordsCounter, err = meter.Int64Counter( - obsmetrics.ProcessorPrefix+obsmetrics.AcceptedLogRecordsKey, + obsmetrics.ProcessorMetricPrefix+obsmetrics.AcceptedLogRecordsKey, metric.WithDescription("Number of log records successfully pushed into the next component in the pipeline."), metric.WithUnit("1"), ) errors = multierr.Append(errors, err) or.refusedLogRecordsCounter, err = meter.Int64Counter( - obsmetrics.ProcessorPrefix+obsmetrics.RefusedLogRecordsKey, + obsmetrics.ProcessorMetricPrefix+obsmetrics.RefusedLogRecordsKey, metric.WithDescription("Number of log records that were rejected by the next component in the pipeline."), metric.WithUnit("1"), ) errors = multierr.Append(errors, err) or.droppedLogRecordsCounter, err = meter.Int64Counter( - obsmetrics.ProcessorPrefix+obsmetrics.DroppedLogRecordsKey, + obsmetrics.ProcessorMetricPrefix+obsmetrics.DroppedLogRecordsKey, metric.WithDescription("Number of log records that were dropped."), metric.WithUnit("1"), ) diff --git a/processor/processorhelper/obsreport_test.go b/processor/processorhelper/obsreport_test.go index 2cd4500e299..d80c1c180f6 100644 --- a/processor/processorhelper/obsreport_test.go +++ b/processor/processorhelper/obsreport_test.go @@ -63,11 +63,11 @@ func TestBuildProcessorCustomMetricName(t *testing.T) { }{ { name: "firstMeasure", - want: "processor/test_type/firstMeasure", + want: "processor_test_type_firstMeasure", }, { name: "secondMeasure", - want: "processor/test_type/secondMeasure", + want: "processor_test_type_secondMeasure", }, } for _, tt := range tests { diff --git a/processor/processortest/nop_processor.go b/processor/processortest/nop_processor.go index 0651bc5b6ba..6ac5eb1bbbd 100644 --- a/processor/processortest/nop_processor.go +++ b/processor/processortest/nop_processor.go @@ -6,6 +6,8 @@ package processortest // import "go.opentelemetry.io/collector/processor/process import ( "context" + "github.com/google/uuid" + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/consumer" @@ -18,7 +20,7 @@ var nopType = component.MustNewType("nop") // NewNopCreateSettings returns a new nop settings for Create*Processor functions. func NewNopCreateSettings() processor.CreateSettings { return processor.CreateSettings{ - ID: component.NewID(nopType), + ID: component.NewIDWithName(nopType, uuid.NewString()), TelemetrySettings: componenttest.NewNopTelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo(), } diff --git a/processor/processortest/shutdown_verifier.go b/processor/processortest/shutdown_verifier.go index e0c3becac24..1048fe7b712 100644 --- a/processor/processortest/shutdown_verifier.go +++ b/processor/processortest/shutdown_verifier.go @@ -14,7 +14,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" + "go.opentelemetry.io/collector/pdata/testdata" "go.opentelemetry.io/collector/processor" ) diff --git a/receiver/go.mod b/receiver/go.mod index 468ae1f821d..600c47a82ef 100644 --- a/receiver/go.mod +++ b/receiver/go.mod @@ -3,16 +3,17 @@ module go.opentelemetry.io/collector/receiver go 1.21 require ( - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.96.0 - go.opentelemetry.io/collector/component v0.96.0 - go.opentelemetry.io/collector/config/configtelemetry v0.96.0 - go.opentelemetry.io/collector/consumer v0.96.0 - go.opentelemetry.io/collector/pdata v1.3.0 - go.opentelemetry.io/otel v1.24.0 - go.opentelemetry.io/otel/metric v1.24.0 - go.opentelemetry.io/otel/sdk v1.24.0 - go.opentelemetry.io/otel/trace v1.24.0 + github.com/google/uuid v1.6.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector v0.100.0 + go.opentelemetry.io/collector/component v0.100.0 + go.opentelemetry.io/collector/config/configtelemetry v0.100.0 + go.opentelemetry.io/collector/consumer v0.100.0 + go.opentelemetry.io/collector/pdata v1.7.0 + go.opentelemetry.io/otel v1.26.0 + go.opentelemetry.io/otel/metric v1.26.0 + go.opentelemetry.io/otel/sdk v1.26.0 + go.opentelemetry.io/otel/trace v1.26.0 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 @@ -26,29 +27,28 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.19.0 // indirect - github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector/confmap v0.96.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/sys v0.17.0 // indirect + go.opentelemetry.io/collector/confmap v0.100.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/grpc v1.62.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.34.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -64,6 +64,8 @@ replace go.opentelemetry.io/collector/featuregate => ../featuregate replace go.opentelemetry.io/collector/pdata => ../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../pdata/testdata + retract v0.76.0 // Depends on retracted pdata v1.0.0-rc10 module replace go.opentelemetry.io/collector/config/configtelemetry => ../config/configtelemetry diff --git a/receiver/go.sum b/receiver/go.sum index 06616cda85d..4394e616fe3 100644 --- a/receiver/go.sum +++ b/receiver/go.sum @@ -14,13 +14,11 @@ github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsM github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +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/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -29,8 +27,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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= @@ -48,32 +46,32 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= -go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -89,16 +87,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -111,14 +109,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/receiver/nopreceiver/Makefile b/receiver/nopreceiver/Makefile new file mode 100644 index 00000000000..ded7a36092d --- /dev/null +++ b/receiver/nopreceiver/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common diff --git a/receiver/nopreceiver/README.md b/receiver/nopreceiver/README.md new file mode 100644 index 00000000000..62a699bb438 --- /dev/null +++ b/receiver/nopreceiver/README.md @@ -0,0 +1,26 @@ +# No-op Receiver + + +| Status | | +| ------------- |-----------| +| Stability | [beta]: traces, metrics, logs | +| Distributions | [core], [contrib] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Areceiver%2Fnop%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Areceiver%2Fnop) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Areceiver%2Fnop%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Areceiver%2Fnop) | + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib + + +Serves as a placeholder receiver in a pipeline. This can be useful if you want +to e.g. start a Collector with only extensions enabled. + +## Getting Started + +All that is required to enable the No-op receiver is to include it in the +receiver definitions. It takes no configuration. + +```yaml +receivers: + nop: +``` diff --git a/receiver/nopreceiver/doc.go b/receiver/nopreceiver/doc.go new file mode 100644 index 00000000000..597f9ac3e53 --- /dev/null +++ b/receiver/nopreceiver/doc.go @@ -0,0 +1,7 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:generate mdatagen metadata.yaml + +// Package nopreceiver serves as a placeholder receiver. +package nopreceiver // import "go.opentelemetry.io/collector/receiver/nopreceiver" diff --git a/receiver/nopreceiver/generated_component_test.go b/receiver/nopreceiver/generated_component_test.go new file mode 100644 index 00000000000..14f8840b1e7 --- /dev/null +++ b/receiver/nopreceiver/generated_component_test.go @@ -0,0 +1,84 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package nopreceiver + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/receiver" + "go.opentelemetry.io/collector/receiver/receivertest" +) + +func TestComponentFactoryType(t *testing.T) { + require.Equal(t, "nop", NewFactory().Type().String()) +} + +func TestComponentConfigStruct(t *testing.T) { + require.NoError(t, componenttest.CheckConfigStruct(NewFactory().CreateDefaultConfig())) +} + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set receiver.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "logs", + createFn: func(ctx context.Context, set receiver.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateLogsReceiver(ctx, set, cfg, consumertest.NewNop()) + }, + }, + + { + name: "metrics", + createFn: func(ctx context.Context, set receiver.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsReceiver(ctx, set, cfg, consumertest.NewNop()) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set receiver.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesReceiver(ctx, set, cfg, consumertest.NewNop()) + }, + }, + } + + cm, err := confmaptest.LoadConf("metadata.yaml") + require.NoError(t, err) + cfg := factory.CreateDefaultConfig() + sub, err := cm.Sub("tests::config") + require.NoError(t, err) + require.NoError(t, component.UnmarshalConfig(sub, cfg)) + + for _, test := range tests { + t.Run(test.name+"-shutdown", func(t *testing.T) { + c, err := test.createFn(context.Background(), receivertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + firstRcvr, err := test.createFn(context.Background(), receivertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + require.NoError(t, err) + require.NoError(t, firstRcvr.Start(context.Background(), host)) + require.NoError(t, firstRcvr.Shutdown(context.Background())) + secondRcvr, err := test.createFn(context.Background(), receivertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondRcvr.Start(context.Background(), host)) + require.NoError(t, secondRcvr.Shutdown(context.Background())) + }) + } +} diff --git a/receiver/nopreceiver/generated_package_test.go b/receiver/nopreceiver/generated_package_test.go new file mode 100644 index 00000000000..0472e5e1cd3 --- /dev/null +++ b/receiver/nopreceiver/generated_package_test.go @@ -0,0 +1,13 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package nopreceiver + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/receiver/nopreceiver/go.mod b/receiver/nopreceiver/go.mod new file mode 100644 index 00000000000..8f2e843d625 --- /dev/null +++ b/receiver/nopreceiver/go.mod @@ -0,0 +1,73 @@ +module go.opentelemetry.io/collector/receiver/nopreceiver + +go 1.21 + +toolchain go1.21.6 + +require ( + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.100.0 + go.opentelemetry.io/collector/confmap v0.100.0 + go.opentelemetry.io/collector/consumer v0.100.0 + go.opentelemetry.io/collector/receiver v0.100.0 + go.opentelemetry.io/otel/metric v1.26.0 + go.opentelemetry.io/otel/trace v1.26.0 + go.uber.org/goleak v1.3.0 +) + +require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/knadh/koanf/maps v0.1.1 // indirect + github.com/knadh/koanf/providers/confmap v0.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.53.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect + go.opentelemetry.io/collector/pdata v1.7.0 // indirect + go.opentelemetry.io/otel v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect + go.opentelemetry.io/otel/sdk v1.26.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.34.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + +replace go.opentelemetry.io/collector/component => ../../component + +replace go.opentelemetry.io/collector/confmap => ../../confmap + +replace go.opentelemetry.io/collector/consumer => ../../consumer + +replace go.opentelemetry.io/collector/receiver => ../ + +replace go.opentelemetry.io/collector/pdata => ../../pdata + +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + +replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry + +replace go.opentelemetry.io/collector => ../.. + +replace go.opentelemetry.io/collector/featuregate => ../../featuregate diff --git a/receiver/nopreceiver/go.sum b/receiver/nopreceiver/go.sum new file mode 100644 index 00000000000..4394e616fe3 --- /dev/null +++ b/receiver/nopreceiver/go.sum @@ -0,0 +1,122 @@ +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +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= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/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/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +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/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= +github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= +github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= +github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +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/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +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= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +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/receiver/nopreceiver/internal/metadata/generated_status.go b/receiver/nopreceiver/internal/metadata/generated_status.go new file mode 100644 index 00000000000..1901cab9ee6 --- /dev/null +++ b/receiver/nopreceiver/internal/metadata/generated_status.go @@ -0,0 +1,17 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" +) + +var ( + Type = component.MustNewType("nop") +) + +const ( + TracesStability = component.StabilityLevelBeta + MetricsStability = component.StabilityLevelBeta + LogsStability = component.StabilityLevelBeta +) diff --git a/receiver/nopreceiver/internal/metadata/generated_telemetry.go b/receiver/nopreceiver/internal/metadata/generated_telemetry.go new file mode 100644 index 00000000000..9f3838ece6c --- /dev/null +++ b/receiver/nopreceiver/internal/metadata/generated_telemetry.go @@ -0,0 +1,18 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("go.opentelemetry.io/collector/receiver/nopreceiver") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/receiver/nopreceiver") +} diff --git a/receiver/nopreceiver/internal/metadata/generated_telemetry_test.go b/receiver/nopreceiver/internal/metadata/generated_telemetry_test.go new file mode 100644 index 00000000000..95dde48b83a --- /dev/null +++ b/receiver/nopreceiver/internal/metadata/generated_telemetry_test.go @@ -0,0 +1,63 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/otel/metric" + embeddedmetric "go.opentelemetry.io/otel/metric/embedded" + noopmetric "go.opentelemetry.io/otel/metric/noop" + "go.opentelemetry.io/otel/trace" + embeddedtrace "go.opentelemetry.io/otel/trace/embedded" + nooptrace "go.opentelemetry.io/otel/trace/noop" + + "go.opentelemetry.io/collector/component" +) + +type mockMeter struct { + noopmetric.Meter + name string +} +type mockMeterProvider struct { + embeddedmetric.MeterProvider +} + +func (m mockMeterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter { + return mockMeter{name: name} +} + +type mockTracer struct { + nooptrace.Tracer + name string +} + +type mockTracerProvider struct { + embeddedtrace.TracerProvider +} + +func (m mockTracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { + return mockTracer{name: name} +} + +func TestProviders(t *testing.T) { + set := component.TelemetrySettings{ + MeterProvider: mockMeterProvider{}, + TracerProvider: mockTracerProvider{}, + } + + meter := Meter(set) + if m, ok := meter.(mockMeter); ok { + require.Equal(t, "go.opentelemetry.io/collector/receiver/nopreceiver", m.name) + } else { + require.Fail(t, "returned Meter not mockMeter") + } + + tracer := Tracer(set) + if m, ok := tracer.(mockTracer); ok { + require.Equal(t, "go.opentelemetry.io/collector/receiver/nopreceiver", m.name) + } else { + require.Fail(t, "returned Meter not mockTracer") + } +} diff --git a/receiver/nopreceiver/metadata.yaml b/receiver/nopreceiver/metadata.yaml new file mode 100644 index 00000000000..6a03166e73d --- /dev/null +++ b/receiver/nopreceiver/metadata.yaml @@ -0,0 +1,7 @@ +type: nop + +status: + class: receiver + stability: + beta: [traces, metrics, logs] + distributions: [core, contrib] diff --git a/receiver/nopreceiver/nop_receiver.go b/receiver/nopreceiver/nop_receiver.go new file mode 100644 index 00000000000..2463a89ef65 --- /dev/null +++ b/receiver/nopreceiver/nop_receiver.go @@ -0,0 +1,42 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package nopreceiver // import "go.opentelemetry.io/collector/receiver/nopreceiver" + +import ( + "context" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/receiver" + "go.opentelemetry.io/collector/receiver/nopreceiver/internal/metadata" +) + +// NewFactory returns a receiver.Factory that constructs nop receivers. +func NewFactory() receiver.Factory { + return receiver.NewFactory( + metadata.Type, + func() component.Config { return &struct{}{} }, + receiver.WithTraces(createTraces, metadata.TracesStability), + receiver.WithMetrics(createMetrics, metadata.MetricsStability), + receiver.WithLogs(createLogs, metadata.LogsStability)) +} + +func createTraces(context.Context, receiver.CreateSettings, component.Config, consumer.Traces) (receiver.Traces, error) { + return nopInstance, nil +} + +func createMetrics(context.Context, receiver.CreateSettings, component.Config, consumer.Metrics) (receiver.Metrics, error) { + return nopInstance, nil +} + +func createLogs(context.Context, receiver.CreateSettings, component.Config, consumer.Logs) (receiver.Logs, error) { + return nopInstance, nil +} + +var nopInstance = &nopReceiver{} + +type nopReceiver struct { + component.StartFunc + component.ShutdownFunc +} diff --git a/receiver/nopreceiver/nop_receiver_test.go b/receiver/nopreceiver/nop_receiver_test.go new file mode 100644 index 00000000000..31f78e10756 --- /dev/null +++ b/receiver/nopreceiver/nop_receiver_test.go @@ -0,0 +1,40 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package nopreceiver // import "go.opentelemetry.io/collector/receiver/nopreceiver" + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/receiver/receivertest" +) + +func TestNewNopFactory(t *testing.T) { + factory := NewFactory() + require.NotNil(t, factory) + assert.Equal(t, component.MustNewType("nop"), factory.Type()) + cfg := factory.CreateDefaultConfig() + assert.Equal(t, &struct{}{}, cfg) + + traces, err := factory.CreateTracesReceiver(context.Background(), receivertest.NewNopCreateSettings(), cfg, consumertest.NewNop()) + require.NoError(t, err) + assert.NoError(t, traces.Start(context.Background(), componenttest.NewNopHost())) + assert.NoError(t, traces.Shutdown(context.Background())) + + metrics, err := factory.CreateMetricsReceiver(context.Background(), receivertest.NewNopCreateSettings(), cfg, consumertest.NewNop()) + require.NoError(t, err) + assert.NoError(t, metrics.Start(context.Background(), componenttest.NewNopHost())) + assert.NoError(t, metrics.Shutdown(context.Background())) + + logs, err := factory.CreateLogsReceiver(context.Background(), receivertest.NewNopCreateSettings(), cfg, consumertest.NewNop()) + require.NoError(t, err) + assert.NoError(t, logs.Start(context.Background(), componenttest.NewNopHost())) + assert.NoError(t, logs.Shutdown(context.Background())) +} diff --git a/receiver/otlpreceiver/README.md b/receiver/otlpreceiver/README.md index 0d6e5ef5a2c..a5572071629 100644 --- a/receiver/otlpreceiver/README.md +++ b/receiver/otlpreceiver/README.md @@ -53,7 +53,7 @@ Several helper files are leveraged to provide additional capabilities automatica The OTLP receiver can receive trace export calls via HTTP/JSON in addition to gRPC. The HTTP/JSON address is the same as gRPC as the protocol is recognized -and processed accordingly. Note the serialization format needs to be [protobuf JSON](https://developers.google.com/protocol-buffers/docs/proto3#json). +and processed accordingly. Note the serialization format needs to be [OTLP JSON](https://opentelemetry.io/docs/specs/otlp/#json-protobuf-encoding). The HTTP/JSON configuration also provides `traces_url_path`, `metrics_url_path`, and `logs_url_path` configuration to allow the URL paths that signal data needs to be sent to be modified per signal type. These default to diff --git a/receiver/otlpreceiver/config_test.go b/receiver/otlpreceiver/config_test.go index 031d8943cc3..9604d507812 100644 --- a/receiver/otlpreceiver/config_test.go +++ b/receiver/otlpreceiver/config_test.go @@ -89,10 +89,10 @@ func TestUnmarshalConfig(t *testing.T) { GRPC: &configgrpc.ServerConfig{ NetAddr: confignet.AddrConfig{ Endpoint: "0.0.0.0:4317", - Transport: "tcp", + Transport: confignet.TransportTypeTCP, }, TLSSetting: &configtls.ServerConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CertFile: "test.crt", KeyFile: "test.key", }, @@ -119,7 +119,7 @@ func TestUnmarshalConfig(t *testing.T) { ServerConfig: &confighttp.ServerConfig{ Endpoint: "0.0.0.0:4318", TLSSetting: &configtls.ServerConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CertFile: "test.crt", KeyFile: "test.key", }, @@ -150,7 +150,7 @@ func TestUnmarshalConfigUnix(t *testing.T) { GRPC: &configgrpc.ServerConfig{ NetAddr: confignet.AddrConfig{ Endpoint: "/tmp/grpc_otlp.sock", - Transport: "unix", + Transport: confignet.TransportTypeUnix, }, ReadBufferSize: 512 * 1024, }, diff --git a/receiver/otlpreceiver/factory.go b/receiver/otlpreceiver/factory.go index 3e1df39032b..4b148c40be3 100644 --- a/receiver/otlpreceiver/factory.go +++ b/receiver/otlpreceiver/factory.go @@ -44,7 +44,7 @@ func createDefaultConfig() component.Config { GRPC: &configgrpc.ServerConfig{ NetAddr: confignet.AddrConfig{ Endpoint: localhostgate.EndpointForPort(grpcPort), - Transport: "tcp", + Transport: confignet.TransportTypeTCP, }, // We almost write 0 bytes, so no need to tune WriteBufferSize. ReadBufferSize: 512 * 1024, diff --git a/receiver/otlpreceiver/factory_test.go b/receiver/otlpreceiver/factory_test.go index 21a3a051f27..d844760947f 100644 --- a/receiver/otlpreceiver/factory_test.go +++ b/receiver/otlpreceiver/factory_test.go @@ -55,7 +55,7 @@ func TestCreateTracesReceiver(t *testing.T) { defaultGRPCSettings := &configgrpc.ServerConfig{ NetAddr: confignet.AddrConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), - Transport: "tcp", + Transport: confignet.TransportTypeTCP, }, } defaultHTTPSettings := &HTTPConfig{ @@ -91,7 +91,7 @@ func TestCreateTracesReceiver(t *testing.T) { GRPC: &configgrpc.ServerConfig{ NetAddr: confignet.AddrConfig{ Endpoint: "localhost:112233", - Transport: "tcp", + Transport: confignet.TransportTypeTCP, }, }, HTTP: defaultHTTPSettings, @@ -149,7 +149,7 @@ func TestCreateMetricReceiver(t *testing.T) { defaultGRPCSettings := &configgrpc.ServerConfig{ NetAddr: confignet.AddrConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), - Transport: "tcp", + Transport: confignet.TransportTypeTCP, }, } defaultHTTPSettings := &HTTPConfig{ @@ -185,7 +185,7 @@ func TestCreateMetricReceiver(t *testing.T) { GRPC: &configgrpc.ServerConfig{ NetAddr: confignet.AddrConfig{ Endpoint: "327.0.0.1:1122", - Transport: "tcp", + Transport: confignet.TransportTypeTCP, }, }, HTTP: defaultHTTPSettings, @@ -243,7 +243,7 @@ func TestCreateLogReceiver(t *testing.T) { defaultGRPCSettings := &configgrpc.ServerConfig{ NetAddr: confignet.AddrConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), - Transport: "tcp", + Transport: confignet.TransportTypeTCP, }, } defaultHTTPSettings := &HTTPConfig{ @@ -279,7 +279,7 @@ func TestCreateLogReceiver(t *testing.T) { GRPC: &configgrpc.ServerConfig{ NetAddr: confignet.AddrConfig{ Endpoint: "327.0.0.1:1122", - Transport: "tcp", + Transport: confignet.TransportTypeTCP, }, }, HTTP: defaultHTTPSettings, diff --git a/receiver/otlpreceiver/generated_component_test.go b/receiver/otlpreceiver/generated_component_test.go new file mode 100644 index 00000000000..e4c99be47ac --- /dev/null +++ b/receiver/otlpreceiver/generated_component_test.go @@ -0,0 +1,84 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package otlpreceiver + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/receiver" + "go.opentelemetry.io/collector/receiver/receivertest" +) + +func TestComponentFactoryType(t *testing.T) { + require.Equal(t, "otlp", NewFactory().Type().String()) +} + +func TestComponentConfigStruct(t *testing.T) { + require.NoError(t, componenttest.CheckConfigStruct(NewFactory().CreateDefaultConfig())) +} + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set receiver.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "logs", + createFn: func(ctx context.Context, set receiver.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateLogsReceiver(ctx, set, cfg, consumertest.NewNop()) + }, + }, + + { + name: "metrics", + createFn: func(ctx context.Context, set receiver.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsReceiver(ctx, set, cfg, consumertest.NewNop()) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set receiver.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesReceiver(ctx, set, cfg, consumertest.NewNop()) + }, + }, + } + + cm, err := confmaptest.LoadConf("metadata.yaml") + require.NoError(t, err) + cfg := factory.CreateDefaultConfig() + sub, err := cm.Sub("tests::config") + require.NoError(t, err) + require.NoError(t, component.UnmarshalConfig(sub, cfg)) + + for _, test := range tests { + t.Run(test.name+"-shutdown", func(t *testing.T) { + c, err := test.createFn(context.Background(), receivertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + firstRcvr, err := test.createFn(context.Background(), receivertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + require.NoError(t, err) + require.NoError(t, firstRcvr.Start(context.Background(), host)) + require.NoError(t, firstRcvr.Shutdown(context.Background())) + secondRcvr, err := test.createFn(context.Background(), receivertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondRcvr.Start(context.Background(), host)) + require.NoError(t, secondRcvr.Shutdown(context.Background())) + }) + } +} diff --git a/receiver/otlpreceiver/generated_package_test.go b/receiver/otlpreceiver/generated_package_test.go new file mode 100644 index 00000000000..5e08a4e06fc --- /dev/null +++ b/receiver/otlpreceiver/generated_package_test.go @@ -0,0 +1,13 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package otlpreceiver + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/receiver/otlpreceiver/go.mod b/receiver/otlpreceiver/go.mod index 0ff401c1840..b104a35ba7a 100644 --- a/receiver/otlpreceiver/go.mod +++ b/receiver/otlpreceiver/go.mod @@ -4,30 +4,31 @@ go 1.21 require ( github.com/gogo/protobuf v1.3.2 - github.com/klauspost/compress v1.17.7 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector v0.96.0 - go.opentelemetry.io/collector/component v0.96.0 - go.opentelemetry.io/collector/config/configgrpc v0.96.0 - go.opentelemetry.io/collector/config/confighttp v0.96.0 - go.opentelemetry.io/collector/config/confignet v0.96.0 - go.opentelemetry.io/collector/config/configtls v0.96.0 - go.opentelemetry.io/collector/confmap v0.96.0 - go.opentelemetry.io/collector/consumer v0.96.0 - go.opentelemetry.io/collector/pdata v1.3.0 - go.opentelemetry.io/collector/receiver v0.96.0 - go.opentelemetry.io/otel/metric v1.24.0 - go.opentelemetry.io/otel/trace v1.24.0 + github.com/klauspost/compress v1.17.8 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector v0.100.0 + go.opentelemetry.io/collector/component v0.100.0 + go.opentelemetry.io/collector/config/configgrpc v0.100.0 + go.opentelemetry.io/collector/config/confighttp v0.100.0 + go.opentelemetry.io/collector/config/confignet v0.100.0 + go.opentelemetry.io/collector/config/configtls v0.100.0 + go.opentelemetry.io/collector/confmap v0.100.0 + go.opentelemetry.io/collector/consumer v0.100.0 + go.opentelemetry.io/collector/pdata v1.7.0 + go.opentelemetry.io/collector/pdata/testdata v0.100.0 + go.opentelemetry.io/collector/receiver v0.100.0 + go.opentelemetry.io/otel/metric v1.26.0 + go.opentelemetry.io/otel/trace v1.26.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 - google.golang.org/grpc v1.62.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda + google.golang.org/grpc v1.63.2 + google.golang.org/protobuf v1.34.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect @@ -35,14 +36,14 @@ require ( github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect @@ -50,35 +51,38 @@ require ( github.com/mostynb/go-grpc-compression v1.2.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.19.0 // indirect - github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rs/cors v1.10.1 // indirect - go.opentelemetry.io/collector/config/configauth v0.96.0 // indirect - go.opentelemetry.io/collector/config/configcompression v0.96.0 // indirect - go.opentelemetry.io/collector/config/configopaque v1.3.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect - go.opentelemetry.io/collector/config/internal v0.96.0 // indirect - go.opentelemetry.io/collector/extension v0.96.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.96.0 // indirect - go.opentelemetry.io/collector/featuregate v1.3.0 // indirect - go.opentelemetry.io/contrib/config v0.4.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect - go.opentelemetry.io/otel v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 // indirect - go.opentelemetry.io/otel/sdk v1.24.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.24.0 // indirect - go.opentelemetry.io/proto/otlp v1.1.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.100.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.7.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.7.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect + go.opentelemetry.io/collector/config/internal v0.100.0 // indirect + go.opentelemetry.io/collector/extension v0.100.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.100.0 // indirect + go.opentelemetry.io/collector/featuregate v1.7.0 // indirect + go.opentelemetry.io/contrib/config v0.6.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 // indirect + go.opentelemetry.io/otel v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 // indirect + go.opentelemetry.io/otel/sdk v1.26.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + go.opentelemetry.io/proto/otlp v1.2.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/sys v0.17.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -114,6 +118,8 @@ replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/pdata => ../../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + replace go.opentelemetry.io/collector/receiver => ../ replace go.opentelemetry.io/collector/consumer => ../../consumer diff --git a/receiver/otlpreceiver/go.sum b/receiver/otlpreceiver/go.sum index 6dc69bb0e99..ee0cdcbf90e 100644 --- a/receiver/otlpreceiver/go.sum +++ b/receiver/otlpreceiver/go.sum @@ -1,20 +1,12 @@ -cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= -cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= -cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 h1:aRVqY1p2IJaBGStWMsQMpkAa83cPkCDLl80eOj0Rbz4= -cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68/go.mod h1:1a3eRNYX12fs5UABBIXS8HXVvQbX9hRB/RkEBPORpe8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= -github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= 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= -github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= -github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= @@ -28,31 +20,29 @@ github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsM github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= +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/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= -github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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= @@ -72,50 +62,56 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= -go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 h1:UNQQKPfTDe1J81ViolILjTKPr9WetKW6uei2hFgJmFs= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 h1:Mw5xcxMwlqoJd97vwPxA8isEaIoxsta9/Q51+TTJLGE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0/go.mod h1:CQNu9bj7o7mC6U7+CA/schKEYakYXWr79ucDHTMGhCM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 h1:s0PHtIkN+3xrbDOpt2M8OTG92cWqUESvzh2MxiR5xY8= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0/go.mod h1:hZlFbDbRt++MMPCCfSJfmhkGIWnX1h3XjkfxZUjLrIA= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= -go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= -go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= -go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= +go.opentelemetry.io/contrib/config v0.6.0 h1:M1SRD1Z15XHPGk61tMLI1up77XT5FdrqQSRrlH0fYuk= +go.opentelemetry.io/contrib/config v0.6.0/go.mod h1:t+/kzmRWLN7J+4F/dD4fFvlYCmCO63WYwy/B00IC++c= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 h1:A3SayB3rNyt+1S6qpI9mHPkeHTZbD7XILEqWnYZb2l0= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0/go.mod h1:27iA5uvhuRNmalO+iEUdVn5ZMj2qy10Mm+XRIpRmyuU= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 h1:Xs2Ncz0gNihqu9iosIZ5SkBbWo5T8JhhLJFMQL1qmLI= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0/go.mod h1:vy+2G/6NvVMpwGX/NyLqcC41fxepnuKHk16E6IZUcJc= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 h1:+hm+I+KigBy3M24/h1p/NHkUx/evbLH0PNcjpMyCHc4= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0/go.mod h1:NjC8142mLvvNT6biDpaMjyz78kyEHIwAJlSX0N9P5KI= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 h1:HGZWGmCVRCVyAs2GQaiHQPbDHo+ObFWeUEOd+zDnp64= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0/go.mod h1:SaH+v38LSCHddyk7RGlU9uZyQoRrKao6IBnJw6Kbn+c= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 h1:1u/AyyOqAWzy+SkPxDpahCNZParHV8Vid1RnI2clyDE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0/go.mod h1:z46paqbJ9l7c9fIPCXTqTGwhQZ5XoTIsfeFYWboizjs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 h1:Waw9Wfpo/IXzOI8bCB7DIk+0JZcqqsyn1JFnAc+iam8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0/go.mod h1:wnJIG4fOqyynOnnQF/eQb4/16VlX2EJAHhHgqIqWfAo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 h1:1wp/gyxsuYtuE/JFxsQRtcCDtMrO2qMvlfXALU5wkzI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0/go.mod h1:gbTHmghkGgqxMomVQQMur1Nba4M0MQ8AYThXDUjsJ38= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 h1:5fnmgteaar1VcAA69huatudPduNFz7guRtCmfZCooZI= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0/go.mod h1:lsPccfZiz1cb1AhBPmicWM2E4F1VynFXEvD8SEBS4TM= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 h1:0W5o9SzoR15ocYHEQfvfipzcNog1lBxOLfnex91Hk6s= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0/go.mod h1:zVZ8nz+VSggWmnh6tTsJqXQ7rU4xLwRtna1M4x5jq58= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= +go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -131,18 +127,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= -golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= -golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -155,20 +149,16 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/receiver/otlpreceiver/internal/errors/errors.go b/receiver/otlpreceiver/internal/errors/errors.go index ee9d79e1c7c..0619b7aa8ea 100644 --- a/receiver/otlpreceiver/internal/errors/errors.go +++ b/receiver/otlpreceiver/internal/errors/errors.go @@ -4,6 +4,8 @@ package errors // import "go.opentelemetry.io/collector/receiver/otlpreceiver/internal/errors" import ( + "net/http" + "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -24,3 +26,21 @@ func GetStatusFromError(err error) error { } return s.Err() } + +func GetHTTPStatusCodeFromStatus(s *status.Status) int { + // See https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specification.md#failures + // to see if a code is retryable. + // See https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specification.md#failures-1 + // to see a list of retryable http status codes. + switch s.Code() { + // Retryable + case codes.Canceled, codes.DeadlineExceeded, codes.Aborted, codes.OutOfRange, codes.Unavailable, codes.DataLoss: + return http.StatusServiceUnavailable + // Retryable + case codes.ResourceExhausted: + return http.StatusTooManyRequests + // Not Retryable + default: + return http.StatusInternalServerError + } +} diff --git a/receiver/otlpreceiver/internal/errors/errors_test.go b/receiver/otlpreceiver/internal/errors/errors_test.go index c75b5bf041f..35d8255ffcf 100644 --- a/receiver/otlpreceiver/internal/errors/errors_test.go +++ b/receiver/otlpreceiver/internal/errors/errors_test.go @@ -5,6 +5,7 @@ package errors // import "go.opentelemetry.io/collector/receiver/otlpreceiver/in import ( "fmt" + "net/http" "testing" "github.com/stretchr/testify/assert" @@ -43,3 +44,33 @@ func Test_GetStatusFromError(t *testing.T) { }) } } + +func Test_GetHTTPStatusCodeFromStatus(t *testing.T) { + tests := []struct { + name string + input *status.Status + expected int + }{ + { + name: "Retryable Status", + input: status.New(codes.Unavailable, "test"), + expected: http.StatusServiceUnavailable, + }, + { + name: "Non-retryable Status", + input: status.New(codes.InvalidArgument, "test"), + expected: http.StatusInternalServerError, + }, + { + name: "Specifically 429", + input: status.New(codes.ResourceExhausted, "test"), + expected: http.StatusTooManyRequests, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + result := GetHTTPStatusCodeFromStatus(tt.input) + assert.Equal(t, tt.expected, result) + }) + } +} diff --git a/receiver/otlpreceiver/internal/logs/otlp_test.go b/receiver/otlpreceiver/internal/logs/otlp_test.go index b2d3178d011..cc87f527681 100644 --- a/receiver/otlpreceiver/internal/logs/otlp_test.go +++ b/receiver/otlpreceiver/internal/logs/otlp_test.go @@ -20,8 +20,8 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/plog/plogotlp" + "go.opentelemetry.io/collector/pdata/testdata" "go.opentelemetry.io/collector/receiver/receiverhelper" "go.opentelemetry.io/collector/receiver/receivertest" ) @@ -74,7 +74,7 @@ func TestExport_PermanentErrorConsumer(t *testing.T) { func makeLogsServiceClient(t *testing.T, lc consumer.Logs) plogotlp.GRPCClient { addr := otlpReceiverOnGRPCServer(t, lc) - cc, err := grpc.Dial(addr.String(), grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) + cc, err := grpc.NewClient(addr.String(), grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) require.NoError(t, err, "Failed to create the TraceServiceClient: %v", err) t.Cleanup(func() { require.NoError(t, cc.Close()) diff --git a/receiver/otlpreceiver/internal/metadata/generated_status.go b/receiver/otlpreceiver/internal/metadata/generated_status.go index aa5483d7b5a..c9cff844fa2 100644 --- a/receiver/otlpreceiver/internal/metadata/generated_status.go +++ b/receiver/otlpreceiver/internal/metadata/generated_status.go @@ -3,15 +3,11 @@ package metadata import ( - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" ) var ( - Type = component.MustNewType("otlp") - scopeName = "go.opentelemetry.io/collector/receiver/otlpreceiver" + Type = component.MustNewType("otlp") ) const ( @@ -19,11 +15,3 @@ const ( TracesStability = component.StabilityLevelStable MetricsStability = component.StabilityLevelStable ) - -func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter(scopeName) -} - -func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer(scopeName) -} diff --git a/receiver/otlpreceiver/internal/metadata/generated_telemetry.go b/receiver/otlpreceiver/internal/metadata/generated_telemetry.go new file mode 100644 index 00000000000..6115bffcf56 --- /dev/null +++ b/receiver/otlpreceiver/internal/metadata/generated_telemetry.go @@ -0,0 +1,18 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("go.opentelemetry.io/collector/receiver/otlpreceiver") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/receiver/otlpreceiver") +} diff --git a/receiver/otlpreceiver/internal/metadata/generated_telemetry_test.go b/receiver/otlpreceiver/internal/metadata/generated_telemetry_test.go new file mode 100644 index 00000000000..155056b256a --- /dev/null +++ b/receiver/otlpreceiver/internal/metadata/generated_telemetry_test.go @@ -0,0 +1,63 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/otel/metric" + embeddedmetric "go.opentelemetry.io/otel/metric/embedded" + noopmetric "go.opentelemetry.io/otel/metric/noop" + "go.opentelemetry.io/otel/trace" + embeddedtrace "go.opentelemetry.io/otel/trace/embedded" + nooptrace "go.opentelemetry.io/otel/trace/noop" + + "go.opentelemetry.io/collector/component" +) + +type mockMeter struct { + noopmetric.Meter + name string +} +type mockMeterProvider struct { + embeddedmetric.MeterProvider +} + +func (m mockMeterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter { + return mockMeter{name: name} +} + +type mockTracer struct { + nooptrace.Tracer + name string +} + +type mockTracerProvider struct { + embeddedtrace.TracerProvider +} + +func (m mockTracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { + return mockTracer{name: name} +} + +func TestProviders(t *testing.T) { + set := component.TelemetrySettings{ + MeterProvider: mockMeterProvider{}, + TracerProvider: mockTracerProvider{}, + } + + meter := Meter(set) + if m, ok := meter.(mockMeter); ok { + require.Equal(t, "go.opentelemetry.io/collector/receiver/otlpreceiver", m.name) + } else { + require.Fail(t, "returned Meter not mockMeter") + } + + tracer := Tracer(set) + if m, ok := tracer.(mockTracer); ok { + require.Equal(t, "go.opentelemetry.io/collector/receiver/otlpreceiver", m.name) + } else { + require.Fail(t, "returned Meter not mockTracer") + } +} diff --git a/receiver/otlpreceiver/internal/metrics/otlp_test.go b/receiver/otlpreceiver/internal/metrics/otlp_test.go index babc366119f..accd6102e27 100644 --- a/receiver/otlpreceiver/internal/metrics/otlp_test.go +++ b/receiver/otlpreceiver/internal/metrics/otlp_test.go @@ -20,8 +20,8 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp" + "go.opentelemetry.io/collector/pdata/testdata" "go.opentelemetry.io/collector/receiver/receiverhelper" "go.opentelemetry.io/collector/receiver/receivertest" ) @@ -75,7 +75,7 @@ func TestExport_PermanentErrorConsumer(t *testing.T) { func makeMetricsServiceClient(t *testing.T, mc consumer.Metrics) pmetricotlp.GRPCClient { addr := otlpReceiverOnGRPCServer(t, mc) - cc, err := grpc.Dial(addr.String(), grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) + cc, err := grpc.NewClient(addr.String(), grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) require.NoError(t, err, "Failed to create the MetricsServiceClient: %v", err) t.Cleanup(func() { require.NoError(t, cc.Close()) diff --git a/receiver/otlpreceiver/internal/trace/otlp_test.go b/receiver/otlpreceiver/internal/trace/otlp_test.go index 58bfc61f4fc..f0dab89069d 100644 --- a/receiver/otlpreceiver/internal/trace/otlp_test.go +++ b/receiver/otlpreceiver/internal/trace/otlp_test.go @@ -20,8 +20,8 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp" + "go.opentelemetry.io/collector/pdata/testdata" "go.opentelemetry.io/collector/receiver/receiverhelper" "go.opentelemetry.io/collector/receiver/receivertest" ) @@ -71,7 +71,7 @@ func TestExport_PermanentErrorConsumer(t *testing.T) { func makeTraceServiceClient(t *testing.T, tc consumer.Traces) ptraceotlp.GRPCClient { addr := otlpReceiverOnGRPCServer(t, tc) - cc, err := grpc.Dial(addr.String(), grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) + cc, err := grpc.NewClient(addr.String(), grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) require.NoError(t, err, "Failed to create the TraceServiceClient: %v", err) t.Cleanup(func() { require.NoError(t, cc.Close()) diff --git a/receiver/otlpreceiver/otlp.go b/receiver/otlpreceiver/otlp.go index 91936bfb6a5..43eed9b821a 100644 --- a/receiver/otlpreceiver/otlp.go +++ b/receiver/otlpreceiver/otlp.go @@ -83,7 +83,7 @@ func (r *otlpReceiver) startGRPCServer(host component.Host) error { } var err error - if r.serverGRPC, err = r.cfg.GRPC.ToServerContext(context.Background(), host, r.settings.TelemetrySettings); err != nil { + if r.serverGRPC, err = r.cfg.GRPC.ToServer(context.Background(), host, r.settings.TelemetrySettings); err != nil { return err } @@ -116,7 +116,7 @@ func (r *otlpReceiver) startGRPCServer(host component.Host) error { return nil } -func (r *otlpReceiver) startHTTPServer(host component.Host) error { +func (r *otlpReceiver) startHTTPServer(ctx context.Context, host component.Host) error { // If HTTP is not enabled, nothing to start. if r.cfg.HTTP == nil { return nil @@ -145,13 +145,13 @@ func (r *otlpReceiver) startHTTPServer(host component.Host) error { } var err error - if r.serverHTTP, err = r.cfg.HTTP.ToServer(host, r.settings.TelemetrySettings, httpMux, confighttp.WithErrorHandler(errorHandler)); err != nil { + if r.serverHTTP, err = r.cfg.HTTP.ToServer(ctx, host, r.settings.TelemetrySettings, httpMux, confighttp.WithErrorHandler(errorHandler)); err != nil { return err } r.settings.Logger.Info("Starting HTTP server", zap.String("endpoint", r.cfg.HTTP.ServerConfig.Endpoint)) var hln net.Listener - if hln, err = r.cfg.HTTP.ServerConfig.ToListener(); err != nil { + if hln, err = r.cfg.HTTP.ServerConfig.ToListener(ctx); err != nil { return err } @@ -172,7 +172,7 @@ func (r *otlpReceiver) Start(ctx context.Context, host component.Host) error { if err := r.startGRPCServer(host); err != nil { return err } - if err := r.startHTTPServer(host); err != nil { + if err := r.startHTTPServer(ctx, host); err != nil { // It's possible that a valid GRPC server configuration was specified, // but an invalid HTTP configuration. If that's the case, the successfully // started GRPC server must be shutdown to ensure no goroutines are leaked. diff --git a/receiver/otlpreceiver/otlp_test.go b/receiver/otlpreceiver/otlp_test.go index 85b261cd6af..1920ac8de91 100644 --- a/receiver/otlpreceiver/otlp_test.go +++ b/receiver/otlpreceiver/otlp_test.go @@ -37,12 +37,12 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/internal/testutil" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" "go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp" + "go.opentelemetry.io/collector/pdata/testdata" "go.opentelemetry.io/collector/receiver/receivertest" ) @@ -52,10 +52,12 @@ var otlpReceiverID = component.MustNewIDWithName("otlp", otlpReceiverName) func TestJsonHttp(t *testing.T) { tests := []struct { - name string - encoding string - contentType string - err error + name string + encoding string + contentType string + err error + expectedStatus *spb.Status + expectedStatusCode int }{ { name: "JSONUncompressed", @@ -83,16 +85,36 @@ func TestJsonHttp(t *testing.T) { contentType: "application/json", }, { - name: "NotGRPCError", - encoding: "", - contentType: "application/json", - err: errors.New("my error"), + name: "Permanent NotGRPCError", + encoding: "", + contentType: "application/json", + err: consumererror.NewPermanent(errors.New("my error")), + expectedStatus: &spb.Status{Code: int32(codes.Internal), Message: "Permanent error: my error"}, + expectedStatusCode: http.StatusInternalServerError, }, { - name: "GRPCError", - encoding: "", - contentType: "application/json", - err: status.New(codes.Unavailable, "").Err(), + name: "Retryable NotGRPCError", + encoding: "", + contentType: "application/json", + err: errors.New("my error"), + expectedStatus: &spb.Status{Code: int32(codes.Unavailable), Message: "my error"}, + expectedStatusCode: http.StatusServiceUnavailable, + }, + { + name: "Permanent GRPCError", + encoding: "", + contentType: "application/json", + err: status.New(codes.InvalidArgument, "").Err(), + expectedStatus: &spb.Status{Code: int32(codes.InvalidArgument), Message: ""}, + expectedStatusCode: http.StatusInternalServerError, + }, + { + name: "Retryable GRPCError", + encoding: "", + contentType: "application/json", + err: status.New(codes.Unavailable, "").Err(), + expectedStatus: &spb.Status{Code: int32(codes.Unavailable), Message: ""}, + expectedStatusCode: http.StatusServiceUnavailable, }, } addr := testutil.GetAvailableLocalAddress(t) @@ -108,7 +130,7 @@ func TestJsonHttp(t *testing.T) { for _, dr := range generateDataRequests(t) { url := "http://" + addr + dr.path - respBytes := doHTTPRequest(t, url, tt.encoding, tt.contentType, dr.jsonBytes, tt.err != nil) + respBytes := doHTTPRequest(t, url, tt.encoding, tt.contentType, dr.jsonBytes, tt.expectedStatusCode) if tt.err == nil { tr := ptraceotlp.NewExportResponse() assert.NoError(t, tr.UnmarshalJSON(respBytes), "Unable to unmarshal response to Response") @@ -120,7 +142,7 @@ func TestJsonHttp(t *testing.T) { assert.True(t, proto.Equal(errStatus, s.Proto())) } else { fmt.Println(errStatus) - assert.True(t, proto.Equal(errStatus, &spb.Status{Code: int32(codes.Unavailable), Message: "my error"})) + assert.True(t, proto.Equal(errStatus, tt.expectedStatus)) } sink.checkData(t, dr.data, 0) } @@ -302,9 +324,11 @@ func TestHandleInvalidRequests(t *testing.T) { func TestProtoHttp(t *testing.T) { tests := []struct { - name string - encoding string - err error + name string + encoding string + err error + expectedStatus *spb.Status + expectedStatusCode int }{ { name: "ProtoUncompressed", @@ -319,14 +343,32 @@ func TestProtoHttp(t *testing.T) { encoding: "zstd", }, { - name: "NotGRPCError", - encoding: "", - err: errors.New("my error"), + name: "Permanent NotGRPCError", + encoding: "", + err: consumererror.NewPermanent(errors.New("my error")), + expectedStatus: &spb.Status{Code: int32(codes.Internal), Message: "Permanent error: my error"}, + expectedStatusCode: http.StatusInternalServerError, }, { - name: "GRPCError", - encoding: "", - err: status.New(codes.Unavailable, "").Err(), + name: "Retryable NotGRPCError", + encoding: "", + err: errors.New("my error"), + expectedStatus: &spb.Status{Code: int32(codes.Unavailable), Message: "my error"}, + expectedStatusCode: http.StatusServiceUnavailable, + }, + { + name: "Permanent GRPCError", + encoding: "", + err: status.New(codes.InvalidArgument, "").Err(), + expectedStatus: &spb.Status{Code: int32(codes.InvalidArgument), Message: ""}, + expectedStatusCode: http.StatusInternalServerError, + }, + { + name: "Retryable GRPCError", + encoding: "", + err: status.New(codes.Unavailable, "").Err(), + expectedStatus: &spb.Status{Code: int32(codes.Unavailable), Message: ""}, + expectedStatusCode: http.StatusServiceUnavailable, }, } addr := testutil.GetAvailableLocalAddress(t) @@ -345,7 +387,7 @@ func TestProtoHttp(t *testing.T) { for _, dr := range generateDataRequests(t) { url := "http://" + addr + dr.path - respBytes := doHTTPRequest(t, url, tt.encoding, "application/x-protobuf", dr.protoBytes, tt.err != nil) + respBytes := doHTTPRequest(t, url, tt.encoding, "application/x-protobuf", dr.protoBytes, tt.expectedStatusCode) if tt.err == nil { tr := ptraceotlp.NewExportResponse() assert.NoError(t, tr.UnmarshalProto(respBytes)) @@ -356,7 +398,7 @@ func TestProtoHttp(t *testing.T) { if s, ok := status.FromError(tt.err); ok { assert.True(t, proto.Equal(errStatus, s.Proto())) } else { - assert.True(t, proto.Equal(errStatus, &spb.Status{Code: int32(codes.Unavailable), Message: "my error"})) + assert.True(t, proto.Equal(errStatus, tt.expectedStatus)) } sink.checkData(t, dr.data, 0) } @@ -524,7 +566,7 @@ func TestOTLPReceiverGRPCTracesIngestTest(t *testing.T) { require.NoError(t, recv.Start(context.Background(), componenttest.NewNopHost())) t.Cleanup(func() { require.NoError(t, recv.Shutdown(context.Background())) }) - cc, err := grpc.Dial(addr, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) + cc, err := grpc.NewClient(addr, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) require.NoError(t, err) defer func() { assert.NoError(t, cc.Close()) @@ -552,7 +594,7 @@ func TestOTLPReceiverGRPCTracesIngestTest(t *testing.T) { require.NoError(t, tt.CheckReceiverTraces("grpc", int64(expectedReceivedBatches), int64(expectedIngestionBlockedRPCs))) } -// TestOTLPReceiverHTTPTracesNextConsumerResponse checks that the HTTP trace receiver +// TestOTLPReceiverHTTPTracesIngestTest checks that the HTTP trace receiver // is returning the proper response (return and metrics) when the next consumer // in the pipeline reports error. The test changes the responses returned by the // next trace consumer, checks if data was passed down the pipeline and if @@ -560,20 +602,30 @@ func TestOTLPReceiverGRPCTracesIngestTest(t *testing.T) { // trace receiver. func TestOTLPReceiverHTTPTracesIngestTest(t *testing.T) { type ingestionStateTest struct { - okToIngest bool - expectedCode codes.Code + okToIngest bool + err error + expectedCode codes.Code + expectedStatusCode int } expectedReceivedBatches := 2 - expectedIngestionBlockedRPCs := 1 + expectedIngestionBlockedRPCs := 2 ingestionStates := []ingestionStateTest{ { okToIngest: true, expectedCode: codes.OK, }, { - okToIngest: false, - expectedCode: codes.Unavailable, + okToIngest: false, + err: consumererror.NewPermanent(errors.New("consumer error")), + expectedCode: codes.Internal, + expectedStatusCode: http.StatusInternalServerError, + }, + { + okToIngest: false, + err: errors.New("consumer error"), + expectedCode: codes.Unavailable, + expectedStatusCode: http.StatusServiceUnavailable, }, { okToIngest: true, @@ -599,7 +651,7 @@ func TestOTLPReceiverHTTPTracesIngestTest(t *testing.T) { if ingestionState.okToIngest { sink.SetConsumeError(nil) } else { - sink.SetConsumeError(errors.New("consumer error")) + sink.SetConsumeError(ingestionState.err) } pbMarshaler := ptrace.ProtoMarshaler{} @@ -620,7 +672,7 @@ func TestOTLPReceiverHTTPTracesIngestTest(t *testing.T) { } else { errStatus := &spb.Status{} assert.NoError(t, proto.Unmarshal(respBytes, errStatus)) - assert.Equal(t, http.StatusInternalServerError, resp.StatusCode) + assert.Equal(t, ingestionState.expectedStatusCode, resp.StatusCode) assert.Equal(t, ingestionState.expectedCode, codes.Code(errStatus.Code)) } } @@ -636,10 +688,10 @@ func TestGRPCInvalidTLSCredentials(t *testing.T) { GRPC: &configgrpc.ServerConfig{ NetAddr: confignet.AddrConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), - Transport: "tcp", + Transport: confignet.TransportTypeTCP, }, TLSSetting: &configtls.ServerConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CertFile: "willfail", }, }, @@ -670,7 +722,7 @@ func TestGRPCMaxRecvSize(t *testing.T) { recv := newReceiver(t, componenttest.NewNopTelemetrySettings(), cfg, otlpReceiverID, sink) require.NoError(t, recv.Start(context.Background(), componenttest.NewNopHost())) - cc, err := grpc.Dial(addr, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) + cc, err := grpc.NewClient(addr, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) require.NoError(t, err) td := testdata.GenerateTraces(50000) @@ -683,7 +735,7 @@ func TestGRPCMaxRecvSize(t *testing.T) { require.NoError(t, recv.Start(context.Background(), componenttest.NewNopHost())) t.Cleanup(func() { require.NoError(t, recv.Shutdown(context.Background())) }) - cc, err = grpc.Dial(addr, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) + cc, err = grpc.NewClient(addr, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) require.NoError(t, err) defer func() { assert.NoError(t, cc.Close()) @@ -702,7 +754,7 @@ func TestHTTPInvalidTLSCredentials(t *testing.T) { ServerConfig: &confighttp.ServerConfig{ Endpoint: testutil.GetAvailableLocalAddress(t), TLSSetting: &configtls.ServerConfig{ - TLSSetting: configtls.Config{ + Config: configtls.Config{ CertFile: "willfail", }, }, @@ -853,7 +905,7 @@ func doHTTPRequest( encoding string, contentType string, data []byte, - expectErr bool, + expectStatusCode int, ) []byte { req := createHTTPRequest(t, url, encoding, contentType, data) resp, err := http.DefaultClient.Do(req) @@ -866,10 +918,10 @@ func doHTTPRequest( // For cases like "application/json; charset=utf-8", the response will be only "application/json" require.True(t, strings.HasPrefix(strings.ToLower(contentType), resp.Header.Get("Content-Type"))) - if !expectErr { + if expectStatusCode == 0 { require.Equal(t, http.StatusOK, resp.StatusCode) } else { - require.Equal(t, http.StatusInternalServerError, resp.StatusCode) + require.Equal(t, expectStatusCode, resp.StatusCode) } return respBytes @@ -956,7 +1008,7 @@ func TestShutdown(t *testing.T) { require.NotNil(t, r) require.NoError(t, r.Start(context.Background(), componenttest.NewNopHost())) - conn, err := grpc.Dial(endpointGrpc, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) + conn, err := grpc.NewClient(endpointGrpc, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, conn.Close()) diff --git a/receiver/otlpreceiver/otlphttp.go b/receiver/otlpreceiver/otlphttp.go index dca42737052..b895b8d2e7c 100644 --- a/receiver/otlpreceiver/otlphttp.go +++ b/receiver/otlpreceiver/otlphttp.go @@ -10,9 +10,10 @@ import ( "net/http" spb "google.golang.org/genproto/googleapis/rpc/status" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "go.opentelemetry.io/collector/internal/httphelper" + "go.opentelemetry.io/collector/receiver/otlpreceiver/internal/errors" "go.opentelemetry.io/collector/receiver/otlpreceiver/internal/logs" "go.opentelemetry.io/collector/receiver/otlpreceiver/internal/metrics" "go.opentelemetry.io/collector/receiver/otlpreceiver/internal/trace" @@ -149,8 +150,10 @@ func readAndCloseBody(resp http.ResponseWriter, req *http.Request, enc encoder) // writeError encodes the HTTP error inside a rpc.Status message as required by the OTLP protocol. func writeError(w http.ResponseWriter, encoder encoder, err error, statusCode int) { s, ok := status.FromError(err) - if !ok { - s = errorMsgToStatus(err.Error(), statusCode) + if ok { + statusCode = errors.GetHTTPStatusCodeFromStatus(s) + } else { + s = httphelper.NewStatusFromMsgAndHTTPCode(err.Error(), statusCode) } writeStatusResponse(w, encoder, statusCode, s.Proto()) } @@ -158,7 +161,7 @@ func writeError(w http.ResponseWriter, encoder encoder, err error, statusCode in // errorHandler encodes the HTTP error message inside a rpc.Status message as required // by the OTLP protocol. func errorHandler(w http.ResponseWriter, r *http.Request, errMsg string, statusCode int) { - s := errorMsgToStatus(errMsg, statusCode) + s := httphelper.NewStatusFromMsgAndHTTPCode(errMsg, statusCode) switch getMimeTypeFromContentType(r.Header.Get("Content-Type")) { case pbContentType: writeStatusResponse(w, pbEncoder, statusCode, s.Proto()) @@ -187,13 +190,6 @@ func writeResponse(w http.ResponseWriter, contentType string, statusCode int, ms _, _ = w.Write(msg) } -func errorMsgToStatus(errMsg string, statusCode int) *status.Status { - if statusCode == http.StatusBadRequest { - return status.New(codes.InvalidArgument, errMsg) - } - return status.New(codes.Unknown, errMsg) -} - func getMimeTypeFromContentType(contentType string) string { mediatype, _, err := mime.ParseMediaType(contentType) if err != nil { diff --git a/receiver/otlpreceiver/package_test.go b/receiver/otlpreceiver/package_test.go deleted file mode 100644 index 9d49b5c8f7b..00000000000 --- a/receiver/otlpreceiver/package_test.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package otlpreceiver - -import ( - "testing" - - "go.uber.org/goleak" -) - -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/open-telemetry/opentelemetry-collector/issues/9165#issuecomment-1874836336 for more context. -func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) -} diff --git a/receiver/receiverhelper/obsreport.go b/receiver/receiverhelper/obsreport.go index d70f6789157..ae1422b68f1 100644 --- a/receiver/receiverhelper/obsreport.go +++ b/receiver/receiverhelper/obsreport.go @@ -20,7 +20,7 @@ import ( ) const ( - receiverScope = obsmetrics.Scope + obsmetrics.NameSep + obsmetrics.ReceiverKey + receiverScope = obsmetrics.Scope + obsmetrics.SpanNameSep + obsmetrics.ReceiverKey ) // ObsReport is a helper to add observability to a receiver. @@ -88,42 +88,42 @@ func (rec *ObsReport) createOtelMetrics() error { var errors, err error rec.acceptedSpansCounter, err = rec.meter.Int64Counter( - obsmetrics.ReceiverPrefix+obsmetrics.AcceptedSpansKey, + obsmetrics.ReceiverMetricPrefix+obsmetrics.AcceptedSpansKey, metric.WithDescription("Number of spans successfully pushed into the pipeline."), metric.WithUnit("1"), ) errors = multierr.Append(errors, err) rec.refusedSpansCounter, err = rec.meter.Int64Counter( - obsmetrics.ReceiverPrefix+obsmetrics.RefusedSpansKey, + obsmetrics.ReceiverMetricPrefix+obsmetrics.RefusedSpansKey, metric.WithDescription("Number of spans that could not be pushed into the pipeline."), metric.WithUnit("1"), ) errors = multierr.Append(errors, err) rec.acceptedMetricPointsCounter, err = rec.meter.Int64Counter( - obsmetrics.ReceiverPrefix+obsmetrics.AcceptedMetricPointsKey, + obsmetrics.ReceiverMetricPrefix+obsmetrics.AcceptedMetricPointsKey, metric.WithDescription("Number of metric points successfully pushed into the pipeline."), metric.WithUnit("1"), ) errors = multierr.Append(errors, err) rec.refusedMetricPointsCounter, err = rec.meter.Int64Counter( - obsmetrics.ReceiverPrefix+obsmetrics.RefusedMetricPointsKey, + obsmetrics.ReceiverMetricPrefix+obsmetrics.RefusedMetricPointsKey, metric.WithDescription("Number of metric points that could not be pushed into the pipeline."), metric.WithUnit("1"), ) errors = multierr.Append(errors, err) rec.acceptedLogRecordsCounter, err = rec.meter.Int64Counter( - obsmetrics.ReceiverPrefix+obsmetrics.AcceptedLogRecordsKey, + obsmetrics.ReceiverMetricPrefix+obsmetrics.AcceptedLogRecordsKey, metric.WithDescription("Number of log records successfully pushed into the pipeline."), metric.WithUnit("1"), ) errors = multierr.Append(errors, err) rec.refusedLogRecordsCounter, err = rec.meter.Int64Counter( - obsmetrics.ReceiverPrefix+obsmetrics.RefusedLogRecordsKey, + obsmetrics.ReceiverMetricPrefix+obsmetrics.RefusedLogRecordsKey, metric.WithDescription("Number of log records that could not be pushed into the pipeline."), metric.WithUnit("1"), ) diff --git a/receiver/receivertest/contract_checker.go b/receiver/receivertest/contract_checker.go index 37dd68b7f80..6951b5f41f4 100644 --- a/receiver/receivertest/contract_checker.go +++ b/receiver/receivertest/contract_checker.go @@ -390,7 +390,7 @@ func (m *mockConsumer) ConsumeMetrics(_ context.Context, data pmetric.Metrics) e return m.consume(ids) } -// idSetFromLogs computes an idSet from given pmetric.Metrics. The idSet will contain ids of all metric data points. +// idSetFromMetrics computes an idSet from given pmetric.Metrics. The idSet will contain ids of all metric data points. func idSetFromMetrics(data pmetric.Metrics) (idSet, error) { ds := map[UniqueIDAttrVal]bool{} rss := data.ResourceMetrics() diff --git a/receiver/receivertest/nop_receiver.go b/receiver/receivertest/nop_receiver.go index 0c7cee87cf3..e9cec06ca1b 100644 --- a/receiver/receivertest/nop_receiver.go +++ b/receiver/receivertest/nop_receiver.go @@ -6,33 +6,56 @@ package receivertest // import "go.opentelemetry.io/collector/receiver/receivert import ( "context" + "github.com/google/uuid" + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver" ) -var componentType = component.MustNewType("nop") +var defaultComponentType = component.MustNewType("nop") // NewNopCreateSettings returns a new nop settings for Create*Receiver functions. func NewNopCreateSettings() receiver.CreateSettings { return receiver.CreateSettings{ - ID: component.NewID(componentType), + ID: component.NewIDWithName(defaultComponentType, uuid.NewString()), TelemetrySettings: componenttest.NewNopTelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo(), } } -// NewNopFactory returns a receiver.Factory that constructs nop receivers. +// NewNopFactory returns a receiver.Factory that constructs nop receivers supporting all data types. func NewNopFactory() receiver.Factory { return receiver.NewFactory( - componentType, + defaultComponentType, func() component.Config { return &nopConfig{} }, receiver.WithTraces(createTraces, component.StabilityLevelStable), receiver.WithMetrics(createMetrics, component.StabilityLevelStable), receiver.WithLogs(createLogs, component.StabilityLevelStable)) } +// NewNopFactoryForType returns a receiver.Factory that constructs nop receivers supporting only the +// given data type. +func NewNopFactoryForType(dataType component.DataType) receiver.Factory { + var factoryOpt receiver.FactoryOption + switch dataType { + case component.DataTypeTraces: + factoryOpt = receiver.WithTraces(createTraces, component.StabilityLevelStable) + case component.DataTypeMetrics: + factoryOpt = receiver.WithMetrics(createMetrics, component.StabilityLevelStable) + case component.DataTypeLogs: + factoryOpt = receiver.WithLogs(createLogs, component.StabilityLevelStable) + default: + panic("unsupported data type for creating nop receiver factory: " + dataType.String()) + } + + componentType := component.MustNewType(defaultComponentType.String() + "_" + dataType.String()) + return receiver.NewFactory(componentType, func() component.Config { return &nopConfig{} }, factoryOpt) +} + +type nopConfig struct{} + func createTraces(context.Context, receiver.CreateSettings, component.Config, consumer.Traces) (receiver.Traces, error) { return nopInstance, nil } @@ -45,8 +68,6 @@ func createLogs(context.Context, receiver.CreateSettings, component.Config, cons return nopInstance, nil } -type nopConfig struct{} - var nopInstance = &nopReceiver{} // nopReceiver acts as a receiver for testing purposes. @@ -59,6 +80,6 @@ type nopReceiver struct { func NewNopBuilder() *receiver.Builder { nopFactory := NewNopFactory() return receiver.NewBuilder( - map[component.ID]component.Config{component.NewID(componentType): nopFactory.CreateDefaultConfig()}, - map[component.Type]receiver.Factory{componentType: nopFactory}) + map[component.ID]component.Config{component.NewID(defaultComponentType): nopFactory.CreateDefaultConfig()}, + map[component.Type]receiver.Factory{defaultComponentType: nopFactory}) } diff --git a/receiver/scraperhelper/config.go b/receiver/scraperhelper/config.go index 68f0a56297d..84b7cd2073e 100644 --- a/receiver/scraperhelper/config.go +++ b/receiver/scraperhelper/config.go @@ -9,20 +9,12 @@ import ( "time" "go.uber.org/multierr" - - "go.opentelemetry.io/collector/component" ) var ( errNonPositiveInterval = errors.New("requires positive value") ) -// ScraperControllerSettings defines common settings for a scraper controller -// configuration. Scraper controller receivers can embed this struct, instead -// of receiver.Settings, and extend it with more fields if needed. -// Deprecated: [v0.95.0] Use ControllerConfig instead -type ScraperControllerSettings = ControllerConfig - // ControllerConfig defines common settings for a scraper controller // configuration. Scraper controller receivers can embed this struct, instead // of receiver.Settings, and extend it with more fields if needed. @@ -38,13 +30,6 @@ type ControllerConfig struct { Timeout time.Duration `mapstructure:"timeout"` } -// NewDefaultScraperControllerSettings returns default scraper controller -// settings with a collection interval of one minute. -// Deprecated: [v0.95.0] Use NewDefaultControllerConfig instead -func NewDefaultScraperControllerSettings(component.Type) ControllerConfig { - return NewDefaultControllerConfig() -} - // NewDefaultControllerConfig returns default scraper controller // settings with a collection interval of one minute. func NewDefaultControllerConfig() ControllerConfig { diff --git a/receiver/scraperhelper/obsreport.go b/receiver/scraperhelper/obsreport.go index a8ba76b66e7..89ad80fdc08 100644 --- a/receiver/scraperhelper/obsreport.go +++ b/receiver/scraperhelper/obsreport.go @@ -22,7 +22,7 @@ import ( ) var ( - scraperScope = obsmetrics.Scope + obsmetrics.NameSep + obsmetrics.ScraperKey + scraperScope = obsmetrics.Scope + obsmetrics.SpanNameSep + obsmetrics.ScraperKey ) // ObsReport is a helper to add observability to a scraper. @@ -98,7 +98,7 @@ func (s *ObsReport) createOtelMetrics(cfg ObsReportSettings) error { // returned context should be used in other calls to the obsreport functions // dealing with the same scrape operation. func (s *ObsReport) StartMetricsOp(ctx context.Context) context.Context { - spanName := obsmetrics.ScraperPrefix + s.receiverID.String() + obsmetrics.NameSep + s.scraper.String() + obsmetrics.ScraperMetricsOperationSuffix + spanName := obsmetrics.ScraperPrefix + s.receiverID.String() + obsmetrics.SpanNameSep + s.scraper.String() + obsmetrics.ScraperMetricsOperationSuffix ctx, _ = s.tracer.Start(ctx, spanName) return ctx } diff --git a/receiver/scraperhelper/scrapercontroller.go b/receiver/scraperhelper/scrapercontroller.go index 2f2896f6903..eb13ee66cc4 100644 --- a/receiver/scraperhelper/scrapercontroller.go +++ b/receiver/scraperhelper/scrapercontroller.go @@ -33,7 +33,7 @@ func AddScraper(scraper Scraper) ScraperControllerOption { } } -// WithTickerChannel allows you to override the scraper controllers ticker +// WithTickerChannel allows you to override the scraper controller's ticker // channel to specify when scrape is called. This is only expected to be // used by tests. func WithTickerChannel(tickerCh <-chan time.Time) ScraperControllerOption { @@ -163,7 +163,7 @@ func (sc *controller) startScraping() { sc.tickerCh = ticker.C } - // Call scrape method on initialision to ensure + // Call scrape method on initialization to ensure // that scrapers start from when the component starts // instead of waiting for the full duration to start. sc.scrapeMetricsAndReport() diff --git a/renovate.json b/renovate.json index 9f645452830..bcbc26dd133 100644 --- a/renovate.json +++ b/renovate.json @@ -35,8 +35,10 @@ }, { "matchManagers": ["gomod"], - "matchSourceUrlPrefixes": ["https://go.opentelemetry.io/contrib"], - "groupName": "All go.opentelemetry.io/contrib packages" + "matchSourceUrls": [ + "https://github.com/open-telemetry/opentelemetry-go-contrib" + ], + "groupName": "All opentelemetry-go-contrib packages" }, { "matchManagers": ["gomod"], @@ -50,8 +52,13 @@ }, { "matchManagers": ["gomod"], - "matchSourceUrlPrefixes": ["https://golang.org"], - "groupName": "All golang.org packages" + "matchSourceUrlPrefixes": ["https://golang.org/x"], + "groupName": "All golang.org/x packages" + }, + { + "matchManagers": ["gomod"], + "matchSourceUrlPrefixes": ["https://go.opentelemetry.io/build-tools"], + "groupName": "All go.opentelemetry.io/build-tools packages" } ], "ignoreDeps": [ diff --git a/semconv/go.mod b/semconv/go.mod index 6f758cc6751..ca3f2b7da1a 100644 --- a/semconv/go.mod +++ b/semconv/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/hashicorp/go-version v1.6.0 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 go.uber.org/goleak v1.3.0 ) diff --git a/semconv/go.sum b/semconv/go.sum index 8ca3cb9177c..180ea53240d 100644 --- a/semconv/go.sum +++ b/semconv/go.sum @@ -16,8 +16,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/semconv/v1.25.0/doc.go b/semconv/v1.25.0/doc.go new file mode 100644 index 00000000000..ad9e94a49f8 --- /dev/null +++ b/semconv/v1.25.0/doc.go @@ -0,0 +1,9 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package semconv implements OpenTelemetry semantic conventions. +// +// OpenTelemetry semantic conventions are agreed standardized naming +// patterns for OpenTelemetry things. This package represents the v1.25.0 +// version of the OpenTelemetry semantic conventions. +package semconv // import "go.opentelemetry.io/collector/semconv/v1.25.0" diff --git a/semconv/v1.25.0/generated_attribute_group.go b/semconv/v1.25.0/generated_attribute_group.go new file mode 100644 index 00000000000..0d8fc75a410 --- /dev/null +++ b/semconv/v1.25.0/generated_attribute_group.go @@ -0,0 +1,4796 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv + +// Attributes for Events represented using Log Records. +const ( + // Identifies the class / type of event. + // + // Type: string + // Requirement Level: Required + // Stability: experimental + // Examples: 'browser.mouse.click', 'device.app.lifecycle' + // Note: Event names are subject to the same rules as attribute names. Notably, + // event names are namespaced to avoid collisions and provide a clean separation + // of semantics for events in separate domains like browser, mobile, and + // kubernetes. + AttributeEventName = "event.name" +) + +// The attributes described in this section are rather generic. They may be +// used in any Log Record they apply to. +const ( + // A unique identifier for the Log Record. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '01ARZ3NDEKTSV4RRFFQ69G5FAV' + // Note: If an id is provided, other log records with the same id will be + // considered duplicates and can be removed safely. This means, that two + // distinguishable log records MUST have different values. + // The id MAY be an Universally Unique Lexicographically Sortable Identifier + // (ULID), but other identifiers (e.g. UUID) may be used as needed. + AttributeLogRecordUID = "log.record.uid" +) + +// Describes Log attributes +const ( + // The stream associated with the log. See below for a list of well-known values. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeLogIostream = "log.iostream" +) + +const ( + // Logs from stdout stream + AttributeLogIostreamStdout = "stdout" + // Events from stderr stream + AttributeLogIostreamStderr = "stderr" +) + +// A file to which log was emitted. +const ( + // The basename of the file. + // + // Type: string + // Requirement Level: Recommended + // Stability: experimental + // Examples: 'audit.log' + AttributeLogFileName = "log.file.name" + // The basename of the file, with symlinks resolved. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'uuid.log' + AttributeLogFileNameResolved = "log.file.name_resolved" + // The full path to the file. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '/var/log/mysql/audit.log' + AttributeLogFilePath = "log.file.path" + // The full path to the file, with symlinks resolved. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '/var/lib/docker/uuid.log' + AttributeLogFilePathResolved = "log.file.path_resolved" +) + +// Describes Database attributes +const ( + // The name of the connection pool; unique within the instrumented application. In + // case the connection pool implementation doesn't provide a name, instrumentation + // should use a combination of server.address and server.port attributes formatted + // as server.address:server.port. + // + // Type: string + // Requirement Level: Required + // Stability: experimental + // Examples: 'myDataSource' + AttributePoolName = "pool.name" + // The state of a connection in the pool + // + // Type: Enum + // Requirement Level: Required + // Stability: experimental + // Examples: 'idle' + AttributeState = "state" +) + +const ( + // idle + AttributeStateIdle = "idle" + // used + AttributeStateUsed = "used" +) + +// ASP.NET Core attributes +const ( + // Rate-limiting result, shows whether the lease was acquired or contains a + // rejection reason + // + // Type: Enum + // Requirement Level: Required + // Stability: stable + // Examples: 'acquired', 'request_canceled' + AttributeAspnetcoreRateLimitingResult = "aspnetcore.rate_limiting.result" + // Full type name of the IExceptionHandler implementation that handled the + // exception. + // + // Type: string + // Requirement Level: Conditionally Required - if and only if the exception was + // handled by this handler. + // Stability: stable + // Examples: 'Contoso.MyHandler' + AttributeAspnetcoreDiagnosticsHandlerType = "aspnetcore.diagnostics.handler.type" + // Rate limiting policy name. + // + // Type: string + // Requirement Level: Conditionally Required - if the matched endpoint for the + // request had a rate-limiting policy. + // Stability: stable + // Examples: 'fixed', 'sliding', 'token' + AttributeAspnetcoreRateLimitingPolicy = "aspnetcore.rate_limiting.policy" + // Flag indicating if request was handled by the application pipeline. + // + // Type: boolean + // Requirement Level: Conditionally Required - if and only if the request was not + // handled. + // Stability: stable + // Examples: True + AttributeAspnetcoreRequestIsUnhandled = "aspnetcore.request.is_unhandled" + // A value that indicates whether the matched route is a fallback route. + // + // Type: boolean + // Requirement Level: Conditionally Required - If and only if a route was + // successfully matched. + // Stability: stable + // Examples: True + AttributeAspnetcoreRoutingIsFallback = "aspnetcore.routing.is_fallback" +) + +const ( + // Lease was acquired + AttributeAspnetcoreRateLimitingResultAcquired = "acquired" + // Lease request was rejected by the endpoint limiter + AttributeAspnetcoreRateLimitingResultEndpointLimiter = "endpoint_limiter" + // Lease request was rejected by the global limiter + AttributeAspnetcoreRateLimitingResultGlobalLimiter = "global_limiter" + // Lease request was canceled + AttributeAspnetcoreRateLimitingResultRequestCanceled = "request_canceled" +) + +// SignalR attributes +const ( + // SignalR HTTP connection closure status. + // + // Type: Enum + // Requirement Level: Optional + // Stability: stable + // Examples: 'app_shutdown', 'timeout' + AttributeSignalrConnectionStatus = "signalr.connection.status" + // SignalR transport type + // + // Type: Enum + // Requirement Level: Optional + // Stability: stable + // Examples: 'web_sockets', 'long_polling' + AttributeSignalrTransport = "signalr.transport" +) + +const ( + // The connection was closed normally + AttributeSignalrConnectionStatusNormalClosure = "normal_closure" + // The connection was closed due to a timeout + AttributeSignalrConnectionStatusTimeout = "timeout" + // The connection was closed because the app is shutting down + AttributeSignalrConnectionStatusAppShutdown = "app_shutdown" +) + +const ( + // ServerSentEvents protocol + AttributeSignalrTransportServerSentEvents = "server_sent_events" + // LongPolling protocol + AttributeSignalrTransportLongPolling = "long_polling" + // WebSockets protocol + AttributeSignalrTransportWebSockets = "web_sockets" +) + +// Describes JVM buffer metric attributes. +const ( + // Name of the buffer pool. + // + // Type: string + // Requirement Level: Recommended + // Stability: experimental + // Examples: 'mapped', 'direct' + // Note: Pool names are generally obtained via BufferPoolMXBean#getName(). + AttributeJvmBufferPoolName = "jvm.buffer.pool.name" +) + +// Describes JVM memory metric attributes. +const ( + // Name of the memory pool. + // + // Type: string + // Requirement Level: Recommended + // Stability: stable + // Examples: 'G1 Old Gen', 'G1 Eden space', 'G1 Survivor Space' + // Note: Pool names are generally obtained via MemoryPoolMXBean#getName(). + AttributeJvmMemoryPoolName = "jvm.memory.pool.name" + // The type of memory. + // + // Type: Enum + // Requirement Level: Recommended + // Stability: stable + // Examples: 'heap', 'non_heap' + AttributeJvmMemoryType = "jvm.memory.type" +) + +const ( + // Heap memory + AttributeJvmMemoryTypeHeap = "heap" + // Non-heap memory + AttributeJvmMemoryTypeNonHeap = "non_heap" +) + +// Attributes for process CPU metrics. +const ( + // The CPU state for this data point. A process SHOULD be characterized either by + // data points with no state labels, or only data points with state labels. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeProcessCPUState = "process.cpu.state" +) + +const ( + // system + AttributeProcessCPUStateSystem = "system" + // user + AttributeProcessCPUStateUser = "user" + // wait + AttributeProcessCPUStateWait = "wait" +) + +// Describes System metric attributes +const ( + // The device identifier + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '(identifier)' + AttributeSystemDevice = "system.device" +) + +// Describes System CPU metric attributes +const ( + // The logical CPU number [0..n-1] + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 1 + AttributeSystemCPULogicalNumber = "system.cpu.logical_number" + // The CPU state for this data point. A system's CPU SHOULD be characterized + // either by data points with no state labels, or only data points with state + // labels. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Examples: 'idle', 'interrupt' + AttributeSystemCPUState = "system.cpu.state" +) + +const ( + // user + AttributeSystemCPUStateUser = "user" + // system + AttributeSystemCPUStateSystem = "system" + // nice + AttributeSystemCPUStateNice = "nice" + // idle + AttributeSystemCPUStateIdle = "idle" + // iowait + AttributeSystemCPUStateIowait = "iowait" + // interrupt + AttributeSystemCPUStateInterrupt = "interrupt" + // steal + AttributeSystemCPUStateSteal = "steal" +) + +// Describes System Memory metric attributes +const ( + // The memory state + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Examples: 'free', 'cached' + AttributeSystemMemoryState = "system.memory.state" +) + +const ( + // used + AttributeSystemMemoryStateUsed = "used" + // free + AttributeSystemMemoryStateFree = "free" + // shared + AttributeSystemMemoryStateShared = "shared" + // buffers + AttributeSystemMemoryStateBuffers = "buffers" + // cached + AttributeSystemMemoryStateCached = "cached" +) + +// Describes System Memory Paging metric attributes +const ( + // The paging access direction + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Examples: 'in' + AttributeSystemPagingDirection = "system.paging.direction" + // The memory paging state + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Examples: 'free' + AttributeSystemPagingState = "system.paging.state" + // The memory paging type + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Examples: 'minor' + AttributeSystemPagingType = "system.paging.type" +) + +const ( + // in + AttributeSystemPagingDirectionIn = "in" + // out + AttributeSystemPagingDirectionOut = "out" +) + +const ( + // used + AttributeSystemPagingStateUsed = "used" + // free + AttributeSystemPagingStateFree = "free" +) + +const ( + // major + AttributeSystemPagingTypeMajor = "major" + // minor + AttributeSystemPagingTypeMinor = "minor" +) + +// Describes Filesystem metric attributes +const ( + // The filesystem mode + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'rw, ro' + AttributeSystemFilesystemMode = "system.filesystem.mode" + // The filesystem mount path + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '/mnt/data' + AttributeSystemFilesystemMountpoint = "system.filesystem.mountpoint" + // The filesystem state + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Examples: 'used' + AttributeSystemFilesystemState = "system.filesystem.state" + // The filesystem type + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Examples: 'ext4' + AttributeSystemFilesystemType = "system.filesystem.type" +) + +const ( + // used + AttributeSystemFilesystemStateUsed = "used" + // free + AttributeSystemFilesystemStateFree = "free" + // reserved + AttributeSystemFilesystemStateReserved = "reserved" +) + +const ( + // fat32 + AttributeSystemFilesystemTypeFat32 = "fat32" + // exfat + AttributeSystemFilesystemTypeExfat = "exfat" + // ntfs + AttributeSystemFilesystemTypeNtfs = "ntfs" + // refs + AttributeSystemFilesystemTypeRefs = "refs" + // hfsplus + AttributeSystemFilesystemTypeHfsplus = "hfsplus" + // ext4 + AttributeSystemFilesystemTypeExt4 = "ext4" +) + +// Describes Network metric attributes +const ( + // A stateless protocol MUST NOT set this attribute + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Examples: 'close_wait' + AttributeSystemNetworkState = "system.network.state" +) + +const ( + // close + AttributeSystemNetworkStateClose = "close" + // close_wait + AttributeSystemNetworkStateCloseWait = "close_wait" + // closing + AttributeSystemNetworkStateClosing = "closing" + // delete + AttributeSystemNetworkStateDelete = "delete" + // established + AttributeSystemNetworkStateEstablished = "established" + // fin_wait_1 + AttributeSystemNetworkStateFinWait1 = "fin_wait_1" + // fin_wait_2 + AttributeSystemNetworkStateFinWait2 = "fin_wait_2" + // last_ack + AttributeSystemNetworkStateLastAck = "last_ack" + // listen + AttributeSystemNetworkStateListen = "listen" + // syn_recv + AttributeSystemNetworkStateSynRecv = "syn_recv" + // syn_sent + AttributeSystemNetworkStateSynSent = "syn_sent" + // time_wait + AttributeSystemNetworkStateTimeWait = "time_wait" +) + +// Describes System Process metric attributes +const ( + // The process state, e.g., Linux Process State Codes + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Examples: 'running' + AttributeSystemProcessStatus = "system.process.status" +) + +const ( + // running + AttributeSystemProcessStatusRunning = "running" + // sleeping + AttributeSystemProcessStatusSleeping = "sleeping" + // stopped + AttributeSystemProcessStatusStopped = "stopped" + // defunct + AttributeSystemProcessStatusDefunct = "defunct" +) + +// The Android platform on which the Android application is running. +const ( + // Uniquely identifies the framework API revision offered by a version + // (os.version) of the android operating system. More information can be found + // here. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '33', '32' + AttributeAndroidOSAPILevel = "android.os.api_level" +) + +// Attributes for AWS DynamoDB. +const ( + // The JSON-serialized value of each item in the AttributeDefinitions request + // field. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: '{ "AttributeName": "string", "AttributeType": "string" }' + AttributeAWSDynamoDBAttributeDefinitions = "aws.dynamodb.attribute_definitions" + // The value of the AttributesToGet request parameter. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: 'lives', 'id' + AttributeAWSDynamoDBAttributesToGet = "aws.dynamodb.attributes_to_get" + // The value of the ConsistentRead request parameter. + // + // Type: boolean + // Requirement Level: Optional + // Stability: experimental + AttributeAWSDynamoDBConsistentRead = "aws.dynamodb.consistent_read" + // The JSON-serialized value of each item in the ConsumedCapacity response field. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": { "string" : { + // "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits": + // number } }, "LocalSecondaryIndexes": { "string" : { "CapacityUnits": number, + // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }, + // "ReadCapacityUnits": number, "Table": { "CapacityUnits": number, + // "ReadCapacityUnits": number, "WriteCapacityUnits": number }, "TableName": + // "string", "WriteCapacityUnits": number }' + AttributeAWSDynamoDBConsumedCapacity = "aws.dynamodb.consumed_capacity" + // The value of the Count response parameter. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 10 + AttributeAWSDynamoDBCount = "aws.dynamodb.count" + // The value of the ExclusiveStartTableName request parameter. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Users', 'CatsTable' + AttributeAWSDynamoDBExclusiveStartTable = "aws.dynamodb.exclusive_start_table" + // The JSON-serialized value of each item in the GlobalSecondaryIndexUpdates + // request field. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ { + // "AttributeName": "string", "KeyType": "string" } ], "Projection": { + // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, + // "ProvisionedThroughput": { "ReadCapacityUnits": number, "WriteCapacityUnits": + // number } }' + AttributeAWSDynamoDBGlobalSecondaryIndexUpdates = "aws.dynamodb.global_secondary_index_updates" + // The JSON-serialized value of each item of the GlobalSecondaryIndexes request + // field + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName": "string", + // "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], + // "ProjectionType": "string" }, "ProvisionedThroughput": { "ReadCapacityUnits": + // number, "WriteCapacityUnits": number } }' + AttributeAWSDynamoDBGlobalSecondaryIndexes = "aws.dynamodb.global_secondary_indexes" + // The value of the IndexName request parameter. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'name_to_group' + AttributeAWSDynamoDBIndexName = "aws.dynamodb.index_name" + // The JSON-serialized value of the ItemCollectionMetrics response field. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B": blob, + // "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { "string" : + // "AttributeValue" }, "N": "string", "NS": [ "string" ], "NULL": boolean, "S": + // "string", "SS": [ "string" ] } }, "SizeEstimateRangeGB": [ number ] } ] }' + AttributeAWSDynamoDBItemCollectionMetrics = "aws.dynamodb.item_collection_metrics" + // The value of the Limit request parameter. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 10 + AttributeAWSDynamoDBLimit = "aws.dynamodb.limit" + // The JSON-serialized value of each item of the LocalSecondaryIndexes request + // field. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: '{ "IndexARN": "string", "IndexName": "string", "IndexSizeBytes": + // number, "ItemCount": number, "KeySchema": [ { "AttributeName": "string", + // "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], + // "ProjectionType": "string" } }' + AttributeAWSDynamoDBLocalSecondaryIndexes = "aws.dynamodb.local_secondary_indexes" + // The value of the ProjectionExpression request parameter. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Title', 'Title, Price, Color', 'Title, Description, RelatedItems, + // ProductReviews' + AttributeAWSDynamoDBProjection = "aws.dynamodb.projection" + // The value of the ProvisionedThroughput.ReadCapacityUnits request parameter. + // + // Type: double + // Requirement Level: Optional + // Stability: experimental + // Examples: 1.0, 2.0 + AttributeAWSDynamoDBProvisionedReadCapacity = "aws.dynamodb.provisioned_read_capacity" + // The value of the ProvisionedThroughput.WriteCapacityUnits request parameter. + // + // Type: double + // Requirement Level: Optional + // Stability: experimental + // Examples: 1.0, 2.0 + AttributeAWSDynamoDBProvisionedWriteCapacity = "aws.dynamodb.provisioned_write_capacity" + // The value of the ScanIndexForward request parameter. + // + // Type: boolean + // Requirement Level: Optional + // Stability: experimental + AttributeAWSDynamoDBScanForward = "aws.dynamodb.scan_forward" + // The value of the ScannedCount response parameter. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 50 + AttributeAWSDynamoDBScannedCount = "aws.dynamodb.scanned_count" + // The value of the Segment request parameter. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 10 + AttributeAWSDynamoDBSegment = "aws.dynamodb.segment" + // The value of the Select request parameter. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'ALL_ATTRIBUTES', 'COUNT' + AttributeAWSDynamoDBSelect = "aws.dynamodb.select" + // The number of items in the TableNames response parameter. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 20 + AttributeAWSDynamoDBTableCount = "aws.dynamodb.table_count" + // The keys in the RequestItems object field. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Users', 'Cats' + AttributeAWSDynamoDBTableNames = "aws.dynamodb.table_names" + // The value of the TotalSegments request parameter. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 100 + AttributeAWSDynamoDBTotalSegments = "aws.dynamodb.total_segments" +) + +// The web browser attributes +const ( + // Array of brand name and version separated by a space + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: ' Not A;Brand 99', 'Chromium 99', 'Chrome 99' + // Note: This value is intended to be taken from the UA client hints API + // (navigator.userAgentData.brands). + AttributeBrowserBrands = "browser.brands" + // Preferred language of the user using the browser + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'en', 'en-US', 'fr', 'fr-FR' + // Note: This value is intended to be taken from the Navigator API + // navigator.language. + AttributeBrowserLanguage = "browser.language" + // A boolean that is true if the browser is running on a mobile device + // + // Type: boolean + // Requirement Level: Optional + // Stability: experimental + // Note: This value is intended to be taken from the UA client hints API + // (navigator.userAgentData.mobile). If unavailable, this attribute SHOULD be left + // unset. + AttributeBrowserMobile = "browser.mobile" + // The platform on which the browser is running + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Windows', 'macOS', 'Android' + // Note: This value is intended to be taken from the UA client hints API + // (navigator.userAgentData.platform). If unavailable, the legacy + // navigator.platform API SHOULD NOT be used instead and this attribute SHOULD be + // left unset in order for the values to be consistent. + // The list of possible values is defined in the W3C User-Agent Client Hints + // specification. Note that some (but not all) of these values can overlap with + // values in the os.type and os.name attributes. However, for consistency, the + // values in the browser.platform attribute should capture the exact value that + // the user agent provides. + AttributeBrowserPlatform = "browser.platform" +) + +// These attributes may be used to describe the client in a connection-based +// network interaction where there is one side that initiates the connection +// (the client is the side that initiates the connection). This covers all TCP +// network interactions since TCP is connection-based and one side initiates +// the connection (an exception is made for peer-to-peer communication over TCP +// where the "user-facing" surface of the protocol / API doesn't expose a clear +// notion of client and server). This also covers UDP network interactions +// where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS. +const ( + // Client address - domain name if available without reverse DNS lookup; + // otherwise, IP address or Unix domain socket name. + // + // Type: string + // Requirement Level: Optional + // Stability: stable + // Examples: 'client.example.com', '10.1.2.80', '/tmp/my.sock' + // Note: When observed from the server side, and when communicating through an + // intermediary, client.address SHOULD represent the client address behind any + // intermediaries, for example proxies, if it's available. + AttributeClientAddress = "client.address" + // Client port number. + // + // Type: int + // Requirement Level: Optional + // Stability: stable + // Examples: 65123 + // Note: When observed from the server side, and when communicating through an + // intermediary, client.port SHOULD represent the client port behind any + // intermediaries, for example proxies, if it's available. + AttributeClientPort = "client.port" +) + +// A cloud environment (e.g. GCP, Azure, AWS). +const ( + // The cloud account ID the resource is assigned to. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '111111111111', 'opentelemetry' + AttributeCloudAccountID = "cloud.account.id" + // Cloud regions often have multiple, isolated locations known as zones to + // increase availability. Availability zone represents the zone where the resource + // is running. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'us-east-1c' + // Note: Availability zones are called "zones" on Alibaba Cloud and + // Google Cloud. + AttributeCloudAvailabilityZone = "cloud.availability_zone" + // The cloud platform in use. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Note: The prefix of the service SHOULD match the one specified in + // cloud.provider. + AttributeCloudPlatform = "cloud.platform" + // Name of the cloud provider. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeCloudProvider = "cloud.provider" + // The geographical region the resource is running. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'us-central1', 'us-east-1' + // Note: Refer to your provider's docs to see the available regions, for example + // Alibaba Cloud regions, AWS regions, Azure regions, Google Cloud regions, or + // Tencent Cloud regions. + AttributeCloudRegion = "cloud.region" + // Cloud provider-specific native identifier of the monitored cloud resource (e.g. + // an ARN on AWS, a fully qualified resource ID on Azure, a full resource name on + // GCP) + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function', '//run.googl + // eapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID', '/sub + // scriptions//resourceGroups//providers/Microsoft.Web/sites + // //functions/' + // Note: On some cloud providers, it may not be possible to determine the full ID + // at startup, + // so it may be necessary to set cloud.resource_id as a span attribute instead.The + // exact value to use for cloud.resource_id depends on the cloud provider. + // The following well-known definitions MUST be used if you set this attribute and + // they apply:

+ AttributeCloudResourceID = "cloud.resource_id" +) + +const ( + // Alibaba Cloud Elastic Compute Service + AttributeCloudPlatformAlibabaCloudECS = "alibaba_cloud_ecs" + // Alibaba Cloud Function Compute + AttributeCloudPlatformAlibabaCloudFc = "alibaba_cloud_fc" + // Red Hat OpenShift on Alibaba Cloud + AttributeCloudPlatformAlibabaCloudOpenshift = "alibaba_cloud_openshift" + // AWS Elastic Compute Cloud + AttributeCloudPlatformAWSEC2 = "aws_ec2" + // AWS Elastic Container Service + AttributeCloudPlatformAWSECS = "aws_ecs" + // AWS Elastic Kubernetes Service + AttributeCloudPlatformAWSEKS = "aws_eks" + // AWS Lambda + AttributeCloudPlatformAWSLambda = "aws_lambda" + // AWS Elastic Beanstalk + AttributeCloudPlatformAWSElasticBeanstalk = "aws_elastic_beanstalk" + // AWS App Runner + AttributeCloudPlatformAWSAppRunner = "aws_app_runner" + // Red Hat OpenShift on AWS (ROSA) + AttributeCloudPlatformAWSOpenshift = "aws_openshift" + // Azure Virtual Machines + AttributeCloudPlatformAzureVM = "azure_vm" + // Azure Container Apps + AttributeCloudPlatformAzureContainerApps = "azure_container_apps" + // Azure Container Instances + AttributeCloudPlatformAzureContainerInstances = "azure_container_instances" + // Azure Kubernetes Service + AttributeCloudPlatformAzureAKS = "azure_aks" + // Azure Functions + AttributeCloudPlatformAzureFunctions = "azure_functions" + // Azure App Service + AttributeCloudPlatformAzureAppService = "azure_app_service" + // Azure Red Hat OpenShift + AttributeCloudPlatformAzureOpenshift = "azure_openshift" + // Google Bare Metal Solution (BMS) + AttributeCloudPlatformGCPBareMetalSolution = "gcp_bare_metal_solution" + // Google Cloud Compute Engine (GCE) + AttributeCloudPlatformGCPComputeEngine = "gcp_compute_engine" + // Google Cloud Run + AttributeCloudPlatformGCPCloudRun = "gcp_cloud_run" + // Google Cloud Kubernetes Engine (GKE) + AttributeCloudPlatformGCPKubernetesEngine = "gcp_kubernetes_engine" + // Google Cloud Functions (GCF) + AttributeCloudPlatformGCPCloudFunctions = "gcp_cloud_functions" + // Google Cloud App Engine (GAE) + AttributeCloudPlatformGCPAppEngine = "gcp_app_engine" + // Red Hat OpenShift on Google Cloud + AttributeCloudPlatformGCPOpenshift = "gcp_openshift" + // Red Hat OpenShift on IBM Cloud + AttributeCloudPlatformIbmCloudOpenshift = "ibm_cloud_openshift" + // Tencent Cloud Cloud Virtual Machine (CVM) + AttributeCloudPlatformTencentCloudCvm = "tencent_cloud_cvm" + // Tencent Cloud Elastic Kubernetes Service (EKS) + AttributeCloudPlatformTencentCloudEKS = "tencent_cloud_eks" + // Tencent Cloud Serverless Cloud Function (SCF) + AttributeCloudPlatformTencentCloudScf = "tencent_cloud_scf" +) + +const ( + // Alibaba Cloud + AttributeCloudProviderAlibabaCloud = "alibaba_cloud" + // Amazon Web Services + AttributeCloudProviderAWS = "aws" + // Microsoft Azure + AttributeCloudProviderAzure = "azure" + // Google Cloud Platform + AttributeCloudProviderGCP = "gcp" + // Heroku Platform as a Service + AttributeCloudProviderHeroku = "heroku" + // IBM Cloud + AttributeCloudProviderIbmCloud = "ibm_cloud" + // Tencent Cloud + AttributeCloudProviderTencentCloud = "tencent_cloud" +) + +// Attributes for CloudEvents. +const ( + // The event_id uniquely identifies the event. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '123e4567-e89b-12d3-a456-426614174000', '0001' + AttributeCloudeventsEventID = "cloudevents.event_id" + // The source identifies the context in which an event happened. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'https://github.com/cloudevents', '/cloudevents/spec/pull/123', 'my- + // service' + AttributeCloudeventsEventSource = "cloudevents.event_source" + // The version of the CloudEvents specification which the event uses. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '1.0' + AttributeCloudeventsEventSpecVersion = "cloudevents.event_spec_version" + // The subject of the event in the context of the event producer (identified by + // source). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'mynewfile.jpg' + AttributeCloudeventsEventSubject = "cloudevents.event_subject" + // The event_type contains a value describing the type of event related to the + // originating occurrence. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'com.github.pull_request.opened', 'com.example.object.deleted.v2' + AttributeCloudeventsEventType = "cloudevents.event_type" +) + +// These attributes allow to report this unit of code and therefore to provide +// more context about the span. +const ( + // The column number in code.filepath best representing the operation. It SHOULD + // point within the code unit named in code.function. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 16 + AttributeCodeColumn = "code.column" + // The source code file name that identifies the code unit as uniquely as possible + // (preferably an absolute file path). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '/usr/local/MyApplication/content_root/app/index.php' + AttributeCodeFilepath = "code.filepath" + // The method or function name, or equivalent (usually rightmost part of the code + // unit's name). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'serveRequest' + AttributeCodeFunction = "code.function" + // The line number in code.filepath best representing the operation. It SHOULD + // point within the code unit named in code.function. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 42 + AttributeCodeLineNumber = "code.lineno" + // The "namespace" within which code.function is defined. Usually the + // qualified class or module name, such that code.namespace + some separator + + // code.function form a unique identifier for the code unit. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'com.example.MyHTTPService' + AttributeCodeNamespace = "code.namespace" + // A stacktrace as a string in the natural representation for the language + // runtime. The representation is to be determined and documented by each language + // SIG. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' + // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' + // 'com.example.GenerateTrace.main(GenerateTrace.java:5)' + AttributeCodeStacktrace = "code.stacktrace" +) + +// A container instance. +const ( + // The command used to run the container (i.e. the command name). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'otelcontribcol' + // Note: If using embedded credentials or sensitive data, it is recommended to + // remove them to prevent potential leakage. + AttributeContainerCommand = "container.command" + // All the command arguments (including the command/executable itself) run by the + // container. [2] + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: 'otelcontribcol, --config, config.yaml' + AttributeContainerCommandArgs = "container.command_args" + // The full command run by the container as a single string representing the full + // command. [2] + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'otelcontribcol --config config.yaml' + AttributeContainerCommandLine = "container.command_line" + // The CPU state for this data point. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Examples: 'user', 'kernel' + AttributeContainerCPUState = "container.cpu.state" + // Container ID. Usually a UUID, as for example used to identify Docker + // containers. The UUID might be abbreviated. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'a3bf90e006b2' + AttributeContainerID = "container.id" + // Runtime specific image identifier. Usually a hash algorithm followed by a UUID. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: + // 'sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f' + // Note: Docker defines a sha256 of the image id; container.image.id corresponds + // to the Image field from the Docker container inspect API endpoint. + // K8S defines a link to the container registry repository with digest "imageID": + // "registry.azurecr.io /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e + // 8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625". + // The ID is assinged by the container runtime and can vary in different + // environments. Consider using oci.manifest.digest if it is important to identify + // the same image in different environments/runtimes. + AttributeContainerImageID = "container.image.id" + // Name of the image the container was built on. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'gcr.io/opentelemetry/operator' + AttributeContainerImageName = "container.image.name" + // Repo digests of the container image as provided by the container runtime. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: 'example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d7 + // 02d249a0ccb', 'internal.registry.example.com:5000/example@sha256:b69959407d21e8 + // a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578' + // Note: Docker and CRI report those under the RepoDigests field. + AttributeContainerImageRepoDigests = "container.image.repo_digests" + // Container image tags. An example can be found in Docker Image Inspect. Should + // be only the section of the full name for example from + // registry.example.com/my-org/my-image:. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: 'v1.27.1', '3.5.7-0' + AttributeContainerImageTags = "container.image.tags" + // Container name used by container runtime. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry-autoconf' + AttributeContainerName = "container.name" + // The container runtime managing this container. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'docker', 'containerd', 'rkt' + AttributeContainerRuntime = "container.runtime" +) + +const ( + // When tasks of the cgroup are in user mode (Linux). When all container processes are in user mode (Windows) + AttributeContainerCPUStateUser = "user" + // When CPU is used by the system (host OS) + AttributeContainerCPUStateSystem = "system" + // When tasks of the cgroup are in kernel mode (Linux). When all container processes are in kernel mode (Windows) + AttributeContainerCPUStateKernel = "kernel" +) + +// The attributes used to describe telemetry in the context of databases. +const ( + // The consistency level of the query. Based on consistency values from CQL. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeDBCassandraConsistencyLevel = "db.cassandra.consistency_level" + // The data center of the coordinating node for a query. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'us-west-2' + AttributeDBCassandraCoordinatorDC = "db.cassandra.coordinator.dc" + // The ID of the coordinating node for a query. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af' + AttributeDBCassandraCoordinatorID = "db.cassandra.coordinator.id" + // Whether or not the query is idempotent. + // + // Type: boolean + // Requirement Level: Optional + // Stability: experimental + AttributeDBCassandraIdempotence = "db.cassandra.idempotence" + // The fetch size used for paging, i.e. how many rows will be returned at once. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 5000 + AttributeDBCassandraPageSize = "db.cassandra.page_size" + // The number of times a query was speculatively executed. Not set or 0 if the + // query was not executed speculatively. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 0, 2 + AttributeDBCassandraSpeculativeExecutionCount = "db.cassandra.speculative_execution_count" + // The name of the primary Cassandra table that the operation is acting upon, + // including the keyspace name (if applicable). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'mytable' + // Note: This mirrors the db.sql.table attribute but references cassandra rather + // than sql. It is not recommended to attempt any client-side parsing of + // db.statement just to get this property, but it should be set if it is provided + // by the library being instrumented. If the operation is acting upon an anonymous + // table, or more than one table, this value MUST NOT be set. + AttributeDBCassandraTable = "db.cassandra.table" + // Unique Cosmos client instance id. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '3ba4827d-4422-483f-b59f-85b74211c11d' + AttributeDBCosmosDBClientID = "db.cosmosdb.client_id" + // Cosmos client connection mode. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeDBCosmosDBConnectionMode = "db.cosmosdb.connection_mode" + // Cosmos DB container name. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'anystring' + AttributeDBCosmosDBContainer = "db.cosmosdb.container" + // CosmosDB Operation Type. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeDBCosmosDBOperationType = "db.cosmosdb.operation_type" + // RU consumed for that operation + // + // Type: double + // Requirement Level: Optional + // Stability: experimental + // Examples: 46.18, 1.0 + AttributeDBCosmosDBRequestCharge = "db.cosmosdb.request_charge" + // Request payload size in bytes + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + AttributeDBCosmosDBRequestContentLength = "db.cosmosdb.request_content_length" + // Cosmos DB status code. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 200, 201 + AttributeDBCosmosDBStatusCode = "db.cosmosdb.status_code" + // Cosmos DB sub status code. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 1000, 1002 + AttributeDBCosmosDBSubStatusCode = "db.cosmosdb.sub_status_code" + // Represents the identifier of an Elasticsearch cluster. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'e9106fc68e3044f0b1475b04bf4ffd5f' + AttributeDBElasticsearchClusterName = "db.elasticsearch.cluster.name" + // An identifier (address, unique name, or any other identifier) of the database + // instance that is executing queries or mutations on the current connection. This + // is useful in cases where the database is running in a clustered environment and + // the instrumentation is able to record the node executing the query. The client + // may obtain this value in databases like MySQL using queries like select + // @@hostname. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'mysql-e26b99z.example.com' + AttributeDBInstanceID = "db.instance.id" + // The MongoDB collection being accessed within the database stated in db.name. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'customers', 'products' + AttributeDBMongoDBCollection = "db.mongodb.collection" + // The Microsoft SQL Server instance name connecting to. This name is used to + // determine the port of a named instance. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'MSSQLSERVER' + // Note: If setting a db.mssql.instance_name, server.port is no longer required + // (but still recommended if non-standard). + AttributeDBMSSQLInstanceName = "db.mssql.instance_name" + // This attribute is used to report the name of the database being accessed. For + // commands that switch the database, this should be set to the target database + // (even if the command fails). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'customers', 'main' + // Note: In some SQL databases, the database name to be used is called + // "schema name". In case there are multiple layers that could be + // considered for database name (e.g. Oracle instance name and schema name), the + // database name to be used is the more specific layer (e.g. Oracle schema name). + AttributeDBName = "db.name" + // The name of the operation being executed, e.g. the MongoDB command name such as + // findAndModify, or the SQL keyword. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'findAndModify', 'HMSET', 'SELECT' + // Note: When setting this to an SQL keyword, it is not recommended to attempt any + // client-side parsing of db.statement just to get this property, but it should be + // set if the operation name is provided by the library being instrumented. If the + // SQL statement has an ambiguous operation, or performs more than one operation, + // this value may be omitted. + AttributeDBOperation = "db.operation" + // The index of the database being accessed as used in the SELECT command, + // provided as an integer. To be used instead of the generic db.name attribute. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 0, 1, 15 + AttributeDBRedisDBIndex = "db.redis.database_index" + // The name of the primary table that the operation is acting upon, including the + // database name (if applicable). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'public.users', 'customers' + // Note: It is not recommended to attempt any client-side parsing of db.statement + // just to get this property, but it should be set if it is provided by the + // library being instrumented. If the operation is acting upon an anonymous table, + // or more than one table, this value MUST NOT be set. + AttributeDBSQLTable = "db.sql.table" + // The database statement being executed. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'SELECT * FROM wuser_table', 'SET mykey "WuValue"' + AttributeDBStatement = "db.statement" + // An identifier for the database management system (DBMS) product being used. See + // below for a list of well-known identifiers. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeDBSystem = "db.system" + // Username for accessing the database. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'readonly_user', 'reporting_user' + AttributeDBUser = "db.user" +) + +const ( + // all + AttributeDBCassandraConsistencyLevelAll = "all" + // each_quorum + AttributeDBCassandraConsistencyLevelEachQuorum = "each_quorum" + // quorum + AttributeDBCassandraConsistencyLevelQuorum = "quorum" + // local_quorum + AttributeDBCassandraConsistencyLevelLocalQuorum = "local_quorum" + // one + AttributeDBCassandraConsistencyLevelOne = "one" + // two + AttributeDBCassandraConsistencyLevelTwo = "two" + // three + AttributeDBCassandraConsistencyLevelThree = "three" + // local_one + AttributeDBCassandraConsistencyLevelLocalOne = "local_one" + // any + AttributeDBCassandraConsistencyLevelAny = "any" + // serial + AttributeDBCassandraConsistencyLevelSerial = "serial" + // local_serial + AttributeDBCassandraConsistencyLevelLocalSerial = "local_serial" +) + +const ( + // Gateway (HTTP) connections mode + AttributeDBCosmosDBConnectionModeGateway = "gateway" + // Direct connection + AttributeDBCosmosDBConnectionModeDirect = "direct" +) + +const ( + // invalid + AttributeDBCosmosDBOperationTypeInvalid = "Invalid" + // create + AttributeDBCosmosDBOperationTypeCreate = "Create" + // patch + AttributeDBCosmosDBOperationTypePatch = "Patch" + // read + AttributeDBCosmosDBOperationTypeRead = "Read" + // read_feed + AttributeDBCosmosDBOperationTypeReadFeed = "ReadFeed" + // delete + AttributeDBCosmosDBOperationTypeDelete = "Delete" + // replace + AttributeDBCosmosDBOperationTypeReplace = "Replace" + // execute + AttributeDBCosmosDBOperationTypeExecute = "Execute" + // query + AttributeDBCosmosDBOperationTypeQuery = "Query" + // head + AttributeDBCosmosDBOperationTypeHead = "Head" + // head_feed + AttributeDBCosmosDBOperationTypeHeadFeed = "HeadFeed" + // upsert + AttributeDBCosmosDBOperationTypeUpsert = "Upsert" + // batch + AttributeDBCosmosDBOperationTypeBatch = "Batch" + // query_plan + AttributeDBCosmosDBOperationTypeQueryPlan = "QueryPlan" + // execute_javascript + AttributeDBCosmosDBOperationTypeExecuteJavascript = "ExecuteJavaScript" +) + +const ( + // Some other SQL database. Fallback only. See notes + AttributeDBSystemOtherSQL = "other_sql" + // Microsoft SQL Server + AttributeDBSystemMSSQL = "mssql" + // Microsoft SQL Server Compact + AttributeDBSystemMssqlcompact = "mssqlcompact" + // MySQL + AttributeDBSystemMySQL = "mysql" + // Oracle Database + AttributeDBSystemOracle = "oracle" + // IBM DB2 + AttributeDBSystemDB2 = "db2" + // PostgreSQL + AttributeDBSystemPostgreSQL = "postgresql" + // Amazon Redshift + AttributeDBSystemRedshift = "redshift" + // Apache Hive + AttributeDBSystemHive = "hive" + // Cloudscape + AttributeDBSystemCloudscape = "cloudscape" + // HyperSQL DataBase + AttributeDBSystemHSQLDB = "hsqldb" + // Progress Database + AttributeDBSystemProgress = "progress" + // SAP MaxDB + AttributeDBSystemMaxDB = "maxdb" + // SAP HANA + AttributeDBSystemHanaDB = "hanadb" + // Ingres + AttributeDBSystemIngres = "ingres" + // FirstSQL + AttributeDBSystemFirstSQL = "firstsql" + // EnterpriseDB + AttributeDBSystemEDB = "edb" + // InterSystems Caché + AttributeDBSystemCache = "cache" + // Adabas (Adaptable Database System) + AttributeDBSystemAdabas = "adabas" + // Firebird + AttributeDBSystemFirebird = "firebird" + // Apache Derby + AttributeDBSystemDerby = "derby" + // FileMaker + AttributeDBSystemFilemaker = "filemaker" + // Informix + AttributeDBSystemInformix = "informix" + // InstantDB + AttributeDBSystemInstantDB = "instantdb" + // InterBase + AttributeDBSystemInterbase = "interbase" + // MariaDB + AttributeDBSystemMariaDB = "mariadb" + // Netezza + AttributeDBSystemNetezza = "netezza" + // Pervasive PSQL + AttributeDBSystemPervasive = "pervasive" + // PointBase + AttributeDBSystemPointbase = "pointbase" + // SQLite + AttributeDBSystemSqlite = "sqlite" + // Sybase + AttributeDBSystemSybase = "sybase" + // Teradata + AttributeDBSystemTeradata = "teradata" + // Vertica + AttributeDBSystemVertica = "vertica" + // H2 + AttributeDBSystemH2 = "h2" + // ColdFusion IMQ + AttributeDBSystemColdfusion = "coldfusion" + // Apache Cassandra + AttributeDBSystemCassandra = "cassandra" + // Apache HBase + AttributeDBSystemHBase = "hbase" + // MongoDB + AttributeDBSystemMongoDB = "mongodb" + // Redis + AttributeDBSystemRedis = "redis" + // Couchbase + AttributeDBSystemCouchbase = "couchbase" + // CouchDB + AttributeDBSystemCouchDB = "couchdb" + // Microsoft Azure Cosmos DB + AttributeDBSystemCosmosDB = "cosmosdb" + // Amazon DynamoDB + AttributeDBSystemDynamoDB = "dynamodb" + // Neo4j + AttributeDBSystemNeo4j = "neo4j" + // Apache Geode + AttributeDBSystemGeode = "geode" + // Elasticsearch + AttributeDBSystemElasticsearch = "elasticsearch" + // Memcached + AttributeDBSystemMemcached = "memcached" + // CockroachDB + AttributeDBSystemCockroachdb = "cockroachdb" + // OpenSearch + AttributeDBSystemOpensearch = "opensearch" + // ClickHouse + AttributeDBSystemClickhouse = "clickhouse" + // Cloud Spanner + AttributeDBSystemSpanner = "spanner" + // Trino + AttributeDBSystemTrino = "trino" +) + +// Attributes for software deployments. +const ( + // Name of the deployment environment (aka deployment tier). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'staging', 'production' + // Note: deployment.environment does not affect the uniqueness constraints defined + // through + // the service.namespace, service.name and service.instance.id resource + // attributes. + // This implies that resources carrying the following attribute combinations MUST + // be + // considered to be identifying the same service:
    + //
  • service.name=frontend, deployment.environment=production
  • + //
  • service.name=frontend, deployment.environment=staging.
  • + //
+ AttributeDeploymentEnvironment = "deployment.environment" +) + +// "Describes deprecated db attributes." +const ( + // Deprecated, use server.address, server.port attributes instead. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Deprecated: "Replaced by `server.address` and `server.port`." + // Examples: 'Server=(localdb)\\v11.0;Integrated Security=true;' + AttributeDBConnectionString = "db.connection_string" + // Deprecated, use db.instance.id instead. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Deprecated: Replaced by `db.instance.id`. + // Examples: 'instance-0000000001' + AttributeDBElasticsearchNodeName = "db.elasticsearch.node.name" + // Removed, no replacement at this time. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Deprecated: Removed as not used. + // Examples: 'org.postgresql.Driver', + // 'com.microsoft.sqlserver.jdbc.SQLServerDriver' + AttributeDBJDBCDriverClassname = "db.jdbc.driver_classname" +) + +// Describes deprecated HTTP attributes. +const ( + // Deprecated, use network.protocol.name instead. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Deprecated: Replaced by `network.protocol.name`. + AttributeHTTPFlavor = "http.flavor" + // Deprecated, use http.request.method instead. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Deprecated: Replaced by `http.request.method`. + // Examples: 'GET', 'POST', 'HEAD' + AttributeHTTPMethod = "http.method" + // Deprecated, use http.request.header.content-length instead. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Deprecated: Replaced by `http.request.header.content-length`. + // Examples: 3495 + AttributeHTTPRequestContentLength = "http.request_content_length" + // Deprecated, use http.response.header.content-length instead. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Deprecated: Replaced by `http.response.header.content-length`. + // Examples: 3495 + AttributeHTTPResponseContentLength = "http.response_content_length" + // Deprecated, use url.scheme instead. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Deprecated: Replaced by `url.scheme` instead. + // Examples: 'http', 'https' + AttributeHTTPScheme = "http.scheme" + // Deprecated, use http.response.status_code instead. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Deprecated: Replaced by `http.response.status_code`. + // Examples: 200 + AttributeHTTPStatusCode = "http.status_code" + // Deprecated, use url.path and url.query instead. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Deprecated: Split to `url.path` and `url.query. + // Examples: '/search?q=OpenTelemetry#SemConv' + AttributeHTTPTarget = "http.target" + // Deprecated, use url.full instead. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Deprecated: Replaced by `url.full`. + // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv' + AttributeHTTPURL = "http.url" + // Deprecated, use user_agent.original instead. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Deprecated: Replaced by `user_agent.original`. + // Examples: 'CERN-LineMode/2.15 libwww/2.17b3', 'Mozilla/5.0 (iPhone; CPU iPhone + // OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) + // Version/14.1.2 Mobile/15E148 Safari/604.1' + AttributeHTTPUserAgent = "http.user_agent" +) + +const ( + // HTTP/1.0 + AttributeHTTPFlavorHTTP10 = "1.0" + // HTTP/1.1 + AttributeHTTPFlavorHTTP11 = "1.1" + // HTTP/2 + AttributeHTTPFlavorHTTP20 = "2.0" + // HTTP/3 + AttributeHTTPFlavorHTTP30 = "3.0" + // SPDY protocol + AttributeHTTPFlavorSPDY = "SPDY" + // QUIC protocol + AttributeHTTPFlavorQUIC = "QUIC" +) + +// Describes deprecated messaging attributes. +const ( + // "Deprecated, use messaging.destination.partition.id instead." + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Deprecated: Replaced by `messaging.destination.partition.id`. + // Examples: 2 + AttributeMessagingKafkaDestinationPartition = "messaging.kafka.destination.partition" +) + +// These attributes may be used for any network related operation. +const ( + // Deprecated, use server.address. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Deprecated: Replaced by `server.address`. + // Examples: 'example.com' + AttributeNetHostName = "net.host.name" + // Deprecated, use server.port. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Deprecated: Replaced by `server.port`. + // Examples: 8080 + AttributeNetHostPort = "net.host.port" + // Deprecated, use server.address on client spans and client.address on server + // spans. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Deprecated: Replaced by `server.address` on client spans and `client.address` + // on server spans. + // Examples: 'example.com' + AttributeNetPeerName = "net.peer.name" + // Deprecated, use server.port on client spans and client.port on server spans. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Deprecated: Replaced by `server.port` on client spans and `client.port` on + // server spans. + // Examples: 8080 + AttributeNetPeerPort = "net.peer.port" + // Deprecated, use network.protocol.name. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Deprecated: Replaced by `network.protocol.name`. + // Examples: 'amqp', 'http', 'mqtt' + AttributeNetProtocolName = "net.protocol.name" + // Deprecated, use network.protocol.version. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Deprecated: Replaced by `network.protocol.version`. + // Examples: '3.1.1' + AttributeNetProtocolVersion = "net.protocol.version" + // Deprecated, use network.transport and network.type. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Deprecated: Split to `network.transport` and `network.type`. + AttributeNetSockFamily = "net.sock.family" + // Deprecated, use network.local.address. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Deprecated: Replaced by `network.local.address`. + // Examples: '/var/my.sock' + AttributeNetSockHostAddr = "net.sock.host.addr" + // Deprecated, use network.local.port. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Deprecated: Replaced by `network.local.port`. + // Examples: 8080 + AttributeNetSockHostPort = "net.sock.host.port" + // Deprecated, use network.peer.address. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Deprecated: Replaced by `network.peer.address`. + // Examples: '192.168.0.1' + AttributeNetSockPeerAddr = "net.sock.peer.addr" + // Deprecated, no replacement at this time. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Deprecated: Removed. + // Examples: '/var/my.sock' + AttributeNetSockPeerName = "net.sock.peer.name" + // Deprecated, use network.peer.port. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Deprecated: Replaced by `network.peer.port`. + // Examples: 65531 + AttributeNetSockPeerPort = "net.sock.peer.port" + // Deprecated, use network.transport. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Deprecated: Replaced by `network.transport`. + AttributeNetTransport = "net.transport" +) + +const ( + // IPv4 address + AttributeNetSockFamilyInet = "inet" + // IPv6 address + AttributeNetSockFamilyInet6 = "inet6" + // Unix domain socket path + AttributeNetSockFamilyUnix = "unix" +) + +const ( + // ip_tcp + AttributeNetTransportTCP = "ip_tcp" + // ip_udp + AttributeNetTransportUDP = "ip_udp" + // Named or anonymous pipe + AttributeNetTransportPipe = "pipe" + // In-process communication + AttributeNetTransportInProc = "inproc" + // Something else (non IP-based) + AttributeNetTransportOther = "other" +) + +// Deprecated system attributes. +const ( + // Deprecated, use system.process.status instead. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Deprecated: Replaced by `system.process.status`. + // Examples: 'running' + AttributeSystemProcessesStatus = "system.processes.status" +) + +const ( + // running + AttributeSystemProcessesStatusRunning = "running" + // sleeping + AttributeSystemProcessesStatusSleeping = "sleeping" + // stopped + AttributeSystemProcessesStatusStopped = "stopped" + // defunct + AttributeSystemProcessesStatusDefunct = "defunct" +) + +// These attributes may be used to describe the receiver of a network +// exchange/packet. These should be used when there is no client/server +// relationship between the two sides, or when that relationship is unknown. +// This covers low-level network interactions (e.g. packet tracing) where you +// don't know if there was a connection or which side initiated it. This also +// covers unidirectional UDP flows and peer-to-peer communication where the +// "user-facing" surface of the protocol / API doesn't expose a clear notion of +// client and server. +const ( + // Destination address - domain name if available without reverse DNS lookup; + // otherwise, IP address or Unix domain socket name. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'destination.example.com', '10.1.2.80', '/tmp/my.sock' + // Note: When observed from the source side, and when communicating through an + // intermediary, destination.address SHOULD represent the destination address + // behind any intermediaries, for example proxies, if it's available. + AttributeDestinationAddress = "destination.address" + // Destination port number + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 3389, 2888 + AttributeDestinationPort = "destination.port" +) + +// Describes device attributes. +const ( + // A unique identifier representing the device + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '2ab2916d-a51f-4ac8-80ee-45ac31a28092' + // Note: The device identifier MUST only be defined using the values outlined + // below. This value is not an advertising identifier and MUST NOT be used as + // such. On iOS (Swift or Objective-C), this value MUST be equal to the vendor + // identifier. On Android (Java or Kotlin), this value MUST be equal to the + // Firebase Installation ID or a globally unique UUID which is persisted across + // sessions in your application. More information can be found here on best + // practices and exact implementation details. Caution should be taken when + // storing personal data or anything which can identify a user. GDPR and data + // protection laws may apply, ensure you do your own due diligence. + AttributeDeviceID = "device.id" + // The name of the device manufacturer + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Apple', 'Samsung' + // Note: The Android OS provides this field via Build. iOS apps SHOULD hardcode + // the value Apple. + AttributeDeviceManufacturer = "device.manufacturer" + // The model identifier for the device + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'iPhone3,4', 'SM-G920F' + // Note: It's recommended this value represents a machine-readable version of the + // model identifier rather than the market or consumer-friendly name of the + // device. + AttributeDeviceModelIdentifier = "device.model.identifier" + // The marketing name for the device model + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'iPhone 6s Plus', 'Samsung Galaxy S6' + // Note: It's recommended this value represents a human-readable version of the + // device model rather than a machine-readable alternative. + AttributeDeviceModelName = "device.model.name" +) + +// These attributes may be used for any disk related operation. +const ( + // The disk IO operation direction. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Examples: 'read' + AttributeDiskIoDirection = "disk.io.direction" +) + +const ( + // read + AttributeDiskIoDirectionRead = "read" + // write + AttributeDiskIoDirectionWrite = "write" +) + +// The shared attributes used to report a DNS query. +const ( + // The name being queried. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'www.example.com', 'opentelemetry.io' + // Note: If the name field contains non-printable characters (below 32 or above + // 126), those characters should be represented as escaped base 10 integers + // (\DDD). Back slashes and quotes should be escaped. Tabs, carriage returns, and + // line feeds should be converted to \t, \r, and \n respectively. + AttributeDNSQuestionName = "dns.question.name" +) + +// Attributes for operations with an authenticated and/or authorized enduser. +const ( + // Username or client_id extracted from the access token or Authorization header + // in the inbound request from outside the system. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'username' + AttributeEnduserID = "enduser.id" + // Actual/assumed role the client is making the request under extracted from token + // or application security context. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'admin' + AttributeEnduserRole = "enduser.role" + // Scopes or granted authorities the client currently possesses extracted from + // token or application security context. The value would come from the scope + // associated with an OAuth 2.0 Access Token or an attribute value in a SAML 2.0 + // Assertion. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'read:message, write:files' + AttributeEnduserScope = "enduser.scope" +) + +// The shared attributes used to report an error. +const ( + // Describes a class of error the operation ended with. + // + // Type: Enum + // Requirement Level: Optional + // Stability: stable + // Examples: 'timeout', 'java.net.UnknownHostException', + // 'server_certificate_invalid', '500' + // Note: The error.type SHOULD be predictable and SHOULD have low cardinality. + // Instrumentations SHOULD document the list of errors they report.The cardinality + // of error.type within one instrumentation library SHOULD be low. + // Telemetry consumers that aggregate data from multiple instrumentation libraries + // and applications + // should be prepared for error.type to have high cardinality at query time when + // no + // additional filters are applied.If the operation has completed successfully, + // instrumentations SHOULD NOT set error.type.If a specific domain defines its own + // set of error identifiers (such as HTTP or gRPC status codes), + // it's RECOMMENDED to:
    + //
  • Use a domain-specific attribute
  • + //
  • Set error.type to capture all errors, regardless of whether they are + // defined within the domain-specific set or not.
  • + //
+ AttributeErrorType = "error.type" +) + +const ( + // A fallback error value to be used when the instrumentation doesn't define a custom value + AttributeErrorTypeOther = "_OTHER" +) + +// The shared attributes used to report a single exception associated with a +// span or log. +const ( + // SHOULD be set to true if the exception event is recorded at a point where it is + // known that the exception is escaping the scope of the span. + // + // Type: boolean + // Requirement Level: Optional + // Stability: stable + // Note: An exception is considered to have escaped (or left) the scope of a span, + // if that span is ended while the exception is still logically "in + // flight". + // This may be actually "in flight" in some languages (e.g. if the + // exception + // is passed to a Context manager's __exit__ method in Python) but will + // usually be caught at the point of recording the exception in most languages.It + // is usually not possible to determine at the point where an exception is thrown + // whether it will escape the scope of a span. + // However, it is trivial to know that an exception + // will escape, if one checks for an active exception just before ending the span, + // as done in the example for recording span exceptions.It follows that an + // exception may still escape the scope of the span + // even if the exception.escaped attribute was not set or set to false, + // since the event might have been recorded at a time where it was not + // clear whether the exception will escape. + AttributeExceptionEscaped = "exception.escaped" + // The exception message. + // + // Type: string + // Requirement Level: Optional + // Stability: stable + // Examples: 'Division by zero', "Can't convert 'int' object to str implicitly" + AttributeExceptionMessage = "exception.message" + // A stacktrace as a string in the natural representation for the language + // runtime. The representation is to be determined and documented by each language + // SIG. + // + // Type: string + // Requirement Level: Optional + // Stability: stable + // Examples: 'Exception in thread "main" java.lang.RuntimeException: Test + // exception\\n at ' + // 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' + // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' + // 'com.example.GenerateTrace.main(GenerateTrace.java:5)' + AttributeExceptionStacktrace = "exception.stacktrace" + // The type of the exception (its fully-qualified class name, if applicable). The + // dynamic type of the exception should be preferred over the static type in + // languages that support it. + // + // Type: string + // Requirement Level: Optional + // Stability: stable + // Examples: 'java.net.ConnectException', 'OSError' + AttributeExceptionType = "exception.type" +) + +// FaaS attributes +const ( + // A boolean that is true if the serverless function is executed for the first + // time (aka cold-start). + // + // Type: boolean + // Requirement Level: Optional + // Stability: experimental + AttributeFaaSColdstart = "faas.coldstart" + // A string containing the schedule period as Cron Expression. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '0/5 * * * ? *' + AttributeFaaSCron = "faas.cron" + // The name of the source on which the triggering operation was performed. For + // example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos + // DB to the database name. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'myBucketName', 'myDBName' + AttributeFaaSDocumentCollection = "faas.document.collection" + // The document name/table subjected to the operation. For example, in Cloud + // Storage or S3 is the name of the file, and in Cosmos DB the table name. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'myFile.txt', 'myTableName' + AttributeFaaSDocumentName = "faas.document.name" + // Describes the type of the operation that was performed on the data. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeFaaSDocumentOperation = "faas.document.operation" + // A string containing the time when the data was accessed in the ISO 8601 format + // expressed in UTC. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '2020-01-23T13:47:06Z' + AttributeFaaSDocumentTime = "faas.document.time" + // The execution environment ID as a string, that will be potentially reused for + // other invocations to the same function/function version. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de' + // Note:
    + //
  • AWS Lambda: Use the (full) log stream name.
  • + //
+ AttributeFaaSInstance = "faas.instance" + // The invocation ID of the current function invocation. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28' + AttributeFaaSInvocationID = "faas.invocation_id" + // The name of the invoked function. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'my-function' + // Note: SHOULD be equal to the faas.name resource attribute of the invoked + // function. + AttributeFaaSInvokedName = "faas.invoked_name" + // The cloud provider of the invoked function. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Note: SHOULD be equal to the cloud.provider resource attribute of the invoked + // function. + AttributeFaaSInvokedProvider = "faas.invoked_provider" + // The cloud region of the invoked function. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'eu-central-1' + // Note: SHOULD be equal to the cloud.region resource attribute of the invoked + // function. + AttributeFaaSInvokedRegion = "faas.invoked_region" + // The amount of memory available to the serverless function converted to Bytes. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 134217728 + // Note: It's recommended to set this attribute since e.g. too little memory can + // easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, + // the environment variable AWS_LAMBDA_FUNCTION_MEMORY_SIZE provides this + // information (which must be multiplied by 1,048,576). + AttributeFaaSMaxMemory = "faas.max_memory" + // The name of the single function that this runtime instance executes. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'my-function', 'myazurefunctionapp/some-function-name' + // Note: This is the name of the function as configured/deployed on the FaaS + // platform and is usually different from the name of the callback + // function (which may be stored in the + // code.namespace/code.function + // span attributes).For some cloud providers, the above definition is ambiguous. + // The following + // definition of function name MUST be used for this attribute + // (and consequently the span name) for the listed cloud providers/products:
    + //
  • Azure: The full name /, i.e., function app name + // followed by a forward slash followed by the function name (this form + // can also be seen in the resource JSON for the function). + // This means that a span attribute MUST be used, as an Azure function + // app can host multiple functions that would usually share + // a TracerProvider (see also the cloud.resource_id attribute).
  • + //
+ AttributeFaaSName = "faas.name" + // A string containing the function invocation time in the ISO 8601 format + // expressed in UTC. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '2020-01-23T13:47:06Z' + AttributeFaaSTime = "faas.time" + // Type of the trigger which caused this function invocation. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeFaaSTrigger = "faas.trigger" + // The immutable version of the function being executed. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '26', 'pinkfroid-00002' + // Note: Depending on the cloud provider and platform, use:
    + //
  • AWS Lambda: The function version + // (an integer represented as a decimal string).
  • + //
  • Google Cloud Run (Services): The revision + // (i.e., the function name plus the revision suffix).
  • + //
  • Google Cloud Functions: The value of the + // K_REVISION environment variable.
  • + //
  • Azure Functions: Not applicable. Do not set this attribute.
  • + //
+ AttributeFaaSVersion = "faas.version" +) + +const ( + // When a new object is created + AttributeFaaSDocumentOperationInsert = "insert" + // When an object is modified + AttributeFaaSDocumentOperationEdit = "edit" + // When an object is deleted + AttributeFaaSDocumentOperationDelete = "delete" +) + +const ( + // Alibaba Cloud + AttributeFaaSInvokedProviderAlibabaCloud = "alibaba_cloud" + // Amazon Web Services + AttributeFaaSInvokedProviderAWS = "aws" + // Microsoft Azure + AttributeFaaSInvokedProviderAzure = "azure" + // Google Cloud Platform + AttributeFaaSInvokedProviderGCP = "gcp" + // Tencent Cloud + AttributeFaaSInvokedProviderTencentCloud = "tencent_cloud" +) + +const ( + // A response to some data source operation such as a database or filesystem read/write + AttributeFaaSTriggerDatasource = "datasource" + // To provide an answer to an inbound HTTP request + AttributeFaaSTriggerHTTP = "http" + // A function is set to be executed when messages are sent to a messaging system + AttributeFaaSTriggerPubsub = "pubsub" + // A function is scheduled to be executed regularly + AttributeFaaSTriggerTimer = "timer" + // If none of the others apply + AttributeFaaSTriggerOther = "other" +) + +// Attributes for Feature Flags. +const ( + // The unique identifier of the feature flag. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'logo-color' + AttributeFeatureFlagKey = "feature_flag.key" + // The name of the service provider that performs the flag evaluation. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Flag Manager' + AttributeFeatureFlagProviderName = "feature_flag.provider_name" + // SHOULD be a semantic identifier for a value. If one is unavailable, a + // stringified version of the value can be used. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'red', 'true', 'on' + // Note: A semantic identifier, commonly referred to as a variant, provides a + // means + // for referring to a value without including the value itself. This can + // provide additional context for understanding the meaning behind a value. + // For example, the variant red maybe be used for the value #c05543.A stringified + // version of the value can be used in situations where a + // semantic identifier is unavailable. String representation of the value + // should be determined by the implementer. + AttributeFeatureFlagVariant = "feature_flag.variant" +) + +// Describes file attributes. +const ( + // Directory where the file is located. It should include the drive letter, when + // appropriate. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '/home/user', 'C:\\Program Files\\MyApp' + AttributeFileDirectory = "file.directory" + // File extension, excluding the leading dot. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'png', 'gz' + // Note: When the file name has multiple extensions (example.tar.gz), only the + // last one should be captured ("gz", not "tar.gz"). + AttributeFileExtension = "file.extension" + // Name of the file including the extension, without the directory. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'example.png' + AttributeFileName = "file.name" + // Full path to the file, including the file name. It should include the drive + // letter, when appropriate. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '/home/alice/example.png', 'C:\\Program Files\\MyApp\\myapp.exe' + AttributeFilePath = "file.path" + // File size in bytes. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + AttributeFileSize = "file.size" +) + +// Attributes for Google Cloud Run. +const ( + // The name of the Cloud Run execution being run for the Job, as set by the + // CLOUD_RUN_EXECUTION environment variable. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'job-name-xxxx', 'sample-job-mdw84' + AttributeGCPCloudRunJobExecution = "gcp.cloud_run.job.execution" + // The index for a task within an execution as provided by the + // CLOUD_RUN_TASK_INDEX environment variable. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 0, 1 + AttributeGCPCloudRunJobTaskIndex = "gcp.cloud_run.job.task_index" +) + +// Attributes for Google Compute Engine (GCE). +const ( + // The hostname of a GCE instance. This is the full value of the default or custom + // hostname. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'my-host1234.example.com', 'sample-vm.us-west1-b.c.my- + // project.internal' + AttributeGCPGceInstanceHostname = "gcp.gce.instance.hostname" + // The instance name of a GCE instance. This is the value provided by host.name, + // the visible name of the instance in the Cloud Console UI, and the prefix for + // the default hostname of the instance as defined by the default internal DNS + // name. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'instance-1', 'my-vm-name' + AttributeGCPGceInstanceName = "gcp.gce.instance.name" +) + +// A host is defined as a computing instance. For example, physical servers, +// virtual machines, switches or disk array. +const ( + // The CPU architecture the host system is running on. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeHostArch = "host.arch" + // The amount of level 2 memory cache available to the processor (in Bytes). + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 12288000 + AttributeHostCPUCacheL2Size = "host.cpu.cache.l2.size" + // Family or generation of the CPU. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '6', 'PA-RISC 1.1e' + AttributeHostCPUFamily = "host.cpu.family" + // Model identifier. It provides more granular information about the CPU, + // distinguishing it from other CPUs within the same family. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '6', '9000/778/B180L' + AttributeHostCPUModelID = "host.cpu.model.id" + // Model designation of the processor. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz' + AttributeHostCPUModelName = "host.cpu.model.name" + // Stepping or core revisions. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '1', 'r1p1' + AttributeHostCPUStepping = "host.cpu.stepping" + // Processor manufacturer identifier. A maximum 12-character string. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'GenuineIntel' + // Note: CPUID command returns the vendor ID string in EBX, EDX and ECX registers. + // Writing these to memory in this order results in a 12-character string. + AttributeHostCPUVendorID = "host.cpu.vendor.id" + // Unique host ID. For Cloud, this must be the instance_id assigned by the cloud + // provider. For non-containerized systems, this should be the machine-id. See the + // table below for the sources to use to determine the machine-id based on + // operating system. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'fdbf79e8af94cb7f9e8df36789187052' + AttributeHostID = "host.id" + // VM image ID or host OS image ID. For Cloud, this value is from the provider. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'ami-07b06b442921831e5' + AttributeHostImageID = "host.image.id" + // Name of the VM image or OS install the host was instantiated from. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905' + AttributeHostImageName = "host.image.name" + // The version string of the VM image or host OS as defined in Version Attributes. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '0.1' + AttributeHostImageVersion = "host.image.version" + // Available IP addresses of the host, excluding loopback interfaces. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: '192.168.1.140', 'fe80::abc2:4a28:737a:609e' + // Note: IPv4 Addresses MUST be specified in dotted-quad notation. IPv6 addresses + // MUST be specified in the RFC 5952 format. + AttributeHostIP = "host.ip" + // Available MAC addresses of the host, excluding loopback interfaces. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: 'AC-DE-48-23-45-67', 'AC-DE-48-23-45-67-01-9F' + // Note: MAC Addresses MUST be represented in IEEE RA hexadecimal form: as hyphen- + // separated octets in uppercase hexadecimal form from most to least significant. + AttributeHostMac = "host.mac" + // Name of the host. On Unix systems, it may contain what the hostname command + // returns, or the fully qualified hostname, or another name specified by the + // user. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry-test' + AttributeHostName = "host.name" + // Type of host. For Cloud, this must be the machine type. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'n1-standard-1' + AttributeHostType = "host.type" +) + +const ( + // AMD64 + AttributeHostArchAMD64 = "amd64" + // ARM32 + AttributeHostArchARM32 = "arm32" + // ARM64 + AttributeHostArchARM64 = "arm64" + // Itanium + AttributeHostArchIA64 = "ia64" + // 32-bit PowerPC + AttributeHostArchPPC32 = "ppc32" + // 64-bit PowerPC + AttributeHostArchPPC64 = "ppc64" + // IBM z/Architecture + AttributeHostArchS390x = "s390x" + // 32-bit x86 + AttributeHostArchX86 = "x86" +) + +// Semantic convention attributes in the HTTP namespace. +const ( + // State of the HTTP connection in the HTTP connection pool. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Examples: 'active', 'idle' + AttributeHTTPConnectionState = "http.connection.state" + // The size of the request payload body in bytes. This is the number of bytes + // transferred excluding headers and is often, but not always, present as the + // Content-Length header. For requests using transport encoding, this should be + // the compressed size. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 3495 + AttributeHTTPRequestBodySize = "http.request.body.size" + // HTTP request method. + // + // Type: Enum + // Requirement Level: Optional + // Stability: stable + // Examples: 'GET', 'POST', 'HEAD' + // Note: HTTP request method value SHOULD be "known" to the + // instrumentation. + // By default, this convention defines "known" methods as the ones + // listed in RFC9110 + // and the PATCH method defined in RFC5789.If the HTTP request method is not known + // to instrumentation, it MUST set the http.request.method attribute to _OTHER.If + // the HTTP instrumentation could end up converting valid HTTP request methods to + // _OTHER, then it MUST provide a way to override + // the list of known HTTP methods. If this override is done via environment + // variable, then the environment variable MUST be named + // OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of + // case-sensitive known HTTP methods + // (this list MUST be a full override of the default known method, it is not a + // list of known methods in addition to the defaults).HTTP method names are case- + // sensitive and http.request.method attribute value MUST match a known HTTP + // method name exactly. + // Instrumentations for specific web frameworks that consider HTTP methods to be + // case insensitive, SHOULD populate a canonical equivalent. + // Tracing instrumentations that do so, MUST also set http.request.method_original + // to the original value. + AttributeHTTPRequestMethod = "http.request.method" + // Original HTTP method sent by the client in the request line. + // + // Type: string + // Requirement Level: Optional + // Stability: stable + // Examples: 'GeT', 'ACL', 'foo' + AttributeHTTPRequestMethodOriginal = "http.request.method_original" + // The ordinal number of request resending attempt (for any reason, including + // redirects). + // + // Type: int + // Requirement Level: Optional + // Stability: stable + // Examples: 3 + // Note: The resend count SHOULD be updated each time an HTTP request gets resent + // by the client, regardless of what was the cause of the resending (e.g. + // redirection, authorization failure, 503 Server Unavailable, network issues, or + // any other). + AttributeHTTPRequestResendCount = "http.request.resend_count" + // The total size of the request in bytes. This should be the total number of + // bytes sent over the wire, including the request line (HTTP/1.1), framing + // (HTTP/2 and HTTP/3), headers, and request body if any. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 1437 + AttributeHTTPRequestSize = "http.request.size" + // The size of the response payload body in bytes. This is the number of bytes + // transferred excluding headers and is often, but not always, present as the + // Content-Length header. For requests using transport encoding, this should be + // the compressed size. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 3495 + AttributeHTTPResponseBodySize = "http.response.body.size" + // The total size of the response in bytes. This should be the total number of + // bytes sent over the wire, including the status line (HTTP/1.1), framing (HTTP/2 + // and HTTP/3), headers, and response body and trailers if any. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 1437 + AttributeHTTPResponseSize = "http.response.size" + // HTTP response status code. + // + // Type: int + // Requirement Level: Optional + // Stability: stable + // Examples: 200 + AttributeHTTPResponseStatusCode = "http.response.status_code" + // The matched route, that is, the path template in the format used by the + // respective server framework. + // + // Type: string + // Requirement Level: Optional + // Stability: stable + // Examples: '/users/:userID?', '{controller}/{action}/{id?}' + // Note: MUST NOT be populated when this is not supported by the HTTP server + // framework as the route attribute should have low-cardinality and the URI path + // can NOT substitute it. + // SHOULD include the application root if there is one. + AttributeHTTPRoute = "http.route" +) + +const ( + // active state + AttributeHTTPConnectionStateActive = "active" + // idle state + AttributeHTTPConnectionStateIdle = "idle" +) + +const ( + // CONNECT method + AttributeHTTPRequestMethodConnect = "CONNECT" + // DELETE method + AttributeHTTPRequestMethodDelete = "DELETE" + // GET method + AttributeHTTPRequestMethodGet = "GET" + // HEAD method + AttributeHTTPRequestMethodHead = "HEAD" + // OPTIONS method + AttributeHTTPRequestMethodOptions = "OPTIONS" + // PATCH method + AttributeHTTPRequestMethodPatch = "PATCH" + // POST method + AttributeHTTPRequestMethodPost = "POST" + // PUT method + AttributeHTTPRequestMethodPut = "PUT" + // TRACE method + AttributeHTTPRequestMethodTrace = "TRACE" + // Any HTTP method that the instrumentation has no prior knowledge of + AttributeHTTPRequestMethodOther = "_OTHER" +) + +// Kubernetes resource attributes. +const ( + // The name of the cluster. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry-cluster' + AttributeK8SClusterName = "k8s.cluster.name" + // A pseudo-ID for the cluster, set to the UID of the kube-system namespace. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '218fc5a9-a5f1-4b54-aa05-46717d0ab26d' + // Note: K8S doesn't have support for obtaining a cluster ID. If this is ever + // added, we will recommend collecting the k8s.cluster.uid through the + // official APIs. In the meantime, we are able to use the uid of the + // kube-system namespace as a proxy for cluster ID. Read on for the + // rationale.Every object created in a K8S cluster is assigned a distinct UID. The + // kube-system namespace is used by Kubernetes itself and will exist + // for the lifetime of the cluster. Using the uid of the kube-system + // namespace is a reasonable proxy for the K8S ClusterID as it will only + // change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are + // UUIDs as standardized by + // ISO/IEC 9834-8 and ITU-T X.667. + // Which states:
+ // If generated according to one of the mechanisms defined in Rec.
+ // ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be + // different from all other UUIDs generated before 3603 A.D., or is + // extremely likely to be different (depending on the mechanism + // chosen).Therefore, UIDs between clusters should be extremely unlikely to + // conflict. + AttributeK8SClusterUID = "k8s.cluster.uid" + // The name of the Container from Pod specification, must be unique within a Pod. + // Container runtime usually uses different globally unique name (container.name). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'redis' + AttributeK8SContainerName = "k8s.container.name" + // Number of times the container was restarted. This attribute can be used to + // identify a particular container (running or stopped) within a container spec. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 0, 2 + AttributeK8SContainerRestartCount = "k8s.container.restart_count" + // The name of the CronJob. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry' + AttributeK8SCronJobName = "k8s.cronjob.name" + // The UID of the CronJob. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + AttributeK8SCronJobUID = "k8s.cronjob.uid" + // The name of the DaemonSet. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry' + AttributeK8SDaemonSetName = "k8s.daemonset.name" + // The UID of the DaemonSet. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + AttributeK8SDaemonSetUID = "k8s.daemonset.uid" + // The name of the Deployment. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry' + AttributeK8SDeploymentName = "k8s.deployment.name" + // The UID of the Deployment. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + AttributeK8SDeploymentUID = "k8s.deployment.uid" + // The name of the Job. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry' + AttributeK8SJobName = "k8s.job.name" + // The UID of the Job. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + AttributeK8SJobUID = "k8s.job.uid" + // The name of the namespace that the pod is running in. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'default' + AttributeK8SNamespaceName = "k8s.namespace.name" + // The name of the Node. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'node-1' + AttributeK8SNodeName = "k8s.node.name" + // The UID of the Node. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2' + AttributeK8SNodeUID = "k8s.node.uid" + // The name of the Pod. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry-pod-autoconf' + AttributeK8SPodName = "k8s.pod.name" + // The UID of the Pod. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + AttributeK8SPodUID = "k8s.pod.uid" + // The name of the ReplicaSet. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry' + AttributeK8SReplicaSetName = "k8s.replicaset.name" + // The UID of the ReplicaSet. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + AttributeK8SReplicaSetUID = "k8s.replicaset.uid" + // The name of the StatefulSet. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry' + AttributeK8SStatefulSetName = "k8s.statefulset.name" + // The UID of the StatefulSet. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + AttributeK8SStatefulSetUID = "k8s.statefulset.uid" +) + +// Attributes describing telemetry around messaging systems and messaging +// activities. +const ( + // The number of messages sent, received, or processed in the scope of the + // batching operation. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 0, 1, 2 + // Note: Instrumentations SHOULD NOT set messaging.batch.message_count on spans + // that operate with a single message. When a messaging client library supports + // both batch and single-message API for the same operation, instrumentations + // SHOULD use messaging.batch.message_count for batching APIs and SHOULD NOT use + // it for single-message APIs. + AttributeMessagingBatchMessageCount = "messaging.batch.message_count" + // A unique identifier for the client that consumes or produces a message. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'client-5', 'myhost@8742@s8083jm' + AttributeMessagingClientID = "messaging.client_id" + // A boolean that is true if the message destination is anonymous (could be + // unnamed or have auto-generated name). + // + // Type: boolean + // Requirement Level: Optional + // Stability: experimental + AttributeMessagingDestinationAnonymous = "messaging.destination.anonymous" + // The message destination name + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'MyQueue', 'MyTopic' + // Note: Destination name SHOULD uniquely identify a specific queue, topic or + // other entity within the broker. If + // the broker doesn't have such notion, the destination name SHOULD uniquely + // identify the broker. + AttributeMessagingDestinationName = "messaging.destination.name" + // The identifier of the partition messages are sent to or received from, unique + // within the messaging.destination.name. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '1' + AttributeMessagingDestinationPartitionID = "messaging.destination.partition.id" + // Low cardinality representation of the messaging destination name + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '/customers/{customerID}' + // Note: Destination names could be constructed from templates. An example would + // be a destination name involving a user name or product id. Although the + // destination name in this case is of high cardinality, the underlying template + // is of low cardinality and can be effectively used for grouping and aggregation. + AttributeMessagingDestinationTemplate = "messaging.destination.template" + // A boolean that is true if the message destination is temporary and might not + // exist anymore after messages are processed. + // + // Type: boolean + // Requirement Level: Optional + // Stability: experimental + AttributeMessagingDestinationTemporary = "messaging.destination.temporary" + // A boolean that is true if the publish message destination is anonymous (could + // be unnamed or have auto-generated name). + // + // Type: boolean + // Requirement Level: Optional + // Stability: experimental + AttributeMessagingDestinationPublishAnonymous = "messaging.destination_publish.anonymous" + // The name of the original destination the message was published to + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'MyQueue', 'MyTopic' + // Note: The name SHOULD uniquely identify a specific queue, topic, or other + // entity within the broker. If + // the broker doesn't have such notion, the original destination name SHOULD + // uniquely identify the broker. + AttributeMessagingDestinationPublishName = "messaging.destination_publish.name" + // The name of the consumer group the event consumer is associated with. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'indexer' + AttributeMessagingEventhubsConsumerGroup = "messaging.eventhubs.consumer.group" + // The UTC epoch seconds at which the message has been accepted and stored in the + // entity. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 1701393730 + AttributeMessagingEventhubsMessageEnqueuedTime = "messaging.eventhubs.message.enqueued_time" + // The ordering key for a given message. If the attribute is not present, the + // message does not have an ordering key. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'ordering_key' + AttributeMessagingGCPPubsubMessageOrderingKey = "messaging.gcp_pubsub.message.ordering_key" + // Name of the Kafka Consumer Group that is handling the message. Only applies to + // consumers, not producers. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'my-group' + AttributeMessagingKafkaConsumerGroup = "messaging.kafka.consumer.group" + // Message keys in Kafka are used for grouping alike messages to ensure they're + // processed on the same partition. They differ from messaging.message.id in that + // they're not unique. If the key is null, the attribute MUST NOT be set. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'myKey' + // Note: If the key type is not string, it's string representation has to be + // supplied for the attribute. If the key has no unambiguous, canonical string + // form, don't include its value. + AttributeMessagingKafkaMessageKey = "messaging.kafka.message.key" + // The offset of a record in the corresponding Kafka partition. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 42 + AttributeMessagingKafkaMessageOffset = "messaging.kafka.message.offset" + // A boolean that is true if the message is a tombstone. + // + // Type: boolean + // Requirement Level: Optional + // Stability: experimental + AttributeMessagingKafkaMessageTombstone = "messaging.kafka.message.tombstone" + // The size of the message body in bytes. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 1439 + // Note: This can refer to both the compressed or uncompressed body size. If both + // sizes are known, the uncompressed + // body size should be used. + AttributeMessagingMessageBodySize = "messaging.message.body.size" + // The conversation ID identifying the conversation to which the message belongs, + // represented as a string. Sometimes called "Correlation ID". + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'MyConversationID' + AttributeMessagingMessageConversationID = "messaging.message.conversation_id" + // The size of the message body and metadata in bytes. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 2738 + // Note: This can refer to both the compressed or uncompressed size. If both sizes + // are known, the uncompressed + // size should be used. + AttributeMessagingMessageEnvelopeSize = "messaging.message.envelope.size" + // A value used by the messaging system as an identifier for the message, + // represented as a string. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '452a7c7c7c7048c2f887f61572b18fc2' + AttributeMessagingMessageID = "messaging.message.id" + // A string identifying the kind of messaging operation. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Note: If a custom value is used, it MUST be of low cardinality. + AttributeMessagingOperation = "messaging.operation" + // RabbitMQ message routing key. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'myKey' + AttributeMessagingRabbitmqDestinationRoutingKey = "messaging.rabbitmq.destination.routing_key" + // RabbitMQ message delivery tag + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 123 + AttributeMessagingRabbitmqMessageDeliveryTag = "messaging.rabbitmq.message.delivery_tag" + // Name of the RocketMQ producer/consumer group that is handling the message. The + // client type is identified by the SpanKind. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'myConsumerGroup' + AttributeMessagingRocketmqClientGroup = "messaging.rocketmq.client_group" + // Model of message consumption. This only applies to consumer spans. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeMessagingRocketmqConsumptionModel = "messaging.rocketmq.consumption_model" + // The delay time level for delay message, which determines the message delay + // time. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 3 + AttributeMessagingRocketmqMessageDelayTimeLevel = "messaging.rocketmq.message.delay_time_level" + // The timestamp in milliseconds that the delay message is expected to be + // delivered to consumer. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 1665987217045 + AttributeMessagingRocketmqMessageDeliveryTimestamp = "messaging.rocketmq.message.delivery_timestamp" + // It is essential for FIFO message. Messages that belong to the same message + // group are always processed one by one within the same consumer group. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'myMessageGroup' + AttributeMessagingRocketmqMessageGroup = "messaging.rocketmq.message.group" + // Key(s) of message, another way to mark message besides message id. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: 'keyA', 'keyB' + AttributeMessagingRocketmqMessageKeys = "messaging.rocketmq.message.keys" + // The secondary classifier of message besides topic. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'tagA' + AttributeMessagingRocketmqMessageTag = "messaging.rocketmq.message.tag" + // Type of message. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeMessagingRocketmqMessageType = "messaging.rocketmq.message.type" + // Namespace of RocketMQ resources, resources in different namespaces are + // individual. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'myNamespace' + AttributeMessagingRocketmqNamespace = "messaging.rocketmq.namespace" + // The name of the subscription in the topic messages are received from. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'mySubscription' + AttributeMessagingServicebusDestinationSubscriptionName = "messaging.servicebus.destination.subscription_name" + // Describes the settlement type. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeMessagingServicebusDispositionStatus = "messaging.servicebus.disposition_status" + // Number of deliveries that have been attempted for this message. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 2 + AttributeMessagingServicebusMessageDeliveryCount = "messaging.servicebus.message.delivery_count" + // The UTC epoch seconds at which the message has been accepted and stored in the + // entity. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 1701393730 + AttributeMessagingServicebusMessageEnqueuedTime = "messaging.servicebus.message.enqueued_time" + // An identifier for the messaging system being used. See below for a list of + // well-known identifiers. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeMessagingSystem = "messaging.system" +) + +const ( + // One or more messages are provided for publishing to an intermediary. If a single message is published, the context of the "Publish" span can be used as the creation context and no "Create" span needs to be created + AttributeMessagingOperationPublish = "publish" + // A message is created. "Create" spans always refer to a single message and are used to provide a unique creation context for messages in batch publishing scenarios + AttributeMessagingOperationCreate = "create" + // One or more messages are requested by a consumer. This operation refers to pull-based scenarios, where consumers explicitly call methods of messaging SDKs to receive messages + AttributeMessagingOperationReceive = "receive" + // One or more messages are delivered to or processed by a consumer + AttributeMessagingOperationDeliver = "process" + // One or more messages are settled + AttributeMessagingOperationSettle = "settle" +) + +const ( + // Clustering consumption model + AttributeMessagingRocketmqConsumptionModelClustering = "clustering" + // Broadcasting consumption model + AttributeMessagingRocketmqConsumptionModelBroadcasting = "broadcasting" +) + +const ( + // Normal message + AttributeMessagingRocketmqMessageTypeNormal = "normal" + // FIFO message + AttributeMessagingRocketmqMessageTypeFifo = "fifo" + // Delay message + AttributeMessagingRocketmqMessageTypeDelay = "delay" + // Transaction message + AttributeMessagingRocketmqMessageTypeTransaction = "transaction" +) + +const ( + // Message is completed + AttributeMessagingServicebusDispositionStatusComplete = "complete" + // Message is abandoned + AttributeMessagingServicebusDispositionStatusAbandon = "abandon" + // Message is sent to dead letter queue + AttributeMessagingServicebusDispositionStatusDeadLetter = "dead_letter" + // Message is deferred + AttributeMessagingServicebusDispositionStatusDefer = "defer" +) + +const ( + // Apache ActiveMQ + AttributeMessagingSystemActivemq = "activemq" + // Amazon Simple Queue Service (SQS) + AttributeMessagingSystemAWSSqs = "aws_sqs" + // Azure Event Grid + AttributeMessagingSystemEventgrid = "eventgrid" + // Azure Event Hubs + AttributeMessagingSystemEventhubs = "eventhubs" + // Azure Service Bus + AttributeMessagingSystemServicebus = "servicebus" + // Google Cloud Pub/Sub + AttributeMessagingSystemGCPPubsub = "gcp_pubsub" + // Java Message Service + AttributeMessagingSystemJms = "jms" + // Apache Kafka + AttributeMessagingSystemKafka = "kafka" + // RabbitMQ + AttributeMessagingSystemRabbitmq = "rabbitmq" + // Apache RocketMQ + AttributeMessagingSystemRocketmq = "rocketmq" +) + +// These attributes may be used for any network related operation. +const ( + // The ISO 3166-1 alpha-2 2-character country code associated with the mobile + // carrier network. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'DE' + AttributeNetworkCarrierIcc = "network.carrier.icc" + // The mobile carrier country code. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '310' + AttributeNetworkCarrierMcc = "network.carrier.mcc" + // The mobile carrier network code. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '001' + AttributeNetworkCarrierMnc = "network.carrier.mnc" + // The name of the mobile carrier. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'sprint' + AttributeNetworkCarrierName = "network.carrier.name" + // This describes more details regarding the connection.type. It may be the type + // of cell technology connection, but it could be used for describing details + // about a wifi connection. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Examples: 'LTE' + AttributeNetworkConnectionSubtype = "network.connection.subtype" + // The internet connection type. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Examples: 'wifi' + AttributeNetworkConnectionType = "network.connection.type" + // The network IO operation direction. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Examples: 'transmit' + AttributeNetworkIoDirection = "network.io.direction" + // Local address of the network connection - IP address or Unix domain socket + // name. + // + // Type: string + // Requirement Level: Optional + // Stability: stable + // Examples: '10.1.2.80', '/tmp/my.sock' + AttributeNetworkLocalAddress = "network.local.address" + // Local port number of the network connection. + // + // Type: int + // Requirement Level: Optional + // Stability: stable + // Examples: 65123 + AttributeNetworkLocalPort = "network.local.port" + // Peer address of the network connection - IP address or Unix domain socket name. + // + // Type: string + // Requirement Level: Optional + // Stability: stable + // Examples: '10.1.2.80', '/tmp/my.sock' + AttributeNetworkPeerAddress = "network.peer.address" + // Peer port number of the network connection. + // + // Type: int + // Requirement Level: Optional + // Stability: stable + // Examples: 65123 + AttributeNetworkPeerPort = "network.peer.port" + // OSI application layer or non-OSI equivalent. + // + // Type: string + // Requirement Level: Optional + // Stability: stable + // Examples: 'amqp', 'http', 'mqtt' + // Note: The value SHOULD be normalized to lowercase. + AttributeNetworkProtocolName = "network.protocol.name" + // The actual version of the protocol used for network communication. + // + // Type: string + // Requirement Level: Optional + // Stability: stable + // Examples: '1.1', '2' + // Note: If protocol version is subject to negotiation (for example using ALPN), + // this attribute SHOULD be set to the negotiated version. If the actual protocol + // version is not known, this attribute SHOULD NOT be set. + AttributeNetworkProtocolVersion = "network.protocol.version" + // OSI transport layer or inter-process communication method. + // + // Type: Enum + // Requirement Level: Optional + // Stability: stable + // Examples: 'tcp', 'udp' + // Note: The value SHOULD be normalized to lowercase.Consider always setting the + // transport when setting a port number, since + // a port number is ambiguous without knowing the transport. For example + // different processes could be listening on TCP port 12345 and UDP port 12345. + AttributeNetworkTransport = "network.transport" + // OSI network layer or non-OSI equivalent. + // + // Type: Enum + // Requirement Level: Optional + // Stability: stable + // Examples: 'ipv4', 'ipv6' + // Note: The value SHOULD be normalized to lowercase. + AttributeNetworkType = "network.type" +) + +const ( + // GPRS + AttributeNetworkConnectionSubtypeGprs = "gprs" + // EDGE + AttributeNetworkConnectionSubtypeEdge = "edge" + // UMTS + AttributeNetworkConnectionSubtypeUmts = "umts" + // CDMA + AttributeNetworkConnectionSubtypeCdma = "cdma" + // EVDO Rel. 0 + AttributeNetworkConnectionSubtypeEvdo0 = "evdo_0" + // EVDO Rev. A + AttributeNetworkConnectionSubtypeEvdoA = "evdo_a" + // CDMA2000 1XRTT + AttributeNetworkConnectionSubtypeCdma20001xrtt = "cdma2000_1xrtt" + // HSDPA + AttributeNetworkConnectionSubtypeHsdpa = "hsdpa" + // HSUPA + AttributeNetworkConnectionSubtypeHsupa = "hsupa" + // HSPA + AttributeNetworkConnectionSubtypeHspa = "hspa" + // IDEN + AttributeNetworkConnectionSubtypeIden = "iden" + // EVDO Rev. B + AttributeNetworkConnectionSubtypeEvdoB = "evdo_b" + // LTE + AttributeNetworkConnectionSubtypeLte = "lte" + // EHRPD + AttributeNetworkConnectionSubtypeEhrpd = "ehrpd" + // HSPAP + AttributeNetworkConnectionSubtypeHspap = "hspap" + // GSM + AttributeNetworkConnectionSubtypeGsm = "gsm" + // TD-SCDMA + AttributeNetworkConnectionSubtypeTdScdma = "td_scdma" + // IWLAN + AttributeNetworkConnectionSubtypeIwlan = "iwlan" + // 5G NR (New Radio) + AttributeNetworkConnectionSubtypeNr = "nr" + // 5G NRNSA (New Radio Non-Standalone) + AttributeNetworkConnectionSubtypeNrnsa = "nrnsa" + // LTE CA + AttributeNetworkConnectionSubtypeLteCa = "lte_ca" +) + +const ( + // wifi + AttributeNetworkConnectionTypeWifi = "wifi" + // wired + AttributeNetworkConnectionTypeWired = "wired" + // cell + AttributeNetworkConnectionTypeCell = "cell" + // unavailable + AttributeNetworkConnectionTypeUnavailable = "unavailable" + // unknown + AttributeNetworkConnectionTypeUnknown = "unknown" +) + +const ( + // transmit + AttributeNetworkIoDirectionTransmit = "transmit" + // receive + AttributeNetworkIoDirectionReceive = "receive" +) + +const ( + // TCP + AttributeNetworkTransportTCP = "tcp" + // UDP + AttributeNetworkTransportUDP = "udp" + // Named or anonymous pipe + AttributeNetworkTransportPipe = "pipe" + // Unix domain socket + AttributeNetworkTransportUnix = "unix" +) + +const ( + // IPv4 + AttributeNetworkTypeIpv4 = "ipv4" + // IPv6 + AttributeNetworkTypeIpv6 = "ipv6" +) + +// An OCI image manifest. +const ( + // The digest of the OCI image manifest. For container images specifically is the + // digest by which the container image is known. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: + // 'sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4' + // Note: Follows OCI Image Manifest Specification, and specifically the Digest + // property. + // An example can be found in Example Image Manifest. + AttributeOciManifestDigest = "oci.manifest.digest" +) + +// The operating system (OS) on which the process represented by this resource +// is running. +const ( + // Unique identifier for a particular build or compilation of the operating + // system. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'TQ3C.230805.001.B2', '20E247', '22621' + AttributeOSBuildID = "os.build_id" + // Human readable (not intended to be parsed) OS version information, like e.g. + // reported by ver or lsb_release -a commands. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1 LTS' + AttributeOSDescription = "os.description" + // Human readable operating system name. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'iOS', 'Android', 'Ubuntu' + AttributeOSName = "os.name" + // The operating system type. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeOSType = "os.type" + // The version string of the operating system as defined in Version Attributes. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '14.2.1', '18.04.1' + AttributeOSVersion = "os.version" +) + +const ( + // Microsoft Windows + AttributeOSTypeWindows = "windows" + // Linux + AttributeOSTypeLinux = "linux" + // Apple Darwin + AttributeOSTypeDarwin = "darwin" + // FreeBSD + AttributeOSTypeFreeBSD = "freebsd" + // NetBSD + AttributeOSTypeNetBSD = "netbsd" + // OpenBSD + AttributeOSTypeOpenBSD = "openbsd" + // DragonFly BSD + AttributeOSTypeDragonflyBSD = "dragonflybsd" + // HP-UX (Hewlett Packard Unix) + AttributeOSTypeHPUX = "hpux" + // AIX (Advanced Interactive eXecutive) + AttributeOSTypeAIX = "aix" + // SunOS, Oracle Solaris + AttributeOSTypeSolaris = "solaris" + // IBM z/OS + AttributeOSTypeZOS = "z_os" +) + +// An operating system process. +const ( + // The command used to launch the process (i.e. the command name). On Linux based + // systems, can be set to the zeroth string in proc/[pid]/cmdline. On Windows, can + // be set to the first parameter extracted from GetCommandLineW. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'cmd/otelcol' + AttributeProcessCommand = "process.command" + // All the command arguments (including the command/executable itself) as received + // by the process. On Linux-based systems (and some other Unixoid systems + // supporting procfs), can be set according to the list of null-delimited strings + // extracted from proc/[pid]/cmdline. For libc-based executables, this would be + // the full argv vector passed to main. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: 'cmd/otecol', '--config=config.yaml' + AttributeProcessCommandArgs = "process.command_args" + // The full command used to launch the process as a single string representing the + // full command. On Windows, can be set to the result of GetCommandLineW. Do not + // set this if you have to assemble it just for monitoring; use + // process.command_args instead. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'C:\\cmd\\otecol --config="my directory\\config.yaml"' + AttributeProcessCommandLine = "process.command_line" + // The name of the process executable. On Linux based systems, can be set to the + // Name in proc/[pid]/status. On Windows, can be set to the base name of + // GetProcessImageFileNameW. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'otelcol' + AttributeProcessExecutableName = "process.executable.name" + // The full path to the process executable. On Linux based systems, can be set to + // the target of proc/[pid]/exe. On Windows, can be set to the result of + // GetProcessImageFileNameW. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '/usr/bin/cmd/otelcol' + AttributeProcessExecutablePath = "process.executable.path" + // The username of the user that owns the process. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'root' + AttributeProcessOwner = "process.owner" + // Parent Process identifier (PPID). + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 111 + AttributeProcessParentPID = "process.parent_pid" + // Process identifier (PID). + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 1234 + AttributeProcessPID = "process.pid" + // An additional description about the runtime of the process, for example a + // specific vendor customization of the runtime environment. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0' + AttributeProcessRuntimeDescription = "process.runtime.description" + // The name of the runtime of this process. For compiled native binaries, this + // SHOULD be the name of the compiler. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'OpenJDK Runtime Environment' + AttributeProcessRuntimeName = "process.runtime.name" + // The version of the runtime of this process, as returned by the runtime without + // modification. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '14.0.2' + AttributeProcessRuntimeVersion = "process.runtime.version" +) + +// Attributes for remote procedure calls. +const ( + // The error codes of the Connect request. Error codes are always string values. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeRPCConnectRPCErrorCode = "rpc.connect_rpc.error_code" + // The numeric status code of the gRPC request. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeRPCGRPCStatusCode = "rpc.grpc.status_code" + // error.code property of response if it is an error response. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: -32700, 100 + AttributeRPCJsonrpcErrorCode = "rpc.jsonrpc.error_code" + // error.message property of response if it is an error response. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Parse error', 'User already exists' + AttributeRPCJsonrpcErrorMessage = "rpc.jsonrpc.error_message" + // id property of request or response. Since protocol allows id to be int, string, + // null or missing (for notifications), value is expected to be cast to string for + // simplicity. Use empty string in case of null value. Omit entirely if this is a + // notification. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '10', 'request-7', '' + AttributeRPCJsonrpcRequestID = "rpc.jsonrpc.request_id" + // Protocol version as in jsonrpc property of request/response. Since JSON-RPC 1.0 + // doesn't specify this, the value can be omitted. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '2.0', '1.0' + AttributeRPCJsonrpcVersion = "rpc.jsonrpc.version" + // The name of the (logical) method being called, must be equal to the $method + // part in the span name. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'exampleMethod' + // Note: This is the logical name of the method from the RPC interface + // perspective, which can be different from the name of any implementing + // method/function. The code.function attribute may be used to store the latter + // (e.g., method actually executing the call on the server side, RPC client stub + // method on the client side). + AttributeRPCMethod = "rpc.method" + // The full (logical) name of the service being called, including its package + // name, if applicable. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'myservice.EchoService' + // Note: This is the logical name of the service from the RPC interface + // perspective, which can be different from the name of any implementing class. + // The code.namespace attribute may be used to store the latter (despite the + // attribute name, it may include a class name; e.g., class with method actually + // executing the call on the server side, RPC client stub class on the client + // side). + AttributeRPCService = "rpc.service" + // A string identifying the remoting system. See below for a list of well-known + // identifiers. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeRPCSystem = "rpc.system" +) + +const ( + // cancelled + AttributeRPCConnectRPCErrorCodeCancelled = "cancelled" + // unknown + AttributeRPCConnectRPCErrorCodeUnknown = "unknown" + // invalid_argument + AttributeRPCConnectRPCErrorCodeInvalidArgument = "invalid_argument" + // deadline_exceeded + AttributeRPCConnectRPCErrorCodeDeadlineExceeded = "deadline_exceeded" + // not_found + AttributeRPCConnectRPCErrorCodeNotFound = "not_found" + // already_exists + AttributeRPCConnectRPCErrorCodeAlreadyExists = "already_exists" + // permission_denied + AttributeRPCConnectRPCErrorCodePermissionDenied = "permission_denied" + // resource_exhausted + AttributeRPCConnectRPCErrorCodeResourceExhausted = "resource_exhausted" + // failed_precondition + AttributeRPCConnectRPCErrorCodeFailedPrecondition = "failed_precondition" + // aborted + AttributeRPCConnectRPCErrorCodeAborted = "aborted" + // out_of_range + AttributeRPCConnectRPCErrorCodeOutOfRange = "out_of_range" + // unimplemented + AttributeRPCConnectRPCErrorCodeUnimplemented = "unimplemented" + // internal + AttributeRPCConnectRPCErrorCodeInternal = "internal" + // unavailable + AttributeRPCConnectRPCErrorCodeUnavailable = "unavailable" + // data_loss + AttributeRPCConnectRPCErrorCodeDataLoss = "data_loss" + // unauthenticated + AttributeRPCConnectRPCErrorCodeUnauthenticated = "unauthenticated" +) + +const ( + // OK + AttributeRPCGRPCStatusCodeOk = "0" + // CANCELLED + AttributeRPCGRPCStatusCodeCancelled = "1" + // UNKNOWN + AttributeRPCGRPCStatusCodeUnknown = "2" + // INVALID_ARGUMENT + AttributeRPCGRPCStatusCodeInvalidArgument = "3" + // DEADLINE_EXCEEDED + AttributeRPCGRPCStatusCodeDeadlineExceeded = "4" + // NOT_FOUND + AttributeRPCGRPCStatusCodeNotFound = "5" + // ALREADY_EXISTS + AttributeRPCGRPCStatusCodeAlreadyExists = "6" + // PERMISSION_DENIED + AttributeRPCGRPCStatusCodePermissionDenied = "7" + // RESOURCE_EXHAUSTED + AttributeRPCGRPCStatusCodeResourceExhausted = "8" + // FAILED_PRECONDITION + AttributeRPCGRPCStatusCodeFailedPrecondition = "9" + // ABORTED + AttributeRPCGRPCStatusCodeAborted = "10" + // OUT_OF_RANGE + AttributeRPCGRPCStatusCodeOutOfRange = "11" + // UNIMPLEMENTED + AttributeRPCGRPCStatusCodeUnimplemented = "12" + // INTERNAL + AttributeRPCGRPCStatusCodeInternal = "13" + // UNAVAILABLE + AttributeRPCGRPCStatusCodeUnavailable = "14" + // DATA_LOSS + AttributeRPCGRPCStatusCodeDataLoss = "15" + // UNAUTHENTICATED + AttributeRPCGRPCStatusCodeUnauthenticated = "16" +) + +const ( + // gRPC + AttributeRPCSystemGRPC = "grpc" + // Java RMI + AttributeRPCSystemJavaRmi = "java_rmi" + // .NET WCF + AttributeRPCSystemDotnetWcf = "dotnet_wcf" + // Apache Dubbo + AttributeRPCSystemApacheDubbo = "apache_dubbo" + // Connect RPC + AttributeRPCSystemConnectRPC = "connect_rpc" +) + +// These attributes may be used to describe the server in a connection-based +// network interaction where there is one side that initiates the connection +// (the client is the side that initiates the connection). This covers all TCP +// network interactions since TCP is connection-based and one side initiates +// the connection (an exception is made for peer-to-peer communication over TCP +// where the "user-facing" surface of the protocol / API doesn't expose a clear +// notion of client and server). This also covers UDP network interactions +// where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS. +const ( + // Server domain name if available without reverse DNS lookup; otherwise, IP + // address or Unix domain socket name. + // + // Type: string + // Requirement Level: Optional + // Stability: stable + // Examples: 'example.com', '10.1.2.80', '/tmp/my.sock' + // Note: When observed from the client side, and when communicating through an + // intermediary, server.address SHOULD represent the server address behind any + // intermediaries, for example proxies, if it's available. + AttributeServerAddress = "server.address" + // Server port number. + // + // Type: int + // Requirement Level: Optional + // Stability: stable + // Examples: 80, 8080, 443 + // Note: When observed from the client side, and when communicating through an + // intermediary, server.port SHOULD represent the server port behind any + // intermediaries, for example proxies, if it's available. + AttributeServerPort = "server.port" +) + +// A service instance. +const ( + // The string ID of the service instance. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '627cc493-f310-47de-96bd-71410b7dec09' + // Note: MUST be unique for each instance of the same + // service.namespace,service.name pair (in other words + // service.namespace,service.name,service.instance.id triplet MUST be globally + // unique). The ID helps to + // distinguish instances of the same service that exist at the same time (e.g. + // instances of a horizontally scaled + // service).Implementations, such as SDKs, are recommended to generate a random + // Version 1 or Version 4 RFC + // 4122 UUID, but are free to use an inherent unique ID as the source of + // this value if stability is desirable. In that case, the ID SHOULD be used as + // source of a UUID Version 5 and + // SHOULD use the following UUID as the namespace: 4d63009a-8d0f-11ee- + // aad7-4c796ed8e320.UUIDs are typically recommended, as only an opaque value for + // the purposes of identifying a service instance is + // needed. Similar to what can be seen in the man page for the + // /etc/machine-id file, the underlying + // data, such as pod name and namespace should be treated as confidential, being + // the user's choice to expose it + // or not via another resource attribute.For applications running behind an + // application server (like unicorn), we do not recommend using one identifier + // for all processes participating in the application. Instead, it's recommended + // each division (e.g. a worker + // thread in unicorn) to have its own instance.id.It's not recommended for a + // Collector to set service.instance.id if it can't unambiguously determine the + // service instance that is generating that telemetry. For instance, creating an + // UUID based on pod.name will + // likely be wrong, as the Collector might not know from which container within + // that pod the telemetry originated. + // However, Collectors can set the service.instance.id if they can unambiguously + // determine the service instance + // for that telemetry. This is typically the case for scraping receivers, as they + // know the target address and + // port. + AttributeServiceInstanceID = "service.instance.id" + // Logical name of the service. + // + // Type: string + // Requirement Level: Optional + // Stability: stable + // Examples: 'shoppingcart' + // Note: MUST be the same for all instances of horizontally scaled services. If + // the value was not specified, SDKs MUST fallback to unknown_service: + // concatenated with process.executable.name, e.g. unknown_service:bash. If + // process.executable.name is not available, the value MUST be set to + // unknown_service. + AttributeServiceName = "service.name" + // A namespace for service.name. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Shop' + // Note: A string value having a meaning that helps to distinguish a group of + // services, for example the team name that owns a group of services. service.name + // is expected to be unique within the same namespace. If service.namespace is not + // specified in the Resource then service.name is expected to be unique for all + // services that have no explicit namespace defined (so the empty/unspecified + // namespace is simply one more valid namespace). Zero-length namespace string is + // assumed equal to unspecified namespace. + AttributeServiceNamespace = "service.namespace" + // The version string of the service API or implementation. The format is not + // defined by these conventions. + // + // Type: string + // Requirement Level: Optional + // Stability: stable + // Examples: '2.0.0', 'a01dbef8a' + AttributeServiceVersion = "service.version" +) + +// Session is defined as the period of time encompassing all activities +// performed by the application and the actions executed by the end user. +// Consequently, a Session is represented as a collection of Logs, Events, and +// Spans emitted by the Client Application throughout the Session's duration. +// Each Session is assigned a unique identifier, which is included as an +// attribute in the Logs, Events, and Spans generated during the Session's +// lifecycle. +// When a session reaches end of life, typically due to user inactivity or +// session timeout, a new session identifier will be assigned. The previous +// session identifier may be provided by the instrumentation so that telemetry +// backends can link the two sessions. +const ( + // A unique id to identify a session. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '00112233-4455-6677-8899-aabbccddeeff' + AttributeSessionID = "session.id" + // The previous session.id for this user, when known. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '00112233-4455-6677-8899-aabbccddeeff' + AttributeSessionPreviousID = "session.previous_id" +) + +// These attributes may be used to describe the sender of a network +// exchange/packet. These should be used when there is no client/server +// relationship between the two sides, or when that relationship is unknown. +// This covers low-level network interactions (e.g. packet tracing) where you +// don't know if there was a connection or which side initiated it. This also +// covers unidirectional UDP flows and peer-to-peer communication where the +// "user-facing" surface of the protocol / API doesn't expose a clear notion of +// client and server. +const ( + // Source address - domain name if available without reverse DNS lookup; + // otherwise, IP address or Unix domain socket name. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'source.example.com', '10.1.2.80', '/tmp/my.sock' + // Note: When observed from the destination side, and when communicating through + // an intermediary, source.address SHOULD represent the source address behind any + // intermediaries, for example proxies, if it's available. + AttributeSourceAddress = "source.address" + // Source port number + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 3389, 2888 + AttributeSourcePort = "source.port" +) + +// Attributes for telemetry SDK. +const ( + // The language of the telemetry SDK. + // + // Type: Enum + // Requirement Level: Required + // Stability: stable + AttributeTelemetrySDKLanguage = "telemetry.sdk.language" + // The name of the telemetry SDK as defined above. + // + // Type: string + // Requirement Level: Required + // Stability: stable + // Examples: 'opentelemetry' + // Note: The OpenTelemetry SDK MUST set the telemetry.sdk.name attribute to + // opentelemetry. + // If another SDK, like a fork or a vendor-provided implementation, is used, this + // SDK MUST set the + // telemetry.sdk.name attribute to the fully-qualified class or module name of + // this SDK's main entry point + // or another suitable identifier depending on the language. + // The identifier opentelemetry is reserved and MUST NOT be used in this case. + // All custom identifiers SHOULD be stable across different versions of an + // implementation. + AttributeTelemetrySDKName = "telemetry.sdk.name" + // The version string of the telemetry SDK. + // + // Type: string + // Requirement Level: Required + // Stability: stable + // Examples: '1.2.3' + AttributeTelemetrySDKVersion = "telemetry.sdk.version" + // The name of the auto instrumentation agent or distribution, if used. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'parts-unlimited-java' + // Note: Official auto instrumentation agents and distributions SHOULD set the + // telemetry.distro.name attribute to + // a string starting with opentelemetry-, e.g. opentelemetry-java-instrumentation. + AttributeTelemetryDistroName = "telemetry.distro.name" + // The version string of the auto instrumentation agent or distribution, if used. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '1.2.3' + AttributeTelemetryDistroVersion = "telemetry.distro.version" +) + +const ( + // cpp + AttributeTelemetrySDKLanguageCPP = "cpp" + // dotnet + AttributeTelemetrySDKLanguageDotnet = "dotnet" + // erlang + AttributeTelemetrySDKLanguageErlang = "erlang" + // go + AttributeTelemetrySDKLanguageGo = "go" + // java + AttributeTelemetrySDKLanguageJava = "java" + // nodejs + AttributeTelemetrySDKLanguageNodejs = "nodejs" + // php + AttributeTelemetrySDKLanguagePHP = "php" + // python + AttributeTelemetrySDKLanguagePython = "python" + // ruby + AttributeTelemetrySDKLanguageRuby = "ruby" + // rust + AttributeTelemetrySDKLanguageRust = "rust" + // swift + AttributeTelemetrySDKLanguageSwift = "swift" + // webjs + AttributeTelemetrySDKLanguageWebjs = "webjs" +) + +// These attributes may be used for any operation to store information about a +// thread that started a span. +const ( + // Current "managed" thread ID (as opposed to OS thread ID). + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 42 + AttributeThreadID = "thread.id" + // Current thread name. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'main' + AttributeThreadName = "thread.name" +) + +// Semantic convention attributes in the TLS namespace. +const ( + // String indicating the cipher used during the current connection. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'TLS_RSA_WITH_3DES_EDE_CBC_SHA', + // 'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256' + // Note: The values allowed for tls.cipher MUST be one of the Descriptions of the + // registered TLS Cipher Suits. + AttributeTLSCipher = "tls.cipher" + // PEM-encoded stand-alone certificate offered by the client. This is usually + // mutually-exclusive of client.certificate_chain since this value also exists in + // that list. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'MII...' + AttributeTLSClientCertificate = "tls.client.certificate" + // Array of PEM-encoded certificates that make up the certificate chain offered by + // the client. This is usually mutually-exclusive of client.certificate since that + // value should be the first certificate in the chain. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: 'MII...', 'MI...' + AttributeTLSClientCertificateChain = "tls.client.certificate_chain" + // Certificate fingerprint using the MD5 digest of DER-encoded version of + // certificate offered by the client. For consistency with other hash values, this + // value should be formatted as an uppercase hash. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC' + AttributeTLSClientHashMd5 = "tls.client.hash.md5" + // Certificate fingerprint using the SHA1 digest of DER-encoded version of + // certificate offered by the client. For consistency with other hash values, this + // value should be formatted as an uppercase hash. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '9E393D93138888D288266C2D915214D1D1CCEB2A' + AttributeTLSClientHashSha1 = "tls.client.hash.sha1" + // Certificate fingerprint using the SHA256 digest of DER-encoded version of + // certificate offered by the client. For consistency with other hash values, this + // value should be formatted as an uppercase hash. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0' + AttributeTLSClientHashSha256 = "tls.client.hash.sha256" + // Distinguished name of subject of the issuer of the x.509 certificate presented + // by the client. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com' + AttributeTLSClientIssuer = "tls.client.issuer" + // A hash that identifies clients based on how they perform an SSL/TLS handshake. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'd4e5b18d6b55c71272893221c96ba240' + AttributeTLSClientJa3 = "tls.client.ja3" + // Date/Time indicating when client certificate is no longer considered valid. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '2021-01-01T00:00:00.000Z' + AttributeTLSClientNotAfter = "tls.client.not_after" + // Date/Time indicating when client certificate is first considered valid. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '1970-01-01T00:00:00.000Z' + AttributeTLSClientNotBefore = "tls.client.not_before" + // Also called an SNI, this tells the server which hostname to which the client is + // attempting to connect to. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry.io' + AttributeTLSClientServerName = "tls.client.server_name" + // Distinguished name of subject of the x.509 certificate presented by the client. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'CN=myclient, OU=Documentation Team, DC=example, DC=com' + AttributeTLSClientSubject = "tls.client.subject" + // Array of ciphers offered by the client during the client hello. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: '"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", + // "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "..."' + AttributeTLSClientSupportedCiphers = "tls.client.supported_ciphers" + // String indicating the curve used for the given cipher, when applicable + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'secp256r1' + AttributeTLSCurve = "tls.curve" + // Boolean flag indicating if the TLS negotiation was successful and transitioned + // to an encrypted tunnel. + // + // Type: boolean + // Requirement Level: Optional + // Stability: experimental + // Examples: True + AttributeTLSEstablished = "tls.established" + // String indicating the protocol being tunneled. Per the values in the IANA + // registry, this string should be lower case. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'http/1.1' + AttributeTLSNextProtocol = "tls.next_protocol" + // Normalized lowercase protocol name parsed from original string of the + // negotiated SSL/TLS protocol version + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeTLSProtocolName = "tls.protocol.name" + // Numeric part of the version parsed from the original string of the negotiated + // SSL/TLS protocol version + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '1.2', '3' + AttributeTLSProtocolVersion = "tls.protocol.version" + // Boolean flag indicating if this TLS connection was resumed from an existing TLS + // negotiation. + // + // Type: boolean + // Requirement Level: Optional + // Stability: experimental + // Examples: True + AttributeTLSResumed = "tls.resumed" + // PEM-encoded stand-alone certificate offered by the server. This is usually + // mutually-exclusive of server.certificate_chain since this value also exists in + // that list. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'MII...' + AttributeTLSServerCertificate = "tls.server.certificate" + // Array of PEM-encoded certificates that make up the certificate chain offered by + // the server. This is usually mutually-exclusive of server.certificate since that + // value should be the first certificate in the chain. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: 'MII...', 'MI...' + AttributeTLSServerCertificateChain = "tls.server.certificate_chain" + // Certificate fingerprint using the MD5 digest of DER-encoded version of + // certificate offered by the server. For consistency with other hash values, this + // value should be formatted as an uppercase hash. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC' + AttributeTLSServerHashMd5 = "tls.server.hash.md5" + // Certificate fingerprint using the SHA1 digest of DER-encoded version of + // certificate offered by the server. For consistency with other hash values, this + // value should be formatted as an uppercase hash. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '9E393D93138888D288266C2D915214D1D1CCEB2A' + AttributeTLSServerHashSha1 = "tls.server.hash.sha1" + // Certificate fingerprint using the SHA256 digest of DER-encoded version of + // certificate offered by the server. For consistency with other hash values, this + // value should be formatted as an uppercase hash. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0' + AttributeTLSServerHashSha256 = "tls.server.hash.sha256" + // Distinguished name of subject of the issuer of the x.509 certificate presented + // by the client. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com' + AttributeTLSServerIssuer = "tls.server.issuer" + // A hash that identifies servers based on how they perform an SSL/TLS handshake. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'd4e5b18d6b55c71272893221c96ba240' + AttributeTLSServerJa3s = "tls.server.ja3s" + // Date/Time indicating when server certificate is no longer considered valid. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '2021-01-01T00:00:00.000Z' + AttributeTLSServerNotAfter = "tls.server.not_after" + // Date/Time indicating when server certificate is first considered valid. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '1970-01-01T00:00:00.000Z' + AttributeTLSServerNotBefore = "tls.server.not_before" + // Distinguished name of subject of the x.509 certificate presented by the server. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'CN=myserver, OU=Documentation Team, DC=example, DC=com' + AttributeTLSServerSubject = "tls.server.subject" +) + +const ( + // ssl + AttributeTLSProtocolNameSsl = "ssl" + // tls + AttributeTLSProtocolNameTLS = "tls" +) + +// Attributes describing URL. +const ( + // Domain extracted from the url.full, such as "opentelemetry.io". + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'www.foo.bar', 'opentelemetry.io', '3.12.167.2', + // '[1080:0:0:0:8:800:200C:417A]' + // Note: In some cases a URL may refer to an IP and/or port directly, without a + // domain name. In this case, the IP address would go to the domain field. If the + // URL contains a literal IPv6 address enclosed by [ and ], the [ and ] characters + // should also be captured in the domain field. + AttributeURLDomain = "url.domain" + // The file extension extracted from the url.full, excluding the leading dot. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'png', 'gz' + // Note: The file extension is only set if it exists, as not every url has a file + // extension. When the file name has multiple extensions example.tar.gz, only the + // last one should be captured gz, not tar.gz. + AttributeURLExtension = "url.extension" + // The URI fragment component + // + // Type: string + // Requirement Level: Optional + // Stability: stable + // Examples: 'SemConv' + AttributeURLFragment = "url.fragment" + // Absolute URL describing a network resource according to RFC3986 + // + // Type: string + // Requirement Level: Optional + // Stability: stable + // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv', '//localhost' + // Note: For network calls, URL usually has + // scheme://host[:port][path][?query][#fragment] format, where the fragment is not + // transmitted over HTTP, but if it is known, it SHOULD be included nevertheless. + // url.full MUST NOT contain credentials passed via URL in form of + // https://username:password@www.example.com/. In such case username and password + // SHOULD be redacted and attribute's value SHOULD be + // https://REDACTED:REDACTED@www.example.com/. + // url.full SHOULD capture the absolute URL when it is available (or can be + // reconstructed). Sensitive content provided in url.full SHOULD be scrubbed when + // instrumentations can identify it. + AttributeURLFull = "url.full" + // Unmodified original URL as seen in the event source. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv', + // 'search?q=OpenTelemetry' + // Note: In network monitoring, the observed URL may be a full URL, whereas in + // access logs, the URL is often just represented as a path. This field is meant + // to represent the URL as it was observed, complete or not. + // url.original might contain credentials passed via URL in form of + // https://username:password@www.example.com/. In such case password and username + // SHOULD NOT be redacted and attribute's value SHOULD remain the same. + AttributeURLOriginal = "url.original" + // The URI path component + // + // Type: string + // Requirement Level: Optional + // Stability: stable + // Examples: '/search' + // Note: Sensitive content provided in url.path SHOULD be scrubbed when + // instrumentations can identify it. + AttributeURLPath = "url.path" + // Port extracted from the url.full + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 443 + AttributeURLPort = "url.port" + // The URI query component + // + // Type: string + // Requirement Level: Optional + // Stability: stable + // Examples: 'q=OpenTelemetry' + // Note: Sensitive content provided in url.query SHOULD be scrubbed when + // instrumentations can identify it. + AttributeURLQuery = "url.query" + // The highest registered url domain, stripped of the subdomain. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'example.com', 'foo.co.uk' + // Note: This value can be determined precisely with the public suffix list. For + // example, the registered domain for foo.example.com is example.com. Trying to + // approximate this by simply taking the last two labels will not work well for + // TLDs such as co.uk. + AttributeURLRegisteredDomain = "url.registered_domain" + // The URI scheme component identifying the used protocol. + // + // Type: string + // Requirement Level: Optional + // Stability: stable + // Examples: 'https', 'ftp', 'telnet' + AttributeURLScheme = "url.scheme" + // The subdomain portion of a fully qualified domain name includes all of the + // names except the host name under the registered_domain. In a partially + // qualified domain, or if the qualification level of the full name cannot be + // determined, subdomain contains all of the names below the registered domain. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'east', 'sub2.sub1' + // Note: The subdomain portion of www.east.mydomain.co.uk is east. If the domain + // has multiple levels of subdomain, such as sub2.sub1.example.com, the subdomain + // field should contain sub2.sub1, with no trailing period. + AttributeURLSubdomain = "url.subdomain" + // The effective top level domain (eTLD), also known as the domain suffix, is the + // last part of the domain name. For example, the top level domain for example.com + // is com. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'com', 'co.uk' + // Note: This value can be determined precisely with the public suffix list. + AttributeURLTopLevelDomain = "url.top_level_domain" +) + +// Describes user-agent attributes. +const ( + // Name of the user-agent extracted from original. Usually refers to the browser's + // name. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Safari', 'YourApp' + // Note: Example of extracting browser's name from original string. In the case of + // using a user-agent for non-browser products, such as microservices with + // multiple names/versions inside the user_agent.original, the most significant + // name SHOULD be selected. In such a scenario it should align with + // user_agent.version + AttributeUserAgentName = "user_agent.name" + // Value of the HTTP User-Agent header sent by the client. + // + // Type: string + // Requirement Level: Optional + // Stability: stable + // Examples: 'CERN-LineMode/2.15 libwww/2.17b3', 'Mozilla/5.0 (iPhone; CPU iPhone + // OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) + // Version/14.1.2 Mobile/15E148 Safari/604.1', 'YourApp/1.0.0 grpc-java- + // okhttp/1.27.2' + AttributeUserAgentOriginal = "user_agent.original" + // Version of the user-agent extracted from original. Usually refers to the + // browser's version + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '14.1.2', '1.0.0' + // Note: Example of extracting browser's version from original string. In the case + // of using a user-agent for non-browser products, such as microservices with + // multiple names/versions inside the user_agent.original, the most significant + // version SHOULD be selected. In such a scenario it should align with + // user_agent.name + AttributeUserAgentVersion = "user_agent.version" +) + +func GetAttribute_groupSemanticConventionAttributeNames() []string { + return []string{ + AttributeEventName, + AttributeLogRecordUID, + AttributeLogIostream, + AttributeLogFileName, + AttributeLogFileNameResolved, + AttributeLogFilePath, + AttributeLogFilePathResolved, + AttributePoolName, + AttributeState, + AttributeAspnetcoreRateLimitingResult, + AttributeAspnetcoreDiagnosticsHandlerType, + AttributeAspnetcoreRateLimitingPolicy, + AttributeAspnetcoreRequestIsUnhandled, + AttributeAspnetcoreRoutingIsFallback, + AttributeSignalrConnectionStatus, + AttributeSignalrTransport, + AttributeJvmBufferPoolName, + AttributeJvmMemoryPoolName, + AttributeJvmMemoryType, + AttributeProcessCPUState, + AttributeSystemDevice, + AttributeSystemCPULogicalNumber, + AttributeSystemCPUState, + AttributeSystemMemoryState, + AttributeSystemPagingDirection, + AttributeSystemPagingState, + AttributeSystemPagingType, + AttributeSystemFilesystemMode, + AttributeSystemFilesystemMountpoint, + AttributeSystemFilesystemState, + AttributeSystemFilesystemType, + AttributeSystemNetworkState, + AttributeSystemProcessStatus, + AttributeAndroidOSAPILevel, + AttributeAWSDynamoDBAttributeDefinitions, + AttributeAWSDynamoDBAttributesToGet, + AttributeAWSDynamoDBConsistentRead, + AttributeAWSDynamoDBConsumedCapacity, + AttributeAWSDynamoDBCount, + AttributeAWSDynamoDBExclusiveStartTable, + AttributeAWSDynamoDBGlobalSecondaryIndexUpdates, + AttributeAWSDynamoDBGlobalSecondaryIndexes, + AttributeAWSDynamoDBIndexName, + AttributeAWSDynamoDBItemCollectionMetrics, + AttributeAWSDynamoDBLimit, + AttributeAWSDynamoDBLocalSecondaryIndexes, + AttributeAWSDynamoDBProjection, + AttributeAWSDynamoDBProvisionedReadCapacity, + AttributeAWSDynamoDBProvisionedWriteCapacity, + AttributeAWSDynamoDBScanForward, + AttributeAWSDynamoDBScannedCount, + AttributeAWSDynamoDBSegment, + AttributeAWSDynamoDBSelect, + AttributeAWSDynamoDBTableCount, + AttributeAWSDynamoDBTableNames, + AttributeAWSDynamoDBTotalSegments, + AttributeBrowserBrands, + AttributeBrowserLanguage, + AttributeBrowserMobile, + AttributeBrowserPlatform, + AttributeClientAddress, + AttributeClientPort, + AttributeCloudAccountID, + AttributeCloudAvailabilityZone, + AttributeCloudPlatform, + AttributeCloudProvider, + AttributeCloudRegion, + AttributeCloudResourceID, + AttributeCloudeventsEventID, + AttributeCloudeventsEventSource, + AttributeCloudeventsEventSpecVersion, + AttributeCloudeventsEventSubject, + AttributeCloudeventsEventType, + AttributeCodeColumn, + AttributeCodeFilepath, + AttributeCodeFunction, + AttributeCodeLineNumber, + AttributeCodeNamespace, + AttributeCodeStacktrace, + AttributeContainerCommand, + AttributeContainerCommandArgs, + AttributeContainerCommandLine, + AttributeContainerCPUState, + AttributeContainerID, + AttributeContainerImageID, + AttributeContainerImageName, + AttributeContainerImageRepoDigests, + AttributeContainerImageTags, + AttributeContainerName, + AttributeContainerRuntime, + AttributeDBCassandraConsistencyLevel, + AttributeDBCassandraCoordinatorDC, + AttributeDBCassandraCoordinatorID, + AttributeDBCassandraIdempotence, + AttributeDBCassandraPageSize, + AttributeDBCassandraSpeculativeExecutionCount, + AttributeDBCassandraTable, + AttributeDBCosmosDBClientID, + AttributeDBCosmosDBConnectionMode, + AttributeDBCosmosDBContainer, + AttributeDBCosmosDBOperationType, + AttributeDBCosmosDBRequestCharge, + AttributeDBCosmosDBRequestContentLength, + AttributeDBCosmosDBStatusCode, + AttributeDBCosmosDBSubStatusCode, + AttributeDBElasticsearchClusterName, + AttributeDBInstanceID, + AttributeDBMongoDBCollection, + AttributeDBMSSQLInstanceName, + AttributeDBName, + AttributeDBOperation, + AttributeDBRedisDBIndex, + AttributeDBSQLTable, + AttributeDBStatement, + AttributeDBSystem, + AttributeDBUser, + AttributeDeploymentEnvironment, + AttributeDBConnectionString, + AttributeDBElasticsearchNodeName, + AttributeDBJDBCDriverClassname, + AttributeHTTPFlavor, + AttributeHTTPMethod, + AttributeHTTPRequestContentLength, + AttributeHTTPResponseContentLength, + AttributeHTTPScheme, + AttributeHTTPStatusCode, + AttributeHTTPTarget, + AttributeHTTPURL, + AttributeHTTPUserAgent, + AttributeMessagingKafkaDestinationPartition, + AttributeNetHostName, + AttributeNetHostPort, + AttributeNetPeerName, + AttributeNetPeerPort, + AttributeNetProtocolName, + AttributeNetProtocolVersion, + AttributeNetSockFamily, + AttributeNetSockHostAddr, + AttributeNetSockHostPort, + AttributeNetSockPeerAddr, + AttributeNetSockPeerName, + AttributeNetSockPeerPort, + AttributeNetTransport, + AttributeSystemProcessesStatus, + AttributeDestinationAddress, + AttributeDestinationPort, + AttributeDeviceID, + AttributeDeviceManufacturer, + AttributeDeviceModelIdentifier, + AttributeDeviceModelName, + AttributeDiskIoDirection, + AttributeDNSQuestionName, + AttributeEnduserID, + AttributeEnduserRole, + AttributeEnduserScope, + AttributeErrorType, + AttributeExceptionEscaped, + AttributeExceptionMessage, + AttributeExceptionStacktrace, + AttributeExceptionType, + AttributeFaaSColdstart, + AttributeFaaSCron, + AttributeFaaSDocumentCollection, + AttributeFaaSDocumentName, + AttributeFaaSDocumentOperation, + AttributeFaaSDocumentTime, + AttributeFaaSInstance, + AttributeFaaSInvocationID, + AttributeFaaSInvokedName, + AttributeFaaSInvokedProvider, + AttributeFaaSInvokedRegion, + AttributeFaaSMaxMemory, + AttributeFaaSName, + AttributeFaaSTime, + AttributeFaaSTrigger, + AttributeFaaSVersion, + AttributeFeatureFlagKey, + AttributeFeatureFlagProviderName, + AttributeFeatureFlagVariant, + AttributeFileDirectory, + AttributeFileExtension, + AttributeFileName, + AttributeFilePath, + AttributeFileSize, + AttributeGCPCloudRunJobExecution, + AttributeGCPCloudRunJobTaskIndex, + AttributeGCPGceInstanceHostname, + AttributeGCPGceInstanceName, + AttributeHostArch, + AttributeHostCPUCacheL2Size, + AttributeHostCPUFamily, + AttributeHostCPUModelID, + AttributeHostCPUModelName, + AttributeHostCPUStepping, + AttributeHostCPUVendorID, + AttributeHostID, + AttributeHostImageID, + AttributeHostImageName, + AttributeHostImageVersion, + AttributeHostIP, + AttributeHostMac, + AttributeHostName, + AttributeHostType, + AttributeHTTPConnectionState, + AttributeHTTPRequestBodySize, + AttributeHTTPRequestMethod, + AttributeHTTPRequestMethodOriginal, + AttributeHTTPRequestResendCount, + AttributeHTTPRequestSize, + AttributeHTTPResponseBodySize, + AttributeHTTPResponseSize, + AttributeHTTPResponseStatusCode, + AttributeHTTPRoute, + AttributeK8SClusterName, + AttributeK8SClusterUID, + AttributeK8SContainerName, + AttributeK8SContainerRestartCount, + AttributeK8SCronJobName, + AttributeK8SCronJobUID, + AttributeK8SDaemonSetName, + AttributeK8SDaemonSetUID, + AttributeK8SDeploymentName, + AttributeK8SDeploymentUID, + AttributeK8SJobName, + AttributeK8SJobUID, + AttributeK8SNamespaceName, + AttributeK8SNodeName, + AttributeK8SNodeUID, + AttributeK8SPodName, + AttributeK8SPodUID, + AttributeK8SReplicaSetName, + AttributeK8SReplicaSetUID, + AttributeK8SStatefulSetName, + AttributeK8SStatefulSetUID, + AttributeMessagingBatchMessageCount, + AttributeMessagingClientID, + AttributeMessagingDestinationAnonymous, + AttributeMessagingDestinationName, + AttributeMessagingDestinationPartitionID, + AttributeMessagingDestinationTemplate, + AttributeMessagingDestinationTemporary, + AttributeMessagingDestinationPublishAnonymous, + AttributeMessagingDestinationPublishName, + AttributeMessagingEventhubsConsumerGroup, + AttributeMessagingEventhubsMessageEnqueuedTime, + AttributeMessagingGCPPubsubMessageOrderingKey, + AttributeMessagingKafkaConsumerGroup, + AttributeMessagingKafkaMessageKey, + AttributeMessagingKafkaMessageOffset, + AttributeMessagingKafkaMessageTombstone, + AttributeMessagingMessageBodySize, + AttributeMessagingMessageConversationID, + AttributeMessagingMessageEnvelopeSize, + AttributeMessagingMessageID, + AttributeMessagingOperation, + AttributeMessagingRabbitmqDestinationRoutingKey, + AttributeMessagingRabbitmqMessageDeliveryTag, + AttributeMessagingRocketmqClientGroup, + AttributeMessagingRocketmqConsumptionModel, + AttributeMessagingRocketmqMessageDelayTimeLevel, + AttributeMessagingRocketmqMessageDeliveryTimestamp, + AttributeMessagingRocketmqMessageGroup, + AttributeMessagingRocketmqMessageKeys, + AttributeMessagingRocketmqMessageTag, + AttributeMessagingRocketmqMessageType, + AttributeMessagingRocketmqNamespace, + AttributeMessagingServicebusDestinationSubscriptionName, + AttributeMessagingServicebusDispositionStatus, + AttributeMessagingServicebusMessageDeliveryCount, + AttributeMessagingServicebusMessageEnqueuedTime, + AttributeMessagingSystem, + AttributeNetworkCarrierIcc, + AttributeNetworkCarrierMcc, + AttributeNetworkCarrierMnc, + AttributeNetworkCarrierName, + AttributeNetworkConnectionSubtype, + AttributeNetworkConnectionType, + AttributeNetworkIoDirection, + AttributeNetworkLocalAddress, + AttributeNetworkLocalPort, + AttributeNetworkPeerAddress, + AttributeNetworkPeerPort, + AttributeNetworkProtocolName, + AttributeNetworkProtocolVersion, + AttributeNetworkTransport, + AttributeNetworkType, + AttributeOciManifestDigest, + AttributeOSBuildID, + AttributeOSDescription, + AttributeOSName, + AttributeOSType, + AttributeOSVersion, + AttributeProcessCommand, + AttributeProcessCommandArgs, + AttributeProcessCommandLine, + AttributeProcessExecutableName, + AttributeProcessExecutablePath, + AttributeProcessOwner, + AttributeProcessParentPID, + AttributeProcessPID, + AttributeProcessRuntimeDescription, + AttributeProcessRuntimeName, + AttributeProcessRuntimeVersion, + AttributeRPCConnectRPCErrorCode, + AttributeRPCGRPCStatusCode, + AttributeRPCJsonrpcErrorCode, + AttributeRPCJsonrpcErrorMessage, + AttributeRPCJsonrpcRequestID, + AttributeRPCJsonrpcVersion, + AttributeRPCMethod, + AttributeRPCService, + AttributeRPCSystem, + AttributeServerAddress, + AttributeServerPort, + AttributeServiceInstanceID, + AttributeServiceName, + AttributeServiceNamespace, + AttributeServiceVersion, + AttributeSessionID, + AttributeSessionPreviousID, + AttributeSourceAddress, + AttributeSourcePort, + AttributeTelemetrySDKLanguage, + AttributeTelemetrySDKName, + AttributeTelemetrySDKVersion, + AttributeTelemetryDistroName, + AttributeTelemetryDistroVersion, + AttributeThreadID, + AttributeThreadName, + AttributeTLSCipher, + AttributeTLSClientCertificate, + AttributeTLSClientCertificateChain, + AttributeTLSClientHashMd5, + AttributeTLSClientHashSha1, + AttributeTLSClientHashSha256, + AttributeTLSClientIssuer, + AttributeTLSClientJa3, + AttributeTLSClientNotAfter, + AttributeTLSClientNotBefore, + AttributeTLSClientServerName, + AttributeTLSClientSubject, + AttributeTLSClientSupportedCiphers, + AttributeTLSCurve, + AttributeTLSEstablished, + AttributeTLSNextProtocol, + AttributeTLSProtocolName, + AttributeTLSProtocolVersion, + AttributeTLSResumed, + AttributeTLSServerCertificate, + AttributeTLSServerCertificateChain, + AttributeTLSServerHashMd5, + AttributeTLSServerHashSha1, + AttributeTLSServerHashSha256, + AttributeTLSServerIssuer, + AttributeTLSServerJa3s, + AttributeTLSServerNotAfter, + AttributeTLSServerNotBefore, + AttributeTLSServerSubject, + AttributeURLDomain, + AttributeURLExtension, + AttributeURLFragment, + AttributeURLFull, + AttributeURLOriginal, + AttributeURLPath, + AttributeURLPort, + AttributeURLQuery, + AttributeURLRegisteredDomain, + AttributeURLScheme, + AttributeURLSubdomain, + AttributeURLTopLevelDomain, + AttributeUserAgentName, + AttributeUserAgentOriginal, + AttributeUserAgentVersion, + } +} diff --git a/semconv/v1.25.0/generated_event.go b/semconv/v1.25.0/generated_event.go new file mode 100644 index 00000000000..9ce1307afe1 --- /dev/null +++ b/semconv/v1.25.0/generated_event.go @@ -0,0 +1,105 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv + +// This event represents an occurrence of a lifecycle transition on the iOS +// platform. +const ( + // This attribute represents the state the application has transitioned into at + // the occurrence of the event. + // + // Type: Enum + // Requirement Level: Required + // Stability: experimental + // Note: The iOS lifecycle states are defined in the UIApplicationDelegate + // documentation, and from which the OS terminology column values are derived. + AttributeIosState = "ios.state" +) + +const ( + // The app has become `active`. Associated with UIKit notification `applicationDidBecomeActive` + AttributeIosStateActive = "active" + // The app is now `inactive`. Associated with UIKit notification `applicationWillResignActive` + AttributeIosStateInactive = "inactive" + // The app is now in the background. This value is associated with UIKit notification `applicationDidEnterBackground` + AttributeIosStateBackground = "background" + // The app is now in the foreground. This value is associated with UIKit notification `applicationWillEnterForeground` + AttributeIosStateForeground = "foreground" + // The app is about to terminate. Associated with UIKit notification `applicationWillTerminate` + AttributeIosStateTerminate = "terminate" +) + +// This event represents an occurrence of a lifecycle transition on the Android +// platform. +const ( + // This attribute represents the state the application has transitioned into at + // the occurrence of the event. + // + // Type: Enum + // Requirement Level: Required + // Stability: experimental + // Note: The Android lifecycle states are defined in Activity lifecycle callbacks, + // and from which the OS identifiers are derived. + AttributeAndroidState = "android.state" +) + +const ( + // Any time before Activity.onResume() or, if the app has no Activity, Context.startService() has been called in the app for the first time + AttributeAndroidStateCreated = "created" + // Any time after Activity.onPause() or, if the app has no Activity, Context.stopService() has been called when the app was in the foreground state + AttributeAndroidStateBackground = "background" + // Any time after Activity.onResume() or, if the app has no Activity, Context.startService() has been called when the app was in either the created or background states + AttributeAndroidStateForeground = "foreground" +) + +// RPC received/sent message. +const ( + // Compressed size of the message in bytes. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + AttributeMessageCompressedSize = "message.compressed_size" + // MUST be calculated as two different counters starting from 1 one for sent + // messages and one for received message. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Note: This way we guarantee that the values will be consistent between + // different implementations. + AttributeMessageID = "message.id" + // Whether this is a received or sent message. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeMessageType = "message.type" + // Uncompressed size of the message in bytes. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + AttributeMessageUncompressedSize = "message.uncompressed_size" +) + +const ( + // sent + AttributeMessageTypeSent = "SENT" + // received + AttributeMessageTypeReceived = "RECEIVED" +) + +func GetEventSemanticConventionAttributeNames() []string { + return []string{ + AttributeIosState, + AttributeAndroidState, + AttributeMessageCompressedSize, + AttributeMessageID, + AttributeMessageType, + AttributeMessageUncompressedSize, + } +} diff --git a/semconv/v1.25.0/generated_resource.go b/semconv/v1.25.0/generated_resource.go new file mode 100644 index 00000000000..7b355e40661 --- /dev/null +++ b/semconv/v1.25.0/generated_resource.go @@ -0,0 +1,242 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv + +// Resources used by AWS Elastic Container Service (ECS). +const ( + // The ID of a running ECS task. The ID MUST be extracted from task.arn. + // + // Type: string + // Requirement Level: Conditionally Required - If and only if `task.arn` is + // populated. + // Stability: experimental + // Examples: '10838bed-421f-43ef-870a-f43feacbbb5b', + // '23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd' + AttributeAWSECSTaskID = "aws.ecs.task.id" + // The ARN of an ECS cluster. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' + AttributeAWSECSClusterARN = "aws.ecs.cluster.arn" + // The Amazon Resource Name (ARN) of an ECS container instance. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'arn:aws:ecs:us- + // west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9' + AttributeAWSECSContainerARN = "aws.ecs.container.arn" + // The launch type for an ECS task. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + AttributeAWSECSLaunchtype = "aws.ecs.launchtype" + // The ARN of a running ECS task. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'arn:aws:ecs:us- + // west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b', + // 'arn:aws:ecs:us-west-1:123456789123:task/my-cluster/task- + // id/23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd' + AttributeAWSECSTaskARN = "aws.ecs.task.arn" + // The family name of the ECS task definition used to create the ECS task. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'opentelemetry-family' + AttributeAWSECSTaskFamily = "aws.ecs.task.family" + // The revision for the task definition used to create the ECS task. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '8', '26' + AttributeAWSECSTaskRevision = "aws.ecs.task.revision" +) + +const ( + // ec2 + AttributeAWSECSLaunchtypeEC2 = "ec2" + // fargate + AttributeAWSECSLaunchtypeFargate = "fargate" +) + +// Resources used by AWS Elastic Kubernetes Service (EKS). +const ( + // The ARN of an EKS cluster. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' + AttributeAWSEKSClusterARN = "aws.eks.cluster.arn" +) + +// Resources specific to Amazon Web Services. +const ( + // The Amazon Resource Name(s) (ARN) of the AWS log group(s). + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*' + // Note: See the log group ARN format documentation. + AttributeAWSLogGroupARNs = "aws.log.group.arns" + // The name(s) of the AWS log group(s) an application is writing to. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: '/aws/lambda/my-function', 'opentelemetry-service' + // Note: Multiple log groups must be supported for cases like multi-container + // applications, where a single application has sidecar containers, and each write + // to their own log group. + AttributeAWSLogGroupNames = "aws.log.group.names" + // The ARN(s) of the AWS log stream(s). + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log- + // stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' + // Note: See the log stream ARN format documentation. One log group can contain + // several log streams, so these ARNs necessarily identify both a log group and a + // log stream. + AttributeAWSLogStreamARNs = "aws.log.stream.arns" + // The name(s) of the AWS log stream(s) an application is writing to. + // + // Type: string[] + // Requirement Level: Optional + // Stability: experimental + // Examples: 'logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' + AttributeAWSLogStreamNames = "aws.log.stream.names" +) + +// Heroku dyno metadata +const ( + // Unique identifier for the application + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '2daa2797-e42b-4624-9322-ec3f968df4da' + AttributeHerokuAppID = "heroku.app.id" + // Commit hash for the current release + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'e6134959463efd8966b20e75b913cafe3f5ec' + AttributeHerokuReleaseCommit = "heroku.release.commit" + // Time and date the release was created + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '2022-10-23T18:00:42Z' + AttributeHerokuReleaseCreationTimestamp = "heroku.release.creation_timestamp" +) + +// Resource describing the packaged software running the application code. Web +// engines are typically executed using process.runtime. +const ( + // The name of the web engine. + // + // Type: string + // Requirement Level: Required + // Stability: experimental + // Examples: 'WildFly' + AttributeWebEngineName = "webengine.name" + // Additional description of the web engine (e.g. detailed version and edition + // information). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - 2.2.2.Final' + AttributeWebEngineDescription = "webengine.description" + // The version of the web engine. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '21.0.0' + AttributeWebEngineVersion = "webengine.version" +) + +// Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's +// concepts. +const ( + // The name of the instrumentation scope - (InstrumentationScope.Name in OTLP). + // + // Type: string + // Requirement Level: Optional + // Stability: stable + // Examples: 'io.opentelemetry.contrib.mongodb' + AttributeOTelScopeName = "otel.scope.name" + // The version of the instrumentation scope - (InstrumentationScope.Version in + // OTLP). + // + // Type: string + // Requirement Level: Optional + // Stability: stable + // Examples: '1.0.0' + AttributeOTelScopeVersion = "otel.scope.version" +) + +// Span attributes used by non-OTLP exporters to represent OpenTelemetry +// Scope's concepts. +const ( + // None + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Deprecated: use the `otel.scope.name` attribute. + // Examples: 'io.opentelemetry.contrib.mongodb' + AttributeOTelLibraryName = "otel.library.name" + // None + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Deprecated: use the `otel.scope.version` attribute. + // Examples: '1.0.0' + AttributeOTelLibraryVersion = "otel.library.version" +) + +func GetResourceSemanticConventionAttributeNames() []string { + return []string{ + AttributeAWSECSTaskID, + AttributeAWSECSClusterARN, + AttributeAWSECSContainerARN, + AttributeAWSECSLaunchtype, + AttributeAWSECSTaskARN, + AttributeAWSECSTaskFamily, + AttributeAWSECSTaskRevision, + AttributeAWSEKSClusterARN, + AttributeAWSLogGroupARNs, + AttributeAWSLogGroupNames, + AttributeAWSLogStreamARNs, + AttributeAWSLogStreamNames, + AttributeHerokuAppID, + AttributeHerokuReleaseCommit, + AttributeHerokuReleaseCreationTimestamp, + AttributeWebEngineName, + AttributeWebEngineDescription, + AttributeWebEngineVersion, + AttributeOTelScopeName, + AttributeOTelScopeVersion, + AttributeOTelLibraryName, + AttributeOTelLibraryVersion, + } +} diff --git a/semconv/v1.25.0/generated_trace.go b/semconv/v1.25.0/generated_trace.go new file mode 100644 index 00000000000..b214a9f4fb0 --- /dev/null +++ b/semconv/v1.25.0/generated_trace.go @@ -0,0 +1,245 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv + +// Operations that access some remote service. +const ( + // The service.name of the remote service. SHOULD be equal to the actual + // service.name resource attribute of the remote service if any. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'AuthTokenCache' + AttributePeerService = "peer.service" +) + +// Span attributes used by AWS Lambda (in addition to general `faas` +// attributes). +const ( + // The full invoked ARN as provided on the Context passed to the function (Lambda- + // Runtime-Invoked-Function-ARN header on the /runtime/invocation/next + // applicable). + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias' + // Note: This may be different from cloud.resource_id if an alias is involved. + AttributeAWSLambdaInvokedARN = "aws.lambda.invoked_arn" +) + +// Semantic conventions for the OpenTracing Shim +const ( + // Parent-child Reference type + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Note: The causal relationship between a child Span and a parent Span. + AttributeOpentracingRefType = "opentracing.ref_type" +) + +const ( + // The parent Span depends on the child Span in some capacity + AttributeOpentracingRefTypeChildOf = "child_of" + // The parent Span doesn't depend in any way on the result of the child Span + AttributeOpentracingRefTypeFollowsFrom = "follows_from" +) + +// Span attributes used by non-OTLP exporters to represent OpenTelemetry Span's +// concepts. +const ( + // Name of the code, either "OK" or "ERROR". MUST NOT be set + // if the status code is UNSET. + // + // Type: Enum + // Requirement Level: Optional + // Stability: stable + AttributeOTelStatusCode = "otel.status_code" + // Description of the Status if it has a value, otherwise not set. + // + // Type: string + // Requirement Level: Optional + // Stability: stable + // Examples: 'resource not found' + AttributeOTelStatusDescription = "otel.status_description" +) + +const ( + // The operation has been validated by an Application developer or Operator to have completed successfully + AttributeOTelStatusCodeOk = "OK" + // The operation contains an error + AttributeOTelStatusCodeError = "ERROR" +) + +// The `aws` conventions apply to operations using the AWS SDK. They map +// request or response parameters in AWS SDK API calls to attributes on a Span. +// The conventions have been collected over time based on feedback from AWS +// users of tracing and will continue to evolve as new interesting conventions +// are found. +// Some descriptions are also provided for populating general OpenTelemetry +// semantic conventions based on these APIs. +const ( + // The AWS request ID as returned in the response headers x-amz-request-id or + // x-amz-requestid. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: '79b9da39-b7ae-508a-a6bc-864b2829c622', 'C9ER4AJX75574TDJ' + AttributeAWSRequestID = "aws.request_id" +) + +// Attributes that exist for S3 request types. +const ( + // The S3 bucket name the request refers to. Corresponds to the --bucket parameter + // of the S3 API operations. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'some-bucket-name' + // Note: The bucket attribute is applicable to all S3 operations that reference a + // bucket, i.e. that require the bucket name as a mandatory parameter. + // This applies to almost all S3 operations except list-buckets. + AttributeAWSS3Bucket = "aws.s3.bucket" + // The source object (in the form bucket/key) for the copy operation. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'someFile.yml' + // Note: The copy_source attribute applies to S3 copy operations and corresponds + // to the --copy-source parameter + // of the copy-object operation within the S3 API. + // This applies in particular to the following operations:
    + //
  • copy-object
  • + //
  • upload-part-copy
  • + //
+ AttributeAWSS3CopySource = "aws.s3.copy_source" + // The delete request container that specifies the objects to be deleted. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'Objects=[{Key=string,VersionID=string},{Key=string,VersionID=string} + // ],Quiet=boolean' + // Note: The delete attribute is only applicable to the delete-object operation. + // The delete attribute corresponds to the --delete parameter of the + // delete-objects operation within the S3 API. + AttributeAWSS3Delete = "aws.s3.delete" + // The S3 object key the request refers to. Corresponds to the --key parameter of + // the S3 API operations. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'someFile.yml' + // Note: The key attribute is applicable to all object-related S3 operations, i.e. + // that require the object key as a mandatory parameter. + // This applies in particular to the following operations:
    + //
  • copy-object
  • + //
  • delete-object
  • + //
  • get-object
  • + //
  • head-object
  • + //
  • put-object
  • + //
  • restore-object
  • + //
  • select-object-content
  • + //
  • abort-multipart-upload
  • + //
  • complete-multipart-upload
  • + //
  • create-multipart-upload
  • + //
  • list-parts
  • + //
  • upload-part
  • + //
  • upload-part-copy
  • + //
+ AttributeAWSS3Key = "aws.s3.key" + // The part number of the part being uploaded in a multipart-upload operation. + // This is a positive integer between 1 and 10,000. + // + // Type: int + // Requirement Level: Optional + // Stability: experimental + // Examples: 3456 + // Note: The part_number attribute is only applicable to the upload-part + // and upload-part-copy operations. + // The part_number attribute corresponds to the --part-number parameter of the + // upload-part operation within the S3 API. + AttributeAWSS3PartNumber = "aws.s3.part_number" + // Upload ID that identifies the multipart upload. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ' + // Note: The upload_id attribute applies to S3 multipart-upload operations and + // corresponds to the --upload-id parameter + // of the S3 API multipart operations. + // This applies in particular to the following operations:
    + //
  • abort-multipart-upload
  • + //
  • complete-multipart-upload
  • + //
  • list-parts
  • + //
  • upload-part
  • + //
  • upload-part-copy
  • + //
+ AttributeAWSS3UploadID = "aws.s3.upload_id" +) + +// Semantic conventions to apply when instrumenting the GraphQL implementation. +// They map GraphQL operations to attributes on a Span. +const ( + // The GraphQL document being executed. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'query findBookByID { bookByID(id: ?) { name } }' + // Note: The value may be sanitized to exclude sensitive information. + AttributeGraphqlDocument = "graphql.document" + // The name of the operation being executed. + // + // Type: string + // Requirement Level: Optional + // Stability: experimental + // Examples: 'findBookByID' + AttributeGraphqlOperationName = "graphql.operation.name" + // The type of the operation being executed. + // + // Type: Enum + // Requirement Level: Optional + // Stability: experimental + // Examples: 'query', 'mutation', 'subscription' + AttributeGraphqlOperationType = "graphql.operation.type" +) + +const ( + // GraphQL query + AttributeGraphqlOperationTypeQuery = "query" + // GraphQL mutation + AttributeGraphqlOperationTypeMutation = "mutation" + // GraphQL subscription + AttributeGraphqlOperationTypeSubscription = "subscription" +) + +func GetTraceSemanticConventionAttributeNames() []string { + return []string{ + AttributePeerService, + AttributeAWSLambdaInvokedARN, + AttributeOpentracingRefType, + AttributeOTelStatusCode, + AttributeOTelStatusDescription, + AttributeAWSRequestID, + AttributeAWSS3Bucket, + AttributeAWSS3CopySource, + AttributeAWSS3Delete, + AttributeAWSS3Key, + AttributeAWSS3PartNumber, + AttributeAWSS3UploadID, + AttributeGraphqlDocument, + AttributeGraphqlOperationName, + AttributeGraphqlOperationType, + } +} diff --git a/semconv/v1.25.0/schema.go b/semconv/v1.25.0/schema.go new file mode 100644 index 00000000000..3739fe9ef81 --- /dev/null +++ b/semconv/v1.25.0/schema.go @@ -0,0 +1,9 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package semconv // import "go.opentelemetry.io/collector/semconv/v1.25.0" + +// SchemaURL is the schema URL that matches the version of the semantic conventions +// that this package defines. Semconv packages starting from v1.4.0 must declare +// non-empty schema URL in the form https://opentelemetry.io/schemas/ +const SchemaURL = "https://opentelemetry.io/schemas/1.25.0" diff --git a/service/go.mod b/service/go.mod index 602137b3bbc..3e31d3b760b 100644 --- a/service/go.mod +++ b/service/go.mod @@ -5,50 +5,48 @@ go 1.21 require ( github.com/google/uuid v1.6.0 github.com/prometheus/client_golang v1.19.0 - github.com/prometheus/client_model v0.6.0 - github.com/prometheus/common v0.48.0 - github.com/shirou/gopsutil/v3 v3.24.1 - github.com/stretchr/testify v1.8.4 + github.com/prometheus/client_model v0.6.1 + github.com/prometheus/common v0.53.0 + github.com/shirou/gopsutil/v3 v3.24.3 + github.com/stretchr/testify v1.9.0 go.opencensus.io v0.24.0 - go.opentelemetry.io/collector v0.96.0 - go.opentelemetry.io/collector/component v0.96.0 - go.opentelemetry.io/collector/config/confignet v0.96.0 - go.opentelemetry.io/collector/config/configtelemetry v0.96.0 - go.opentelemetry.io/collector/confmap v0.96.0 - go.opentelemetry.io/collector/connector v0.96.0 - go.opentelemetry.io/collector/consumer v0.96.0 - go.opentelemetry.io/collector/exporter v0.96.0 - go.opentelemetry.io/collector/extension v0.96.0 - go.opentelemetry.io/collector/extension/zpagesextension v0.96.0 - go.opentelemetry.io/collector/featuregate v1.3.0 - go.opentelemetry.io/collector/pdata v1.3.0 - go.opentelemetry.io/collector/processor v0.96.0 - go.opentelemetry.io/collector/receiver v0.96.0 - go.opentelemetry.io/collector/semconv v0.96.0 - go.opentelemetry.io/contrib/config v0.4.0 - go.opentelemetry.io/contrib/propagators/b3 v1.24.0 - go.opentelemetry.io/otel v1.24.0 - go.opentelemetry.io/otel/bridge/opencensus v1.24.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.24.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.24.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 - go.opentelemetry.io/otel/exporters/prometheus v0.46.0 - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.24.0 - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 - go.opentelemetry.io/otel/metric v1.24.0 - go.opentelemetry.io/otel/sdk v1.24.0 - go.opentelemetry.io/otel/sdk/metric v1.24.0 - go.opentelemetry.io/otel/trace v1.24.0 + go.opentelemetry.io/collector v0.100.0 + go.opentelemetry.io/collector/component v0.100.0 + go.opentelemetry.io/collector/config/confignet v0.100.0 + go.opentelemetry.io/collector/config/configtelemetry v0.100.0 + go.opentelemetry.io/collector/confmap v0.100.0 + go.opentelemetry.io/collector/connector v0.100.0 + go.opentelemetry.io/collector/consumer v0.100.0 + go.opentelemetry.io/collector/exporter v0.100.0 + go.opentelemetry.io/collector/extension v0.100.0 + go.opentelemetry.io/collector/extension/zpagesextension v0.100.0 + go.opentelemetry.io/collector/featuregate v1.7.0 + go.opentelemetry.io/collector/pdata v1.7.0 + go.opentelemetry.io/collector/pdata/testdata v0.100.0 + go.opentelemetry.io/collector/processor v0.100.0 + go.opentelemetry.io/collector/receiver v0.100.0 + go.opentelemetry.io/collector/semconv v0.100.0 + go.opentelemetry.io/contrib/config v0.6.0 + go.opentelemetry.io/contrib/propagators/b3 v1.26.0 + go.opentelemetry.io/otel v1.26.0 + go.opentelemetry.io/otel/bridge/opencensus v1.26.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 + go.opentelemetry.io/otel/exporters/prometheus v0.48.0 + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 + go.opentelemetry.io/otel/metric v1.26.0 + go.opentelemetry.io/otel/sdk v1.26.0 + go.opentelemetry.io/otel/sdk/metric v1.26.0 + go.opentelemetry.io/otel/trace v1.26.0 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 - gonum.org/v1/gonum v0.14.0 + gonum.org/v1/gonum v0.15.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.1 // indirect @@ -57,13 +55,12 @@ require ( github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect @@ -75,17 +72,20 @@ require ( github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect - github.com/yusufpapurcu/wmi v1.2.3 // indirect - go.opentelemetry.io/contrib/zpages v0.49.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect - go.opentelemetry.io/proto/otlp v1.1.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/sys v0.17.0 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + go.opentelemetry.io/contrib/zpages v0.51.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 // indirect + go.opentelemetry.io/proto/otlp v1.2.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/grpc v1.62.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.34.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -97,6 +97,8 @@ replace go.opentelemetry.io/collector/component => ../component replace go.opentelemetry.io/collector/pdata => ../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../pdata/testdata + replace go.opentelemetry.io/collector/extension/zpagesextension => ../extension/zpagesextension replace go.opentelemetry.io/collector/extension => ../extension diff --git a/service/go.sum b/service/go.sum index a888ca2c937..db17fdf1402 100644 --- a/service/go.sum +++ b/service/go.sum @@ -2,8 +2,8 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -41,16 +41,12 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= @@ -59,8 +55,8 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -71,8 +67,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.0 h1:eh4QmHHBuU8BybfIJ8mB8K8gsGCD/AUQTdwGq/GzId8= -github.com/knadh/koanf/v2 v2.1.0/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 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= @@ -95,16 +91,16 @@ github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:Om github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= -github.com/shirou/gopsutil/v3 v3.24.1 h1:R3t6ondCEvmARp3wxODhXMTLC/klMa87h2PHUw5m7QI= -github.com/shirou/gopsutil/v3 v3.24.1/go.mod h1:UU7a2MSBQa+kW1uuDq8DeEBS8kmrnQwsv2b5O513rwU= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= @@ -112,58 +108,60 @@ github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnj github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 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/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/config v0.4.0 h1:Xb+ncYOqseLroMuBesGNRgVQolXcXOhMj7EhGwJCdHs= -go.opentelemetry.io/contrib/config v0.4.0/go.mod h1:drNk2xRqLWW4/amk6Uh1S+sDAJTc7bcEEN1GfJzj418= -go.opentelemetry.io/contrib/propagators/b3 v1.24.0 h1:n4xwCdTx3pZqZs2CjS/CUZAs03y3dZcGhC/FepKtEUY= -go.opentelemetry.io/contrib/propagators/b3 v1.24.0/go.mod h1:k5wRxKRU2uXx2F8uNJ4TaonuEO/V7/5xoz7kdsDACT8= -go.opentelemetry.io/contrib/zpages v0.49.0 h1:Wk217PkNBxcKWnIQpwtbZZE286K4ZY9uajnM5woSeLU= -go.opentelemetry.io/contrib/zpages v0.49.0/go.mod h1:6alLi5mmkZWbAtZMRPd1ffIgkTcsU9OTHQF2NbSOhrQ= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/bridge/opencensus v1.24.0 h1:Vlhy5ee5k5R0zASpH+9AgHiJH7xnKACI3XopO1tUZfY= -go.opentelemetry.io/otel/bridge/opencensus v1.24.0/go.mod h1:jRjVXV/X38jyrnHtvMGN8+9cejZB21JvXAAvooF2s+Q= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.24.0 h1:f2jriWfOdldanBwS9jNBdeOKAQN7b4ugAMaNu1/1k9g= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.24.0/go.mod h1:B+bcQI1yTY+N0vqMpoZbEN7+XU4tNM0DmUiOwebFJWI= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.24.0 h1:mM8nKi6/iFQ0iqst80wDHU2ge198Ye/TfN0WBS5U24Y= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.24.0/go.mod h1:0PrIIzDteLSmNyxqcGYRL4mDIo8OTuBAOI/Bn1URxac= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 h1:Mw5xcxMwlqoJd97vwPxA8isEaIoxsta9/Q51+TTJLGE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0/go.mod h1:CQNu9bj7o7mC6U7+CA/schKEYakYXWr79ucDHTMGhCM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0 h1:I8WIFXR351FoLJYuloU4EgXbtNX2URfU/85pUPheIEQ= -go.opentelemetry.io/otel/exporters/prometheus v0.46.0/go.mod h1:ztwVUHe5DTR/1v7PeuGRnU5Bbd4QKYwApWmuutKsJSs= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.24.0 h1:JYE2HM7pZbOt5Jhk8ndWZTUWYOVift2cHjXVMkPdmdc= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.24.0/go.mod h1:yMb/8c6hVsnma0RpsBMNo0fEiQKeclawtgaIaOp2MLY= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 h1:s0PHtIkN+3xrbDOpt2M8OTG92cWqUESvzh2MxiR5xY8= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0/go.mod h1:hZlFbDbRt++MMPCCfSJfmhkGIWnX1h3XjkfxZUjLrIA= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/sdk/metric v1.24.0 h1:yyMQrPzF+k88/DbH7o4FMAs80puqd+9osbiBrJrz/w8= -go.opentelemetry.io/otel/sdk/metric v1.24.0/go.mod h1:I6Y5FjH6rvEnTTAYQz3Mmv2kl6Ek5IIrmwTLqMrrOE0= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= -go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= -go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= +go.opentelemetry.io/contrib/config v0.6.0 h1:M1SRD1Z15XHPGk61tMLI1up77XT5FdrqQSRrlH0fYuk= +go.opentelemetry.io/contrib/config v0.6.0/go.mod h1:t+/kzmRWLN7J+4F/dD4fFvlYCmCO63WYwy/B00IC++c= +go.opentelemetry.io/contrib/propagators/b3 v1.26.0 h1:wgFbVA+bK2k+fGVfDOCOG4cfDAoppyr5sI2dVlh8MWM= +go.opentelemetry.io/contrib/propagators/b3 v1.26.0/go.mod h1:DDktFXxA+fyItAAM0Sbl5OBH7KOsCTjvbBdPKtoIf/k= +go.opentelemetry.io/contrib/zpages v0.51.0 h1:psVr4JTWd0qtISPj9EA6AODGJ09bvsOxWiuKqiGdSCA= +go.opentelemetry.io/contrib/zpages v0.51.0/go.mod h1:PKtp+NEp1gTTLmFHpynYgYCSkKtisPntOb9S1mQjFKg= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/bridge/opencensus v1.26.0 h1:DZzxj9QjznMVoehskOJnFP2gsTCWtDTFBDvFhPAY7nc= +go.opentelemetry.io/otel/bridge/opencensus v1.26.0/go.mod h1:rJiX0KrF5m8Tm1XE8jLczpAv5zUaDcvhKecFG0ZoFG4= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 h1:+hm+I+KigBy3M24/h1p/NHkUx/evbLH0PNcjpMyCHc4= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0/go.mod h1:NjC8142mLvvNT6biDpaMjyz78kyEHIwAJlSX0N9P5KI= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 h1:HGZWGmCVRCVyAs2GQaiHQPbDHo+ObFWeUEOd+zDnp64= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0/go.mod h1:SaH+v38LSCHddyk7RGlU9uZyQoRrKao6IBnJw6Kbn+c= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 h1:1u/AyyOqAWzy+SkPxDpahCNZParHV8Vid1RnI2clyDE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0/go.mod h1:z46paqbJ9l7c9fIPCXTqTGwhQZ5XoTIsfeFYWboizjs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 h1:Waw9Wfpo/IXzOI8bCB7DIk+0JZcqqsyn1JFnAc+iam8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0/go.mod h1:wnJIG4fOqyynOnnQF/eQb4/16VlX2EJAHhHgqIqWfAo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 h1:1wp/gyxsuYtuE/JFxsQRtcCDtMrO2qMvlfXALU5wkzI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0/go.mod h1:gbTHmghkGgqxMomVQQMur1Nba4M0MQ8AYThXDUjsJ38= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= +go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 h1:5fnmgteaar1VcAA69huatudPduNFz7guRtCmfZCooZI= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0/go.mod h1:lsPccfZiz1cb1AhBPmicWM2E4F1VynFXEvD8SEBS4TM= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 h1:0W5o9SzoR15ocYHEQfvfipzcNog1lBxOLfnex91Hk6s= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0/go.mod h1:zVZ8nz+VSggWmnh6tTsJqXQ7rU4xLwRtna1M4x5jq58= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= +go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= +go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -174,8 +172,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -190,8 +188,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -206,9 +204,9 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -225,26 +223,26 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= -gonum.org/v1/gonum v0.14.0/go.mod h1:AoWeoz0becf9QMWtE8iWXNXc27fK4fNeHNf/oMejGfU= +gonum.org/v1/gonum v0.15.0 h1:2lYxjRbTYyxkJxlhC+LvJIx3SsANPdRybu1tGj9/OrQ= +gonum.org/v1/gonum v0.15.0/go.mod h1:xzZVBJBtS+Mz4q0Yl2LJTk+OxOg4jiXZ7qBoM0uISGo= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -254,10 +252,8 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/service/host.go b/service/host.go index 870e0bfc446..ce8dc530d40 100644 --- a/service/host.go +++ b/service/host.go @@ -14,6 +14,12 @@ import ( "go.opentelemetry.io/collector/service/internal/graph" ) +// TODO: remove as part of https://github.com/open-telemetry/opentelemetry-collector/issues/7370 for service 1.0 +type getExporters interface { + GetExporters() map[component.DataType]map[component.ID]component.Component +} + +var _ getExporters = (*serviceHost)(nil) var _ component.Host = (*serviceHost)(nil) type serviceHost struct { diff --git a/service/internal/capabilityconsumer/capabilities_test.go b/service/internal/capabilityconsumer/capabilities_test.go index 73ce2b577a0..69e9f17249f 100644 --- a/service/internal/capabilityconsumer/capabilities_test.go +++ b/service/internal/capabilityconsumer/capabilities_test.go @@ -12,7 +12,7 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestLogs(t *testing.T) { diff --git a/service/internal/graph/graph.go b/service/internal/graph/graph.go index 04643a37526..525c269a6de 100644 --- a/service/internal/graph/graph.go +++ b/service/internal/graph/graph.go @@ -53,6 +53,8 @@ type Graph struct { telemetry servicetelemetry.TelemetrySettings } +// Build builds a full pipeline graph. +// Build also validates the configuration of the pipelines and does the actual initialization of each Component in the Graph. func Build(ctx context.Context, set Settings) (*Graph, error) { pipelines := &Graph{ componentGraph: simple.NewDirectedGraph(), @@ -73,18 +75,22 @@ func Build(ctx context.Context, set Settings) (*Graph, error) { return pipelines, pipelines.buildComponents(ctx, set) } -// Creates a node for each instance of a component and adds it to the graph +// Creates a node for each instance of a component and adds it to the graph. +// Validates that connectors are configured to export and receive correctly. func (g *Graph) createNodes(set Settings) error { - // Build a list of all connectors for easy reference + // Build a list of all connectors for easy reference. connectors := make(map[component.ID]struct{}) - // Keep track of connectors and where they are used. (map[connectorID][]pipelineID) + // Keep track of connectors and where they are used. (map[connectorID][]pipelineID). connectorsAsExporter := make(map[component.ID][]component.ID) connectorsAsReceiver := make(map[component.ID][]component.ID) + // Build each pipelineNodes struct for each pipeline by parsing the pipelineCfg. + // Also populates the connectors, connectorsAsExporter and connectorsAsReceiver maps. for pipelineID, pipelineCfg := range set.PipelineConfigs { pipe := g.pipelines[pipelineID] for _, recvID := range pipelineCfg.Receivers { + // Checks if this receiver is a connector or a regular receiver. if set.ConnectorBuilder.IsConfigured(recvID) { connectors[recvID] = struct{}{} connectorsAsReceiver[recvID] = append(connectorsAsReceiver[recvID], pipelineID) @@ -138,6 +144,7 @@ func (g *Graph) createNodes(set Settings) error { for expType := range expTypes { for recType := range recTypes { + // Typechecks the connector's receiving and exporting datatypes. if connectorStability(connFactory, expType, recType) != component.StabilityLevelUndefined { expTypes[expType] = true recTypes[recType] = true @@ -241,12 +248,15 @@ func (g *Graph) createConnector(exprPipelineID, rcvrPipelineID, connID component return connNode } +// Iterates through the pipelines and creates edges between components. func (g *Graph) createEdges() { for _, pg := range g.pipelines { + // Draw edges from each receiver to the capability node. for _, receiver := range pg.receivers { g.componentGraph.SetEdge(g.componentGraph.NewEdge(receiver, pg.capabilitiesNode)) } + // Iterates through processors, chaining them together. starts with the capabilities node. var from, to graph.Node from = pg.capabilitiesNode for _, processor := range pg.processors { @@ -254,6 +264,8 @@ func (g *Graph) createEdges() { g.componentGraph.SetEdge(g.componentGraph.NewEdge(from, to)) from = processor } + // Always inserts a fanout node before any exporters. If there is only one + // exporter, the fanout node is still created and acts as a noop. to = pg.fanOutNode g.componentGraph.SetEdge(g.componentGraph.NewEdge(from, to)) @@ -263,6 +275,9 @@ func (g *Graph) createEdges() { } } +// Uses the already built graph g to instantiate the actual components for each component of each pipeline. +// Handles calling the factories for each component - and hooking up each component to the next. +// Also calculates whether each pipeline mutates data so the receiver can know whether it needs to clone the data. func (g *Graph) buildComponents(ctx context.Context, set Settings) error { nodes, err := topo.Sort(g.componentGraph) if err != nil { @@ -282,6 +297,7 @@ func (g *Graph) buildComponents(ctx context.Context, set Settings) error { case *receiverNode: err = n.buildComponent(ctx, telemetrySettings, set.BuildInfo, set.ReceiverBuilder, g.nextConsumers(n.ID())) case *processorNode: + // nextConsumers is guaranteed to be length 1. Either it is the next processor or it is the fanout node for the exporters. err = n.buildComponent(ctx, telemetrySettings, set.BuildInfo, set.ProcessorBuilder, g.nextConsumers(n.ID())[0]) case *exporterNode: err = n.buildComponent(ctx, telemetrySettings, set.BuildInfo, set.ExporterBuilder) diff --git a/service/internal/graph/graph_test.go b/service/internal/graph/graph_test.go index 9ae936b5d05..eddd3098153 100644 --- a/service/internal/graph/graph_test.go +++ b/service/internal/graph/graph_test.go @@ -23,7 +23,7 @@ import ( "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exportertest" - "go.opentelemetry.io/collector/internal/testdata" + "go.opentelemetry.io/collector/pdata/testdata" "go.opentelemetry.io/collector/processor" "go.opentelemetry.io/collector/processor/processortest" "go.opentelemetry.io/collector/receiver" diff --git a/service/internal/proctelemetry/config.go b/service/internal/proctelemetry/config.go index 9d315b48cdb..0a9a8b08d82 100644 --- a/service/internal/proctelemetry/config.go +++ b/service/internal/proctelemetry/config.go @@ -21,15 +21,11 @@ import ( "go.opentelemetry.io/otel/bridge/opencensus" "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc" "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp" - "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc" - "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp" otelprom "go.opentelemetry.io/otel/exporters/prometheus" "go.opentelemetry.io/otel/exporters/stdout/stdoutmetric" - "go.opentelemetry.io/otel/exporters/stdout/stdouttrace" "go.opentelemetry.io/otel/sdk/instrumentation" sdkmetric "go.opentelemetry.io/otel/sdk/metric" "go.opentelemetry.io/otel/sdk/resource" - sdktrace "go.opentelemetry.io/otel/sdk/trace" "go.opentelemetry.io/collector/processor/processorhelper" semconv "go.opentelemetry.io/collector/semconv/v1.18.0" @@ -63,7 +59,6 @@ var ( } errNoValidMetricExporter = errors.New("no valid metric exporter") - errNoValidSpanExporter = errors.New("no valid span exporter") ) func InitMetricReader(ctx context.Context, reader config.MetricReader, asyncErrorChannel chan error) (sdkmetric.Reader, *http.Server, error) { @@ -86,47 +81,6 @@ func InitMetricReader(ctx context.Context, reader config.MetricReader, asyncErro return nil, nil, fmt.Errorf("unsupported metric reader type %v", reader) } -func InitSpanProcessor(ctx context.Context, processor config.SpanProcessor) (sdktrace.SpanProcessor, error) { - if processor.Batch != nil { - if processor.Batch.Exporter.Console != nil { - exp, err := stdouttrace.New( - stdouttrace.WithPrettyPrint(), - ) - if err != nil { - return nil, err - } - return initBatchSpanProcessor(processor.Batch, exp) - } - if processor.Batch.Exporter.OTLP != nil { - var err error - var exp sdktrace.SpanExporter - switch processor.Batch.Exporter.OTLP.Protocol { - case protocolProtobufHTTP: - exp, err = initOTLPHTTPSpanExporter(ctx, processor.Batch.Exporter.OTLP) - case protocolProtobufGRPC: - exp, err = initOTLPgRPCSpanExporter(ctx, processor.Batch.Exporter.OTLP) - default: - return nil, fmt.Errorf("unsupported protocol %q", processor.Batch.Exporter.OTLP.Protocol) - } - if err != nil { - return nil, err - } - return initBatchSpanProcessor(processor.Batch, exp) - } - return nil, errNoValidSpanExporter - } - return nil, fmt.Errorf("unsupported span processor type %v", processor) -} - -func InitTracerProvider(res *resource.Resource, options []sdktrace.TracerProviderOption) (*sdktrace.TracerProvider, error) { - opts := []sdktrace.TracerProviderOption{ - sdktrace.WithResource(res), - } - - opts = append(opts, options...) - return sdktrace.NewTracerProvider(opts...), nil -} - func InitOpenTelemetry(res *resource.Resource, options []sdkmetric.Option, disableHighCardinality bool) (*sdkmetric.MeterProvider, error) { opts := []sdkmetric.Option{ sdkmetric.WithResource(res), @@ -340,104 +294,3 @@ func initOTLPHTTPExporter(ctx context.Context, otlpConfig *config.OTLPMetric) (s return otlpmetrichttp.New(ctx, opts...) } - -func initOTLPgRPCSpanExporter(ctx context.Context, otlpConfig *config.OTLP) (sdktrace.SpanExporter, error) { - opts := []otlptracegrpc.Option{} - - if len(otlpConfig.Endpoint) > 0 { - u, err := url.ParseRequestURI(normalizeEndpoint(otlpConfig.Endpoint)) - if err != nil { - return nil, err - } - opts = append(opts, otlptracegrpc.WithEndpoint(u.Host)) - if u.Scheme == "http" { - opts = append(opts, otlptracegrpc.WithInsecure()) - } - } - - if otlpConfig.Compression != nil { - switch *otlpConfig.Compression { - case "gzip": - opts = append(opts, otlptracegrpc.WithCompressor(*otlpConfig.Compression)) - case "none": - break - default: - return nil, fmt.Errorf("unsupported compression %q", *otlpConfig.Compression) - } - } - if otlpConfig.Timeout != nil && *otlpConfig.Timeout > 0 { - opts = append(opts, otlptracegrpc.WithTimeout(time.Millisecond*time.Duration(*otlpConfig.Timeout))) - } - if len(otlpConfig.Headers) > 0 { - opts = append(opts, otlptracegrpc.WithHeaders(otlpConfig.Headers)) - } - - return otlptracegrpc.New(ctx, opts...) -} - -func initOTLPHTTPSpanExporter(ctx context.Context, otlpConfig *config.OTLP) (sdktrace.SpanExporter, error) { - opts := []otlptracehttp.Option{} - - if len(otlpConfig.Endpoint) > 0 { - u, err := url.ParseRequestURI(normalizeEndpoint(otlpConfig.Endpoint)) - if err != nil { - return nil, err - } - opts = append(opts, otlptracehttp.WithEndpoint(u.Host)) - - if u.Scheme == "http" { - opts = append(opts, otlptracehttp.WithInsecure()) - } - if len(u.Path) > 0 { - opts = append(opts, otlptracehttp.WithURLPath(u.Path)) - } - } - if otlpConfig.Compression != nil { - switch *otlpConfig.Compression { - case "gzip": - opts = append(opts, otlptracehttp.WithCompression(otlptracehttp.GzipCompression)) - case "none": - opts = append(opts, otlptracehttp.WithCompression(otlptracehttp.NoCompression)) - default: - return nil, fmt.Errorf("unsupported compression %q", *otlpConfig.Compression) - } - } - if otlpConfig.Timeout != nil && *otlpConfig.Timeout > 0 { - opts = append(opts, otlptracehttp.WithTimeout(time.Millisecond*time.Duration(*otlpConfig.Timeout))) - } - if len(otlpConfig.Headers) > 0 { - opts = append(opts, otlptracehttp.WithHeaders(otlpConfig.Headers)) - } - - return otlptracehttp.New(ctx, opts...) -} - -func initBatchSpanProcessor(bsp *config.BatchSpanProcessor, exp sdktrace.SpanExporter) (sdktrace.SpanProcessor, error) { - opts := []sdktrace.BatchSpanProcessorOption{} - if bsp.ExportTimeout != nil { - if *bsp.ExportTimeout < 0 { - return nil, fmt.Errorf("invalid export timeout %d", *bsp.ExportTimeout) - } - opts = append(opts, sdktrace.WithExportTimeout(time.Millisecond*time.Duration(*bsp.ExportTimeout))) - } - if bsp.MaxExportBatchSize != nil { - if *bsp.MaxExportBatchSize < 0 { - return nil, fmt.Errorf("invalid batch size %d", *bsp.MaxExportBatchSize) - } - opts = append(opts, sdktrace.WithMaxExportBatchSize(*bsp.MaxExportBatchSize)) - } - if bsp.MaxQueueSize != nil { - if *bsp.MaxQueueSize < 0 { - return nil, fmt.Errorf("invalid queue size %d", *bsp.MaxQueueSize) - } - opts = append(opts, sdktrace.WithMaxQueueSize(*bsp.MaxQueueSize)) - } - if bsp.ScheduleDelay != nil { - if *bsp.ScheduleDelay < 0 { - return nil, fmt.Errorf("invalid schedule delay %d", *bsp.ScheduleDelay) - } - opts = append(opts, sdktrace.WithBatchTimeout(time.Millisecond*time.Duration(*bsp.ScheduleDelay))) - } - return sdktrace.NewBatchSpanProcessor(exp, opts...), nil - -} diff --git a/service/internal/proctelemetry/config_test.go b/service/internal/proctelemetry/config_test.go index 6f7bbc16dfe..5228b0ead44 100644 --- a/service/internal/proctelemetry/config_test.go +++ b/service/internal/proctelemetry/config_test.go @@ -352,360 +352,3 @@ func TestMetricReader(t *testing.T) { }) } } - -func TestSpanProcessor(t *testing.T) { - testCases := []struct { - name string - processor config.SpanProcessor - args any - err error - }{ - { - name: "no processor", - err: errors.New("unsupported span processor type { }"), - }, - { - name: "batch processor invalid exporter", - processor: config.SpanProcessor{ - Batch: &config.BatchSpanProcessor{ - Exporter: config.SpanExporter{}, - }, - }, - err: errNoValidSpanExporter, - }, - { - name: "batch processor invalid batch size console exporter", - processor: config.SpanProcessor{ - Batch: &config.BatchSpanProcessor{ - MaxExportBatchSize: intPtr(-1), - Exporter: config.SpanExporter{ - Console: config.Console{}, - }, - }, - }, - err: errors.New("invalid batch size -1"), - }, - { - name: "batch processor invalid export timeout console exporter", - processor: config.SpanProcessor{ - Batch: &config.BatchSpanProcessor{ - ExportTimeout: intPtr(-2), - Exporter: config.SpanExporter{ - Console: config.Console{}, - }, - }, - }, - err: errors.New("invalid export timeout -2"), - }, - { - name: "batch processor invalid queue size console exporter", - processor: config.SpanProcessor{ - Batch: &config.BatchSpanProcessor{ - MaxQueueSize: intPtr(-3), - Exporter: config.SpanExporter{ - Console: config.Console{}, - }, - }, - }, - err: errors.New("invalid queue size -3"), - }, - { - name: "batch processor invalid schedule delay console exporter", - processor: config.SpanProcessor{ - Batch: &config.BatchSpanProcessor{ - ScheduleDelay: intPtr(-4), - Exporter: config.SpanExporter{ - Console: config.Console{}, - }, - }, - }, - err: errors.New("invalid schedule delay -4"), - }, - { - name: "batch processor console exporter", - processor: config.SpanProcessor{ - Batch: &config.BatchSpanProcessor{ - MaxExportBatchSize: intPtr(0), - ExportTimeout: intPtr(0), - MaxQueueSize: intPtr(0), - ScheduleDelay: intPtr(0), - Exporter: config.SpanExporter{ - Console: config.Console{}, - }, - }, - }, - }, - { - name: "batch/otlp-exporter-invalid-protocol", - processor: config.SpanProcessor{ - Batch: &config.BatchSpanProcessor{ - MaxExportBatchSize: intPtr(0), - ExportTimeout: intPtr(0), - MaxQueueSize: intPtr(0), - ScheduleDelay: intPtr(0), - Exporter: config.SpanExporter{ - OTLP: &config.OTLP{ - Protocol: *strPtr("http/invalid"), - }, - }, - }, - }, - err: errors.New("unsupported protocol \"http/invalid\""), - }, - { - name: "batch/otlp-grpc-exporter-no-endpoint", - processor: config.SpanProcessor{ - Batch: &config.BatchSpanProcessor{ - MaxExportBatchSize: intPtr(0), - ExportTimeout: intPtr(0), - MaxQueueSize: intPtr(0), - ScheduleDelay: intPtr(0), - Exporter: config.SpanExporter{ - OTLP: &config.OTLP{ - Protocol: "grpc/protobuf", - Compression: strPtr("gzip"), - Timeout: intPtr(1000), - Headers: map[string]string{ - "test": "test1", - }, - }, - }, - }, - }, - }, - { - name: "batch/otlp-grpc-exporter", - processor: config.SpanProcessor{ - Batch: &config.BatchSpanProcessor{ - MaxExportBatchSize: intPtr(0), - ExportTimeout: intPtr(0), - MaxQueueSize: intPtr(0), - ScheduleDelay: intPtr(0), - Exporter: config.SpanExporter{ - OTLP: &config.OTLP{ - Protocol: "grpc/protobuf", - Endpoint: "http://localhost:4317", - Compression: strPtr("gzip"), - Timeout: intPtr(1000), - Headers: map[string]string{ - "test": "test1", - }, - }, - }, - }, - }, - }, - { - name: "batch/otlp-grpc-exporter-no-scheme", - processor: config.SpanProcessor{ - Batch: &config.BatchSpanProcessor{ - MaxExportBatchSize: intPtr(0), - ExportTimeout: intPtr(0), - MaxQueueSize: intPtr(0), - ScheduleDelay: intPtr(0), - Exporter: config.SpanExporter{ - OTLP: &config.OTLP{ - Protocol: "grpc/protobuf", - Endpoint: "localhost:4317", - Compression: strPtr("gzip"), - Timeout: intPtr(1000), - Headers: map[string]string{ - "test": "test1", - }, - }, - }, - }, - }, - }, - { - name: "batch/otlp-grpc-invalid-endpoint", - processor: config.SpanProcessor{ - Batch: &config.BatchSpanProcessor{ - MaxExportBatchSize: intPtr(0), - ExportTimeout: intPtr(0), - MaxQueueSize: intPtr(0), - ScheduleDelay: intPtr(0), - Exporter: config.SpanExporter{ - OTLP: &config.OTLP{ - Protocol: "grpc/protobuf", - Endpoint: " ", - Compression: strPtr("gzip"), - Timeout: intPtr(1000), - Headers: map[string]string{ - "test": "test1", - }, - }, - }, - }, - }, - err: &url.Error{Op: "parse", URL: "http:// ", Err: url.InvalidHostError(" ")}, - }, - { - name: "batch/otlp-grpc-invalid-compression", - processor: config.SpanProcessor{ - Batch: &config.BatchSpanProcessor{ - MaxExportBatchSize: intPtr(0), - ExportTimeout: intPtr(0), - MaxQueueSize: intPtr(0), - ScheduleDelay: intPtr(0), - Exporter: config.SpanExporter{ - OTLP: &config.OTLP{ - Protocol: "grpc/protobuf", - Endpoint: "localhost:4317", - Compression: strPtr("invalid"), - Timeout: intPtr(1000), - Headers: map[string]string{ - "test": "test1", - }, - }, - }, - }, - }, - err: errors.New("unsupported compression \"invalid\""), - }, - { - name: "batch/otlp-http-exporter", - processor: config.SpanProcessor{ - Batch: &config.BatchSpanProcessor{ - MaxExportBatchSize: intPtr(0), - ExportTimeout: intPtr(0), - MaxQueueSize: intPtr(0), - ScheduleDelay: intPtr(0), - Exporter: config.SpanExporter{ - OTLP: &config.OTLP{ - Protocol: "http/protobuf", - Endpoint: "http://localhost:4318", - Compression: strPtr("gzip"), - Timeout: intPtr(1000), - Headers: map[string]string{ - "test": "test1", - }, - }, - }, - }, - }, - }, - { - name: "batch/otlp-http-exporter-with-path", - processor: config.SpanProcessor{ - Batch: &config.BatchSpanProcessor{ - MaxExportBatchSize: intPtr(0), - ExportTimeout: intPtr(0), - MaxQueueSize: intPtr(0), - ScheduleDelay: intPtr(0), - Exporter: config.SpanExporter{ - OTLP: &config.OTLP{ - Protocol: "http/protobuf", - Endpoint: "http://localhost:4318/path/123", - Compression: strPtr("none"), - Timeout: intPtr(1000), - Headers: map[string]string{ - "test": "test1", - }, - }, - }, - }, - }, - }, - { - name: "batch/otlp-http-exporter-no-endpoint", - processor: config.SpanProcessor{ - Batch: &config.BatchSpanProcessor{ - MaxExportBatchSize: intPtr(0), - ExportTimeout: intPtr(0), - MaxQueueSize: intPtr(0), - ScheduleDelay: intPtr(0), - Exporter: config.SpanExporter{ - OTLP: &config.OTLP{ - Protocol: "http/protobuf", - Compression: strPtr("gzip"), - Timeout: intPtr(1000), - Headers: map[string]string{ - "test": "test1", - }, - }, - }, - }, - }, - }, - { - name: "batch/otlp-http-exporter-no-scheme", - processor: config.SpanProcessor{ - Batch: &config.BatchSpanProcessor{ - MaxExportBatchSize: intPtr(0), - ExportTimeout: intPtr(0), - MaxQueueSize: intPtr(0), - ScheduleDelay: intPtr(0), - Exporter: config.SpanExporter{ - OTLP: &config.OTLP{ - Protocol: "http/protobuf", - Endpoint: "localhost:4318", - Compression: strPtr("gzip"), - Timeout: intPtr(1000), - Headers: map[string]string{ - "test": "test1", - }, - }, - }, - }, - }, - }, - { - name: "batch/otlp-http-invalid-endpoint", - processor: config.SpanProcessor{ - Batch: &config.BatchSpanProcessor{ - MaxExportBatchSize: intPtr(0), - ExportTimeout: intPtr(0), - MaxQueueSize: intPtr(0), - ScheduleDelay: intPtr(0), - Exporter: config.SpanExporter{ - OTLP: &config.OTLP{ - Protocol: "http/protobuf", - Endpoint: " ", - Compression: strPtr("gzip"), - Timeout: intPtr(1000), - Headers: map[string]string{ - "test": "test1", - }, - }, - }, - }, - }, - err: &url.Error{Op: "parse", URL: "http:// ", Err: url.InvalidHostError(" ")}, - }, - { - name: "batch/otlp-http-invalid-compression", - processor: config.SpanProcessor{ - Batch: &config.BatchSpanProcessor{ - MaxExportBatchSize: intPtr(0), - ExportTimeout: intPtr(0), - MaxQueueSize: intPtr(0), - ScheduleDelay: intPtr(0), - Exporter: config.SpanExporter{ - OTLP: &config.OTLP{ - Protocol: "http/protobuf", - Endpoint: "localhost:4318", - Compression: strPtr("invalid"), - Timeout: intPtr(1000), - Headers: map[string]string{ - "test": "test1", - }, - }, - }, - }, - }, - err: errors.New("unsupported compression \"invalid\""), - }, - } - for _, tt := range testCases { - t.Run(tt.name, func(t *testing.T) { - processor, err := InitSpanProcessor(context.Background(), tt.processor) - defer func() { - if processor != nil { - assert.NoError(t, processor.Shutdown(context.Background())) - } - }() - assert.Equal(t, tt.err, err) - }) - } -} diff --git a/service/internal/resource/config_test.go b/service/internal/resource/config_test.go index ab8f8e816c3..38fcba1a139 100644 --- a/service/internal/resource/config_test.go +++ b/service/internal/resource/config_test.go @@ -8,8 +8,11 @@ import ( "github.com/google/uuid" "github.com/stretchr/testify/assert" + sdkresource "go.opentelemetry.io/otel/sdk/resource" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/pdata/pcommon" + semconv "go.opentelemetry.io/collector/semconv/v1.18.0" ) const ( @@ -101,3 +104,67 @@ func TestNew(t *testing.T) { } } + +func pdataFromSdk(res *sdkresource.Resource) pcommon.Resource { + // pcommon.NewResource is the best way to generate a new resource currently and is safe to use outside of tests. + // Because the resource is signal agnostic, and we need a net new resource, not an existing one, this is the only + // method of creating it without exposing internal packages. + pcommonRes := pcommon.NewResource() + for _, keyValue := range res.Attributes() { + pcommonRes.Attributes().PutStr(string(keyValue.Key), keyValue.Value.AsString()) + } + return pcommonRes +} + +func TestBuildResource(t *testing.T) { + buildInfo := component.NewDefaultBuildInfo() + + // Check default config + var resMap map[string]*string + otelRes := New(buildInfo, resMap) + res := pdataFromSdk(otelRes) + + assert.Equal(t, res.Attributes().Len(), 3) + value, ok := res.Attributes().Get(semconv.AttributeServiceName) + assert.True(t, ok) + assert.Equal(t, buildInfo.Command, value.AsString()) + value, ok = res.Attributes().Get(semconv.AttributeServiceVersion) + assert.True(t, ok) + assert.Equal(t, buildInfo.Version, value.AsString()) + + _, ok = res.Attributes().Get(semconv.AttributeServiceInstanceID) + assert.True(t, ok) + + // Check override by nil + resMap = map[string]*string{ + semconv.AttributeServiceName: nil, + semconv.AttributeServiceVersion: nil, + semconv.AttributeServiceInstanceID: nil, + } + otelRes = New(buildInfo, resMap) + res = pdataFromSdk(otelRes) + + // Attributes should not exist since we nil-ified all. + assert.Equal(t, res.Attributes().Len(), 0) + + // Check override values + strPtr := func(v string) *string { return &v } + resMap = map[string]*string{ + semconv.AttributeServiceName: strPtr("a"), + semconv.AttributeServiceVersion: strPtr("b"), + semconv.AttributeServiceInstanceID: strPtr("c"), + } + otelRes = New(buildInfo, resMap) + res = pdataFromSdk(otelRes) + + assert.Equal(t, res.Attributes().Len(), 3) + value, ok = res.Attributes().Get(semconv.AttributeServiceName) + assert.True(t, ok) + assert.Equal(t, "a", value.AsString()) + value, ok = res.Attributes().Get(semconv.AttributeServiceVersion) + assert.True(t, ok) + assert.Equal(t, "b", value.AsString()) + value, ok = res.Attributes().Get(semconv.AttributeServiceInstanceID) + assert.True(t, ok) + assert.Equal(t, "c", value.AsString()) +} diff --git a/service/internal/status/status.go b/service/internal/status/status.go index 21790b1061f..e1d524906e5 100644 --- a/service/internal/status/status.go +++ b/service/internal/status/status.go @@ -121,17 +121,6 @@ func (r *Reporter) Ready() { r.ready = true } -// ReportComponentStatus reports status for the given InstanceID -// Deprecated: [v0.92.0] This function will be removed in a future release. -// Use ReportStatus instead. -func (r *Reporter) ReportComponentStatus( - id *component.InstanceID, - ev *component.StatusEvent, -) error { - r.ReportStatus(id, ev) - return nil -} - // ReportStatus reports status for the given InstanceID func (r *Reporter) ReportStatus( id *component.InstanceID, @@ -148,14 +137,6 @@ func (r *Reporter) ReportStatus( } } -// ReportComponentOkIfStarting reports StatusOK if the component's current status is Starting -// Deprecated: [v0.92.0] This function will be removed in a future release. -// Use ReportOKIfStarting instead. -func (r *Reporter) ReportComponentOKIfStarting(id *component.InstanceID) error { - r.ReportOKIfStarting(id) - return nil -} - func (r *Reporter) ReportOKIfStarting(id *component.InstanceID) { r.mu.Lock() defer r.mu.Unlock() diff --git a/service/internal/testcomponents/example_connector.go b/service/internal/testcomponents/example_connector.go index 75c5145cf7b..a521389cf80 100644 --- a/service/internal/testcomponents/example_connector.go +++ b/service/internal/testcomponents/example_connector.go @@ -9,10 +9,10 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/connector" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/testdata" ) var connType = component.MustNewType("exampleconnector") diff --git a/service/internal/testcomponents/example_router_test.go b/service/internal/testcomponents/example_router_test.go index 23f94854b2a..2f44e04902d 100644 --- a/service/internal/testcomponents/example_router_test.go +++ b/service/internal/testcomponents/example_router_test.go @@ -15,7 +15,7 @@ import ( "go.opentelemetry.io/collector/connector/connectortest" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestExampleRouter(t *testing.T) { diff --git a/service/service.go b/service/service.go index febff396417..902454c78f1 100644 --- a/service/service.go +++ b/service/service.go @@ -9,6 +9,7 @@ import ( "fmt" "runtime" + "go.opentelemetry.io/otel/metric" sdkresource "go.opentelemetry.io/otel/sdk/resource" "go.uber.org/multierr" "go.uber.org/zap" @@ -33,7 +34,7 @@ import ( "go.opentelemetry.io/collector/service/telemetry" ) -// Settings holds configuration for building a new service. +// Settings holds configuration for building a new Service. type Settings struct { // BuildInfo provides collector start information. BuildInfo component.BuildInfo @@ -71,6 +72,7 @@ type Service struct { collectorConf *confmap.Conf } +// New creates a new Service, its telemetry, and Components. func New(ctx context.Context, set Settings, cfg Config) (*Service, error) { disableHighCard := obsreportconfig.DisableHighCardinalityMetricsfeatureGate.IsEnabled() extendedConfig := obsreportconfig.UseOtelWithSDKConfigurationForInternalTelemetryFeatureGate.IsEnabled() @@ -91,23 +93,26 @@ func New(ctx context.Context, set Settings, cfg Config) (*Service, error) { if err != nil { return nil, fmt.Errorf("failed to get logger: %w", err) } + + // Fetch data for internal telemetry like instance id and sdk version to provide for internal telemetry. res := resource.New(set.BuildInfo, cfg.Telemetry.Resource) pcommonRes := pdataFromSdk(res) logger := tel.Logger() + logger.Info("Setting up own telemetry...") mp, err := newMeterProvider( meterProviderSettings{ res: res, - logger: logger, cfg: cfg.Telemetry.Metrics, asyncErrorChannel: set.AsyncErrorChannel, }, disableHighCard, - extendedConfig, ) if err != nil { return nil, fmt.Errorf("failed to create metric provider: %w", err) } + + logsAboutMeterProvider(logger, cfg.Telemetry.Metrics, mp, extendedConfig) srv.telemetrySettings = servicetelemetry.TelemetrySettings{ Logger: logger, MeterProvider: mp, @@ -133,6 +138,27 @@ func New(ctx context.Context, set Settings, cfg Config) (*Service, error) { return srv, nil } +func logsAboutMeterProvider(logger *zap.Logger, cfg telemetry.MetricsConfig, mp metric.MeterProvider, extendedConfig bool) { + if cfg.Level == configtelemetry.LevelNone || (cfg.Address == "" && len(cfg.Readers) == 0) { + logger.Info( + "Skipped telemetry setup.", + zap.String(zapKeyTelemetryAddress, cfg.Address), + zap.Stringer(zapKeyTelemetryLevel, cfg.Level), + ) + return + } + + if len(cfg.Address) != 0 && extendedConfig { + logger.Warn("service::telemetry::metrics::address is being deprecated in favor of service::telemetry::metrics::readers") + } + + if lmp, ok := mp.(interface { + LogAboutServers(logger *zap.Logger, cfg telemetry.MetricsConfig) + }); ok { + lmp.LogAboutServers(logger, cfg) + } +} + // Start starts the extensions and pipelines. If Start fails Shutdown should be called to ensure a clean state. // Start does the following steps in order: // 1. Start all extensions. @@ -224,6 +250,7 @@ func (srv *Service) Shutdown(ctx context.Context) error { return errs } +// Creates extensions and then builds the pipeline graph. func (srv *Service) initExtensionsAndPipeline(ctx context.Context, set Settings, cfg Config) error { var err error extensionsSettings := extensions.Settings{ diff --git a/service/telemetry.go b/service/telemetry.go index c7aab098747..365ea3d23c5 100644 --- a/service/telemetry.go +++ b/service/telemetry.go @@ -37,26 +37,16 @@ type meterProvider struct { type meterProviderSettings struct { res *resource.Resource - logger *zap.Logger cfg telemetry.MetricsConfig asyncErrorChannel chan error } -func newMeterProvider(set meterProviderSettings, disableHighCardinality bool, extendedConfig bool) (metric.MeterProvider, error) { +func newMeterProvider(set meterProviderSettings, disableHighCardinality bool) (metric.MeterProvider, error) { if set.cfg.Level == configtelemetry.LevelNone || (set.cfg.Address == "" && len(set.cfg.Readers) == 0) { - set.logger.Info( - "Skipping telemetry setup.", - zap.String(zapKeyTelemetryAddress, set.cfg.Address), - zap.String(zapKeyTelemetryLevel, set.cfg.Level.String()), - ) return noopmetric.NewMeterProvider(), nil } - set.logger.Info("Setting up own telemetry...") if len(set.cfg.Address) != 0 { - if extendedConfig { - set.logger.Warn("service::telemetry::metrics::address is being deprecated in favor of service::telemetry::metrics::readers") - } host, port, err := net.SplitHostPort(set.cfg.Address) if err != nil { return nil, err @@ -94,11 +84,7 @@ func newMeterProvider(set meterProviderSettings, disableHighCardinality bool, ex } if server != nil { mp.servers = append(mp.servers, server) - set.logger.Info( - "Serving metrics", - zap.String(zapKeyTelemetryAddress, server.Addr), - zap.String(zapKeyTelemetryLevel, set.cfg.Level.String()), - ) + } opts = append(opts, sdkmetric.WithReader(r)) } @@ -111,6 +97,17 @@ func newMeterProvider(set meterProviderSettings, disableHighCardinality bool, ex return mp, nil } +// LogAboutServers logs about the servers that are serving metrics. +func (mp *meterProvider) LogAboutServers(logger *zap.Logger, cfg telemetry.MetricsConfig) { + for _, server := range mp.servers { + logger.Info( + "Serving metrics", + zap.String(zapKeyTelemetryAddress, server.Addr), + zap.Stringer(zapKeyTelemetryLevel, cfg.Level), + ) + } +} + // Shutdown the meter provider and all the associated resources. // The type signature of this method matches that of the sdkmetric.MeterProvider. func (mp *meterProvider) Shutdown(ctx context.Context) error { diff --git a/service/telemetry/otel_trace_sampler.go b/service/telemetry/otel_trace_sampler.go deleted file mode 100644 index 25928bfe31e..00000000000 --- a/service/telemetry/otel_trace_sampler.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package telemetry // import "go.opentelemetry.io/collector/service/telemetry" - -import ( - sdktrace "go.opentelemetry.io/otel/sdk/trace" -) - -type recordSampler struct{} - -func (r recordSampler) ShouldSample(sdktrace.SamplingParameters) sdktrace.SamplingResult { - return sdktrace.SamplingResult{Decision: sdktrace.RecordOnly} -} - -func (r recordSampler) Description() string { - return "Always record sampler" -} - -func alwaysRecord() sdktrace.Sampler { - rs := &recordSampler{} - return sdktrace.ParentBased( - rs, - sdktrace.WithRemoteParentSampled(sdktrace.AlwaysSample()), - sdktrace.WithRemoteParentNotSampled(rs), - sdktrace.WithLocalParentSampled(sdktrace.AlwaysSample()), - sdktrace.WithRemoteParentSampled(rs)) -} diff --git a/service/telemetry/telemetry.go b/service/telemetry/telemetry.go index d557d1e957e..008a50c07ea 100644 --- a/service/telemetry/telemetry.go +++ b/service/telemetry/telemetry.go @@ -7,6 +7,7 @@ import ( "context" "errors" + "go.opentelemetry.io/contrib/config" "go.opentelemetry.io/contrib/propagators/b3" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/propagation" @@ -17,8 +18,6 @@ import ( "go.uber.org/zap/zapcore" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/service/internal/proctelemetry" - "go.opentelemetry.io/collector/service/internal/resource" ) const ( @@ -33,7 +32,7 @@ var ( type Telemetry struct { logger *zap.Logger - tracerProvider *sdktrace.TracerProvider + tracerProvider trace.TracerProvider } func (t *Telemetry) TracerProvider() trace.TracerProvider { @@ -46,9 +45,13 @@ func (t *Telemetry) Logger() *zap.Logger { func (t *Telemetry) Shutdown(ctx context.Context) error { // TODO: Sync logger. - return multierr.Combine( - t.tracerProvider.Shutdown(ctx), - ) + if tp, ok := t.tracerProvider.(*sdktrace.TracerProvider); ok { + return multierr.Combine( + tp.Shutdown(ctx), + ) + } + // should this return an error? + return nil } // Settings holds configuration for building Telemetry. @@ -64,29 +67,36 @@ func New(ctx context.Context, set Settings, cfg Config) (*Telemetry, error) { return nil, err } - tp, err := newTracerProvider(ctx, set, cfg) - if err != nil { - return nil, err - } - - return &Telemetry{ - logger: logger, - tracerProvider: tp, - }, nil -} - -func newTracerProvider(ctx context.Context, set Settings, cfg Config) (*sdktrace.TracerProvider, error) { - opts := []sdktrace.TracerProviderOption{sdktrace.WithSampler(alwaysRecord())} - for _, processor := range cfg.Traces.Processors { - sp, err := proctelemetry.InitSpanProcessor(ctx, processor) - if err != nil { - return nil, err - } - opts = append(opts, sdktrace.WithSpanProcessor(sp)) - } + sdk, err := config.NewSDK( + config.WithContext(ctx), + config.WithOpenTelemetryConfiguration( + config.OpenTelemetryConfiguration{ + TracerProvider: &config.TracerProvider{ + Processors: cfg.Traces.Processors, + // TODO: once https://github.com/open-telemetry/opentelemetry-configuration/issues/83 is resolved, + // configuration for sampler should be done here via something like the following: + // + // Sampler: &config.Sampler{ + // ParentBased: &config.SamplerParentBased{ + // LocalParentSampled: &config.Sampler{ + // AlwaysOn: config.SamplerAlwaysOn{}, + // }, + // LocalParentNotSampled: &config.Sampler{ + // RecordOnly: config.SamplerRecordOnly{}, + // }, + // RemoteParentSampled: &config.Sampler{ + // AlwaysOn: config.SamplerAlwaysOn{}, + // }, + // RemoteParentNotSampled: &config.Sampler{ + // RecordOnly: config.SamplerRecordOnly{}, + // }, + // }, + // }, + }, + }, + ), + ) - res := resource.New(set.BuildInfo, cfg.Resource) - tp, err := proctelemetry.InitTracerProvider(res, opts) if err != nil { return nil, err } @@ -97,7 +107,10 @@ func newTracerProvider(ctx context.Context, set Settings, cfg Config) (*sdktrace return nil, err } - return tp, nil + return &Telemetry{ + logger: logger, + tracerProvider: sdk.TracerProvider(), + }, nil } func textMapPropagatorFromConfig(props []string) (propagation.TextMapPropagator, error) { diff --git a/service/telemetry/telemetry_test.go b/service/telemetry/telemetry_test.go index b01b3c7d8c8..c72d8c75e55 100644 --- a/service/telemetry/telemetry_test.go +++ b/service/telemetry/telemetry_test.go @@ -9,6 +9,9 @@ import ( "time" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/otel/trace" + "go.opentelemetry.io/otel/trace/noop" "go.uber.org/zap" "go.uber.org/zap/zapcore" @@ -115,3 +118,26 @@ func TestSampledLogger(t *testing.T) { }) } } + +func TestTelemetryShutdown(t *testing.T) { + tests := []struct { + name string + provider trace.TracerProvider + wantErr error + }{ + { + name: "No provider", + }, + { + name: "Non-SDK provider", + provider: noop.NewTracerProvider(), + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + telemetry := Telemetry{tracerProvider: tt.provider} + err := telemetry.Shutdown(context.Background()) + require.Equal(t, tt.wantErr, err) + }) + } +} diff --git a/service/telemetry_test.go b/service/telemetry_test.go index 37bd3d82b28..2377a077052 100644 --- a/service/telemetry_test.go +++ b/service/telemetry_test.go @@ -11,13 +11,11 @@ import ( io_prometheus_client "github.com/prometheus/client_model/go" "github.com/prometheus/common/expfmt" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opencensus.io/stats" "go.opencensus.io/stats/view" "go.opentelemetry.io/contrib/config" "go.opentelemetry.io/otel/metric" - "go.uber.org/zap" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" @@ -37,63 +35,6 @@ const ( counterName = "test_counter" ) -func TestBuildResource(t *testing.T) { - buildInfo := component.NewDefaultBuildInfo() - - // Check default config - cfg := telemetry.Config{} - otelRes := resource.New(buildInfo, cfg.Resource) - res := pdataFromSdk(otelRes) - - assert.Equal(t, res.Attributes().Len(), 3) - value, ok := res.Attributes().Get(semconv.AttributeServiceName) - assert.True(t, ok) - assert.Equal(t, buildInfo.Command, value.AsString()) - value, ok = res.Attributes().Get(semconv.AttributeServiceVersion) - assert.True(t, ok) - assert.Equal(t, buildInfo.Version, value.AsString()) - - _, ok = res.Attributes().Get(semconv.AttributeServiceInstanceID) - assert.True(t, ok) - - // Check override by nil - cfg = telemetry.Config{ - Resource: map[string]*string{ - semconv.AttributeServiceName: nil, - semconv.AttributeServiceVersion: nil, - semconv.AttributeServiceInstanceID: nil, - }, - } - otelRes = resource.New(buildInfo, cfg.Resource) - res = pdataFromSdk(otelRes) - - // Attributes should not exist since we nil-ified all. - assert.Equal(t, res.Attributes().Len(), 0) - - // Check override values - strPtr := func(v string) *string { return &v } - cfg = telemetry.Config{ - Resource: map[string]*string{ - semconv.AttributeServiceName: strPtr("a"), - semconv.AttributeServiceVersion: strPtr("b"), - semconv.AttributeServiceInstanceID: strPtr("c"), - }, - } - otelRes = resource.New(buildInfo, cfg.Resource) - res = pdataFromSdk(otelRes) - - assert.Equal(t, res.Attributes().Len(), 3) - value, ok = res.Attributes().Get(semconv.AttributeServiceName) - assert.True(t, ok) - assert.Equal(t, "a", value.AsString()) - value, ok = res.Attributes().Get(semconv.AttributeServiceVersion) - assert.True(t, ok) - assert.Equal(t, "b", value.AsString()) - value, ok = res.Attributes().Get(semconv.AttributeServiceInstanceID) - assert.True(t, ok) - assert.Equal(t, "c", value.AsString()) -} - func TestTelemetryInit(t *testing.T) { type metricValue struct { value float64 @@ -299,11 +240,10 @@ func TestTelemetryInit(t *testing.T) { } set := meterProviderSettings{ res: resource.New(component.NewDefaultBuildInfo(), tc.cfg.Resource), - logger: zap.NewNop(), cfg: tc.cfg.Metrics, asyncErrorChannel: make(chan error), } - mp, err := newMeterProvider(set, tc.disableHighCard, tc.extendedConfig) + mp, err := newMeterProvider(set, tc.disableHighCard) require.NoError(t, err) defer func() { if prov, ok := mp.(interface{ Shutdown(context.Context) error }); ok { diff --git a/versions.yaml b/versions.yaml index 7c0074f9ad1..0c8cf222c6a 100644 --- a/versions.yaml +++ b/versions.yaml @@ -3,13 +3,14 @@ module-sets: stable: - version: v1.3.0 + version: v1.7.0 modules: - go.opentelemetry.io/collector/featuregate - go.opentelemetry.io/collector/pdata - go.opentelemetry.io/collector/config/configopaque + - go.opentelemetry.io/collector/config/configcompression beta: - version: v0.96.0 + version: v0.100.0 modules: - go.opentelemetry.io/collector - go.opentelemetry.io/collector/cmd/builder @@ -23,7 +24,6 @@ module-sets: - go.opentelemetry.io/collector/confmap/provider/httpsprovider - go.opentelemetry.io/collector/confmap/provider/yamlprovider - go.opentelemetry.io/collector/config/configauth - - go.opentelemetry.io/collector/config/configcompression - go.opentelemetry.io/collector/config/configgrpc - go.opentelemetry.io/collector/config/confighttp - go.opentelemetry.io/collector/config/confignet @@ -37,6 +37,7 @@ module-sets: - go.opentelemetry.io/collector/exporter - go.opentelemetry.io/collector/exporter/debugexporter - go.opentelemetry.io/collector/exporter/loggingexporter + - go.opentelemetry.io/collector/exporter/nopexporter - go.opentelemetry.io/collector/exporter/otlpexporter - go.opentelemetry.io/collector/exporter/otlphttpexporter - go.opentelemetry.io/collector/extension @@ -45,13 +46,16 @@ module-sets: - go.opentelemetry.io/collector/extension/zpagesextension - go.opentelemetry.io/collector/extension/memorylimiterextension - go.opentelemetry.io/collector/otelcol + - go.opentelemetry.io/collector/pdata/testdata - go.opentelemetry.io/collector/processor - go.opentelemetry.io/collector/processor/batchprocessor - go.opentelemetry.io/collector/processor/memorylimiterprocessor - go.opentelemetry.io/collector/receiver + - go.opentelemetry.io/collector/receiver/nopreceiver - go.opentelemetry.io/collector/receiver/otlpreceiver - go.opentelemetry.io/collector/semconv - go.opentelemetry.io/collector/service + - go.opentelemetry.io/collector/filter excluded-modules: - go.opentelemetry.io/collector/cmd/otelcorecol From 66d4f399c284886319ba6178da6f31a48eb9189f Mon Sep 17 00:00:00 2001 From: Steve Strugnell Date: Fri, 14 Jun 2024 12:41:03 +1200 Subject: [PATCH 4/5] Upstream merge 0.102.1 (#44) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [mdatagen] use mdatagen to produce component internal telemetry (#10054) #### Description This updates mdatagen to generate internal telemetry for components based on metadata.yaml configuration. #### Testing Added tests to mdatagen and updated the batch processor to use this as well for synchronous counters and histogram --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> (cherry picked from commit d73235fc9104fdc10f930c36bcf122c7a5bd162c) * [chore] Update release schedule after release 0.100.0 (#10092) Signed-off-by: Bogdan Drutu (cherry picked from commit 430369240f7fc2b640cab48f233cf7d8b39796a4) * [chore] add unit test for histogram in mdatagen (#10089) Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> (cherry picked from commit 7855bf2ababecdddfea82e4b1a15fd81be2d2d66) * Update module github.com/shirou/gopsutil/v3 to v3.24.4 (#10097) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/shirou/gopsutil/v3](https://togithub.com/shirou/gopsutil) | `v3.24.3` -> `v3.24.4` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fshirou%2fgopsutil%2fv3/v3.24.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fshirou%2fgopsutil%2fv3/v3.24.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fshirou%2fgopsutil%2fv3/v3.24.3/v3.24.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fshirou%2fgopsutil%2fv3/v3.24.3/v3.24.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes
shirou/gopsutil (github.com/shirou/gopsutil/v3) ### [`v3.24.4`](https://togithub.com/shirou/gopsutil/releases/tag/v3.24.4) [Compare Source](https://togithub.com/shirou/gopsutil/compare/v3.24.3...v3.24.4) ##### What's Changed ##### net - Update net_openbsd.go to correctly parse netstat output on obsd by [@​amarinderca](https://togithub.com/amarinderca) in [https://github.com/shirou/gopsutil/pull/1621](https://togithub.com/shirou/gopsutil/pull/1621) - chore: fix some typos in comments by [@​camcui](https://togithub.com/camcui) in [https://github.com/shirou/gopsutil/pull/1624](https://togithub.com/shirou/gopsutil/pull/1624) ##### New Contributors - [@​amarinderca](https://togithub.com/amarinderca) made their first contribution in [https://github.com/shirou/gopsutil/pull/1621](https://togithub.com/shirou/gopsutil/pull/1621) - [@​camcui](https://togithub.com/camcui) made their first contribution in [https://github.com/shirou/gopsutil/pull/1624](https://togithub.com/shirou/gopsutil/pull/1624) **Full Changelog**: https://github.com/shirou/gopsutil/compare/v3.24.3...v3.24.4
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> (cherry picked from commit 9bee0cafcae752ee3701c106ede7060ed3470a00) * Update module go.opentelemetry.io/collector/exporter/otlphttpexporter to v0.100.0 (#10104) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/collector/exporter/otlphttpexporter](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.99.0` -> `v0.100.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.100.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.100.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.99.0/v0.100.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.99.0/v0.100.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/exporter/otlphttpexporter) ### [`v0.100.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v170v01000) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.99.0...v0.100.0) ##### 🛑 Breaking changes 🛑 - `service`: The `validate` sub-command no longer validates that each pipeline's type is the same as its component types ([#​10031](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10031)) ##### 💡 Enhancements 💡 - `semconv`: Add support for v1.25.0 semantic convention ([#​10072](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10072)) - `builder`: remove the need to go get a module to address ambiguous import paths ([#​10015](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10015)) - `pmetric`: Support parsing metric.metadata from OTLP JSON. ([#​10026](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10026)) ##### 🧰 Bug fixes 🧰 - `exporterhelper`: Fix enabled config option for batch sender ([#​10076](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10076))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> (cherry picked from commit 5605528fbdbe37662891f19a3948c1774740b9c8) * [chore] split arm builds into their own workflow (#10113) This is the same as was done in contrib. Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> (cherry picked from commit 93901cd2b767b555b46fce2bf6d72704adbb8b11) * [chore] group more dependencies (#10112) Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> (cherry picked from commit 067ac03a57b1b7e85e9d76ecfbbbfe0932aa47e2) * [chore] fix package prefix (#10116) should not have included `https` (cherry picked from commit f23316625776a917dbf625c5e1640330fa3d022a) * Update All go.opentelemetry.io/collector packages to v0.100.0 (#10115) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/collector/exporter/otlpexporter](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.99.0` -> `v0.100.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.100.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.100.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.99.0/v0.100.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.99.0/v0.100.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/receiver/otlpreceiver](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.99.0` -> `v0.100.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.100.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.100.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.99.0/v0.100.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.99.0/v0.100.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/exporter/otlpexporter) ### [`v0.100.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v170v01000) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.99.0...v0.100.0) ##### 🛑 Breaking changes 🛑 - `service`: The `validate` sub-command no longer validates that each pipeline's type is the same as its component types ([#​10031](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10031)) ##### 💡 Enhancements 💡 - `semconv`: Add support for v1.25.0 semantic convention ([#​10072](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10072)) - `builder`: remove the need to go get a module to address ambiguous import paths ([#​10015](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10015)) - `pmetric`: Support parsing metric.metadata from OTLP JSON. ([#​10026](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10026)) ##### 🧰 Bug fixes 🧰 - `exporterhelper`: Fix enabled config option for batch sender ([#​10076](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10076))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> (cherry picked from commit 2e289b64bbed115d186c8cf944ba054dbb8e4b63) * Update All golang.org/x packages (#10117) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | golang.org/x/exp | `v0.0.0-20231110203233-9a3e6036ecaa` -> `v0.0.0-20240506185415-9bf2ced13842` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fexp/v0.0.0-20240506185415-9bf2ced13842?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2fexp/v0.0.0-20240506185415-9bf2ced13842?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2fexp/v0.0.0-20231110203233-9a3e6036ecaa/v0.0.0-20240506185415-9bf2ced13842?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fexp/v0.0.0-20231110203233-9a3e6036ecaa/v0.0.0-20240506185415-9bf2ced13842?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | golang.org/x/exp | `v0.0.0-20240119083558-1b970713d09a` -> `v0.0.0-20240506185415-9bf2ced13842` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fexp/v0.0.0-20240506185415-9bf2ced13842?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2fexp/v0.0.0-20240506185415-9bf2ced13842?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2fexp/v0.0.0-20240119083558-1b970713d09a/v0.0.0-20240506185415-9bf2ced13842?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fexp/v0.0.0-20240119083558-1b970713d09a/v0.0.0-20240506185415-9bf2ced13842?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | golang.org/x/net | `v0.24.0` -> `v0.25.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fnet/v0.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2fnet/v0.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2fnet/v0.24.0/v0.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fnet/v0.24.0/v0.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | golang.org/x/sys | `v0.19.0` -> `v0.20.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fsys/v0.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2fsys/v0.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2fsys/v0.19.0/v0.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fsys/v0.19.0/v0.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | golang.org/x/text | `v0.14.0` -> `v0.15.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2ftext/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2ftext/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2ftext/v0.14.0/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2ftext/v0.14.0/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | golang.org/x/tools | `v0.20.0` -> `v0.21.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2ftools/v0.21.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2ftools/v0.21.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2ftools/v0.20.0/v0.21.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2ftools/v0.20.0/v0.21.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> (cherry picked from commit 3c5bca5097da4585f3a50ebefdbb6403a0038948) * Update module google.golang.org/protobuf to v1.34.1 (#10101) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google.golang.org/protobuf](https://togithub.com/protocolbuffers/protobuf-go) | `v1.34.0` -> `v1.34.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/google.golang.org%2fprotobuf/v1.34.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/google.golang.org%2fprotobuf/v1.34.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/google.golang.org%2fprotobuf/v1.34.0/v1.34.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/google.golang.org%2fprotobuf/v1.34.0/v1.34.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes
protocolbuffers/protobuf-go (google.golang.org/protobuf) ### [`v1.34.1`](https://togithub.com/protocolbuffers/protobuf-go/releases/tag/v1.34.1) [Compare Source](https://togithub.com/protocolbuffers/protobuf-go/compare/v1.34.0...v1.34.1) Minor fixes for editions compliance: - [CL/582635](https://go.dev/cl/582635): all: update to protobuf 27.0-rc1 and regenerate protos - [CL/582755](https://go.dev/cl/582755): encoding/proto\[json|text]: accept lower case names for group-like fields
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> (cherry picked from commit c5ee52b133725ce07a0d5b2ed76f1d1462fd6633) * Update module github.com/golangci/golangci-lint to v1.58.0 (#10102) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/golangci/golangci-lint](https://togithub.com/golangci/golangci-lint) | `v1.57.2` -> `v1.58.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgolangci%2fgolangci-lint/v1.58.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fgolangci%2fgolangci-lint/v1.58.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fgolangci%2fgolangci-lint/v1.57.2/v1.58.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgolangci%2fgolangci-lint/v1.57.2/v1.58.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes
golangci/golangci-lint (github.com/golangci/golangci-lint) ### [`v1.58.0`](https://togithub.com/golangci/golangci-lint/compare/v1.57.2...v1.58.0) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.57.2...v1.58.0)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> (cherry picked from commit 90ddbcb666e3a415ef83120c5d828e44422b35c8) * Update actions/setup-go action to v5.0.1 (#10096) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/setup-go](https://togithub.com/actions/setup-go) | action | patch | `v5.0.0` -> `v5.0.1` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes
actions/setup-go (actions/setup-go) ### [`v5.0.1`](https://togithub.com/actions/setup-go/releases/tag/v5.0.1) [Compare Source](https://togithub.com/actions/setup-go/compare/v5.0.0...v5.0.1) #### What's Changed - Bump undici from 5.28.2 to 5.28.3 and dependencies upgrade by [@​dependabot](https://togithub.com/dependabot) , [@​HarithaVattikuti](https://togithub.com/HarithaVattikuti) in [https://github.com/actions/setup-go/pull/465](https://togithub.com/actions/setup-go/pull/465) - Update documentation with latest V5 release notes by [@​ab](https://togithub.com/ab) in [https://github.com/actions/setup-go/pull/459](https://togithub.com/actions/setup-go/pull/459) - Update version documentation by [@​178inaba](https://togithub.com/178inaba) in [https://github.com/actions/setup-go/pull/458](https://togithub.com/actions/setup-go/pull/458) - Documentation update of `actions/setup-go` to v5 by [@​chenrui333](https://togithub.com/chenrui333) in [https://github.com/actions/setup-go/pull/449](https://togithub.com/actions/setup-go/pull/449) #### New Contributors - [@​ab](https://togithub.com/ab) made their first contribution in [https://github.com/actions/setup-go/pull/459](https://togithub.com/actions/setup-go/pull/459) **Full Changelog**: https://github.com/actions/setup-go/compare/v5.0.0...v5.0.1
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Yang Song (cherry picked from commit 9bc32498ce5edc12222ced1db46378e26dbd3cce) * [chore] Update go versions in CI (#10119) (cherry picked from commit 7b63bfc9a46b692451c838bb7acd2e3692580bf4) * Move Aneurysm9 to emeritus status (#10120) I have been unable to provide this position the bandwidth that it deserves and it is time to formalize recognition of that fact. Signed-off-by: Anthony J Mirabella Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> (cherry picked from commit c6b70a7ec794d1a296f82863032def0848f870e0) * [chore] use mdatagen for exporterhelper metrics (#10094) Uses the new mdatagen capabilities to generate internal telemetry details for exporterhelper. --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> (cherry picked from commit 5c72c5d2a035c811fc60e6608320986ec85e4110) * [chore] use mdatagen scraperhelper (#10095) Follows https://github.com/open-telemetry/opentelemetry-collector/pull/10094 --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore] use mdatagen for processorhelper (#10122) This updates the processor helper to use mdatagen for its internal telemetry. --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore][cmd/builder] Test for unreleased versions (#10030) #### Description Add a test to help prevent our replace statements from going out of date and causing situations like https://github.com/open-telemetry/opentelemetry-collector/issues/10014. This is also probably just a decent test case to have since it's a syntactically valid but nonexistent version. --------- Co-authored-by: Evan Bradley Co-authored-by: Juraci Paixão Kröhling * [mdatagen] Run tests when skipping goleak (#10126) #### Description Tests are currently not being run when `goleak` checks are skipped. This is because `TestMain` is called in the generated file, and needs to call `m.Run()` to properly run the package's tests. This call was missing. #### Link to tracking issue Fixes #10125 #### Testing There aren't any `goleak` checks currently being skipped in core from the generated package tests, but there are quite a few in `contrib`. This will fix the skipped tests in `contrib`. * [chore] use mdatagen for receiverhelper metrics (#10123) Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [mdatagen] use main as package for cmd types (#10130) This allows us to enabled package test generation for mdatagen itself (and for telemetrygen in contrib) Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [mdatagen] only generate telemetry as needed (#10129) This prevent unnecessary files from being generated if metadata.yaml doesn't include any internal telemetry for a component. Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * ExporterHelper tests - switch to DataType instead of Type (#10127) #### Description `newBaseExporter` needs a `DataType` - up until now we've been passing in a `Type`. In preparation of splitting `DataType` and `Type`, pass in a real `DataType`. #### Link to tracking issue related to https://github.com/open-telemetry/opentelemetry-collector/issues/9429 In preparation for https://github.com/open-telemetry/opentelemetry-collector/pull/10069 * MemoryLimiterProcessor - switch to MustNewID instead of zero value ID (#10128) #### Description In an upcoming PR, I change Type to be an interface. This means the zero value of Type will be nil - which will cause this test to fail. Initializing ID instead of relying on the zero value fixes this #### Link to tracking issue related to https://github.com/open-telemetry/opentelemetry-collector/issues/9429 In preparation for https://github.com/open-telemetry/opentelemetry-collector/pull/10069 * [otelcol] Add a custom zapcore.Core for confmap logging (#10056) #### Description Provides a logger to confmap that buffers logs in memory until the primary logger can be used. Once the primary logger exists, places that used the original logger are given the updated Core. If an error occurs that would shut down the collector before the primary logger could be created, the logs are written to stdout/err using a fallback logger. Alternative to https://github.com/open-telemetry/opentelemetry-collector/pull/10008 I've pushed the testing I did to show how the logger successfully updates. Before config resolution the debug log in confmap is not printed, but afterwards it is. test config: ```yaml receivers: nop: exporters: otlphttp: endpoint: http://0.0.0.0:4317 headers: # Not set x-test: ${env:TEMP3} debug: # set to "detailed" verbosity: $TEMP service: telemetry: logs: level: debug pipelines: traces: receivers: - nop exporters: - debug ``` ![image](https://github.com/open-telemetry/opentelemetry-collector/assets/12352919/6a17993f-1f97-4c54-9165-5c34dd58d108) #### Link to tracking issue Related to https://github.com/open-telemetry/opentelemetry-collector/issues/9162 Related to https://github.com/open-telemetry/opentelemetry-collector/issues/5615 #### Testing If we like this approach I'll add tests #### Documentation --------- Co-authored-by: Dan Jaglowski Co-authored-by: Pablo Baeyens * [confmap] Deprecate `NewWithSettings` and `New` (#10134) #### Description Each of these was deprecated in v0.99.0, so I think removing them in v0.101.0 is a safe deprecation period for an API that is likely only used by vendor distros built without ocb. If we would like to extend the deprecation period or break this change into PRs for each module, let me know and I'll make the necessary changes. * [confmap] Add logger to ConverterSettings (#10135) #### Description Adds a Logger to ConverterSettings to enable logging from within converters. Also update the expand converter to log a warning if the env var is empty or missing. #### Link to tracking issue Closes https://github.com/open-telemetry/opentelemetry-collector/issues/9162 Closes https://github.com/open-telemetry/opentelemetry-collector/issues/5615 #### Testing Unit tests and local testing ![image](https://github.com/open-telemetry/opentelemetry-collector/assets/12352919/af5dd1e2-62f9-4272-97c7-da57166ef07e) ```yaml receivers: nop: exporters: otlphttp: endpoint: http://0.0.0.0:4317 headers: # Not set x-test: $TEMP3 debug: # set to "detailed" verbosity: $TEMP service: telemetry: logs: level: info pipelines: traces: receivers: - nop exporters: - otlphttp - debug ``` #### Documentation Added godoc comments * [confighttp] Remove deprecated functions (#10138) Closes https://github.com/open-telemetry/opentelemetry-collector/issues/9807 * Update module github.com/prometheus/client_golang to v1.19.1 (#10147) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/prometheus/client_golang](https://togithub.com/prometheus/client_golang) | `v1.19.0` -> `v1.19.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fclient_golang/v1.19.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fclient_golang/v1.19.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fclient_golang/v1.19.0/v1.19.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fclient_golang/v1.19.0/v1.19.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes
prometheus/client_golang (github.com/prometheus/client_golang) ### [`v1.19.1`](https://togithub.com/prometheus/client_golang/releases/tag/v1.19.1) [Compare Source](https://togithub.com/prometheus/client_golang/compare/v1.19.0...v1.19.1) #### What's Changed - Security patches for `golang.org/x/sys` and `google.golang.org/protobuf` #### New Contributors - [@​lukasauk](https://togithub.com/lukasauk) made their first contribution in [https://github.com/prometheus/client_golang/pull/1494](https://togithub.com/prometheus/client_golang/pull/1494) **Full Changelog**: https://github.com/prometheus/client_golang/compare/v1.19.0...v1.19.1
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update module github.com/golangci/golangci-lint to v1.58.1 (#10146) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/golangci/golangci-lint](https://togithub.com/golangci/golangci-lint) | `v1.58.0` -> `v1.58.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgolangci%2fgolangci-lint/v1.58.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fgolangci%2fgolangci-lint/v1.58.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fgolangci%2fgolangci-lint/v1.58.0/v1.58.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgolangci%2fgolangci-lint/v1.58.0/v1.58.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes
golangci/golangci-lint (github.com/golangci/golangci-lint) ### [`v1.58.1`](https://togithub.com/golangci/golangci-lint/compare/v1.58.0...v1.58.1) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.58.0...v1.58.1)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * Update github-actions deps (#10145) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/checkout](https://togithub.com/actions/checkout) | action | patch | `v4.1.4` -> `v4.1.5` | | [codecov/codecov-action](https://togithub.com/codecov/codecov-action) | action | minor | `4.3.1` -> `4.4.0` | | [github/codeql-action](https://togithub.com/github/codeql-action) | action | patch | `v3.25.3` -> `v3.25.5` | | [goreleaser/goreleaser-action](https://togithub.com/goreleaser/goreleaser-action) | action | minor | `v5.0.0` -> `v5.1.0` | | [ossf/scorecard-action](https://togithub.com/ossf/scorecard-action) | action | patch | `v2.3.1` -> `v2.3.3` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes
actions/checkout (actions/checkout) ### [`v4.1.5`](https://togithub.com/actions/checkout/releases/tag/v4.1.5) [Compare Source](https://togithub.com/actions/checkout/compare/v4.1.4...v4.1.5) #### What's Changed - Update NPM dependencies by [@​cory-miller](https://togithub.com/cory-miller) in [https://github.com/actions/checkout/pull/1703](https://togithub.com/actions/checkout/pull/1703) - Bump github/codeql-action from 2 to 3 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/actions/checkout/pull/1694](https://togithub.com/actions/checkout/pull/1694) - Bump actions/setup-node from 1 to 4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/actions/checkout/pull/1696](https://togithub.com/actions/checkout/pull/1696) - Bump actions/upload-artifact from 2 to 4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/actions/checkout/pull/1695](https://togithub.com/actions/checkout/pull/1695) - README: Suggest `user.email` to be `41898282+github-actions[bot]@​users.noreply.github.com` by [@​cory-miller](https://togithub.com/cory-miller) in [https://github.com/actions/checkout/pull/1707](https://togithub.com/actions/checkout/pull/1707) **Full Changelog**: https://github.com/actions/checkout/compare/v4.1.4...v4.1.5
codecov/codecov-action (codecov/codecov-action) ### [`v4.4.0`](https://togithub.com/codecov/codecov-action/compare/v4.3.1...v4.4.0) [Compare Source](https://togithub.com/codecov/codecov-action/compare/v4.3.1...v4.4.0)
github/codeql-action (github/codeql-action) ### [`v3.25.5`](https://togithub.com/github/codeql-action/compare/v3.25.4...v3.25.5) [Compare Source](https://togithub.com/github/codeql-action/compare/v3.25.4...v3.25.5) ### [`v3.25.4`](https://togithub.com/github/codeql-action/compare/v3.25.3...v3.25.4) [Compare Source](https://togithub.com/github/codeql-action/compare/v3.25.3...v3.25.4)
goreleaser/goreleaser-action (goreleaser/goreleaser-action) ### [`v5.1.0`](https://togithub.com/goreleaser/goreleaser-action/releases/tag/v5.1.0) [Compare Source](https://togithub.com/goreleaser/goreleaser-action/compare/v5.0.0...v5.1.0) #### Important This version changes the default behavior of `latest` to `~> v1`. The next major of this action (v6), will change this to `~> v2`, and will be launched together with GoReleaser v2. #### What's Changed - docs: bump actions to latest major by [@​crazy-max](https://togithub.com/crazy-max) in [https://github.com/goreleaser/goreleaser-action/pull/435](https://togithub.com/goreleaser/goreleaser-action/pull/435) - chore(deps): bump docker/bake-action from 3 to 4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/goreleaser/goreleaser-action/pull/436](https://togithub.com/goreleaser/goreleaser-action/pull/436) - chore(deps): bump codecov/codecov-action from 3 to 4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/goreleaser/goreleaser-action/pull/437](https://togithub.com/goreleaser/goreleaser-action/pull/437) - chore(deps): bump actions/setup-go from 4 to 5 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/goreleaser/goreleaser-action/pull/443](https://togithub.com/goreleaser/goreleaser-action/pull/443) - chore(deps): bump actions/upload-artifact from 3 to 4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/goreleaser/goreleaser-action/pull/444](https://togithub.com/goreleaser/goreleaser-action/pull/444) - Delete .kodiak.toml by [@​vedantmgoyal9](https://togithub.com/vedantmgoyal9) in [https://github.com/goreleaser/goreleaser-action/pull/446](https://togithub.com/goreleaser/goreleaser-action/pull/446) - chore(deps): bump codecov/codecov-action from 3 to 4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/goreleaser/goreleaser-action/pull/448](https://togithub.com/goreleaser/goreleaser-action/pull/448) - chore(deps): bump ip from 2.0.0 to 2.0.1 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/goreleaser/goreleaser-action/pull/450](https://togithub.com/goreleaser/goreleaser-action/pull/450) - Upgrade setup-go action version in README by [@​kishaningithub](https://togithub.com/kishaningithub) in [https://github.com/goreleaser/goreleaser-action/pull/455](https://togithub.com/goreleaser/goreleaser-action/pull/455) - chore(deps): bump tar from 6.1.14 to 6.2.1 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/goreleaser/goreleaser-action/pull/456](https://togithub.com/goreleaser/goreleaser-action/pull/456) - chore: use corepack to install yarn by [@​crazy-max](https://togithub.com/crazy-max) in [https://github.com/goreleaser/goreleaser-action/pull/458](https://togithub.com/goreleaser/goreleaser-action/pull/458) - feat: lock this major version of the action to use '~> v1' as 'latest' by [@​caarlos0](https://togithub.com/caarlos0) in [https://github.com/goreleaser/goreleaser-action/pull/461](https://togithub.com/goreleaser/goreleaser-action/pull/461) - chore(deps): bump semver from 7.6.0 to 7.6.2 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/goreleaser/goreleaser-action/pull/462](https://togithub.com/goreleaser/goreleaser-action/pull/462) - chore(deps): bump [@​actions/http-client](https://togithub.com/actions/http-client) from 2.2.0 to 2.2.1 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/goreleaser/goreleaser-action/pull/451](https://togithub.com/goreleaser/goreleaser-action/pull/451) #### New Contributors - [@​vedantmgoyal9](https://togithub.com/vedantmgoyal9) made their first contribution in [https://github.com/goreleaser/goreleaser-action/pull/446](https://togithub.com/goreleaser/goreleaser-action/pull/446) **Full Changelog**: https://github.com/goreleaser/goreleaser-action/compare/v5.0.0...v5.1.0
ossf/scorecard-action (ossf/scorecard-action) ### [`v2.3.3`](https://togithub.com/ossf/scorecard-action/compare/v2.3.2...v2.3.3) [Compare Source](https://togithub.com/ossf/scorecard-action/compare/v2.3.2...v2.3.3) ### [`v2.3.2`](https://togithub.com/ossf/scorecard-action/compare/v2.3.1...v2.3.2) [Compare Source](https://togithub.com/ossf/scorecard-action/compare/v2.3.1...v2.3.2)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore: fix function name in comment (#10150) Signed-off-by: petercover * Update module google.golang.org/genproto/googleapis/rpc to v0.0.0-20240506185236-b8a5c65736ae (#10100) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google.golang.org/genproto/googleapis/rpc](https://togithub.com/googleapis/go-genproto) | `v0.0.0-20240401170217-c3f982113cda` -> `v0.0.0-20240506185236-b8a5c65736ae` | [![age](https://developer.mend.io/api/mc/badges/age/go/google.golang.org%2fgenproto%2fgoogleapis%2frpc/v0.0.0-20240506185236-b8a5c65736ae?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/google.golang.org%2fgenproto%2fgoogleapis%2frpc/v0.0.0-20240506185236-b8a5c65736ae?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/google.golang.org%2fgenproto%2fgoogleapis%2frpc/v0.0.0-20240401170217-c3f982113cda/v0.0.0-20240506185236-b8a5c65736ae?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/google.golang.org%2fgenproto%2fgoogleapis%2frpc/v0.0.0-20240401170217-c3f982113cda/v0.0.0-20240506185236-b8a5c65736ae?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Yang Song Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * fix(deps): update module google.golang.org/genproto/googleapis/rpc to v0.0.0-20240513163218-0867130af1f8 (#10153) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google.golang.org/genproto/googleapis/rpc](https://togithub.com/googleapis/go-genproto) | `v0.0.0-20240506185236-b8a5c65736ae` -> `v0.0.0-20240513163218-0867130af1f8` | [![age](https://developer.mend.io/api/mc/badges/age/go/google.golang.org%2fgenproto%2fgoogleapis%2frpc/v0.0.0-20240513163218-0867130af1f8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/google.golang.org%2fgenproto%2fgoogleapis%2frpc/v0.0.0-20240513163218-0867130af1f8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/google.golang.org%2fgenproto%2fgoogleapis%2frpc/v0.0.0-20240506185236-b8a5c65736ae/v0.0.0-20240513163218-0867130af1f8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/google.golang.org%2fgenproto%2fgoogleapis%2frpc/v0.0.0-20240506185236-b8a5c65736ae/v0.0.0-20240513163218-0867130af1f8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [chore] update Andrzej's affiliation (#10156) * Add origin field name option to base fields (#10149) #### Description This adds an `originFieldName` option to `sliceField`, `messageValueField` and `primitiveField`. This option already exists for `primitiveTypedField`, `oneOfField`, `oneOfPrimitiveValue` and `oneOfMessageValue`. #### Link to tracking issue This is needed for #10109. #### Testing This is unit tested. cc @mx-psi * [confmap] Encode string-like map keys (#10137) #### Description Our check for determining whether a map key can be encoded as a string is too restrictive and doesn't into account types which are essentially aliases for the string type and don't implement `UnmarshalText`. I encountered this while trying to call `(confmap.Conf).Marshal(*otelcol.Config)` when the config includes a Prometheus receiver, which includes the [LabelName type](https://github.com/prometheus/common/blob/main/model/labels.go#L98) that does not implement an unmarshaling method. We can't guarantee that all types will implement this, and [Go's print formatters check](https://github.com/golang/go/blob/master/src/fmt/print.go#L803) whether `(reflect.Value).Kind()` equals `reflect.String`, so I think this will be an overall more robust approach. #### Testing I added two test cases to demonstrate when we will hit this case. --------- Co-authored-by: Pablo Baeyens * [otelcol] Add mapstructure tags to main Config struct (#10152) #### Description Adds `mapstructure` tags to main `Config` struct. cc @mackjmr * Upgrade proto and generate profiles (#10155) #### Description This upgrades the proto to their latest version, and generates the profiles. #### Link to tracking issue Part of #10109 cc @mx-psi * Upgrade the used otlp version in readme (#10167) #### Description We upgraded the proto version, so we need to upgrade it in the readme as well. #### Link to tracking issue * https://github.com/open-telemetry/opentelemetry-collector/pull/10109#pullrequestreview-2058708683 * https://github.com/open-telemetry/opentelemetry-collector/pull/10155 * [chore] appease versioning warnings (#10163) as per dependabot security recommendations Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore] set permissions to read explicitly (#10164) This is as recommended by dependabot security warnings. Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [mdatagen] add support for async instruments (#10159) This PR adds the ability to configure asynchronous (observable) instruments via mdatagen. This requires providing a mechanism to set options to pass in the callbacks that will be called at the time of the observation. --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [mdatagen] update mdatagen to document internal telemetry (#10170) This allows end users to see what telemetry each component should be emitting. --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore] make gogenerate (#10171) documentation needed to be regenerated Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore]: fix the dead link in mdatagen (#10142) #### Description Fixed the deadlink in mdatagen that would cause existing functionality to not work as expected. #### Link to tracking issue Fixes #10071 * [confmap] Remove deprecated ResolverSettings fields (#10173) #### Description These fields were deprecated in v0.99.0 and aren't used in any upstream repositories. These appear to still be used in downstream distributions. If we want to lengthen the deprecation period for these fields, I'll open a PR to instead set a timeline for their removal. * Documentation improvements - Internal Architecture Doc + Package level comments (#10068) #### Documentation Creates an internal architecture file. In it is a diagram of the startup flow of the collector as well as links to key files / packages. I also added package level comments to some key packages. I wrote some other documentation in https://github.com/open-telemetry/opentelemetry-collector/pull/10029 but split the PRs up. --------- Co-authored-by: Pablo Baeyens * [chore] Remove unused package test file from otelcorecol (#10178) * [chore] Remove required toolchain version from nopexporter (#10179) * fix(deps): update module github.com/golangci/golangci-lint to v1.58.2 (#10185) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/golangci/golangci-lint](https://togithub.com/golangci/golangci-lint) | `v1.58.1` -> `v1.58.2` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgolangci%2fgolangci-lint/v1.58.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fgolangci%2fgolangci-lint/v1.58.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fgolangci%2fgolangci-lint/v1.58.1/v1.58.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgolangci%2fgolangci-lint/v1.58.1/v1.58.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes
golangci/golangci-lint (github.com/golangci/golangci-lint) ### [`v1.58.2`](https://togithub.com/golangci/golangci-lint/compare/v1.58.1...v1.58.2) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.58.1...v1.58.2)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [chore] Prepare release v1.8.0/v0.101.0 (#10190) This replaces #10188, by fixing a relatively new test case that blocked the release. Signed-off-by: Juraci Paixão Kröhling --------- Signed-off-by: Juraci Paixão Kröhling Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * chore(deps): update github-actions deps (#10184) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/checkout](https://togithub.com/actions/checkout) | action | patch | `v4.1.5` -> `v4.1.6` | | [actions/checkout](https://togithub.com/actions/checkout) | action | patch | `v4.1.4` -> `v4.1.6` | | [codecov/codecov-action](https://togithub.com/codecov/codecov-action) | action | patch | `4.4.0` -> `4.4.1` | | [github/codeql-action](https://togithub.com/github/codeql-action) | action | patch | `v3.25.5` -> `v3.25.6` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes
actions/checkout (actions/checkout) ### [`v4.1.6`](https://togithub.com/actions/checkout/blob/HEAD/CHANGELOG.md#v416) [Compare Source](https://togithub.com/actions/checkout/compare/v4.1.5...v4.1.6) - Check platform to set archive extension appropriately by [@​cory-miller](https://togithub.com/cory-miller) in [https://github.com/actions/checkout/pull/1732](https://togithub.com/actions/checkout/pull/1732)
codecov/codecov-action (codecov/codecov-action) ### [`v4.4.1`](https://togithub.com/codecov/codecov-action/compare/v4.4.0...v4.4.1) [Compare Source](https://togithub.com/codecov/codecov-action/compare/v4.4.0...v4.4.1)
github/codeql-action (github/codeql-action) ### [`v3.25.6`](https://togithub.com/github/codeql-action/compare/v3.25.5...v3.25.6) [Compare Source](https://togithub.com/github/codeql-action/compare/v3.25.5...v3.25.6)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Bogdan Drutu * [chore] Amend changelog for ResolverSettings (#10192) Follow up to #9516 and https://github.com/open-telemetry/opentelemetry-collector/pull/10173#discussion_r1606677594 * Add stringSlice and int64Slice to pcommon, and let tests handle non-number slices (#10148) #### Description This adds a string slice to pcommon, that will be used by the profiles pdata. #### Link to tracking issue Part of #10109. #### Testing This is unit-tested. cc @mx-psi --------- Co-authored-by: Pablo Baeyens * [service/telemetry] Switch to a factory pattern (#10001) #### Description Switches `service/telemetry` to a factory pattern. To avoid adding a lot of public API in one go: 1. the actual factory builder is in an internal package 2. I have not added the `CreateMeterProvider` method yet There are two goals with this: one is to make progress on #4970, the other is to allow initializing telemetry sooner: #### Link to tracking issue Updates #4970. #### Testing Updates existing tests to use `NewFactory` * fix(deps): update all go.opentelemetry.io/collector packages to v0.101.0 (#10193) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/collector/exporter/otlpexporter](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.100.0` -> `v0.101.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.101.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.101.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.100.0/v0.101.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.100.0/v0.101.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/exporter/otlphttpexporter](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.100.0` -> `v0.101.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.101.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.101.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.100.0/v0.101.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.100.0/v0.101.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/receiver/otlpreceiver](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.100.0` -> `v0.101.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.101.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.101.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.100.0/v0.101.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.100.0/v0.101.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/exporter/otlpexporter) ### [`v0.101.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v180v01010) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.100.0...v0.101.0) ##### 💡 Enhancements 💡 - `mdatagen`: generate documentation for internal telemetry ([#​10170](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10170)) - `mdatagen`: add ability to use metadata.yaml to automatically generate instruments for components ([#​10054](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10054)) The `telemetry` section in metadata.yaml is used to generate instruments for components to measure telemetry about themselves. - `confmap`: Allow Converters to write logs during startup ([#​10135](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10135)) - `otelcol`: Enable logging during configuration resolution ([#​10056](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10056)) ##### 🧰 Bug fixes 🧰 - `mdatagen`: Run package tests when goleak is skipped ([#​10125](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10125))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore][cmd/builder] Improve missing replace statements test (#10196) Updates `TestReplaceStatementsAreComplete` to check the modules used in replace statements to ensure that their dependencies also have replace statements. This will catch the error that happened in #10188 before a release is started. The one caveat here is that the test may need to be run multiple times if there are modules deep in the dependency tree that haven't been added to the list of replace statement modules. In essence, the user has to do a BFS walk of the dependency tree themselves by running the tests until all missing modules are caught. We could automate this process with additional code to report all missing modules at once regardless of depth, but I figure it's not worth the extra complexity in the test for such a small gain. #### Testing I tested this on the #10188 branch by removing the `pdata/testdata` module from the replace statements list and seeing that the failure is easier to understand: ``` --- FAIL: TestReplaceStatementsAreComplete (0.60s) Error: Should be true Test: TestReplaceStatementsAreComplete Messages: Module missing from replace statements list: go.opentelemetry.io/collector/pdata/testdata ``` * fix(deps): update opentelemetry-go monorepo (#10199) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/otel](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.26.0` -> `v1.27.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel/v1.26.0/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel/v1.26.0/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/bridge/opencensus](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.26.0` -> `v1.27.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fbridge%2fopencensus/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fbridge%2fopencensus/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fbridge%2fopencensus/v1.26.0/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fbridge%2fopencensus/v1.26.0/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.26.0` -> `v1.27.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetricgrpc/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetricgrpc/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetricgrpc/v1.26.0/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetricgrpc/v1.26.0/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.26.0` -> `v1.27.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetrichttp/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetrichttp/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetrichttp/v1.26.0/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlpmetric%2fotlpmetrichttp/v1.26.0/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/prometheus](https://togithub.com/open-telemetry/opentelemetry-go) | `v0.48.0` -> `v0.49.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fprometheus/v0.49.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fprometheus/v0.49.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fprometheus/v0.48.0/v0.49.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fprometheus/v0.48.0/v0.49.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/stdout/stdoutmetric](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.26.0` -> `v1.27.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdoutmetric/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdoutmetric/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdoutmetric/v1.26.0/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdoutmetric/v1.26.0/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/metric](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.26.0` -> `v1.27.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fmetric/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fmetric/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fmetric/v1.26.0/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fmetric/v1.26.0/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/trace](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.26.0` -> `v1.27.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2ftrace/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2ftrace/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2ftrace/v1.26.0/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2ftrace/v1.26.0/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes
open-telemetry/opentelemetry-go (go.opentelemetry.io/otel) ### [`v1.27.0`](https://togithub.com/open-telemetry/opentelemetry-go/releases/tag/v1.27.0): /v0.49.0/v0.3.0 [Compare Source](https://togithub.com/open-telemetry/opentelemetry-go/compare/v1.26.0...v1.27.0) This release includes the first beta release of the OpenTelemetry Logs Bridge API and SDK for Go. ##### Overview ##### Added - Add example for `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`. ([#​5242](https://togithub.com/open-telemetry/opentelemetry-go/issues/5242)) - Add `RecordFactory` in `go.opentelemetry.io/otel/sdk/log/logtest` to facilitate testing exporter and processor implementations. ([#​5258](https://togithub.com/open-telemetry/opentelemetry-go/issues/5258)) - Add `RecordFactory` in `go.opentelemetry.io/otel/log/logtest` to facilitate testing bridge implementations. ([#​5263](https://togithub.com/open-telemetry/opentelemetry-go/issues/5263)) - The count of dropped records from the `BatchProcessor` in `go.opentelemetry.io/otel/sdk/log` is logged. ([#​5276](https://togithub.com/open-telemetry/opentelemetry-go/issues/5276)) - Add metrics in the `otel-collector` example. ([#​5283](https://togithub.com/open-telemetry/opentelemetry-go/issues/5283)) - Add the synchronous gauge instrument to `go.opentelemetry.io/otel/metric`. ([#​5304](https://togithub.com/open-telemetry/opentelemetry-go/issues/5304)) - An `int64` or `float64` synchronous gauge instrument can now be created from a `Meter`. - All implementations of the API (`go.opentelemetry.io/otel/metric/noop`, `go.opentelemetry.io/otel/sdk/metric`) are updated to support this instrument. - Add logs to `go.opentelemetry.io/otel/example/dice`. ([#​5349](https://togithub.com/open-telemetry/opentelemetry-go/issues/5349)) ##### Changed - The `Shutdown` method of `Exporter` in `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` ignores the context cancellation and always returns `nil`. ([#​5189](https://togithub.com/open-telemetry/opentelemetry-go/issues/5189)) - The `ForceFlush` and `Shutdown` methods of the exporter returned by `New` in `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` ignore the context cancellation and always return `nil`. ([#​5189](https://togithub.com/open-telemetry/opentelemetry-go/issues/5189)) - Apply the value length limits to `Record` attributes in `go.opentelemetry.io/otel/sdk/log`. ([#​5230](https://togithub.com/open-telemetry/opentelemetry-go/issues/5230)) - De-duplicate map attributes added to a `Record` in `go.opentelemetry.io/otel/sdk/log`. ([#​5230](https://togithub.com/open-telemetry/opentelemetry-go/issues/5230)) - `go.opentelemetry.io/otel/exporters/stdout/stdoutlog` won't print timestamps when `WithoutTimestamps` option is set. ([#​5241](https://togithub.com/open-telemetry/opentelemetry-go/issues/5241)) - The `go.opentelemetry.io/otel/exporters/stdout/stdoutlog` exporter won't print `AttributeValueLengthLimit` and `AttributeCountLimit` fields now, instead it prints the `DroppedAttributes` field. ([#​5272](https://togithub.com/open-telemetry/opentelemetry-go/issues/5272)) - Improved performance in the `Stringer` implementation of `go.opentelemetry.io/otel/baggage.Member` by reducing the number of allocations. ([#​5286](https://togithub.com/open-telemetry/opentelemetry-go/issues/5286)) - Set the start time for last-value aggregates in `go.opentelemetry.io/otel/sdk/metric`. ([#​5305](https://togithub.com/open-telemetry/opentelemetry-go/issues/5305)) - The `Span` in `go.opentelemetry.io/otel/sdk/trace` will record links without span context if either non-empty `TraceState` or attributes are provided. ([#​5315](https://togithub.com/open-telemetry/opentelemetry-go/issues/5315)) - Upgrade all dependencies of `go.opentelemetry.io/otel/semconv/v1.24.0` to `go.opentelemetry.io/otel/semconv/v1.25.0`. ([#​5374](https://togithub.com/open-telemetry/opentelemetry-go/issues/5374)) ##### Fixed - Comparison of unordered maps for `go.opentelemetry.io/otel/log.KeyValue` and `go.opentelemetry.io/otel/log.Value`. ([#​5306](https://togithub.com/open-telemetry/opentelemetry-go/issues/5306)) - Fix the empty output of `go.opentelemetry.io/otel/log.Value` in `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`. ([#​5311](https://togithub.com/open-telemetry/opentelemetry-go/issues/5311)) - Split the behavior of `Recorder` in `go.opentelemetry.io/otel/log/logtest` so it behaves as a `LoggerProvider` only. ([#​5365](https://togithub.com/open-telemetry/opentelemetry-go/issues/5365)) - Fix wrong package name of the error message when parsing endpoint URL in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. ([#​5371](https://togithub.com/open-telemetry/opentelemetry-go/issues/5371)) - Identify the `Logger` returned from the global `LoggerProvider` in `go.opentelemetry.io/otel/log/global` with its schema URL. ([#​5375](https://togithub.com/open-telemetry/opentelemetry-go/issues/5375)) ##### What's Changed - sdk/log/logtest: Add RecordFactory by [@​pellared](https://togithub.com/pellared) in [https://github.com/open-telemetry/opentelemetry-go/pull/5258](https://togithub.com/open-telemetry/opentelemetry-go/pull/5258) - log/logtest: add Record Factory by [@​dmathieu](https://togithub.com/dmathieu) in [https://github.com/open-telemetry/opentelemetry-go/pull/5263](https://togithub.com/open-telemetry/opentelemetry-go/pull/5263) - stdoutlog: Do not print timestamps when WithoutTimestamps is set by [@​XSAM](https://togithub.com/XSAM) in [https://github.com/open-telemetry/opentelemetry-go/pull/5241](https://togithub.com/open-telemetry/opentelemetry-go/pull/5241) - Add example for stdoutlog by [@​XSAM](https://togithub.com/XSAM) in [https://github.com/open-telemetry/opentelemetry-go/pull/5242](https://togithub.com/open-telemetry/opentelemetry-go/pull/5242) - Remove context check on stdout exporters by [@​prasad-shirodkar](https://togithub.com/prasad-shirodkar) in [https://github.com/open-telemetry/opentelemetry-go/pull/5189](https://togithub.com/open-telemetry/opentelemetry-go/pull/5189) - Fix flaky test TestBufferExporter/Shutdown/ContextCancelled by [@​XSAM](https://togithub.com/XSAM) in [https://github.com/open-telemetry/opentelemetry-go/pull/5261](https://togithub.com/open-telemetry/opentelemetry-go/pull/5261) - Add `otlploggrpc` exporter skeleton by [@​XSAM](https://togithub.com/XSAM) in [https://github.com/open-telemetry/opentelemetry-go/pull/5246](https://togithub.com/open-telemetry/opentelemetry-go/pull/5246) - build(deps): bump lycheeverse/lychee-action from 1.9.3 to 1.10.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/open-telemetry/opentelemetry-go/pull/5266](https://togithub.com/open-telemetry/opentelemetry-go/pull/5266) - chore: fix function names in comment by [@​dockercui](https://togithub.com/dockercui) in [https://github.com/open-telemetry/opentelemetry-go/pull/5262](https://togithub.com/open-telemetry/opentelemetry-go/pull/5262) - build(deps): bump go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp from 0.50.0 to 0.51.0 in /example/dice by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/open-telemetry/opentelemetry-go/pull/5265](https://togithub.com/open-telemetry/opentelemetry-go/pull/5265) - docs: update variable name in documentation by [@​codeboten](https://togithub.com/codeboten) in [https://github.com/open-telemetry/opentelemetry-go/pull/5270](https://togithub.com/open-telemetry/opentelemetry-go/pull/5270) - Use empty resource when `RecordFactory.Resource` is `nil` by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5264](https://togithub.com/open-telemetry/opentelemetry-go/pull/5264) - Truncate and de-duplicate log attribute values by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5230](https://togithub.com/open-telemetry/opentelemetry-go/pull/5230) - Add changelog entry for [#​5230](https://togithub.com/open-telemetry/opentelemetry-go/issues/5230) by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5277](https://togithub.com/open-telemetry/opentelemetry-go/pull/5277) - docs: Add otlploghttp package in exporters README.md by [@​arukiidou](https://togithub.com/arukiidou) in [https://github.com/open-telemetry/opentelemetry-go/pull/5274](https://togithub.com/open-telemetry/opentelemetry-go/pull/5274) - The stdoutlog exporter prints `DroppedAttributes` field instead of `Limit`s fields by [@​XSAM](https://togithub.com/XSAM) in [https://github.com/open-telemetry/opentelemetry-go/pull/5272](https://togithub.com/open-telemetry/opentelemetry-go/pull/5272) - Test scope and resource transforms in `otlploghttp` by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5278](https://togithub.com/open-telemetry/opentelemetry-go/pull/5278) - Add README template to semconvkit by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5279](https://togithub.com/open-telemetry/opentelemetry-go/pull/5279) - Use docker compose in otel collector example by [@​XSAM](https://togithub.com/XSAM) in [https://github.com/open-telemetry/opentelemetry-go/pull/5244](https://togithub.com/open-telemetry/opentelemetry-go/pull/5244) - \[chore] dependabot updates Sun May 5 15:58:12 UTC 2024 by [@​opentelemetrybot](https://togithub.com/opentelemetrybot) in [https://github.com/open-telemetry/opentelemetry-go/pull/5300](https://togithub.com/open-telemetry/opentelemetry-go/pull/5300) - build(deps): bump codecov/codecov-action from 4.3.0 to 4.3.1 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/open-telemetry/opentelemetry-go/pull/5296](https://togithub.com/open-telemetry/opentelemetry-go/pull/5296) - docs: Update Go logs status to alpha in README.md by [@​arukiidou](https://togithub.com/arukiidou) in [https://github.com/open-telemetry/opentelemetry-go/pull/5299](https://togithub.com/open-telemetry/opentelemetry-go/pull/5299) - docs: Add logs exporters in README.md by [@​arukiidou](https://togithub.com/arukiidou) in [https://github.com/open-telemetry/opentelemetry-go/pull/5298](https://togithub.com/open-telemetry/opentelemetry-go/pull/5298) - Use reflect to construct a Record in `logtest` by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5275](https://togithub.com/open-telemetry/opentelemetry-go/pull/5275) - Fix type error in float64 instrument documentation by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5302](https://togithub.com/open-telemetry/opentelemetry-go/pull/5302) - Fix HistogramConfig documentation by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5301](https://togithub.com/open-telemetry/opentelemetry-go/pull/5301) - feat: opt for concatenation instead of using fmt.Sprintf by [@​moisesvega](https://togithub.com/moisesvega) in [https://github.com/open-telemetry/opentelemetry-go/pull/5286](https://togithub.com/open-telemetry/opentelemetry-go/pull/5286) - Emit attributes slices as their json representation by [@​dmathieu](https://togithub.com/dmathieu) in [https://github.com/open-telemetry/opentelemetry-go/pull/5159](https://togithub.com/open-telemetry/opentelemetry-go/pull/5159) - Refactor exemplars to not use generic argument by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5285](https://togithub.com/open-telemetry/opentelemetry-go/pull/5285) - Upgrade default go verison to 1.22.3 by [@​XSAM](https://togithub.com/XSAM) in [https://github.com/open-telemetry/opentelemetry-go/pull/5314](https://togithub.com/open-telemetry/opentelemetry-go/pull/5314) - Log records dropped by the BatchProcessor by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5276](https://togithub.com/open-telemetry/opentelemetry-go/pull/5276) - Rename synchronous instrument names in global test by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5303](https://togithub.com/open-telemetry/opentelemetry-go/pull/5303) - chore: Configure Renovate by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5309](https://togithub.com/open-telemetry/opentelemetry-go/pull/5309) - chore(deps): update module github.com/golang/groupcache to v0.0.0-20210331224755-41bb18bfe9da by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5320](https://togithub.com/open-telemetry/opentelemetry-go/pull/5320) - chore(deps): update module google.golang.org/genproto/googleapis/api to v0.0.0-20240506185236-b8a5c65736ae by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5321](https://togithub.com/open-telemetry/opentelemetry-go/pull/5321) - chore(deps): update module gopkg.in/check.v1 to v1.0.0-20201130134442-10cb98267c6c by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5326](https://togithub.com/open-telemetry/opentelemetry-go/pull/5326) - chore(deps): update module google.golang.org/genproto/googleapis/rpc to v0.0.0-20240506185236-b8a5c65736ae by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5325](https://togithub.com/open-telemetry/opentelemetry-go/pull/5325) - fix(deps): update module golang.org/x/exp to v0.0.0-20240506185415-9bf2ced13842 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5327](https://togithub.com/open-telemetry/opentelemetry-go/pull/5327) - chore(deps): update module github.com/prometheus/common to v0.53.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5332](https://togithub.com/open-telemetry/opentelemetry-go/pull/5332) - chore(deps): update module golang.org/x/net to v0.25.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5335](https://togithub.com/open-telemetry/opentelemetry-go/pull/5335) - fix(deps): update module google.golang.org/protobuf to v1.34.1 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5328](https://togithub.com/open-telemetry/opentelemetry-go/pull/5328) - chore(deps): update module github.com/prometheus/procfs to v0.14.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5333](https://togithub.com/open-telemetry/opentelemetry-go/pull/5333) - chore(deps): update module github.com/cespare/xxhash/v2 to v2.3.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5330](https://togithub.com/open-telemetry/opentelemetry-go/pull/5330) - chore(deps): update module github.com/rogpeppe/go-internal to v1.12.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5334](https://togithub.com/open-telemetry/opentelemetry-go/pull/5334) - fix(deps): update module github.com/golangci/golangci-lint to v1.58.1 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5340](https://togithub.com/open-telemetry/opentelemetry-go/pull/5340) - Merge Span.AddLink tests by [@​perhapsmaple](https://togithub.com/perhapsmaple) in [https://github.com/open-telemetry/opentelemetry-go/pull/5115](https://togithub.com/open-telemetry/opentelemetry-go/pull/5115) - exporters/otlp/otlptrace: fix incorrect documentation by [@​kevinburkesegment](https://togithub.com/kevinburkesegment) in [https://github.com/open-telemetry/opentelemetry-go/pull/5098](https://togithub.com/open-telemetry/opentelemetry-go/pull/5098) - Generate `internal/retry` in `otlploggrpc` by [@​XSAM](https://togithub.com/XSAM) in [https://github.com/open-telemetry/opentelemetry-go/pull/5313](https://togithub.com/open-telemetry/opentelemetry-go/pull/5313) - fix(deps): update module github.com/prometheus/client_golang to v1.19.1 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5341](https://togithub.com/open-telemetry/opentelemetry-go/pull/5341) - chore(deps): update jaegertracing/all-in-one docker tag to v1.57 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5329](https://togithub.com/open-telemetry/opentelemetry-go/pull/5329) - chore(deps): update otel/opentelemetry-collector-contrib docker tag to v0.100.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5337](https://togithub.com/open-telemetry/opentelemetry-go/pull/5337) - chore(deps): update prom/prometheus docker tag to v2.52.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5338](https://togithub.com/open-telemetry/opentelemetry-go/pull/5338) - Move Aneurysm9 to emeritus status by [@​Aneurysm9](https://togithub.com/Aneurysm9) in [https://github.com/open-telemetry/opentelemetry-go/pull/5319](https://togithub.com/open-telemetry/opentelemetry-go/pull/5319) - Test metric aggregate times by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5323](https://togithub.com/open-telemetry/opentelemetry-go/pull/5323) - Fix empty log body printed by stdoutlog exporter by [@​XSAM](https://togithub.com/XSAM) in [https://github.com/open-telemetry/opentelemetry-go/pull/5311](https://togithub.com/open-telemetry/opentelemetry-go/pull/5311) - Record links with empty span context by [@​amanakin](https://togithub.com/amanakin) in [https://github.com/open-telemetry/opentelemetry-go/pull/5315](https://togithub.com/open-telemetry/opentelemetry-go/pull/5315) - Update `RELEASING.md` to obtain steps to verify the changes for contrib by [@​XSAM](https://togithub.com/XSAM) in [https://github.com/open-telemetry/opentelemetry-go/pull/5284](https://togithub.com/open-telemetry/opentelemetry-go/pull/5284) - chore(deps): update module google.golang.org/genproto/googleapis/rpc to v0.0.0-20240509183442-62759503f434 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5345](https://togithub.com/open-telemetry/opentelemetry-go/pull/5345) - chore(deps): update module google.golang.org/genproto/googleapis/api to v0.0.0-20240509183442-62759503f434 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5344](https://togithub.com/open-telemetry/opentelemetry-go/pull/5344) - Support Delta & Cumulative temporality for LastValue aggregates by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5305](https://togithub.com/open-telemetry/opentelemetry-go/pull/5305) - sdk/log: Document how Processor and Exporter interfaces can be extended by [@​pellared](https://togithub.com/pellared) in [https://github.com/open-telemetry/opentelemetry-go/pull/5347](https://togithub.com/open-telemetry/opentelemetry-go/pull/5347) - Remove dependabot version updates by [@​XSAM](https://togithub.com/XSAM) in [https://github.com/open-telemetry/opentelemetry-go/pull/5346](https://togithub.com/open-telemetry/opentelemetry-go/pull/5346) - chore(deps): update module google.golang.org/genproto/googleapis/api to v0.0.0-20240513163218-0867130af1f8 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5350](https://togithub.com/open-telemetry/opentelemetry-go/pull/5350) - chore(deps): update module google.golang.org/genproto/googleapis/rpc to v0.0.0-20240513163218-0867130af1f8 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5351](https://togithub.com/open-telemetry/opentelemetry-go/pull/5351) - chore(deps): update module github.com/prometheus/procfs to v0.15.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5352](https://togithub.com/open-telemetry/opentelemetry-go/pull/5352) - chore(deps): update codecov/codecov-action action to v4.4.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5353](https://togithub.com/open-telemetry/opentelemetry-go/pull/5353) - Add logs to dice example by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5349](https://togithub.com/open-telemetry/opentelemetry-go/pull/5349) - log: Fix comparison of unordered map values by [@​dmathieu](https://togithub.com/dmathieu) in [https://github.com/open-telemetry/opentelemetry-go/pull/5306](https://togithub.com/open-telemetry/opentelemetry-go/pull/5306) - fix(deps): update module google.golang.org/grpc to v1.64.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5354](https://togithub.com/open-telemetry/opentelemetry-go/pull/5354) - Fix logger provider var name in dice example by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5358](https://togithub.com/open-telemetry/opentelemetry-go/pull/5358) - chore(deps): update module google.golang.org/genproto/googleapis/rpc to v0.0.0-20240515191416-fc5f0ca64291 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5362](https://togithub.com/open-telemetry/opentelemetry-go/pull/5362) - chore(deps): update module google.golang.org/genproto/googleapis/api to v0.0.0-20240515191416-fc5f0ca64291 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5361](https://togithub.com/open-telemetry/opentelemetry-go/pull/5361) - chore(deps): update module github.com/grpc-ecosystem/grpc-gateway/v2 to v2.20.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5363](https://togithub.com/open-telemetry/opentelemetry-go/pull/5363) - \[chore] Fix 2 places in log design doc by [@​yijiem](https://togithub.com/yijiem) in [https://github.com/open-telemetry/opentelemetry-go/pull/5364](https://togithub.com/open-telemetry/opentelemetry-go/pull/5364) - \[chore] Fix wrong type in DESIGN.md by [@​pellared](https://togithub.com/pellared) in [https://github.com/open-telemetry/opentelemetry-go/pull/5368](https://togithub.com/open-telemetry/opentelemetry-go/pull/5368) - Add the synchronous gauge to the metric API and SDK by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5304](https://togithub.com/open-telemetry/opentelemetry-go/pull/5304) - Collector example: add metrics by [@​XSAM](https://togithub.com/XSAM) in [https://github.com/open-telemetry/opentelemetry-go/pull/5283](https://togithub.com/open-telemetry/opentelemetry-go/pull/5283) - Fix package prefix of error in otlploghttp by [@​XSAM](https://togithub.com/XSAM) in [https://github.com/open-telemetry/opentelemetry-go/pull/5371](https://togithub.com/open-telemetry/opentelemetry-go/pull/5371) - Split log/logtest into a recorder and a logger by [@​dmathieu](https://togithub.com/dmathieu) in [https://github.com/open-telemetry/opentelemetry-go/pull/5365](https://togithub.com/open-telemetry/opentelemetry-go/pull/5365) - Identify logger with schemaURL in global logger provider by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5375](https://togithub.com/open-telemetry/opentelemetry-go/pull/5375) - Update all semconv use to v1.25.0 by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5374](https://togithub.com/open-telemetry/opentelemetry-go/pull/5374) - fix(deps): update module github.com/golangci/golangci-lint to v1.58.2 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5382](https://togithub.com/open-telemetry/opentelemetry-go/pull/5382) - chore(deps): update codecov/codecov-action action to v4.4.1 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5387](https://togithub.com/open-telemetry/opentelemetry-go/pull/5387) - chore(deps): update module google.golang.org/genproto/googleapis/api to v0.0.0-20240520151616-dc85e6b867a5 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5388](https://togithub.com/open-telemetry/opentelemetry-go/pull/5388) - chore(deps): update benchmark-action/github-action-benchmark action to v1.20.3 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5381](https://togithub.com/open-telemetry/opentelemetry-go/pull/5381) - Fix exported instrument kind const value change by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5385](https://togithub.com/open-telemetry/opentelemetry-go/pull/5385) - Release v1.27.0/v0.49.0/v0.3.0 by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5392](https://togithub.com/open-telemetry/opentelemetry-go/pull/5392) ##### New Contributors - [@​prasad-shirodkar](https://togithub.com/prasad-shirodkar) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/5189](https://togithub.com/open-telemetry/opentelemetry-go/pull/5189) - [@​dockercui](https://togithub.com/dockercui) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/5262](https://togithub.com/open-telemetry/opentelemetry-go/pull/5262) - [@​arukiidou](https://togithub.com/arukiidou) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/5274](https://togithub.com/open-telemetry/opentelemetry-go/pull/5274) - [@​moisesvega](https://togithub.com/moisesvega) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/5286](https://togithub.com/open-telemetry/opentelemetry-go/pull/5286) - [@​renovate](https://togithub.com/renovate) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/5309](https://togithub.com/open-telemetry/opentelemetry-go/pull/5309) - [@​perhapsmaple](https://togithub.com/perhapsmaple) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/5115](https://togithub.com/open-telemetry/opentelemetry-go/pull/5115) - [@​amanakin](https://togithub.com/amanakin) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/5315](https://togithub.com/open-telemetry/opentelemetry-go/pull/5315) - [@​yijiem](https://togithub.com/yijiem) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/5364](https://togithub.com/open-telemetry/opentelemetry-go/pull/5364) **Full Changelog**: https://github.com/open-telemetry/opentelemetry-go/compare/v1.26.0...v1.27.0
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [chore] fix leak in test (#10197) This will allow enabling of goleak checks for the package. Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [mdatagen] Add basic telemetry test (#10206) This PR adds basic tests for the telemetry generation, and fixes the documentation about value type being required for histograms. Signed-off-by: Juraci Paixão Kröhling * [chore] update lint configuration (#10209) This addresses some of the following warnings: ``` WARN [config_reader] The configuration option `run.skip-dirs` is deprecated, please use `issues.exclude-dirs`. WARN [config_reader] The configuration option `run.skip-dirs-use-default` is deprecated, please use `issues.exclude-dirs-use-default`. WARN [config_reader] The configuration option `output.format` is deprecated, please use `output.formats` WARN [config_reader] The configuration option `linters.govet.check-shadowing` is deprecated. Please enable `shadow` instead, if you are not using `enable-all`. WARN [config_reader] The configuration option `linters.errcheck.ignore` is deprecated, please use `linters.errcheck.exclude-functions`. ``` --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Update validate command to use the new configuration options (#10203) After https://github.com/open-telemetry/opentelemetry-collector/pull/9516, the `validate` sum-command works differently from the root command. If a downstream distribution provides `URIs` as part of the new `ConfigProviderSettings` without `--config` flag, the `validate` command fails with ``` 2024/05/21 15:53:25 main.go:85: application run finished with error: at least one config flag must be provided ``` * [chore] replace deprecated calls (#10211) Updating grpc.Dial -> grpc.NewClient, removing grpc.WithBlock as it's not recommended https://github.com/grpc/grpc-go/blob/master/Documentation/anti-patterns.md#the-wrong-way-grpcdial. We may need to add code in the future to wait for state to be connected, but in my local tests, there was no flakiness introduced with this change. Fixes https://github.com/open-telemetry/opentelemetry-collector/issues/10194 --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [confmap] Remove top level condition when considering struct as Unmarshalers. (#9862) This is a slice of #9750 focusing on removing the top level condition on unmarshaling structs. --------- Co-authored-by: Pablo Baeyens Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore] disable gosec checks that cause performance issues (#10210) Same as https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/33192 --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * fix(deps): update module google.golang.org/grpc to v1.64.0 (#10187) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google.golang.org/grpc](https://togithub.com/grpc/grpc-go) | `v1.63.2` -> `v1.64.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/google.golang.org%2fgrpc/v1.64.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/google.golang.org%2fgrpc/v1.64.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/google.golang.org%2fgrpc/v1.63.2/v1.64.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/google.golang.org%2fgrpc/v1.63.2/v1.64.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes
grpc/grpc-go (google.golang.org/grpc) ### [`v1.64.0`](https://togithub.com/grpc/grpc-go/releases/tag/v1.64.0): Release 1.64.0 [Compare Source](https://togithub.com/grpc/grpc-go/compare/v1.63.2...v1.64.0) ### API Changes - stats: Deprecate `InPayload.Data` and `OutPayload.Data`; they were experimental and will be deleted in the next release ([#​7121](https://togithub.com/grpc/grpc-go/issues/7121)) ### Behavior Changes - codec: Remove handling of environment variable `GRPC_GO_ADVERTISE_COMPRESSORS` to suppress setting supported compressors in `grpc-accept-encoding` header. Compressors will always be advertised, as they have been by default for some time ([#​7203](https://togithub.com/grpc/grpc-go/issues/7203)) ### New Features - resolver/dns: Add `SetMinResolutionInterval` to set the minimum interval at which DNS re-resolutions may occur ([#​6962](https://togithub.com/grpc/grpc-go/issues/6962)) - Special Thanks: [@​HomayoonAlimohammadi](https://togithub.com/HomayoonAlimohammadi) - peer/peer: Implement the `fmt.Stringer` interface for pretty printing `Peer`, and - metadata/metadata: Implement the `fmt.Stringer` interface for pretty printing `MD` ([#​7137](https://togithub.com/grpc/grpc-go/issues/7137)) - Special Thanks: [@​AnomalRoil](https://togithub.com/AnomalRoil) ### Performance Improvements - client: Improve RPC performance by reducing work while holding a lock ([#​7132](https://togithub.com/grpc/grpc-go/issues/7132)) ### Bug Fixes - transport/server: Display the proper timeout value when keepalive pings are not ack'd in time ([#​7038](https://togithub.com/grpc/grpc-go/issues/7038)) - Special Thanks: [@​BatmanAoD](https://togithub.com/BatmanAoD) - channelz: Fix bug that was causing the subchannel's target to be unset ([#​7189](https://togithub.com/grpc/grpc-go/issues/7189)) - stats: Fix bug where peer was not set in context when calling stats handler for `OutPayload`, `InPayload`, and `End` ([#​7096](https://togithub.com/grpc/grpc-go/issues/7096)) ### Dependencies - deps: Remove dependency on deprecated `github.com/golang/protobuf` module ([#​7122](https://togithub.com/grpc/grpc-go/issues/7122)) ### Documentation - grpc: Deprecate `WithBlock`, `WithReturnConnectionError`, `FailOnNonTempDialError` which are ignored by `NewClient` ([#​7097](https://togithub.com/grpc/grpc-go/issues/7097)) - Special Thanks: [@​pellared](https://togithub.com/pellared) - grpc: Deprecate `Dial` and `DialContext`. These will continue to be supported throughout 1.x, but are deprecated to direct users to `NewClient` (See [#​7090](https://togithub.com/grpc/grpc-go/issues/7090) for more information) - examples: Add custom lb example ([#​6691](https://togithub.com/grpc/grpc-go/issues/6691))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [chore] follow codeql recommendation (#10165) CodeQL is currently reporting "Invalid Go toolchain version: As of Go 1.21, toolchain versions must use the 1.N.P syntax.". This PR attempts to fix this. --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore] Remove unused ocRegistry, no longer used (#10215) * [chore] test that implementation implements interface without allocation (#10214) * Restrict characters in environment variable names (#10183) #### Description Restricts Environment Variable names according to the [restrictions](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/file-configuration.md#environment-variable-substitution) published by the OpenTelemetry Configuration Working Group. Changes both the expand converter and the env provider. Defines one regex to be used for both of these. #### Link to tracking issue Fixes https://github.com/open-telemetry/opentelemetry-collector/issues/9531 #### Testing Unit tests --------- Co-authored-by: Pablo Baeyens * Generate profiling pdata (#10195) #### Description This generates the pdata for profiles. #### Link to tracking issue Last step of #10109. #### Testing The generated code is unit-tested by generated tests. cc @mx-psi --------- Co-authored-by: Pablo Baeyens Co-authored-by: Pablo Baeyens * [chore] fix schema for telemetry/metrics/ (#10224) Apparently there's an error on the schema for the telemetry node: looking at a working example, I see this: ``` telemetry: metrics: processor_tail_sampling_sampling_decision_latency: description: Latency (in microseconds) of a given sampling policy unit: µs enabled: true histogram: value_type: int ``` However, the current schema seems to indicate that the `metrics` node shouldn't be there. This PR brings the schema to be in-line with the code. Signed-off-by: Juraci Paixão Kröhling * [mdatagen] generate utility code to test telemetry (#10212) This will allow components to more easily test the telemetry they should be emitting. --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [batchprocessor] fix broken processor_batch_metadata_cardinality metric (#10232) Fixes #10231 Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * fix(deps): update all opentelemetry-go-contrib packages (#10238) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/contrib/config](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | `v0.6.0` -> `v0.7.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcontrib%2fconfig/v0.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcontrib%2fconfig/v0.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcontrib%2fconfig/v0.6.0/v0.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcontrib%2fconfig/v0.6.0/v0.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | `v0.51.0` -> `v0.52.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fgoogle.golang.org%2fgrpc%2fotelgrpc/v0.52.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fgoogle.golang.org%2fgrpc%2fotelgrpc/v0.52.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fgoogle.golang.org%2fgrpc%2fotelgrpc/v0.51.0/v0.52.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fgoogle.golang.org%2fgrpc%2fotelgrpc/v0.51.0/v0.52.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | `v0.51.0` -> `v0.52.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fnet%2fhttp%2fotelhttp/v0.52.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fnet%2fhttp%2fotelhttp/v0.52.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fnet%2fhttp%2fotelhttp/v0.51.0/v0.52.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fnet%2fhttp%2fotelhttp/v0.51.0/v0.52.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/contrib/propagators/b3](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | `v1.26.0` -> `v1.27.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcontrib%2fpropagators%2fb3/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcontrib%2fpropagators%2fb3/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcontrib%2fpropagators%2fb3/v1.26.0/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcontrib%2fpropagators%2fb3/v1.26.0/v1.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/contrib/zpages](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | `v0.51.0` -> `v0.52.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcontrib%2fzpages/v0.52.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcontrib%2fzpages/v0.52.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcontrib%2fzpages/v0.51.0/v0.52.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcontrib%2fzpages/v0.51.0/v0.52.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes
open-telemetry/opentelemetry-go-contrib (go.opentelemetry.io/contrib/config) ### [`v0.7.0`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v0.7.0) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-go-contrib/compare/v0.6.0...v0.7.0) Add support for go.opentelemetry.io/otel v0.7.0 # Raw changes made between v0.6.1 and v0.7.0 [`be5af6f`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/commit/be5af6fc17a1fd313d1d8267aa9a51738ef1c85c) Create RELEASE instructions ([#​101](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/101)) [`a3a136f`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/commit/a3a136f9689a5f8a97164247ad5f7b831bb981ad) Modify Datadog example test to send UDP packets and validate them ([#​96](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/96)) [`41015b5`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/commit/41015b560c38fbe78cbee75762d2a29575727042) Bump google.golang.org/grpc from 1.29.1 to 1.30.0 ([#​99](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/99)) [`d8b0c8e`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/commit/d8b0c8e48eec5634aeec3baeea7cc7641c839d48) Bump google.golang.org/grpc in /instrumentation/labstack/echo ([#​100](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/100)) [`2638e7b`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/commit/2638e7be887225775c6c0be423d3e1a77d19febf) Bump google.golang.org/grpc in /instrumentation/gin-gonic/gin ([#​98](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/98)) [`90ce241`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/commit/90ce241afaf68d6b7ae58372dbb71c4ce2b86bc8) Using latest version of mod-tidier which supports go.{mod,sum} check ([#​97](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/97)) [`6c478fe`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/commit/6c478fe44e10f331991bd669fca4d351445b34d9) Upgrade Exporter to match new API ([#​46](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/46)) [`64e2183`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/commit/64e21834f1d5eab534cfcdd488f65e2aa658ca77) Bump github.com/golangci/golangci-lint from 1.21.0 to 1.27.0 in /tools ([#​77](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/77)) [`c83cc1e`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/commit/c83cc1e777f281e48d115b1203e0a31fcb0acd0f) Bump go.mongodb.org/mongo-driver from 1.3.2 to 1.3.4 in /instrumentation/go.mongodb.org/mongo-driver ([#​76](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/76)) [`e719fe6`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/commit/e719fe6664b5d9d36a606adb0acd41e2c8626433) Bump github.com/stretchr/testify in /instrumentation/gin-gonic/gin ([#​75](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/75)) [`0f251cc`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/commit/0f251cced76664295957efcf6d674ecbcc787329) Bump github.com/stretchr/testify ([#​74](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/74)) [`b421721`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/commit/b421721973ea11fbda6ace827893632cd3187056) Bump github.com/gin-gonic/gin from 1.6.2 to 1.6.3 in /instrumentation/gin-gonic/gin ([#​73](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/73)) [`d923ef6`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/commit/d923ef694483717c2af48491990a03465f704a76) Bump google.golang.org/grpc from 1.28.1 to 1.29.1 ([#​72](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/72)) [`c1fd2a1`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/commit/c1fd2a1d09019e81acc8874fcdff49943b82efe9) Bump google.golang.org/grpc in /instrumentation/labstack/echo ([#​71](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/71)) [`ea45049`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/commit/ea450490e8a242a230e0e63d5ba801b3caa08247) Bump github.com/stretchr/testify from 1.5.1 to 1.6.1 in /instrumentation/macaron ([#​70](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/70)) [`d5e8ef2`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/commit/d5e8ef29f8e8ca02cf4af879c6057100fbea092c) Bump google.golang.org/grpc in /instrumentation/gin-gonic/gin ([#​69](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/69)) [`efaf37a`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/commit/efaf37aab3fe80516baedf046a612a92c0ea7b96) Bump gopkg.in/macaron.v1 from 1.3.5 to 1.3.9 in /instrumentation/macaron ([#​68](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/68)) [`db6e6c5`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/commit/db6e6c5976861d5bacb4ec4d6850c1828bb0837c) Bump github.com/stretchr/testify in /instrumentation/labstack/echo ([#​67](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/67)) [`eecea29`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/commit/eecea29c84eb76c488edf68dbd3639be3f01efdb) Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 ([#​66](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/66)) [`6972389`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/commit/69723897af771300c95ef6149245a3953cb43bc1) Bump github.com/stretchr/testify in /instrumentation/gorilla/mux ([#​65](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/65)) [`f0fb8bc`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/commit/f0fb8bc25e3649d9999f7f97006fae18c7b8acfa) Bump github.com/stretchr/testify from 1.5.1 to 1.6.1 in /exporters/metric/dogstatsd ([#​62](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/62)) [`325b321`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/commit/325b321e22547732db28d517f7f18ba455a41157) Update project docs and layout ([#​92](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/92)) [`135745a`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/commit/135745a8c3d789a23cc3b46e4afa711d50f8bfef) Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /instrumentation/runtime ([#​64](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/64)) [`9f68b4e`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/commit/9f68b4e3ffb07c5273047bd82dd23181d2c88e20) Fix company affiliation ([#​95](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/95)) [`e4d3a09`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/commit/e4d3a09bb4f8ba8e55f1297aec5c0b71ad20a73e) Add dependabot tidy github workflow ([#​94](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/94)) [`f45ec6b`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/commit/f45ec6ba0da286bfa160894e5491a24420aaa932) Bump github.com/DataDog/datadog-go from 3.5.0+incompatible to 3.7.2+incompatible in /exporters/metric/datadog ([#​78](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/78)) [`5e5d6f1`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/commit/5e5d6f13ffa6e8e27c7646c9025ed787b8d73482) Create dependabot.yml ([#​61](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/61)) [`25bcf27`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/commit/25bcf274ad2fe009a3cf1e792235f306f41db1e0) Add tagging script for release process ([#​60](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/60))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * fix(deps): update module golang.org/x/vuln to v1.1.1 (#10237) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | golang.org/x/vuln | `v1.1.0` -> `v1.1.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fvuln/v1.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2fvuln/v1.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2fvuln/v1.1.0/v1.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fvuln/v1.1.0/v1.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * fix(deps): update module github.com/golangci/golangci-lint to v1.59.0 (#10239) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/golangci/golangci-lint](https://togithub.com/golangci/golangci-lint) | `v1.58.2` -> `v1.59.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgolangci%2fgolangci-lint/v1.59.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fgolangci%2fgolangci-lint/v1.59.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fgolangci%2fgolangci-lint/v1.58.2/v1.59.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgolangci%2fgolangci-lint/v1.58.2/v1.59.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes
golangci/golangci-lint (github.com/golangci/golangci-lint) ### [`v1.59.0`](https://togithub.com/golangci/golangci-lint/compare/v1.58.2...v1.59.0) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.58.2...v1.59.0)
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * fix(deps): update module github.com/hashicorp/go-version to v1.7.0 (#10240) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/hashicorp/go-version](https://togithub.com/hashicorp/go-version) | `v1.6.0` -> `v1.7.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fhashicorp%2fgo-version/v1.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fhashicorp%2fgo-version/v1.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fhashicorp%2fgo-version/v1.6.0/v1.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fhashicorp%2fgo-version/v1.6.0/v1.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes
hashicorp/go-version (github.com/hashicorp/go-version) ### [`v1.7.0`](https://togithub.com/hashicorp/go-version/releases/tag/v1.7.0) [Compare Source](https://togithub.com/hashicorp/go-version/compare/v1.6.0...v1.7.0) ENHANCEMENTS: - Remove `reflect` dependency ([#​91](https://togithub.com/hashicorp/go-version/pull/91)) - Implement the `database/sql.Scanner` and `database/sql/driver.Value` interfaces for `Version` ([#​133](https://togithub.com/hashicorp/go-version/pull/133)) INTERNAL: - \[COMPLIANCE] Add Copyright and License Headers ([#​115](https://togithub.com/hashicorp/go-version/pull/115)) - \[COMPLIANCE] Update MPL-2.0 LICENSE ([#​105](https://togithub.com/hashicorp/go-version/pull/105)) - Bump actions/cache from 3.0.11 to 3.2.5 ([#​116](https://togithub.com/hashicorp/go-version/pull/116)) - Bump actions/checkout from 3.2.0 to 3.3.0 ([#​111](https://togithub.com/hashicorp/go-version/pull/111)) - Bump actions/upload-artifact from 3.1.1 to 3.1.2 ([#​112](https://togithub.com/hashicorp/go-version/pull/112)) - GHA Migration ([#​103](https://togithub.com/hashicorp/go-version/pull/103)) - github: Pin external GitHub Actions to hashes ([#​107](https://togithub.com/hashicorp/go-version/pull/107)) - SEC-090: Automated trusted workflow pinning (2023-04-05) ([#​124](https://togithub.com/hashicorp/go-version/pull/124)) - update readme ([#​104](https://togithub.com/hashicorp/go-version/pull/104))
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> * [chore][exporter/debug] increase test coverage (#10242) Improving coverage after https://github.com/open-telemetry/opentelemetry-collector/pull/9922. * [mdatagen] add support for bucket boundaries (#10229) This allows setting of explicit boundaries for histograms. Fixes https://github.com/open-telemetry/opentelemetry-collector/issues/10218 --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * mdatagen: support setting telemetry level in telemetry builder (#10234) This allows components to set the minimum level needed for them to produce telemetry. By default, this is set to `configtelemetryLevelBasic`. If the telemetry level is below that minimum level, then the noop meter is used for metrics. --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore]fix semconv script (#10241) The automation script that runs on a cron to auto-generate PRs for new semconv updates has been failing since it was created. This PR fixes a couple of issues w/ the workflow that were preventing it from working. --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore] remove WithOTel test wrapper (#10236) This is no longer needed since we're not testing WithOTel and WithOpenCensus. Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore] cleanup tostring function, remove unclear uri parameter (#10244) Signed-off-by: Bogdan Drutu * [batchprocessor] use mdatagen for async metric (#10233) Follows https://github.com/open-telemetry/opentelemetry-collector/pull/10232, use mdatagen for async counter --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [confmap] Add new tests (#10246) #### Description Add a new test scenarios to confmap expand tests #### Link to tracking issue Related to https://github.com/open-telemetry/opentelemetry-collector/pull/10182#discussion_r1617668532 * [config] Deprecate component.UnmarshalConfig (#9750) **Description:** This PR removes the top level if/else in `component.UnmarshalConfig`, handling recursive state in the confmap.Conf object instead. This PR deprecates `component.UnmarshalConfig` in favor of calling directly `Unmarshal` on the confmap.Conf object. **Link to tracking Issue:** Fixes #7102 Fixes #7101 --------- Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com> * [docs] add documentation regarding verify images signatures (#8990) **Description:** Co-authored-by: Juraci Paixão Kröhling Co-authored-by: Pablo Baeyens * [chore] Fix link to generated tests (#10248) #### Description Fixes a bad link #### Link to tracking issue Fixes #10143 * [batchprocessor] ensure attributes are set on metadata metric (#10245) Fixing this bug required a change in mdatagen to ensure attributes could be passed in to the telemetry builder. Fixes #9674 --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore] update batch processor tests to use generated utility (#10256) This updates the tests for the batch processor. This allows us to remove a bunch of custom test code. --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [confmap] Add ability to set default provider (#10182) #### Description This PR adds support for expanding `${}` syntax when no schema is provided by allowing Resolver to use a default provider. In a followup PR I'll update otelcol with a feature gate that allow switching between a default envProvider and the expandconverter. #### Link to tracking issue Related to https://github.com/open-telemetry/opentelemetry-collector/issues/10161 Related to https://github.com/open-telemetry/opentelemetry-collector/issues/7111 #### Testing Added unit tests #### Documentation Added godoc strings --------- Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com> * [processorhelper] use mdatagen level and noop meter (#10235) This cleans up the need to have a level in the ObsReport struct. Added test to validate the change as none existed before --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore] Remove debug line from a test (#10261) * [chore] use mdatagen to generate service metrics (#10160) This PR follows https://github.com/open-telemetry/opentelemetry-collector/pull/10159 and uses the new mdatagen functionality to generate async metrics in the service. --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [exporterhelper] Fix potential deadlocks in BatcherSender shutdown (#10258) Fixes https://github.com/open-telemetry/opentelemetry-collector/issues/10255 * Revert "[chore] use mdatagen to generate service metrics (#10160)" (#10271) This reverts commit 10bcef33e6d26104036ed2874cb179c4437abc98. * [chore] Remove redundant wait group from a test (#10269) https://github.com/open-telemetry/opentelemetry-collector/pull/10258/files#r1621017272 made me wonder if the wait group is really necessary. We have another synchronization that waits for at least two requests to enter the merge function, which should be enough. So, we don't necessarily need this wait group. Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore] remove TODO from confmap code (#10278) Remove a TODO comment on confmap/provider.go related to ChangeEvent. This struct is used extensively in providers that rely on changes such as: https://github.com/signalfx/splunk-otel-collector/blob/main/internal/configsource/etcd2configsource/source.go#L84 * [otelcol] Removed deprecated `ConfigProvider` field from settings (#10281) * [chore] remove deprecated types (#10283) Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [chore] remove deprecated LoadTLSConfigContext methods (#10284) Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [service] remove deprecated Telemetry struct and New func (#10285) Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [confighttp] Apply MaxRequestBodySize to the result of a decompressed body (#10289) This change applies a restriction on the size of the decompressed payload. Before this change, this is the result of the test added in this PR: ``` --- FAIL: TestServerWithDecompression (0.03s) /home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/config/confighttp/confighttp_test.go:1327: Error Trace: /home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/config/confighttp/confighttp_test.go:1327 /usr/lib/golang/src/net/http/server.go:2166 /home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/config/confighttp/compression.go:163 /home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/config/confighttp/confighttp.go:455 /usr/lib/golang/src/net/http/server.go:2166 /home/jpkroehling/go/pkg/mod/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@v0.52.0/handler.go:212 /home/jpkroehling/go/pkg/mod/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@v0.52.0/handler.go:73 /usr/lib/golang/src/net/http/server.go:2166 /home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/config/confighttp/clientinfohandler.go:26 /usr/lib/golang/src/net/http/server.go:3137 /usr/lib/golang/src/net/http/server.go:2039 /usr/lib/golang/src/runtime/asm_amd64.s:1695 Error: An error is expected but got nil. Test: TestServerWithDecompression /home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/config/confighttp/confighttp_test.go:1328: Error Trace: /home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/config/confighttp/confighttp_test.go:1328 /usr/lib/golang/src/net/http/server.go:2166 /home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/config/confighttp/compression.go:163 /home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/config/confighttp/confighttp.go:455 /usr/lib/golang/src/net/http/server.go:2166 /home/jpkroehling/go/pkg/mod/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@v0.52.0/handler.go:212 /home/jpkroehling/go/pkg/mod/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@v0.52.0/handler.go:73 /usr/lib/golang/src/net/http/server.go:2166 /home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/config/confighttp/clientinfohandler.go:26 /usr/lib/golang/src/net/http/server.go:3137 /usr/lib/golang/src/net/http/server.go:2039 /usr/lib/golang/src/runtime/asm_amd64.s:1695 Error: Test: TestServerWithDecompression /home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/config/confighttp/confighttp_test.go:1357: Error Trace: /home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/config/confighttp/confighttp_test.go:1357 Error: Not equal: expected: 200 actual : 400 Test: TestServerWithDecompression FAIL FAIL go.opentelemetry.io/collector/config/confighttp 0.036s FAIL ``` Signed-off-by: Juraci Paixão Kröhling --------- Signed-off-by: Juraci Paixão Kröhling * [chore] Prepare release v1.9.0/v0.102.0 (#10293) The following commands were run to prepare this release: - make chlog-update VERSION=v1.9.0/v0.102.0 - make prepare-release PREVIOUS_VERSION=1.8.0 RELEASE_CANDIDATE=1.9.0 MODSET=stable - make prepare-release PREVIOUS_VERSION=0.101.0 RELEASE_CANDIDATE=0.102.0 MODSET=beta --------- Co-authored-by: Pablo Baeyens * [chore] update go to 1.21.11/1.22.4 (#10321) (#10325) Backport of #10321 Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> * [configgrpc] Use own compressors for zstd (#10323) (#10324) Backport of #10323 Signed-off-by: Juraci Paixão Kröhling Co-authored-by: Juraci Paixão Kröhling * prepare release 0.102.1 (#10326) #### Description Step 2 of release process > Make sure you are on release/. Prepare release commits with prepare-release make target, e.g. make prepare-release PREVIOUS_VERSION=0.90.0 RELEASE_CANDIDATE=0.90.1 MODSET=beta, and create a pull request against the release/ branch. * go mod tidy for changed import --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> Signed-off-by: petercover Signed-off-by: Juraci Paixão Kröhling Signed-off-by: Bogdan Drutu Signed-off-by: cpanato Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> Co-authored-by: Bogdan Drutu Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Co-authored-by: Anthony Mirabella Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com> Co-authored-by: Evan Bradley Co-authored-by: Juraci Paixão Kröhling Co-authored-by: Curtis Robert Co-authored-by: Ankit Patel <8731662+ankitpatel96@users.noreply.github.com> Co-authored-by: Dan Jaglowski Co-authored-by: Pablo Baeyens Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: petercover Co-authored-by: Yang Song Co-authored-by: Andrzej Stencel Co-authored-by: Damien Mathieu <42@dmathieu.com> Co-authored-by: Pablo Baeyens Co-authored-by: Lavish Pal Co-authored-by: Juraci Paixão Kröhling Co-authored-by: Dmitrii Anoshin Co-authored-by: Antoine Toulme Co-authored-by: Antoine Toulme Co-authored-by: Carlos Tadeu Panato Junior --- ...nfiggrpc-use-own-compressors-for-zstd.yaml | 13 + .github/workflows/api-compatibility.yml | 6 +- .github/workflows/build-and-test-arm.yml | 66 + .github/workflows/build-and-test-windows.yaml | 8 +- .github/workflows/build-and-test.yml | 56 +- .../workflows/builder-integration-test.yaml | 4 +- .github/workflows/builder-release.yaml | 6 +- .github/workflows/changelog.yml | 4 +- .github/workflows/check-links.yaml | 4 +- .github/workflows/codeql-analysis.yml | 10 +- .github/workflows/contrib-tests.yml | 4 +- .../generate-semantic-conventions-pr.yaml | 14 +- .github/workflows/perf.yml | 4 +- .github/workflows/prepare-release.yml | 4 +- .github/workflows/scorecard.yml | 6 +- .github/workflows/shellcheck.yml | 2 +- .github/workflows/tidy-dependencies.yml | 6 +- .golangci.yml | 18 +- CHANGELOG-API.md | 42 + CHANGELOG.md | 44 + CONTRIBUTING.md | 2 + Makefile | 4 +- Makefile.Common | 2 +- README.md | 44 +- cmd/builder/go.mod | 4 +- cmd/builder/go.sum | 4 +- cmd/builder/internal/builder/config.go | 2 +- cmd/builder/internal/builder/main_test.go | 228 +- cmd/builder/internal/config/default.yaml | 40 +- cmd/builder/test/core.builder.yaml | 8 +- cmd/mdatagen/README.md | 4 +- cmd/mdatagen/embeded_templates_test.go | 29 +- ...kage_test.go => generated_package_test.go} | 3 +- cmd/mdatagen/go.mod | 50 +- cmd/mdatagen/go.sum | 60 +- .../internal/samplereceiver/documentation.md | 28 + .../internal/samplereceiver/factory.go | 7 +- .../generated_component_telemetry_test.go | 76 + .../generated_component_test.go | 2 +- .../metadata/generated_config_test.go | 5 +- .../internal/metadata/generated_telemetry.go | 82 + .../metadata/generated_telemetry_test.go | 13 + .../internal/samplereceiver/metadata.yaml | 25 + .../internal/samplereceiver/metrics_test.go | 42 + cmd/mdatagen/loader.go | 13 + cmd/mdatagen/loader_test.go | 39 +- cmd/mdatagen/main.go | 101 +- cmd/mdatagen/main_test.go | 52 +- cmd/mdatagen/metadata-schema.yaml | 38 + cmd/mdatagen/metadata.yaml | 2 + cmd/mdatagen/metricdata.go | 81 +- cmd/mdatagen/metricdata_test.go | 32 +- cmd/mdatagen/statusdata.go | 1 + .../component_telemetry_test.go.tmpl | 76 + cmd/mdatagen/templates/component_test.go.tmpl | 10 +- cmd/mdatagen/templates/config_test.go.tmpl | 5 +- cmd/mdatagen/templates/documentation.md.tmpl | 42 + cmd/mdatagen/templates/package_test.go.tmpl | 3 +- cmd/mdatagen/templates/telemetry.go.tmpl | 95 +- cmd/mdatagen/templates/telemetry_test.go.tmpl | 18 + ...etry_missing_value_type_for_histogram.yaml | 13 + cmd/mdatagen/testdata/with_telemetry.yaml | 14 + cmd/otelcorecol/builder-config.yaml | 40 +- cmd/otelcorecol/go.mod | 159 +- cmd/otelcorecol/go.sum | 138 +- cmd/otelcorecol/main.go | 2 +- cmd/otelcorecol/package_test.go | 14 - component/component.go | 2 + component/config.go | 7 +- component/go.mod | 34 +- component/go.sum | 52 +- config/configauth/go.mod | 28 +- config/configauth/go.sum | 52 +- config/configcompression/go.mod | 2 +- config/configgrpc/configgrpc.go | 4 +- .../configgrpc/configgrpc_benchmark_test.go | 4 +- config/configgrpc/go.mod | 68 +- config/configgrpc/go.sum | 68 +- config/configgrpc/internal/zstd.go | 83 + config/configgrpc/internal/zstd_test.go | 41 + config/confighttp/compression.go | 16 +- config/confighttp/compression_test.go | 4 +- config/confighttp/confighttp.go | 24 +- config/confighttp/confighttp_test.go | 91 +- config/confighttp/go.mod | 62 +- config/confighttp/go.sum | 68 +- config/confignet/go.mod | 2 +- config/configopaque/go.mod | 4 +- config/configretry/go.mod | 2 +- config/configtelemetry/go.mod | 2 +- config/configtls/configtls.go | 14 - config/configtls/go.mod | 4 +- config/internal/go.mod | 8 +- config/internal/go.sum | 4 +- confmap/confmap.go | 30 +- confmap/confmap_test.go | 30 +- confmap/converter.go | 10 +- confmap/converter/expandconverter/expand.go | 70 +- .../converter/expandconverter/expand_test.go | 89 +- confmap/converter/expandconverter/go.mod | 4 +- .../testdata/errors/expand-list-error.yaml | 4 + .../errors/expand-list-map-error.yaml | 3 + .../testdata/errors/expand-map-error.yaml | 2 + confmap/doc_test.go | 30 + confmap/expand.go | 36 +- confmap/expand_test.go | 128 +- confmap/go.mod | 2 +- confmap/internal/envvar/pattern.go | 10 + confmap/internal/mapstructure/encoder.go | 15 +- confmap/internal/mapstructure/encoder_test.go | 18 + confmap/provider.go | 1 - confmap/provider/envprovider/go.mod | 4 +- confmap/provider/envprovider/provider.go | 27 +- confmap/provider/envprovider/provider_test.go | 27 +- confmap/provider/fileprovider/go.mod | 4 +- confmap/provider/fileprovider/provider.go | 27 +- confmap/provider/httpprovider/go.mod | 4 +- confmap/provider/httpprovider/provider.go | 17 +- confmap/provider/httpsprovider/go.mod | 4 +- confmap/provider/httpsprovider/provider.go | 18 +- confmap/provider/yamlprovider/go.mod | 4 +- confmap/provider/yamlprovider/provider.go | 21 +- confmap/resolver.go | 80 +- confmap/resolver_test.go | 70 +- .../generated_component_test.go | 2 +- connector/forwardconnector/go.mod | 46 +- connector/forwardconnector/go.sum | 60 +- .../internal/metadata/generated_telemetry.go | 18 - connector/go.mod | 46 +- connector/go.sum | 60 +- consumer/go.mod | 12 +- consumer/go.sum | 12 +- docs/internal-architecture.md | 53 + docs/release.md | 19 +- exporter/debugexporter/config_test.go | 7 +- exporter/debugexporter/exporter_test.go | 86 + .../debugexporter/generated_component_test.go | 2 +- exporter/debugexporter/go.mod | 53 +- exporter/debugexporter/go.sum | 60 +- .../internal/metadata/generated_telemetry.go | 18 - exporter/exporterhelper/batch_sender.go | 50 +- exporter/exporterhelper/batch_sender_test.go | 66 +- exporter/exporterhelper/common_test.go | 13 +- exporter/exporterhelper/doc.go | 2 + exporter/exporterhelper/documentation.md | 79 + .../generated_component_telemetry_test.go | 76 + ...kage_test.go => generated_package_test.go} | 3 +- .../internal/metadata/generated_status.go | 17 + .../internal/metadata/generated_telemetry.go | 120 + .../metadata/generated_telemetry_test.go | 17 +- exporter/exporterhelper/metadata.yaml | 82 + exporter/exporterhelper/obsexporter.go | 114 +- exporter/exporterhelper/obsexporter_test.go | 10 +- exporter/exporterhelper/queue_sender_test.go | 18 +- exporter/exporterhelper/request.go | 10 - exporter/exporterhelper/retry_sender_test.go | 12 +- exporter/go.mod | 52 +- exporter/go.sum | 60 +- exporter/loggingexporter/config_test.go | 7 +- .../generated_component_test.go | 2 +- exporter/loggingexporter/go.mod | 52 +- exporter/loggingexporter/go.sum | 60 +- .../internal/metadata/generated_telemetry.go | 18 - .../nopexporter/generated_component_test.go | 2 +- exporter/nopexporter/go.mod | 48 +- exporter/nopexporter/go.sum | 60 +- .../internal/metadata/generated_telemetry.go | 18 - exporter/otlpexporter/config_test.go | 6 +- .../otlpexporter/generated_component_test.go | 2 +- exporter/otlpexporter/go.mod | 96 +- exporter/otlpexporter/go.sum | 114 +- .../internal/metadata/generated_telemetry.go | 18 - .../metadata/generated_telemetry_test.go | 63 - exporter/otlphttpexporter/config_test.go | 6 +- .../generated_component_test.go | 2 +- exporter/otlphttpexporter/go.mod | 92 +- exporter/otlphttpexporter/go.sum | 114 +- .../internal/metadata/generated_telemetry.go | 18 - .../metadata/generated_telemetry_test.go | 63 - extension/auth/go.mod | 38 +- extension/auth/go.sum | 52 +- extension/ballastextension/config_test.go | 5 +- .../generated_component_test.go | 3 +- extension/ballastextension/go.mod | 46 +- extension/ballastextension/go.sum | 64 +- .../internal/metadata/generated_telemetry.go | 18 - .../metadata/generated_telemetry_test.go | 63 - extension/go.mod | 36 +- extension/go.sum | 52 +- .../generated_component_test.go | 3 +- extension/memorylimiterextension/go.mod | 46 +- extension/memorylimiterextension/go.sum | 64 +- .../internal/metadata/generated_telemetry.go | 18 - .../metadata/generated_telemetry_test.go | 63 - extension/zpagesextension/config_test.go | 5 +- .../generated_component_test.go | 3 +- extension/zpagesextension/go.mod | 68 +- extension/zpagesextension/go.sum | 110 +- .../internal/metadata/generated_telemetry.go | 18 - .../metadata/generated_telemetry_test.go | 63 - featuregate/go.mod | 4 +- featuregate/go.sum | 4 +- filter/go.mod | 4 +- go.mod | 70 +- go.sum | 114 +- internal/e2e/go.mod | 106 +- internal/e2e/go.sum | 118 +- internal/memorylimiter/config_test.go | 5 +- internal/tools/go.mod | 80 +- internal/tools/go.sum | 581 +- otelcol/buffered_core.go | 81 + otelcol/buffered_core_test.go | 107 + otelcol/collector.go | 88 +- otelcol/collector_core.go | 58 + otelcol/collector_core_test.go | 89 + otelcol/collector_test.go | 23 +- otelcol/collector_windows.go | 2 +- otelcol/command.go | 28 +- otelcol/command_components_test.go | 9 +- otelcol/command_validate.go | 15 +- otelcol/command_validate_test.go | 20 +- otelcol/config.go | 12 +- otelcol/configprovider.go | 4 +- otelcol/go.mod | 104 +- otelcol/go.sum | 130 +- otelcol/internal/configunmarshaler/configs.go | 2 +- otelcol/unmarshaler.go | 32 +- pdata/go.mod | 8 +- pdata/go.sum | 12 +- .../cmd/pdatagen/internal/base_fields.go | 57 +- .../cmd/pdatagen/internal/packages.go | 2 + .../cmd/pdatagen/internal/pcommon_package.go | 52 +- .../internal/pprofile_otlp_package.go | 43 + .../cmd/pdatagen/internal/pprofile_package.go | 603 ++ .../internal/primitive_slice_structs.go | 73 +- .../v1experimental/profiles_service.pb.go | 845 +++ .../v1experimental/pprofextended.pb.go | 4919 +++++++++++++++++ .../profiles/v1experimental/profiles.pb.go | 1482 +++++ pdata/internal/generated_wrapper_byteslice.go | 10 + .../generated_wrapper_float64slice.go | 10 + .../internal/generated_wrapper_int64slice.go | 34 + .../internal/generated_wrapper_stringslice.go | 34 + .../internal/generated_wrapper_uint64slice.go | 10 + pdata/pcommon/generated_byteslice_test.go | 2 +- pdata/pcommon/generated_float64slice_test.go | 2 +- pdata/pcommon/generated_int64slice.go | 108 + pdata/pcommon/generated_int64slice_test.go | 83 + pdata/pcommon/generated_stringslice.go | 108 + pdata/pcommon/generated_stringslice_test.go | 83 + pdata/pcommon/generated_uint64slice_test.go | 2 +- pdata/plog/plogotlp/grpc_test.go | 12 +- pdata/pmetric/pmetricotlp/grpc_test.go | 12 +- pdata/pprofile/Makefile | 1 + pdata/pprofile/generated_attributeunit.go | 75 + .../pprofile/generated_attributeunit_test.go | 68 + .../pprofile/generated_attributeunitslice.go | 136 + .../generated_attributeunitslice_test.go | 137 + pdata/pprofile/generated_function.go | 111 + pdata/pprofile/generated_function_test.go | 98 + pdata/pprofile/generated_functionslice.go | 136 + .../pprofile/generated_functionslice_test.go | 137 + pdata/pprofile/generated_label.go | 99 + pdata/pprofile/generated_label_test.go | 88 + pdata/pprofile/generated_labelslice.go | 136 + pdata/pprofile/generated_labelslice_test.go | 137 + pdata/pprofile/generated_line.go | 87 + pdata/pprofile/generated_line_test.go | 78 + pdata/pprofile/generated_lineslice.go | 136 + pdata/pprofile/generated_lineslice_test.go | 137 + pdata/pprofile/generated_link.go | 77 + pdata/pprofile/generated_link_test.go | 68 + pdata/pprofile/generated_linkslice.go | 136 + pdata/pprofile/generated_linkslice_test.go | 137 + pdata/pprofile/generated_location.go | 124 + pdata/pprofile/generated_location_test.go | 115 + pdata/pprofile/generated_locationslice.go | 136 + .../pprofile/generated_locationslice_test.go | 137 + pdata/pprofile/generated_mapping.go | 190 + pdata/pprofile/generated_mapping_test.go | 167 + pdata/pprofile/generated_mappingslice.go | 136 + pdata/pprofile/generated_mappingslice_test.go | 137 + pdata/pprofile/generated_profile.go | 196 + pdata/pprofile/generated_profile_test.go | 202 + pdata/pprofile/generated_profilecontainer.go | 106 + .../generated_profilecontainer_test.go | 102 + .../generated_profilescontainersslice.go | 152 + .../generated_profilescontainersslice_test.go | 154 + pdata/pprofile/generated_resourceprofiles.go | 76 + .../generated_resourceprofiles_test.go | 76 + .../generated_resourceprofilesslice.go | 152 + .../generated_resourceprofilesslice_test.go | 154 + pdata/pprofile/generated_sample.go | 130 + pdata/pprofile/generated_sample_test.go | 129 + pdata/pprofile/generated_sampleslice.go | 136 + pdata/pprofile/generated_sampleslice_test.go | 137 + pdata/pprofile/generated_scopeprofiles.go | 76 + .../pprofile/generated_scopeprofiles_test.go | 76 + .../pprofile/generated_scopeprofilesslice.go | 152 + .../generated_scopeprofilesslice_test.go | 154 + pdata/pprofile/generated_valuetype.go | 87 + pdata/pprofile/generated_valuetype_test.go | 80 + pdata/pprofile/generated_valuetypeslice.go | 136 + .../pprofile/generated_valuetypeslice_test.go | 137 + pdata/pprofile/go.mod | 27 + pdata/pprofile/go.sum | 67 + .../generated_exportpartialsuccess.go | 75 + .../generated_exportpartialsuccess_test.go | 78 + pdata/ptrace/ptraceotlp/grpc_test.go | 12 +- pdata/testdata/go.mod | 10 +- pdata/testdata/go.sum | 12 +- .../batchprocessor/batch_processor_test.go | 367 +- processor/batchprocessor/config_test.go | 5 +- processor/batchprocessor/documentation.md | 47 + .../generated_component_telemetry_test.go | 76 + .../generated_component_test.go | 2 +- processor/batchprocessor/go.mod | 54 +- processor/batchprocessor/go.sum | 60 +- .../internal/metadata/generated_telemetry.go | 96 + .../metadata/generated_telemetry_test.go | 13 + processor/batchprocessor/metadata.yaml | 39 + processor/batchprocessor/metrics.go | 96 +- processor/batchprocessor/metrics_test.go | 205 - processor/go.mod | 48 +- processor/go.sum | 60 +- .../generated_component_test.go | 2 +- processor/memorylimiterprocessor/go.mod | 50 +- processor/memorylimiterprocessor/go.sum | 64 +- .../internal/metadata/generated_telemetry.go | 18 - .../metadata/generated_telemetry_test.go | 63 - .../memorylimiter_test.go | 4 +- processor/processorhelper/documentation.md | 79 + .../generated_component_telemetry_test.go | 76 + ...kage_test.go => generated_package_test.go} | 3 +- .../internal/metadata/generated_telemetry.go | 120 + .../metadata/generated_telemetry_test.go | 17 +- processor/processorhelper/metadata.yaml | 82 + processor/processorhelper/obsreport.go | 162 +- processor/processorhelper/obsreport_test.go | 72 +- processor/processorhelper/processor.go | 2 + proto_patch.sed | 38 +- receiver/go.mod | 44 +- receiver/go.sum | 60 +- .../nopreceiver/generated_component_test.go | 2 +- receiver/nopreceiver/go.mod | 46 +- receiver/nopreceiver/go.sum | 60 +- .../internal/metadata/generated_telemetry.go | 18 - .../metadata/generated_telemetry_test.go | 63 - receiver/otlpreceiver/config_test.go | 24 +- .../otlpreceiver/generated_component_test.go | 2 +- receiver/otlpreceiver/go.mod | 96 +- receiver/otlpreceiver/go.sum | 118 +- .../otlpreceiver/internal/logs/otlp_test.go | 2 +- .../internal/metadata/generated_telemetry.go | 18 - .../metadata/generated_telemetry_test.go | 63 - .../internal/metrics/otlp_test.go | 2 +- .../otlpreceiver/internal/trace/otlp_test.go | 2 +- receiver/otlpreceiver/otlp_test.go | 13 +- receiver/receiverhelper/documentation.md | 55 + .../generated_component_telemetry_test.go | 76 + ...kage_test.go => generated_package_test.go} | 3 +- .../internal/metadata/generated_telemetry.go | 99 + .../metadata/generated_telemetry_test.go | 17 +- receiver/receiverhelper/metadata.yaml | 58 + receiver/receiverhelper/obsreport.go | 95 +- receiver/receiverhelper/obsreport_test.go | 10 +- receiver/scraperhelper/doc.go | 2 + receiver/scraperhelper/documentation.md | 23 + .../generated_component_telemetry_test.go | 76 + ...kage_test.go => generated_package_test.go} | 3 +- .../internal/metadata/generated_telemetry.go | 71 + .../metadata/generated_telemetry_test.go | 17 +- receiver/scraperhelper/metadata.yaml | 26 + receiver/scraperhelper/obsreport.go | 52 +- receiver/scraperhelper/obsreport_test.go | 10 +- renovate.json | 7 +- semconv/go.mod | 4 +- semconv/go.sum | 4 +- service/go.mod | 94 +- service/go.sum | 126 +- service/internal/graph/graph.go | 9 + service/internal/graph/graph_test.go | 2 +- service/internal/graph/nodes.go | 10 +- service/service.go | 23 +- service/service_test.go | 4 +- service/telemetry.go | 19 +- service/telemetry/factory.go | 59 + service/telemetry/internal/factory.go | 116 + service/telemetry/logger.go | 53 + service/telemetry/telemetry.go | 166 +- service/telemetry/telemetry_test.go | 42 +- service/telemetry/tracer.go | 85 + versions.yaml | 5 +- 392 files changed, 22546 insertions(+), 5228 deletions(-) create mode 100644 .chloggen/jpkroehling-configgrpc-use-own-compressors-for-zstd.yaml create mode 100644 .github/workflows/build-and-test-arm.yml rename cmd/mdatagen/{package_test.go => generated_package_test.go} (60%) create mode 100644 cmd/mdatagen/internal/samplereceiver/generated_component_telemetry_test.go create mode 100644 cmd/mdatagen/templates/component_telemetry_test.go.tmpl create mode 100644 cmd/mdatagen/testdata/invalid_telemetry_missing_value_type_for_histogram.yaml create mode 100644 cmd/mdatagen/testdata/with_telemetry.yaml delete mode 100644 cmd/otelcorecol/package_test.go create mode 100644 config/configgrpc/internal/zstd.go create mode 100644 config/configgrpc/internal/zstd_test.go create mode 100644 confmap/converter/expandconverter/testdata/errors/expand-list-error.yaml create mode 100644 confmap/converter/expandconverter/testdata/errors/expand-list-map-error.yaml create mode 100644 confmap/converter/expandconverter/testdata/errors/expand-map-error.yaml create mode 100644 confmap/internal/envvar/pattern.go delete mode 100644 connector/forwardconnector/internal/metadata/generated_telemetry.go create mode 100644 docs/internal-architecture.md create mode 100644 exporter/debugexporter/exporter_test.go delete mode 100644 exporter/debugexporter/internal/metadata/generated_telemetry.go create mode 100644 exporter/exporterhelper/documentation.md create mode 100644 exporter/exporterhelper/generated_component_telemetry_test.go rename exporter/exporterhelper/{package_test.go => generated_package_test.go} (62%) create mode 100644 exporter/exporterhelper/internal/metadata/generated_status.go create mode 100644 exporter/exporterhelper/internal/metadata/generated_telemetry.go rename exporter/{loggingexporter => exporterhelper}/internal/metadata/generated_telemetry_test.go (73%) create mode 100644 exporter/exporterhelper/metadata.yaml delete mode 100644 exporter/loggingexporter/internal/metadata/generated_telemetry.go delete mode 100644 exporter/nopexporter/internal/metadata/generated_telemetry.go delete mode 100644 exporter/otlpexporter/internal/metadata/generated_telemetry.go delete mode 100644 exporter/otlpexporter/internal/metadata/generated_telemetry_test.go delete mode 100644 exporter/otlphttpexporter/internal/metadata/generated_telemetry.go delete mode 100644 exporter/otlphttpexporter/internal/metadata/generated_telemetry_test.go delete mode 100644 extension/ballastextension/internal/metadata/generated_telemetry.go delete mode 100644 extension/ballastextension/internal/metadata/generated_telemetry_test.go delete mode 100644 extension/memorylimiterextension/internal/metadata/generated_telemetry.go delete mode 100644 extension/memorylimiterextension/internal/metadata/generated_telemetry_test.go delete mode 100644 extension/zpagesextension/internal/metadata/generated_telemetry.go delete mode 100644 extension/zpagesextension/internal/metadata/generated_telemetry_test.go create mode 100644 otelcol/buffered_core.go create mode 100644 otelcol/buffered_core_test.go create mode 100644 otelcol/collector_core.go create mode 100644 otelcol/collector_core_test.go create mode 100644 pdata/internal/cmd/pdatagen/internal/pprofile_otlp_package.go create mode 100644 pdata/internal/cmd/pdatagen/internal/pprofile_package.go create mode 100644 pdata/internal/data/protogen/collector/profiles/v1experimental/profiles_service.pb.go create mode 100644 pdata/internal/data/protogen/profiles/v1experimental/pprofextended.pb.go create mode 100644 pdata/internal/data/protogen/profiles/v1experimental/profiles.pb.go create mode 100644 pdata/internal/generated_wrapper_int64slice.go create mode 100644 pdata/internal/generated_wrapper_stringslice.go create mode 100644 pdata/pcommon/generated_int64slice.go create mode 100644 pdata/pcommon/generated_int64slice_test.go create mode 100644 pdata/pcommon/generated_stringslice.go create mode 100644 pdata/pcommon/generated_stringslice_test.go create mode 100644 pdata/pprofile/Makefile create mode 100644 pdata/pprofile/generated_attributeunit.go create mode 100644 pdata/pprofile/generated_attributeunit_test.go create mode 100644 pdata/pprofile/generated_attributeunitslice.go create mode 100644 pdata/pprofile/generated_attributeunitslice_test.go create mode 100644 pdata/pprofile/generated_function.go create mode 100644 pdata/pprofile/generated_function_test.go create mode 100644 pdata/pprofile/generated_functionslice.go create mode 100644 pdata/pprofile/generated_functionslice_test.go create mode 100644 pdata/pprofile/generated_label.go create mode 100644 pdata/pprofile/generated_label_test.go create mode 100644 pdata/pprofile/generated_labelslice.go create mode 100644 pdata/pprofile/generated_labelslice_test.go create mode 100644 pdata/pprofile/generated_line.go create mode 100644 pdata/pprofile/generated_line_test.go create mode 100644 pdata/pprofile/generated_lineslice.go create mode 100644 pdata/pprofile/generated_lineslice_test.go create mode 100644 pdata/pprofile/generated_link.go create mode 100644 pdata/pprofile/generated_link_test.go create mode 100644 pdata/pprofile/generated_linkslice.go create mode 100644 pdata/pprofile/generated_linkslice_test.go create mode 100644 pdata/pprofile/generated_location.go create mode 100644 pdata/pprofile/generated_location_test.go create mode 100644 pdata/pprofile/generated_locationslice.go create mode 100644 pdata/pprofile/generated_locationslice_test.go create mode 100644 pdata/pprofile/generated_mapping.go create mode 100644 pdata/pprofile/generated_mapping_test.go create mode 100644 pdata/pprofile/generated_mappingslice.go create mode 100644 pdata/pprofile/generated_mappingslice_test.go create mode 100644 pdata/pprofile/generated_profile.go create mode 100644 pdata/pprofile/generated_profile_test.go create mode 100644 pdata/pprofile/generated_profilecontainer.go create mode 100644 pdata/pprofile/generated_profilecontainer_test.go create mode 100644 pdata/pprofile/generated_profilescontainersslice.go create mode 100644 pdata/pprofile/generated_profilescontainersslice_test.go create mode 100644 pdata/pprofile/generated_resourceprofiles.go create mode 100644 pdata/pprofile/generated_resourceprofiles_test.go create mode 100644 pdata/pprofile/generated_resourceprofilesslice.go create mode 100644 pdata/pprofile/generated_resourceprofilesslice_test.go create mode 100644 pdata/pprofile/generated_sample.go create mode 100644 pdata/pprofile/generated_sample_test.go create mode 100644 pdata/pprofile/generated_sampleslice.go create mode 100644 pdata/pprofile/generated_sampleslice_test.go create mode 100644 pdata/pprofile/generated_scopeprofiles.go create mode 100644 pdata/pprofile/generated_scopeprofiles_test.go create mode 100644 pdata/pprofile/generated_scopeprofilesslice.go create mode 100644 pdata/pprofile/generated_scopeprofilesslice_test.go create mode 100644 pdata/pprofile/generated_valuetype.go create mode 100644 pdata/pprofile/generated_valuetype_test.go create mode 100644 pdata/pprofile/generated_valuetypeslice.go create mode 100644 pdata/pprofile/generated_valuetypeslice_test.go create mode 100644 pdata/pprofile/go.mod create mode 100644 pdata/pprofile/go.sum create mode 100644 pdata/pprofile/pprofileotlp/generated_exportpartialsuccess.go create mode 100644 pdata/pprofile/pprofileotlp/generated_exportpartialsuccess_test.go create mode 100644 processor/batchprocessor/documentation.md create mode 100644 processor/batchprocessor/generated_component_telemetry_test.go delete mode 100644 processor/batchprocessor/metrics_test.go delete mode 100644 processor/memorylimiterprocessor/internal/metadata/generated_telemetry.go delete mode 100644 processor/memorylimiterprocessor/internal/metadata/generated_telemetry_test.go create mode 100644 processor/processorhelper/documentation.md create mode 100644 processor/processorhelper/generated_component_telemetry_test.go rename processor/processorhelper/{package_test.go => generated_package_test.go} (62%) create mode 100644 processor/processorhelper/internal/metadata/generated_telemetry.go rename {connector/forwardconnector => processor/processorhelper}/internal/metadata/generated_telemetry_test.go (73%) create mode 100644 processor/processorhelper/metadata.yaml delete mode 100644 receiver/nopreceiver/internal/metadata/generated_telemetry.go delete mode 100644 receiver/nopreceiver/internal/metadata/generated_telemetry_test.go delete mode 100644 receiver/otlpreceiver/internal/metadata/generated_telemetry.go delete mode 100644 receiver/otlpreceiver/internal/metadata/generated_telemetry_test.go create mode 100644 receiver/receiverhelper/documentation.md create mode 100644 receiver/receiverhelper/generated_component_telemetry_test.go rename receiver/receiverhelper/{package_test.go => generated_package_test.go} (62%) create mode 100644 receiver/receiverhelper/internal/metadata/generated_telemetry.go rename {exporter/nopexporter => receiver/receiverhelper}/internal/metadata/generated_telemetry_test.go (73%) create mode 100644 receiver/receiverhelper/metadata.yaml create mode 100644 receiver/scraperhelper/documentation.md create mode 100644 receiver/scraperhelper/generated_component_telemetry_test.go rename receiver/scraperhelper/{package_test.go => generated_package_test.go} (62%) create mode 100644 receiver/scraperhelper/internal/metadata/generated_telemetry.go rename {exporter/debugexporter => receiver/scraperhelper}/internal/metadata/generated_telemetry_test.go (73%) create mode 100644 receiver/scraperhelper/metadata.yaml create mode 100644 service/telemetry/factory.go create mode 100644 service/telemetry/internal/factory.go create mode 100644 service/telemetry/logger.go create mode 100644 service/telemetry/tracer.go diff --git a/.chloggen/jpkroehling-configgrpc-use-own-compressors-for-zstd.yaml b/.chloggen/jpkroehling-configgrpc-use-own-compressors-for-zstd.yaml new file mode 100644 index 00000000000..a04c4f89012 --- /dev/null +++ b/.chloggen/jpkroehling-configgrpc-use-own-compressors-for-zstd.yaml @@ -0,0 +1,13 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: 'bug_fix' + +# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) +component: Use own compressors for zstd + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Before this change, the zstd compressor we used didn't respect the max message size. + +# One or more tracking issues or pull requests related to the change +issues: [10323] diff --git a/.github/workflows/api-compatibility.yml b/.github/workflows/api-compatibility.yml index cd2fda2aaab..3ba06a9f106 100644 --- a/.github/workflows/api-compatibility.yml +++ b/.github/workflows/api-compatibility.yml @@ -22,18 +22,18 @@ jobs: steps: - name: Checkout-Main - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 with: ref: ${{ github.base_ref }} path: ${{ github.base_ref }} - name: Checkout-HEAD - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 with: path: ${{ github.head_ref }} - name: Setup Go - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: go-version: ~1.21.5 diff --git a/.github/workflows/build-and-test-arm.yml b/.github/workflows/build-and-test-arm.yml new file mode 100644 index 00000000000..6eae718ca9a --- /dev/null +++ b/.github/workflows/build-and-test-arm.yml @@ -0,0 +1,66 @@ +name: build-and-test-arm +on: + push: + branches: [ main ] + tags: + - 'v[0-9]+.[0-9]+.[0-9]+*' + merge_group: + pull_request: +env: + TEST_RESULTS: testbed/tests/results/junit/results.xml + # Make sure to exit early if cache segment download times out after 2 minutes. + # We limit cache download as a whole to 5 minutes. + SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2 + GOPROXY: https://goproxy1.cncf.selfactuated.dev,direct + +permissions: + contents: read + +# Do not cancel this workflow on main. See https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/16616 +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + arm-unittest-matrix: + if: ${{ github.actor != 'dependabot[bot]' && (contains(github.event.pull_request.labels.*.name, 'Run ARM') || github.event_name == 'push' || github.event_name == 'merge_group') }} + runs-on: actuated-arm64-4cpu-4gb + steps: + - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 + - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 + with: + go-version: "~1.22.4" + cache: false + - name: Cache Go + id: go-cache + timeout-minutes: 5 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 + with: + path: | + ~/go/bin + ~/go/pkg/mod + key: go-build-cache-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + - name: Install dependencies + if: steps.go-cache.outputs.cache-hit != 'true' + run: make gomoddownload + - name: Install Tools + if: steps.go-cache.outputs.cache-hit != 'true' + run: make install-tools + - name: Run Unit Tests + run: make -j4 gotest + arm-unittest: + if: ${{ github.actor != 'dependabot[bot]' && (contains(github.event.pull_request.labels.*.name, 'Run ARM') || github.event_name == 'push' || github.event_name == 'merge_group') }} + runs-on: actuated-arm64-4cpu-4gb + needs: [arm-unittest-matrix] + steps: + - name: Print result + run: echo ${{ needs.arm-unittest-matrix.result }} + - name: Interpret result + run: | + if [[ success == ${{ needs.arm-unittest-matrix.result }} ]] + then + echo "All matrix jobs passed!" + else + echo "One or more matrix jobs failed." + false + fi diff --git a/.github/workflows/build-and-test-windows.yaml b/.github/workflows/build-and-test-windows.yaml index 09124dfab02..66ab8b75dec 100644 --- a/.github/workflows/build-and-test-windows.yaml +++ b/.github/workflows/build-and-test-windows.yaml @@ -18,9 +18,9 @@ jobs: runs-on: windows-latest steps: - name: Checkout Repo - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - name: Setup Go - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: go-version: ~1.21.5 cache: false @@ -40,9 +40,9 @@ jobs: runs-on: windows-latest steps: - name: Checkout Repo - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - name: Setup Go - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: go-version: ~1.21.5 cache: false diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index b7ed51a68e4..7d238d9aaeb 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -6,6 +6,9 @@ on: - "v[0-9]+.[0-9]+.[0-9]+*" pull_request: +permissions: + contents: read + concurrency: group: ${{ github.workflow }}-${{ github.head_ref }} cancel-in-progress: true @@ -15,11 +18,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - name: Setup Go - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: - go-version: ~1.21.9 + go-version: ~1.21.11 cache: false - name: Cache Go id: go-cache @@ -38,11 +41,11 @@ jobs: needs: [setup-environment] steps: - name: Checkout Repo - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - name: Setup Go - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: - go-version: ~1.21.9 + go-version: ~1.21.11 cache: false - name: Cache Go id: go-cache @@ -62,11 +65,11 @@ jobs: timeout-minutes: 30 steps: - name: Checkout Repo - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - name: Setup Go - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: - go-version: ~1.21.9 + go-version: ~1.21.11 cache: false - name: Cache Go id: go-cache @@ -87,11 +90,11 @@ jobs: needs: [setup-environment] steps: - name: Checkout Repo - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - name: Setup Go - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: - go-version: ~1.21.9 + go-version: ~1.21.11 cache: false - name: Cache Go id: go-cache @@ -137,25 +140,22 @@ jobs: unittest-matrix: strategy: matrix: - runner: [ubuntu-latest, actuated-arm64-4cpu-4gb] - exclude: - - go-version: "~1.21.9" - runner: actuated-arm64-4cpu-4gb - go-version: ["~1.22", "~1.21.9"] # 1.20 needs quotes otherwise it's interpreted as 1.2 + runner: [ubuntu-latest] + go-version: ["~1.22", "~1.21.11"] # 1.20 needs quotes otherwise it's interpreted as 1.2 runs-on: ${{ matrix.runner }} needs: [setup-environment] steps: - name: Set up arkade - uses: alexellis/setup-arkade@v3 + uses: alexellis/setup-arkade@b1816384b2260cfd2c023c6798d26075786cfc7f # v3 - name: Install vmmeter run: | sudo -E arkade oci install ghcr.io/openfaasltd/vmmeter:latest --path /usr/local/bin/ - name: Run vmmeter - uses: self-actuated/vmmeter-action@v1 + uses: self-actuated/vmmeter-action@c7e2162e39294a810cab647cacc215ecd68a44f6 # v1 - name: Checkout Repo - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - name: Setup Go - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: go-version: ${{ matrix.go-version }} cache: false @@ -197,11 +197,11 @@ jobs: needs: [setup-environment] steps: - name: Checkout Repo - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - name: Setup Go - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: - go-version: ~1.21.9 + go-version: ~1.21.11 cache: false - name: Cache Go id: go-cache @@ -219,7 +219,7 @@ jobs: - name: Run Unit Tests With Coverage run: make gotest-with-cover - name: Upload coverage report - uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # 4.3.1 + uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c # 4.4.1 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} @@ -259,11 +259,11 @@ jobs: steps: - name: Checkout Repo - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - name: Setup Go - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: - go-version: ~1.21.9 + go-version: ~1.21.11 cache: false - name: Cache Go id: go-cache diff --git a/.github/workflows/builder-integration-test.yaml b/.github/workflows/builder-integration-test.yaml index 94ed1a3179b..b95d0040899 100644 --- a/.github/workflows/builder-integration-test.yaml +++ b/.github/workflows/builder-integration-test.yaml @@ -29,9 +29,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - name: Setup Go - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: go-version: ~1.21.5 - name: Test diff --git a/.github/workflows/builder-release.yaml b/.github/workflows/builder-release.yaml index 86f0717b0f2..e827965c792 100644 --- a/.github/workflows/builder-release.yaml +++ b/.github/workflows/builder-release.yaml @@ -10,15 +10,15 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 with: fetch-depth: 0 - name: Setup Go - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: go-version: ~1.21.5 - name: Run GoReleaser - uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0 + uses: goreleaser/goreleaser-action@5742e2a039330cbb23ebf35f046f814d4c6ff811 # v5.1.0 with: distribution: goreleaser-pro version: latest diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 1838f6f3caf..0cc1ccbca9c 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -26,11 +26,11 @@ jobs: PR_HEAD: ${{ github.event.pull_request.head.sha }} steps: - name: Checkout Repo - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 with: fetch-depth: 0 - name: Setup Go - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: go-version: ~1.21.5 - name: Cache Go diff --git a/.github/workflows/check-links.yaml b/.github/workflows/check-links.yaml index 93a407948ad..55f4f466674 100644 --- a/.github/workflows/check-links.yaml +++ b/.github/workflows/check-links.yaml @@ -21,7 +21,7 @@ jobs: md: ${{ steps.changes.outputs.md }} steps: - name: Checkout Repo - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 with: fetch-depth: 0 - name: Get changed files @@ -34,7 +34,7 @@ jobs: if: ${{needs.changedfiles.outputs.md}} steps: - name: Checkout Repo - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 with: fetch-depth: 0 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 70dc2f95c98..bb456aade19 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -21,21 +21,21 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - name: Setup Go - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: go-version: ~1.21.5 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3 + uses: github/codeql-action/init@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6 with: languages: go - name: Autobuild - uses: github/codeql-action/autobuild@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3 + uses: github/codeql-action/autobuild@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3 + uses: github/codeql-action/analyze@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6 diff --git a/.github/workflows/contrib-tests.yml b/.github/workflows/contrib-tests.yml index 0c8b11b8996..e795bed94cb 100644 --- a/.github/workflows/contrib-tests.yml +++ b/.github/workflows/contrib-tests.yml @@ -38,9 +38,9 @@ jobs: - other steps: - name: Checkout Repo - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - name: Setup Go - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: go-version: ~1.21.5 cache: false diff --git a/.github/workflows/generate-semantic-conventions-pr.yaml b/.github/workflows/generate-semantic-conventions-pr.yaml index 8bc7c691698..693d4a5b364 100644 --- a/.github/workflows/generate-semantic-conventions-pr.yaml +++ b/.github/workflows/generate-semantic-conventions-pr.yaml @@ -14,22 +14,21 @@ jobs: already-added: ${{ steps.check-versions.outputs.already-added }} already-opened: ${{ steps.check-versions.outputs.already-opened }} steps: - - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - id: check-versions name: Check versions env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - # version in this repo are prefixed with v latest_version=v$(gh release view \ --repo open-telemetry/semantic-conventions \ --json tagName \ --jq .tagName \ | sed 's/^v//') - rc=$(find semconv -name $latest_version | grep .) - if $rc == 0; then + found=$(find semconv -name $latest_version) + if [[ $found =~ $latest_version ]]; then already_added=true fi @@ -56,12 +55,13 @@ jobs: needs: - check-versions steps: - - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - name: Checkout semantic-convention - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 with: - repository: open-telemetry/semantic-convention + repository: open-telemetry/semantic-conventions path: tmp-semantic-conventions + fetch-depth: 0 - name: Update version env: diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index 432cebcb13f..bf3935baec4 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -11,10 +11,10 @@ jobs: runperf: runs-on: ubuntu-latest steps: - - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - name: Setup Go - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: go-version: ~1.21.5 diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index 5bed593e28b..3433d0c539d 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -54,7 +54,7 @@ jobs: - validate-versions runs-on: ubuntu-latest steps: - - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 with: fetch-depth: 0 # Make sure that there are no open issues with release:blocker label in Core. The release has to be delayed until they are resolved. @@ -82,7 +82,7 @@ jobs: REPO: open-telemetry/opentelemetry-collector-contrib run: ./.github/workflows/scripts/release-check-build-status.sh - name: Setup Go - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: go-version: ~1.21.5 # Prepare Core for release. diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 3cfdee49ed5..c9c952f5829 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -29,12 +29,12 @@ jobs: steps: - name: "Checkout code" - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 with: persist-credentials: false - name: "Run analysis" - uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1 + uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 # v2.3.3 with: results_file: results.sarif results_format: sarif @@ -64,6 +64,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3 + uses: github/codeql-action/upload-sarif@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6 with: sarif_file: results.sarif diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index aa59846bea5..1f048e48eb0 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -13,6 +13,6 @@ jobs: name: Shellcheck runs-on: ubuntu-latest steps: - - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - name: Run ShellCheck uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # 2.0.0 diff --git a/.github/workflows/tidy-dependencies.yml b/.github/workflows/tidy-dependencies.yml index 7427464d9a3..fd462b79e1d 100644 --- a/.github/workflows/tidy-dependencies.yml +++ b/.github/workflows/tidy-dependencies.yml @@ -16,12 +16,12 @@ jobs: runs-on: ubuntu-latest if: ${{ !contains(github.event.pull_request.labels.*.name, 'dependency-major-update') && (github.actor == 'renovate[bot]' || contains(github.event.pull_request.labels.*.name, 'renovatebot')) }} steps: - - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 with: ref: ${{ github.head_ref }} - - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: - go-version: ~1.21.9 + go-version: ~1.21.11 cache: false - name: Cache Go id: go-cache diff --git a/.golangci.yml b/.golangci.yml index 90d7a1b51c2..103ebae9c18 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -15,13 +15,13 @@ run: # which dirs to skip: issues from them won't be reported; # can use regexp here: generated.*, regexp is applied on full path; # default value is empty list, but default dirs are skipped independently - # from this option's value (see skip-dirs-use-default). - skip-dirs: + # from this option's value (see exclude-dirs-use-default). + exclude-dirs: - third_party # default is true. Enables skipping of directories: # vendor$, third_party$, testdata$, examples$, Godeps$, builtin$ - skip-dirs-use-default: false + exclude-dirs-use-default: false # which files to skip: they will be analyzed, but issues from them # won't be reported. Default value is empty list, but there is @@ -46,7 +46,7 @@ run: # output configuration options output: # colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number" - format: colored-line-number + formats: colored-line-number # print lines of code with issue, default is true print-issued-lines: true @@ -57,9 +57,6 @@ output: # all available settings of specific linters linters-settings: govet: - # report about shadowed variables - check-shadowing: true - # settings per analyzer settings: printf: # analyzer name, run `go tool vet help` to see all analyzers @@ -122,6 +119,13 @@ linters-settings: files: - "!**/*_test.go" + gosec: + excludes: + # https://github.com/open-telemetry/opentelemetry-collector/issues/10213 + - G601 + # https://github.com/open-telemetry/opentelemetry-collector/issues/10213 + - G113 + linters: enable: - depguard diff --git a/CHANGELOG-API.md b/CHANGELOG-API.md index a727efcbae1..3851896f2cd 100644 --- a/CHANGELOG-API.md +++ b/CHANGELOG-API.md @@ -7,6 +7,46 @@ If you are looking for user-facing changes, check out [CHANGELOG.md](./CHANGELOG +## v1.9.0/v0.102.0 + +### 🛑 Breaking changes 🛑 + +- `otelcol`: Remove deprecated `ConfigProvider` field from `CollectorSettings` (#10281) +- `exporterhelper`: remove deprecated RequestMarshaler & RequestUnmarshaler types (#10283) +- `service`: remove deprecated Telemetry struct and New func (#10285) +- `configtls`: remove deprecated LoadTLSConfigContext funcs (#10283) + +### 🚩 Deprecations 🚩 + +- `component`: Deprecate `component.UnmarshalConfig`, use `(*confmap.Conf).Unmarshal(&intoCfg)` instead. (#7102) +- `service/telemetry`: Deprecate telemetry.New in favor of telemetry.NewFactory (#4970) + +### 💡 Enhancements 💡 + +- `confmap`: Allow setting a default Provider on a Resolver to use when `${}` syntax is used without a scheme (#10182) +- `pdata`: Introduce string and int64 slices to pcommon (#10148) +- `pdata`: Introduce generated experimental pdata for profiling signal. (#10195) +- `confmap`: Remove top level condition when considering struct as Unmarshalers (#7101) + +### 🧰 Bug fixes 🧰 + +- `otelcol`: Update validate command to use the new configuration options (#10203) + +## v1.8.0/v0.101.0 + +### 🛑 Breaking changes 🛑 + +- `confighttp`: Removes deprecated functions `ToClientContext`, `ToListenerContext`, and `ToServerContext`. (#10138) +- `confmap`: Deprecate `NewWithSettings` for all Providers and `New` for all Converters (#10134) + Use `NewFactory` instead for all affected modules. +- `confmap`: Remove deprecated `Providers` and `Converters` from `confmap.ResolverSettings` (#10173) + Use `ProviderSettings` and `ConverterSettings` instead. + +### 🧰 Bug fixes 🧰 + +- `otelcol`: Add explicit mapstructure tags to main configuration struct (#10152) +- `confmap`: Support string-like types as map keys when marshaling (#10137) + ## v1.7.0/v0.100.0 ### 💡 Enhancements 💡 @@ -28,6 +68,8 @@ If you are looking for user-facing changes, check out [CHANGELOG.md](./CHANGELOG - `confighttp`: deprecate ToClientContext, ToServerContext, ToListenerContext, replaced by ToClient, ToServer, ToListener (#9807) - `configtls`: Deprecates `ClientConfig.LoadTLSConfigContext` and `ServerConfig.LoadTLSConfigContext`, use `ClientConfig.LoadTLSConfig` and `ServerConfig.LoadTLSConfig` instead. (#9945) +- `confmap`: Deprecate the `Providers` and `Converters` fields in `confmap.ResolverSettings` (#9516) +Use the `ProviderFactories` and `ConverterFactories` fields instead. ### 💡 Enhancements 💡 diff --git a/CHANGELOG.md b/CHANGELOG.md index b37709193bf..d8aa47185c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,50 @@ If you are looking for developer-facing changes, check out [CHANGELOG-API.md](./ +## v1.9.0/v0.102.0 + +### 🛑 Breaking changes 🛑 + +- `envprovider`: Restricts Environment Variable names. Environment variable names must now be ASCII only and start with a letter or an underscore, and can only contain underscores, letters, or numbers. (#9531) +- `confighttp`: Apply MaxRequestBodySize to the result of a decompressed body (#10289) + When using compressed payloads, the Collector would verify only the size of the compressed payload. + This change applies the same restriction to the decompressed content. As a security measure, a limit of 20 MiB was added, which makes this a breaking change. + For most clients, this shouldn't be a problem, but if you often have payloads that decompress to more than 20 MiB, you might want to either configure your + client to send smaller batches (recommended), or increase the limit using the MaxRequestBodySize option. + + +### 💡 Enhancements 💡 + +- `mdatagen`: auto-generate utilities to test component telemetry (#19783) +- `mdatagen`: support setting an AttributeSet for async instruments (#9674) +- `mdatagen`: support using telemetry level in telemetry builder (#10234) + This allows components to set the minimum level needed for them to produce telemetry. By default, this is set to configtelemetry.LevelBasic. If the telemetry level is below that minimum level, then the noop meter is used for metrics. +- `mdatagen`: add support for bucket boundaries for histograms (#10218) +- `releases`: add documentation in how to verify the image signatures using cosign (#9610) + +### 🧰 Bug fixes 🧰 + +- `batchprocessor`: ensure attributes are set on cardinality metadata metric (#9674) +- `batchprocessor`: Fixing processor_batch_metadata_cardinality which was broken in v0.101.0 (#10231) +- `batchprocessor`: respect telemetry level for all metrics (#10234) +- `exporterhelper`: Fix potential deadlocks in BatcherSender shutdown (#10255) + +## v1.8.0/v0.101.0 + +### 💡 Enhancements 💡 + +- `mdatagen`: generate documentation for internal telemetry (#10170) +- `mdatagen`: add ability to use metadata.yaml to automatically generate instruments for components (#10054) + The `telemetry` section in metadata.yaml is used to generate + instruments for components to measure telemetry about themselves. + +- `confmap`: Allow Converters to write logs during startup (#10135) +- `otelcol`: Enable logging during configuration resolution (#10056) + +### 🧰 Bug fixes 🧰 + +- `mdatagen`: Run package tests when goleak is skipped (#10125) + ## v1.7.0/v0.100.0 ### 🛑 Breaking changes 🛑 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fb881c33d16..85528d9a6c3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -108,6 +108,8 @@ in advance so that maintainers can decide if the proposal is a good fit for this repository. This will help avoid situations when you spend significant time on something that maintainers may decide this repo is not the right place for. +If you're new to the Collector, the [internal architecture](docs/internal-architecture.md) documentation may be helpful. + Follow the instructions below to create your PR. ### Fork diff --git a/Makefile b/Makefile index 8fb56bfbdc9..e38507fffbb 100644 --- a/Makefile +++ b/Makefile @@ -157,10 +157,10 @@ ocb: OPENTELEMETRY_PROTO_SRC_DIR=pdata/internal/opentelemetry-proto # The branch matching the current version of the proto to use -OPENTELEMETRY_PROTO_VERSION=v1.2.0 +OPENTELEMETRY_PROTO_VERSION=v1.3.1 # Find all .proto files. -OPENTELEMETRY_PROTO_FILES := $(subst $(OPENTELEMETRY_PROTO_SRC_DIR)/,,$(wildcard $(OPENTELEMETRY_PROTO_SRC_DIR)/opentelemetry/proto/*/v1/*.proto $(OPENTELEMETRY_PROTO_SRC_DIR)/opentelemetry/proto/collector/*/v1/*.proto)) +OPENTELEMETRY_PROTO_FILES := $(subst $(OPENTELEMETRY_PROTO_SRC_DIR)/,,$(wildcard $(OPENTELEMETRY_PROTO_SRC_DIR)/opentelemetry/proto/*/v1/*.proto $(OPENTELEMETRY_PROTO_SRC_DIR)/opentelemetry/proto/collector/*/v1/*.proto $(OPENTELEMETRY_PROTO_SRC_DIR)/opentelemetry/proto/*/v1experimental/*.proto $(OPENTELEMETRY_PROTO_SRC_DIR)/opentelemetry/proto/collector/*/v1experimental/*.proto)) # Target directory to write generated files to. PROTO_TARGET_GEN_DIR=pdata/internal/data/protogen diff --git a/Makefile.Common b/Makefile.Common index ca9b17c56df..31f5a80d156 100644 --- a/Makefile.Common +++ b/Makefile.Common @@ -67,7 +67,7 @@ fmt: $(GOIMPORTS) .PHONY: tidy tidy: rm -fr go.sum - $(GOCMD) mod tidy -compat=1.21 + $(GOCMD) mod tidy -compat=1.21.0 .PHONY: lint lint: $(LINT) diff --git a/README.md b/README.md index 7497f7fa4e0..2d991bb5075 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ GitHub release (latest by date including pre-releases)
- +

@@ -61,7 +61,7 @@ Objectives: ## Supported OTLP version -This code base is currently built against using OTLP protocol v1.1.0, +This code base is currently built against using OTLP protocol v1.3.1, considered Stable. [See the OpenTelemetry Protocol Stability definition here.](https://github.com/open-telemetry/opentelemetry-proto?tab=readme-ov-file#stability-definition) @@ -110,6 +110,42 @@ Support for Go versions on the OpenTelemetry Collector is updated as follows: Official OpenTelemetry Collector distro binaries may be built with any supported Go version. +## Verifying the images signatures + +> [!NOTE] +> To verify a signed artifact or blob, first [install Cosign](https://docs.sigstore.dev/system_config/installation/), then follow the instructions below. + +We are signing the images `otel/opentelemetry-collector` and `otel/opentelemetry-collector-contrib` using [sigstore cosign](https://github.com/sigstore/cosign) tool and to verify the signatures you can run the following command: + +```console +$ cosign verify \ + --certificate-identity=https://github.com/open-telemetry/opentelemetry-collector-releases/.github/workflows/base-release.yaml@refs/tags/ \ + --certificate-oidc-issuer=https://token.actions.githubusercontent.com \ + +``` + +where: + +- ``: is the release that you want to validate +- ``: is the image that you want to check + +Example: + +```console +$ cosign verify --certificate-identity=https://github.com/open-telemetry/opentelemetry-collector-releases/.github/workflows/base-release.yaml@refs/tags/v0.98.0 --certificate-oidc-issuer=https://token.actions.githubusercontent.com ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:0.98.0 + +Verification for ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:0.98.0 -- +The following checks were performed on each of these signatures: + - The cosign claims were validated + - Existence of the claims in the transparency log was verified offline + - The code-signing certificate was verified using trusted certificate authority certificates + +[{"critical":{"identity":{"docker-reference":"ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib"},"image":{"docker-manifest-digest":"sha256:5cea85bcbc734a3c0a641368e5a4ea9d31b472997e9f2feca57eeb4a147fcf1a"},"type":"cosign container image signature"},"optional":{"1.3.6.1.4.1.57264.1.1":"https://token.actions.githubusercontent.com","1.3.6.1.4.1.57264.1.2":"push","1.3.6.1.4.1.57264.1.3":"9e20bf5c142e53070ccb8320a20315fffb41469e","1.3.6.1.4.1.57264.1.4":"Release Contrib","1.3.6.1.4.1.57264.1.5":"open-telemetry/opentelemetry-collector-releases","1.3.6.1.4.1.57264.1.6":"refs/tags/v0.98.0","Bundle":{"SignedEntryTimestamp":"MEUCIQDdlmNeKXQrHnonwWiHLhLLwFDVDNoOBCn2sv85J9P8mgIgDQFssWJImo1hn38VlojvSCL7Q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er":"https://token.actions.githubusercontent.com","Subject":"https://github.com/open-telemetry/opentelemetry-collector-releases/.github/workflows/base-release.yaml@refs/tags/v0.98.0","githubWorkflowName":"Release Contrib","githubWorkflowRef":"refs/tags/v0.98.0","githubWorkflowRepository":"open-telemetry/opentelemetry-collector-releases","githubWorkflowSha":"9e20bf5c142e53070ccb8320a20315fffb41469e","githubWorkflowTrigger":"push"}},{"critical":{"identity":{"docker-reference":"ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib"},"image":{"docker-manifest-digest":"sha256:5cea85bcbc734a3c0a641368e5a4ea9d31b472997e9f2feca57eeb4a147fcf1a"},"type":"cosign container image signature"},"optional":{"1.3.6.1.4.1.57264.1.1":"https://token.actions.githubusercontent.com","1.3.6.1.4.1.57264.1.2":"push","1.3.6.1.4.1.57264.1.3":"9e20bf5c142e53070ccb8320a20315fffb41469e","1.3.6.1.4.1.57264.1.4":"Release Contrib","1.3.6.1.4.1.57264.1.5":"open-telemetry/opentelemetry-collector-releases","1.3.6.1.4.1.57264.1.6":"refs/tags/v0.98.0","Bundle":{"SignedEntryTimestamp":"MEUCIQD1ehDnPO6fzoPIpeQ3KFuYHHBiX7RcEbpo9B2r7JAlzwIgZ1bsuQz7gAXbNU1IEdsTQgfAnRk3xVXO16GnKXM2sAQ=","Payload":{"body":"eyJhcGlWZXJzaW9uIjoiMC4wLjEiLCJraW5kIjoiaGFzaGVkcmVrb3JkIiwic3BlYyI6eyJkYXRhIjp7Imhhc2giOnsiYWxnb3JpdGhtIjoic2hhMjU2IiwidmFsdWUiOiIxMzVjY2RlN2YzZTNhYjU2NmFmYzJhYWU3MDljYmJlNmFhMDZlZWMzNDA2MWNkZjMyNmRhYzM2MmY0NWM4Yjg4In19LCJzaWduYXR1cmUiOnsiY29udGVudCI6Ik1FUUNJRU92QXl0aE5RVGNvNHFMdG9GZUVOV0toNCtEK2I5SUxyYWhoa09WMmVBM0FpQjNEL2FpUGd1T05zUlB5alhaWk1hdnlCam0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RhMlZJU214dVRuZExhVk5zTmpRemFubDBMelJsUzJOdlFYWkxaVFpQQ2tGQlFVSnFjM1JvUjJKSlFVRkJVVVJCUldkM1VtZEphRUZQZUZNM2RteDRjVzVGYTBKVVRtSlZVRUpsUkZSbk0waGtlRlkyY0cxWk9FdGliREV6TjNBS1lWUnViMEZwUlVFelMyMUxVbU5uYWxBeVQzSmxORVpyVm5vNU4xaENNWGRsUzBOeWFXazFTMWx2UTB0bVkxRktSREJSZDBObldVbExiMXBKZW1vd1JRcEJkMDFFWVVGQmQxcFJTWGhCUzNwcVpHMUZTV2gzV21Kb1lVSlNlalk1Y1N0MWVrNVZSMmxhYlRWVk4xcE5aWFJMUTFSM1VFTkljRkZQVldvdlVERkJDa2R0YWt3elJucFFObTVpYkRGblNYZFNUbXN6UkhkNWMwOUJUMHhoUVVoR09IaHhZV0ZzT0U5WGNGRmFhRGh4TTJVMVNVSmFXR0ZWVkhocFlWbGFTM29LUXpWS1RGVlNWbnBMTURsd04wVjBUd290TFMwdExVVk9SQ0JEUlZKVVNVWkpRMEZVUlMwdExTMHRDZz09In19fX0=","integratedTime":1712809122,"logIndex":84797940,"logID":"c0d23d6ad406973f9559f3ba2d1ca01f84147d8ffc5b8445c224f98b9591801d"}},"Issuer":"https://token.actions.githubusercontent.com","Subject":"https://github.com/open-telemetry/opentelemetry-collector-releases/.github/workflows/base-release.yaml@refs/tags/v0.98.0","githubWorkflowName":"Release Contrib","githubWorkflowRef":"refs/tags/v0.98.0","githubWorkflowRepository":"open-telemetry/opentelemetry-collector-releases","githubWorkflowSha":"9e20bf5c142e53070ccb8320a20315fffb41469e","githubWorkflowTrigger":"push"}}] +``` + +> [!NOTE] +> We started signing the images with release `v0.95.0` + ## Contributing See the [Contributing Guide](CONTRIBUTING.md) for details. @@ -118,7 +154,7 @@ Here is a list of community roles with current and previous members: - Triagers ([@open-telemetry/collector-triagers](https://github.com/orgs/open-telemetry/teams/collector-triagers)): - - [Andrzej Stencel](https://github.com/andrzej-stencel), Sumo Logic + - [Andrzej Stencel](https://github.com/andrzej-stencel), Elastic - [Evan Bradley](https://github.com/evan-bradley), Dynatrace - Actively seeking contributors to triage issues @@ -131,7 +167,6 @@ Here is a list of community roles with current and previous members: - Approvers ([@open-telemetry/collector-approvers](https://github.com/orgs/open-telemetry/teams/collector-approvers)): - - [Anthony Mirabella](https://github.com/Aneurysm9), AWS - [Antoine Toulme](https://github.com/atoulme), Splunk - [Daniel Jaglowski](https://github.com/djaglowski), observIQ - [Juraci Paixão Kröhling](https://github.com/jpkrohling), Grafana Labs @@ -146,6 +181,7 @@ Here is a list of community roles with current and previous members: - [Owais Lone](https://github.com/owais), Splunk - [Rahul Patel](https://github.com/rghetia), Google - [Steven Karis](https://github.com/sjkaris), Splunk + - [Anthony Mirabella](https://github.com/Aneurysm9), AWS - Maintainers ([@open-telemetry/collector-maintainers](https://github.com/orgs/open-telemetry/teams/collector-maintainers)): diff --git a/cmd/builder/go.mod b/cmd/builder/go.mod index 1a3fb86740c..48fb449c113 100644 --- a/cmd/builder/go.mod +++ b/cmd/builder/go.mod @@ -3,10 +3,10 @@ module go.opentelemetry.io/collector/cmd/builder -go 1.21 +go 1.21.0 require ( - github.com/hashicorp/go-version v1.6.0 + github.com/hashicorp/go-version v1.7.0 github.com/knadh/koanf/parsers/yaml v0.1.0 github.com/knadh/koanf/providers/env v0.1.0 github.com/knadh/koanf/providers/file v0.1.0 diff --git a/cmd/builder/go.sum b/cmd/builder/go.sum index bc3b48a8fa0..285fa6f1b88 100644 --- a/cmd/builder/go.sum +++ b/cmd/builder/go.sum @@ -6,8 +6,8 @@ github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nos github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= diff --git a/cmd/builder/internal/builder/config.go b/cmd/builder/internal/builder/config.go index 18e5715a3bd..98cd9213d2f 100644 --- a/cmd/builder/internal/builder/config.go +++ b/cmd/builder/internal/builder/config.go @@ -17,7 +17,7 @@ import ( "go.uber.org/zap" ) -const defaultOtelColVersion = "0.100.0" +const defaultOtelColVersion = "0.102.1" // ErrInvalidGoMod indicates an invalid gomod var ErrInvalidGoMod = errors.New("invalid gomod specification for module") diff --git a/cmd/builder/internal/builder/main_test.go b/cmd/builder/internal/builder/main_test.go index 7ddd7ff7408..6c862c70721 100644 --- a/cmd/builder/internal/builder/main_test.go +++ b/cmd/builder/internal/builder/main_test.go @@ -7,17 +7,20 @@ import ( "fmt" "io" "os" + "path" "path/filepath" "runtime" + "strings" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.uber.org/zap" + "golang.org/x/mod/modfile" ) -var ( - goModTestFile = []byte(`// Copyright The OpenTelemetry Authors +const ( + goModTestFile = `// Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 module go.opentelemetry.io/collector/cmd/builder/internal/tester go 1.20 @@ -30,7 +33,54 @@ require ( go.opentelemetry.io/collector/processor v0.94.1 go.opentelemetry.io/collector/receiver v0.94.1 go.opentelemetry.io/collector v0.96.0 -)`) +)` + modulePrefix = "go.opentelemetry.io/collector" +) + +var ( + replaceModules = []string{ + "", + "/component", + "/config/configauth", + "/config/configcompression", + "/config/configgrpc", + "/config/confighttp", + "/config/confignet", + "/config/configopaque", + "/config/configretry", + "/config/configtelemetry", + "/config/configtls", + "/config/internal", + "/confmap", + "/confmap/converter/expandconverter", + "/confmap/provider/envprovider", + "/confmap/provider/fileprovider", + "/confmap/provider/httpprovider", + "/confmap/provider/httpsprovider", + "/confmap/provider/yamlprovider", + "/consumer", + "/connector", + "/exporter", + "/exporter/debugexporter", + "/exporter/nopexporter", + "/exporter/otlpexporter", + "/exporter/otlphttpexporter", + "/extension", + "/extension/auth", + "/extension/zpagesextension", + "/featuregate", + "/processor", + "/processor/batchprocessor", + "/processor/memorylimiterprocessor", + "/receiver", + "/receiver/nopreceiver", + "/receiver/otlpreceiver", + "/otelcol", + "/pdata", + "/pdata/testdata", + "/semconv", + "/service", + } ) func newTestConfig() Config { @@ -96,7 +146,7 @@ func TestVersioning(t *testing.T) { cfgBuilder: func() Config { cfg := newTestConfig() tempDir := t.TempDir() - err := makeModule(tempDir, goModTestFile) + err := makeModule(tempDir, []byte(goModTestFile)) require.NoError(t, err) cfg.Distribution.OutputPath = tempDir cfg.SkipGenerate = true @@ -279,6 +329,117 @@ func TestGenerateAndCompile(t *testing.T) { } } +// Test that the go.mod files that other tests in this file +// may generate have all their modules covered by our +// "replace" statements created in `generateReplaces`. +// +// An incomplete set of replace statements in these tests +// may cause them to fail during the release process, when +// the local version of modules in the release branch is +// not yet available on the Go package repository. +// Unless the replace statements route all modules to the +// local copy, `go get` will try to fetch the unreleased +// version remotely and some tests will fail. +func TestReplaceStatementsAreComplete(t *testing.T) { + workspaceDir := getWorkspaceDir() + replaceMods := map[string]bool{} + + for _, suffix := range replaceModules { + replaceMods[modulePrefix+suffix] = false + } + + for _, mod := range replaceModules { + verifyGoMod(t, workspaceDir+mod, replaceMods) + } + + var err error + dir := t.TempDir() + cfg := NewDefaultConfig() + cfg.Distribution.Go = "go" + cfg.Distribution.OutputPath = dir + // Use a deliberately nonexistent version to simulate an unreleased + // version of the package. Not strictly necessary since this test + // will catch gaps in the replace statements before a release is in + // progress. + cfg.Distribution.OtelColVersion = "1.9999.9999" + cfg.Replaces = append(cfg.Replaces, generateReplaces()...) + // Configure all components that we want to use elsewhere in these tests. + // This ensures the resulting go.mod file has maximum coverage of modules + // that exist in the Core repository. + cfg.Exporters, err = parseModules([]Module{ + { + GoMod: "go.opentelemetry.io/collector/exporter/debugexporter v1.9999.9999", + }, + { + GoMod: "go.opentelemetry.io/collector/exporter/nopexporter v1.9999.9999", + }, + { + GoMod: "go.opentelemetry.io/collector/exporter/otlpexporter v1.9999.9999", + }, + { + GoMod: "go.opentelemetry.io/collector/exporter/otlphttpexporter v1.9999.9999", + }, + }) + require.NoError(t, err) + cfg.Receivers, err = parseModules([]Module{ + { + GoMod: "go.opentelemetry.io/collector/receiver/nopreceiver v1.9999.9999", + }, + { + GoMod: "go.opentelemetry.io/collector/receiver/otlpreceiver v1.9999.9999", + }, + }) + require.NoError(t, err) + cfg.Extensions, err = parseModules([]Module{ + { + GoMod: "go.opentelemetry.io/collector/extension/zpagesextension v1.9999.9999", + }, + }) + require.NoError(t, err) + cfg.Processors, err = parseModules([]Module{ + { + GoMod: "go.opentelemetry.io/collector/processor/batchprocessor v1.9999.9999", + }, + { + GoMod: "go.opentelemetry.io/collector/processor/memorylimiterprocessor v1.9999.9999", + }, + }) + require.NoError(t, err) + + require.NoError(t, cfg.SetBackwardsCompatibility()) + require.NoError(t, cfg.Validate()) + require.NoError(t, cfg.ParseModules()) + err = GenerateAndCompile(cfg) + require.NoError(t, err) + + verifyGoMod(t, dir, replaceMods) + + for k, v := range replaceMods { + assert.Truef(t, v, "Module not used: %s", k) + } +} + +func verifyGoMod(t *testing.T, dir string, replaceMods map[string]bool) { + gomodpath := path.Join(dir, "go.mod") + // #nosec G304 We control this path and generate the file inside, so we can assume it is safe. + gomod, err := os.ReadFile(gomodpath) + require.NoError(t, err) + + mod, err := modfile.Parse(gomodpath, gomod, nil) + require.NoError(t, err) + + for _, req := range mod.Require { + if !strings.HasPrefix(req.Mod.Path, modulePrefix) { + continue + } + + _, ok := replaceMods[req.Mod.Path] + assert.Truef(t, ok, "Module missing from replace statements list: %s", req.Mod.Path) + + replaceMods[req.Mod.Path] = true + } +} + func makeModule(dir string, fileContents []byte) error { // if the file does not exist, try to create it if _, err := os.Stat(dir); os.IsNotExist(err) { @@ -297,51 +458,20 @@ func makeModule(dir string, fileContents []byte) error { } func generateReplaces() []string { - // This test is dependent on the current file structure. + workspaceDir := getWorkspaceDir() + modules := replaceModules + replaces := make([]string, len(modules)) + + for i, mod := range modules { + replaces[i] = fmt.Sprintf("%s%s => %s%s", modulePrefix, mod, workspaceDir, mod) + } + + return replaces +} + +func getWorkspaceDir() string { + // This is dependent on the current file structure. // The goal is find the root of the repo so we can replace the root module. _, thisFile, _, _ := runtime.Caller(0) - workspaceDir := filepath.Dir(filepath.Dir(filepath.Dir(filepath.Dir(filepath.Dir(thisFile))))) - return []string{fmt.Sprintf("go.opentelemetry.io/collector => %s", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/component => %s/component", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/config/configauth => %s/config/configauth", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/config/configcompression => %s/config/configcompression", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/config/configgrpc => %s/config/configgrpc", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/config/confignet => %s/config/confignet", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/config/configopaque => %s/config/configopaque", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/config/configretry => %s/config/configretry", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/config/configtelemetry => %s/config/configtelemetry", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/config/configtls => %s/config/configtls", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/config/internal => %s/config/internal", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/confmap => %s/confmap", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/confmap/converter/expandconverter => %s/confmap/converter/expandconverter", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/confmap/provider/envprovider => %s/confmap/provider/envprovider", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/confmap/provider/fileprovider => %s/confmap/provider/fileprovider", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/confmap/provider/httpprovider => %s/confmap/provider/httpprovider", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/confmap/provider/httpsprovider => %s/confmap/provider/httpsprovider", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/confmap/provider/yamlprovider => %s/confmap/provider/yamlprovider", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/consumer => %s/consumer", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/connector => %s/connector", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/exporter => %s/exporter", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/exporter/debugexporter => %s/exporter/debugexporter", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/exporter/loggingexporter => %s/exporter/loggingexporter", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/exporter/nopexporter => %s/exporter/nopexporter", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/exporter/otlpexporter => %s/exporter/otlpexporter", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/exporter/otlphttpexporter => %s/exporter/otlphttpexporter", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/extension => %s/extension", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/extension/auth => %s/extension/auth", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/extension/ballastextension => %s/extension/ballastextension", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/extension/zpagesextension => %s/extension/zpagesextension", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/featuregate => %s/featuregate", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/processor => %s/processor", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/processor/batchprocessor => %s/processor/batchprocessor", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/processor/memorylimiterprocessor => %s/processor/memorylimiterprocessor", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/receiver => %s/receiver", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/receiver/nopreceiver => %s/receiver/nopreceiver", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/receiver/otlpreceiver => %s/receiver/otlpreceiver", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/otelcol => %s/otelcol", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/pdata => %s/pdata", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/pdata/testdata => %s/pdata/testdata", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/semconv => %s/semconv", workspaceDir), - fmt.Sprintf("go.opentelemetry.io/collector/service => %s/service", workspaceDir), - } + return filepath.Dir(filepath.Dir(filepath.Dir(filepath.Dir(filepath.Dir(thisFile))))) } diff --git a/cmd/builder/internal/config/default.yaml b/cmd/builder/internal/config/default.yaml index ac86def33ff..f4e1f908b94 100644 --- a/cmd/builder/internal/config/default.yaml +++ b/cmd/builder/internal/config/default.yaml @@ -2,32 +2,32 @@ dist: module: go.opentelemetry.io/collector/cmd/otelcorecol name: otelcorecol description: Local OpenTelemetry Collector binary, testing only. - version: 0.100.0-dev - otelcol_version: 0.100.0 + version: 0.102.1-dev + otelcol_version: 0.102.1 receivers: - - gomod: go.opentelemetry.io/collector/receiver/nopreceiver v0.100.0 - - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.100.0 + - gomod: go.opentelemetry.io/collector/receiver/nopreceiver v0.102.1 + - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.102.1 exporters: - - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.100.0 - - gomod: go.opentelemetry.io/collector/exporter/loggingexporter v0.100.0 - - gomod: go.opentelemetry.io/collector/exporter/nopexporter v0.100.0 - - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.100.0 - - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.100.0 + - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.102.1 + - gomod: go.opentelemetry.io/collector/exporter/loggingexporter v0.102.1 + - gomod: go.opentelemetry.io/collector/exporter/nopexporter v0.102.1 + - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.102.1 + - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.102.1 extensions: - - gomod: go.opentelemetry.io/collector/extension/ballastextension v0.100.0 - - gomod: go.opentelemetry.io/collector/extension/memorylimiterextension v0.100.0 - - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.100.0 + - gomod: go.opentelemetry.io/collector/extension/ballastextension v0.102.1 + - gomod: go.opentelemetry.io/collector/extension/memorylimiterextension v0.102.1 + - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.102.1 processors: - - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.100.0 - - gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.100.0 + - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.102.1 + - gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.102.1 connectors: - - gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.100.0 + - gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.102.1 providers: - - gomod: go.opentelemetry.io/collector/confmap/provider/envprovider v0.100.0 - - gomod: go.opentelemetry.io/collector/confmap/provider/fileprovider v0.100.0 - - gomod: go.opentelemetry.io/collector/confmap/provider/httpprovider v0.100.0 - - gomod: go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.100.0 - - gomod: go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.100.0 + - gomod: go.opentelemetry.io/collector/confmap/provider/envprovider v0.102.1 + - gomod: go.opentelemetry.io/collector/confmap/provider/fileprovider v0.102.1 + - gomod: go.opentelemetry.io/collector/confmap/provider/httpprovider v0.102.1 + - gomod: go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.102.1 + - gomod: go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.102.1 diff --git a/cmd/builder/test/core.builder.yaml b/cmd/builder/test/core.builder.yaml index 7baedadd974..e4abafd2800 100644 --- a/cmd/builder/test/core.builder.yaml +++ b/cmd/builder/test/core.builder.yaml @@ -1,20 +1,20 @@ dist: module: go.opentelemetry.io/collector/builder/test/core - otelcol_version: 0.100.0 + otelcol_version: 0.102.1 extensions: - import: go.opentelemetry.io/collector/extension/zpagesextension - gomod: go.opentelemetry.io/collector v0.100.0 + gomod: go.opentelemetry.io/collector v0.102.1 path: ${WORKSPACE_DIR} receivers: - import: go.opentelemetry.io/collector/receiver/otlpreceiver - gomod: go.opentelemetry.io/collector v0.100.0 + gomod: go.opentelemetry.io/collector v0.102.1 path: ${WORKSPACE_DIR} exporters: - import: go.opentelemetry.io/collector/exporter/debugexporter - gomod: go.opentelemetry.io/collector v0.100.0 + gomod: go.opentelemetry.io/collector v0.102.1 path: ${WORKSPACE_DIR} replaces: diff --git a/cmd/mdatagen/README.md b/cmd/mdatagen/README.md index b2affa6c780..ccdbf40f737 100644 --- a/cmd/mdatagen/README.md +++ b/cmd/mdatagen/README.md @@ -11,7 +11,7 @@ Examples of this metadata about a component are: The metadata generator defines a schema for specifying this information to ensure it is complete and well-formed. The metadata generator is then able to ingest the metadata, validate it against the schema and produce documentation in a standardized format. -An example of how this generated documentation looks can be found in [documentation.md](./documentation.md). +An example of how this generated documentation looks can be found in [documentation.md](https://github.com/open-telemetry/opentelemetry-collector/blob/main/cmd/mdatagen/internal/samplereceiver/documentation.md). ## Using the Metadata Generator @@ -52,5 +52,5 @@ When making updates to the metadata generator or introducing support for new fun 1. Ensure the [metadata-schema.yaml](./metadata-schema.yaml) and [./metadata.yaml](metadata.yaml) files reflect the changes. 2. Run `make mdatagen-test`. -3. Make sure all tests are passing including [generated tests](./internal/metadata/generated_metrics_test.go). +3. Make sure all tests are passing including [generated tests](./internal/samplereceiver/internal/metadata/generated_metrics_test.go). 4. Run `make generate`. diff --git a/cmd/mdatagen/embeded_templates_test.go b/cmd/mdatagen/embeded_templates_test.go index 3bba543b139..40562297e30 100644 --- a/cmd/mdatagen/embeded_templates_test.go +++ b/cmd/mdatagen/embeded_templates_test.go @@ -20,20 +20,21 @@ func TestEnsureTemplatesLoaded(t *testing.T) { var ( templateFiles = map[string]struct{}{ - path.Join(rootDir, "component_test.go.tmpl"): {}, - path.Join(rootDir, "documentation.md.tmpl"): {}, - path.Join(rootDir, "metrics.go.tmpl"): {}, - path.Join(rootDir, "metrics_test.go.tmpl"): {}, - path.Join(rootDir, "resource.go.tmpl"): {}, - path.Join(rootDir, "resource_test.go.tmpl"): {}, - path.Join(rootDir, "config.go.tmpl"): {}, - path.Join(rootDir, "config_test.go.tmpl"): {}, - path.Join(rootDir, "package_test.go.tmpl"): {}, - path.Join(rootDir, "readme.md.tmpl"): {}, - path.Join(rootDir, "status.go.tmpl"): {}, - path.Join(rootDir, "telemetry.go.tmpl"): {}, - path.Join(rootDir, "telemetry_test.go.tmpl"): {}, - path.Join(rootDir, "testdata", "config.yaml.tmpl"): {}, + path.Join(rootDir, "component_test.go.tmpl"): {}, + path.Join(rootDir, "component_telemetry_test.go.tmpl"): {}, + path.Join(rootDir, "documentation.md.tmpl"): {}, + path.Join(rootDir, "metrics.go.tmpl"): {}, + path.Join(rootDir, "metrics_test.go.tmpl"): {}, + path.Join(rootDir, "resource.go.tmpl"): {}, + path.Join(rootDir, "resource_test.go.tmpl"): {}, + path.Join(rootDir, "config.go.tmpl"): {}, + path.Join(rootDir, "config_test.go.tmpl"): {}, + path.Join(rootDir, "package_test.go.tmpl"): {}, + path.Join(rootDir, "readme.md.tmpl"): {}, + path.Join(rootDir, "status.go.tmpl"): {}, + path.Join(rootDir, "telemetry.go.tmpl"): {}, + path.Join(rootDir, "telemetry_test.go.tmpl"): {}, + path.Join(rootDir, "testdata", "config.yaml.tmpl"): {}, } count = 0 ) diff --git a/cmd/mdatagen/package_test.go b/cmd/mdatagen/generated_package_test.go similarity index 60% rename from cmd/mdatagen/package_test.go rename to cmd/mdatagen/generated_package_test.go index 5cd502ca564..2a21d3c7c86 100644 --- a/cmd/mdatagen/package_test.go +++ b/cmd/mdatagen/generated_package_test.go @@ -1,5 +1,4 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 +// Code generated by mdatagen. DO NOT EDIT. package main diff --git a/cmd/mdatagen/go.mod b/cmd/mdatagen/go.mod index 8512c0f3a0d..a4193aedcc9 100644 --- a/cmd/mdatagen/go.mod +++ b/cmd/mdatagen/go.mod @@ -1,28 +1,31 @@ module go.opentelemetry.io/collector/cmd/mdatagen -go 1.21 +go 1.21.0 require ( github.com/google/go-cmp v0.6.0 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.100.0 - go.opentelemetry.io/collector/confmap v0.100.0 - go.opentelemetry.io/collector/confmap/provider/fileprovider v0.100.0 - go.opentelemetry.io/collector/consumer v0.100.0 - go.opentelemetry.io/collector/filter v0.100.0 - go.opentelemetry.io/collector/pdata v1.7.0 - go.opentelemetry.io/collector/receiver v0.100.0 - go.opentelemetry.io/collector/semconv v0.100.0 - go.opentelemetry.io/otel/metric v1.26.0 - go.opentelemetry.io/otel/trace v1.26.0 + go.opentelemetry.io/collector/component v0.102.1 + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 + go.opentelemetry.io/collector/confmap v0.102.1 + go.opentelemetry.io/collector/confmap/provider/fileprovider v0.102.1 + go.opentelemetry.io/collector/consumer v0.102.1 + go.opentelemetry.io/collector/filter v0.102.1 + go.opentelemetry.io/collector/pdata v1.9.0 + go.opentelemetry.io/collector/receiver v0.102.1 + go.opentelemetry.io/collector/semconv v0.102.1 + go.opentelemetry.io/otel v1.27.0 + go.opentelemetry.io/otel/metric v1.27.0 + go.opentelemetry.io/otel/sdk/metric v1.27.0 + go.opentelemetry.io/otel/trace v1.27.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - golang.org/x/text v0.14.0 + golang.org/x/text v0.15.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -38,21 +41,18 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.53.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect - go.opentelemetry.io/otel v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect - go.opentelemetry.io/otel/sdk v1.26.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.34.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/cmd/mdatagen/go.sum b/cmd/mdatagen/go.sum index 4394e616fe3..c2df9c2579c 100644 --- a/cmd/mdatagen/go.sum +++ b/cmd/mdatagen/go.sum @@ -1,7 +1,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -44,14 +44,14 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -60,18 +60,18 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -87,20 +87,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -109,12 +109,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/cmd/mdatagen/internal/samplereceiver/documentation.md b/cmd/mdatagen/internal/samplereceiver/documentation.md index 60a79a7941a..bfd994dd1b5 100644 --- a/cmd/mdatagen/internal/samplereceiver/documentation.md +++ b/cmd/mdatagen/internal/samplereceiver/documentation.md @@ -112,3 +112,31 @@ metrics: | string.resource.attr_disable_warning | Resource attribute with any string value. | Any Str | true | | string.resource.attr_remove_warning | Resource attribute with any string value. | Any Str | false | | string.resource.attr_to_be_removed | Resource attribute with any string value. | Any Str | true | + +## Internal Telemetry + +The following telemetry is emitted by this component. + +### batch_size_trigger_send + +Number of times the batch was sent due to a size trigger + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | + +### process_runtime_total_alloc_bytes + +Cumulative bytes allocated for heap objects (see 'go doc runtime.MemStats.TotalAlloc') + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| By | Sum | Int | true | + +### request_duration + +Duration of request + +| Unit | Metric Type | Value Type | +| ---- | ----------- | ---------- | +| s | Histogram | Double | diff --git a/cmd/mdatagen/internal/samplereceiver/factory.go b/cmd/mdatagen/internal/samplereceiver/factory.go index 89769521f74..565305d540c 100644 --- a/cmd/mdatagen/internal/samplereceiver/factory.go +++ b/cmd/mdatagen/internal/samplereceiver/factory.go @@ -26,7 +26,12 @@ func createTraces(context.Context, receiver.CreateSettings, component.Config, co return nopInstance, nil } -func createMetrics(context.Context, receiver.CreateSettings, component.Config, consumer.Metrics) (receiver.Metrics, error) { +func createMetrics(ctx context.Context, set receiver.CreateSettings, _ component.Config, _ consumer.Metrics) (receiver.Metrics, error) { + telemetryBuilder, err := metadata.NewTelemetryBuilder(set.TelemetrySettings, metadata.WithProcessRuntimeTotalAllocBytesCallback(func() int64 { return 2 })) + if err != nil { + return nil, err + } + telemetryBuilder.BatchSizeTriggerSend.Add(ctx, 1) return nopInstance, nil } diff --git a/cmd/mdatagen/internal/samplereceiver/generated_component_telemetry_test.go b/cmd/mdatagen/internal/samplereceiver/generated_component_telemetry_test.go new file mode 100644 index 00000000000..e8cf2fe05e9 --- /dev/null +++ b/cmd/mdatagen/internal/samplereceiver/generated_component_telemetry_test.go @@ -0,0 +1,76 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package samplereceiver + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/receiver" + "go.opentelemetry.io/collector/receiver/receivertest" +) + +type componentTestTelemetry struct { + reader *sdkmetric.ManualReader + meterProvider *sdkmetric.MeterProvider +} + +func (tt *componentTestTelemetry) NewCreateSettings() receiver.CreateSettings { + settings := receivertest.NewNopCreateSettings() + settings.MeterProvider = tt.meterProvider + settings.ID = component.NewID(component.MustNewType("sample")) + + return settings +} + +func setupTestTelemetry() componentTestTelemetry { + reader := sdkmetric.NewManualReader() + return componentTestTelemetry{ + reader: reader, + meterProvider: sdkmetric.NewMeterProvider(sdkmetric.WithReader(reader)), + } +} + +func (tt *componentTestTelemetry) assertMetrics(t *testing.T, expected []metricdata.Metrics) { + var md metricdata.ResourceMetrics + require.NoError(t, tt.reader.Collect(context.Background(), &md)) + // ensure all required metrics are present + for _, want := range expected { + got := tt.getMetric(want.Name, md) + metricdatatest.AssertEqual(t, want, got, metricdatatest.IgnoreTimestamp()) + } + + // ensure no additional metrics are emitted + require.Equal(t, len(expected), tt.len(md)) +} + +func (tt *componentTestTelemetry) getMetric(name string, got metricdata.ResourceMetrics) metricdata.Metrics { + for _, sm := range got.ScopeMetrics { + for _, m := range sm.Metrics { + if m.Name == name { + return m + } + } + } + + return metricdata.Metrics{} +} + +func (tt *componentTestTelemetry) len(got metricdata.ResourceMetrics) int { + metricsCount := 0 + for _, sm := range got.ScopeMetrics { + metricsCount += len(sm.Metrics) + } + + return metricsCount +} + +func (tt *componentTestTelemetry) Shutdown(ctx context.Context) error { + return tt.meterProvider.Shutdown(ctx) +} diff --git a/cmd/mdatagen/internal/samplereceiver/generated_component_test.go b/cmd/mdatagen/internal/samplereceiver/generated_component_test.go index af315d20a85..d20ac9b6b4f 100644 --- a/cmd/mdatagen/internal/samplereceiver/generated_component_test.go +++ b/cmd/mdatagen/internal/samplereceiver/generated_component_test.go @@ -60,7 +60,7 @@ func TestComponentLifecycle(t *testing.T) { cfg := factory.CreateDefaultConfig() sub, err := cm.Sub("tests::config") require.NoError(t, err) - require.NoError(t, component.UnmarshalConfig(sub, cfg)) + require.NoError(t, sub.Unmarshal(&cfg)) for _, test := range tests { t.Run(test.name+"-shutdown", func(t *testing.T) { diff --git a/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_config_test.go b/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_config_test.go index 0f581b137f7..8bd3d648dc9 100644 --- a/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_config_test.go +++ b/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_config_test.go @@ -10,7 +10,6 @@ import ( "github.com/google/go-cmp/cmp/cmpopts" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/confmap/confmaptest" ) @@ -84,7 +83,7 @@ func loadMetricsBuilderConfig(t *testing.T, name string) MetricsBuilderConfig { sub, err := cm.Sub(name) require.NoError(t, err) cfg := DefaultMetricsBuilderConfig() - require.NoError(t, component.UnmarshalConfig(sub, &cfg)) + require.NoError(t, sub.Unmarshal(&cfg)) return cfg } @@ -142,6 +141,6 @@ func loadResourceAttributesConfig(t *testing.T, name string) ResourceAttributesC sub, err = sub.Sub("resource_attributes") require.NoError(t, err) cfg := DefaultResourceAttributesConfig() - require.NoError(t, component.UnmarshalConfig(sub, &cfg)) + require.NoError(t, sub.Unmarshal(&cfg)) return cfg } diff --git a/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_telemetry.go b/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_telemetry.go index 2e9683259cd..e6530a97a9a 100644 --- a/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_telemetry.go +++ b/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_telemetry.go @@ -3,10 +3,16 @@ package metadata import ( + "context" + "errors" + + "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" ) func Meter(settings component.TelemetrySettings) metric.Meter { @@ -16,3 +22,79 @@ func Meter(settings component.TelemetrySettings) metric.Meter { func Tracer(settings component.TelemetrySettings) trace.Tracer { return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/internal/receiver/samplereceiver") } + +// TelemetryBuilder provides an interface for components to report telemetry +// as defined in metadata and user config. +type TelemetryBuilder struct { + BatchSizeTriggerSend metric.Int64Counter + ProcessRuntimeTotalAllocBytes metric.Int64ObservableCounter + observeProcessRuntimeTotalAllocBytes func() int64 + RequestDuration metric.Float64Histogram + level configtelemetry.Level + attributeSet attribute.Set +} + +// telemetryBuilderOption applies changes to default builder. +type telemetryBuilderOption func(*TelemetryBuilder) + +// WithLevel sets the current telemetry level for the component. +func WithLevel(lvl configtelemetry.Level) telemetryBuilderOption { + return func(builder *TelemetryBuilder) { + builder.level = lvl + } +} + +// WithAttributeSet applies a set of attributes for asynchronous instruments. +func WithAttributeSet(set attribute.Set) telemetryBuilderOption { + return func(builder *TelemetryBuilder) { + builder.attributeSet = set + } +} + +// WithProcessRuntimeTotalAllocBytesCallback sets callback for observable ProcessRuntimeTotalAllocBytes metric. +func WithProcessRuntimeTotalAllocBytesCallback(cb func() int64) telemetryBuilderOption { + return func(builder *TelemetryBuilder) { + builder.observeProcessRuntimeTotalAllocBytes = cb + } +} + +// NewTelemetryBuilder provides a struct with methods to update all internal telemetry +// for a component +func NewTelemetryBuilder(settings component.TelemetrySettings, options ...telemetryBuilderOption) (*TelemetryBuilder, error) { + builder := TelemetryBuilder{level: configtelemetry.LevelBasic} + for _, op := range options { + op(&builder) + } + var ( + err, errs error + meter metric.Meter + ) + if builder.level >= configtelemetry.LevelBasic { + meter = Meter(settings) + } else { + meter = noop.Meter{} + } + builder.BatchSizeTriggerSend, err = meter.Int64Counter( + "batch_size_trigger_send", + metric.WithDescription("Number of times the batch was sent due to a size trigger"), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + builder.ProcessRuntimeTotalAllocBytes, err = meter.Int64ObservableCounter( + "process_runtime_total_alloc_bytes", + metric.WithDescription("Cumulative bytes allocated for heap objects (see 'go doc runtime.MemStats.TotalAlloc')"), + metric.WithUnit("By"), + metric.WithInt64Callback(func(_ context.Context, o metric.Int64Observer) error { + o.Observe(builder.observeProcessRuntimeTotalAllocBytes(), metric.WithAttributeSet(builder.attributeSet)) + return nil + }), + ) + errs = errors.Join(errs, err) + builder.RequestDuration, err = meter.Float64Histogram( + "request_duration", + metric.WithDescription("Duration of request"), + metric.WithUnit("s"), metric.WithExplicitBucketBoundaries([]float64{1, 10, 100}...), + ) + errs = errors.Join(errs, err) + return &builder, errs +} diff --git a/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_telemetry_test.go b/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_telemetry_test.go index cfdc5ab89e3..da03a267c62 100644 --- a/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_telemetry_test.go +++ b/cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_telemetry_test.go @@ -61,3 +61,16 @@ func TestProviders(t *testing.T) { require.Fail(t, "returned Meter not mockTracer") } } + +func TestNewTelemetryBuilder(t *testing.T) { + set := component.TelemetrySettings{ + MeterProvider: mockMeterProvider{}, + TracerProvider: mockTracerProvider{}, + } + applied := false + _, err := NewTelemetryBuilder(set, func(b *TelemetryBuilder) { + applied = true + }) + require.NoError(t, err) + require.True(t, applied) +} diff --git a/cmd/mdatagen/internal/samplereceiver/metadata.yaml b/cmd/mdatagen/internal/samplereceiver/metadata.yaml index 06d544b18af..03955d62c0a 100644 --- a/cmd/mdatagen/internal/samplereceiver/metadata.yaml +++ b/cmd/mdatagen/internal/samplereceiver/metadata.yaml @@ -149,3 +149,28 @@ metrics: monotonic: true aggregation_temporality: cumulative attributes: [ string_attr, overridden_int_attr, enum_attr, slice_attr, map_attr ] + +telemetry: + metrics: + batch_size_trigger_send: + enabled: true + description: Number of times the batch was sent due to a size trigger + unit: 1 + sum: + value_type: int + monotonic: true + request_duration: + enabled: true + description: Duration of request + unit: s + histogram: + value_type: double + bucket_boundaries: [1, 10, 100] + process_runtime_total_alloc_bytes: + enabled: true + description: Cumulative bytes allocated for heap objects (see 'go doc runtime.MemStats.TotalAlloc') + unit: By + sum: + async: true + value_type: int + monotonic: true diff --git a/cmd/mdatagen/internal/samplereceiver/metrics_test.go b/cmd/mdatagen/internal/samplereceiver/metrics_test.go index ec5f67cf0db..2c3dd5675a5 100644 --- a/cmd/mdatagen/internal/samplereceiver/metrics_test.go +++ b/cmd/mdatagen/internal/samplereceiver/metrics_test.go @@ -4,11 +4,15 @@ package samplereceiver import ( + "context" "testing" "github.com/stretchr/testify/require" + "go.opentelemetry.io/otel/sdk/metric/metricdata" "go.opentelemetry.io/collector/cmd/mdatagen/internal/samplereceiver/internal/metadata" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/receiver/receivertest" ) @@ -18,3 +22,41 @@ func TestGeneratedMetrics(t *testing.T) { m := mb.Emit() require.Equal(t, 0, m.ResourceMetrics().Len()) } + +func TestComponentTelemetry(t *testing.T) { + tt := setupTestTelemetry() + factory := NewFactory() + _, err := factory.CreateMetricsReceiver(context.Background(), tt.NewCreateSettings(), componenttest.NewNopHost(), new(consumertest.MetricsSink)) + require.NoError(t, err) + tt.assertMetrics(t, []metricdata.Metrics{ + { + Name: "batch_size_trigger_send", + Description: "Number of times the batch was sent due to a size trigger", + Unit: "1", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: true, + DataPoints: []metricdata.DataPoint[int64]{ + { + Value: 1, + }, + }, + }, + }, + { + Name: "process_runtime_total_alloc_bytes", + Description: "Cumulative bytes allocated for heap objects (see 'go doc runtime.MemStats.TotalAlloc')", + Unit: "By", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: true, + DataPoints: []metricdata.DataPoint[int64]{ + { + Value: 2, + }, + }, + }, + }, + }) + require.NoError(t, tt.Shutdown(context.Background())) +} diff --git a/cmd/mdatagen/loader.go b/cmd/mdatagen/loader.go index 20b20d0dc19..a2f1de68419 100644 --- a/cmd/mdatagen/loader.go +++ b/cmd/mdatagen/loader.go @@ -11,6 +11,7 @@ import ( "path/filepath" "strings" + "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/confmap/provider/fileprovider" @@ -117,6 +118,8 @@ type metric struct { Sum *sum `mapstructure:"sum,omitempty"` // Gauge stores metadata for gauge metric type Gauge *gauge `mapstructure:"gauge,omitempty"` + // Gauge stores metadata for gauge metric type + Histogram *histogram `mapstructure:"histogram,omitempty"` // Attributes is the list of attributes that the metric emits. Attributes []attributeName `mapstructure:"attributes"` @@ -135,6 +138,9 @@ func (m metric) Data() MetricData { if m.Gauge != nil { return m.Gauge } + if m.Histogram != nil { + return m.Histogram + } return nil } @@ -221,6 +227,11 @@ type tests struct { ExpectConsumerError bool `mapstructure:"expect_consumer_error"` } +type telemetry struct { + Level configtelemetry.Level `mapstructure:"level"` + Metrics map[metricName]metric `mapstructure:"metrics"` +} + type metadata struct { // Type of the component. Type string `mapstructure:"type"` @@ -228,6 +239,8 @@ type metadata struct { Parent string `mapstructure:"parent"` // Status information for the component. Status *Status `mapstructure:"status"` + // Telemetry information for the component. + Telemetry telemetry `mapstructure:"telemetry"` // SemConvVersion is a version number of OpenTelemetry semantic conventions applied to the scraped metrics. SemConvVersion string `mapstructure:"sem_conv_version"` // ResourceAttributes that can be emitted by the component. diff --git a/cmd/mdatagen/loader_test.go b/cmd/mdatagen/loader_test.go index cf3d59e07ce..bdd8ffeeb37 100644 --- a/cmd/mdatagen/loader_test.go +++ b/cmd/mdatagen/loader_test.go @@ -231,6 +231,40 @@ func TestLoadMetadata(t *testing.T) { Attributes: []attributeName{"string_attr", "overridden_int_attr", "enum_attr", "slice_attr", "map_attr"}, }, }, + Telemetry: telemetry{ + Metrics: map[metricName]metric{ + "batch_size_trigger_send": { + Enabled: true, + Description: "Number of times the batch was sent due to a size trigger", + Unit: strPtr("1"), + Sum: &sum{ + MetricValueType: MetricValueType{pmetric.NumberDataPointValueTypeInt}, + Mono: Mono{Monotonic: true}, + }, + }, + "request_duration": { + Enabled: true, + Description: "Duration of request", + Unit: strPtr("s"), + Histogram: &histogram{ + MetricValueType: MetricValueType{pmetric.NumberDataPointValueTypeDouble}, + Boundaries: []float64{1, 10, 100}, + }, + }, + "process_runtime_total_alloc_bytes": { + Enabled: true, + Description: "Cumulative bytes allocated for heap objects (see 'go doc runtime.MemStats.TotalAlloc')", + Unit: strPtr("By"), + Sum: &sum{ + Mono: Mono{true}, + MetricValueType: MetricValueType{ + ValueType: pmetric.NumberDataPointValueTypeInt, + }, + Async: true, + }, + }, + }, + }, ScopeName: "go.opentelemetry.io/collector/internal/receiver/samplereceiver", ShortFolderName: "sample", }, @@ -264,11 +298,6 @@ func TestLoadMetadata(t *testing.T) { name: "testdata/unknown_value_type.yaml", wantErr: "1 error(s) decoding:\n\n* error decoding 'metrics[system.cpu.time]': 1 error(s) decoding:\n\n* error decoding 'sum': 1 error(s) decoding:\n\n* error decoding 'value_type': invalid value_type: \"unknown\"", }, - { - name: "testdata/no_aggregation.yaml", - want: metadata{}, - wantErr: "1 error(s) decoding:\n\n* error decoding 'metrics[default.metric]': 1 error(s) decoding:\n\n* error decoding 'sum': missing required field: `aggregation_temporality`", - }, { name: "testdata/invalid_aggregation.yaml", want: metadata{}, diff --git a/cmd/mdatagen/main.go b/cmd/mdatagen/main.go index 8d7d1731faa..304e12241cd 100644 --- a/cmd/mdatagen/main.go +++ b/cmd/mdatagen/main.go @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +//go:generate mdatagen metadata.yaml + package main import ( @@ -57,27 +59,20 @@ func run(ymlPath string) error { return fmt.Errorf("unable to create output directory %q: %w", codeDir, err) } if md.Status != nil { - if md.Status.Class != "cmd" && md.Status.Class != "pkg" { + if md.Status.Class != "cmd" && md.Status.Class != "pkg" && !md.Status.NotComponent { if err = generateFile(filepath.Join(tmplDir, "status.go.tmpl"), filepath.Join(codeDir, "generated_status.go"), md, "metadata"); err != nil { return err } - if err = generateFile(filepath.Join(tmplDir, "telemetry.go.tmpl"), - filepath.Join(codeDir, "generated_telemetry.go"), md, "metadata"); err != nil { - return err - } - if err = generateFile(filepath.Join(tmplDir, "telemetry_test.go.tmpl"), - filepath.Join(codeDir, "generated_telemetry_test.go"), md, "metadata"); err != nil { - return err - } if err = generateFile(filepath.Join(tmplDir, "component_test.go.tmpl"), filepath.Join(ymlDir, "generated_component_test.go"), md, packageName); err != nil { return err } - if err = generateFile(filepath.Join(tmplDir, "package_test.go.tmpl"), - filepath.Join(ymlDir, "generated_package_test.go"), md, packageName); err != nil { - return err - } + } + + if err = generateFile(filepath.Join(tmplDir, "package_test.go.tmpl"), + filepath.Join(ymlDir, "generated_package_test.go"), md, packageName); err != nil { + return err } if _, err = os.Stat(filepath.Join(ymlDir, "README.md")); err == nil { @@ -90,6 +85,27 @@ func run(ymlPath string) error { } } + toGenerate := map[string]string{} + + if len(md.Telemetry.Metrics) != 0 { // if there are telemetry metrics, generate telemetry specific files + if err = generateFile(filepath.Join(tmplDir, "component_telemetry_test.go.tmpl"), + filepath.Join(ymlDir, "generated_component_telemetry_test.go"), md, packageName); err != nil { + return err + } + toGenerate[filepath.Join(tmplDir, "telemetry.go.tmpl")] = filepath.Join(codeDir, "generated_telemetry.go") + toGenerate[filepath.Join(tmplDir, "telemetry_test.go.tmpl")] = filepath.Join(codeDir, "generated_telemetry_test.go") + } + + if len(md.Metrics) != 0 || len(md.Telemetry.Metrics) != 0 { // if there's metrics or internal metrics, generate documentation for them + toGenerate[filepath.Join(tmplDir, "documentation.md.tmpl")] = filepath.Join(ymlDir, "documentation.md") + } + + for tmpl, dst := range toGenerate { + if err = generateFile(tmpl, dst, md, "metadata"); err != nil { + return err + } + } + if len(md.Metrics) == 0 && len(md.ResourceAttributes) == 0 { return nil } @@ -97,45 +113,30 @@ func run(ymlPath string) error { if err = os.MkdirAll(filepath.Join(codeDir, "testdata"), 0700); err != nil { return fmt.Errorf("unable to create output directory %q: %w", filepath.Join(codeDir, "testdata"), err) } - if err = generateFile(filepath.Join(tmplDir, "testdata", "config.yaml.tmpl"), - filepath.Join(codeDir, "testdata", "config.yaml"), md, "metadata"); err != nil { - return err - } - if err = generateFile(filepath.Join(tmplDir, "config.go.tmpl"), - filepath.Join(codeDir, "generated_config.go"), md, "metadata"); err != nil { - return err - } - if err = generateFile(filepath.Join(tmplDir, "config_test.go.tmpl"), - filepath.Join(codeDir, "generated_config_test.go"), md, "metadata"); err != nil { - return err + toGenerate = map[string]string{ + filepath.Join(tmplDir, "testdata", "config.yaml.tmpl"): filepath.Join(codeDir, "testdata", "config.yaml"), + filepath.Join(tmplDir, "config.go.tmpl"): filepath.Join(codeDir, "generated_config.go"), + filepath.Join(tmplDir, "config_test.go.tmpl"): filepath.Join(codeDir, "generated_config_test.go"), } - if len(md.ResourceAttributes) > 0 { - if err = generateFile(filepath.Join(tmplDir, "resource.go.tmpl"), - filepath.Join(codeDir, "generated_resource.go"), md, "metadata"); err != nil { - return err - } - if err = generateFile(filepath.Join(tmplDir, "resource_test.go.tmpl"), - filepath.Join(codeDir, "generated_resource_test.go"), md, "metadata"); err != nil { - return err - } + if len(md.ResourceAttributes) > 0 { // only generate resource files if resource attributes are configured + toGenerate[filepath.Join(tmplDir, "resource.go.tmpl")] = filepath.Join(codeDir, "generated_resource.go") + toGenerate[filepath.Join(tmplDir, "resource_test.go.tmpl")] = filepath.Join(codeDir, "generated_resource_test.go") } - if len(md.Metrics) == 0 { - return nil + if len(md.Metrics) > 0 { // only generate metrics if metrics are present + toGenerate[filepath.Join(tmplDir, "metrics.go.tmpl")] = filepath.Join(codeDir, "generated_metrics.go") + toGenerate[filepath.Join(tmplDir, "metrics_test.go.tmpl")] = filepath.Join(codeDir, "generated_metrics_test.go") } - if err = generateFile(filepath.Join(tmplDir, "metrics.go.tmpl"), - filepath.Join(codeDir, "generated_metrics.go"), md, "metadata"); err != nil { - return err - } - if err = generateFile(filepath.Join(tmplDir, "metrics_test.go.tmpl"), - filepath.Join(codeDir, "generated_metrics_test.go"), md, "metadata"); err != nil { - return err + for tmpl, dst := range toGenerate { + if err = generateFile(tmpl, dst, md, "metadata"); err != nil { + return err + } } - return generateFile(filepath.Join(tmplDir, "documentation.md.tmpl"), filepath.Join(ymlDir, "documentation.md"), md, "metadata") + return nil } func templatize(tmplFile string, md metadata) *template.Template { @@ -153,6 +154,9 @@ func templatize(tmplFile string, md metadata) *template.Template { "metricInfo": func(mn metricName) metric { return md.Metrics[mn] }, + "telemetryInfo": func(mn metricName) metric { + return md.Telemetry.Metrics[mn] + }, "parseImportsRequired": func(metrics map[metricName]metric) bool { for _, m := range metrics { if m.Data().HasMetricInputType() { @@ -185,6 +189,14 @@ func templatize(tmplFile string, md metadata) *template.Template { } return result }, + "hasAsync": func(t telemetry) bool { + for _, m := range t.Metrics { + if m.Data().IsAsync() { + return true + } + } + return false + }, "inc": func(i int) int { return i + 1 }, "distroURL": func(name string) string { return distros[name] @@ -204,6 +216,9 @@ func templatize(tmplFile string, md metadata) *template.Template { "isConnector": func() bool { return md.Status.Class == "connector" }, + "isCommand": func() bool { + return md.Status.Class == "cmd" + }, "supportsLogs": func() bool { for _, signals := range md.Status.Stability { for _, s := range signals { diff --git a/cmd/mdatagen/main_test.go b/cmd/mdatagen/main_test.go index bfd197a42fd..7136b9b8f80 100644 --- a/cmd/mdatagen/main_test.go +++ b/cmd/mdatagen/main_test.go @@ -19,15 +19,16 @@ import ( func TestRunContents(t *testing.T) { tests := []struct { - yml string - wantMetricsGenerated bool - wantConfigGenerated bool - wantStatusGenerated bool - wantGoleakIgnore bool - wantGoleakSkip bool - wantGoleakSetup bool - wantGoleakTeardown bool - wantErr bool + yml string + wantMetricsGenerated bool + wantConfigGenerated bool + wantTelemetryGenerated bool + wantStatusGenerated bool + wantGoleakIgnore bool + wantGoleakSkip bool + wantGoleakSetup bool + wantGoleakTeardown bool + wantErr bool }{ { yml: "invalid.yaml", @@ -88,6 +89,15 @@ func TestRunContents(t *testing.T) { wantStatusGenerated: true, wantGoleakTeardown: true, }, + { + yml: "with_telemetry.yaml", + wantStatusGenerated: true, + wantTelemetryGenerated: true, + }, + { + yml: "invalid_telemetry_missing_value_type_for_histogram.yaml", + wantErr: true, + }, } for _, tt := range tests { t.Run(tt.yml, func(t *testing.T) { @@ -117,7 +127,6 @@ foo } else { require.NoFileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_metrics.go")) require.NoFileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_metrics_test.go")) - require.NoFileExists(t, filepath.Join(tmpdir, "documentation.md")) } if tt.wantConfigGenerated { @@ -128,6 +137,19 @@ foo require.NoFileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_config_test.go")) } + if tt.wantTelemetryGenerated { + require.FileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_telemetry.go")) + require.FileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_telemetry_test.go")) + require.FileExists(t, filepath.Join(tmpdir, "documentation.md")) + } else { + require.NoFileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_telemetry.go")) + require.NoFileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_telemetry_test.go")) + } + + if !tt.wantMetricsGenerated && !tt.wantTelemetryGenerated { + require.NoFileExists(t, filepath.Join(tmpdir, "documentation.md")) + } + var contents []byte if tt.wantStatusGenerated { require.FileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_status.go")) @@ -516,9 +538,12 @@ func TestGenerateTelemetryMetadata(t *testing.T) { package metadata import ( - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" ) func Meter(settings component.TelemetrySettings) metric.Meter { @@ -547,9 +572,12 @@ func Tracer(settings component.TelemetrySettings) trace.Tracer { package metadata import ( - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" ) func Meter(settings component.TelemetrySettings) metric.Meter { diff --git a/cmd/mdatagen/metadata-schema.yaml b/cmd/mdatagen/metadata-schema.yaml index 1363346971e..24b5d038d00 100644 --- a/cmd/mdatagen/metadata-schema.yaml +++ b/cmd/mdatagen/metadata-schema.yaml @@ -125,3 +125,41 @@ tests: ignore: top: [string] # Optional: array of strings representing functions that should be ignore via IgnoreTopFunction any: [string] # Optional: array of strings representing functions that should be ignore via IgnoreAnyFunction + + +# Optional: map of metric names with the key being the metric name and value +# being described below. +telemetry: + # Optional: level allows components to specify the minimum telemetry level for metrics to be produced. defaults to basic if not set. + level: string + metrics: + : + # Required: whether the metric is collected by default. + enabled: bool + # Required: metric description. + description: + # Optional: extended documentation of the metric. + extended_documentation: + # Optional: warnings that will be shown to user under specified conditions. + warnings: + # A warning that will be displayed if the metric is enabled in user config. + # Should be used for deprecated default metrics that will be removed soon. + if_enabled: + # A warning that will be displayed if `enabled` field is not set explicitly in user config. + # Should be used for metrics that will be turned from default to optional or vice versa. + if_enabled_not_set: + # A warning that will be displayed if the metrics is configured by user in any way. + # Should be used for deprecated optional metrics that will be removed soon. + if_configured: + # Required: metric unit as defined by https://ucum.org/ucum.html. + unit: + # Required: metric type with its settings. + : + # Required: type of number data point values. + value_type: + # Required for sum metric: whether the metric is monotonic (no negative delta values). + monotonic: bool + # Bucket boundaries are only available to set for histogram metrics. + bucket_boundaries: [double] + # Optional: array of attributes that were defined in the attributes section that are emitted by this metric. + attributes: [string] diff --git a/cmd/mdatagen/metadata.yaml b/cmd/mdatagen/metadata.yaml index 65bb097a962..bc18609e74c 100644 --- a/cmd/mdatagen/metadata.yaml +++ b/cmd/mdatagen/metadata.yaml @@ -2,5 +2,7 @@ type: mdatagen status: class: cmd + stability: + alpha: [metrics] codeowners: active: [dmitryax] \ No newline at end of file diff --git a/cmd/mdatagen/metricdata.go b/cmd/mdatagen/metricdata.go index 5bf77985cc9..4749e03e608 100644 --- a/cmd/mdatagen/metricdata.go +++ b/cmd/mdatagen/metricdata.go @@ -7,6 +7,9 @@ import ( "errors" "fmt" + "golang.org/x/text/cases" + "golang.org/x/text/language" + "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/pdata/pmetric" ) @@ -14,6 +17,7 @@ import ( var ( _ MetricData = &gauge{} _ MetricData = &sum{} + _ MetricData = &histogram{} ) // MetricData is generic interface for all metric datatypes. @@ -22,6 +26,8 @@ type MetricData interface { HasMonotonic() bool HasAggregated() bool HasMetricInputType() bool + Instrument() string + IsAsync() bool } // AggregationTemporality defines a metric aggregation type. @@ -118,6 +124,7 @@ func (mvt MetricValueType) BasicType() string { type gauge struct { MetricValueType `mapstructure:"value_type"` MetricInputType `mapstructure:",squash"` + Async bool `mapstructure:"async,omitempty"` } // Unmarshal is a custom unmarshaler for gauge. Needed mostly to avoid MetricValueType.Unmarshal inheritance. @@ -140,18 +147,31 @@ func (d gauge) HasAggregated() bool { return false } +func (d gauge) Instrument() string { + instrumentName := cases.Title(language.English).String(d.MetricValueType.BasicType()) + + if d.Async { + instrumentName += "Observable" + } + + instrumentName += "Gauge" + return instrumentName +} + +func (d gauge) IsAsync() bool { + return d.Async +} + type sum struct { AggregationTemporality `mapstructure:"aggregation_temporality"` Mono `mapstructure:",squash"` MetricValueType `mapstructure:"value_type"` MetricInputType `mapstructure:",squash"` + Async bool `mapstructure:"async,omitempty"` } // Unmarshal is a custom unmarshaler for sum. Needed mostly to avoid MetricValueType.Unmarshal inheritance. func (d *sum) Unmarshal(parser *confmap.Conf) error { - if !parser.IsSet("aggregation_temporality") { - return errors.New("missing required field: `aggregation_temporality`") - } if err := d.MetricValueType.Unmarshal(parser); err != nil { return err } @@ -180,3 +200,58 @@ func (d sum) HasMonotonic() bool { func (d sum) HasAggregated() bool { return true } + +func (d sum) Instrument() string { + instrumentName := cases.Title(language.English).String(d.MetricValueType.BasicType()) + + if d.Async { + instrumentName += "Observable" + } + if !d.Monotonic { + instrumentName += "UpDown" + } + instrumentName += "Counter" + return instrumentName +} + +func (d sum) IsAsync() bool { + return d.Async +} + +type histogram struct { + AggregationTemporality `mapstructure:"aggregation_temporality"` + Mono `mapstructure:",squash"` + MetricValueType `mapstructure:"value_type"` + MetricInputType `mapstructure:",squash"` + Async bool `mapstructure:"async,omitempty"` + Boundaries []float64 `mapstructure:"bucket_boundaries"` +} + +func (d histogram) Type() string { + return "Histogram" +} + +func (d histogram) HasMonotonic() bool { + return false +} + +func (d histogram) HasAggregated() bool { + return false +} + +func (d histogram) Instrument() string { + instrumentName := cases.Title(language.English).String(d.MetricValueType.BasicType()) + return instrumentName + d.Type() +} + +// Unmarshal is a custom unmarshaler for histogram. Needed mostly to avoid MetricValueType.Unmarshal inheritance. +func (d *histogram) Unmarshal(parser *confmap.Conf) error { + if err := d.MetricValueType.Unmarshal(parser); err != nil { + return err + } + return parser.Unmarshal(d, confmap.WithIgnoreUnused()) +} + +func (d histogram) IsAsync() bool { + return d.Async +} diff --git a/cmd/mdatagen/metricdata_test.go b/cmd/mdatagen/metricdata_test.go index 10b7f46613e..1e56afff27c 100644 --- a/cmd/mdatagen/metricdata_test.go +++ b/cmd/mdatagen/metricdata_test.go @@ -7,20 +7,34 @@ import ( "testing" "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/pmetric" ) func TestMetricData(t *testing.T) { for _, arg := range []struct { - metricData MetricData - typ string - hasAggregated bool - hasMonotonic bool + metricData MetricData + wantType string + wantHasAggregated bool + wantHasMonotonic bool + wantInstrument string + wantAsync bool }{ - {&gauge{}, "Gauge", false, false}, - {&sum{}, "Sum", true, true}, + {&gauge{}, "Gauge", false, false, "Gauge", false}, + {&gauge{Async: true}, "Gauge", false, false, "ObservableGauge", true}, + {&gauge{MetricValueType: MetricValueType{pmetric.NumberDataPointValueTypeInt}, Async: true}, "Gauge", false, false, "Int64ObservableGauge", true}, + {&gauge{MetricValueType: MetricValueType{pmetric.NumberDataPointValueTypeDouble}, Async: true}, "Gauge", false, false, "Float64ObservableGauge", true}, + {&sum{}, "Sum", true, true, "UpDownCounter", false}, + {&sum{Mono: Mono{true}}, "Sum", true, true, "Counter", false}, + {&sum{Async: true}, "Sum", true, true, "ObservableUpDownCounter", true}, + {&sum{MetricValueType: MetricValueType{pmetric.NumberDataPointValueTypeInt}, Async: true}, "Sum", true, true, "Int64ObservableUpDownCounter", true}, + {&sum{MetricValueType: MetricValueType{pmetric.NumberDataPointValueTypeDouble}, Async: true}, "Sum", true, true, "Float64ObservableUpDownCounter", true}, + {&histogram{}, "Histogram", false, false, "Histogram", false}, } { - assert.Equal(t, arg.typ, arg.metricData.Type()) - assert.Equal(t, arg.hasAggregated, arg.metricData.HasAggregated()) - assert.Equal(t, arg.hasMonotonic, arg.metricData.HasMonotonic()) + assert.Equal(t, arg.wantType, arg.metricData.Type()) + assert.Equal(t, arg.wantHasAggregated, arg.metricData.HasAggregated()) + assert.Equal(t, arg.wantHasMonotonic, arg.metricData.HasMonotonic()) + assert.Equal(t, arg.wantInstrument, arg.metricData.Instrument()) + assert.Equal(t, arg.wantAsync, arg.metricData.IsAsync()) } } diff --git a/cmd/mdatagen/statusdata.go b/cmd/mdatagen/statusdata.go index c157b82a73c..db130aaf3ea 100644 --- a/cmd/mdatagen/statusdata.go +++ b/cmd/mdatagen/statusdata.go @@ -39,6 +39,7 @@ type Status struct { Warnings []string `mapstructure:"warnings"` Codeowners *Codeowners `mapstructure:"codeowners"` UnsupportedPlatforms []string `mapstructure:"unsupported_platforms"` + NotComponent bool `mapstructure:"not_component"` } func (s *Status) SortedDistributions() []string { diff --git a/cmd/mdatagen/templates/component_telemetry_test.go.tmpl b/cmd/mdatagen/templates/component_telemetry_test.go.tmpl new file mode 100644 index 00000000000..adba6355149 --- /dev/null +++ b/cmd/mdatagen/templates/component_telemetry_test.go.tmpl @@ -0,0 +1,76 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package {{ if isCommand -}}main{{ else }}{{ .Package }}{{- end }} + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/{{ .Status.Class }}" + "go.opentelemetry.io/collector/{{ .Status.Class }}/{{ .Status.Class }}test" +) + +type componentTestTelemetry struct { + reader *sdkmetric.ManualReader + meterProvider *sdkmetric.MeterProvider +} + +func (tt *componentTestTelemetry) NewCreateSettings() {{ .Status.Class }}.CreateSettings { + settings := {{ .Status.Class }}test.NewNopCreateSettings() + settings.MeterProvider = tt.meterProvider + settings.ID = component.NewID(component.MustNewType("{{ .Type }}")) + + return settings +} + +func setupTestTelemetry() componentTestTelemetry { + reader := sdkmetric.NewManualReader() + return componentTestTelemetry{ + reader: reader, + meterProvider: sdkmetric.NewMeterProvider(sdkmetric.WithReader(reader)), + } +} + +func (tt *componentTestTelemetry) assertMetrics(t *testing.T, expected []metricdata.Metrics) { + var md metricdata.ResourceMetrics + require.NoError(t, tt.reader.Collect(context.Background(), &md)) + // ensure all required metrics are present + for _, want := range expected { + got := tt.getMetric(want.Name, md) + metricdatatest.AssertEqual(t, want, got, metricdatatest.IgnoreTimestamp()) + } + + // ensure no additional metrics are emitted + require.Equal(t, len(expected), tt.len(md)) +} + +func (tt *componentTestTelemetry) getMetric(name string, got metricdata.ResourceMetrics) metricdata.Metrics { + for _, sm := range got.ScopeMetrics { + for _, m := range sm.Metrics { + if m.Name == name { + return m + } + } + } + + return metricdata.Metrics{} +} + +func (tt *componentTestTelemetry) len(got metricdata.ResourceMetrics) int { + metricsCount := 0 + for _, sm := range got.ScopeMetrics { + metricsCount += len(sm.Metrics) + } + + return metricsCount +} + +func (tt *componentTestTelemetry) Shutdown(ctx context.Context) error { + return tt.meterProvider.Shutdown(ctx) +} diff --git a/cmd/mdatagen/templates/component_test.go.tmpl b/cmd/mdatagen/templates/component_test.go.tmpl index ca948214d80..f44efb7310c 100644 --- a/cmd/mdatagen/templates/component_test.go.tmpl +++ b/cmd/mdatagen/templates/component_test.go.tmpl @@ -102,7 +102,7 @@ func TestComponentLifecycle(t *testing.T) { cfg := factory.CreateDefaultConfig() sub, err := cm.Sub("tests::config") require.NoError(t, err) - require.NoError(t, component.UnmarshalConfig(sub, cfg)) + require.NoError(t, sub.Unmarshal(&cfg)) for _, test := range tests { {{- if not .Tests.SkipShutdown }} @@ -199,7 +199,7 @@ func TestComponentLifecycle(t *testing.T) { cfg := factory.CreateDefaultConfig() sub, err := cm.Sub("tests::config") require.NoError(t, err) - require.NoError(t, component.UnmarshalConfig(sub, cfg)) + require.NoError(t, sub.Unmarshal(&cfg)) for _, test := range tests { {{- if not .Tests.SkipShutdown }} @@ -294,7 +294,7 @@ func TestComponentLifecycle(t *testing.T) { cfg := factory.CreateDefaultConfig() sub, err := cm.Sub("tests::config") require.NoError(t, err) - require.NoError(t, component.UnmarshalConfig(sub, cfg)) + require.NoError(t, sub.Unmarshal(&cfg)) for _, test := range tests { {{- if not .Tests.SkipShutdown }} @@ -333,7 +333,7 @@ func TestComponentLifecycle(t *testing.T) { cfg := factory.CreateDefaultConfig() sub, err := cm.Sub("tests::config") require.NoError(t, err) - require.NoError(t, component.UnmarshalConfig(sub, cfg)) + require.NoError(t, sub.Unmarshal(&cfg)) {{- if not .Tests.SkipShutdown }} t.Run("shutdown", func(t *testing.T) { @@ -456,7 +456,7 @@ func TestComponentLifecycle(t *testing.T) { cfg := factory.CreateDefaultConfig() sub, err := cm.Sub("tests::config") require.NoError(t, err) - require.NoError(t, component.UnmarshalConfig(sub, cfg)) + require.NoError(t, sub.Unmarshal(&cfg)) for _, test := range tests { {{- if not .Tests.SkipShutdown }} diff --git a/cmd/mdatagen/templates/config_test.go.tmpl b/cmd/mdatagen/templates/config_test.go.tmpl index 3f6a636bc6e..879bfd9311a 100644 --- a/cmd/mdatagen/templates/config_test.go.tmpl +++ b/cmd/mdatagen/templates/config_test.go.tmpl @@ -9,7 +9,6 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/confmap/confmaptest" ) @@ -75,7 +74,7 @@ func loadMetricsBuilderConfig(t *testing.T, name string) MetricsBuilderConfig { sub, err := cm.Sub(name) require.NoError(t, err) cfg := DefaultMetricsBuilderConfig() - require.NoError(t, component.UnmarshalConfig(sub, &cfg)) + require.NoError(t, sub.Unmarshal(&cfg)) return cfg } {{- end }} @@ -125,7 +124,7 @@ func loadResourceAttributesConfig(t *testing.T, name string) ResourceAttributesC sub, err = sub.Sub("resource_attributes") require.NoError(t, err) cfg := DefaultResourceAttributesConfig() - require.NoError(t, component.UnmarshalConfig(sub, &cfg)) + require.NoError(t, sub.Unmarshal(&cfg)) return cfg } {{- end }} diff --git a/cmd/mdatagen/templates/documentation.md.tmpl b/cmd/mdatagen/templates/documentation.md.tmpl index eda8dc9fffe..9793bf0e4d0 100644 --- a/cmd/mdatagen/templates/documentation.md.tmpl +++ b/cmd/mdatagen/templates/documentation.md.tmpl @@ -32,6 +32,28 @@ {{- end }} +{{- end -}} + +{{- define "telemetry-documentation" -}} +{{- $metricName := . }} +{{- $metric := $metricName | telemetryInfo -}} + +### {{ $metricName }} + +{{ $metric.Description }} + +{{- if $metric.ExtendedDocumentation }} + +{{ $metric.ExtendedDocumentation }} + +{{- end }} + +| Unit | Metric Type | Value Type |{{ if $metric.Data.HasMonotonic }} Monotonic |{{ end }} +| ---- | ----------- | ---------- |{{ if $metric.Data.HasMonotonic }} --------- |{{ end }} +| {{ $metric.Unit }} | {{ $metric.Data.Type }} | {{ $metric.Data.MetricValueType }} | +{{- if $metric.Data.HasMonotonic }} {{ $metric.Data.Monotonic }} |{{ end }} + + {{- end -}} [comment]: <> (Code generated by mdatagen. DO NOT EDIT.) @@ -43,6 +65,8 @@ **Parent Component:** {{ .Parent }} {{- end }} +{{- if .Metrics }} + ## Default Metrics The following metrics are emitted by default. Each of them can be disabled by applying the following configuration: @@ -53,6 +77,8 @@ metrics: enabled: false ``` +{{- end }} + {{- range $metricName, $metric := .Metrics }} {{- if $metric.Enabled }} @@ -96,3 +122,19 @@ metrics: {{- end }} {{- end }} + +{{- if .Telemetry.Metrics }} + +## Internal Telemetry + +The following telemetry is emitted by this component. + +{{- range $metricName, $metric := .Telemetry.Metrics }} +{{- if $metric.Enabled }} + +{{ template "telemetry-documentation" $metricName }} + +{{- end }} +{{- end }} + +{{- end }} diff --git a/cmd/mdatagen/templates/package_test.go.tmpl b/cmd/mdatagen/templates/package_test.go.tmpl index d0c8f823748..93446b7a5d7 100644 --- a/cmd/mdatagen/templates/package_test.go.tmpl +++ b/cmd/mdatagen/templates/package_test.go.tmpl @@ -1,6 +1,6 @@ // Code generated by mdatagen. DO NOT EDIT. -package {{ .Package }} +package {{ if isCommand -}}main{{ else }}{{ .Package }}{{- end }} import ( "testing" @@ -16,6 +16,7 @@ func TestMain(m *testing.M) { {{- end }} {{- if .Tests.GoLeak.Skip }} // skipping goleak test as per metadata.yml configuration + os.Exit(m.Run()) {{- else }} goleak.VerifyTestMain(m {{- range $val := .Tests.GoLeak.Ignore.Top}}, goleak.IgnoreTopFunction("{{$val}}"){{end}}{{- range $val := .Tests.GoLeak.Ignore.Any}}, goleak.IgnoreAnyFunction("{{$val}}"){{end}} ) {{- end }} diff --git a/cmd/mdatagen/templates/telemetry.go.tmpl b/cmd/mdatagen/templates/telemetry.go.tmpl index f0b430f3653..fc976c91b0a 100644 --- a/cmd/mdatagen/templates/telemetry.go.tmpl +++ b/cmd/mdatagen/templates/telemetry.go.tmpl @@ -3,9 +3,18 @@ package {{ .Package }} import ( - "go.opentelemetry.io/collector/component" + {{- if .Telemetry.Metrics }} + "context" + "errors" + {{- end }} + + {{ if hasAsync .Telemetry }}"go.opentelemetry.io/otel/attribute"{{- end }} "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" ) func Meter(settings component.TelemetrySettings) metric.Meter { @@ -15,3 +24,87 @@ func Meter(settings component.TelemetrySettings) metric.Meter { func Tracer(settings component.TelemetrySettings) trace.Tracer { return settings.TracerProvider.Tracer("{{ .ScopeName }}") } +{{- if .Telemetry.Metrics }} + +// TelemetryBuilder provides an interface for components to report telemetry +// as defined in metadata and user config. +type TelemetryBuilder struct { + {{- range $name, $metric := .Telemetry.Metrics }} + {{ $name.Render }} metric.{{ $metric.Data.Instrument }} + {{- if $metric.Data.Async }} + observe{{ $name.Render }} func() {{ $metric.Data.BasicType }} + {{- end }} + {{- end }} + level configtelemetry.Level + {{ if hasAsync .Telemetry }}attributeSet attribute.Set{{- end }} +} + +// telemetryBuilderOption applies changes to default builder. +type telemetryBuilderOption func(*TelemetryBuilder) + +// WithLevel sets the current telemetry level for the component. +func WithLevel(lvl configtelemetry.Level) telemetryBuilderOption { + return func(builder *TelemetryBuilder) { + builder.level = lvl + } +} + +{{- if hasAsync .Telemetry }} +// WithAttributeSet applies a set of attributes for asynchronous instruments. +func WithAttributeSet(set attribute.Set) telemetryBuilderOption { + return func(builder *TelemetryBuilder) { + builder.attributeSet = set + } +} +{{- end }} + +{{- range $name, $metric := .Telemetry.Metrics }} + {{ if $metric.Data.Async -}} +// With{{ $name.Render }}Callback sets callback for observable {{ $name.Render }} metric. +func With{{ $name.Render }}Callback(cb func() {{ $metric.Data.BasicType }}) telemetryBuilderOption { + return func(builder *TelemetryBuilder) { + builder.observe{{ $name.Render }} = cb + } +} + {{- end }} +{{- end }} + + +// NewTelemetryBuilder provides a struct with methods to update all internal telemetry +// for a component +func NewTelemetryBuilder(settings component.TelemetrySettings, options ...telemetryBuilderOption) (*TelemetryBuilder, error) { + builder := TelemetryBuilder{level: configtelemetry.LevelBasic} + for _, op := range options { + op(&builder) + } + var ( + err, errs error + meter metric.Meter + ) + if builder.level >= configtelemetry.Level{{ casesTitle .Telemetry.Level.String }} { + meter = Meter(settings) + } else { + meter = noop.Meter{} + } + + {{- range $name, $metric := .Telemetry.Metrics }} + builder.{{ $name.Render }}, err = meter.{{ $metric.Data.Instrument }}( + "{{ $name }}", + metric.WithDescription("{{ $metric.Description }}"), + metric.WithUnit("{{ $metric.Unit }}"), + {{- if eq $metric.Data.Type "Histogram" -}} + {{ if $metric.Data.Boundaries -}}metric.WithExplicitBucketBoundaries([]float64{ {{- range $metric.Data.Boundaries }} {{.}}, {{- end }} }...),{{- end }} + {{- end }} + {{ if $metric.Data.Async -}} + metric.With{{ casesTitle $metric.Data.BasicType }}Callback(func(_ context.Context, o metric.{{ casesTitle $metric.Data.BasicType }}Observer) error { + o.Observe(builder.observe{{ $name.Render }}(), metric.WithAttributeSet(builder.attributeSet)) + return nil + }), + {{- end }} + ) + errs = errors.Join(errs, err) + {{- end }} + return &builder, errs +} + +{{- end }} diff --git a/cmd/mdatagen/templates/telemetry_test.go.tmpl b/cmd/mdatagen/templates/telemetry_test.go.tmpl index 073a53d2aec..244a0c92a0b 100644 --- a/cmd/mdatagen/templates/telemetry_test.go.tmpl +++ b/cmd/mdatagen/templates/telemetry_test.go.tmpl @@ -7,6 +7,8 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/otel/metric" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" embeddedmetric "go.opentelemetry.io/otel/metric/embedded" noopmetric "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" @@ -61,3 +63,19 @@ func TestProviders(t *testing.T) { require.Fail(t, "returned Meter not mockTracer") } } +{{- if .Telemetry.Metrics }} + +func TestNewTelemetryBuilder(t *testing.T) { + set := component.TelemetrySettings{ + MeterProvider: mockMeterProvider{}, + TracerProvider: mockTracerProvider{}, + } + applied := false + _, err := NewTelemetryBuilder(set, func(b *TelemetryBuilder) { + applied = true + }) + require.NoError(t, err) + require.True(t, applied) +} + +{{- end }} diff --git a/cmd/mdatagen/testdata/invalid_telemetry_missing_value_type_for_histogram.yaml b/cmd/mdatagen/testdata/invalid_telemetry_missing_value_type_for_histogram.yaml new file mode 100644 index 00000000000..c121802be40 --- /dev/null +++ b/cmd/mdatagen/testdata/invalid_telemetry_missing_value_type_for_histogram.yaml @@ -0,0 +1,13 @@ +type: metric + +status: + class: receiver + stability: + beta: [traces, logs, metrics] +telemetry: + metrics: + sampling_decision_latency: + description: Latency (in microseconds) of a given sampling policy + unit: µs + enabled: true + histogram: diff --git a/cmd/mdatagen/testdata/with_telemetry.yaml b/cmd/mdatagen/testdata/with_telemetry.yaml new file mode 100644 index 00000000000..161010df9bf --- /dev/null +++ b/cmd/mdatagen/testdata/with_telemetry.yaml @@ -0,0 +1,14 @@ +type: metric + +status: + class: receiver + stability: + beta: [traces, logs, metrics] +telemetry: + metrics: + sampling_decision_latency: + description: Latency (in microseconds) of a given sampling policy + unit: µs + enabled: true + histogram: + value_type: int diff --git a/cmd/otelcorecol/builder-config.yaml b/cmd/otelcorecol/builder-config.yaml index 8d8f88ad980..2a1390befe3 100644 --- a/cmd/otelcorecol/builder-config.yaml +++ b/cmd/otelcorecol/builder-config.yaml @@ -2,34 +2,34 @@ dist: module: go.opentelemetry.io/collector/cmd/otelcorecol name: otelcorecol description: Local OpenTelemetry Collector binary, testing only. - version: 0.100.0-dev - otelcol_version: 0.100.0 + version: 0.102.1-dev + otelcol_version: 0.102.1 receivers: - - gomod: go.opentelemetry.io/collector/receiver/nopreceiver v0.100.0 - - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.100.0 + - gomod: go.opentelemetry.io/collector/receiver/nopreceiver v0.102.1 + - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.102.1 exporters: - - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.100.0 - - gomod: go.opentelemetry.io/collector/exporter/loggingexporter v0.100.0 - - gomod: go.opentelemetry.io/collector/exporter/nopexporter v0.100.0 - - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.100.0 - - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.100.0 + - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.102.1 + - gomod: go.opentelemetry.io/collector/exporter/loggingexporter v0.102.1 + - gomod: go.opentelemetry.io/collector/exporter/nopexporter v0.102.1 + - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.102.1 + - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.102.1 extensions: - - gomod: go.opentelemetry.io/collector/extension/ballastextension v0.100.0 - - gomod: go.opentelemetry.io/collector/extension/memorylimiterextension v0.100.0 - - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.100.0 + - gomod: go.opentelemetry.io/collector/extension/ballastextension v0.102.1 + - gomod: go.opentelemetry.io/collector/extension/memorylimiterextension v0.102.1 + - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.102.1 processors: - - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.100.0 - - gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.100.0 + - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.102.1 + - gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.102.1 connectors: - - gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.100.0 + - gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.102.1 providers: - - gomod: go.opentelemetry.io/collector/confmap/provider/envprovider v0.100.0 - - gomod: go.opentelemetry.io/collector/confmap/provider/fileprovider v0.100.0 - - gomod: go.opentelemetry.io/collector/confmap/provider/httpprovider v0.100.0 - - gomod: go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.100.0 - - gomod: go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.100.0 + - gomod: go.opentelemetry.io/collector/confmap/provider/envprovider v0.102.1 + - gomod: go.opentelemetry.io/collector/confmap/provider/fileprovider v0.102.1 + - gomod: go.opentelemetry.io/collector/confmap/provider/httpprovider v0.102.1 + - gomod: go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.102.1 + - gomod: go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.102.1 replaces: - go.opentelemetry.io/collector => ../../ diff --git a/cmd/otelcorecol/go.mod b/cmd/otelcorecol/go.mod index 9fda292e0f7..92ad5205864 100644 --- a/cmd/otelcorecol/go.mod +++ b/cmd/otelcorecol/go.mod @@ -2,44 +2,45 @@ module go.opentelemetry.io/collector/cmd/otelcorecol -go 1.21 +go 1.21.0 + +toolchain go1.21.11 require ( - go.opentelemetry.io/collector/component v0.100.0 - go.opentelemetry.io/collector/confmap v0.100.0 - go.opentelemetry.io/collector/confmap/converter/expandconverter v0.100.0 - go.opentelemetry.io/collector/confmap/provider/envprovider v0.100.0 - go.opentelemetry.io/collector/confmap/provider/fileprovider v0.100.0 - go.opentelemetry.io/collector/confmap/provider/httpprovider v0.100.0 - go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.100.0 - go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.100.0 - go.opentelemetry.io/collector/connector v0.100.0 - go.opentelemetry.io/collector/connector/forwardconnector v0.100.0 - go.opentelemetry.io/collector/exporter v0.100.0 - go.opentelemetry.io/collector/exporter/debugexporter v0.100.0 - go.opentelemetry.io/collector/exporter/loggingexporter v0.100.0 - go.opentelemetry.io/collector/exporter/nopexporter v0.100.0 - go.opentelemetry.io/collector/exporter/otlpexporter v0.100.0 - go.opentelemetry.io/collector/exporter/otlphttpexporter v0.100.0 - go.opentelemetry.io/collector/extension v0.100.0 - go.opentelemetry.io/collector/extension/ballastextension v0.100.0 - go.opentelemetry.io/collector/extension/memorylimiterextension v0.100.0 - go.opentelemetry.io/collector/extension/zpagesextension v0.100.0 - go.opentelemetry.io/collector/otelcol v0.100.0 - go.opentelemetry.io/collector/processor v0.100.0 - go.opentelemetry.io/collector/processor/batchprocessor v0.100.0 - go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.100.0 - go.opentelemetry.io/collector/receiver v0.100.0 - go.opentelemetry.io/collector/receiver/nopreceiver v0.100.0 - go.opentelemetry.io/collector/receiver/otlpreceiver v0.100.0 - go.uber.org/goleak v1.3.0 - golang.org/x/sys v0.19.0 + go.opentelemetry.io/collector/component v0.102.1 + go.opentelemetry.io/collector/confmap v0.102.1 + go.opentelemetry.io/collector/confmap/converter/expandconverter v0.102.1 + go.opentelemetry.io/collector/confmap/provider/envprovider v0.102.1 + go.opentelemetry.io/collector/confmap/provider/fileprovider v0.102.1 + go.opentelemetry.io/collector/confmap/provider/httpprovider v0.102.1 + go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.102.1 + go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.102.1 + go.opentelemetry.io/collector/connector v0.102.1 + go.opentelemetry.io/collector/connector/forwardconnector v0.102.1 + go.opentelemetry.io/collector/exporter v0.102.1 + go.opentelemetry.io/collector/exporter/debugexporter v0.102.1 + go.opentelemetry.io/collector/exporter/loggingexporter v0.102.1 + go.opentelemetry.io/collector/exporter/nopexporter v0.102.1 + go.opentelemetry.io/collector/exporter/otlpexporter v0.102.1 + go.opentelemetry.io/collector/exporter/otlphttpexporter v0.102.1 + go.opentelemetry.io/collector/extension v0.102.1 + go.opentelemetry.io/collector/extension/ballastextension v0.102.1 + go.opentelemetry.io/collector/extension/memorylimiterextension v0.102.1 + go.opentelemetry.io/collector/extension/zpagesextension v0.102.1 + go.opentelemetry.io/collector/otelcol v0.102.1 + go.opentelemetry.io/collector/processor v0.102.1 + go.opentelemetry.io/collector/processor/batchprocessor v0.102.1 + go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.102.1 + go.opentelemetry.io/collector/receiver v0.102.1 + go.opentelemetry.io/collector/receiver/nopreceiver v0.102.1 + go.opentelemetry.io/collector/receiver/otlpreceiver v0.102.1 + golang.org/x/sys v0.20.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-logr/logr v1.4.1 // indirect @@ -50,8 +51,8 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect + github.com/hashicorp/go-version v1.7.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.17.8 // indirect @@ -65,12 +66,12 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mostynb/go-grpc-compression v1.2.2 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.53.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect github.com/rs/cors v1.10.1 // indirect - github.com/shirou/gopsutil/v3 v3.24.3 // indirect + github.com/shirou/gopsutil/v3 v3.24.4 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/spf13/cobra v1.8.0 // indirect github.com/spf13/pflag v1.0.5 // indirect @@ -78,53 +79,53 @@ require ( github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.100.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.100.0 // indirect - go.opentelemetry.io/collector/config/configcompression v1.7.0 // indirect - go.opentelemetry.io/collector/config/configgrpc v0.100.0 // indirect - go.opentelemetry.io/collector/config/confighttp v0.100.0 // indirect - go.opentelemetry.io/collector/config/confignet v0.100.0 // indirect - go.opentelemetry.io/collector/config/configopaque v1.7.0 // indirect - go.opentelemetry.io/collector/config/configretry v0.100.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect - go.opentelemetry.io/collector/config/configtls v0.100.0 // indirect - go.opentelemetry.io/collector/config/internal v0.100.0 // indirect - go.opentelemetry.io/collector/consumer v0.100.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.100.0 // indirect - go.opentelemetry.io/collector/featuregate v1.7.0 // indirect - go.opentelemetry.io/collector/pdata v1.7.0 // indirect - go.opentelemetry.io/collector/semconv v0.100.0 // indirect - go.opentelemetry.io/collector/service v0.100.0 // indirect - go.opentelemetry.io/contrib/config v0.6.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 // indirect - go.opentelemetry.io/contrib/propagators/b3 v1.26.0 // indirect - go.opentelemetry.io/contrib/zpages v0.51.0 // indirect - go.opentelemetry.io/otel v1.26.0 // indirect - go.opentelemetry.io/otel/bridge/opencensus v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 // indirect - go.opentelemetry.io/otel/metric v1.26.0 // indirect - go.opentelemetry.io/otel/sdk v1.26.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect - go.opentelemetry.io/otel/trace v1.26.0 // indirect + go.opentelemetry.io/collector v0.102.1 // indirect + go.opentelemetry.io/collector/config/configauth v0.102.1 // indirect + go.opentelemetry.io/collector/config/configcompression v1.9.0 // indirect + go.opentelemetry.io/collector/config/configgrpc v0.102.1 // indirect + go.opentelemetry.io/collector/config/confighttp v0.102.1 // indirect + go.opentelemetry.io/collector/config/confignet v0.102.1 // indirect + go.opentelemetry.io/collector/config/configopaque v1.9.0 // indirect + go.opentelemetry.io/collector/config/configretry v0.102.1 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 // indirect + go.opentelemetry.io/collector/config/configtls v0.102.1 // indirect + go.opentelemetry.io/collector/config/internal v0.102.1 // indirect + go.opentelemetry.io/collector/consumer v0.102.1 // indirect + go.opentelemetry.io/collector/extension/auth v0.102.1 // indirect + go.opentelemetry.io/collector/featuregate v1.9.0 // indirect + go.opentelemetry.io/collector/pdata v1.9.0 // indirect + go.opentelemetry.io/collector/semconv v0.102.1 // indirect + go.opentelemetry.io/collector/service v0.102.1 // indirect + go.opentelemetry.io/contrib/config v0.7.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.27.0 // indirect + go.opentelemetry.io/contrib/zpages v0.52.0 // indirect + go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/bridge/opencensus v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect go.opentelemetry.io/proto/otlp v1.2.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/text v0.15.0 // indirect gonum.org/v1/gonum v0.15.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.34.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/cmd/otelcorecol/go.sum b/cmd/otelcorecol/go.sum index 13c5f8a3f42..cb8ee7f11f2 100644 --- a/cmd/otelcorecol/go.sum +++ b/cmd/otelcorecol/go.sum @@ -5,8 +5,8 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -62,10 +62,10 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -101,22 +101,22 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= -github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= +github.com/shirou/gopsutil/v3 v3.24.4 h1:dEHgzZXt4LMNm+oYELpzl9YCqV65Yr/6SfrvgRBtXeU= +github.com/shirou/gopsutil/v3 v3.24.4/go.mod h1:lTd2mdiOspcqLgAnr9/nGi71NkeMpWKdmhuxm9GusH8= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= @@ -146,44 +146,44 @@ github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/config v0.6.0 h1:M1SRD1Z15XHPGk61tMLI1up77XT5FdrqQSRrlH0fYuk= -go.opentelemetry.io/contrib/config v0.6.0/go.mod h1:t+/kzmRWLN7J+4F/dD4fFvlYCmCO63WYwy/B00IC++c= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 h1:A3SayB3rNyt+1S6qpI9mHPkeHTZbD7XILEqWnYZb2l0= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0/go.mod h1:27iA5uvhuRNmalO+iEUdVn5ZMj2qy10Mm+XRIpRmyuU= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 h1:Xs2Ncz0gNihqu9iosIZ5SkBbWo5T8JhhLJFMQL1qmLI= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0/go.mod h1:vy+2G/6NvVMpwGX/NyLqcC41fxepnuKHk16E6IZUcJc= -go.opentelemetry.io/contrib/propagators/b3 v1.26.0 h1:wgFbVA+bK2k+fGVfDOCOG4cfDAoppyr5sI2dVlh8MWM= -go.opentelemetry.io/contrib/propagators/b3 v1.26.0/go.mod h1:DDktFXxA+fyItAAM0Sbl5OBH7KOsCTjvbBdPKtoIf/k= -go.opentelemetry.io/contrib/zpages v0.51.0 h1:psVr4JTWd0qtISPj9EA6AODGJ09bvsOxWiuKqiGdSCA= -go.opentelemetry.io/contrib/zpages v0.51.0/go.mod h1:PKtp+NEp1gTTLmFHpynYgYCSkKtisPntOb9S1mQjFKg= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/bridge/opencensus v1.26.0 h1:DZzxj9QjznMVoehskOJnFP2gsTCWtDTFBDvFhPAY7nc= -go.opentelemetry.io/otel/bridge/opencensus v1.26.0/go.mod h1:rJiX0KrF5m8Tm1XE8jLczpAv5zUaDcvhKecFG0ZoFG4= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 h1:+hm+I+KigBy3M24/h1p/NHkUx/evbLH0PNcjpMyCHc4= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0/go.mod h1:NjC8142mLvvNT6biDpaMjyz78kyEHIwAJlSX0N9P5KI= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 h1:HGZWGmCVRCVyAs2GQaiHQPbDHo+ObFWeUEOd+zDnp64= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0/go.mod h1:SaH+v38LSCHddyk7RGlU9uZyQoRrKao6IBnJw6Kbn+c= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 h1:1u/AyyOqAWzy+SkPxDpahCNZParHV8Vid1RnI2clyDE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0/go.mod h1:z46paqbJ9l7c9fIPCXTqTGwhQZ5XoTIsfeFYWboizjs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 h1:Waw9Wfpo/IXzOI8bCB7DIk+0JZcqqsyn1JFnAc+iam8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0/go.mod h1:wnJIG4fOqyynOnnQF/eQb4/16VlX2EJAHhHgqIqWfAo= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 h1:1wp/gyxsuYtuE/JFxsQRtcCDtMrO2qMvlfXALU5wkzI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0/go.mod h1:gbTHmghkGgqxMomVQQMur1Nba4M0MQ8AYThXDUjsJ38= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 h1:5fnmgteaar1VcAA69huatudPduNFz7guRtCmfZCooZI= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0/go.mod h1:lsPccfZiz1cb1AhBPmicWM2E4F1VynFXEvD8SEBS4TM= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 h1:0W5o9SzoR15ocYHEQfvfipzcNog1lBxOLfnex91Hk6s= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0/go.mod h1:zVZ8nz+VSggWmnh6tTsJqXQ7rU4xLwRtna1M4x5jq58= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/contrib/config v0.7.0 h1:b1rK5tGTuhhPirJiMxOcyQfZs76j2VapY6ODn3b2Dbs= +go.opentelemetry.io/contrib/config v0.7.0/go.mod h1:8tdiFd8N5etOi3XzBmAoMxplEzI3TcL8dU5rM5/xcOQ= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 h1:vS1Ao/R55RNV4O7TA2Qopok8yN+X0LIP6RVWLFkprck= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0/go.mod h1:BMsdeOxN04K0L5FNUBfjFdvwWGNe/rkmSwH4Aelu/X0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 h1:9l89oX4ba9kHbBol3Xin3leYJ+252h0zszDtBwyKe2A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0/go.mod h1:XLZfZboOJWHNKUv7eH0inh0E9VV6eWDFB/9yJyTLPp0= +go.opentelemetry.io/contrib/propagators/b3 v1.27.0 h1:IjgxbomVrV9za6bRi8fWCNXENs0co37SZedQilP2hm0= +go.opentelemetry.io/contrib/propagators/b3 v1.27.0/go.mod h1:Dv9obQz25lCisDvvs4dy28UPh974CxkahRDUPsY7y9E= +go.opentelemetry.io/contrib/zpages v0.52.0 h1:MPgkMy0Cp3O5EdfVXP0ss3ujhEibysTM4eszx7E7d+E= +go.opentelemetry.io/contrib/zpages v0.52.0/go.mod h1:fqG5AFdoYru3A3DnhibVuaaEfQV2WKxE7fYE1jgDRwk= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/bridge/opencensus v1.27.0 h1:ao9aGGHd+G4YfjBpGs6vbkvt5hoC67STlJA9fCnOAcs= +go.opentelemetry.io/otel/bridge/opencensus v1.27.0/go.mod h1:uRvWtAAXzyVOST0WMPX5JHGBaAvBws+2F8PcC5gMnTk= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 h1:QY7/0NeRPKlzusf40ZE4t1VlMKbqSNT7cJRYzWuja0s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0/go.mod h1:HVkSiDhTM9BoUJU8qE6j2eSWLLXvi1USXjyd2BXT8PY= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0 h1:/jlt1Y8gXWiHG9FBx6cJaIC5hYx5Fe64nC8w5Cylt/0= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0/go.mod h1:bmToOGOBZ4hA9ghphIc1PAf66VA8KOtsuy3+ScStG20= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0 h1:/0YaXu3755A/cFbtXp+21lkXgI0QE5avTWA2HjU9/WE= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0/go.mod h1:m7SFxp0/7IxmJPLIY3JhOcU9CoFzDaCPL6xxQIxhA+o= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -196,8 +196,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= -golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= +golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= +golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -212,8 +212,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -228,13 +228,13 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -254,19 +254,17 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 h1:P8OJ/WCl/Xo4E4zoe4/bifHpSmmKwARqyqE4nW6J2GQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -276,8 +274,8 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/cmd/otelcorecol/main.go b/cmd/otelcorecol/main.go index beaeb912ee4..8d43a502790 100644 --- a/cmd/otelcorecol/main.go +++ b/cmd/otelcorecol/main.go @@ -21,7 +21,7 @@ func main() { info := component.BuildInfo{ Command: "otelcorecol", Description: "Local OpenTelemetry Collector binary, testing only.", - Version: "0.100.0-dev", + Version: "0.102.1-dev", } set := otelcol.CollectorSettings{ diff --git a/cmd/otelcorecol/package_test.go b/cmd/otelcorecol/package_test.go deleted file mode 100644 index 5cd502ca564..00000000000 --- a/cmd/otelcorecol/package_test.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package main - -import ( - "testing" - - "go.uber.org/goleak" -) - -func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) -} diff --git a/component/component.go b/component/component.go index c7f6408680a..794fc9235a9 100644 --- a/component/component.go +++ b/component/component.go @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +// Package component outlines the abstraction of components within the OpenTelemetry Collector. It provides details on the component +// lifecycle as well as defining the interface that components must fulfill. package component // import "go.opentelemetry.io/collector/component" import ( diff --git a/component/config.go b/component/config.go index 49cc7f5219f..b53ff872fda 100644 --- a/component/config.go +++ b/component/config.go @@ -27,13 +27,8 @@ type Config any var configValidatorType = reflect.TypeOf((*ConfigValidator)(nil)).Elem() // UnmarshalConfig helper function to UnmarshalConfig a Config. -// It checks if the config implements confmap.Unmarshaler and uses that if available, -// otherwise uses Map.UnmarshalExact, erroring if a field is nonexistent. +// Deprecated: [v0.101.0] Use conf.Unmarshal(&intoCfg) func UnmarshalConfig(conf *confmap.Conf, intoCfg Config) error { - if cu, ok := intoCfg.(confmap.Unmarshaler); ok { - return cu.Unmarshal(conf) - } - return conf.Unmarshal(intoCfg) } diff --git a/component/go.mod b/component/go.mod index 41731120641..1f71442d7bc 100644 --- a/component/go.mod +++ b/component/go.mod @@ -1,21 +1,21 @@ module go.opentelemetry.io/collector/component -go 1.21 +go 1.21.0 require ( - github.com/prometheus/client_golang v1.19.0 + github.com/prometheus/client_golang v1.19.1 github.com/prometheus/client_model v0.6.1 github.com/prometheus/common v0.53.0 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 - go.opentelemetry.io/collector/confmap v0.100.0 - go.opentelemetry.io/collector/pdata v1.7.0 - go.opentelemetry.io/otel v1.26.0 - go.opentelemetry.io/otel/exporters/prometheus v0.48.0 - go.opentelemetry.io/otel/metric v1.26.0 - go.opentelemetry.io/otel/sdk v1.26.0 - go.opentelemetry.io/otel/sdk/metric v1.26.0 - go.opentelemetry.io/otel/trace v1.26.0 + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 + go.opentelemetry.io/collector/confmap v0.102.1 + go.opentelemetry.io/collector/pdata v1.9.0 + go.opentelemetry.io/otel v1.27.0 + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 + go.opentelemetry.io/otel/metric v1.27.0 + go.opentelemetry.io/otel/sdk v1.27.0 + go.opentelemetry.io/otel/sdk/metric v1.27.0 + go.opentelemetry.io/otel/trace v1.27.0 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 @@ -23,7 +23,7 @@ require ( require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -35,13 +35,13 @@ require ( github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect golang.org/x/net v0.23.0 // indirect - golang.org/x/sys v0.19.0 // indirect + golang.org/x/sys v0.20.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.34.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/component/go.sum b/component/go.sum index 5467b123e44..df6137c7eb0 100644 --- a/component/go.sum +++ b/component/go.sum @@ -1,7 +1,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -33,32 +33,32 @@ github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zx github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -82,8 +82,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -96,12 +96,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/config/configauth/go.mod b/config/configauth/go.mod index 072dce27655..74e02545163 100644 --- a/config/configauth/go.mod +++ b/config/configauth/go.mod @@ -1,12 +1,12 @@ module go.opentelemetry.io/collector/config/configauth -go 1.21 +go 1.21.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.100.0 - go.opentelemetry.io/collector/extension v0.100.0 - go.opentelemetry.io/collector/extension/auth v0.100.0 + go.opentelemetry.io/collector/component v0.102.1 + go.opentelemetry.io/collector/extension v0.102.1 + go.opentelemetry.io/collector/extension/auth v0.102.1 go.uber.org/goleak v1.3.0 ) @@ -20,20 +20,20 @@ require ( github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect - go.opentelemetry.io/collector/confmap v0.100.0 // indirect - go.opentelemetry.io/collector/pdata v1.7.0 // indirect - go.opentelemetry.io/otel v1.26.0 // indirect - go.opentelemetry.io/otel/metric v1.26.0 // indirect - go.opentelemetry.io/otel/trace v1.26.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 // indirect + go.opentelemetry.io/collector/confmap v0.102.1 // indirect + go.opentelemetry.io/collector/pdata v1.9.0 // indirect + go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect golang.org/x/net v0.23.0 // indirect - golang.org/x/sys v0.19.0 // indirect + golang.org/x/sys v0.20.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.34.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/config/configauth/go.sum b/config/configauth/go.sum index 624dd0f4bec..2ce16fd9245 100644 --- a/config/configauth/go.sum +++ b/config/configauth/go.sum @@ -1,7 +1,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= @@ -32,32 +32,32 @@ github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zx github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -81,8 +81,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -95,12 +95,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/config/configcompression/go.mod b/config/configcompression/go.mod index a79f2d91f3d..159d320056b 100644 --- a/config/configcompression/go.mod +++ b/config/configcompression/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/collector/config/configcompression -go 1.21 +go 1.21.0 require ( github.com/stretchr/testify v1.9.0 diff --git a/config/configgrpc/configgrpc.go b/config/configgrpc/configgrpc.go index 98d428857ce..b57a199461c 100644 --- a/config/configgrpc/configgrpc.go +++ b/config/configgrpc/configgrpc.go @@ -12,7 +12,6 @@ import ( "time" "github.com/mostynb/go-grpc-compression/nonclobbering/snappy" - "github.com/mostynb/go-grpc-compression/nonclobbering/zstd" "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" "go.opentelemetry.io/otel" "google.golang.org/grpc" @@ -28,6 +27,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configauth" "go.opentelemetry.io/collector/config/configcompression" + grpcInternal "go.opentelemetry.io/collector/config/configgrpc/internal" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/config/configopaque" "go.opentelemetry.io/collector/config/configtelemetry" @@ -426,7 +426,7 @@ func getGRPCCompressionName(compressionType configcompression.Type) (string, err case configcompression.TypeSnappy: return snappy.Name, nil case configcompression.TypeZstd: - return zstd.Name, nil + return grpcInternal.ZstdName, nil default: return "", fmt.Errorf("unsupported compression type %q", compressionType) } diff --git a/config/configgrpc/configgrpc_benchmark_test.go b/config/configgrpc/configgrpc_benchmark_test.go index 1ad755f2b4f..3254655e9ec 100644 --- a/config/configgrpc/configgrpc_benchmark_test.go +++ b/config/configgrpc/configgrpc_benchmark_test.go @@ -10,12 +10,12 @@ import ( "testing" "github.com/mostynb/go-grpc-compression/nonclobbering/snappy" - "github.com/mostynb/go-grpc-compression/nonclobbering/zstd" "google.golang.org/grpc/codes" "google.golang.org/grpc/encoding" "google.golang.org/grpc/encoding/gzip" "google.golang.org/grpc/status" + "go.opentelemetry.io/collector/config/configgrpc/internal" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" @@ -27,7 +27,7 @@ func BenchmarkCompressors(b *testing.B) { compressors := make([]encoding.Compressor, 0) compressors = append(compressors, encoding.GetCompressor(gzip.Name)) - compressors = append(compressors, encoding.GetCompressor(zstd.Name)) + compressors = append(compressors, encoding.GetCompressor(internal.ZstdName)) compressors = append(compressors, encoding.GetCompressor(snappy.Name)) for _, payload := range payloads { diff --git a/config/configgrpc/go.mod b/config/configgrpc/go.mod index ef10d17a561..b85e090a6dc 100644 --- a/config/configgrpc/go.mod +++ b/config/configgrpc/go.mod @@ -1,32 +1,33 @@ module go.opentelemetry.io/collector/config/configgrpc -go 1.21 +go 1.21.0 require ( + github.com/klauspost/compress v1.17.2 github.com/mostynb/go-grpc-compression v1.2.2 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector v0.100.0 - go.opentelemetry.io/collector/component v0.100.0 - go.opentelemetry.io/collector/config/configauth v0.100.0 - go.opentelemetry.io/collector/config/configcompression v1.7.0 - go.opentelemetry.io/collector/config/confignet v0.100.0 - go.opentelemetry.io/collector/config/configopaque v1.7.0 - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 - go.opentelemetry.io/collector/config/configtls v0.100.0 - go.opentelemetry.io/collector/config/internal v0.100.0 - go.opentelemetry.io/collector/extension/auth v0.100.0 - go.opentelemetry.io/collector/pdata v1.7.0 - go.opentelemetry.io/collector/pdata/testdata v0.100.0 - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 - go.opentelemetry.io/otel v1.26.0 + go.opentelemetry.io/collector v0.102.1 + go.opentelemetry.io/collector/component v0.102.1 + go.opentelemetry.io/collector/config/configauth v0.102.1 + go.opentelemetry.io/collector/config/configcompression v1.9.0 + go.opentelemetry.io/collector/config/confignet v0.102.1 + go.opentelemetry.io/collector/config/configopaque v1.9.0 + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 + go.opentelemetry.io/collector/config/configtls v0.102.1 + go.opentelemetry.io/collector/config/internal v0.102.1 + go.opentelemetry.io/collector/extension/auth v0.102.1 + go.opentelemetry.io/collector/pdata v1.9.0 + go.opentelemetry.io/collector/pdata/testdata v0.102.1 + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 + go.opentelemetry.io/otel v1.27.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - google.golang.org/grpc v1.63.2 + google.golang.org/grpc v1.64.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-logr/logr v1.4.1 // indirect @@ -34,9 +35,8 @@ require ( github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/hashicorp/go-version v1.7.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.2 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect github.com/knadh/koanf/v2 v2.1.1 // indirect @@ -45,24 +45,24 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.53.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector/confmap v0.100.0 // indirect - go.opentelemetry.io/collector/extension v0.100.0 // indirect - go.opentelemetry.io/collector/featuregate v1.7.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect - go.opentelemetry.io/otel/metric v1.26.0 // indirect - go.opentelemetry.io/otel/sdk v1.26.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect - go.opentelemetry.io/otel/trace v1.26.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect + go.opentelemetry.io/collector/confmap v0.102.1 // indirect + go.opentelemetry.io/collector/extension v0.102.1 // indirect + go.opentelemetry.io/collector/featuregate v1.9.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/protobuf v1.34.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/config/configgrpc/go.sum b/config/configgrpc/go.sum index 30b59f5dc25..2e2a2d31466 100644 --- a/config/configgrpc/go.sum +++ b/config/configgrpc/go.sum @@ -1,7 +1,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -21,8 +21,8 @@ github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -52,14 +52,14 @@ github.com/mostynb/go-grpc-compression v1.2.2 h1:XaDbnRvt2+1vgr0b/l0qh4mJAfIxE0b github.com/mostynb/go-grpc-compression v1.2.2/go.mod h1:GOCr2KBxXcblCuczg3YdLQlcin1/NfyDA348ckuCH6w= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -68,20 +68,20 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 h1:A3SayB3rNyt+1S6qpI9mHPkeHTZbD7XILEqWnYZb2l0= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0/go.mod h1:27iA5uvhuRNmalO+iEUdVn5ZMj2qy10Mm+XRIpRmyuU= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 h1:vS1Ao/R55RNV4O7TA2Qopok8yN+X0LIP6RVWLFkprck= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0/go.mod h1:BMsdeOxN04K0L5FNUBfjFdvwWGNe/rkmSwH4Aelu/X0= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -97,20 +97,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -119,12 +119,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/config/configgrpc/internal/zstd.go b/config/configgrpc/internal/zstd.go new file mode 100644 index 00000000000..0718b73535f --- /dev/null +++ b/config/configgrpc/internal/zstd.go @@ -0,0 +1,83 @@ +// Copyright The OpenTelemetry Authors +// Copyright 2017 gRPC authors +// SPDX-License-Identifier: Apache-2.0 + +package internal // import "go.opentelemetry.io/collector/config/configgrpc/internal" + +import ( + "errors" + "io" + "sync" + + "github.com/klauspost/compress/zstd" + "google.golang.org/grpc/encoding" +) + +const ZstdName = "zstd" + +func init() { + encoding.RegisterCompressor(NewZstdCodec()) +} + +type writer struct { + *zstd.Encoder + pool *sync.Pool +} + +func NewZstdCodec() encoding.Compressor { + c := &compressor{} + c.poolCompressor.New = func() any { + zw, _ := zstd.NewWriter(nil, zstd.WithEncoderConcurrency(1), zstd.WithWindowSize(512*1024)) + return &writer{Encoder: zw, pool: &c.poolCompressor} + } + return c +} + +func (c *compressor) Compress(w io.Writer) (io.WriteCloser, error) { + z := c.poolCompressor.Get().(*writer) + z.Encoder.Reset(w) + return z, nil +} + +func (z *writer) Close() error { + defer z.pool.Put(z) + return z.Encoder.Close() +} + +type reader struct { + *zstd.Decoder + pool *sync.Pool +} + +func (c *compressor) Decompress(r io.Reader) (io.Reader, error) { + z, inPool := c.poolDecompressor.Get().(*reader) + if !inPool { + newZ, err := zstd.NewReader(r) + if err != nil { + return nil, err + } + return &reader{Decoder: newZ, pool: &c.poolDecompressor}, nil + } + if err := z.Reset(r); err != nil { + c.poolDecompressor.Put(z) + return nil, err + } + return z, nil +} + +func (z *reader) Read(p []byte) (n int, err error) { + n, err = z.Decoder.Read(p) + if errors.Is(err, io.EOF) { + z.pool.Put(z) + } + return n, err +} + +func (c *compressor) Name() string { + return ZstdName +} + +type compressor struct { + poolCompressor sync.Pool + poolDecompressor sync.Pool +} diff --git a/config/configgrpc/internal/zstd_test.go b/config/configgrpc/internal/zstd_test.go new file mode 100644 index 00000000000..e16336c8ccb --- /dev/null +++ b/config/configgrpc/internal/zstd_test.go @@ -0,0 +1,41 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package internal + +import ( + "bytes" + "io" + "testing" + + "github.com/stretchr/testify/require" +) + +func Test_zstdCodec_CompressDecompress(t *testing.T) { + // prepare + msg := []byte("Hello world.") + compressed := &bytes.Buffer{} + + // zstd header, for sanity checking + header := []byte{40, 181, 47, 253} + + c := NewZstdCodec() + cWriter, err := c.Compress(compressed) + require.NoError(t, err) + require.NotNil(t, cWriter) + + _, err = cWriter.Write(msg) + require.NoError(t, err) + cWriter.Close() + + cReader, err := c.Decompress(compressed) + require.NoError(t, err) + require.NotNil(t, cReader) + + uncompressed, err := io.ReadAll(cReader) + require.NoError(t, err) + require.Equal(t, msg, uncompressed) + + // test header + require.Equal(t, header, compressed.Bytes()[:4]) +} diff --git a/config/confighttp/compression.go b/config/confighttp/compression.go index 88ecafe78da..a700bec845b 100644 --- a/config/confighttp/compression.go +++ b/config/confighttp/compression.go @@ -67,24 +67,26 @@ func (r *compressRoundTripper) RoundTrip(req *http.Request) (*http.Response, err } type decompressor struct { - errHandler func(w http.ResponseWriter, r *http.Request, errorMsg string, statusCode int) - base http.Handler - decoders map[string]func(body io.ReadCloser) (io.ReadCloser, error) + errHandler func(w http.ResponseWriter, r *http.Request, errorMsg string, statusCode int) + base http.Handler + decoders map[string]func(body io.ReadCloser) (io.ReadCloser, error) + maxRequestBodySize int64 } // httpContentDecompressor offloads the task of handling compressed HTTP requests // by identifying the compression format in the "Content-Encoding" header and re-writing // request body so that the handlers further in the chain can work on decompressed data. // It supports gzip and deflate/zlib compression. -func httpContentDecompressor(h http.Handler, eh func(w http.ResponseWriter, r *http.Request, errorMsg string, statusCode int), decoders map[string]func(body io.ReadCloser) (io.ReadCloser, error)) http.Handler { +func httpContentDecompressor(h http.Handler, maxRequestBodySize int64, eh func(w http.ResponseWriter, r *http.Request, errorMsg string, statusCode int), decoders map[string]func(body io.ReadCloser) (io.ReadCloser, error)) http.Handler { errHandler := defaultErrorHandler if eh != nil { errHandler = eh } d := &decompressor{ - errHandler: errHandler, - base: h, + maxRequestBodySize: maxRequestBodySize, + errHandler: errHandler, + base: h, decoders: map[string]func(body io.ReadCloser) (io.ReadCloser, error){ "": func(io.ReadCloser) (io.ReadCloser, error) { // Not a compressed payload. Nothing to do. @@ -155,7 +157,7 @@ func (d *decompressor) ServeHTTP(w http.ResponseWriter, r *http.Request) { // "Content-Length" is set to -1 as the size of the decompressed body is unknown. r.Header.Del("Content-Length") r.ContentLength = -1 - r.Body = newBody + r.Body = http.MaxBytesReader(w, newBody, d.maxRequestBodySize) } d.base.ServeHTTP(w, r) } diff --git a/config/confighttp/compression_test.go b/config/confighttp/compression_test.go index 794adda2ec8..db2f7b3b3c0 100644 --- a/config/confighttp/compression_test.go +++ b/config/confighttp/compression_test.go @@ -134,7 +134,7 @@ func TestHTTPCustomDecompression(t *testing.T) { return io.NopCloser(strings.NewReader("decompressed body")), nil }, } - srv := httptest.NewServer(httpContentDecompressor(handler, defaultErrorHandler, decoders)) + srv := httptest.NewServer(httpContentDecompressor(handler, defaultMaxRequestBodySize, defaultErrorHandler, decoders)) t.Cleanup(srv.Close) @@ -253,7 +253,7 @@ func TestHTTPContentDecompressionHandler(t *testing.T) { require.NoError(t, err, "failed to read request body: %v", err) assert.EqualValues(t, testBody, string(body)) w.WriteHeader(http.StatusOK) - }), defaultErrorHandler, noDecoders)) + }), defaultMaxRequestBodySize, defaultErrorHandler, noDecoders)) t.Cleanup(srv.Close) req, err := http.NewRequest(http.MethodGet, srv.URL, tt.reqBody) diff --git a/config/confighttp/confighttp.go b/config/confighttp/confighttp.go index 067f9d3a0ab..afa0aed1063 100644 --- a/config/confighttp/confighttp.go +++ b/config/confighttp/confighttp.go @@ -30,6 +30,7 @@ import ( ) const headerContentEncoding = "Content-Encoding" +const defaultMaxRequestBodySize = 20 * 1024 * 1024 // 20MiB // ClientConfig defines settings for creating an HTTP client. type ClientConfig struct { @@ -233,11 +234,6 @@ func (hcs *ClientConfig) ToClient(ctx context.Context, host component.Host, sett }, nil } -// Deprecated: [v0.99.0] Use ToClient instead. -func (hcs *ClientConfig) ToClientContext(ctx context.Context, host component.Host, settings component.TelemetrySettings) (*http.Client, error) { - return hcs.ToClient(ctx, host, settings) -} - // Custom RoundTripper that adds headers. type headerRoundTripper struct { transport http.RoundTripper @@ -277,7 +273,7 @@ type ServerConfig struct { // RateLimit for this receiver RateLimit *RateLimit `mapstructure:"rate_limit"` - // MaxRequestBodySize sets the maximum request body size in bytes + // MaxRequestBodySize sets the maximum request body size in bytes. Default: 20MiB. MaxRequestBodySize int64 `mapstructure:"max_request_body_size"` // IncludeMetadata propagates the client metadata from the incoming requests to the downstream consumers @@ -289,11 +285,6 @@ type ServerConfig struct { ResponseHeaders map[string]configopaque.String `mapstructure:"response_headers"` } -// Deprecated: [v0.99.0] Use ToListener instead. -func (hss *ServerConfig) ToListenerContext(ctx context.Context) (net.Listener, error) { - return hss.ToListener(ctx) -} - // ToListener creates a net.Listener. func (hss *ServerConfig) ToListener(ctx context.Context) (net.Listener, error) { listener, err := net.Listen("tcp", hss.Endpoint) @@ -344,11 +335,6 @@ func WithDecoder(key string, dec func(body io.ReadCloser) (io.ReadCloser, error) } } -// Deprecated: [v0.99.0] Use ToServer instead. -func (hss *ServerConfig) ToServerContext(ctx context.Context, host component.Host, settings component.TelemetrySettings, handler http.Handler, opts ...ToServerOption) (*http.Server, error) { - return hss.ToServer(ctx, host, settings, handler, opts...) -} - // ToServer creates an http.Server from settings object. func (hss *ServerConfig) ToServer(_ context.Context, host component.Host, settings component.TelemetrySettings, handler http.Handler, opts ...ToServerOption) (*http.Server, error) { internal.WarnOnUnspecifiedHost(settings.Logger, hss.Endpoint) @@ -358,7 +344,11 @@ func (hss *ServerConfig) ToServer(_ context.Context, host component.Host, settin o(serverOpts) } - handler = httpContentDecompressor(handler, serverOpts.errHandler, serverOpts.decoders) + if hss.MaxRequestBodySize <= 0 { + hss.MaxRequestBodySize = defaultMaxRequestBodySize + } + + handler = httpContentDecompressor(handler, hss.MaxRequestBodySize, serverOpts.errHandler, serverOpts.decoders) if hss.MaxRequestBodySize > 0 { handler = maxRequestBodySizeInterceptor(handler, hss.MaxRequestBodySize) diff --git a/config/confighttp/confighttp_test.go b/config/confighttp/confighttp_test.go index 635f9415a2f..99ac9a51201 100644 --- a/config/confighttp/confighttp_test.go +++ b/config/confighttp/confighttp_test.go @@ -4,6 +4,7 @@ package confighttp import ( + "bytes" "context" "errors" "fmt" @@ -13,6 +14,7 @@ import ( "net/http/httptest" "net/url" "path/filepath" + "strings" "testing" "time" @@ -1300,7 +1302,7 @@ func TestServerWithDecoder(t *testing.T) { // test response := &httptest.ResponseRecorder{} - req, err := http.NewRequest(http.MethodGet, srv.Addr, nil) + req, err := http.NewRequest(http.MethodGet, srv.Addr, bytes.NewBuffer([]byte("something"))) require.NoError(t, err, "Error creating request: %v", err) req.Header.Set("Content-Encoding", "something-else") @@ -1310,6 +1312,93 @@ func TestServerWithDecoder(t *testing.T) { } +func TestServerWithDecompression(t *testing.T) { + // prepare + hss := ServerConfig{ + MaxRequestBodySize: 1000, // 1 KB + } + body := []byte(strings.Repeat("a", 1000*1000)) // 1 MB + + srv, err := hss.ToServer( + context.Background(), + componenttest.NewNopHost(), + componenttest.NewNopTelemetrySettings(), + http.HandlerFunc(func(resp http.ResponseWriter, req *http.Request) { + actualBody, err := io.ReadAll(req.Body) + assert.ErrorContains(t, err, "http: request body too large") + assert.Len(t, actualBody, 1000) + + if err != nil { + resp.WriteHeader(http.StatusBadRequest) + } else { + resp.WriteHeader(http.StatusOK) + } + }), + ) + require.NoError(t, err) + + testSrv := httptest.NewServer(srv.Handler) + defer testSrv.Close() + + req, err := http.NewRequest(http.MethodGet, testSrv.URL, compressZstd(t, body)) + require.NoError(t, err, "Error creating request: %v", err) + + req.Header.Set("Content-Encoding", "zstd") + + // test + c := http.Client{} + resp, err := c.Do(req) + require.NoError(t, err, "Error sending request: %v", err) + + _, err = io.ReadAll(resp.Body) + require.NoError(t, err, "Error reading response body: %v", err) + + // verifications is done mostly within the test, but this is only a sanity check + // that we got into the test handler + assert.Equal(t, resp.StatusCode, http.StatusBadRequest) +} + +func TestDefaultMaxRequestBodySize(t *testing.T) { + tests := []struct { + name string + settings ServerConfig + expected int64 + }{ + { + name: "default", + settings: ServerConfig{}, + expected: defaultMaxRequestBodySize, + }, + { + name: "zero", + settings: ServerConfig{MaxRequestBodySize: 0}, + expected: defaultMaxRequestBodySize, + }, + { + name: "negative", + settings: ServerConfig{MaxRequestBodySize: -1}, + expected: defaultMaxRequestBodySize, + }, + { + name: "custom", + settings: ServerConfig{MaxRequestBodySize: 100}, + expected: 100, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + _, err := tt.settings.ToServer( + context.Background(), + componenttest.NewNopHost(), + componenttest.NewNopTelemetrySettings(), + http.HandlerFunc(func(http.ResponseWriter, *http.Request) {}), + ) + require.NoError(t, err) + assert.Equal(t, tt.expected, tt.settings.MaxRequestBodySize) + }) + } +} + type mockHost struct { component.Host ext map[component.ID]component.Component diff --git a/config/confighttp/go.mod b/config/confighttp/go.mod index 819bc18d124..0df43e44bd9 100644 --- a/config/confighttp/go.mod +++ b/config/confighttp/go.mod @@ -1,32 +1,32 @@ module go.opentelemetry.io/collector/config/confighttp -go 1.21 +go 1.21.0 require ( github.com/golang/snappy v0.0.4 github.com/klauspost/compress v1.17.8 github.com/rs/cors v1.10.1 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector v0.100.0 - go.opentelemetry.io/collector/component v0.100.0 - go.opentelemetry.io/collector/config/configauth v0.100.0 - go.opentelemetry.io/collector/config/configcompression v1.7.0 - go.opentelemetry.io/collector/config/configopaque v1.7.0 - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 - go.opentelemetry.io/collector/config/configtls v0.100.0 - go.opentelemetry.io/collector/config/internal v0.100.0 - go.opentelemetry.io/collector/extension v0.100.0 - go.opentelemetry.io/collector/extension/auth v0.100.0 - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 - go.opentelemetry.io/otel v1.26.0 + go.opentelemetry.io/collector v0.102.1 + go.opentelemetry.io/collector/component v0.102.1 + go.opentelemetry.io/collector/config/configauth v0.102.1 + go.opentelemetry.io/collector/config/configcompression v1.9.0 + go.opentelemetry.io/collector/config/configopaque v1.9.0 + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 + go.opentelemetry.io/collector/config/configtls v0.102.1 + go.opentelemetry.io/collector/config/internal v0.102.1 + go.opentelemetry.io/collector/extension v0.102.1 + go.opentelemetry.io/collector/extension/auth v0.102.1 + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 + go.opentelemetry.io/otel v1.27.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - golang.org/x/net v0.24.0 + golang.org/x/net v0.25.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect @@ -34,31 +34,31 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/hashicorp/go-version v1.7.0 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.53.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector/confmap v0.100.0 // indirect - go.opentelemetry.io/collector/featuregate v1.7.0 // indirect - go.opentelemetry.io/collector/pdata v1.7.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect - go.opentelemetry.io/otel/metric v1.26.0 // indirect - go.opentelemetry.io/otel/sdk v1.26.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect - go.opentelemetry.io/otel/trace v1.26.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect + go.opentelemetry.io/collector/confmap v0.102.1 // indirect + go.opentelemetry.io/collector/featuregate v1.9.0 // indirect + go.opentelemetry.io/collector/pdata v1.9.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.34.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/config/confighttp/go.sum b/config/confighttp/go.sum index 666e96bd68b..b200e478308 100644 --- a/config/confighttp/go.sum +++ b/config/confighttp/go.sum @@ -1,7 +1,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= @@ -21,8 +21,8 @@ github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -49,14 +49,14 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= @@ -65,20 +65,20 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 h1:Xs2Ncz0gNihqu9iosIZ5SkBbWo5T8JhhLJFMQL1qmLI= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0/go.mod h1:vy+2G/6NvVMpwGX/NyLqcC41fxepnuKHk16E6IZUcJc= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 h1:9l89oX4ba9kHbBol3Xin3leYJ+252h0zszDtBwyKe2A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0/go.mod h1:XLZfZboOJWHNKUv7eH0inh0E9VV6eWDFB/9yJyTLPp0= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -94,20 +94,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -116,12 +116,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/config/confignet/go.mod b/config/confignet/go.mod index 4d1f2b4813a..f1f33364d78 100644 --- a/config/confignet/go.mod +++ b/config/confignet/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/collector/config/confignet -go 1.21 +go 1.21.0 require ( github.com/stretchr/testify v1.9.0 diff --git a/config/configopaque/go.mod b/config/configopaque/go.mod index 1f8b080f2da..c630c49e211 100644 --- a/config/configopaque/go.mod +++ b/config/configopaque/go.mod @@ -1,10 +1,10 @@ module go.opentelemetry.io/collector/config/configopaque -go 1.21 +go 1.21.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/confmap v0.100.0 + go.opentelemetry.io/collector/confmap v0.102.1 go.uber.org/goleak v1.3.0 gopkg.in/yaml.v3 v3.0.1 ) diff --git a/config/configretry/go.mod b/config/configretry/go.mod index 9458227d2ca..fa25d5627f9 100644 --- a/config/configretry/go.mod +++ b/config/configretry/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/collector/config/configretry -go 1.21 +go 1.21.0 require ( github.com/cenkalti/backoff/v4 v4.3.0 diff --git a/config/configtelemetry/go.mod b/config/configtelemetry/go.mod index 49af6aa800f..e3a49a0bdca 100644 --- a/config/configtelemetry/go.mod +++ b/config/configtelemetry/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/collector/config/configtelemetry -go 1.21 +go 1.21.0 require ( github.com/stretchr/testify v1.9.0 diff --git a/config/configtls/configtls.go b/config/configtls/configtls.go index 2090f775d49..569ae606152 100644 --- a/config/configtls/configtls.go +++ b/config/configtls/configtls.go @@ -376,13 +376,6 @@ func (c Config) loadCert(caPath string) (*x509.CertPool, error) { return certPool, nil } -// LoadTLSConfigContext loads the TLS configuration. -// -// Deprecated: [v0.99.0] Use LoadTLSConfig instead. -func (c ClientConfig) LoadTLSConfigContext(ctx context.Context) (*tls.Config, error) { - return c.LoadTLSConfig(ctx) -} - // LoadTLSConfig loads the TLS configuration. func (c ClientConfig) LoadTLSConfig(_ context.Context) (*tls.Config, error) { if c.Insecure && !c.hasCA() { @@ -398,13 +391,6 @@ func (c ClientConfig) LoadTLSConfig(_ context.Context) (*tls.Config, error) { return tlsCfg, nil } -// LoadTLSConfigContext loads the TLS configuration. -// -// Deprecated: [v0.99.0] Use LoadTLSConfig instead. -func (c ServerConfig) LoadTLSConfigContext(ctx context.Context) (*tls.Config, error) { - return c.LoadTLSConfig(ctx) -} - // LoadTLSConfig loads the TLS configuration. func (c ServerConfig) LoadTLSConfig(_ context.Context) (*tls.Config, error) { tlsCfg, err := c.loadTLSConfig() diff --git a/config/configtls/go.mod b/config/configtls/go.mod index bad5e7c38f8..ef6def16a96 100644 --- a/config/configtls/go.mod +++ b/config/configtls/go.mod @@ -1,11 +1,11 @@ module go.opentelemetry.io/collector/config/configtls -go 1.21 +go 1.21.0 require ( github.com/fsnotify/fsnotify v1.7.0 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/config/configopaque v1.7.0 + go.opentelemetry.io/collector/config/configopaque v1.9.0 ) require ( diff --git a/config/internal/go.mod b/config/internal/go.mod index cdadc8016e1..bc1c7f91db0 100644 --- a/config/internal/go.mod +++ b/config/internal/go.mod @@ -1,19 +1,19 @@ module go.opentelemetry.io/collector/config/internal -go 1.21 +go 1.21.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector v0.100.0 + go.opentelemetry.io/collector v0.102.1 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/hashicorp/go-version v1.7.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/featuregate v1.7.0 // indirect + go.opentelemetry.io/collector/featuregate v1.9.0 // indirect go.uber.org/multierr v1.11.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/config/internal/go.sum b/config/internal/go.sum index c961debf0d0..8ecb783497e 100644 --- a/config/internal/go.sum +++ b/config/internal/go.sum @@ -1,7 +1,7 @@ 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/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= 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= diff --git a/confmap/confmap.go b/confmap/confmap.go index 655ccc07315..8a32216a2df 100644 --- a/confmap/confmap.go +++ b/confmap/confmap.go @@ -41,6 +41,11 @@ func NewFromStringMap(data map[string]any) *Conf { // The confmap.Conf can be unmarshalled into the Collector's config using the "service" package. type Conf struct { k *koanf.Koanf + // If true, upon unmarshaling do not call the Unmarshal function on the struct + // if it implements Unmarshaler and is the top-level struct. + // This avoids running into an infinite recursion where Unmarshaler.Unmarshal and + // Conf.Unmarshal would call each other. + skipTopLevelUnmarshaler bool } // AllKeys returns all keys holding a value, regardless of where they are set. @@ -79,7 +84,7 @@ func (l *Conf) Unmarshal(result any, opts ...UnmarshalOption) error { for _, opt := range opts { opt.apply(&set) } - return decodeConfig(l, result, !set.ignoreUnused) + return decodeConfig(l, result, !set.ignoreUnused, l.skipTopLevelUnmarshaler) } type marshalOption struct{} @@ -146,7 +151,7 @@ func (l *Conf) ToStringMap() map[string]any { // uniqueness of component IDs (see mapKeyStringToMapKeyTextUnmarshalerHookFunc). // Decodes time.Duration from strings. Allows custom unmarshaling for structs implementing // encoding.TextUnmarshaler. Allows custom unmarshaling for structs implementing confmap.Unmarshaler. -func decodeConfig(m *Conf, result any, errorUnused bool) error { +func decodeConfig(m *Conf, result any, errorUnused bool, skipTopLevelUnmarshaler bool) error { dc := &mapstructure.DecoderConfig{ ErrorUnused: errorUnused, Result: result, @@ -159,7 +164,7 @@ func decodeConfig(m *Conf, result any, errorUnused bool) error { mapKeyStringToMapKeyTextUnmarshalerHookFunc(), mapstructure.StringToTimeDurationHookFunc(), mapstructure.TextUnmarshallerHookFunc(), - unmarshalerHookFunc(result), + unmarshalerHookFunc(result, skipTopLevelUnmarshaler), // after the main unmarshaler hook is called, // we unmarshal the embedded structs if present to merge with the result: unmarshalerEmbeddedStructsHookFunc(), @@ -295,7 +300,9 @@ func unmarshalerEmbeddedStructsHookFunc() mapstructure.DecodeHookFuncValue { f := to.Type().Field(i) if f.IsExported() && slices.Contains(strings.Split(f.Tag.Get("mapstructure"), ","), "squash") { if unmarshaler, ok := to.Field(i).Addr().Interface().(Unmarshaler); ok { - if err := unmarshaler.Unmarshal(NewFromStringMap(fromAsMap)); err != nil { + c := NewFromStringMap(fromAsMap) + c.skipTopLevelUnmarshaler = true + if err := unmarshaler.Unmarshal(c); err != nil { return nil, err } // the struct we receive from this unmarshaling only contains fields related to the embedded struct. @@ -317,16 +324,18 @@ func unmarshalerEmbeddedStructsHookFunc() mapstructure.DecodeHookFuncValue { } // Provides a mechanism for individual structs to define their own unmarshal logic, -// by implementing the Unmarshaler interface. -func unmarshalerHookFunc(result any) mapstructure.DecodeHookFuncValue { +// by implementing the Unmarshaler interface, unless skipTopLevelUnmarshaler is +// true and the struct matches the top level object being unmarshaled. +func unmarshalerHookFunc(result any, skipTopLevelUnmarshaler bool) mapstructure.DecodeHookFuncValue { return func(from reflect.Value, to reflect.Value) (any, error) { if !to.CanAddr() { return from.Interface(), nil } toPtr := to.Addr().Interface() - // Need to ignore the top structure to avoid circular dependency. - if toPtr == result { + // Need to ignore the top structure to avoid running into an infinite recursion + // where Unmarshaler.Unmarshal and Conf.Unmarshal would call each other. + if toPtr == result && skipTopLevelUnmarshaler { return from.Interface(), nil } @@ -344,7 +353,9 @@ func unmarshalerHookFunc(result any) mapstructure.DecodeHookFuncValue { unmarshaler = reflect.New(to.Type()).Interface().(Unmarshaler) } - if err := unmarshaler.Unmarshal(NewFromStringMap(from.Interface().(map[string]any))); err != nil { + c := NewFromStringMap(from.Interface().(map[string]any)) + c.skipTopLevelUnmarshaler = true + if err := unmarshaler.Unmarshal(c); err != nil { return nil, err } @@ -381,6 +392,7 @@ func marshalerHookFunc(orig any) mapstructure.DecodeHookFuncValue { type Unmarshaler interface { // Unmarshal a Conf into the struct in a custom way. // The Conf for this specific component may be nil or empty if no config available. + // This method should only be called by decoding hooks when calling Conf.Unmarshal. Unmarshal(component *Conf) error } diff --git a/confmap/confmap_test.go b/confmap/confmap_test.go index a1ea94e1fe4..a8a331a6e1b 100644 --- a/confmap/confmap_test.go +++ b/confmap/confmap_test.go @@ -485,7 +485,7 @@ func TestUnmarshaler(t *testing.T) { tc := &testConfig{} assert.NoError(t, cfgMap.Unmarshal(tc)) - assert.Equal(t, "make sure this", tc.Another) + assert.Equal(t, "make sure this is only called directly", tc.Another) assert.Equal(t, "make sure this is called", tc.Next.String) assert.Equal(t, "make sure this is also called", tc.EmbeddedConfig.Some) assert.Equal(t, "this better be also called2", tc.EmbeddedConfig2.Some2) @@ -523,6 +523,7 @@ func TestEmbeddedUnmarshalerError(t *testing.T) { } func TestEmbeddedMarshalerError(t *testing.T) { + t.Skip("This test fails because the main struct calls the embedded struct Unmarshal method, and doesn't execute the embedded struct hook.") cfgMap := NewFromStringMap(map[string]any{ "next": map[string]any{ "string": "make sure this", @@ -546,7 +547,7 @@ func TestUnmarshalerKeepAlreadyInitialized(t *testing.T) { private: "keep already configured members", }} assert.NoError(t, cfgMap.Unmarshal(tc)) - assert.Equal(t, "make sure this", tc.Another) + assert.Equal(t, "make sure this is only called directly", tc.Another) assert.Equal(t, "make sure this is called", tc.Next.String) assert.Equal(t, "keep already configured members", tc.Next.private) } @@ -563,7 +564,7 @@ func TestDirectUnmarshaler(t *testing.T) { private: "keep already configured members", }} assert.NoError(t, tc.Unmarshal(cfgMap)) - assert.Equal(t, "make sure this is only called directly", tc.Another) + assert.Equal(t, "make sure this is only called directly is only called directly", tc.Another) assert.Equal(t, "make sure this is called", tc.Next.String) assert.Equal(t, "keep already configured members", tc.Next.private) } @@ -827,3 +828,26 @@ func TestUnmarshalOwnThroughEmbeddedSquashedStruct(t *testing.T) { require.Equal(t, "success", cfg.Cfg.EmbeddedStructWithUnmarshal.success) require.Equal(t, "bar", cfg.Cfg.EmbeddedStructWithUnmarshal.Foo) } + +type Recursive struct { + Foo string `mapstructure:"foo"` +} + +func (r *Recursive) Unmarshal(conf *Conf) error { + newR := &Recursive{} + if err := conf.Unmarshal(newR); err != nil { + return err + } + *r = *newR + return nil +} + +// Tests that a struct can unmarshal itself by creating a new copy of itself, unmarshaling itself, and setting its value. +func TestRecursiveUnmarshaling(t *testing.T) { + conf := NewFromStringMap(map[string]any{ + "foo": "something", + }) + r := &Recursive{} + require.NoError(t, conf.Unmarshal(r)) + require.Equal(t, "something", r.Foo) +} diff --git a/confmap/converter.go b/confmap/converter.go index 2dce87e496e..0e3a5c03f2e 100644 --- a/confmap/converter.go +++ b/confmap/converter.go @@ -5,10 +5,18 @@ package confmap // import "go.opentelemetry.io/collector/confmap" import ( "context" + + "go.uber.org/zap" ) // ConverterSettings are the settings to initialize a Converter. -type ConverterSettings struct{} +type ConverterSettings struct { + // Logger is a zap.Logger that will be passed to Converters. + // Converters should be able to rely on the Logger being non-nil; + // when instantiating a Converter with a ConverterFactory, + // nil Logger references should be replaced with a no-op Logger. + Logger *zap.Logger +} // ConverterFactory defines a factory that can be used to instantiate // new instances of a Converter. diff --git a/confmap/converter/expandconverter/expand.go b/confmap/converter/expandconverter/expand.go index f07617cd3d6..029b48eaf17 100644 --- a/confmap/converter/expandconverter/expand.go +++ b/confmap/converter/expandconverter/expand.go @@ -12,6 +12,7 @@ import ( "go.uber.org/zap" "go.opentelemetry.io/collector/confmap" + "go.opentelemetry.io/collector/confmap/internal/envvar" ) type converter struct { @@ -21,55 +22,64 @@ type converter struct { loggedDeprecations map[string]struct{} } -// New returns a confmap.Converter, that expands all environment variables for a given confmap.Conf. -// -// Notice: This API is experimental. -// -// Deprecated: [v0.99.0] Use NewFactory instead. -func New(_ confmap.ConverterSettings) confmap.Converter { - return converter{ - loggedDeprecations: make(map[string]struct{}), - logger: zap.NewNop(), // TODO: pass logger in ConverterSettings - } -} - // NewFactory returns a factory for a confmap.Converter, // which expands all environment variables for a given confmap.Conf. func NewFactory() confmap.ConverterFactory { - return confmap.NewConverterFactory(New) + return confmap.NewConverterFactory(newConverter) +} + +func newConverter(set confmap.ConverterSettings) confmap.Converter { + return converter{ + loggedDeprecations: make(map[string]struct{}), + logger: set.Logger, + } } func (c converter) Convert(_ context.Context, conf *confmap.Conf) error { + var err error out := make(map[string]any) for _, k := range conf.AllKeys() { - out[k] = c.expandStringValues(conf.Get(k)) + out[k], err = c.expandStringValues(conf.Get(k)) + if err != nil { + return err + } } return conf.Merge(confmap.NewFromStringMap(out)) } -func (c converter) expandStringValues(value any) any { +func (c converter) expandStringValues(value any) (any, error) { + var err error switch v := value.(type) { case string: return c.expandEnv(v) case []any: nslice := make([]any, 0, len(v)) for _, vint := range v { - nslice = append(nslice, c.expandStringValues(vint)) + var nv any + nv, err = c.expandStringValues(vint) + if err != nil { + return nil, err + } + nslice = append(nslice, nv) } - return nslice + return nslice, nil case map[string]any: nmap := map[string]any{} for mk, mv := range v { - nmap[mk] = c.expandStringValues(mv) + nmap[mk], err = c.expandStringValues(mv) + if err != nil { + return nil, err + } } - return nmap + return nmap, nil default: - return v + return v, nil } } -func (c converter) expandEnv(s string) string { - return os.Expand(s, func(str string) string { +func (c converter) expandEnv(s string) (string, error) { + var err error + res := os.Expand(s, func(str string) string { // Matches on $VAR style environment variables // in order to make sure we don't log a warning for ${VAR} var regex = regexp.MustCompile(fmt.Sprintf(`\$%s`, regexp.QuoteMeta(str))) @@ -85,6 +95,20 @@ func (c converter) expandEnv(s string) string { if str == "$" { return "$" } - return os.Getenv(str) + // For $ENV style environment variables os.Expand returns once it hits a character that isn't an underscore or + // an alphanumeric character - so we cannot detect those malformed environment variables. + // For ${ENV} style variables we can detect those kinds of env var names! + if !envvar.ValidationRegexp.MatchString(str) { + err = fmt.Errorf("environment variable %q has invalid name: must match regex %s", str, envvar.ValidationPattern) + return "" + } + val, exists := os.LookupEnv(str) + if !exists { + c.logger.Warn("Configuration references unset environment variable", zap.String("name", str)) + } else if len(val) == 0 { + c.logger.Info("Configuration references empty environment variable", zap.String("name", str)) + } + return val }) + return res, err } diff --git a/confmap/converter/expandconverter/expand_test.go b/confmap/converter/expandconverter/expand_test.go index 424a8be0319..45e10f8536a 100644 --- a/confmap/converter/expandconverter/expand_test.go +++ b/confmap/converter/expandconverter/expand_test.go @@ -17,6 +17,7 @@ import ( "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/confmap/internal/envvar" ) func TestNewExpandConverter(t *testing.T) { @@ -176,13 +177,16 @@ func TestDeprecatedWarning(t *testing.T) { t.Setenv("PORT", "4317") t.Setenv("HOST_NAME", "127.0.0.2") - t.Setenv("HOST.NAME", "127.0.0.3") + t.Setenv("HOSTNAME", "127.0.0.3") + + t.Setenv("BAD!HOST", "127.0.0.2") var testCases = []struct { name string input map[string]any expectedOutput map[string]any expectedWarnings []string + expectedError error }{ { name: "no warning", @@ -193,6 +197,7 @@ func TestDeprecatedWarning(t *testing.T) { "test": "127.0.0.1:4317", }, expectedWarnings: []string{}, + expectedError: nil, }, { name: "one deprecated var", @@ -203,6 +208,7 @@ func TestDeprecatedWarning(t *testing.T) { "test": "127.0.0.1:4317", }, expectedWarnings: []string{"PORT"}, + expectedError: nil, }, { name: "two deprecated vars", @@ -213,6 +219,7 @@ func TestDeprecatedWarning(t *testing.T) { "test": "127.0.0.1:4317", }, expectedWarnings: []string{"HOST", "PORT"}, + expectedError: nil, }, { name: "one depracated serveral times", @@ -225,25 +232,63 @@ func TestDeprecatedWarning(t *testing.T) { "test2": "127.0.0.1", }, expectedWarnings: []string{"HOST"}, + expectedError: nil, }, { name: "one warning", input: map[string]any{ - "test": "$HOST_NAME,${HOST.NAME}", + "test": "$HOST_NAME,${HOSTNAME}", }, expectedOutput: map[string]any{ "test": "127.0.0.2,127.0.0.3", }, expectedWarnings: []string{"HOST_NAME"}, + expectedError: nil, + }, + { + name: "malformed environment variable", + input: map[string]any{ + "test": "${BAD!HOST}", + }, + expectedOutput: map[string]any{ + "test": "blah", + }, + expectedWarnings: []string{}, + expectedError: fmt.Errorf("environment variable \"BAD!HOST\" has invalid name: must match regex %s", envvar.ValidationRegexp), + }, + { + name: "malformed environment variable number", + input: map[string]any{ + "test": "${2BADHOST}", + }, + expectedOutput: map[string]any{ + "test": "blah", + }, + expectedWarnings: []string{}, + expectedError: fmt.Errorf("environment variable \"2BADHOST\" has invalid name: must match regex %s", envvar.ValidationRegexp), + }, + { + name: "malformed environment variable unicode", + input: map[string]any{ + "test": "${😊BADHOST}", + }, + expectedOutput: map[string]any{ + "test": "blah", + }, + expectedWarnings: []string{}, + expectedError: fmt.Errorf("environment variable \"😊BADHOST\" has invalid name: must match regex %s", envvar.ValidationRegexp), }, } + for _, tt := range testCases { t.Run(tt.name, func(t *testing.T) { conf := confmap.NewFromStringMap(tt.input) conv, logs := NewTestConverter() - require.NoError(t, conv.Convert(context.Background(), conf)) - - assert.Equal(t, tt.expectedOutput, conf.ToStringMap()) + err := conv.Convert(context.Background(), conf) + assert.Equal(t, tt.expectedError, err) + if tt.expectedError == nil { + assert.Equal(t, tt.expectedOutput, conf.ToStringMap()) + } assert.Equal(t, len(tt.expectedWarnings), len(logs.All())) for i, variable := range tt.expectedWarnings { errorMsg := fmt.Sprintf(msgTemplate, variable) @@ -253,6 +298,38 @@ func TestDeprecatedWarning(t *testing.T) { } } +func TestNewExpandConverterWithErrors(t *testing.T) { + var testCases = []struct { + name string // test case name (also file name containing config yaml) + expectedError error + }{ + { + name: "expand-list-error.yaml", + expectedError: fmt.Errorf("environment variable \"EXTRA_LIST_^VALUE_2\" has invalid name: must match regex %s", envvar.ValidationRegexp), + }, + { + name: "expand-list-map-error.yaml", + expectedError: fmt.Errorf("environment variable \"EXTRA_LIST_MAP_V#ALUE_2\" has invalid name: must match regex %s", envvar.ValidationRegexp), + }, + { + name: "expand-map-error.yaml", + expectedError: fmt.Errorf("environment variable \"EX#TRA\" has invalid name: must match regex %s", envvar.ValidationRegexp), + }, + } + + for _, test := range testCases { + t.Run(test.name, func(t *testing.T) { + conf, err := confmaptest.LoadConf(filepath.Join("testdata", "errors", test.name)) + require.NoError(t, err, "Unable to get config") + + // Test that expanded configs are the same with the simple config with no env vars. + err = createConverter().Convert(context.Background(), conf) + + assert.Equal(t, test.expectedError, err) + }) + } +} + func createConverter() confmap.Converter { - return NewFactory().Create(confmap.ConverterSettings{}) + return NewFactory().Create(confmap.ConverterSettings{Logger: zap.NewNop()}) } diff --git a/confmap/converter/expandconverter/go.mod b/confmap/converter/expandconverter/go.mod index 9e9492973b4..1ebfb017ef5 100644 --- a/confmap/converter/expandconverter/go.mod +++ b/confmap/converter/expandconverter/go.mod @@ -1,10 +1,10 @@ module go.opentelemetry.io/collector/confmap/converter/expandconverter -go 1.21 +go 1.21.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/confmap v0.100.0 + go.opentelemetry.io/collector/confmap v0.102.1 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 ) diff --git a/confmap/converter/expandconverter/testdata/errors/expand-list-error.yaml b/confmap/converter/expandconverter/testdata/errors/expand-list-error.yaml new file mode 100644 index 00000000000..a5cc8ee4b72 --- /dev/null +++ b/confmap/converter/expandconverter/testdata/errors/expand-list-error.yaml @@ -0,0 +1,4 @@ +test_map: + extra_list: + - "some list value_1" + - "${EXTRA_LIST_^VALUE_2}" diff --git a/confmap/converter/expandconverter/testdata/errors/expand-list-map-error.yaml b/confmap/converter/expandconverter/testdata/errors/expand-list-map-error.yaml new file mode 100644 index 00000000000..1933594bd8a --- /dev/null +++ b/confmap/converter/expandconverter/testdata/errors/expand-list-map-error.yaml @@ -0,0 +1,3 @@ +test_map: + extra_list_map: + - { recv.1: "some list map value_1",recv.2: "${EXTRA_LIST_MAP_V#ALUE_2}" } diff --git a/confmap/converter/expandconverter/testdata/errors/expand-map-error.yaml b/confmap/converter/expandconverter/testdata/errors/expand-map-error.yaml new file mode 100644 index 00000000000..67577789d1b --- /dev/null +++ b/confmap/converter/expandconverter/testdata/errors/expand-map-error.yaml @@ -0,0 +1,2 @@ +test_map: + extra: "${EX#TRA}" diff --git a/confmap/doc_test.go b/confmap/doc_test.go index d026bc2d733..35492d3cae0 100644 --- a/confmap/doc_test.go +++ b/confmap/doc_test.go @@ -75,6 +75,21 @@ func (n *NetworkScrape) Unmarshal(c *confmap.Conf) error { return nil } +type ManualScrapeInfo struct { + Disk string + Scrape time.Duration +} + +func (m *ManualScrapeInfo) Unmarshal(c *confmap.Conf) error { + m.Disk = c.Get("disk").(string) + if c.Get("vinyl") == "33" { + m.Scrape = 10 * time.Second + } else { + m.Scrape = 2 * time.Second + } + return nil +} + type RouterScrape struct { NetworkScrape `mapstructure:",squash"` } @@ -95,3 +110,18 @@ func Example_embeddedManualUnmarshaling() { // Wifi: true // Enabled: true } + +func Example_manualUnmarshaling() { + conf := confmap.NewFromStringMap(map[string]any{ + "disk": "Beatles", + "vinyl": "33", + }) + scrapeInfo := &ManualScrapeInfo{} + if err := conf.Unmarshal(scrapeInfo, confmap.WithIgnoreUnused()); err != nil { + panic(err) + } + fmt.Printf("Configuration contains the following:\nDisk: %q\nScrape: %s\n", scrapeInfo.Disk, scrapeInfo.Scrape) + //Output: Configuration contains the following: + // Disk: "Beatles" + // Scrape: 10s +} diff --git a/confmap/expand.go b/confmap/expand.go index a913e768942..768395f76fd 100644 --- a/confmap/expand.go +++ b/confmap/expand.go @@ -76,21 +76,24 @@ func (mr *Resolver) expandValue(ctx context.Context, value any) (any, bool, erro return value, false, nil } -// findURI attempts to find the first expandable URI in input. It returns an expandable +// findURI attempts to find the first potentially expandable URI in input. It returns a potentially expandable // URI, or an empty string if none are found. // Note: findURI is only called when input contains a closing bracket. -func findURI(input string) string { +func (mr *Resolver) findURI(input string) string { closeIndex := strings.Index(input, "}") remaining := input[closeIndex+1:] openIndex := strings.LastIndex(input[:closeIndex+1], "${") - // if there is a missing "${" or the uri does not contain ":", check the next URI. - if openIndex < 0 || !strings.Contains(input[openIndex:closeIndex+1], ":") { + // if there is any of: + // - a missing "${" + // - there is no default scheme AND no scheme is detected because no `:` is found. + // then check the next URI. + if openIndex < 0 || (mr.defaultScheme == "" && !strings.Contains(input[openIndex:closeIndex+1], ":")) { // if remaining does not contain "}", there are no URIs left: stop recursion. if !strings.Contains(remaining, "}") { return "" } - return findURI(remaining) + return mr.findURI(remaining) } return input[openIndex : closeIndex+1] @@ -98,8 +101,9 @@ func findURI(input string) string { // findAndExpandURI attempts to find and expand the first occurrence of an expandable URI in input. If an expandable URI is found it // returns the input with the URI expanded, true and nil. Otherwise, it returns the unchanged input, false and the expanding error. +// This method expects input to start with ${ and end with } func (mr *Resolver) findAndExpandURI(ctx context.Context, input string) (any, bool, error) { - uri := findURI(input) + uri := mr.findURI(input) if uri == "" { // No URI found, return. return input, false, nil @@ -113,15 +117,15 @@ func (mr *Resolver) findAndExpandURI(ctx context.Context, input string) (any, bo if err != nil { return input, false, err } - repl, err := toString(uri, expanded) + repl, err := toString(expanded) if err != nil { - return input, false, err + return input, false, fmt.Errorf("expanding %v: %w", uri, err) } return strings.ReplaceAll(input, uri, repl), changed, err } // toString attempts to convert input to a string. -func toString(strURI string, input any) (string, error) { +func toString(input any) (string, error) { // This list must be kept in sync with checkRawConfType. val := reflect.ValueOf(input) switch val.Kind() { @@ -134,15 +138,23 @@ func toString(strURI string, input any) (string, error) { case reflect.Bool: return strconv.FormatBool(val.Bool()), nil default: - return "", fmt.Errorf("expanding %v, expected convertable to string value type, got %q(%T)", strURI, input, input) + return "", fmt.Errorf("expected convertable to string value type, got %q(%T)", input, input) } } -func (mr *Resolver) expandURI(ctx context.Context, uri string) (any, bool, error) { - lURI, err := newLocation(uri[2 : len(uri)-1]) +func (mr *Resolver) expandURI(ctx context.Context, input string) (any, bool, error) { + // strip ${ and } + uri := input[2 : len(input)-1] + + if !strings.Contains(uri, ":") { + uri = fmt.Sprintf("%s:%s", mr.defaultScheme, uri) + } + + lURI, err := newLocation(uri) if err != nil { return nil, false, err } + if strings.Contains(lURI.opaqueValue, "$") { return nil, false, fmt.Errorf("the uri %q contains unsupported characters ('$')", lURI.asString()) } diff --git a/confmap/expand_test.go b/confmap/expand_test.go index c1dc6646152..b7bfc59483d 100644 --- a/confmap/expand_test.go +++ b/confmap/expand_test.go @@ -99,9 +99,10 @@ func TestResolverExpandMapAndSliceValues(t *testing.T) { func TestResolverExpandStringValues(t *testing.T) { tests := []struct { - name string - input string - output any + name string + input string + output any + defaultProvider bool }{ // Embedded. { @@ -109,11 +110,23 @@ func TestResolverExpandStringValues(t *testing.T) { input: "${HOST}:${PORT}", output: "${HOST}:${PORT}", }, + { + name: "NoMatchOldStyleDefaultProvider", + input: "${HOST}:${PORT}", + output: "localhost:3044", + defaultProvider: true, + }, { name: "NoMatchOldStyleNoBrackets", input: "${HOST}:$PORT", output: "${HOST}:$PORT", }, + { + name: "NoMatchOldStyleNoBracketsDefaultProvider", + input: "${HOST}:$PORT", + output: "localhost:$PORT", + defaultProvider: true, + }, { name: "ComplexValue", input: "${env:COMPLEX_VALUE}", @@ -139,6 +152,12 @@ func TestResolverExpandStringValues(t *testing.T) { input: "${env:HOST}:${PORT}", output: "localhost:${PORT}", }, + { + name: "EmbeddedNewAndOldStyleDefaultProvider", + input: "${env:HOST}:${PORT}", + output: "localhost:3044", + defaultProvider: true, + }, { name: "Int", input: "test_${env:INT}", @@ -181,11 +200,23 @@ func TestResolverExpandStringValues(t *testing.T) { input: "${test:localhost:${env:PORT}}", output: "localhost:3044", }, + { + name: "NestedDefaultProvider", + input: "${test:localhost:${PORT}}", + output: "localhost:3044", + defaultProvider: true, + }, { name: "EmbeddedInNested", input: "${test:${env:HOST}:${env:PORT}}", output: "localhost:3044", }, + { + name: "EmbeddedInNestedDefaultProvider", + input: "${test:${HOST}:${PORT}}", + output: "localhost:3044", + defaultProvider: true, + }, { name: "EmbeddedAndNested", input: "${test:localhost:${env:PORT}}?os=${env:OS}", @@ -202,31 +233,67 @@ func TestResolverExpandStringValues(t *testing.T) { input: "env:HOST}", output: "env:HOST}", }, + { + name: "NoMatchMissingOpeningBracketDefaultProvider", + input: "env:HOST}", + output: "env:HOST}", + defaultProvider: true, + }, { name: "NoMatchMissingClosingBracket", input: "${HOST", output: "${HOST", }, + { + name: "NoMatchMissingClosingBracketDefaultProvider", + input: "${HOST", + output: "${HOST", + defaultProvider: true, + }, { name: "NoMatchBracketsWithout$", input: "HO{ST}", output: "HO{ST}", }, + { + name: "NoMatchBracketsWithout$DefaultProvider", + input: "HO{ST}", + output: "HO{ST}", + defaultProvider: true, + }, { name: "NoMatchOnlyMissingClosingBracket", input: "${env:HOST${env:PORT?os=${env:OS", output: "${env:HOST${env:PORT?os=${env:OS", }, + { + name: "NoMatchOnlyMissingClosingBracketDefaultProvider", + input: "${env:HOST${env:PORT?os=${env:OS", + output: "${env:HOST${env:PORT?os=${env:OS", + defaultProvider: true, + }, { name: "NoMatchOnlyMissingOpeningBracket", input: "env:HOST}env:PORT}?os=env:OS}", output: "env:HOST}env:PORT}?os=env:OS}", }, + { + name: "NoMatchOnlyMissingOpeningBracketDefaultProvider", + input: "env:HOST}env:PORT}?os=env:OS}", + output: "env:HOST}env:PORT}?os=env:OS}", + defaultProvider: true, + }, { name: "NoMatchCloseBeforeOpen", input: "env:HOST}${env:PORT", output: "env:HOST}${env:PORT", }, + { + name: "NoMatchCloseBeforeOpenDefaultProvider", + input: "env:HOST}${env:PORT", + output: "env:HOST}${env:PORT", + defaultProvider: true, + }, { name: "NoMatchOldStyleNested", input: "${test:localhost:${PORT}}", @@ -238,6 +305,12 @@ func TestResolverExpandStringValues(t *testing.T) { input: "env:HOST}${env:PORT}", output: "env:HOST}3044", }, + { + name: "PartialMatchMissingOpeningBracketFirstDefaultProvider", + input: "env:HOST}${PORT}", + output: "env:HOST}3044", + defaultProvider: true, + }, { name: "PartialMatchMissingOpeningBracketLast", input: "${env:HOST}env:PORT}", @@ -283,6 +356,28 @@ func TestResolverExpandStringValues(t *testing.T) { input: "${env:HOST${env:PORT}?os=${env:OS&pr=${env:PR}", output: "${env:HOST3044?os=${env:OS&pr=amd", }, + { + name: "SchemeAfterNoSchemeIsExpanded", + input: "${HOST}${env:PORT}", + output: "${HOST}3044", + }, + { + name: "SchemeAfterNoSchemeIsExpandedDefaultProvider", + input: "${HOST}${env:PORT}", + output: "localhost3044", + defaultProvider: true, + }, + { + name: "SchemeBeforeNoSchemeIsExpanded", + input: "${env:HOST}${PORT}", + output: "localhost${PORT}", + }, + { + name: "SchemeBeforeNoSchemeIsExpandedDefaultProvider", + input: "${env:HOST}${PORT}", + output: "localhost3044", + defaultProvider: true, + }, } for _, tt := range tests { @@ -295,7 +390,12 @@ func TestResolverExpandStringValues(t *testing.T) { return NewRetrieved(uri[5:]) }) - resolver, err := NewResolver(ResolverSettings{URIs: []string{"input:"}, ProviderFactories: []ProviderFactory{provider, newEnvProvider(), testProvider}, ConverterFactories: nil}) + envProvider := newEnvProvider() + set := ResolverSettings{URIs: []string{"input:"}, ProviderFactories: []ProviderFactory{provider, envProvider, testProvider}, ConverterFactories: nil} + if tt.defaultProvider { + set.DefaultScheme = "env" + } + resolver, err := NewResolver(set) require.NoError(t, err) cfgMap, err := resolver.Resolve(context.Background()) @@ -307,6 +407,11 @@ func TestResolverExpandStringValues(t *testing.T) { func newEnvProvider() ProviderFactory { return newFakeProvider("env", func(_ context.Context, uri string, _ WatcherFunc) (*Retrieved, error) { + // When using `env` as the default scheme for tests, the uri will not include `env:`. + // Instead of duplicating the switch cases, the scheme is added instead. + if uri[0:4] != "env:" { + uri = "env:" + uri + } switch uri { case "env:COMPLEX_VALUE": return NewRetrieved([]any{"localhost:3042"}) @@ -457,5 +562,18 @@ func TestResolverExpandStringValueInvalidReturnValue(t *testing.T) { require.NoError(t, err) _, err = resolver.Resolve(context.Background()) - assert.EqualError(t, err, `expanding ${test:PORT}, expected convertable to string value type, got ['ӛ']([]interface {})`) + assert.EqualError(t, err, `expanding ${test:PORT}: expected convertable to string value type, got ['ӛ']([]interface {})`) +} + +func TestResolverDefaultProviderExpand(t *testing.T) { + provider := newFakeProvider("input", func(context.Context, string, WatcherFunc) (*Retrieved, error) { + return NewRetrieved(map[string]any{"foo": "${HOST}"}) + }) + + resolver, err := NewResolver(ResolverSettings{URIs: []string{"input:"}, ProviderFactories: []ProviderFactory{provider, newEnvProvider()}, DefaultScheme: "env", ConverterFactories: nil}) + require.NoError(t, err) + + cfgMap, err := resolver.Resolve(context.Background()) + require.NoError(t, err) + assert.Equal(t, map[string]any{"foo": "localhost"}, cfgMap.ToStringMap()) } diff --git a/confmap/go.mod b/confmap/go.mod index 10e84cb18b5..6a0cbf641ea 100644 --- a/confmap/go.mod +++ b/confmap/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/collector/confmap -go 1.21 +go 1.21.0 require ( github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 diff --git a/confmap/internal/envvar/pattern.go b/confmap/internal/envvar/pattern.go new file mode 100644 index 00000000000..6ce639ec275 --- /dev/null +++ b/confmap/internal/envvar/pattern.go @@ -0,0 +1,10 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package envvar // import "go.opentelemetry.io/collector/confmap/internal/envvar" + +import "regexp" + +const ValidationPattern = `^[a-zA-Z_][a-zA-Z0-9_]*$` + +var ValidationRegexp = regexp.MustCompile(ValidationPattern) diff --git a/confmap/internal/mapstructure/encoder.go b/confmap/internal/mapstructure/encoder.go index 408560e2262..d0e222e08b6 100644 --- a/confmap/internal/mapstructure/encoder.go +++ b/confmap/internal/mapstructure/encoder.go @@ -168,11 +168,18 @@ func (e *Encoder) encodeMap(value reflect.Value) (any, error) { if err != nil { return nil, fmt.Errorf("error encoding key: %w", err) } - key, ok := encoded.(string) - if !ok { - return nil, fmt.Errorf("%w key %q, kind: %v", errNonStringEncodedKey, iterator.Key().Interface(), iterator.Key().Kind()) + + v := reflect.ValueOf(encoded) + var key string + + switch v.Kind() { + case reflect.String: + key = v.String() + default: + return nil, fmt.Errorf("%w, key: %q, kind: %v, type: %T", errNonStringEncodedKey, iterator.Key().Interface(), iterator.Key().Kind(), encoded) } - if _, ok = result[key]; ok { + + if _, ok := result[key]; ok { return nil, fmt.Errorf("duplicate key %q while encoding", key) } if result[key], err = e.encode(iterator.Value()); err != nil { diff --git a/confmap/internal/mapstructure/encoder_test.go b/confmap/internal/mapstructure/encoder_test.go index fac12e8a6df..54800e7a740 100644 --- a/confmap/internal/mapstructure/encoder_test.go +++ b/confmap/internal/mapstructure/encoder_test.go @@ -47,6 +47,8 @@ func (tID TestID) MarshalText() (text []byte, err error) { return []byte(out), nil } +type TestStringLike string + func TestEncode(t *testing.T) { enc := New(&EncoderConfig{ EncodeHook: TextMarshalerHookFunc(), @@ -63,6 +65,22 @@ func TestEncode(t *testing.T) { input: TestID("type"), want: "type_", }, + "MapWithTextMarshalerKey": { + input: map[TestID]TestSimpleStruct{ + TestID("type"): {Value: "value"}, + }, + want: map[string]any{ + "type_": map[string]any{"value": "value"}, + }, + }, + "MapWithoutTextMarshalerKey": { + input: map[TestStringLike]TestSimpleStruct{ + TestStringLike("key"): {Value: "value"}, + }, + want: map[string]any{ + "key": map[string]any{"value": "value"}, + }, + }, "WithSlice": { input: []TestID{ TestID("nop"), diff --git a/confmap/provider.go b/confmap/provider.go index 95c0581327e..192577ed4d8 100644 --- a/confmap/provider.go +++ b/confmap/provider.go @@ -89,7 +89,6 @@ type Provider interface { type WatcherFunc func(*ChangeEvent) // ChangeEvent describes the particular change event that happened with the config. -// TODO: see if this can be eliminated. type ChangeEvent struct { // Error is nil if the config is changed and needs to be re-fetched. // Any non-nil error indicates that there was a problem with watching the config changes. diff --git a/confmap/provider/envprovider/go.mod b/confmap/provider/envprovider/go.mod index 9e9fed7326c..8a63caa16aa 100644 --- a/confmap/provider/envprovider/go.mod +++ b/confmap/provider/envprovider/go.mod @@ -1,10 +1,10 @@ module go.opentelemetry.io/collector/confmap/provider/envprovider -go 1.21 +go 1.21.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/confmap v0.100.0 + go.opentelemetry.io/collector/confmap v0.102.1 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 ) diff --git a/confmap/provider/envprovider/provider.go b/confmap/provider/envprovider/provider.go index c153893cb87..50192b5d994 100644 --- a/confmap/provider/envprovider/provider.go +++ b/confmap/provider/envprovider/provider.go @@ -12,40 +12,41 @@ import ( "go.uber.org/zap" "go.opentelemetry.io/collector/confmap" + "go.opentelemetry.io/collector/confmap/internal/envvar" "go.opentelemetry.io/collector/confmap/provider/internal" ) -const schemeName = "env" +const ( + schemeName = "env" +) type provider struct { logger *zap.Logger } -// NewWithSettings returns a new confmap.Provider that reads the configuration from the given environment variable. +// NewFactory returns a factory for a confmap.Provider that reads the configuration from the given environment variable. // // This Provider supports "env" scheme, and can be called with a selector: // `env:NAME_OF_ENVIRONMENT_VARIABLE` -// -// Deprecated: [v0.99.0] Use NewFactory instead. -func NewWithSettings(ps confmap.ProviderSettings) confmap.Provider { +func NewFactory() confmap.ProviderFactory { + return confmap.NewProviderFactory(newProvider) +} + +func newProvider(ps confmap.ProviderSettings) confmap.Provider { return &provider{ logger: ps.Logger, } } -// NewFactory returns a factory for a confmap.Provider that reads the configuration from the given environment variable. -// -// This Provider supports "env" scheme, and can be called with a selector: -// `env:NAME_OF_ENVIRONMENT_VARIABLE` -func NewFactory() confmap.ProviderFactory { - return confmap.NewProviderFactory(NewWithSettings) -} - func (emp *provider) Retrieve(_ context.Context, uri string, _ confmap.WatcherFunc) (*confmap.Retrieved, error) { if !strings.HasPrefix(uri, schemeName+":") { return nil, fmt.Errorf("%q uri is not supported by %q provider", uri, schemeName) } envVarName := uri[len(schemeName)+1:] + if !envvar.ValidationRegexp.MatchString(envVarName) { + return nil, fmt.Errorf("environment variable %q has invalid name: must match regex %s", envVarName, envvar.ValidationPattern) + + } val, exists := os.LookupEnv(envVarName) if !exists { emp.logger.Warn("Configuration references unset environment variable", zap.String("name", envVarName)) diff --git a/confmap/provider/envprovider/provider_test.go b/confmap/provider/envprovider/provider_test.go index c5fcbd91eee..1e89d542618 100644 --- a/confmap/provider/envprovider/provider_test.go +++ b/confmap/provider/envprovider/provider_test.go @@ -5,6 +5,7 @@ package envprovider import ( "context" + "fmt" "testing" "github.com/stretchr/testify/assert" @@ -14,6 +15,7 @@ import ( "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/confmap/internal/envvar" ) const envSchemePrefix = schemeName + ":" @@ -54,7 +56,7 @@ func TestInvalidYAML(t *testing.T) { } func TestEnv(t *testing.T) { - const envName = "default-config" + const envName = "default_config" t.Setenv(envName, validYAML) env := createProvider() @@ -72,12 +74,12 @@ func TestEnv(t *testing.T) { } func TestEnvWithLogger(t *testing.T) { - const envName = "default-config" + const envName = "default_config" t.Setenv(envName, validYAML) core, ol := observer.New(zap.WarnLevel) logger := zap.New(core) - env := NewWithSettings(confmap.ProviderSettings{Logger: logger}) + env := NewFactory().Create(confmap.ProviderSettings{Logger: logger}) ret, err := env.Retrieve(context.Background(), envSchemePrefix+envName, nil) require.NoError(t, err) retMap, err := ret.AsConf() @@ -93,11 +95,11 @@ func TestEnvWithLogger(t *testing.T) { } func TestUnsetEnvWithLoggerWarn(t *testing.T) { - const envName = "default-config" + const envName = "default_config" core, ol := observer.New(zap.WarnLevel) logger := zap.New(core) - env := NewWithSettings(confmap.ProviderSettings{Logger: logger}) + env := NewFactory().Create(confmap.ProviderSettings{Logger: logger}) ret, err := env.Retrieve(context.Background(), envSchemePrefix+envName, nil) require.NoError(t, err) retMap, err := ret.AsConf() @@ -114,14 +116,25 @@ func TestUnsetEnvWithLoggerWarn(t *testing.T) { assert.Equal(t, envName, logLine.Context[0].String) } +func TestEnvVarNameRestriction(t *testing.T) { + const envName = "default%config" + t.Setenv(envName, validYAML) + + env := createProvider() + ret, err := env.Retrieve(context.Background(), envSchemePrefix+envName, nil) + assert.Equal(t, err, fmt.Errorf("environment variable \"default%%config\" has invalid name: must match regex %s", envvar.ValidationRegexp)) + assert.NoError(t, env.Shutdown(context.Background())) + assert.Nil(t, ret) +} + func TestEmptyEnvWithLoggerWarn(t *testing.T) { - const envName = "default-config" + const envName = "default_config" t.Setenv(envName, "") core, ol := observer.New(zap.InfoLevel) logger := zap.New(core) - env := NewWithSettings(confmap.ProviderSettings{Logger: logger}) + env := NewFactory().Create(confmap.ProviderSettings{Logger: logger}) ret, err := env.Retrieve(context.Background(), envSchemePrefix+envName, nil) require.NoError(t, err) retMap, err := ret.AsConf() diff --git a/confmap/provider/fileprovider/go.mod b/confmap/provider/fileprovider/go.mod index 08d0c0393b2..1cd1b19ae89 100644 --- a/confmap/provider/fileprovider/go.mod +++ b/confmap/provider/fileprovider/go.mod @@ -1,10 +1,10 @@ module go.opentelemetry.io/collector/confmap/provider/fileprovider -go 1.21 +go 1.21.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/confmap v0.100.0 + go.opentelemetry.io/collector/confmap v0.102.1 go.uber.org/goleak v1.3.0 ) diff --git a/confmap/provider/fileprovider/provider.go b/confmap/provider/fileprovider/provider.go index b1723ad16c6..fe958280cfb 100644 --- a/confmap/provider/fileprovider/provider.go +++ b/confmap/provider/fileprovider/provider.go @@ -18,27 +18,6 @@ const schemeName = "file" type provider struct{} -// NewWithSettings returns a new confmap.Provider that reads the configuration from a file. -// -// This Provider supports "file" scheme, and can be called with a "uri" that follows: -// -// file-uri = "file:" local-path -// local-path = [ drive-letter ] file-path -// drive-letter = ALPHA ":" -// -// The "file-path" can be relative or absolute, and it can be any OS supported format. -// -// Examples: -// `file:path/to/file` - relative path (unix, windows) -// `file:/path/to/file` - absolute path (unix, windows) -// `file:c:/path/to/file` - absolute path including drive-letter (windows) -// `file:c:\path\to\file` - absolute path including drive-letter (windows) -// -// Deprecated: [v0.99.0] Use NewFactory instead. -func NewWithSettings(confmap.ProviderSettings) confmap.Provider { - return &provider{} -} - // NewFactory returns a factory for a confmap.Provider that reads the configuration from a file. // // This Provider supports "file" scheme, and can be called with a "uri" that follows: @@ -55,7 +34,11 @@ func NewWithSettings(confmap.ProviderSettings) confmap.Provider { // `file:c:/path/to/file` - absolute path including drive-letter (windows) // `file:c:\path\to\file` - absolute path including drive-letter (windows) func NewFactory() confmap.ProviderFactory { - return confmap.NewProviderFactory(NewWithSettings) + return confmap.NewProviderFactory(newProvider) +} + +func newProvider(confmap.ProviderSettings) confmap.Provider { + return &provider{} } func (fmp *provider) Retrieve(_ context.Context, uri string, _ confmap.WatcherFunc) (*confmap.Retrieved, error) { diff --git a/confmap/provider/httpprovider/go.mod b/confmap/provider/httpprovider/go.mod index e1e476ae46c..98635b9e38a 100644 --- a/confmap/provider/httpprovider/go.mod +++ b/confmap/provider/httpprovider/go.mod @@ -1,10 +1,10 @@ module go.opentelemetry.io/collector/confmap/provider/httpprovider -go 1.21 +go 1.21.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/confmap v0.100.0 + go.opentelemetry.io/collector/confmap v0.102.1 go.uber.org/goleak v1.3.0 ) diff --git a/confmap/provider/httpprovider/provider.go b/confmap/provider/httpprovider/provider.go index 6ed2b6d104c..c47c1df5d99 100644 --- a/confmap/provider/httpprovider/provider.go +++ b/confmap/provider/httpprovider/provider.go @@ -8,22 +8,15 @@ import ( "go.opentelemetry.io/collector/confmap/provider/internal/configurablehttpprovider" ) -// NewWithSettings returns a new confmap.Provider that reads the configuration from a http server. -// -// This Provider supports "http" scheme. -// -// One example for HTTP URI is: http://localhost:3333/getConfig -// -// Deprecated: [v0.99.0] Use NewFactory instead. -func NewWithSettings(set confmap.ProviderSettings) confmap.Provider { - return configurablehttpprovider.New(configurablehttpprovider.HTTPScheme, set) -} - // NewFactory returns a factory for a confmap.Provider that reads the configuration from a http server. // // This Provider supports "http" scheme. // // One example for HTTP URI is: http://localhost:3333/getConfig func NewFactory() confmap.ProviderFactory { - return confmap.NewProviderFactory(NewWithSettings) + return confmap.NewProviderFactory(newProvider) +} + +func newProvider(set confmap.ProviderSettings) confmap.Provider { + return configurablehttpprovider.New(configurablehttpprovider.HTTPScheme, set) } diff --git a/confmap/provider/httpsprovider/go.mod b/confmap/provider/httpsprovider/go.mod index 7275e193e52..db706391d33 100644 --- a/confmap/provider/httpsprovider/go.mod +++ b/confmap/provider/httpsprovider/go.mod @@ -1,10 +1,10 @@ module go.opentelemetry.io/collector/confmap/provider/httpsprovider -go 1.21 +go 1.21.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/confmap v0.100.0 + go.opentelemetry.io/collector/confmap v0.102.1 go.uber.org/goleak v1.3.0 ) diff --git a/confmap/provider/httpsprovider/provider.go b/confmap/provider/httpsprovider/provider.go index 0ee3672cf86..579c15babf2 100644 --- a/confmap/provider/httpsprovider/provider.go +++ b/confmap/provider/httpsprovider/provider.go @@ -8,18 +8,6 @@ import ( "go.opentelemetry.io/collector/confmap/provider/internal/configurablehttpprovider" ) -// NewWithSettings returns a new confmap.Provider that reads the configuration from a https server. -// -// This Provider supports "https" scheme. One example of an HTTPS URI is: https://localhost:3333/getConfig -// -// To add extra CA certificates you need to install certificates in the system pool. This procedure is operating system -// dependent. E.g.: on Linux please refer to the `update-ca-trust` command. -// -// Deprecated: [v0.99.0] Use NewFactory instead. -func NewWithSettings(set confmap.ProviderSettings) confmap.Provider { - return configurablehttpprovider.New(configurablehttpprovider.HTTPSScheme, set) -} - // NewFactory returns a factory for a confmap.Provider that reads the configuration from a https server. // // This Provider supports "https" scheme. One example of an HTTPS URI is: https://localhost:3333/getConfig @@ -27,5 +15,9 @@ func NewWithSettings(set confmap.ProviderSettings) confmap.Provider { // To add extra CA certificates you need to install certificates in the system pool. This procedure is operating system // dependent. E.g.: on Linux please refer to the `update-ca-trust` command. func NewFactory() confmap.ProviderFactory { - return confmap.NewProviderFactory(NewWithSettings) + return confmap.NewProviderFactory(newProvider) +} + +func newProvider(set confmap.ProviderSettings) confmap.Provider { + return configurablehttpprovider.New(configurablehttpprovider.HTTPSScheme, set) } diff --git a/confmap/provider/yamlprovider/go.mod b/confmap/provider/yamlprovider/go.mod index a44885cae0d..0c95589e241 100644 --- a/confmap/provider/yamlprovider/go.mod +++ b/confmap/provider/yamlprovider/go.mod @@ -1,10 +1,10 @@ module go.opentelemetry.io/collector/confmap/provider/yamlprovider -go 1.21 +go 1.21.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/confmap v0.100.0 + go.opentelemetry.io/collector/confmap v0.102.1 go.uber.org/goleak v1.3.0 ) diff --git a/confmap/provider/yamlprovider/provider.go b/confmap/provider/yamlprovider/provider.go index 4f5c327ce4b..949fc71bf7d 100644 --- a/confmap/provider/yamlprovider/provider.go +++ b/confmap/provider/yamlprovider/provider.go @@ -16,21 +16,6 @@ const schemeName = "yaml" type provider struct{} -// NewWithSettings returns a new confmap.Provider that allows to provide yaml bytes. -// -// This Provider supports "yaml" scheme, and can be called with a "uri" that follows: -// -// bytes-uri = "yaml:" yaml-bytes -// -// Examples: -// `yaml:processors::batch::timeout: 2s` -// `yaml:processors::batch/foo::timeout: 3s` -// -// Deprecated: [v0.99.0] Use NewFactory instead. -func NewWithSettings(confmap.ProviderSettings) confmap.Provider { - return &provider{} -} - // NewFactory returns a factory for a confmap.Provider that allows to provide yaml bytes. // // This Provider supports "yaml" scheme, and can be called with a "uri" that follows: @@ -41,7 +26,11 @@ func NewWithSettings(confmap.ProviderSettings) confmap.Provider { // `yaml:processors::batch::timeout: 2s` // `yaml:processors::batch/foo::timeout: 3s` func NewFactory() confmap.ProviderFactory { - return confmap.NewProviderFactory(NewWithSettings) + return confmap.NewProviderFactory(newProvider) +} + +func newProvider(confmap.ProviderSettings) confmap.Provider { + return &provider{} } func (s *provider) Retrieve(_ context.Context, uri string, _ confmap.WatcherFunc) (*confmap.Retrieved, error) { diff --git a/confmap/resolver.go b/confmap/resolver.go index 05f7f964d03..7c9ed303c73 100644 --- a/confmap/resolver.go +++ b/confmap/resolver.go @@ -20,9 +20,10 @@ var driverLetterRegexp = regexp.MustCompile("^[A-z]:") // Resolver resolves a configuration as a Conf. type Resolver struct { - uris []location - providers map[string]Provider - converters []Converter + uris []location + providers map[string]Provider + defaultScheme string + converters []Converter closers []CloseFunc watcher chan error @@ -34,16 +35,15 @@ type ResolverSettings struct { // It is required to have at least one location. URIs []string - // ProviderFactories is a list of Provider creation functions. - // It is required to have at least one ProviderFactory - // if a Provider is not given. + // ProviderFactories is a slice of Provider factories. + // It is required to have at least one factory. ProviderFactories []ProviderFactory - // Providers is a map of pairs . - // It is required to have at least one Provider. - // - // Deprecated: [v0.99.0] Use ProviderFactories instead - Providers map[string]Provider + // DefaultScheme is the scheme that is used if ${} syntax is used but no schema is provided. + // If no DefaultScheme is set, ${} with no schema will not be expanded. + // It is strongly recommended to set "env" as the default scheme to align with the + // OpenTelemetry Configuration Specification + DefaultScheme string // ProviderSettings contains settings that will be passed to Provider // factories when instantiating Providers. @@ -52,11 +52,6 @@ type ResolverSettings struct { // ConverterFactories is a slice of Converter creation functions. ConverterFactories []ConverterFactory - // Converters is a slice of Converters. - // - // Deprecated: [v0.99.0] Use ConverterFactories instead - Converters []Converter - // ConverterSettings contains settings that will be passed to Converter // factories when instantiating Converters. ConverterSettings ConverterSettings @@ -83,45 +78,39 @@ type ResolverSettings struct { // (see https://datatracker.ietf.org/doc/html/rfc3986). An empty "" defaults to "file" schema. func NewResolver(set ResolverSettings) (*Resolver, error) { if len(set.URIs) == 0 { - return nil, errors.New("invalid map resolver config: no URIs") + return nil, errors.New("invalid 'confmap.ResolverSettings' configuration: no URIs") } - if len(set.ProviderFactories) == 0 && len(set.Providers) == 0 { - return nil, errors.New("invalid map resolver config: no Providers") + if len(set.ProviderFactories) == 0 { + return nil, errors.New("invalid 'confmap.ResolverSettings' configuration: no Providers") } if set.ProviderSettings.Logger == nil { set.ProviderSettings.Logger = zap.NewNop() } - var providers map[string]Provider - var converters []Converter + if set.ConverterSettings.Logger == nil { + set.ConverterSettings.Logger = zap.NewNop() + } - if len(set.Providers) != 0 { - if len(set.ProviderFactories) != 0 { - return nil, errors.New("only one of ResolverSettings.Providers and ResolverSettings.ProviderFactories can be used") - } - providers = set.Providers - } else { - providers = make(map[string]Provider, len(set.ProviderFactories)) - for _, factory := range set.ProviderFactories { - provider := factory.Create(set.ProviderSettings) - providers[provider.Scheme()] = provider - } + providers := make(map[string]Provider, len(set.ProviderFactories)) + for _, factory := range set.ProviderFactories { + provider := factory.Create(set.ProviderSettings) + providers[provider.Scheme()] = provider } - if len(set.Converters) != 0 { - if len(set.ConverterFactories) != 0 { - return nil, errors.New("only one of ResolverSettings.Converters and ResolverSettings.ConverterFactories can be used") - } - converters = set.Converters - } else { - converters = make([]Converter, len(set.ConverterFactories)) - for i, factory := range set.ConverterFactories { - converters[i] = factory.Create(set.ConverterSettings) + if set.DefaultScheme != "" { + _, ok := providers[set.DefaultScheme] + if !ok { + return nil, errors.New("invalid 'confmap.ResolverSettings' configuration: DefaultScheme not found in providers list") } } + converters := make([]Converter, len(set.ConverterFactories)) + for i, factory := range set.ConverterFactories { + converters[i] = factory.Create(set.ConverterSettings) + } + // Safe copy, ensures the slices and maps cannot be changed from the caller. uris := make([]location, len(set.URIs)) for i, uri := range set.URIs { @@ -143,10 +132,11 @@ func NewResolver(set ResolverSettings) (*Resolver, error) { } return &Resolver{ - uris: uris, - providers: providers, - converters: converters, - watcher: make(chan error, 1), + uris: uris, + providers: providers, + defaultScheme: set.DefaultScheme, + converters: converters, + watcher: make(chan error, 1), }, nil } diff --git a/confmap/resolver_test.go b/confmap/resolver_test.go index 122009d0e0e..fecb973d089 100644 --- a/confmap/resolver_test.go +++ b/confmap/resolver_test.go @@ -124,6 +124,7 @@ func TestResolverErrors(t *testing.T) { locations []string providers []Provider converters []Converter + defaultScheme string expectBuildErr bool expectResolveErr bool expectWatchErr bool @@ -136,6 +137,16 @@ func TestResolverErrors(t *testing.T) { providers: []Provider{&mockProvider{}}, expectBuildErr: true, }, + { + name: "default scheme not found", + locations: []string{"mock:", "err:"}, + providers: []Provider{ + &mockProvider{}, + &mockProvider{scheme: "err", errR: errors.New("retrieve_err")}, + }, + defaultScheme: "missing", + expectBuildErr: true, + }, { name: "retrieve location config error", locations: []string{"mock:", "err:"}, @@ -201,7 +212,7 @@ func TestResolverErrors(t *testing.T) { c := converter converterFuncs[i] = NewConverterFactory(func(_ ConverterSettings) Converter { return c }) } - resolver, err := NewResolver(ResolverSettings{URIs: tt.locations, ProviderFactories: mockProviderFuncs, ConverterFactories: converterFuncs}) + resolver, err := NewResolver(ResolverSettings{URIs: tt.locations, ProviderFactories: mockProviderFuncs, DefaultScheme: tt.defaultScheme, ConverterFactories: converterFuncs}) if tt.expectBuildErr { assert.Error(t, err) return @@ -382,50 +393,31 @@ func TestResolverShutdownClosesWatch(t *testing.T) { watcherWG.Wait() } -func TestCantConfigureTwoProviderSettings(t *testing.T) { - _, err := NewResolver(ResolverSettings{ - URIs: []string{filepath.Join("testdata", "config.yaml")}, - ProviderFactories: []ProviderFactory{newFileProvider(t)}, - Providers: map[string]Provider{"mock": &mockProvider{}}, - ConverterFactories: nil, - }) - require.Error(t, err) -} - -func TestCantConfigureTwoConverterSettings(t *testing.T) { - _, err := NewResolver(ResolverSettings{ - URIs: []string{filepath.Join("testdata", "config.yaml")}, - ProviderFactories: []ProviderFactory{newFileProvider(t)}, - ConverterFactories: []ConverterFactory{NewConverterFactory(func(_ ConverterSettings) Converter { return &mockConverter{} })}, - Converters: []Converter{&mockConverter{err: errors.New("converter_err")}}, - }) - require.Error(t, err) -} - -func TestTakesInstantiatedProviders(t *testing.T) { - _, err := NewResolver(ResolverSettings{ - URIs: []string{filepath.Join("testdata", "config.yaml")}, - Providers: map[string]Provider{"mock": &mockProvider{}}, - ConverterFactories: nil, - }) - require.NoError(t, err) -} - -func TestTakesInstantiatedConverters(t *testing.T) { - _, err := NewResolver(ResolverSettings{ - URIs: []string{filepath.Join("testdata", "config.yaml")}, - ProviderFactories: []ProviderFactory{newFileProvider(t)}, - Converters: []Converter{&mockConverter{err: errors.New("converter_err")}}, - }) - require.NoError(t, err) -} - func TestProvidesDefaultLogger(t *testing.T) { factory, provider := newObservableFileProvider(t) _, err := NewResolver(ResolverSettings{ URIs: []string{filepath.Join("testdata", "config.yaml")}, ProviderFactories: []ProviderFactory{factory}, + ConverterFactories: []ConverterFactory{NewConverterFactory(func(set ConverterSettings) Converter { + assert.NotNil(t, set.Logger) + return &mockConverter{} + })}, }) require.NoError(t, err) require.NotNil(t, provider.logger) } + +func TestResolverDefaultProviderSet(t *testing.T) { + envProvider := newEnvProvider() + fileProvider := newFileProvider(t) + + r, err := NewResolver(ResolverSettings{ + URIs: []string{"env:"}, + ProviderFactories: []ProviderFactory{fileProvider, envProvider}, + DefaultScheme: "env", + }) + require.NoError(t, err) + assert.NotNil(t, r.defaultScheme) + _, ok := r.providers["env"] + assert.True(t, ok) +} diff --git a/connector/forwardconnector/generated_component_test.go b/connector/forwardconnector/generated_component_test.go index 9bbe4e5aa5f..9371aa5a2b2 100644 --- a/connector/forwardconnector/generated_component_test.go +++ b/connector/forwardconnector/generated_component_test.go @@ -63,7 +63,7 @@ func TestComponentLifecycle(t *testing.T) { cfg := factory.CreateDefaultConfig() sub, err := cm.Sub("tests::config") require.NoError(t, err) - require.NoError(t, component.UnmarshalConfig(sub, cfg)) + require.NoError(t, sub.Unmarshal(&cfg)) for _, test := range tests { t.Run(test.name+"-shutdown", func(t *testing.T) { diff --git a/connector/forwardconnector/go.mod b/connector/forwardconnector/go.mod index 0f27694a228..ad54a54ee28 100644 --- a/connector/forwardconnector/go.mod +++ b/connector/forwardconnector/go.mod @@ -1,22 +1,20 @@ module go.opentelemetry.io/collector/connector/forwardconnector -go 1.21 +go 1.21.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.100.0 - go.opentelemetry.io/collector/confmap v0.100.0 - go.opentelemetry.io/collector/connector v0.100.0 - go.opentelemetry.io/collector/consumer v0.100.0 - go.opentelemetry.io/collector/pdata v1.7.0 - go.opentelemetry.io/otel/metric v1.26.0 - go.opentelemetry.io/otel/trace v1.26.0 + go.opentelemetry.io/collector/component v0.102.1 + go.opentelemetry.io/collector/confmap v0.102.1 + go.opentelemetry.io/collector/connector v0.102.1 + go.opentelemetry.io/collector/consumer v0.102.1 + go.opentelemetry.io/collector/pdata v1.9.0 go.uber.org/goleak v1.3.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -32,24 +30,26 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.53.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector v0.100.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect - go.opentelemetry.io/otel v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect - go.opentelemetry.io/otel/sdk v1.26.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect + go.opentelemetry.io/collector v0.102.1 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 // indirect + go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.34.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/connector/forwardconnector/go.sum b/connector/forwardconnector/go.sum index 4394e616fe3..c2df9c2579c 100644 --- a/connector/forwardconnector/go.sum +++ b/connector/forwardconnector/go.sum @@ -1,7 +1,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -44,14 +44,14 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -60,18 +60,18 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -87,20 +87,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -109,12 +109,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/connector/forwardconnector/internal/metadata/generated_telemetry.go b/connector/forwardconnector/internal/metadata/generated_telemetry.go deleted file mode 100644 index bf218aec069..00000000000 --- a/connector/forwardconnector/internal/metadata/generated_telemetry.go +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" - - "go.opentelemetry.io/collector/component" -) - -func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter("go.opentelemetry.io/collector/connector/forwardconnector") -} - -func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/connector/forwardconnector") -} diff --git a/connector/go.mod b/connector/go.mod index fcf88fdc3e4..44e688ce725 100644 --- a/connector/go.mod +++ b/connector/go.mod @@ -1,15 +1,15 @@ module go.opentelemetry.io/collector/connector -go 1.21 +go 1.21.0 require ( github.com/google/uuid v1.6.0 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector v0.100.0 - go.opentelemetry.io/collector/component v0.100.0 - go.opentelemetry.io/collector/consumer v0.100.0 - go.opentelemetry.io/collector/pdata v1.7.0 - go.opentelemetry.io/collector/pdata/testdata v0.100.0 + go.opentelemetry.io/collector v0.102.1 + go.opentelemetry.io/collector/component v0.102.1 + go.opentelemetry.io/collector/consumer v0.102.1 + go.opentelemetry.io/collector/pdata v1.9.0 + go.opentelemetry.io/collector/pdata/testdata v0.102.1 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 @@ -17,7 +17,7 @@ require ( require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -32,24 +32,24 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.53.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect - go.opentelemetry.io/collector/confmap v0.100.0 // indirect - go.opentelemetry.io/otel v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect - go.opentelemetry.io/otel/metric v1.26.0 // indirect - go.opentelemetry.io/otel/sdk v1.26.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect - go.opentelemetry.io/otel/trace v1.26.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.34.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 // indirect + go.opentelemetry.io/collector/confmap v0.102.1 // indirect + go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/connector/go.sum b/connector/go.sum index 4394e616fe3..c2df9c2579c 100644 --- a/connector/go.sum +++ b/connector/go.sum @@ -1,7 +1,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -44,14 +44,14 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -60,18 +60,18 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -87,20 +87,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -109,12 +109,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/consumer/go.mod b/consumer/go.mod index f054b0b3a0d..8bf242ef3bd 100644 --- a/consumer/go.mod +++ b/consumer/go.mod @@ -1,11 +1,11 @@ module go.opentelemetry.io/collector/consumer -go 1.21 +go 1.21.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/pdata v1.7.0 - go.opentelemetry.io/collector/pdata/testdata v0.100.0 + go.opentelemetry.io/collector/pdata v1.9.0 + go.opentelemetry.io/collector/pdata/testdata v0.102.1 go.uber.org/goleak v1.3.0 ) @@ -21,9 +21,9 @@ require ( golang.org/x/net v0.23.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.34.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/consumer/go.sum b/consumer/go.sum index 458a9f2f0c1..9fdd717f417 100644 --- a/consumer/go.sum +++ b/consumer/go.sum @@ -65,12 +65,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/docs/internal-architecture.md b/docs/internal-architecture.md new file mode 100644 index 00000000000..c3668901017 --- /dev/null +++ b/docs/internal-architecture.md @@ -0,0 +1,53 @@ +## Internal architecture + +This document describes the Collector internal architecture and startup flow. It can be helpful if you are starting to contribute to the Collector codebase. + +For the end-user focused architecture document, please see the [opentelemetry.io's Architecture documentation](https://opentelemetry.io/docs/collector/architecture/). While it is end user focused, it's still a good place to start if you're trying to learn about the Collector codebase. + +### Startup Diagram +```mermaid +flowchart TD + A("`**command.NewCommand**`") -->|1| B("`**updateSettingsUsingFlags**`") + A --> |2| C("`**NewCollector** + Creates and returns a new instance of Collector`") + A --> |3| D("`**Collector.Run** + Starts the collector and blocks until it shuts down`") + D --> E("`**setupConfigurationComponents**`") + E --> |1| F("`**getConfMap**`") + E ---> |2| G("`**Service.New** + Initializes telemetry, then initializes the pipelines`") + E --> |3| Q("`**Service.Start** + 1. Start all extensions. + 2. Notify extensions about Collector configuration + 3. Start all pipelines. + 4. Notify extensions that the pipeline is ready. + `") + Q --> R("`**Graph.StartAll** + Calls Start on each component in reverse topological order`") + G --> H("`**initExtensionsAndPipeline** + Creates extensions and then builds the pipeline graph`") + H --> I("`**Graph.Build** + Converts the settings to an internal graph representation`") + I --> |1| J("`**createNodes** + Builds the node objects from pipeline configuration and adds to graph. Also validates connectors`") + I --> |2| K("`**createEdges** + Iterates through the pipelines and creates edges between components`") + I --> |3| L("`**buildComponents** + Topological sort the graph, and create each component in reverse order`") + L --> M(Receiver Factory) & N(Processor Factory) & O(Exporter Factory) & P(Connector Factory) +``` +### Where to start to read the code +Here is a brief list of useful and/or important files and interfaces that you may find valuable to glance through. +Most of these have package-level documentation and function/struct-level comments that help explain the Collector! + +- [collector.go](../otelcol/collector.go) +- [graph.go](../service/internal/graph/graph.go) +- [component.go](../component/component.go) + +#### Factories +Each component type contains a `Factory` interface along with its corresponding `NewFactory` function. +Implementations of new components use this `NewFactory` function in their implementation to register key functions with +the Collector. An example of this is in [receiver.go](../receiver/receiver.go). + +For example, the Collector uses this interface to give receivers a handle to a `nextConsumer` - +which represents where the receiver will send its data next in its telemetry pipeline. diff --git a/docs/release.md b/docs/release.md index e9c5afea292..20776c31c51 100644 --- a/docs/release.md +++ b/docs/release.md @@ -158,13 +158,12 @@ Once a module is ready to be released under the `1.x` version scheme, file a PR | Date | Version | Release manager | |------------|----------|-----------------| -| 2024-04-10 | v0.98.0 | @dmitryax | -| 2024-04-22 | v0.99.0 | @codeboten | -| 2024-05-06 | v0.100.0 | @bogdandrutu | -| 2024-05-20 | v0.101.0 | @Aneurysm9 | -| 2024-06-03 | v0.102.0 | @jpkrohling | -| 2024-06-17 | v0.103.0 | @mx-psi | -| 2024-07-01 | v0.104.0 | @djaglowski | -| 2024-07-15 | v0.105.0 | @atoulme | -| 2024-07-29 | v0.106.0 | @TylerHelmuth | -| 2024-08-12 | v0.107.0 | @songy23 | +| 2024-05-20 | v0.101.0 | @jpkrohling | +| 2024-06-03 | v0.102.0 | @mx-psi | +| 2024-06-17 | v0.103.0 | @djaglowski | +| 2024-07-01 | v0.104.0 | @atoulme | +| 2024-07-15 | v0.105.0 | @TylerHelmuth | +| 2024-07-29 | v0.106.0 | @songy23 | +| 2024-08-12 | v0.107.0 | @dmitryax | +| 2024-08-26 | v0.108.0 | @codeboten | +| 2024-09-09 | v0.109.0 | @bogdandrutu | diff --git a/exporter/debugexporter/config_test.go b/exporter/debugexporter/config_test.go index 3e1b2534961..cefe0296462 100644 --- a/exporter/debugexporter/config_test.go +++ b/exporter/debugexporter/config_test.go @@ -10,7 +10,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/confmaptest" @@ -19,7 +18,7 @@ import ( func TestUnmarshalDefaultConfig(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig() - assert.NoError(t, component.UnmarshalConfig(confmap.New(), cfg)) + assert.NoError(t, confmap.New().Unmarshal(&cfg)) assert.Equal(t, factory.CreateDefaultConfig(), cfg) } @@ -49,7 +48,7 @@ func TestUnmarshalConfig(t *testing.T) { require.NoError(t, err) factory := NewFactory() cfg := factory.CreateDefaultConfig() - err = component.UnmarshalConfig(cm, cfg) + err = cm.Unmarshal(&cfg) if tt.expectedErr != "" { assert.EqualError(t, err, tt.expectedErr) } else { @@ -91,7 +90,7 @@ func Test_UnmarshalMarshalled(t *testing.T) { outCfg := &Config{} - err = component.UnmarshalConfig(conf, outCfg) + err = conf.Unmarshal(outCfg) if tc.expectedErr == "" { assert.NoError(t, err) diff --git a/exporter/debugexporter/exporter_test.go b/exporter/debugexporter/exporter_test.go new file mode 100644 index 00000000000..5e4c01ee539 --- /dev/null +++ b/exporter/debugexporter/exporter_test.go @@ -0,0 +1,86 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package debugexporter // import "go.opentelemetry.io/collector/exporter/debugexporter" + +import ( + "context" + "errors" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" + + "go.opentelemetry.io/collector/config/configtelemetry" + "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/testdata" +) + +func TestTracesExporterNoErrors(t *testing.T) { + lte, err := createTracesExporter(context.Background(), exportertest.NewNopCreateSettings(), createDefaultConfig()) + require.NotNil(t, lte) + assert.NoError(t, err) + + assert.NoError(t, lte.ConsumeTraces(context.Background(), ptrace.NewTraces())) + assert.NoError(t, lte.ConsumeTraces(context.Background(), testdata.GenerateTraces(10))) + + assert.NoError(t, lte.Shutdown(context.Background())) +} + +func TestMetricsExporterNoErrors(t *testing.T) { + lme, err := createMetricsExporter(context.Background(), exportertest.NewNopCreateSettings(), createDefaultConfig()) + require.NotNil(t, lme) + assert.NoError(t, err) + + assert.NoError(t, lme.ConsumeMetrics(context.Background(), pmetric.NewMetrics())) + assert.NoError(t, lme.ConsumeMetrics(context.Background(), testdata.GenerateMetricsAllTypes())) + assert.NoError(t, lme.ConsumeMetrics(context.Background(), testdata.GenerateMetricsAllTypesEmpty())) + assert.NoError(t, lme.ConsumeMetrics(context.Background(), testdata.GenerateMetricsMetricTypeInvalid())) + assert.NoError(t, lme.ConsumeMetrics(context.Background(), testdata.GenerateMetrics(10))) + + assert.NoError(t, lme.Shutdown(context.Background())) +} + +func TestLogsExporterNoErrors(t *testing.T) { + lle, err := createLogsExporter(context.Background(), exportertest.NewNopCreateSettings(), createDefaultConfig()) + require.NotNil(t, lle) + assert.NoError(t, err) + + assert.NoError(t, lle.ConsumeLogs(context.Background(), plog.NewLogs())) + assert.NoError(t, lle.ConsumeLogs(context.Background(), testdata.GenerateLogs(10))) + + assert.NoError(t, lle.Shutdown(context.Background())) +} + +func TestExporterErrors(t *testing.T) { + le := newDebugExporter(zaptest.NewLogger(t), configtelemetry.LevelDetailed) + require.NotNil(t, le) + + errWant := errors.New("my error") + le.tracesMarshaler = &errMarshaler{err: errWant} + le.metricsMarshaler = &errMarshaler{err: errWant} + le.logsMarshaler = &errMarshaler{err: errWant} + assert.Equal(t, errWant, le.pushTraces(context.Background(), ptrace.NewTraces())) + assert.Equal(t, errWant, le.pushMetrics(context.Background(), pmetric.NewMetrics())) + assert.Equal(t, errWant, le.pushLogs(context.Background(), plog.NewLogs())) +} + +type errMarshaler struct { + err error +} + +func (e errMarshaler) MarshalLogs(plog.Logs) ([]byte, error) { + return nil, e.err +} + +func (e errMarshaler) MarshalMetrics(pmetric.Metrics) ([]byte, error) { + return nil, e.err +} + +func (e errMarshaler) MarshalTraces(ptrace.Traces) ([]byte, error) { + return nil, e.err +} diff --git a/exporter/debugexporter/generated_component_test.go b/exporter/debugexporter/generated_component_test.go index 3e18e6e887c..3ae3f1c3607 100644 --- a/exporter/debugexporter/generated_component_test.go +++ b/exporter/debugexporter/generated_component_test.go @@ -63,7 +63,7 @@ func TestComponentLifecycle(t *testing.T) { cfg := factory.CreateDefaultConfig() sub, err := cm.Sub("tests::config") require.NoError(t, err) - require.NoError(t, component.UnmarshalConfig(sub, cfg)) + require.NoError(t, sub.Unmarshal(&cfg)) for _, test := range tests { t.Run(test.name+"-shutdown", func(t *testing.T) { diff --git a/exporter/debugexporter/go.mod b/exporter/debugexporter/go.mod index ddf75d20ab4..d7c19eb7302 100644 --- a/exporter/debugexporter/go.mod +++ b/exporter/debugexporter/go.mod @@ -1,17 +1,16 @@ module go.opentelemetry.io/collector/exporter/debugexporter -go 1.21 +go 1.21.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.100.0 - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 - go.opentelemetry.io/collector/confmap v0.100.0 - go.opentelemetry.io/collector/consumer v0.100.0 - go.opentelemetry.io/collector/exporter v0.100.0 - go.opentelemetry.io/collector/pdata v1.7.0 - go.opentelemetry.io/otel/metric v1.26.0 - go.opentelemetry.io/otel/trace v1.26.0 + go.opentelemetry.io/collector/component v0.102.1 + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 + go.opentelemetry.io/collector/confmap v0.102.1 + go.opentelemetry.io/collector/consumer v0.102.1 + go.opentelemetry.io/collector/exporter v0.102.1 + go.opentelemetry.io/collector/pdata v1.9.0 + go.opentelemetry.io/collector/pdata/testdata v0.102.1 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 ) @@ -19,7 +18,7 @@ require ( require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -35,25 +34,27 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.53.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector v0.100.0 // indirect - go.opentelemetry.io/collector/config/configretry v0.100.0 // indirect - go.opentelemetry.io/collector/extension v0.100.0 // indirect - go.opentelemetry.io/collector/receiver v0.100.0 // indirect - go.opentelemetry.io/otel v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect - go.opentelemetry.io/otel/sdk v1.26.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect + go.opentelemetry.io/collector v0.102.1 // indirect + go.opentelemetry.io/collector/config/configretry v0.102.1 // indirect + go.opentelemetry.io/collector/extension v0.102.1 // indirect + go.opentelemetry.io/collector/receiver v0.102.1 // indirect + go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.34.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/debugexporter/go.sum b/exporter/debugexporter/go.sum index 7bbf6704ff6..31bd5593265 100644 --- a/exporter/debugexporter/go.sum +++ b/exporter/debugexporter/go.sum @@ -2,8 +2,8 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -46,14 +46,14 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -62,18 +62,18 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -89,20 +89,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -111,12 +111,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/exporter/debugexporter/internal/metadata/generated_telemetry.go b/exporter/debugexporter/internal/metadata/generated_telemetry.go deleted file mode 100644 index abe43e7fa07..00000000000 --- a/exporter/debugexporter/internal/metadata/generated_telemetry.go +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" - - "go.opentelemetry.io/collector/component" -) - -func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter("go.opentelemetry.io/collector/exporter/debugexporter") -} - -func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/exporter/debugexporter") -} diff --git a/exporter/exporterhelper/batch_sender.go b/exporter/exporterhelper/batch_sender.go index 29065bfe980..086c9724aa3 100644 --- a/exporter/exporterhelper/batch_sender.go +++ b/exporter/exporterhelper/batch_sender.go @@ -40,22 +40,24 @@ type batchSender struct { logger *zap.Logger - shutdownCh chan struct{} - stopped *atomic.Bool + shutdownCh chan struct{} + shutdownCompleteCh chan struct{} + stopped *atomic.Bool } // newBatchSender returns a new batch consumer component. func newBatchSender(cfg exporterbatcher.Config, set exporter.CreateSettings, mf exporterbatcher.BatchMergeFunc[Request], msf exporterbatcher.BatchMergeSplitFunc[Request]) *batchSender { bs := &batchSender{ - activeBatch: newEmptyBatch(), - cfg: cfg, - logger: set.Logger, - mergeFunc: mf, - mergeSplitFunc: msf, - shutdownCh: make(chan struct{}), - stopped: &atomic.Bool{}, - resetTimerCh: make(chan struct{}), + activeBatch: newEmptyBatch(), + cfg: cfg, + logger: set.Logger, + mergeFunc: mf, + mergeSplitFunc: msf, + shutdownCh: make(chan struct{}), + shutdownCompleteCh: make(chan struct{}), + stopped: &atomic.Bool{}, + resetTimerCh: make(chan struct{}), } return bs } @@ -66,14 +68,19 @@ func (bs *batchSender) Start(_ context.Context, _ component.Host) error { for { select { case <-bs.shutdownCh: - bs.mu.Lock() - if bs.activeBatch.request != nil { - bs.exportActiveBatch() + // There is a minimal chance that another request is added after the shutdown signal. + // This loop will handle that case. + for bs.activeRequests.Load() > 0 { + bs.mu.Lock() + if bs.activeBatch.request != nil { + bs.exportActiveBatch() + } + bs.mu.Unlock() } - bs.mu.Unlock() if !timer.Stop() { <-timer.C } + close(bs.shutdownCompleteCh) return case <-timer.C: bs.mu.Lock() @@ -118,6 +125,12 @@ func (bs *batchSender) exportActiveBatch() { bs.activeBatch = newEmptyBatch() } +func (bs *batchSender) resetTimer() { + if !bs.stopped.Load() { + bs.resetTimerCh <- struct{}{} + } +} + // isActiveBatchReady returns true if the active batch is ready to be exported. // The batch is ready if it has reached the minimum size or the concurrency limit is reached. // Caller must hold the lock. @@ -154,7 +167,7 @@ func (bs *batchSender) sendMergeSplitBatch(ctx context.Context, req Request) err batch := bs.activeBatch if bs.isActiveBatchReady() || len(reqs) > 1 { bs.exportActiveBatch() - bs.resetTimerCh <- struct{}{} + bs.resetTimer() } bs.mu.Unlock() <-batch.done @@ -194,7 +207,7 @@ func (bs *batchSender) sendMergeBatch(ctx context.Context, req Request) error { batch := bs.activeBatch if bs.isActiveBatchReady() { bs.exportActiveBatch() - bs.resetTimerCh <- struct{}{} + bs.resetTimer() } bs.mu.Unlock() <-batch.done @@ -215,9 +228,6 @@ func (bs *batchSender) updateActiveBatch(ctx context.Context, req Request) { func (bs *batchSender) Shutdown(context.Context) error { bs.stopped.Store(true) close(bs.shutdownCh) - // Wait for the active requests to finish. - for bs.activeRequests.Load() > 0 { - time.Sleep(10 * time.Millisecond) - } + <-bs.shutdownCompleteCh return nil } diff --git a/exporter/exporterhelper/batch_sender_test.go b/exporter/exporterhelper/batch_sender_test.go index 15d05b066f4..bc59c0d63c5 100644 --- a/exporter/exporterhelper/batch_sender_test.go +++ b/exporter/exporterhelper/batch_sender_test.go @@ -6,7 +6,6 @@ package exporterhelper // import "go.opentelemetry.io/collector/exporter/exporte import ( "context" "errors" - "fmt" "sync" "testing" "time" @@ -181,8 +180,6 @@ func TestBatchSender_MergeOrSplit(t *testing.T) { assert.Eventually(t, func() bool { return sink.requestsCount.Load() == 5 && sink.itemsCount.Load() == 38 }, 50*time.Millisecond, 10*time.Millisecond) - - fmt.Println("TestBatchSender_MergeOrSplit") } func TestBatchSender_Shutdown(t *testing.T) { @@ -209,7 +206,7 @@ func TestBatchSender_Disabled(t *testing.T) { cfg := exporterbatcher.NewDefaultConfig() cfg.Enabled = false cfg.MaxSizeItems = 5 - be, err := newBaseExporter(defaultSettings, defaultType, newNoopObsrepSender, + be, err := newBaseExporter(defaultSettings, defaultDataType, newNoopObsrepSender, WithBatcher(cfg, WithRequestBatchFuncs(fakeBatchMergeFunc, fakeBatchMergeSplitFunc))) require.NotNil(t, be) require.NoError(t, err) @@ -257,7 +254,7 @@ func TestBatchSender_InvalidMergeSplitFunc(t *testing.T) { } func TestBatchSender_PostShutdown(t *testing.T) { - be, err := newBaseExporter(defaultSettings, defaultType, newNoopObsrepSender, + be, err := newBaseExporter(defaultSettings, defaultDataType, newNoopObsrepSender, WithBatcher(exporterbatcher.NewDefaultConfig(), WithRequestBatchFuncs(fakeBatchMergeFunc, fakeBatchMergeSplitFunc))) require.NotNil(t, be) @@ -275,7 +272,7 @@ func TestBatchSender_PostShutdown(t *testing.T) { func TestBatchSender_ConcurrencyLimitReached(t *testing.T) { qCfg := exporterqueue.NewDefaultConfig() qCfg.NumConsumers = 2 - be, err := newBaseExporter(defaultSettings, defaultType, newNoopObsrepSender, + be, err := newBaseExporter(defaultSettings, defaultDataType, newNoopObsrepSender, WithBatcher(exporterbatcher.NewDefaultConfig(), WithRequestBatchFuncs(fakeBatchMergeFunc, fakeBatchMergeSplitFunc)), WithRequestQueue(qCfg, exporterqueue.NewMemoryQueueFactory[Request]())) require.NotNil(t, be) @@ -299,7 +296,7 @@ func TestBatchSender_ConcurrencyLimitReached(t *testing.T) { func TestBatchSender_BatchBlocking(t *testing.T) { bCfg := exporterbatcher.NewDefaultConfig() bCfg.MinSizeItems = 3 - be, err := newBaseExporter(defaultSettings, defaultType, newNoopObsrepSender, + be, err := newBaseExporter(defaultSettings, defaultDataType, newNoopObsrepSender, WithBatcher(bCfg, WithRequestBatchFuncs(fakeBatchMergeFunc, fakeBatchMergeSplitFunc))) require.NotNil(t, be) require.NoError(t, err) @@ -329,7 +326,7 @@ func TestBatchSender_BatchBlocking(t *testing.T) { func TestBatchSender_BatchCancelled(t *testing.T) { bCfg := exporterbatcher.NewDefaultConfig() bCfg.MinSizeItems = 2 - be, err := newBaseExporter(defaultSettings, defaultType, newNoopObsrepSender, + be, err := newBaseExporter(defaultSettings, defaultDataType, newNoopObsrepSender, WithBatcher(bCfg, WithRequestBatchFuncs(fakeBatchMergeFunc, fakeBatchMergeSplitFunc))) require.NotNil(t, be) require.NoError(t, err) @@ -364,7 +361,7 @@ func TestBatchSender_BatchCancelled(t *testing.T) { func TestBatchSender_DrainActiveRequests(t *testing.T) { bCfg := exporterbatcher.NewDefaultConfig() bCfg.MinSizeItems = 2 - be, err := newBaseExporter(defaultSettings, defaultType, newNoopObsrepSender, + be, err := newBaseExporter(defaultSettings, defaultDataType, newNoopObsrepSender, WithBatcher(bCfg, WithRequestBatchFuncs(fakeBatchMergeFunc, fakeBatchMergeSplitFunc))) require.NotNil(t, be) require.NoError(t, err) @@ -427,7 +424,7 @@ func TestBatchSender_WithBatcherOption(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - be, err := newBaseExporter(defaultSettings, defaultType, newNoopObsrepSender, tt.opts...) + be, err := newBaseExporter(defaultSettings, defaultDataType, newNoopObsrepSender, tt.opts...) if tt.expectedErr { assert.Nil(t, be) assert.Error(t, err) @@ -439,8 +436,55 @@ func TestBatchSender_WithBatcherOption(t *testing.T) { } } +// TestBatchSender_ShutdownDeadlock tests that the exporter does not deadlock when shutting down while a batch is being +// merged. +func TestBatchSender_ShutdownDeadlock(t *testing.T) { + blockMerge := make(chan struct{}) + waitMerge := make(chan struct{}, 10) + + // blockedBatchMergeFunc blocks until the blockMerge channel is closed + blockedBatchMergeFunc := func(_ context.Context, r1 Request, r2 Request) (Request, error) { + waitMerge <- struct{}{} + <-blockMerge + r1.(*fakeRequest).items += r2.(*fakeRequest).items + return r1, nil + } + + bCfg := exporterbatcher.NewDefaultConfig() + bCfg.FlushTimeout = 10 * time.Minute // high timeout to avoid the timeout to trigger + be, err := newBaseExporter(defaultSettings, defaultDataType, newNoopObsrepSender, + WithBatcher(bCfg, WithRequestBatchFuncs(blockedBatchMergeFunc, fakeBatchMergeSplitFunc))) + require.NoError(t, err) + require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) + + sink := newFakeRequestSink() + + // Send 2 concurrent requests + go func() { require.NoError(t, be.send(context.Background(), &fakeRequest{items: 4, sink: sink})) }() + go func() { require.NoError(t, be.send(context.Background(), &fakeRequest{items: 4, sink: sink})) }() + + // Wait for the requests to enter the merge function + <-waitMerge + + // Initiate the exporter shutdown, unblock the batch merge function to catch possible deadlocks, + // then wait for the exporter to finish. + startShutdown := make(chan struct{}) + doneShutdown := make(chan struct{}) + go func() { + close(startShutdown) + require.Nil(t, be.Shutdown(context.Background())) + close(doneShutdown) + }() + <-startShutdown + close(blockMerge) + <-doneShutdown + + assert.EqualValues(t, 1, sink.requestsCount.Load()) + assert.EqualValues(t, 8, sink.itemsCount.Load()) +} + func queueBatchExporter(t *testing.T, batchOption Option) *baseExporter { - be, err := newBaseExporter(defaultSettings, defaultType, newNoopObsrepSender, batchOption, + be, err := newBaseExporter(defaultSettings, defaultDataType, newNoopObsrepSender, batchOption, WithRequestQueue(exporterqueue.NewDefaultConfig(), exporterqueue.NewMemoryQueueFactory[Request]())) require.NotNil(t, be) require.NoError(t, err) diff --git a/exporter/exporterhelper/common_test.go b/exporter/exporterhelper/common_test.go index e134affeaaa..d79b7c07918 100644 --- a/exporter/exporterhelper/common_test.go +++ b/exporter/exporterhelper/common_test.go @@ -24,6 +24,7 @@ import ( var ( defaultType = component.MustNewType("test") + defaultDataType = component.DataTypeMetrics defaultID = component.NewID(defaultType) defaultSettings = func() exporter.CreateSettings { set := exportertest.NewNopCreateSettings() @@ -37,7 +38,7 @@ func newNoopObsrepSender(*ObsReport) requestSender { } func TestBaseExporter(t *testing.T) { - be, err := newBaseExporter(defaultSettings, defaultType, newNoopObsrepSender) + be, err := newBaseExporter(defaultSettings, defaultDataType, newNoopObsrepSender) require.NoError(t, err) require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost())) require.NoError(t, be.Shutdown(context.Background())) @@ -46,7 +47,7 @@ func TestBaseExporter(t *testing.T) { func TestBaseExporterWithOptions(t *testing.T) { want := errors.New("my error") be, err := newBaseExporter( - defaultSettings, defaultType, newNoopObsrepSender, + defaultSettings, defaultDataType, newNoopObsrepSender, WithStart(func(context.Context, component.Host) error { return want }), WithShutdown(func(context.Context) error { return want }), WithTimeout(NewDefaultTimeoutSettings()), @@ -66,16 +67,16 @@ func checkStatus(t *testing.T, sd sdktrace.ReadOnlySpan, err error) { } func TestQueueOptionsWithRequestExporter(t *testing.T) { - bs, err := newBaseExporter(exportertest.NewNopCreateSettings(), defaultType, newNoopObsrepSender, + bs, err := newBaseExporter(exportertest.NewNopCreateSettings(), defaultDataType, newNoopObsrepSender, WithRetry(configretry.NewDefaultBackOffConfig())) require.Nil(t, err) require.Nil(t, bs.marshaler) require.Nil(t, bs.unmarshaler) - _, err = newBaseExporter(exportertest.NewNopCreateSettings(), defaultType, newNoopObsrepSender, + _, err = newBaseExporter(exportertest.NewNopCreateSettings(), defaultDataType, newNoopObsrepSender, WithRetry(configretry.NewDefaultBackOffConfig()), WithQueue(NewDefaultQueueSettings())) require.Error(t, err) - _, err = newBaseExporter(exportertest.NewNopCreateSettings(), defaultType, newNoopObsrepSender, + _, err = newBaseExporter(exportertest.NewNopCreateSettings(), defaultDataType, newNoopObsrepSender, withMarshaler(mockRequestMarshaler), withUnmarshaler(mockRequestUnmarshaler(&mockRequest{})), WithRetry(configretry.NewDefaultBackOffConfig()), WithRequestQueue(exporterqueue.NewDefaultConfig(), exporterqueue.NewMemoryQueueFactory[Request]())) @@ -88,7 +89,7 @@ func TestBaseExporterLogging(t *testing.T) { set.Logger = zap.New(logger) rCfg := configretry.NewDefaultBackOffConfig() rCfg.Enabled = false - bs, err := newBaseExporter(set, defaultType, newNoopObsrepSender, WithRetry(rCfg)) + bs, err := newBaseExporter(set, defaultDataType, newNoopObsrepSender, WithRetry(rCfg)) require.Nil(t, err) sendErr := bs.send(context.Background(), newErrorRequest()) require.Error(t, sendErr) diff --git a/exporter/exporterhelper/doc.go b/exporter/exporterhelper/doc.go index 4436c969347..ccecf255f08 100644 --- a/exporter/exporterhelper/doc.go +++ b/exporter/exporterhelper/doc.go @@ -1,5 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +//go:generate mdatagen metadata.yaml + // Package exporterhelper provides helper functions for exporters. package exporterhelper // import "go.opentelemetry.io/collector/exporter/exporterhelper" diff --git a/exporter/exporterhelper/documentation.md b/exporter/exporterhelper/documentation.md new file mode 100644 index 00000000000..ac974e01dd2 --- /dev/null +++ b/exporter/exporterhelper/documentation.md @@ -0,0 +1,79 @@ +[comment]: <> (Code generated by mdatagen. DO NOT EDIT.) + +# exporterhelper + +## Internal Telemetry + +The following telemetry is emitted by this component. + +### exporter_enqueue_failed_log_records + +Number of log records failed to be added to the sending queue. + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | + +### exporter_enqueue_failed_metric_points + +Number of metric points failed to be added to the sending queue. + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | + +### exporter_enqueue_failed_spans + +Number of spans failed to be added to the sending queue. + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | + +### exporter_send_failed_log_records + +Number of log records in failed attempts to send to destination. + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | + +### exporter_send_failed_metric_points + +Number of metric points in failed attempts to send to destination. + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | + +### exporter_send_failed_spans + +Number of spans in failed attempts to send to destination. + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | + +### exporter_sent_log_records + +Number of log record successfully sent to destination. + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | + +### exporter_sent_metric_points + +Number of metric points successfully sent to destination. + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | + +### exporter_sent_spans + +Number of spans successfully sent to destination. + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | diff --git a/exporter/exporterhelper/generated_component_telemetry_test.go b/exporter/exporterhelper/generated_component_telemetry_test.go new file mode 100644 index 00000000000..f12aeee27de --- /dev/null +++ b/exporter/exporterhelper/generated_component_telemetry_test.go @@ -0,0 +1,76 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package exporterhelper + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" +) + +type componentTestTelemetry struct { + reader *sdkmetric.ManualReader + meterProvider *sdkmetric.MeterProvider +} + +func (tt *componentTestTelemetry) NewCreateSettings() exporter.CreateSettings { + settings := exportertest.NewNopCreateSettings() + settings.MeterProvider = tt.meterProvider + settings.ID = component.NewID(component.MustNewType("exporterhelper")) + + return settings +} + +func setupTestTelemetry() componentTestTelemetry { + reader := sdkmetric.NewManualReader() + return componentTestTelemetry{ + reader: reader, + meterProvider: sdkmetric.NewMeterProvider(sdkmetric.WithReader(reader)), + } +} + +func (tt *componentTestTelemetry) assertMetrics(t *testing.T, expected []metricdata.Metrics) { + var md metricdata.ResourceMetrics + require.NoError(t, tt.reader.Collect(context.Background(), &md)) + // ensure all required metrics are present + for _, want := range expected { + got := tt.getMetric(want.Name, md) + metricdatatest.AssertEqual(t, want, got, metricdatatest.IgnoreTimestamp()) + } + + // ensure no additional metrics are emitted + require.Equal(t, len(expected), tt.len(md)) +} + +func (tt *componentTestTelemetry) getMetric(name string, got metricdata.ResourceMetrics) metricdata.Metrics { + for _, sm := range got.ScopeMetrics { + for _, m := range sm.Metrics { + if m.Name == name { + return m + } + } + } + + return metricdata.Metrics{} +} + +func (tt *componentTestTelemetry) len(got metricdata.ResourceMetrics) int { + metricsCount := 0 + for _, sm := range got.ScopeMetrics { + metricsCount += len(sm.Metrics) + } + + return metricsCount +} + +func (tt *componentTestTelemetry) Shutdown(ctx context.Context) error { + return tt.meterProvider.Shutdown(ctx) +} diff --git a/exporter/exporterhelper/package_test.go b/exporter/exporterhelper/generated_package_test.go similarity index 62% rename from exporter/exporterhelper/package_test.go rename to exporter/exporterhelper/generated_package_test.go index 6cf68017a7d..73b52415cde 100644 --- a/exporter/exporterhelper/package_test.go +++ b/exporter/exporterhelper/generated_package_test.go @@ -1,5 +1,4 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 +// Code generated by mdatagen. DO NOT EDIT. package exporterhelper diff --git a/exporter/exporterhelper/internal/metadata/generated_status.go b/exporter/exporterhelper/internal/metadata/generated_status.go new file mode 100644 index 00000000000..5c9e6c455ca --- /dev/null +++ b/exporter/exporterhelper/internal/metadata/generated_status.go @@ -0,0 +1,17 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" +) + +var ( + Type = component.MustNewType("exporterhelper") +) + +const ( + TracesStability = component.StabilityLevelBeta + MetricsStability = component.StabilityLevelBeta + LogsStability = component.StabilityLevelBeta +) diff --git a/exporter/exporterhelper/internal/metadata/generated_telemetry.go b/exporter/exporterhelper/internal/metadata/generated_telemetry.go new file mode 100644 index 00000000000..481cc2b27ec --- /dev/null +++ b/exporter/exporterhelper/internal/metadata/generated_telemetry.go @@ -0,0 +1,120 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "errors" + + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/metric/noop" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("go.opentelemetry.io/collector/exporter/exporterhelper") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/exporter/exporterhelper") +} + +// TelemetryBuilder provides an interface for components to report telemetry +// as defined in metadata and user config. +type TelemetryBuilder struct { + ExporterEnqueueFailedLogRecords metric.Int64Counter + ExporterEnqueueFailedMetricPoints metric.Int64Counter + ExporterEnqueueFailedSpans metric.Int64Counter + ExporterSendFailedLogRecords metric.Int64Counter + ExporterSendFailedMetricPoints metric.Int64Counter + ExporterSendFailedSpans metric.Int64Counter + ExporterSentLogRecords metric.Int64Counter + ExporterSentMetricPoints metric.Int64Counter + ExporterSentSpans metric.Int64Counter + level configtelemetry.Level +} + +// telemetryBuilderOption applies changes to default builder. +type telemetryBuilderOption func(*TelemetryBuilder) + +// WithLevel sets the current telemetry level for the component. +func WithLevel(lvl configtelemetry.Level) telemetryBuilderOption { + return func(builder *TelemetryBuilder) { + builder.level = lvl + } +} + +// NewTelemetryBuilder provides a struct with methods to update all internal telemetry +// for a component +func NewTelemetryBuilder(settings component.TelemetrySettings, options ...telemetryBuilderOption) (*TelemetryBuilder, error) { + builder := TelemetryBuilder{level: configtelemetry.LevelBasic} + for _, op := range options { + op(&builder) + } + var ( + err, errs error + meter metric.Meter + ) + if builder.level >= configtelemetry.LevelBasic { + meter = Meter(settings) + } else { + meter = noop.Meter{} + } + builder.ExporterEnqueueFailedLogRecords, err = meter.Int64Counter( + "exporter_enqueue_failed_log_records", + metric.WithDescription("Number of log records failed to be added to the sending queue."), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + builder.ExporterEnqueueFailedMetricPoints, err = meter.Int64Counter( + "exporter_enqueue_failed_metric_points", + metric.WithDescription("Number of metric points failed to be added to the sending queue."), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + builder.ExporterEnqueueFailedSpans, err = meter.Int64Counter( + "exporter_enqueue_failed_spans", + metric.WithDescription("Number of spans failed to be added to the sending queue."), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + builder.ExporterSendFailedLogRecords, err = meter.Int64Counter( + "exporter_send_failed_log_records", + metric.WithDescription("Number of log records in failed attempts to send to destination."), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + builder.ExporterSendFailedMetricPoints, err = meter.Int64Counter( + "exporter_send_failed_metric_points", + metric.WithDescription("Number of metric points in failed attempts to send to destination."), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + builder.ExporterSendFailedSpans, err = meter.Int64Counter( + "exporter_send_failed_spans", + metric.WithDescription("Number of spans in failed attempts to send to destination."), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + builder.ExporterSentLogRecords, err = meter.Int64Counter( + "exporter_sent_log_records", + metric.WithDescription("Number of log record successfully sent to destination."), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + builder.ExporterSentMetricPoints, err = meter.Int64Counter( + "exporter_sent_metric_points", + metric.WithDescription("Number of metric points successfully sent to destination."), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + builder.ExporterSentSpans, err = meter.Int64Counter( + "exporter_sent_spans", + metric.WithDescription("Number of spans successfully sent to destination."), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + return &builder, errs +} diff --git a/exporter/loggingexporter/internal/metadata/generated_telemetry_test.go b/exporter/exporterhelper/internal/metadata/generated_telemetry_test.go similarity index 73% rename from exporter/loggingexporter/internal/metadata/generated_telemetry_test.go rename to exporter/exporterhelper/internal/metadata/generated_telemetry_test.go index deab99a089e..34ce1d281f5 100644 --- a/exporter/loggingexporter/internal/metadata/generated_telemetry_test.go +++ b/exporter/exporterhelper/internal/metadata/generated_telemetry_test.go @@ -49,15 +49,28 @@ func TestProviders(t *testing.T) { meter := Meter(set) if m, ok := meter.(mockMeter); ok { - require.Equal(t, "go.opentelemetry.io/collector/exporter/loggingexporter", m.name) + require.Equal(t, "go.opentelemetry.io/collector/exporter/exporterhelper", m.name) } else { require.Fail(t, "returned Meter not mockMeter") } tracer := Tracer(set) if m, ok := tracer.(mockTracer); ok { - require.Equal(t, "go.opentelemetry.io/collector/exporter/loggingexporter", m.name) + require.Equal(t, "go.opentelemetry.io/collector/exporter/exporterhelper", m.name) } else { require.Fail(t, "returned Meter not mockTracer") } } + +func TestNewTelemetryBuilder(t *testing.T) { + set := component.TelemetrySettings{ + MeterProvider: mockMeterProvider{}, + TracerProvider: mockTracerProvider{}, + } + applied := false + _, err := NewTelemetryBuilder(set, func(b *TelemetryBuilder) { + applied = true + }) + require.NoError(t, err) + require.True(t, applied) +} diff --git a/exporter/exporterhelper/metadata.yaml b/exporter/exporterhelper/metadata.yaml new file mode 100644 index 00000000000..26b06a37536 --- /dev/null +++ b/exporter/exporterhelper/metadata.yaml @@ -0,0 +1,82 @@ +type: exporterhelper + +status: + class: exporter + not_component: true + stability: + beta: [traces, metrics, logs] + distributions: [core, contrib] + +telemetry: + metrics: + exporter_sent_spans: + enabled: true + description: Number of spans successfully sent to destination. + unit: 1 + sum: + value_type: int + monotonic: true + + exporter_send_failed_spans: + enabled: true + description: Number of spans in failed attempts to send to destination. + unit: 1 + sum: + value_type: int + monotonic: true + + exporter_enqueue_failed_spans: + enabled: true + description: Number of spans failed to be added to the sending queue. + unit: 1 + sum: + value_type: int + monotonic: true + + exporter_sent_metric_points: + enabled: true + description: Number of metric points successfully sent to destination. + unit: 1 + sum: + value_type: int + monotonic: true + + exporter_send_failed_metric_points: + enabled: true + description: Number of metric points in failed attempts to send to destination. + unit: 1 + sum: + value_type: int + monotonic: true + + exporter_enqueue_failed_metric_points: + enabled: true + description: Number of metric points failed to be added to the sending queue. + unit: 1 + sum: + value_type: int + monotonic: true + + exporter_sent_log_records: + enabled: true + description: Number of log record successfully sent to destination. + unit: 1 + sum: + value_type: int + monotonic: true + + exporter_send_failed_log_records: + enabled: true + description: Number of log records in failed attempts to send to destination. + unit: 1 + sum: + value_type: int + monotonic: true + + exporter_enqueue_failed_log_records: + enabled: true + description: Number of log records failed to be added to the sending queue. + unit: 1 + sum: + value_type: int + monotonic: true diff --git a/exporter/exporterhelper/obsexporter.go b/exporter/exporterhelper/obsexporter.go index ed490144242..e3a78c34b04 100644 --- a/exporter/exporterhelper/obsexporter.go +++ b/exporter/exporterhelper/obsexporter.go @@ -10,19 +10,15 @@ import ( "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/trace" - "go.uber.org/multierr" "go.uber.org/zap" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exporterhelper/internal/metadata" "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" ) -const ( - exporterScope = obsmetrics.Scope + obsmetrics.SpanNameSep + obsmetrics.ExporterKey -) - // ObsReport is a helper to add observability to an exporter. type ObsReport struct { level configtelemetry.Level @@ -30,16 +26,8 @@ type ObsReport struct { tracer trace.Tracer logger *zap.Logger - otelAttrs []attribute.KeyValue - sentSpans metric.Int64Counter - failedToSendSpans metric.Int64Counter - failedToEnqueueSpans metric.Int64Counter - sentMetricPoints metric.Int64Counter - failedToSendMetricPoints metric.Int64Counter - failedToEnqueueMetricPoints metric.Int64Counter - sentLogRecords metric.Int64Counter - failedToSendLogRecords metric.Int64Counter - failedToEnqueueLogRecords metric.Int64Counter + otelAttrs []attribute.KeyValue + telemetryBuilder *metadata.TelemetryBuilder } // ObsReportSettings are settings for creating an ObsReport. @@ -54,7 +42,12 @@ func NewObsReport(cfg ObsReportSettings) (*ObsReport, error) { } func newExporter(cfg ObsReportSettings) (*ObsReport, error) { - exp := &ObsReport{ + telemetryBuilder, err := metadata.NewTelemetryBuilder(cfg.ExporterCreateSettings.TelemetrySettings) + if err != nil { + return nil, err + } + + return &ObsReport{ level: cfg.ExporterCreateSettings.TelemetrySettings.MetricsLevel, spanNamePrefix: obsmetrics.ExporterPrefix + cfg.ExporterID.String(), tracer: cfg.ExporterCreateSettings.TracerProvider.Tracer(cfg.ExporterID.String()), @@ -63,75 +56,8 @@ func newExporter(cfg ObsReportSettings) (*ObsReport, error) { otelAttrs: []attribute.KeyValue{ attribute.String(obsmetrics.ExporterKey, cfg.ExporterID.String()), }, - } - - if err := exp.createOtelMetrics(cfg); err != nil { - return nil, err - } - - return exp, nil -} - -func (or *ObsReport) createOtelMetrics(cfg ObsReportSettings) error { - meter := cfg.ExporterCreateSettings.MeterProvider.Meter(exporterScope) - - var errors, err error - - or.sentSpans, err = meter.Int64Counter( - obsmetrics.ExporterMetricPrefix+obsmetrics.SentSpansKey, - metric.WithDescription("Number of spans successfully sent to destination."), - metric.WithUnit("1")) - errors = multierr.Append(errors, err) - - or.failedToSendSpans, err = meter.Int64Counter( - obsmetrics.ExporterMetricPrefix+obsmetrics.FailedToSendSpansKey, - metric.WithDescription("Number of spans in failed attempts to send to destination."), - metric.WithUnit("1")) - errors = multierr.Append(errors, err) - - or.failedToEnqueueSpans, err = meter.Int64Counter( - obsmetrics.ExporterMetricPrefix+obsmetrics.FailedToEnqueueSpansKey, - metric.WithDescription("Number of spans failed to be added to the sending queue."), - metric.WithUnit("1")) - errors = multierr.Append(errors, err) - - or.sentMetricPoints, err = meter.Int64Counter( - obsmetrics.ExporterMetricPrefix+obsmetrics.SentMetricPointsKey, - metric.WithDescription("Number of metric points successfully sent to destination."), - metric.WithUnit("1")) - errors = multierr.Append(errors, err) - - or.failedToSendMetricPoints, err = meter.Int64Counter( - obsmetrics.ExporterMetricPrefix+obsmetrics.FailedToSendMetricPointsKey, - metric.WithDescription("Number of metric points in failed attempts to send to destination."), - metric.WithUnit("1")) - errors = multierr.Append(errors, err) - - or.failedToEnqueueMetricPoints, err = meter.Int64Counter( - obsmetrics.ExporterMetricPrefix+obsmetrics.FailedToEnqueueMetricPointsKey, - metric.WithDescription("Number of metric points failed to be added to the sending queue."), - metric.WithUnit("1")) - errors = multierr.Append(errors, err) - - or.sentLogRecords, err = meter.Int64Counter( - obsmetrics.ExporterMetricPrefix+obsmetrics.SentLogRecordsKey, - metric.WithDescription("Number of log record successfully sent to destination."), - metric.WithUnit("1")) - errors = multierr.Append(errors, err) - - or.failedToSendLogRecords, err = meter.Int64Counter( - obsmetrics.ExporterMetricPrefix+obsmetrics.FailedToSendLogRecordsKey, - metric.WithDescription("Number of log records in failed attempts to send to destination."), - metric.WithUnit("1")) - errors = multierr.Append(errors, err) - - or.failedToEnqueueLogRecords, err = meter.Int64Counter( - obsmetrics.ExporterMetricPrefix+obsmetrics.FailedToEnqueueLogRecordsKey, - metric.WithDescription("Number of log records failed to be added to the sending queue."), - metric.WithUnit("1")) - errors = multierr.Append(errors, err) - - return errors + telemetryBuilder: telemetryBuilder, + }, nil } // StartTracesOp is called at the start of an Export operation. @@ -192,14 +118,14 @@ func (or *ObsReport) recordMetrics(ctx context.Context, dataType component.DataT var sentMeasure, failedMeasure metric.Int64Counter switch dataType { case component.DataTypeTraces: - sentMeasure = or.sentSpans - failedMeasure = or.failedToSendSpans + sentMeasure = or.telemetryBuilder.ExporterSentSpans + failedMeasure = or.telemetryBuilder.ExporterSendFailedSpans case component.DataTypeMetrics: - sentMeasure = or.sentMetricPoints - failedMeasure = or.failedToSendMetricPoints + sentMeasure = or.telemetryBuilder.ExporterSentMetricPoints + failedMeasure = or.telemetryBuilder.ExporterSendFailedMetricPoints case component.DataTypeLogs: - sentMeasure = or.sentLogRecords - failedMeasure = or.failedToSendLogRecords + sentMeasure = or.telemetryBuilder.ExporterSentLogRecords + failedMeasure = or.telemetryBuilder.ExporterSendFailedLogRecords } sentMeasure.Add(ctx, sent, metric.WithAttributes(or.otelAttrs...)) @@ -232,11 +158,11 @@ func (or *ObsReport) recordEnqueueFailure(ctx context.Context, dataType componen var enqueueFailedMeasure metric.Int64Counter switch dataType { case component.DataTypeTraces: - enqueueFailedMeasure = or.failedToEnqueueSpans + enqueueFailedMeasure = or.telemetryBuilder.ExporterEnqueueFailedSpans case component.DataTypeMetrics: - enqueueFailedMeasure = or.failedToEnqueueMetricPoints + enqueueFailedMeasure = or.telemetryBuilder.ExporterEnqueueFailedMetricPoints case component.DataTypeLogs: - enqueueFailedMeasure = or.failedToEnqueueLogRecords + enqueueFailedMeasure = or.telemetryBuilder.ExporterEnqueueFailedLogRecords } enqueueFailedMeasure.Add(ctx, failed, metric.WithAttributes(or.otelAttrs...)) diff --git a/exporter/exporterhelper/obsexporter_test.go b/exporter/exporterhelper/obsexporter_test.go index f6f46ccbad2..63da5fcf803 100644 --- a/exporter/exporterhelper/obsexporter_test.go +++ b/exporter/exporterhelper/obsexporter_test.go @@ -237,11 +237,9 @@ type testParams struct { } func testTelemetry(t *testing.T, id component.ID, testFunc func(t *testing.T, tt componenttest.TestTelemetry)) { - t.Run("WithOTel", func(t *testing.T) { - tt, err := componenttest.SetupTelemetry(id) - require.NoError(t, err) - t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) + tt, err := componenttest.SetupTelemetry(id) + require.NoError(t, err) + t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - testFunc(t, tt) - }) + testFunc(t, tt) } diff --git a/exporter/exporterhelper/queue_sender_test.go b/exporter/exporterhelper/queue_sender_test.go index a2616152ea6..4775938eb55 100644 --- a/exporter/exporterhelper/queue_sender_test.go +++ b/exporter/exporterhelper/queue_sender_test.go @@ -27,7 +27,7 @@ func TestQueuedRetry_StopWhileWaiting(t *testing.T) { qCfg := NewDefaultQueueSettings() qCfg.NumConsumers = 1 rCfg := configretry.NewDefaultBackOffConfig() - be, err := newBaseExporter(defaultSettings, defaultType, newObservabilityConsumerSender, + be, err := newBaseExporter(defaultSettings, defaultDataType, newObservabilityConsumerSender, withMarshaler(mockRequestMarshaler), withUnmarshaler(mockRequestUnmarshaler(&mockRequest{})), WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) @@ -61,7 +61,7 @@ func TestQueuedRetry_DoNotPreserveCancellation(t *testing.T) { qCfg := NewDefaultQueueSettings() qCfg.NumConsumers = 1 rCfg := configretry.NewDefaultBackOffConfig() - be, err := newBaseExporter(defaultSettings, defaultType, newObservabilityConsumerSender, + be, err := newBaseExporter(defaultSettings, defaultDataType, newObservabilityConsumerSender, withMarshaler(mockRequestMarshaler), withUnmarshaler(mockRequestUnmarshaler(&mockRequest{})), WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) @@ -93,7 +93,7 @@ func TestQueuedRetry_RejectOnFull(t *testing.T) { set := exportertest.NewNopCreateSettings() logger, observed := observer.New(zap.ErrorLevel) set.Logger = zap.New(logger) - be, err := newBaseExporter(set, defaultType, newNoopObsrepSender, + be, err := newBaseExporter(set, defaultDataType, newNoopObsrepSender, withMarshaler(mockRequestMarshaler), withUnmarshaler(mockRequestUnmarshaler(&mockRequest{})), WithQueue(qCfg)) require.NoError(t, err) @@ -166,7 +166,7 @@ func TestQueuedRetryHappyPath(t *testing.T) { t.Cleanup(func() { require.NoError(t, tel.Shutdown(context.Background())) }) set := exporter.CreateSettings{ID: defaultID, TelemetrySettings: tel.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()} - be, err := newBaseExporter(set, defaultType, newObservabilityConsumerSender, tt.queueOptions...) + be, err := newBaseExporter(set, defaultDataType, newObservabilityConsumerSender, tt.queueOptions...) require.NoError(t, err) ocs := be.obsrepSender.(*observabilityConsumerSender) @@ -209,7 +209,7 @@ func TestQueuedRetry_QueueMetricsReported(t *testing.T) { qCfg.NumConsumers = 0 // to make every request go straight to the queue rCfg := configretry.NewDefaultBackOffConfig() set := exporter.CreateSettings{ID: defaultID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()} - be, err := newBaseExporter(set, defaultType, newObservabilityConsumerSender, + be, err := newBaseExporter(set, defaultDataType, newObservabilityConsumerSender, withMarshaler(mockRequestMarshaler), withUnmarshaler(mockRequestUnmarshaler(&mockRequest{})), WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) @@ -338,7 +338,7 @@ func TestQueuedRetryPersistenceEnabled(t *testing.T) { qCfg.StorageID = &storageID // enable persistence rCfg := configretry.NewDefaultBackOffConfig() set := exporter.CreateSettings{ID: defaultID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()} - be, err := newBaseExporter(set, defaultType, newObservabilityConsumerSender, + be, err := newBaseExporter(set, defaultDataType, newObservabilityConsumerSender, withMarshaler(mockRequestMarshaler), withUnmarshaler(mockRequestUnmarshaler(&mockRequest{})), WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) @@ -364,7 +364,7 @@ func TestQueuedRetryPersistenceEnabledStorageError(t *testing.T) { qCfg.StorageID = &storageID // enable persistence rCfg := configretry.NewDefaultBackOffConfig() set := exporter.CreateSettings{ID: defaultID, TelemetrySettings: tt.TelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo()} - be, err := newBaseExporter(set, defaultType, newObservabilityConsumerSender, withMarshaler(mockRequestMarshaler), + be, err := newBaseExporter(set, defaultDataType, newObservabilityConsumerSender, withMarshaler(mockRequestMarshaler), withUnmarshaler(mockRequestUnmarshaler(&mockRequest{})), WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) @@ -388,7 +388,7 @@ func TestQueuedRetryPersistentEnabled_NoDataLossOnShutdown(t *testing.T) { rCfg.MaxElapsedTime = 0 // retry infinitely so shutdown can be triggered mockReq := newErrorRequest() - be, err := newBaseExporter(defaultSettings, defaultType, newNoopObsrepSender, withMarshaler(mockRequestMarshaler), + be, err := newBaseExporter(defaultSettings, defaultDataType, newNoopObsrepSender, withMarshaler(mockRequestMarshaler), withUnmarshaler(mockRequestUnmarshaler(mockReq)), WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) @@ -412,7 +412,7 @@ func TestQueuedRetryPersistentEnabled_NoDataLossOnShutdown(t *testing.T) { // start the exporter again replacing the preserved mockRequest in the unmarshaler with a new one that doesn't fail. replacedReq := newMockRequest(1, nil) - be, err = newBaseExporter(defaultSettings, defaultType, newNoopObsrepSender, withMarshaler(mockRequestMarshaler), + be, err = newBaseExporter(defaultSettings, defaultDataType, newNoopObsrepSender, withMarshaler(mockRequestMarshaler), withUnmarshaler(mockRequestUnmarshaler(replacedReq)), WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) require.NoError(t, be.Start(context.Background(), host)) diff --git a/exporter/exporterhelper/request.go b/exporter/exporterhelper/request.go index fa6856d385a..74f0186541f 100644 --- a/exporter/exporterhelper/request.go +++ b/exporter/exporterhelper/request.go @@ -32,16 +32,6 @@ type RequestErrorHandler interface { OnError(error) Request } -// RequestMarshaler is a function that can marshal a Request into bytes. -// -// Deprecated: [v0.94.0] Use exporterqueue.Marshaler[Request] instead. -type RequestMarshaler func(req Request) ([]byte, error) - -// RequestUnmarshaler is a function that can unmarshal bytes into a Request. -// -// Deprecated: [v0.94.0] Use exporterqueue.Unmarshaler[Request] instead. -type RequestUnmarshaler func(data []byte) (Request, error) - // extractPartialRequest returns a new Request that may contain the items left to be sent // if only some items failed to process and can be retried. Otherwise, it returns the original Request. func extractPartialRequest(req Request, err error) Request { diff --git a/exporter/exporterhelper/retry_sender_test.go b/exporter/exporterhelper/retry_sender_test.go index d3863097326..ef47597c62e 100644 --- a/exporter/exporterhelper/retry_sender_test.go +++ b/exporter/exporterhelper/retry_sender_test.go @@ -39,7 +39,7 @@ func TestQueuedRetry_DropOnPermanentError(t *testing.T) { qCfg := NewDefaultQueueSettings() rCfg := configretry.NewDefaultBackOffConfig() mockR := newMockRequest(2, consumererror.NewPermanent(errors.New("bad data"))) - be, err := newBaseExporter(defaultSettings, defaultType, newObservabilityConsumerSender, + be, err := newBaseExporter(defaultSettings, defaultDataType, newObservabilityConsumerSender, withMarshaler(mockRequestMarshaler), withUnmarshaler(mockRequestUnmarshaler(mockR)), WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) ocs := be.obsrepSender.(*observabilityConsumerSender) @@ -63,7 +63,7 @@ func TestQueuedRetry_DropOnNoRetry(t *testing.T) { qCfg := NewDefaultQueueSettings() rCfg := configretry.NewDefaultBackOffConfig() rCfg.Enabled = false - be, err := newBaseExporter(defaultSettings, defaultType, newObservabilityConsumerSender, withMarshaler(mockRequestMarshaler), + be, err := newBaseExporter(defaultSettings, defaultDataType, newObservabilityConsumerSender, withMarshaler(mockRequestMarshaler), withUnmarshaler(mockRequestUnmarshaler(newMockRequest(2, errors.New("transient error")))), WithQueue(qCfg), WithRetry(rCfg)) require.NoError(t, err) @@ -90,7 +90,7 @@ func TestQueuedRetry_OnError(t *testing.T) { qCfg.NumConsumers = 1 rCfg := configretry.NewDefaultBackOffConfig() rCfg.InitialInterval = 0 - be, err := newBaseExporter(defaultSettings, defaultType, newObservabilityConsumerSender, + be, err := newBaseExporter(defaultSettings, defaultDataType, newObservabilityConsumerSender, withMarshaler(mockRequestMarshaler), withUnmarshaler(mockRequestUnmarshaler(&mockRequest{})), WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) @@ -120,7 +120,7 @@ func TestQueuedRetry_MaxElapsedTime(t *testing.T) { rCfg := configretry.NewDefaultBackOffConfig() rCfg.InitialInterval = time.Millisecond rCfg.MaxElapsedTime = 100 * time.Millisecond - be, err := newBaseExporter(defaultSettings, defaultType, newObservabilityConsumerSender, + be, err := newBaseExporter(defaultSettings, defaultDataType, newObservabilityConsumerSender, withMarshaler(mockRequestMarshaler), withUnmarshaler(mockRequestUnmarshaler(&mockRequest{})), WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) @@ -168,7 +168,7 @@ func TestQueuedRetry_ThrottleError(t *testing.T) { qCfg.NumConsumers = 1 rCfg := configretry.NewDefaultBackOffConfig() rCfg.InitialInterval = 10 * time.Millisecond - be, err := newBaseExporter(defaultSettings, defaultType, newObservabilityConsumerSender, + be, err := newBaseExporter(defaultSettings, defaultDataType, newObservabilityConsumerSender, withMarshaler(mockRequestMarshaler), withUnmarshaler(mockRequestUnmarshaler(&mockRequest{})), WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) @@ -202,7 +202,7 @@ func TestQueuedRetry_RetryOnError(t *testing.T) { qCfg.QueueSize = 1 rCfg := configretry.NewDefaultBackOffConfig() rCfg.InitialInterval = 0 - be, err := newBaseExporter(defaultSettings, defaultType, newObservabilityConsumerSender, + be, err := newBaseExporter(defaultSettings, defaultDataType, newObservabilityConsumerSender, withMarshaler(mockRequestMarshaler), withUnmarshaler(mockRequestUnmarshaler(&mockRequest{})), WithRetry(rCfg), WithQueue(qCfg)) require.NoError(t, err) diff --git a/exporter/go.mod b/exporter/go.mod index 47b4d59cfe9..0f69341aaf8 100644 --- a/exporter/go.mod +++ b/exporter/go.mod @@ -1,34 +1,35 @@ module go.opentelemetry.io/collector/exporter -go 1.21 +go 1.21.0 require ( github.com/cenkalti/backoff/v4 v4.3.0 github.com/google/uuid v1.6.0 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector v0.100.0 - go.opentelemetry.io/collector/component v0.100.0 - go.opentelemetry.io/collector/config/configretry v0.100.0 - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 - go.opentelemetry.io/collector/consumer v0.100.0 - go.opentelemetry.io/collector/extension v0.100.0 - go.opentelemetry.io/collector/pdata v1.7.0 - go.opentelemetry.io/collector/pdata/testdata v0.100.0 - go.opentelemetry.io/collector/receiver v0.100.0 - go.opentelemetry.io/otel v1.26.0 - go.opentelemetry.io/otel/metric v1.26.0 - go.opentelemetry.io/otel/sdk v1.26.0 - go.opentelemetry.io/otel/trace v1.26.0 + go.opentelemetry.io/collector v0.102.1 + go.opentelemetry.io/collector/component v0.102.1 + go.opentelemetry.io/collector/config/configretry v0.102.1 + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 + go.opentelemetry.io/collector/consumer v0.102.1 + go.opentelemetry.io/collector/extension v0.102.1 + go.opentelemetry.io/collector/pdata v1.9.0 + go.opentelemetry.io/collector/pdata/testdata v0.102.1 + go.opentelemetry.io/collector/receiver v0.102.1 + go.opentelemetry.io/otel v1.27.0 + go.opentelemetry.io/otel/metric v1.27.0 + go.opentelemetry.io/otel/sdk v1.27.0 + go.opentelemetry.io/otel/sdk/metric v1.27.0 + go.opentelemetry.io/otel/trace v1.27.0 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 - golang.org/x/sys v0.19.0 - google.golang.org/grpc v1.63.2 + golang.org/x/sys v0.20.0 + google.golang.org/grpc v1.64.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -43,17 +44,16 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.53.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector/confmap v0.100.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/protobuf v1.34.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect + go.opentelemetry.io/collector/confmap v0.102.1 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/text v0.15.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/go.sum b/exporter/go.sum index 7bbf6704ff6..31bd5593265 100644 --- a/exporter/go.sum +++ b/exporter/go.sum @@ -2,8 +2,8 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -46,14 +46,14 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -62,18 +62,18 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -89,20 +89,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -111,12 +111,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/exporter/loggingexporter/config_test.go b/exporter/loggingexporter/config_test.go index ead57851462..a7f18e6643b 100644 --- a/exporter/loggingexporter/config_test.go +++ b/exporter/loggingexporter/config_test.go @@ -11,7 +11,6 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/zap/zapcore" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/confmaptest" @@ -20,7 +19,7 @@ import ( func TestUnmarshalDefaultConfig(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig() - assert.NoError(t, component.UnmarshalConfig(confmap.New(), cfg)) + assert.NoError(t, confmap.New().Unmarshal(&cfg)) assert.Equal(t, factory.CreateDefaultConfig(), cfg) } @@ -75,7 +74,7 @@ func TestUnmarshalConfig(t *testing.T) { require.NoError(t, err) factory := NewFactory() cfg := factory.CreateDefaultConfig() - err = component.UnmarshalConfig(cm, cfg) + err = cm.Unmarshal(&cfg) if tt.expectedErr != "" { assert.EqualError(t, err, tt.expectedErr) } else { @@ -135,7 +134,7 @@ func Test_UnmarshalMarshalled(t *testing.T) { outCfg := &Config{} - err = component.UnmarshalConfig(conf, outCfg) + err = conf.Unmarshal(outCfg) if tc.expectedErr == "" { assert.NoError(t, err) diff --git a/exporter/loggingexporter/generated_component_test.go b/exporter/loggingexporter/generated_component_test.go index e5902b96208..fc2245c31d8 100644 --- a/exporter/loggingexporter/generated_component_test.go +++ b/exporter/loggingexporter/generated_component_test.go @@ -63,7 +63,7 @@ func TestComponentLifecycle(t *testing.T) { cfg := factory.CreateDefaultConfig() sub, err := cm.Sub("tests::config") require.NoError(t, err) - require.NoError(t, component.UnmarshalConfig(sub, cfg)) + require.NoError(t, sub.Unmarshal(&cfg)) for _, test := range tests { t.Run(test.name+"-shutdown", func(t *testing.T) { diff --git a/exporter/loggingexporter/go.mod b/exporter/loggingexporter/go.mod index d817b35d6a6..f43fd0be4d3 100644 --- a/exporter/loggingexporter/go.mod +++ b/exporter/loggingexporter/go.mod @@ -1,17 +1,15 @@ // Deprecated: loggingexporter is deprecated in favour of the debugexporter. It will be removed in September 2024. module go.opentelemetry.io/collector/exporter/loggingexporter -go 1.21 +go 1.21.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.100.0 - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 - go.opentelemetry.io/collector/confmap v0.100.0 - go.opentelemetry.io/collector/exporter v0.100.0 - go.opentelemetry.io/collector/pdata v1.7.0 - go.opentelemetry.io/otel/metric v1.26.0 - go.opentelemetry.io/otel/trace v1.26.0 + go.opentelemetry.io/collector/component v0.102.1 + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 + go.opentelemetry.io/collector/confmap v0.102.1 + go.opentelemetry.io/collector/exporter v0.102.1 + go.opentelemetry.io/collector/pdata v1.9.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 ) @@ -19,7 +17,7 @@ require ( require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -35,26 +33,28 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.53.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector v0.100.0 // indirect - go.opentelemetry.io/collector/config/configretry v0.100.0 // indirect - go.opentelemetry.io/collector/consumer v0.100.0 // indirect - go.opentelemetry.io/collector/extension v0.100.0 // indirect - go.opentelemetry.io/collector/receiver v0.100.0 // indirect - go.opentelemetry.io/otel v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect - go.opentelemetry.io/otel/sdk v1.26.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect + go.opentelemetry.io/collector v0.102.1 // indirect + go.opentelemetry.io/collector/config/configretry v0.102.1 // indirect + go.opentelemetry.io/collector/consumer v0.102.1 // indirect + go.opentelemetry.io/collector/extension v0.102.1 // indirect + go.opentelemetry.io/collector/receiver v0.102.1 // indirect + go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.34.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/loggingexporter/go.sum b/exporter/loggingexporter/go.sum index 7bbf6704ff6..31bd5593265 100644 --- a/exporter/loggingexporter/go.sum +++ b/exporter/loggingexporter/go.sum @@ -2,8 +2,8 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -46,14 +46,14 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -62,18 +62,18 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -89,20 +89,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -111,12 +111,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/exporter/loggingexporter/internal/metadata/generated_telemetry.go b/exporter/loggingexporter/internal/metadata/generated_telemetry.go deleted file mode 100644 index 121a4370066..00000000000 --- a/exporter/loggingexporter/internal/metadata/generated_telemetry.go +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" - - "go.opentelemetry.io/collector/component" -) - -func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter("go.opentelemetry.io/collector/exporter/loggingexporter") -} - -func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/exporter/loggingexporter") -} diff --git a/exporter/nopexporter/generated_component_test.go b/exporter/nopexporter/generated_component_test.go index 675dee1a0ee..2b65f482fdf 100644 --- a/exporter/nopexporter/generated_component_test.go +++ b/exporter/nopexporter/generated_component_test.go @@ -63,7 +63,7 @@ func TestComponentLifecycle(t *testing.T) { cfg := factory.CreateDefaultConfig() sub, err := cm.Sub("tests::config") require.NoError(t, err) - require.NoError(t, component.UnmarshalConfig(sub, cfg)) + require.NoError(t, sub.Unmarshal(&cfg)) for _, test := range tests { t.Run(test.name+"-shutdown", func(t *testing.T) { diff --git a/exporter/nopexporter/go.mod b/exporter/nopexporter/go.mod index 5d3489ccf93..0df9fd3821e 100644 --- a/exporter/nopexporter/go.mod +++ b/exporter/nopexporter/go.mod @@ -1,24 +1,20 @@ module go.opentelemetry.io/collector/exporter/nopexporter -go 1.21 - -toolchain go1.21.6 +go 1.21.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.100.0 - go.opentelemetry.io/collector/confmap v0.100.0 - go.opentelemetry.io/collector/consumer v0.100.0 - go.opentelemetry.io/collector/exporter v0.100.0 - go.opentelemetry.io/collector/pdata v1.7.0 - go.opentelemetry.io/otel/metric v1.26.0 - go.opentelemetry.io/otel/trace v1.26.0 + go.opentelemetry.io/collector/component v0.102.1 + go.opentelemetry.io/collector/confmap v0.102.1 + go.opentelemetry.io/collector/consumer v0.102.1 + go.opentelemetry.io/collector/exporter v0.102.1 + go.opentelemetry.io/collector/pdata v1.9.0 go.uber.org/goleak v1.3.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -34,24 +30,26 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.53.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect - go.opentelemetry.io/collector/receiver v0.100.0 // indirect - go.opentelemetry.io/otel v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect - go.opentelemetry.io/otel/sdk v1.26.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 // indirect + go.opentelemetry.io/collector/receiver v0.102.1 // indirect + go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.34.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/nopexporter/go.sum b/exporter/nopexporter/go.sum index 7bbf6704ff6..31bd5593265 100644 --- a/exporter/nopexporter/go.sum +++ b/exporter/nopexporter/go.sum @@ -2,8 +2,8 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -46,14 +46,14 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -62,18 +62,18 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -89,20 +89,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -111,12 +111,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/exporter/nopexporter/internal/metadata/generated_telemetry.go b/exporter/nopexporter/internal/metadata/generated_telemetry.go deleted file mode 100644 index db41096278d..00000000000 --- a/exporter/nopexporter/internal/metadata/generated_telemetry.go +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" - - "go.opentelemetry.io/collector/component" -) - -func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter("go.opentelemetry.io/collector/exporter/nopexporter") -} - -func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/exporter/nopexporter") -} diff --git a/exporter/otlpexporter/config_test.go b/exporter/otlpexporter/config_test.go index 7a644b7ef0e..2167f803ef3 100644 --- a/exporter/otlpexporter/config_test.go +++ b/exporter/otlpexporter/config_test.go @@ -25,7 +25,7 @@ import ( func TestUnmarshalDefaultConfig(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig() - assert.NoError(t, component.UnmarshalConfig(confmap.New(), cfg)) + assert.NoError(t, confmap.New().Unmarshal(&cfg)) assert.Equal(t, factory.CreateDefaultConfig(), cfg) } @@ -34,7 +34,7 @@ func TestUnmarshalConfig(t *testing.T) { require.NoError(t, err) factory := NewFactory() cfg := factory.CreateDefaultConfig() - assert.NoError(t, component.UnmarshalConfig(cm, cfg)) + assert.NoError(t, cm.Unmarshal(&cfg)) assert.Equal(t, &Config{ TimeoutSettings: exporterhelper.TimeoutSettings{ @@ -124,7 +124,7 @@ func TestUnmarshalInvalidConfig(t *testing.T) { cfg := factory.CreateDefaultConfig() sub, err := cm.Sub(test.name) require.NoError(t, err) - assert.NoError(t, component.UnmarshalConfig(sub, cfg)) + assert.NoError(t, sub.Unmarshal(&cfg)) assert.ErrorContains(t, component.ValidateConfig(cfg), test.errorMsg) }) } diff --git a/exporter/otlpexporter/generated_component_test.go b/exporter/otlpexporter/generated_component_test.go index 27a3b7da3d0..7a410496a46 100644 --- a/exporter/otlpexporter/generated_component_test.go +++ b/exporter/otlpexporter/generated_component_test.go @@ -63,7 +63,7 @@ func TestComponentLifecycle(t *testing.T) { cfg := factory.CreateDefaultConfig() sub, err := cm.Sub("tests::config") require.NoError(t, err) - require.NoError(t, component.UnmarshalConfig(sub, cfg)) + require.NoError(t, sub.Unmarshal(&cfg)) for _, test := range tests { t.Run(test.name+"-shutdown", func(t *testing.T) { diff --git a/exporter/otlpexporter/go.mod b/exporter/otlpexporter/go.mod index 6ba890c33a8..56481b61f9a 100644 --- a/exporter/otlpexporter/go.mod +++ b/exporter/otlpexporter/go.mod @@ -1,35 +1,33 @@ module go.opentelemetry.io/collector/exporter/otlpexporter -go 1.21 +go 1.21.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector v0.100.0 - go.opentelemetry.io/collector/component v0.100.0 - go.opentelemetry.io/collector/config/configauth v0.100.0 - go.opentelemetry.io/collector/config/configcompression v1.7.0 - go.opentelemetry.io/collector/config/configgrpc v0.100.0 - go.opentelemetry.io/collector/config/configopaque v1.7.0 - go.opentelemetry.io/collector/config/configretry v0.100.0 - go.opentelemetry.io/collector/config/configtls v0.100.0 - go.opentelemetry.io/collector/confmap v0.100.0 - go.opentelemetry.io/collector/consumer v0.100.0 - go.opentelemetry.io/collector/exporter v0.100.0 - go.opentelemetry.io/collector/pdata v1.7.0 - go.opentelemetry.io/collector/pdata/testdata v0.100.0 - go.opentelemetry.io/otel/metric v1.26.0 - go.opentelemetry.io/otel/trace v1.26.0 + go.opentelemetry.io/collector v0.102.1 + go.opentelemetry.io/collector/component v0.102.1 + go.opentelemetry.io/collector/config/configauth v0.102.1 + go.opentelemetry.io/collector/config/configcompression v1.9.0 + go.opentelemetry.io/collector/config/configgrpc v0.102.1 + go.opentelemetry.io/collector/config/configopaque v1.9.0 + go.opentelemetry.io/collector/config/configretry v0.102.1 + go.opentelemetry.io/collector/config/configtls v0.102.1 + go.opentelemetry.io/collector/confmap v0.102.1 + go.opentelemetry.io/collector/consumer v0.102.1 + go.opentelemetry.io/collector/exporter v0.102.1 + go.opentelemetry.io/collector/pdata v1.9.0 + go.opentelemetry.io/collector/pdata/testdata v0.102.1 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda - google.golang.org/grpc v1.63.2 - google.golang.org/protobuf v1.34.0 + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 + google.golang.org/grpc v1.64.0 + google.golang.org/protobuf v1.34.1 ) require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-logr/logr v1.4.1 // indirect @@ -38,8 +36,8 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect + github.com/hashicorp/go-version v1.7.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.17.4 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect @@ -51,36 +49,38 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mostynb/go-grpc-compression v1.2.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.53.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector/config/confignet v0.100.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect - go.opentelemetry.io/collector/config/internal v0.100.0 // indirect - go.opentelemetry.io/collector/extension v0.100.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.100.0 // indirect - go.opentelemetry.io/collector/featuregate v1.7.0 // indirect - go.opentelemetry.io/collector/receiver v0.100.0 // indirect - go.opentelemetry.io/contrib/config v0.6.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 // indirect - go.opentelemetry.io/otel v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 // indirect - go.opentelemetry.io/otel/sdk v1.26.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect + go.opentelemetry.io/collector/config/confignet v0.102.1 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 // indirect + go.opentelemetry.io/collector/config/internal v0.102.1 // indirect + go.opentelemetry.io/collector/extension v0.102.1 // indirect + go.opentelemetry.io/collector/extension/auth v0.102.1 // indirect + go.opentelemetry.io/collector/featuregate v1.9.0 // indirect + go.opentelemetry.io/collector/receiver v0.102.1 // indirect + go.opentelemetry.io/contrib/config v0.7.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 // indirect + go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect go.opentelemetry.io/proto/otlp v1.2.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/otlpexporter/go.sum b/exporter/otlpexporter/go.sum index 0180159064d..73edf49af8e 100644 --- a/exporter/otlpexporter/go.sum +++ b/exporter/otlpexporter/go.sum @@ -2,8 +2,8 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -25,10 +25,10 @@ github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 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/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -58,52 +58,52 @@ github.com/mostynb/go-grpc-compression v1.2.2 h1:XaDbnRvt2+1vgr0b/l0qh4mJAfIxE0b github.com/mostynb/go-grpc-compression v1.2.2/go.mod h1:GOCr2KBxXcblCuczg3YdLQlcin1/NfyDA348ckuCH6w= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/contrib/config v0.6.0 h1:M1SRD1Z15XHPGk61tMLI1up77XT5FdrqQSRrlH0fYuk= -go.opentelemetry.io/contrib/config v0.6.0/go.mod h1:t+/kzmRWLN7J+4F/dD4fFvlYCmCO63WYwy/B00IC++c= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 h1:A3SayB3rNyt+1S6qpI9mHPkeHTZbD7XILEqWnYZb2l0= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0/go.mod h1:27iA5uvhuRNmalO+iEUdVn5ZMj2qy10Mm+XRIpRmyuU= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 h1:+hm+I+KigBy3M24/h1p/NHkUx/evbLH0PNcjpMyCHc4= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0/go.mod h1:NjC8142mLvvNT6biDpaMjyz78kyEHIwAJlSX0N9P5KI= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 h1:HGZWGmCVRCVyAs2GQaiHQPbDHo+ObFWeUEOd+zDnp64= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0/go.mod h1:SaH+v38LSCHddyk7RGlU9uZyQoRrKao6IBnJw6Kbn+c= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 h1:1u/AyyOqAWzy+SkPxDpahCNZParHV8Vid1RnI2clyDE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0/go.mod h1:z46paqbJ9l7c9fIPCXTqTGwhQZ5XoTIsfeFYWboizjs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 h1:Waw9Wfpo/IXzOI8bCB7DIk+0JZcqqsyn1JFnAc+iam8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0/go.mod h1:wnJIG4fOqyynOnnQF/eQb4/16VlX2EJAHhHgqIqWfAo= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 h1:1wp/gyxsuYtuE/JFxsQRtcCDtMrO2qMvlfXALU5wkzI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0/go.mod h1:gbTHmghkGgqxMomVQQMur1Nba4M0MQ8AYThXDUjsJ38= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 h1:5fnmgteaar1VcAA69huatudPduNFz7guRtCmfZCooZI= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0/go.mod h1:lsPccfZiz1cb1AhBPmicWM2E4F1VynFXEvD8SEBS4TM= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 h1:0W5o9SzoR15ocYHEQfvfipzcNog1lBxOLfnex91Hk6s= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0/go.mod h1:zVZ8nz+VSggWmnh6tTsJqXQ7rU4xLwRtna1M4x5jq58= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/contrib/config v0.7.0 h1:b1rK5tGTuhhPirJiMxOcyQfZs76j2VapY6ODn3b2Dbs= +go.opentelemetry.io/contrib/config v0.7.0/go.mod h1:8tdiFd8N5etOi3XzBmAoMxplEzI3TcL8dU5rM5/xcOQ= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 h1:vS1Ao/R55RNV4O7TA2Qopok8yN+X0LIP6RVWLFkprck= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0/go.mod h1:BMsdeOxN04K0L5FNUBfjFdvwWGNe/rkmSwH4Aelu/X0= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 h1:QY7/0NeRPKlzusf40ZE4t1VlMKbqSNT7cJRYzWuja0s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0/go.mod h1:HVkSiDhTM9BoUJU8qE6j2eSWLLXvi1USXjyd2BXT8PY= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0 h1:/jlt1Y8gXWiHG9FBx6cJaIC5hYx5Fe64nC8w5Cylt/0= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0/go.mod h1:bmToOGOBZ4hA9ghphIc1PAf66VA8KOtsuy3+ScStG20= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0 h1:/0YaXu3755A/cFbtXp+21lkXgI0QE5avTWA2HjU9/WE= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0/go.mod h1:m7SFxp0/7IxmJPLIY3JhOcU9CoFzDaCPL6xxQIxhA+o= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -121,20 +121,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -143,16 +143,14 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 h1:P8OJ/WCl/Xo4E4zoe4/bifHpSmmKwARqyqE4nW6J2GQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/exporter/otlpexporter/internal/metadata/generated_telemetry.go b/exporter/otlpexporter/internal/metadata/generated_telemetry.go deleted file mode 100644 index ee872915b19..00000000000 --- a/exporter/otlpexporter/internal/metadata/generated_telemetry.go +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" - - "go.opentelemetry.io/collector/component" -) - -func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter("go.opentelemetry.io/collector/exporter/otlpexporter") -} - -func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/exporter/otlpexporter") -} diff --git a/exporter/otlpexporter/internal/metadata/generated_telemetry_test.go b/exporter/otlpexporter/internal/metadata/generated_telemetry_test.go deleted file mode 100644 index 8ad8ad95063..00000000000 --- a/exporter/otlpexporter/internal/metadata/generated_telemetry_test.go +++ /dev/null @@ -1,63 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "testing" - - "github.com/stretchr/testify/require" - "go.opentelemetry.io/otel/metric" - embeddedmetric "go.opentelemetry.io/otel/metric/embedded" - noopmetric "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" - embeddedtrace "go.opentelemetry.io/otel/trace/embedded" - nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" -) - -type mockMeter struct { - noopmetric.Meter - name string -} -type mockMeterProvider struct { - embeddedmetric.MeterProvider -} - -func (m mockMeterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter { - return mockMeter{name: name} -} - -type mockTracer struct { - nooptrace.Tracer - name string -} - -type mockTracerProvider struct { - embeddedtrace.TracerProvider -} - -func (m mockTracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { - return mockTracer{name: name} -} - -func TestProviders(t *testing.T) { - set := component.TelemetrySettings{ - MeterProvider: mockMeterProvider{}, - TracerProvider: mockTracerProvider{}, - } - - meter := Meter(set) - if m, ok := meter.(mockMeter); ok { - require.Equal(t, "go.opentelemetry.io/collector/exporter/otlpexporter", m.name) - } else { - require.Fail(t, "returned Meter not mockMeter") - } - - tracer := Tracer(set) - if m, ok := tracer.(mockTracer); ok { - require.Equal(t, "go.opentelemetry.io/collector/exporter/otlpexporter", m.name) - } else { - require.Fail(t, "returned Meter not mockTracer") - } -} diff --git a/exporter/otlphttpexporter/config_test.go b/exporter/otlphttpexporter/config_test.go index e158891dd75..9a9e261308f 100644 --- a/exporter/otlphttpexporter/config_test.go +++ b/exporter/otlphttpexporter/config_test.go @@ -24,7 +24,7 @@ import ( func TestUnmarshalDefaultConfig(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig() - assert.NoError(t, component.UnmarshalConfig(confmap.New(), cfg)) + assert.NoError(t, confmap.New().Unmarshal(&cfg)) assert.Equal(t, factory.CreateDefaultConfig(), cfg) // Default/Empty config is invalid. assert.Error(t, component.ValidateConfig(cfg)) @@ -35,7 +35,7 @@ func TestUnmarshalConfig(t *testing.T) { require.NoError(t, err) factory := NewFactory() cfg := factory.CreateDefaultConfig() - assert.NoError(t, component.UnmarshalConfig(cm, cfg)) + assert.NoError(t, cm.Unmarshal(&cfg)) assert.Equal(t, &Config{ RetryConfig: configretry.BackOffConfig{ @@ -80,7 +80,7 @@ func TestUnmarshalConfigInvalidEncoding(t *testing.T) { require.NoError(t, err) factory := NewFactory() cfg := factory.CreateDefaultConfig() - assert.Error(t, component.UnmarshalConfig(cm, cfg)) + assert.Error(t, cm.Unmarshal(&cfg)) } func TestUnmarshalEncoding(t *testing.T) { diff --git a/exporter/otlphttpexporter/generated_component_test.go b/exporter/otlphttpexporter/generated_component_test.go index 443b94841b4..c378698b41e 100644 --- a/exporter/otlphttpexporter/generated_component_test.go +++ b/exporter/otlphttpexporter/generated_component_test.go @@ -63,7 +63,7 @@ func TestComponentLifecycle(t *testing.T) { cfg := factory.CreateDefaultConfig() sub, err := cm.Sub("tests::config") require.NoError(t, err) - require.NoError(t, component.UnmarshalConfig(sub, cfg)) + require.NoError(t, sub.Unmarshal(&cfg)) for _, test := range tests { t.Run(test.name+"-shutdown", func(t *testing.T) { diff --git a/exporter/otlphttpexporter/go.mod b/exporter/otlphttpexporter/go.mod index 2c9f641f43b..c4fcfbc5059 100644 --- a/exporter/otlphttpexporter/go.mod +++ b/exporter/otlphttpexporter/go.mod @@ -1,33 +1,31 @@ module go.opentelemetry.io/collector/exporter/otlphttpexporter -go 1.21 +go 1.21.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector v0.100.0 - go.opentelemetry.io/collector/component v0.100.0 - go.opentelemetry.io/collector/config/configcompression v1.7.0 - go.opentelemetry.io/collector/config/confighttp v0.100.0 - go.opentelemetry.io/collector/config/configopaque v1.7.0 - go.opentelemetry.io/collector/config/configretry v0.100.0 - go.opentelemetry.io/collector/config/configtls v0.100.0 - go.opentelemetry.io/collector/confmap v0.100.0 - go.opentelemetry.io/collector/consumer v0.100.0 - go.opentelemetry.io/collector/exporter v0.100.0 - go.opentelemetry.io/collector/pdata v1.7.0 - go.opentelemetry.io/otel/metric v1.26.0 - go.opentelemetry.io/otel/trace v1.26.0 + go.opentelemetry.io/collector v0.102.1 + go.opentelemetry.io/collector/component v0.102.1 + go.opentelemetry.io/collector/config/configcompression v1.9.0 + go.opentelemetry.io/collector/config/confighttp v0.102.1 + go.opentelemetry.io/collector/config/configopaque v1.9.0 + go.opentelemetry.io/collector/config/configretry v0.102.1 + go.opentelemetry.io/collector/config/configtls v0.102.1 + go.opentelemetry.io/collector/confmap v0.102.1 + go.opentelemetry.io/collector/consumer v0.102.1 + go.opentelemetry.io/collector/exporter v0.102.1 + go.opentelemetry.io/collector/pdata v1.9.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda - google.golang.org/grpc v1.63.2 - google.golang.org/protobuf v1.34.0 + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 + google.golang.org/grpc v1.64.0 + google.golang.org/protobuf v1.34.1 ) require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect @@ -37,8 +35,8 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect + github.com/hashicorp/go-version v1.7.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.17.8 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect @@ -49,37 +47,39 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.53.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect github.com/rs/cors v1.10.1 // indirect - go.opentelemetry.io/collector/config/configauth v0.100.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect - go.opentelemetry.io/collector/config/internal v0.100.0 // indirect - go.opentelemetry.io/collector/extension v0.100.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.100.0 // indirect - go.opentelemetry.io/collector/featuregate v1.7.0 // indirect - go.opentelemetry.io/collector/receiver v0.100.0 // indirect - go.opentelemetry.io/contrib/config v0.6.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 // indirect - go.opentelemetry.io/otel v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 // indirect - go.opentelemetry.io/otel/sdk v1.26.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.102.1 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 // indirect + go.opentelemetry.io/collector/config/internal v0.102.1 // indirect + go.opentelemetry.io/collector/extension v0.102.1 // indirect + go.opentelemetry.io/collector/extension/auth v0.102.1 // indirect + go.opentelemetry.io/collector/featuregate v1.9.0 // indirect + go.opentelemetry.io/collector/receiver v0.102.1 // indirect + go.opentelemetry.io/contrib/config v0.7.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 // indirect + go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect go.opentelemetry.io/proto/otlp v1.2.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/otlphttpexporter/go.sum b/exporter/otlphttpexporter/go.sum index b8a1052e14f..23d45b02bfb 100644 --- a/exporter/otlphttpexporter/go.sum +++ b/exporter/otlphttpexporter/go.sum @@ -2,8 +2,8 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -27,10 +27,10 @@ github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 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/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -58,16 +58,16 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -76,36 +76,36 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/contrib/config v0.6.0 h1:M1SRD1Z15XHPGk61tMLI1up77XT5FdrqQSRrlH0fYuk= -go.opentelemetry.io/contrib/config v0.6.0/go.mod h1:t+/kzmRWLN7J+4F/dD4fFvlYCmCO63WYwy/B00IC++c= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 h1:Xs2Ncz0gNihqu9iosIZ5SkBbWo5T8JhhLJFMQL1qmLI= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0/go.mod h1:vy+2G/6NvVMpwGX/NyLqcC41fxepnuKHk16E6IZUcJc= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 h1:+hm+I+KigBy3M24/h1p/NHkUx/evbLH0PNcjpMyCHc4= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0/go.mod h1:NjC8142mLvvNT6biDpaMjyz78kyEHIwAJlSX0N9P5KI= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 h1:HGZWGmCVRCVyAs2GQaiHQPbDHo+ObFWeUEOd+zDnp64= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0/go.mod h1:SaH+v38LSCHddyk7RGlU9uZyQoRrKao6IBnJw6Kbn+c= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 h1:1u/AyyOqAWzy+SkPxDpahCNZParHV8Vid1RnI2clyDE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0/go.mod h1:z46paqbJ9l7c9fIPCXTqTGwhQZ5XoTIsfeFYWboizjs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 h1:Waw9Wfpo/IXzOI8bCB7DIk+0JZcqqsyn1JFnAc+iam8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0/go.mod h1:wnJIG4fOqyynOnnQF/eQb4/16VlX2EJAHhHgqIqWfAo= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 h1:1wp/gyxsuYtuE/JFxsQRtcCDtMrO2qMvlfXALU5wkzI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0/go.mod h1:gbTHmghkGgqxMomVQQMur1Nba4M0MQ8AYThXDUjsJ38= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 h1:5fnmgteaar1VcAA69huatudPduNFz7guRtCmfZCooZI= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0/go.mod h1:lsPccfZiz1cb1AhBPmicWM2E4F1VynFXEvD8SEBS4TM= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 h1:0W5o9SzoR15ocYHEQfvfipzcNog1lBxOLfnex91Hk6s= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0/go.mod h1:zVZ8nz+VSggWmnh6tTsJqXQ7rU4xLwRtna1M4x5jq58= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/contrib/config v0.7.0 h1:b1rK5tGTuhhPirJiMxOcyQfZs76j2VapY6ODn3b2Dbs= +go.opentelemetry.io/contrib/config v0.7.0/go.mod h1:8tdiFd8N5etOi3XzBmAoMxplEzI3TcL8dU5rM5/xcOQ= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 h1:9l89oX4ba9kHbBol3Xin3leYJ+252h0zszDtBwyKe2A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0/go.mod h1:XLZfZboOJWHNKUv7eH0inh0E9VV6eWDFB/9yJyTLPp0= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 h1:QY7/0NeRPKlzusf40ZE4t1VlMKbqSNT7cJRYzWuja0s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0/go.mod h1:HVkSiDhTM9BoUJU8qE6j2eSWLLXvi1USXjyd2BXT8PY= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0 h1:/jlt1Y8gXWiHG9FBx6cJaIC5hYx5Fe64nC8w5Cylt/0= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0/go.mod h1:bmToOGOBZ4hA9ghphIc1PAf66VA8KOtsuy3+ScStG20= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0 h1:/0YaXu3755A/cFbtXp+21lkXgI0QE5avTWA2HjU9/WE= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0/go.mod h1:m7SFxp0/7IxmJPLIY3JhOcU9CoFzDaCPL6xxQIxhA+o= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -123,20 +123,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -145,16 +145,14 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 h1:P8OJ/WCl/Xo4E4zoe4/bifHpSmmKwARqyqE4nW6J2GQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/exporter/otlphttpexporter/internal/metadata/generated_telemetry.go b/exporter/otlphttpexporter/internal/metadata/generated_telemetry.go deleted file mode 100644 index 8b014c784fb..00000000000 --- a/exporter/otlphttpexporter/internal/metadata/generated_telemetry.go +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" - - "go.opentelemetry.io/collector/component" -) - -func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter("go.opentelemetry.io/collector/exporter/otlphttpexporter") -} - -func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/exporter/otlphttpexporter") -} diff --git a/exporter/otlphttpexporter/internal/metadata/generated_telemetry_test.go b/exporter/otlphttpexporter/internal/metadata/generated_telemetry_test.go deleted file mode 100644 index bc1d66d9cfb..00000000000 --- a/exporter/otlphttpexporter/internal/metadata/generated_telemetry_test.go +++ /dev/null @@ -1,63 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "testing" - - "github.com/stretchr/testify/require" - "go.opentelemetry.io/otel/metric" - embeddedmetric "go.opentelemetry.io/otel/metric/embedded" - noopmetric "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" - embeddedtrace "go.opentelemetry.io/otel/trace/embedded" - nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" -) - -type mockMeter struct { - noopmetric.Meter - name string -} -type mockMeterProvider struct { - embeddedmetric.MeterProvider -} - -func (m mockMeterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter { - return mockMeter{name: name} -} - -type mockTracer struct { - nooptrace.Tracer - name string -} - -type mockTracerProvider struct { - embeddedtrace.TracerProvider -} - -func (m mockTracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { - return mockTracer{name: name} -} - -func TestProviders(t *testing.T) { - set := component.TelemetrySettings{ - MeterProvider: mockMeterProvider{}, - TracerProvider: mockTracerProvider{}, - } - - meter := Meter(set) - if m, ok := meter.(mockMeter); ok { - require.Equal(t, "go.opentelemetry.io/collector/exporter/otlphttpexporter", m.name) - } else { - require.Fail(t, "returned Meter not mockMeter") - } - - tracer := Tracer(set) - if m, ok := tracer.(mockTracer); ok { - require.Equal(t, "go.opentelemetry.io/collector/exporter/otlphttpexporter", m.name) - } else { - require.Fail(t, "returned Meter not mockTracer") - } -} diff --git a/extension/auth/go.mod b/extension/auth/go.mod index 661499d5720..3a5c49234b8 100644 --- a/extension/auth/go.mod +++ b/extension/auth/go.mod @@ -1,18 +1,18 @@ module go.opentelemetry.io/collector/extension/auth -go 1.21 +go 1.21.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.100.0 - go.opentelemetry.io/collector/extension v0.100.0 + go.opentelemetry.io/collector/component v0.102.1 + go.opentelemetry.io/collector/extension v0.102.1 go.uber.org/goleak v1.3.0 - google.golang.org/grpc v1.63.2 + google.golang.org/grpc v1.64.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -24,26 +24,26 @@ require ( github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.53.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect - go.opentelemetry.io/collector/confmap v0.100.0 // indirect - go.opentelemetry.io/collector/pdata v1.7.0 // indirect - go.opentelemetry.io/otel v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect - go.opentelemetry.io/otel/metric v1.26.0 // indirect - go.opentelemetry.io/otel/sdk v1.26.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect - go.opentelemetry.io/otel/trace v1.26.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 // indirect + go.opentelemetry.io/collector/confmap v0.102.1 // indirect + go.opentelemetry.io/collector/pdata v1.9.0 // indirect + go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect golang.org/x/net v0.23.0 // indirect - golang.org/x/sys v0.19.0 // indirect + golang.org/x/sys v0.20.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/protobuf v1.34.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/auth/go.sum b/extension/auth/go.sum index 5467b123e44..df6137c7eb0 100644 --- a/extension/auth/go.sum +++ b/extension/auth/go.sum @@ -1,7 +1,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -33,32 +33,32 @@ github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zx github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -82,8 +82,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -96,12 +96,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/extension/ballastextension/config_test.go b/extension/ballastextension/config_test.go index 4d23c5ebc39..25e3223fe45 100644 --- a/extension/ballastextension/config_test.go +++ b/extension/ballastextension/config_test.go @@ -10,7 +10,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/confmaptest" ) @@ -18,7 +17,7 @@ import ( func TestUnmarshalDefaultConfig(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig() - assert.NoError(t, component.UnmarshalConfig(confmap.New(), cfg)) + assert.NoError(t, confmap.New().Unmarshal(&cfg)) assert.Equal(t, factory.CreateDefaultConfig(), cfg) } @@ -27,7 +26,7 @@ func TestUnmarshalConfig(t *testing.T) { require.NoError(t, err) factory := NewFactory() cfg := factory.CreateDefaultConfig() - assert.NoError(t, component.UnmarshalConfig(cm, cfg)) + assert.NoError(t, cm.Unmarshal(&cfg)) assert.Equal(t, &Config{ SizeMiB: 123, diff --git a/extension/ballastextension/generated_component_test.go b/extension/ballastextension/generated_component_test.go index 779e5631778..2e685378c41 100644 --- a/extension/ballastextension/generated_component_test.go +++ b/extension/ballastextension/generated_component_test.go @@ -8,7 +8,6 @@ import ( "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/extension/extensiontest" @@ -30,7 +29,7 @@ func TestComponentLifecycle(t *testing.T) { cfg := factory.CreateDefaultConfig() sub, err := cm.Sub("tests::config") require.NoError(t, err) - require.NoError(t, component.UnmarshalConfig(sub, cfg)) + require.NoError(t, sub.Unmarshal(&cfg)) t.Run("shutdown", func(t *testing.T) { e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) require.NoError(t, err) diff --git a/extension/ballastextension/go.mod b/extension/ballastextension/go.mod index 8d895a863d1..be3f83e6b6c 100644 --- a/extension/ballastextension/go.mod +++ b/extension/ballastextension/go.mod @@ -1,23 +1,21 @@ // Deprecated: Use the GOMEMLIMIT environment variable instead. module go.opentelemetry.io/collector/extension/ballastextension -go 1.21 +go 1.21.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector v0.100.0 - go.opentelemetry.io/collector/component v0.100.0 - go.opentelemetry.io/collector/confmap v0.100.0 - go.opentelemetry.io/collector/extension v0.100.0 - go.opentelemetry.io/otel/metric v1.26.0 - go.opentelemetry.io/otel/trace v1.26.0 + go.opentelemetry.io/collector v0.102.1 + go.opentelemetry.io/collector/component v0.102.1 + go.opentelemetry.io/collector/confmap v0.102.1 + go.opentelemetry.io/collector/extension v0.102.1 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -33,27 +31,29 @@ require ( github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.53.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - github.com/shirou/gopsutil/v3 v3.24.3 // indirect + github.com/prometheus/procfs v0.15.0 // indirect + github.com/shirou/gopsutil/v3 v3.24.4 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect - go.opentelemetry.io/collector/pdata v1.7.0 // indirect - go.opentelemetry.io/otel v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect - go.opentelemetry.io/otel/sdk v1.26.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 // indirect + go.opentelemetry.io/collector/pdata v1.9.0 // indirect + go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.34.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/ballastextension/go.sum b/extension/ballastextension/go.sum index 6d9bf441a16..412e23369a7 100644 --- a/extension/ballastextension/go.sum +++ b/extension/ballastextension/go.sum @@ -1,7 +1,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -44,18 +44,18 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= -github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= +github.com/shirou/gopsutil/v3 v3.24.4 h1:dEHgzZXt4LMNm+oYELpzl9YCqV65Yr/6SfrvgRBtXeU= +github.com/shirou/gopsutil/v3 v3.24.4/go.mod h1:lTd2mdiOspcqLgAnr9/nGi71NkeMpWKdmhuxm9GusH8= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -75,18 +75,18 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -102,8 +102,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -114,13 +114,13 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -129,12 +129,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/extension/ballastextension/internal/metadata/generated_telemetry.go b/extension/ballastextension/internal/metadata/generated_telemetry.go deleted file mode 100644 index ddd7d808462..00000000000 --- a/extension/ballastextension/internal/metadata/generated_telemetry.go +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" - - "go.opentelemetry.io/collector/component" -) - -func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter("go.opentelemetry.io/collector/extension/ballastextension") -} - -func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/extension/ballastextension") -} diff --git a/extension/ballastextension/internal/metadata/generated_telemetry_test.go b/extension/ballastextension/internal/metadata/generated_telemetry_test.go deleted file mode 100644 index 6eeac05298b..00000000000 --- a/extension/ballastextension/internal/metadata/generated_telemetry_test.go +++ /dev/null @@ -1,63 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "testing" - - "github.com/stretchr/testify/require" - "go.opentelemetry.io/otel/metric" - embeddedmetric "go.opentelemetry.io/otel/metric/embedded" - noopmetric "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" - embeddedtrace "go.opentelemetry.io/otel/trace/embedded" - nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" -) - -type mockMeter struct { - noopmetric.Meter - name string -} -type mockMeterProvider struct { - embeddedmetric.MeterProvider -} - -func (m mockMeterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter { - return mockMeter{name: name} -} - -type mockTracer struct { - nooptrace.Tracer - name string -} - -type mockTracerProvider struct { - embeddedtrace.TracerProvider -} - -func (m mockTracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { - return mockTracer{name: name} -} - -func TestProviders(t *testing.T) { - set := component.TelemetrySettings{ - MeterProvider: mockMeterProvider{}, - TracerProvider: mockTracerProvider{}, - } - - meter := Meter(set) - if m, ok := meter.(mockMeter); ok { - require.Equal(t, "go.opentelemetry.io/collector/extension/ballastextension", m.name) - } else { - require.Fail(t, "returned Meter not mockMeter") - } - - tracer := Tracer(set) - if m, ok := tracer.(mockTracer); ok { - require.Equal(t, "go.opentelemetry.io/collector/extension/ballastextension", m.name) - } else { - require.Fail(t, "returned Meter not mockTracer") - } -} diff --git a/extension/go.mod b/extension/go.mod index c6f3813997e..7760bd86128 100644 --- a/extension/go.mod +++ b/extension/go.mod @@ -1,18 +1,18 @@ module go.opentelemetry.io/collector/extension -go 1.21 +go 1.21.0 require ( github.com/google/uuid v1.6.0 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.100.0 - go.opentelemetry.io/collector/confmap v0.100.0 + go.opentelemetry.io/collector/component v0.102.1 + go.opentelemetry.io/collector/confmap v0.102.1 go.uber.org/goleak v1.3.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -24,26 +24,26 @@ require ( github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.53.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect - go.opentelemetry.io/collector/pdata v1.7.0 // indirect - go.opentelemetry.io/otel v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect - go.opentelemetry.io/otel/metric v1.26.0 // indirect - go.opentelemetry.io/otel/sdk v1.26.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect - go.opentelemetry.io/otel/trace v1.26.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 // indirect + go.opentelemetry.io/collector/pdata v1.9.0 // indirect + go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect golang.org/x/net v0.23.0 // indirect - golang.org/x/sys v0.19.0 // indirect + golang.org/x/sys v0.20.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.34.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/go.sum b/extension/go.sum index a0f02ecceb9..2c9ec8b1a08 100644 --- a/extension/go.sum +++ b/extension/go.sum @@ -1,7 +1,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -35,32 +35,32 @@ github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zx github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -84,8 +84,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -98,12 +98,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/extension/memorylimiterextension/generated_component_test.go b/extension/memorylimiterextension/generated_component_test.go index 7580d8a30c9..b410b246b94 100644 --- a/extension/memorylimiterextension/generated_component_test.go +++ b/extension/memorylimiterextension/generated_component_test.go @@ -8,7 +8,6 @@ import ( "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/extension/extensiontest" @@ -30,7 +29,7 @@ func TestComponentLifecycle(t *testing.T) { cfg := factory.CreateDefaultConfig() sub, err := cm.Sub("tests::config") require.NoError(t, err) - require.NoError(t, component.UnmarshalConfig(sub, cfg)) + require.NoError(t, sub.Unmarshal(&cfg)) t.Run("lifecycle", func(t *testing.T) { firstExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) require.NoError(t, err) diff --git a/extension/memorylimiterextension/go.mod b/extension/memorylimiterextension/go.mod index 3a10b662bd5..b6df2c9e86a 100644 --- a/extension/memorylimiterextension/go.mod +++ b/extension/memorylimiterextension/go.mod @@ -1,22 +1,20 @@ module go.opentelemetry.io/collector/extension/memorylimiterextension -go 1.21 +go 1.21.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector v0.100.0 - go.opentelemetry.io/collector/component v0.100.0 - go.opentelemetry.io/collector/confmap v0.100.0 - go.opentelemetry.io/collector/extension v0.100.0 - go.opentelemetry.io/otel/metric v1.26.0 - go.opentelemetry.io/otel/trace v1.26.0 + go.opentelemetry.io/collector v0.102.1 + go.opentelemetry.io/collector/component v0.102.1 + go.opentelemetry.io/collector/confmap v0.102.1 + go.opentelemetry.io/collector/extension v0.102.1 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -32,27 +30,29 @@ require ( github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.53.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - github.com/shirou/gopsutil/v3 v3.24.3 // indirect + github.com/prometheus/procfs v0.15.0 // indirect + github.com/shirou/gopsutil/v3 v3.24.4 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect - go.opentelemetry.io/collector/pdata v1.7.0 // indirect - go.opentelemetry.io/otel v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect - go.opentelemetry.io/otel/sdk v1.26.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 // indirect + go.opentelemetry.io/collector/pdata v1.9.0 // indirect + go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.34.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/memorylimiterextension/go.sum b/extension/memorylimiterextension/go.sum index 6d9bf441a16..412e23369a7 100644 --- a/extension/memorylimiterextension/go.sum +++ b/extension/memorylimiterextension/go.sum @@ -1,7 +1,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -44,18 +44,18 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= -github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= +github.com/shirou/gopsutil/v3 v3.24.4 h1:dEHgzZXt4LMNm+oYELpzl9YCqV65Yr/6SfrvgRBtXeU= +github.com/shirou/gopsutil/v3 v3.24.4/go.mod h1:lTd2mdiOspcqLgAnr9/nGi71NkeMpWKdmhuxm9GusH8= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -75,18 +75,18 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -102,8 +102,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -114,13 +114,13 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -129,12 +129,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/extension/memorylimiterextension/internal/metadata/generated_telemetry.go b/extension/memorylimiterextension/internal/metadata/generated_telemetry.go deleted file mode 100644 index c90ad7e67da..00000000000 --- a/extension/memorylimiterextension/internal/metadata/generated_telemetry.go +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" - - "go.opentelemetry.io/collector/component" -) - -func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter("go.opentelemetry.io/collector/extension/memorylimiterextension") -} - -func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/extension/memorylimiterextension") -} diff --git a/extension/memorylimiterextension/internal/metadata/generated_telemetry_test.go b/extension/memorylimiterextension/internal/metadata/generated_telemetry_test.go deleted file mode 100644 index b2c1e454273..00000000000 --- a/extension/memorylimiterextension/internal/metadata/generated_telemetry_test.go +++ /dev/null @@ -1,63 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "testing" - - "github.com/stretchr/testify/require" - "go.opentelemetry.io/otel/metric" - embeddedmetric "go.opentelemetry.io/otel/metric/embedded" - noopmetric "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" - embeddedtrace "go.opentelemetry.io/otel/trace/embedded" - nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" -) - -type mockMeter struct { - noopmetric.Meter - name string -} -type mockMeterProvider struct { - embeddedmetric.MeterProvider -} - -func (m mockMeterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter { - return mockMeter{name: name} -} - -type mockTracer struct { - nooptrace.Tracer - name string -} - -type mockTracerProvider struct { - embeddedtrace.TracerProvider -} - -func (m mockTracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { - return mockTracer{name: name} -} - -func TestProviders(t *testing.T) { - set := component.TelemetrySettings{ - MeterProvider: mockMeterProvider{}, - TracerProvider: mockTracerProvider{}, - } - - meter := Meter(set) - if m, ok := meter.(mockMeter); ok { - require.Equal(t, "go.opentelemetry.io/collector/extension/memorylimiterextension", m.name) - } else { - require.Fail(t, "returned Meter not mockMeter") - } - - tracer := Tracer(set) - if m, ok := tracer.(mockTracer); ok { - require.Equal(t, "go.opentelemetry.io/collector/extension/memorylimiterextension", m.name) - } else { - require.Fail(t, "returned Meter not mockTracer") - } -} diff --git a/extension/zpagesextension/config_test.go b/extension/zpagesextension/config_test.go index f79e74d25c9..f73b9744b0e 100644 --- a/extension/zpagesextension/config_test.go +++ b/extension/zpagesextension/config_test.go @@ -10,7 +10,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/confmaptest" @@ -19,7 +18,7 @@ import ( func TestUnmarshalDefaultConfig(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig() - assert.NoError(t, component.UnmarshalConfig(confmap.New(), cfg)) + assert.NoError(t, confmap.New().Unmarshal(&cfg)) assert.Equal(t, factory.CreateDefaultConfig(), cfg) } @@ -28,7 +27,7 @@ func TestUnmarshalConfig(t *testing.T) { require.NoError(t, err) factory := NewFactory() cfg := factory.CreateDefaultConfig() - assert.NoError(t, component.UnmarshalConfig(cm, cfg)) + assert.NoError(t, cm.Unmarshal(&cfg)) assert.Equal(t, &Config{ TCPAddr: confignet.TCPAddrConfig{ diff --git a/extension/zpagesextension/generated_component_test.go b/extension/zpagesextension/generated_component_test.go index df6ede48a05..8caba7a6d95 100644 --- a/extension/zpagesextension/generated_component_test.go +++ b/extension/zpagesextension/generated_component_test.go @@ -8,7 +8,6 @@ import ( "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/extension/extensiontest" @@ -30,7 +29,7 @@ func TestComponentLifecycle(t *testing.T) { cfg := factory.CreateDefaultConfig() sub, err := cm.Sub("tests::config") require.NoError(t, err) - require.NoError(t, component.UnmarshalConfig(sub, cfg)) + require.NoError(t, sub.Unmarshal(&cfg)) t.Run("shutdown", func(t *testing.T) { e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopCreateSettings(), cfg) require.NoError(t, err) diff --git a/extension/zpagesextension/go.mod b/extension/zpagesextension/go.mod index 1af25bfbed5..83f449976b8 100644 --- a/extension/zpagesextension/go.mod +++ b/extension/zpagesextension/go.mod @@ -1,18 +1,17 @@ module go.opentelemetry.io/collector/extension/zpagesextension -go 1.21 +go 1.21.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector v0.100.0 - go.opentelemetry.io/collector/component v0.100.0 - go.opentelemetry.io/collector/config/confignet v0.100.0 - go.opentelemetry.io/collector/confmap v0.100.0 - go.opentelemetry.io/collector/extension v0.100.0 - go.opentelemetry.io/contrib/zpages v0.51.0 - go.opentelemetry.io/otel/metric v1.26.0 - go.opentelemetry.io/otel/sdk v1.26.0 - go.opentelemetry.io/otel/trace v1.26.0 + go.opentelemetry.io/collector v0.102.1 + go.opentelemetry.io/collector/component v0.102.1 + go.opentelemetry.io/collector/config/confignet v0.102.1 + go.opentelemetry.io/collector/confmap v0.102.1 + go.opentelemetry.io/collector/extension v0.102.1 + go.opentelemetry.io/contrib/zpages v0.52.0 + go.opentelemetry.io/otel/sdk v1.27.0 + go.opentelemetry.io/otel/trace v1.27.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 ) @@ -20,46 +19,47 @@ require ( require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.53.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect - go.opentelemetry.io/collector/pdata v1.7.0 // indirect - go.opentelemetry.io/contrib/config v0.6.0 // indirect - go.opentelemetry.io/otel v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 // indirect + go.opentelemetry.io/collector/pdata v1.9.0 // indirect + go.opentelemetry.io/contrib/config v0.7.0 // indirect + go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect go.opentelemetry.io/proto/otlp v1.2.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.34.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/zpagesextension/go.sum b/extension/zpagesextension/go.sum index fe7454c4610..a863831d1d2 100644 --- a/extension/zpagesextension/go.sum +++ b/extension/zpagesextension/go.sum @@ -2,8 +2,8 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -19,8 +19,8 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 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/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= @@ -39,50 +39,50 @@ github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zx github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/contrib/config v0.6.0 h1:M1SRD1Z15XHPGk61tMLI1up77XT5FdrqQSRrlH0fYuk= -go.opentelemetry.io/contrib/config v0.6.0/go.mod h1:t+/kzmRWLN7J+4F/dD4fFvlYCmCO63WYwy/B00IC++c= -go.opentelemetry.io/contrib/zpages v0.51.0 h1:psVr4JTWd0qtISPj9EA6AODGJ09bvsOxWiuKqiGdSCA= -go.opentelemetry.io/contrib/zpages v0.51.0/go.mod h1:PKtp+NEp1gTTLmFHpynYgYCSkKtisPntOb9S1mQjFKg= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 h1:+hm+I+KigBy3M24/h1p/NHkUx/evbLH0PNcjpMyCHc4= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0/go.mod h1:NjC8142mLvvNT6biDpaMjyz78kyEHIwAJlSX0N9P5KI= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 h1:HGZWGmCVRCVyAs2GQaiHQPbDHo+ObFWeUEOd+zDnp64= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0/go.mod h1:SaH+v38LSCHddyk7RGlU9uZyQoRrKao6IBnJw6Kbn+c= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 h1:1u/AyyOqAWzy+SkPxDpahCNZParHV8Vid1RnI2clyDE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0/go.mod h1:z46paqbJ9l7c9fIPCXTqTGwhQZ5XoTIsfeFYWboizjs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 h1:Waw9Wfpo/IXzOI8bCB7DIk+0JZcqqsyn1JFnAc+iam8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0/go.mod h1:wnJIG4fOqyynOnnQF/eQb4/16VlX2EJAHhHgqIqWfAo= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 h1:1wp/gyxsuYtuE/JFxsQRtcCDtMrO2qMvlfXALU5wkzI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0/go.mod h1:gbTHmghkGgqxMomVQQMur1Nba4M0MQ8AYThXDUjsJ38= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 h1:5fnmgteaar1VcAA69huatudPduNFz7guRtCmfZCooZI= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0/go.mod h1:lsPccfZiz1cb1AhBPmicWM2E4F1VynFXEvD8SEBS4TM= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 h1:0W5o9SzoR15ocYHEQfvfipzcNog1lBxOLfnex91Hk6s= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0/go.mod h1:zVZ8nz+VSggWmnh6tTsJqXQ7rU4xLwRtna1M4x5jq58= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/contrib/config v0.7.0 h1:b1rK5tGTuhhPirJiMxOcyQfZs76j2VapY6ODn3b2Dbs= +go.opentelemetry.io/contrib/config v0.7.0/go.mod h1:8tdiFd8N5etOi3XzBmAoMxplEzI3TcL8dU5rM5/xcOQ= +go.opentelemetry.io/contrib/zpages v0.52.0 h1:MPgkMy0Cp3O5EdfVXP0ss3ujhEibysTM4eszx7E7d+E= +go.opentelemetry.io/contrib/zpages v0.52.0/go.mod h1:fqG5AFdoYru3A3DnhibVuaaEfQV2WKxE7fYE1jgDRwk= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 h1:QY7/0NeRPKlzusf40ZE4t1VlMKbqSNT7cJRYzWuja0s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0/go.mod h1:HVkSiDhTM9BoUJU8qE6j2eSWLLXvi1USXjyd2BXT8PY= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0 h1:/jlt1Y8gXWiHG9FBx6cJaIC5hYx5Fe64nC8w5Cylt/0= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0/go.mod h1:bmToOGOBZ4hA9ghphIc1PAf66VA8KOtsuy3+ScStG20= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0 h1:/0YaXu3755A/cFbtXp+21lkXgI0QE5avTWA2HjU9/WE= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0/go.mod h1:m7SFxp0/7IxmJPLIY3JhOcU9CoFzDaCPL6xxQIxhA+o= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -100,20 +100,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -122,16 +122,14 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 h1:P8OJ/WCl/Xo4E4zoe4/bifHpSmmKwARqyqE4nW6J2GQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/extension/zpagesextension/internal/metadata/generated_telemetry.go b/extension/zpagesextension/internal/metadata/generated_telemetry.go deleted file mode 100644 index d545bbbe394..00000000000 --- a/extension/zpagesextension/internal/metadata/generated_telemetry.go +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" - - "go.opentelemetry.io/collector/component" -) - -func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter("go.opentelemetry.io/collector/extension/zpagesextension") -} - -func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/extension/zpagesextension") -} diff --git a/extension/zpagesextension/internal/metadata/generated_telemetry_test.go b/extension/zpagesextension/internal/metadata/generated_telemetry_test.go deleted file mode 100644 index 53ce3364bc1..00000000000 --- a/extension/zpagesextension/internal/metadata/generated_telemetry_test.go +++ /dev/null @@ -1,63 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "testing" - - "github.com/stretchr/testify/require" - "go.opentelemetry.io/otel/metric" - embeddedmetric "go.opentelemetry.io/otel/metric/embedded" - noopmetric "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" - embeddedtrace "go.opentelemetry.io/otel/trace/embedded" - nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" -) - -type mockMeter struct { - noopmetric.Meter - name string -} -type mockMeterProvider struct { - embeddedmetric.MeterProvider -} - -func (m mockMeterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter { - return mockMeter{name: name} -} - -type mockTracer struct { - nooptrace.Tracer - name string -} - -type mockTracerProvider struct { - embeddedtrace.TracerProvider -} - -func (m mockTracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { - return mockTracer{name: name} -} - -func TestProviders(t *testing.T) { - set := component.TelemetrySettings{ - MeterProvider: mockMeterProvider{}, - TracerProvider: mockTracerProvider{}, - } - - meter := Meter(set) - if m, ok := meter.(mockMeter); ok { - require.Equal(t, "go.opentelemetry.io/collector/extension/zpagesextension", m.name) - } else { - require.Fail(t, "returned Meter not mockMeter") - } - - tracer := Tracer(set) - if m, ok := tracer.(mockTracer); ok { - require.Equal(t, "go.opentelemetry.io/collector/extension/zpagesextension", m.name) - } else { - require.Fail(t, "returned Meter not mockTracer") - } -} diff --git a/featuregate/go.mod b/featuregate/go.mod index 8f955c5df51..d84687e6d87 100644 --- a/featuregate/go.mod +++ b/featuregate/go.mod @@ -1,9 +1,9 @@ module go.opentelemetry.io/collector/featuregate -go 1.21 +go 1.21.0 require ( - github.com/hashicorp/go-version v1.6.0 + github.com/hashicorp/go-version v1.7.0 github.com/stretchr/testify v1.9.0 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 diff --git a/featuregate/go.sum b/featuregate/go.sum index f57a6bb525d..e6466bcc473 100644 --- a/featuregate/go.sum +++ b/featuregate/go.sum @@ -1,8 +1,8 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 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/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= diff --git a/filter/go.mod b/filter/go.mod index 16234c14a89..8a3011a69cb 100644 --- a/filter/go.mod +++ b/filter/go.mod @@ -1,10 +1,10 @@ module go.opentelemetry.io/collector/filter -go 1.21 +go 1.21.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/confmap v0.100.0 + go.opentelemetry.io/collector/confmap v0.102.1 ) require ( diff --git a/go.mod b/go.mod index 0b0e01d1d21..2cb3d857d50 100644 --- a/go.mod +++ b/go.mod @@ -1,35 +1,35 @@ module go.opentelemetry.io/collector -go 1.21 +go 1.21.0 require ( - github.com/shirou/gopsutil/v3 v3.24.3 + github.com/shirou/gopsutil/v3 v3.24.4 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.100.0 - go.opentelemetry.io/collector/confmap v0.100.0 - go.opentelemetry.io/collector/consumer v0.100.0 - go.opentelemetry.io/collector/featuregate v1.7.0 - go.opentelemetry.io/collector/pdata v1.7.0 - go.opentelemetry.io/collector/pdata/testdata v0.100.0 - go.opentelemetry.io/contrib/config v0.6.0 + go.opentelemetry.io/collector/component v0.102.1 + go.opentelemetry.io/collector/confmap v0.102.1 + go.opentelemetry.io/collector/consumer v0.102.1 + go.opentelemetry.io/collector/featuregate v1.9.0 + go.opentelemetry.io/collector/pdata v1.9.0 + go.opentelemetry.io/collector/pdata/testdata v0.102.1 + go.opentelemetry.io/contrib/config v0.7.0 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 - google.golang.org/grpc v1.63.2 + google.golang.org/grpc v1.64.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect + github.com/hashicorp/go-version v1.7.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect @@ -41,34 +41,34 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.53.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect - go.opentelemetry.io/otel v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 // indirect - go.opentelemetry.io/otel/metric v1.26.0 // indirect - go.opentelemetry.io/otel/sdk v1.26.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect - go.opentelemetry.io/otel/trace v1.26.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 // indirect + go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect go.opentelemetry.io/proto/otlp v1.2.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/protobuf v1.34.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 3ce50f26a17..beb61dfc4d1 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -23,10 +23,10 @@ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -56,18 +56,18 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= -github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= -github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/shirou/gopsutil/v3 v3.24.4 h1:dEHgzZXt4LMNm+oYELpzl9YCqV65Yr/6SfrvgRBtXeU= +github.com/shirou/gopsutil/v3 v3.24.4/go.mod h1:lTd2mdiOspcqLgAnr9/nGi71NkeMpWKdmhuxm9GusH8= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -88,34 +88,34 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/contrib/config v0.6.0 h1:M1SRD1Z15XHPGk61tMLI1up77XT5FdrqQSRrlH0fYuk= -go.opentelemetry.io/contrib/config v0.6.0/go.mod h1:t+/kzmRWLN7J+4F/dD4fFvlYCmCO63WYwy/B00IC++c= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 h1:+hm+I+KigBy3M24/h1p/NHkUx/evbLH0PNcjpMyCHc4= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0/go.mod h1:NjC8142mLvvNT6biDpaMjyz78kyEHIwAJlSX0N9P5KI= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 h1:HGZWGmCVRCVyAs2GQaiHQPbDHo+ObFWeUEOd+zDnp64= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0/go.mod h1:SaH+v38LSCHddyk7RGlU9uZyQoRrKao6IBnJw6Kbn+c= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 h1:1u/AyyOqAWzy+SkPxDpahCNZParHV8Vid1RnI2clyDE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0/go.mod h1:z46paqbJ9l7c9fIPCXTqTGwhQZ5XoTIsfeFYWboizjs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 h1:Waw9Wfpo/IXzOI8bCB7DIk+0JZcqqsyn1JFnAc+iam8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0/go.mod h1:wnJIG4fOqyynOnnQF/eQb4/16VlX2EJAHhHgqIqWfAo= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 h1:1wp/gyxsuYtuE/JFxsQRtcCDtMrO2qMvlfXALU5wkzI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0/go.mod h1:gbTHmghkGgqxMomVQQMur1Nba4M0MQ8AYThXDUjsJ38= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 h1:5fnmgteaar1VcAA69huatudPduNFz7guRtCmfZCooZI= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0/go.mod h1:lsPccfZiz1cb1AhBPmicWM2E4F1VynFXEvD8SEBS4TM= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 h1:0W5o9SzoR15ocYHEQfvfipzcNog1lBxOLfnex91Hk6s= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0/go.mod h1:zVZ8nz+VSggWmnh6tTsJqXQ7rU4xLwRtna1M4x5jq58= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/contrib/config v0.7.0 h1:b1rK5tGTuhhPirJiMxOcyQfZs76j2VapY6ODn3b2Dbs= +go.opentelemetry.io/contrib/config v0.7.0/go.mod h1:8tdiFd8N5etOi3XzBmAoMxplEzI3TcL8dU5rM5/xcOQ= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 h1:QY7/0NeRPKlzusf40ZE4t1VlMKbqSNT7cJRYzWuja0s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0/go.mod h1:HVkSiDhTM9BoUJU8qE6j2eSWLLXvi1USXjyd2BXT8PY= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0 h1:/jlt1Y8gXWiHG9FBx6cJaIC5hYx5Fe64nC8w5Cylt/0= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0/go.mod h1:bmToOGOBZ4hA9ghphIc1PAf66VA8KOtsuy3+ScStG20= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0 h1:/0YaXu3755A/cFbtXp+21lkXgI0QE5avTWA2HjU9/WE= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0/go.mod h1:m7SFxp0/7IxmJPLIY3JhOcU9CoFzDaCPL6xxQIxhA+o= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -133,8 +133,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -145,13 +145,13 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -160,16 +160,14 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 h1:P8OJ/WCl/Xo4E4zoe4/bifHpSmmKwARqyqE4nW6J2GQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/internal/e2e/go.mod b/internal/e2e/go.mod index 7ba98c47f7d..a0cbd60785f 100644 --- a/internal/e2e/go.mod +++ b/internal/e2e/go.mod @@ -1,30 +1,30 @@ module go.opentelemetry.io/collector/internal/e2e -go 1.21 +go 1.21.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector v0.100.0 - go.opentelemetry.io/collector/component v0.100.0 - go.opentelemetry.io/collector/config/configgrpc v0.100.0 - go.opentelemetry.io/collector/config/confighttp v0.100.0 - go.opentelemetry.io/collector/config/configretry v0.100.0 - go.opentelemetry.io/collector/config/configtls v0.100.0 - go.opentelemetry.io/collector/consumer v0.100.0 - go.opentelemetry.io/collector/exporter v0.100.0 - go.opentelemetry.io/collector/exporter/otlpexporter v0.99.0 - go.opentelemetry.io/collector/exporter/otlphttpexporter v0.99.0 - go.opentelemetry.io/collector/pdata v1.7.0 - go.opentelemetry.io/collector/pdata/testdata v0.100.0 - go.opentelemetry.io/collector/receiver v0.100.0 - go.opentelemetry.io/collector/receiver/otlpreceiver v0.99.0 + go.opentelemetry.io/collector v0.102.1 + go.opentelemetry.io/collector/component v0.102.1 + go.opentelemetry.io/collector/config/configgrpc v0.102.1 + go.opentelemetry.io/collector/config/confighttp v0.102.1 + go.opentelemetry.io/collector/config/configretry v0.102.1 + go.opentelemetry.io/collector/config/configtls v0.102.1 + go.opentelemetry.io/collector/consumer v0.102.1 + go.opentelemetry.io/collector/exporter v0.102.1 + go.opentelemetry.io/collector/exporter/otlpexporter v0.101.0 + go.opentelemetry.io/collector/exporter/otlphttpexporter v0.101.0 + go.opentelemetry.io/collector/pdata v1.9.0 + go.opentelemetry.io/collector/pdata/testdata v0.102.1 + go.opentelemetry.io/collector/receiver v0.102.1 + go.opentelemetry.io/collector/receiver/otlpreceiver v0.101.0 go.uber.org/goleak v1.3.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect @@ -34,8 +34,8 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect + github.com/hashicorp/go-version v1.7.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.17.8 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect @@ -47,47 +47,47 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mostynb/go-grpc-compression v1.2.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.53.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect github.com/rs/cors v1.10.1 // indirect - go.opentelemetry.io/collector/config/configauth v0.100.0 // indirect - go.opentelemetry.io/collector/config/configcompression v1.7.0 // indirect - go.opentelemetry.io/collector/config/confignet v0.100.0 // indirect - go.opentelemetry.io/collector/config/configopaque v1.7.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect - go.opentelemetry.io/collector/config/internal v0.100.0 // indirect - go.opentelemetry.io/collector/confmap v0.100.0 // indirect - go.opentelemetry.io/collector/extension v0.100.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.100.0 // indirect - go.opentelemetry.io/collector/featuregate v1.7.0 // indirect - go.opentelemetry.io/contrib/config v0.6.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 // indirect - go.opentelemetry.io/otel v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 // indirect - go.opentelemetry.io/otel/metric v1.26.0 // indirect - go.opentelemetry.io/otel/sdk v1.26.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect - go.opentelemetry.io/otel/trace v1.26.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.102.1 // indirect + go.opentelemetry.io/collector/config/configcompression v1.9.0 // indirect + go.opentelemetry.io/collector/config/confignet v0.102.1 // indirect + go.opentelemetry.io/collector/config/configopaque v1.9.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 // indirect + go.opentelemetry.io/collector/config/internal v0.102.1 // indirect + go.opentelemetry.io/collector/confmap v0.102.1 // indirect + go.opentelemetry.io/collector/extension v0.102.1 // indirect + go.opentelemetry.io/collector/extension/auth v0.102.1 // indirect + go.opentelemetry.io/collector/featuregate v1.9.0 // indirect + go.opentelemetry.io/contrib/config v0.7.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 // indirect + go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect go.opentelemetry.io/proto/otlp v1.2.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.34.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/internal/e2e/go.sum b/internal/e2e/go.sum index ee0cdcbf90e..0dca59da058 100644 --- a/internal/e2e/go.sum +++ b/internal/e2e/go.sum @@ -2,8 +2,8 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -27,10 +27,10 @@ github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 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/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -60,16 +60,16 @@ github.com/mostynb/go-grpc-compression v1.2.2 h1:XaDbnRvt2+1vgr0b/l0qh4mJAfIxE0b github.com/mostynb/go-grpc-compression v1.2.2/go.mod h1:GOCr2KBxXcblCuczg3YdLQlcin1/NfyDA348ckuCH6w= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -78,38 +78,38 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/contrib/config v0.6.0 h1:M1SRD1Z15XHPGk61tMLI1up77XT5FdrqQSRrlH0fYuk= -go.opentelemetry.io/contrib/config v0.6.0/go.mod h1:t+/kzmRWLN7J+4F/dD4fFvlYCmCO63WYwy/B00IC++c= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 h1:A3SayB3rNyt+1S6qpI9mHPkeHTZbD7XILEqWnYZb2l0= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0/go.mod h1:27iA5uvhuRNmalO+iEUdVn5ZMj2qy10Mm+XRIpRmyuU= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 h1:Xs2Ncz0gNihqu9iosIZ5SkBbWo5T8JhhLJFMQL1qmLI= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0/go.mod h1:vy+2G/6NvVMpwGX/NyLqcC41fxepnuKHk16E6IZUcJc= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 h1:+hm+I+KigBy3M24/h1p/NHkUx/evbLH0PNcjpMyCHc4= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0/go.mod h1:NjC8142mLvvNT6biDpaMjyz78kyEHIwAJlSX0N9P5KI= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 h1:HGZWGmCVRCVyAs2GQaiHQPbDHo+ObFWeUEOd+zDnp64= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0/go.mod h1:SaH+v38LSCHddyk7RGlU9uZyQoRrKao6IBnJw6Kbn+c= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 h1:1u/AyyOqAWzy+SkPxDpahCNZParHV8Vid1RnI2clyDE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0/go.mod h1:z46paqbJ9l7c9fIPCXTqTGwhQZ5XoTIsfeFYWboizjs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 h1:Waw9Wfpo/IXzOI8bCB7DIk+0JZcqqsyn1JFnAc+iam8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0/go.mod h1:wnJIG4fOqyynOnnQF/eQb4/16VlX2EJAHhHgqIqWfAo= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 h1:1wp/gyxsuYtuE/JFxsQRtcCDtMrO2qMvlfXALU5wkzI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0/go.mod h1:gbTHmghkGgqxMomVQQMur1Nba4M0MQ8AYThXDUjsJ38= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 h1:5fnmgteaar1VcAA69huatudPduNFz7guRtCmfZCooZI= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0/go.mod h1:lsPccfZiz1cb1AhBPmicWM2E4F1VynFXEvD8SEBS4TM= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 h1:0W5o9SzoR15ocYHEQfvfipzcNog1lBxOLfnex91Hk6s= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0/go.mod h1:zVZ8nz+VSggWmnh6tTsJqXQ7rU4xLwRtna1M4x5jq58= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/contrib/config v0.7.0 h1:b1rK5tGTuhhPirJiMxOcyQfZs76j2VapY6ODn3b2Dbs= +go.opentelemetry.io/contrib/config v0.7.0/go.mod h1:8tdiFd8N5etOi3XzBmAoMxplEzI3TcL8dU5rM5/xcOQ= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 h1:vS1Ao/R55RNV4O7TA2Qopok8yN+X0LIP6RVWLFkprck= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0/go.mod h1:BMsdeOxN04K0L5FNUBfjFdvwWGNe/rkmSwH4Aelu/X0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 h1:9l89oX4ba9kHbBol3Xin3leYJ+252h0zszDtBwyKe2A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0/go.mod h1:XLZfZboOJWHNKUv7eH0inh0E9VV6eWDFB/9yJyTLPp0= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 h1:QY7/0NeRPKlzusf40ZE4t1VlMKbqSNT7cJRYzWuja0s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0/go.mod h1:HVkSiDhTM9BoUJU8qE6j2eSWLLXvi1USXjyd2BXT8PY= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0 h1:/jlt1Y8gXWiHG9FBx6cJaIC5hYx5Fe64nC8w5Cylt/0= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0/go.mod h1:bmToOGOBZ4hA9ghphIc1PAf66VA8KOtsuy3+ScStG20= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0 h1:/0YaXu3755A/cFbtXp+21lkXgI0QE5avTWA2HjU9/WE= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0/go.mod h1:m7SFxp0/7IxmJPLIY3JhOcU9CoFzDaCPL6xxQIxhA+o= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -127,20 +127,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -149,16 +149,14 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 h1:P8OJ/WCl/Xo4E4zoe4/bifHpSmmKwARqyqE4nW6J2GQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/internal/memorylimiter/config_test.go b/internal/memorylimiter/config_test.go index 29db1dc6def..032f4798988 100644 --- a/internal/memorylimiter/config_test.go +++ b/internal/memorylimiter/config_test.go @@ -11,7 +11,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/confmap/confmaptest" ) @@ -19,7 +18,7 @@ func TestUnmarshalConfig(t *testing.T) { cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) require.NoError(t, err) cfg := &Config{} - assert.NoError(t, component.UnmarshalConfig(cm, cfg)) + assert.NoError(t, cm.Unmarshal(&cfg)) assert.Equal(t, &Config{ CheckInterval: 5 * time.Second, @@ -98,7 +97,7 @@ func TestUnmarshalInvalidConfig(t *testing.T) { cm, err := confmaptest.LoadConf(filepath.Join("testdata", "negative_unsigned_limits_config.yaml")) require.NoError(t, err) cfg := &Config{} - err = component.UnmarshalConfig(cm, cfg) + err = cm.Unmarshal(&cfg) require.Error(t, err) require.Contains(t, err.Error(), "error decoding 'limit_mib': cannot convert negative value -2000 to an unsigned integer") require.Contains(t, err.Error(), "error decoding 'spike_limit_mib': cannot convert negative value -2300 to an unsigned integer") diff --git a/internal/tools/go.mod b/internal/tools/go.mod index b1049839b5a..5f18668e17a 100644 --- a/internal/tools/go.mod +++ b/internal/tools/go.mod @@ -1,11 +1,11 @@ module go.opentelemetry.io/collector/internal/tools -go 1.21 +go 1.21.0 require ( github.com/a8m/envsubst v1.4.2 github.com/client9/misspell v0.3.4 - github.com/golangci/golangci-lint v1.57.2 + github.com/golangci/golangci-lint v1.59.0 github.com/google/addlicense v1.1.1 github.com/jcchavezs/porto v0.6.0 github.com/pavius/impi v0.0.3 @@ -14,24 +14,25 @@ require ( go.opentelemetry.io/build-tools/crosslink v0.13.0 go.opentelemetry.io/build-tools/multimod v0.13.0 go.opentelemetry.io/build-tools/semconvgen v0.13.0 - golang.org/x/exp v0.0.0-20240119083558-1b970713d09a - golang.org/x/tools v0.20.0 - golang.org/x/vuln v1.1.0 + golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 + golang.org/x/tools v0.21.1-0.20240514024235-59d9797072e7 + golang.org/x/vuln v1.1.1 ) require ( 4d63.com/gocheckcompilerdirectives v1.2.1 // indirect 4d63.com/gochecknoglobals v0.2.1 // indirect dario.cat/mergo v1.0.0 // indirect - github.com/4meepo/tagalign v1.3.3 // indirect + github.com/4meepo/tagalign v1.3.4 // indirect github.com/Abirdcfly/dupword v0.0.14 // indirect - github.com/Antonboom/errname v0.1.12 // indirect - github.com/Antonboom/nilnil v0.1.7 // indirect - github.com/Antonboom/testifylint v1.2.0 // indirect - github.com/BurntSushi/toml v1.3.2 // indirect + github.com/Antonboom/errname v0.1.13 // indirect + github.com/Antonboom/nilnil v0.1.9 // indirect + github.com/Antonboom/testifylint v1.3.0 // indirect + github.com/BurntSushi/toml v1.4.0 // indirect + github.com/Crocmagnon/fatcontext v0.2.2 // indirect github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect github.com/GaijinEntertainment/go-exhaustruct/v3 v3.2.0 // indirect - github.com/Masterminds/semver v1.5.0 // indirect + github.com/Masterminds/semver/v3 v3.2.1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/OpenPeeDeeP/depguard/v2 v2.2.0 // indirect github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect @@ -50,28 +51,28 @@ require ( github.com/breml/bidichk v0.2.7 // indirect github.com/breml/errchkjson v0.3.6 // indirect github.com/butuzov/ireturn v0.3.0 // indirect - github.com/butuzov/mirror v1.1.0 // indirect + github.com/butuzov/mirror v1.2.0 // indirect github.com/catenacyber/perfsprint v0.7.1 // indirect github.com/ccojocar/zxcvbn-go v1.0.2 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/charithe/durationcheck v0.0.10 // indirect github.com/chavacava/garif v0.1.0 // indirect - github.com/ckaznocha/intrange v0.1.1 // indirect + github.com/ckaznocha/intrange v0.1.2 // indirect github.com/cloudflare/circl v1.3.7 // indirect github.com/curioswitch/go-reassign v0.2.0 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect - github.com/daixiang0/gci v0.12.3 // indirect + github.com/daixiang0/gci v0.13.4 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/denis-tingaikin/go-header v0.5.0 // indirect github.com/emirpasic/gods v1.18.1 // indirect github.com/ettle/strcase v0.2.0 // indirect - github.com/fatih/color v1.16.0 // indirect + github.com/fatih/color v1.17.0 // indirect github.com/fatih/structtag v1.2.0 // indirect - github.com/firefart/nonamedreturns v1.0.4 // indirect + github.com/firefart/nonamedreturns v1.0.5 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fzipp/gocyclo v0.6.0 // indirect - github.com/ghostiam/protogetter v0.3.5 // indirect - github.com/go-critic/go-critic v0.11.2 // indirect + github.com/ghostiam/protogetter v0.3.6 // indirect + github.com/go-critic/go-critic v0.11.4 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.5.0 // indirect github.com/go-git/go-git/v5 v5.11.0 // indirect @@ -89,9 +90,10 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e // indirect - github.com/golangci/misspell v0.4.1 // indirect + github.com/golangci/misspell v0.5.1 // indirect + github.com/golangci/modinfo v0.3.4 // indirect github.com/golangci/plugin-module-register v0.1.1 // indirect - github.com/golangci/revgrep v0.5.2 // indirect + github.com/golangci/revgrep v0.5.3 // indirect github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/gordonklaus/ineffassign v0.1.0 // indirect @@ -99,7 +101,7 @@ require ( github.com/gostaticanalysis/comment v1.4.2 // indirect github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect github.com/gostaticanalysis/nilerr v0.1.1 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/hashicorp/go-version v1.7.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hexops/gotextdiff v1.0.3 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect @@ -107,9 +109,9 @@ require ( github.com/jgautheron/goconst v1.7.1 // indirect github.com/jingyugao/rowserrcheck v1.1.1 // indirect github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect - github.com/jjti/go-spancheck v0.5.3 // indirect + github.com/jjti/go-spancheck v0.6.1 // indirect github.com/julz/importas v0.1.0 // indirect - github.com/karamaru-alpha/copyloopvar v1.0.10 // indirect + github.com/karamaru-alpha/copyloopvar v1.1.0 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/kisielk/errcheck v1.7.0 // indirect github.com/kisielk/gotool v1.0.0 // indirect @@ -117,9 +119,10 @@ require ( github.com/kulti/thelper v0.6.3 // indirect github.com/kunwardeep/paralleltest v1.0.10 // indirect github.com/kyoh86/exportloopref v0.1.11 // indirect + github.com/lasiar/canonicalheader v1.1.1 // indirect github.com/ldez/gomoddirectives v0.2.4 // indirect github.com/ldez/tagliatelle v0.5.0 // indirect - github.com/leonklingele/grouper v1.1.1 // indirect + github.com/leonklingele/grouper v1.1.2 // indirect github.com/lufeee/execinquery v1.2.1 // indirect github.com/macabu/inamedparam v0.1.3 // indirect github.com/magiconair/properties v1.8.7 // indirect @@ -138,19 +141,20 @@ require ( github.com/nishanths/predeclared v0.2.2 // indirect github.com/nunnatsa/ginkgolinter v0.16.2 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect - github.com/pelletier/go-toml/v2 v2.2.0 // indirect + github.com/pelletier/go-toml/v2 v2.2.2 // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/polyfloyd/go-errorlint v1.4.8 // indirect + github.com/polyfloyd/go-errorlint v1.5.1 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/common v0.48.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/quasilyte/go-ruleguard v0.4.2 // indirect + github.com/quasilyte/go-ruleguard/dsl v0.3.22 // indirect github.com/quasilyte/gogrep v0.5.0 // indirect github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect - github.com/ryancurrah/gomodguard v1.3.1 // indirect + github.com/ryancurrah/gomodguard v1.3.2 // indirect github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect @@ -158,7 +162,7 @@ require ( github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect github.com/sashamelentyev/interfacebloat v1.1.0 // indirect github.com/sashamelentyev/usestdlibvars v1.25.0 // indirect - github.com/securego/gosec/v2 v2.19.0 // indirect + github.com/securego/gosec/v2 v2.20.1-0.20240525090044-5f0084eb01a9 // indirect github.com/sergi/go-diff v1.1.0 // indirect github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect github.com/sirupsen/logrus v1.9.3 // indirect @@ -186,27 +190,27 @@ require ( github.com/tomarrell/wrapcheck/v2 v2.8.3 // indirect github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect github.com/ultraware/funlen v0.1.0 // indirect - github.com/ultraware/whitespace v0.1.0 // indirect + github.com/ultraware/whitespace v0.1.1 // indirect github.com/uudashr/gocognit v1.1.2 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/xen0n/gosmopolitan v1.2.2 // indirect github.com/yagipy/maintidx v1.0.0 // indirect - github.com/yeya24/promlinter v0.2.0 // indirect + github.com/yeya24/promlinter v0.3.0 // indirect github.com/ykadowak/zerologlint v0.1.5 // indirect - gitlab.com/bosi/decorder v0.4.1 // indirect - go-simpler.org/musttag v0.9.0 // indirect - go-simpler.org/sloglint v0.5.0 // indirect + gitlab.com/bosi/decorder v0.4.2 // indirect + go-simpler.org/musttag v0.12.2 // indirect + go-simpler.org/sloglint v0.7.0 // indirect go.opentelemetry.io/build-tools v0.13.0 // indirect go.uber.org/automaxprocs v1.5.3 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/crypto v0.22.0 // indirect + golang.org/x/crypto v0.23.0 // indirect golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f // indirect golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.24.0 // indirect + golang.org/x/net v0.25.0 // indirect golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect google.golang.org/protobuf v1.33.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect @@ -214,7 +218,7 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect honnef.co/go/tools v0.4.7 // indirect mvdan.cc/gofumpt v0.6.0 // indirect - mvdan.cc/unparam v0.0.0-20240104100049-c549a3470d14 // indirect + mvdan.cc/unparam v0.0.0-20240427195214-063aff900ca1 // indirect ) retract ( diff --git a/internal/tools/go.sum b/internal/tools/go.sum index f2935d93a15..d80123f69a8 100644 --- a/internal/tools/go.sum +++ b/internal/tools/go.sum @@ -2,61 +2,28 @@ 4d63.com/gocheckcompilerdirectives v1.2.1/go.mod h1:yjDJSxmDTtIHHCqX0ufRYZDL6vQtMG7tJdKVeWwsqvs= 4d63.com/gochecknoglobals v0.2.1 h1:1eiorGsgHOFOuoOiJDy2psSrQbRdIHrlge0IJIkUgDc= 4d63.com/gochecknoglobals v0.2.1/go.mod h1:KRE8wtJB3CXCsb1xy421JfTHIIbmT3U5ruxw2Qu8fSU= -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/4meepo/tagalign v1.3.3 h1:ZsOxcwGD/jP4U/aw7qeWu58i7dwYemfy5Y+IF1ACoNw= -github.com/4meepo/tagalign v1.3.3/go.mod h1:Q9c1rYMZJc9dPRkbQPpcBNCLEmY2njbAsXhQOZFE2dE= +github.com/4meepo/tagalign v1.3.4 h1:P51VcvBnf04YkHzjfclN6BbsopfJR5rxs1n+5zHt+w8= +github.com/4meepo/tagalign v1.3.4/go.mod h1:M+pnkHH2vG8+qhE5bVc/zeP7HS/j910Fwa9TUSyZVI0= github.com/Abirdcfly/dupword v0.0.14 h1:3U4ulkc8EUo+CaT105/GJ1BQwtgyj6+VaBVbAX11Ba8= github.com/Abirdcfly/dupword v0.0.14/go.mod h1:VKDAbxdY8YbKUByLGg8EETzYSuC4crm9WwI6Y3S0cLI= -github.com/Antonboom/errname v0.1.12 h1:oh9ak2zUtsLp5oaEd/erjB4GPu9w19NyoIskZClDcQY= -github.com/Antonboom/errname v0.1.12/go.mod h1:bK7todrzvlaZoQagP1orKzWXv59X/x0W0Io2XT1Ssro= -github.com/Antonboom/nilnil v0.1.7 h1:ofgL+BA7vlA1K2wNQOsHzLJ2Pw5B5DpWRLdDAVvvTow= -github.com/Antonboom/nilnil v0.1.7/go.mod h1:TP+ScQWVEq0eSIxqU8CbdT5DFWoHp0MbP+KMUO1BKYQ= -github.com/Antonboom/testifylint v1.2.0 h1:015bxD8zc5iY8QwTp4+RG9I4kIbqwvGX9TrBbb7jGdM= -github.com/Antonboom/testifylint v1.2.0/go.mod h1:rkmEqjqVnHDRNsinyN6fPSLnoajzFwsCcguJgwADBkw= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= -github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Antonboom/errname v0.1.13 h1:JHICqsewj/fNckzrfVSe+T33svwQxmjC+1ntDsHOVvM= +github.com/Antonboom/errname v0.1.13/go.mod h1:uWyefRYRN54lBg6HseYCFhs6Qjcy41Y3Jl/dVhA87Ns= +github.com/Antonboom/nilnil v0.1.9 h1:eKFMejSxPSA9eLSensFmjW2XTgTwJMjZ8hUHtV4s/SQ= +github.com/Antonboom/nilnil v0.1.9/go.mod h1:iGe2rYwCq5/Me1khrysB4nwI7swQvjclR8/YRPl5ihQ= +github.com/Antonboom/testifylint v1.3.0 h1:UiqrddKs1W3YK8R0TUuWwrVKlVAnS07DTUVWWs9c+y4= +github.com/Antonboom/testifylint v1.3.0/go.mod h1:NV0hTlteCkViPW9mSR4wEMfwp+Hs1T3dY60bkvSfhpM= +github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= +github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/Crocmagnon/fatcontext v0.2.2 h1:OrFlsDdOj9hW/oBEJBNSuH7QWf+E9WPVHw+x52bXVbk= +github.com/Crocmagnon/fatcontext v0.2.2/go.mod h1:WSn/c/+MMNiD8Pri0ahRj0o9jVpeowzavOQplBJw6u0= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/GaijinEntertainment/go-exhaustruct/v3 v3.2.0 h1:sATXp1x6/axKxz2Gjxv8MALP0bXaNRfQinEwyfMcx8c= github.com/GaijinEntertainment/go-exhaustruct/v3 v3.2.0/go.mod h1:Nl76DrGNJTA1KJ0LePKBw/vznBX1EHbAZX8mwjR82nI= -github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= -github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= +github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= @@ -72,11 +39,6 @@ github.com/alecthomas/go-check-sumtype v0.1.4 h1:WCvlB3l5Vq5dZQTFmodqL2g68uHiSww github.com/alecthomas/go-check-sumtype v0.1.4/go.mod h1:WyYPfhfkdhyrdaligV6svFopZV8Lqdzn5pyVBaV6jhQ= github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alexkohler/nakedret/v2 v2.0.4 h1:yZuKmjqGi0pSmjGpOC016LtPJysIL0WEUiaXW5SUnNg= github.com/alexkohler/nakedret/v2 v2.0.4/go.mod h1:bF5i0zF2Wo2o4X4USt9ntUWve6JbFv02Ff4vlkmS/VU= github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw= @@ -91,8 +53,6 @@ github.com/ashanbrown/forbidigo v1.6.0 h1:D3aewfM37Yb3pxHujIPSpTf6oQk9sc9WZi8ger github.com/ashanbrown/forbidigo v1.6.0/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1MUyfOKL+AjcU= github.com/ashanbrown/makezero v1.1.1 h1:iCQ87C0V0vSyO+M9E/FZYbu65auqH0lnsOkf5FcB28s= github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bkielbasa/cyclop v1.2.1 h1:AeF71HZDob1P2/pRm1so9cd1alZnrpyc4q2uP2l0gJY= @@ -109,40 +69,33 @@ github.com/breml/errchkjson v0.3.6 h1:VLhVkqSBH96AvXEyclMR37rZslRrY2kcyq+31HCsVr github.com/breml/errchkjson v0.3.6/go.mod h1:jhSDoFheAF2RSDOlCfhHO9KqhZgAYLyvHe7bRCX8f/U= github.com/butuzov/ireturn v0.3.0 h1:hTjMqWw3y5JC3kpnC5vXmFJAWI/m31jaCYQqzkS6PL0= github.com/butuzov/ireturn v0.3.0/go.mod h1:A09nIiwiqzN/IoVo9ogpa0Hzi9fex1kd9PSD6edP5ZA= -github.com/butuzov/mirror v1.1.0 h1:ZqX54gBVMXu78QLoiqdwpl2mgmoOJTk7s4p4o+0avZI= -github.com/butuzov/mirror v1.1.0/go.mod h1:8Q0BdQU6rC6WILDiBM60DBfvV78OLJmMmixe7GF45AE= +github.com/butuzov/mirror v1.2.0 h1:9YVK1qIjNspaqWutSv8gsge2e/Xpq1eqEkslEUHy5cs= +github.com/butuzov/mirror v1.2.0/go.mod h1:DqZZDtzm42wIAIyHXeN8W/qb1EPlb9Qn/if9icBOpdQ= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/catenacyber/perfsprint v0.7.1 h1:PGW5G/Kxn+YrN04cRAZKC+ZuvlVwolYMrIyyTJ/rMmc= github.com/catenacyber/perfsprint v0.7.1/go.mod h1:/wclWYompEyjUD2FuIIDVKNkqz7IgBIWXIH3V0Zol50= github.com/ccojocar/zxcvbn-go v1.0.2 h1:na/czXU8RrhXO4EZme6eQJLR4PzcGsahsBOAwU6I3Vg= github.com/ccojocar/zxcvbn-go v1.0.2/go.mod h1:g1qkXtUSvHP8lhHp5GrSmTz6uWALGRMQdw6Qnz/hi60= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/charithe/durationcheck v0.0.10 h1:wgw73BiocdBDQPik+zcEoBG/ob8uyBHf2iyoHGPf5w4= github.com/charithe/durationcheck v0.0.10/go.mod h1:bCWXb7gYRysD1CU3C+u4ceO49LoGOY1C1L6uouGNreQ= github.com/chavacava/garif v0.1.0 h1:2JHa3hbYf5D9dsgseMKAmc/MZ109otzgNFk5s87H9Pc= github.com/chavacava/garif v0.1.0/go.mod h1:XMyYCkEL58DF0oyW4qDjjnPWONs2HBqYKI+UIPD+Gww= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/ckaznocha/intrange v0.1.1 h1:gHe4LfqCspWkh8KpJFs20fJz3XRHFBFUV9yI7Itu83Q= -github.com/ckaznocha/intrange v0.1.1/go.mod h1:RWffCw/vKBwHeOEwWdCikAtY0q4gGt8VhJZEEA5n+RE= +github.com/ckaznocha/intrange v0.1.2 h1:3Y4JAxcMntgb/wABQ6e8Q8leMd26JbX2790lIss9MTI= +github.com/ckaznocha/intrange v0.1.2/go.mod h1:RWffCw/vKBwHeOEwWdCikAtY0q4gGt8VhJZEEA5n+RE= github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/curioswitch/go-reassign v0.2.0 h1:G9UZyOcpk/d7Gd6mqYgd8XYWFMw/znxwGDUstnC9DIo= github.com/curioswitch/go-reassign v0.2.0/go.mod h1:x6OpXuWvgfQaMGks2BZybTngWjT84hqJfKoO8Tt/Roc= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= -github.com/daixiang0/gci v0.12.3 h1:yOZI7VAxAGPQmkb1eqt5g/11SUlwoat1fSblGLmdiQc= -github.com/daixiang0/gci v0.12.3/go.mod h1:xtHP9N7AHdNvtRNfcx9gwTDfw7FRJx4bZUsiEfiNNAI= +github.com/daixiang0/gci v0.13.4 h1:61UGkmpoAcxHM2hhNkZEf5SzwQtWJXTSws7jaPyqwlw= +github.com/daixiang0/gci v0.13.4/go.mod h1:12etP2OniiIdP4q+kjUGrC/rUagga7ODbqsom5Eo5Yk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= @@ -153,30 +106,26 @@ github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcej github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ettle/strcase v0.2.0 h1:fGNiVF21fHXpX1niBgk0aROov1LagYsOwV/xqKDKR/Q= github.com/ettle/strcase v0.2.0/go.mod h1:DajmHElDSaX76ITe3/VHVyMin4LWSJN5Z909Wp+ED1A= -github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= -github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= +github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= +github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/firefart/nonamedreturns v1.0.4 h1:abzI1p7mAEPYuR4A+VLKn4eNDOycjYo2phmY9sfv40Y= -github.com/firefart/nonamedreturns v1.0.4/go.mod h1:TDhe/tjI1BXo48CmYbUduTV7BdIga8MAO/xbKdcVsGI= +github.com/firefart/nonamedreturns v1.0.5 h1:tM+Me2ZaXs8tfdDw3X6DOX++wMCOqzYUho6tUTYIdRA= +github.com/firefart/nonamedreturns v1.0.5/go.mod h1:gHJjDqhGM4WyPt639SOZs+G89Ko7QKH5R5BhnO6xJhw= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= -github.com/ghostiam/protogetter v0.3.5 h1:+f7UiF8XNd4w3a//4DnusQ2SZjPkUjxkMEfjbxOK4Ug= -github.com/ghostiam/protogetter v0.3.5/go.mod h1:7lpeDnEJ1ZjL/YtyoN99ljO4z0pd3H0d18/t2dPBxHw= +github.com/ghostiam/protogetter v0.3.6 h1:R7qEWaSgFCsy20yYHNIJsU9ZOb8TziSRRxuAOTVKeOk= +github.com/ghostiam/protogetter v0.3.6/go.mod h1:7lpeDnEJ1ZjL/YtyoN99ljO4z0pd3H0d18/t2dPBxHw= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= -github.com/go-critic/go-critic v0.11.2 h1:81xH/2muBphEgPtcwH1p6QD+KzXl2tMSi3hXjBSxDnM= -github.com/go-critic/go-critic v0.11.2/go.mod h1:OePaicfjsf+KPy33yq4gzv6CO7TEQ9Rom6ns1KsJnl8= +github.com/go-critic/go-critic v0.11.4 h1:O7kGOCx0NDIni4czrkRIXTnit0mkyKOCePh3My6OyEU= +github.com/go-critic/go-critic v0.11.4/go.mod h1:2QAdo4iuLik5S9YG0rT4wcZ8QxwHYkrr6/2MWAiv/vc= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= @@ -185,20 +134,10 @@ github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMj github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= github.com/go-git/go-git/v5 v5.11.0 h1:XIZc1p+8YzypNr34itUfSvYJcv+eYdTnTvOZ2vD3cA4= github.com/go-git/go-git/v5 v5.11.0/go.mod h1:6GFcX2P3NM7FPBfpePbpLd21XxsgdAt+lKqXmCUiUCY= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-toolsmith/astcast v1.1.0 h1:+JN9xZV1A+Re+95pgnMgDboWNVnIMMQXwfBwLRPgSC8= github.com/go-toolsmith/astcast v1.1.0/go.mod h1:qdcuFWeGGS2xX5bLM/c3U9lewg7+Zu4mr+xPwZIB4ZU= github.com/go-toolsmith/astcopy v1.1.0 h1:YGwBN0WM+ekI/6SS6+52zLDEf8Yvp3n2seZITCUBt5s= @@ -226,86 +165,39 @@ github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e h1:ULcKCDV1LOZPFxGZaA6TlQbiM3J2GCPnkx/bGF6sX/g= github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e/go.mod h1:Pm5KhLPA8gSnQwrQ6ukebRcapGb/BG9iUkdaiCcGHJM= -github.com/golangci/golangci-lint v1.57.2 h1:NNhxfZyL5He1WWDrIvl1a4n5bvWZBcgAqBwlJAAgLTw= -github.com/golangci/golangci-lint v1.57.2/go.mod h1:ApiG3S3Ca23QyfGp5BmsorTiVxJpr5jGiNS0BkdSidg= -github.com/golangci/misspell v0.4.1 h1:+y73iSicVy2PqyX7kmUefHusENlrP9YwuHZHPLGQj/g= -github.com/golangci/misspell v0.4.1/go.mod h1:9mAN1quEo3DlpbaIKKyEvRxK1pwqR9s/Sea1bJCtlNI= +github.com/golangci/golangci-lint v1.59.0 h1:st69YDnAH/v2QXDcgUaZ0seQajHScPALBVkyitYLXEk= +github.com/golangci/golangci-lint v1.59.0/go.mod h1:QNA32UWdUdHXnu+Ap5/ZU4WVwyp2tL94UxEXrSErjg0= +github.com/golangci/misspell v0.5.1 h1:/SjR1clj5uDjNLwYzCahHwIOPmQgoH04AyQIiWGbhCM= +github.com/golangci/misspell v0.5.1/go.mod h1:keMNyY6R9isGaSAu+4Q8NMBwMPkh15Gtc8UCVoDtAWo= +github.com/golangci/modinfo v0.3.4 h1:oU5huX3fbxqQXdfspamej74DFX0kyGLkw1ppvXoJ8GA= +github.com/golangci/modinfo v0.3.4/go.mod h1:wytF1M5xl9u0ij8YSvhkEVPP3M5Mc7XLl1pxH3B2aUM= github.com/golangci/plugin-module-register v0.1.1 h1:TCmesur25LnyJkpsVrupv1Cdzo+2f7zX0H6Jkw1Ol6c= github.com/golangci/plugin-module-register v0.1.1/go.mod h1:TTpqoB6KkwOJMV8u7+NyXMrkwwESJLOkfl9TxR1DGFc= -github.com/golangci/revgrep v0.5.2 h1:EndcWoRhcnfj2NHQ+28hyuXpLMF+dQmCN+YaeeIl4FU= -github.com/golangci/revgrep v0.5.2/go.mod h1:bjAMA+Sh/QUfTDcHzxfyHxr4xKvllVr/0sCv2e7jJHA= +github.com/golangci/revgrep v0.5.3 h1:3tL7c1XBMtWHHqVpS5ChmiAAoe4PF/d5+ULzV9sLAzs= +github.com/golangci/revgrep v0.5.3/go.mod h1:U4R/s9dlXZsg8uJmaR1GrloUr14D7qDl8gi2iPXJH8k= github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed h1:IURFTjxeTfNFP0hTEi1YKjB/ub8zkpaOqFFMApi2EAs= github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed/go.mod h1:XLXN8bNw4CGRPaqgl3bv/lhz7bsGPh4/xSaMTbo2vkQ= github.com/google/addlicense v1.1.1 h1:jpVf9qPbU8rz5MxKo7d+RMcNHkqxi4YJi/laauX4aAE= github.com/google/addlicense v1.1.1/go.mod h1:Sm/DHu7Jk+T5miFHHehdIjbi4M5+dJDRS3Cq0rncIxA= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmdtest v0.4.1-0.20220921163831-55ab3332a786 h1:rcv+Ippz6RAtvaGgKxc+8FQIpxHgsF+HBzPyYL2cyVU= github.com/google/go-cmdtest v0.4.1-0.20220921163831-55ab3332a786/go.mod h1:apVn/GCasLZUVpAJ6oWAuyP7Ne7CEsQbTnc0plM3m+o= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= +github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gordonklaus/ineffassign v0.1.0 h1:y2Gd/9I7MdY1oEIt+n+rowjBNDcLQq3RsH5hwJd0f9s= github.com/gordonklaus/ineffassign v0.1.0/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= github.com/gostaticanalysis/analysisutil v0.7.1 h1:ZMCjoue3DtDWQ5WyU16YbjbQEQ3VuzwxALrpYd+HeKk= @@ -321,15 +213,12 @@ github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod github.com/gostaticanalysis/testutil v0.4.0 h1:nhdCmubdmDF6VEatUNjgUZBJKWRqugoISdUv3PPQgHY= github.com/gostaticanalysis/testutil v0.4.0/go.mod h1:bLIoPefWXrRi/ssLFWX1dx7Repi5x3CuviD3dgAZaBU= github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= @@ -342,21 +231,12 @@ github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjz github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9BjwUk7KlCh6S9EAGWBt1oExIUv9WyNCiRz5amv48= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= -github.com/jjti/go-spancheck v0.5.3 h1:vfq4s2IB8T3HvbpiwDTYgVPj1Ze/ZSXrTtaZRTc7CuM= -github.com/jjti/go-spancheck v0.5.3/go.mod h1:eQdOX1k3T+nAKvZDyLC3Eby0La4dZ+I19iOl5NzSPFE= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/jjti/go-spancheck v0.6.1 h1:ZK/wE5Kyi1VX3PJpUO2oEgeoI4FWOUm7Shb2Gbv5obI= +github.com/jjti/go-spancheck v0.6.1/go.mod h1:vF1QkOO159prdo6mHRxak2CpzDpHAfKiPUDP/NeRnX8= github.com/julz/importas v0.1.0 h1:F78HnrsjY3cR7j0etXy5+TU1Zuy7Xt08X/1aJnH5xXY= github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= -github.com/karamaru-alpha/copyloopvar v1.0.10 h1:8HYDy6KQYqTmD7JuhZMWS1nwPru9889XI24ROd/+WXI= -github.com/karamaru-alpha/copyloopvar v1.0.10/go.mod h1:u7CIfztblY0jZLOQZgH3oYsJzpC2A7S6u/lfgSXHy0k= +github.com/karamaru-alpha/copyloopvar v1.1.0 h1:x7gNyKcC2vRBO1H2Mks5u1VxQtYvFiym7fCjIP8RPos= +github.com/karamaru-alpha/copyloopvar v1.1.0/go.mod h1:u7CIfztblY0jZLOQZgH3oYsJzpC2A7S6u/lfgSXHy0k= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/errcheck v1.7.0 h1:+SbscKmWJ5mOK/bO1zS60F5I9WwZDWOfRsC4RwfwRV0= @@ -365,9 +245,6 @@ github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkHAIKE/contextcheck v1.1.5 h1:CdnJh63tcDe53vG+RebdpdXJTc9atMgGqdx8LXxiilg= github.com/kkHAIKE/contextcheck v1.1.5/go.mod h1:O930cpht4xb1YQpK+1+AgoM3mFsvxr7uyFptcnWTYUA= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -381,12 +258,14 @@ github.com/kunwardeep/paralleltest v1.0.10 h1:wrodoaKYzS2mdNVnc4/w31YaXFtsc21PCT github.com/kunwardeep/paralleltest v1.0.10/go.mod h1:2C7s65hONVqY7Q5Efj5aLzRCNLjw2h4eMc9EcypGjcY= github.com/kyoh86/exportloopref v0.1.11 h1:1Z0bcmTypkL3Q4k+IDHMWTcnCliEZcaPiIe0/ymEyhQ= github.com/kyoh86/exportloopref v0.1.11/go.mod h1:qkV4UF1zGl6EkF1ox8L5t9SwyeBAZ3qLMd6up458uqA= +github.com/lasiar/canonicalheader v1.1.1 h1:wC+dY9ZfiqiPwAexUApFush/csSPXeIi4QqyxXmng8I= +github.com/lasiar/canonicalheader v1.1.1/go.mod h1:cXkb3Dlk6XXy+8MVQnF23CYKWlyA7kfQhSw2CcZtZb0= github.com/ldez/gomoddirectives v0.2.4 h1:j3YjBIjEBbqZ0NKtBNzr8rtMHTOrLPeiwTkfUJZ3alg= github.com/ldez/gomoddirectives v0.2.4/go.mod h1:oWu9i62VcQDYp9EQ0ONTfqLNh+mDLWWDO+SO0qSQw5g= github.com/ldez/tagliatelle v0.5.0 h1:epgfuYt9v0CG3fms0pEgIMNPuFf/LpPIfjk4kyqSioo= github.com/ldez/tagliatelle v0.5.0/go.mod h1:rj1HmWiL1MiKQuOONhd09iySTEkUuE/8+5jtPYz9xa4= -github.com/leonklingele/grouper v1.1.1 h1:suWXRU57D4/Enn6pXR0QVqqWWrnJ9Osrz+5rjt8ivzU= -github.com/leonklingele/grouper v1.1.1/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY= +github.com/leonklingele/grouper v1.1.2 h1:o1ARBDLOmmasUaNDesWqWCIFH3u7hoFlM84YrjT3mIY= +github.com/leonklingele/grouper v1.1.2/go.mod h1:6D0M/HVkhs2yRKRFZUoGjeDy7EZTfFBE9gl4kjmIGkA= github.com/lufeee/execinquery v1.2.1 h1:hf0Ems4SHcUGBxpGN7Jz78z1ppVkP/837ZlETPCEtOM= github.com/lufeee/execinquery v1.2.1/go.mod h1:EC7DrEKView09ocscGHC+apXMIaorh4xqSxS/dy8SbM= github.com/macabu/inamedparam v0.1.3 h1:2tk/phHkMlEL/1GNe/Yf6kkR/hkcUdAEY3L0hjYV1Mk= @@ -408,22 +287,14 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mgechev/revive v1.3.7 h1:502QY0vQGe9KtYJ9FpxMz9rL+Fc/P13CI5POL4uHCcE= github.com/mgechev/revive v1.3.7/go.mod h1:RJ16jUbF0OWC3co/+XTxmFNgEpUPwnnA0BRllX2aDNA= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/moricho/tparallel v0.3.1 h1:fQKD4U1wRMAYNngDonW5XupoB/ZGJHdpzrWqgyg9krA= github.com/moricho/tparallel v0.3.1/go.mod h1:leENX2cUv7Sv2qDgdi0D0fCftN8fRC67Bcn8pqzeYNI= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nakabonne/nestif v0.3.1 h1:wm28nZjhQY5HyYPx+weN3Q65k6ilSBxDb8v5S81B81U= github.com/nakabonne/nestif v0.3.1/go.mod h1:9EtoZochLn5iUprVDmDjqGKPofoUEBL8U4Ngq6aY7OE= github.com/nishanths/exhaustive v0.12.0 h1:vIY9sALmw6T/yxiASewa4TQcFsVYZQQRUQJhKRf3Swg= @@ -434,10 +305,10 @@ github.com/nunnatsa/ginkgolinter v0.16.2 h1:8iLqHIZvN4fTLDC0Ke9tbSZVcyVHoBs0HIbn github.com/nunnatsa/ginkgolinter v0.16.2/go.mod h1:4tWRinDN1FeJgU+iJANW/kz7xKN5nYRAOfJDQUS9dOQ= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= -github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= -github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM= -github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo= -github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0= +github.com/onsi/ginkgo/v2 v2.17.3 h1:oJcvKpIb7/8uLpDDtnQuf18xVnwKp8DTD7DQ6gTd/MU= +github.com/onsi/ginkgo/v2 v2.17.3/go.mod h1:nP2DPOQoNsQmsVyv5rDA8JkXQoCs6goXIvr/PRJ1eCc= +github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= +github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w= @@ -447,61 +318,42 @@ github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT9 github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= github.com/pavius/impi v0.0.3 h1:DND6MzU+BLABhOZXbELR3FU8b+zDgcq4dOCNLhiTYuI= github.com/pavius/impi v0.0.3/go.mod h1:x/hU0bfdWIhuOT1SKwiJg++yvkk6EuOtJk8WtDZqgr8= -github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= -github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/polyfloyd/go-errorlint v1.4.8 h1:jiEjKDH33ouFktyez7sckv6pHWif9B7SuS8cutDXFHw= -github.com/polyfloyd/go-errorlint v1.4.8/go.mod h1:NNCxFcFjZcw3xNjVdCchERkEM6Oz7wta2XJVxRftwO4= +github.com/polyfloyd/go-errorlint v1.5.1 h1:5gHxDjLyyWij7fhfrjYNNlHsUNQeyx0LFQKUelO3RBo= +github.com/polyfloyd/go-errorlint v1.5.1/go.mod h1:sH1QC1pxxi0fFecsVIzBmxtrgd9IF/SkJpA6wqyKAJs= github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/quasilyte/go-ruleguard v0.4.2 h1:htXcXDK6/rO12kiTHKfHuqR4kr3Y4M0J0rOL6CH/BYs= github.com/quasilyte/go-ruleguard v0.4.2/go.mod h1:GJLgqsLeo4qgavUoL8JeGFNS7qcisx3awV/w9eWTmNI= +github.com/quasilyte/go-ruleguard/dsl v0.3.22 h1:wd8zkOhSNr+I+8Qeciml08ivDt1pSXe60+5DqOpCjPE= +github.com/quasilyte/go-ruleguard/dsl v0.3.22/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo= github.com/quasilyte/gogrep v0.5.0/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl980XxGFEZSS6KlBGIV0diGdySzxATTWoqaU= github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryancurrah/gomodguard v1.3.1 h1:fH+fUg+ngsQO0ruZXXHnA/2aNllWA1whly4a6UvyzGE= -github.com/ryancurrah/gomodguard v1.3.1/go.mod h1:DGFHzEhi6iJ0oIDfMuo3TgrS+L9gZvrEfmjjuelnRU0= +github.com/ryancurrah/gomodguard v1.3.2 h1:CuG27ulzEB1Gu5Dk5gP8PFxSOZ3ptSdP5iI/3IXxM18= +github.com/ryancurrah/gomodguard v1.3.2/go.mod h1:LqdemiFomEjcxOqirbQCb3JFvSxH2JUYMerTFd3sF2o= github.com/ryanrolds/sqlclosecheck v0.5.1 h1:dibWW826u0P8jNLsLN+En7+RqWWTYrjCB9fJfSfdyCU= github.com/ryanrolds/sqlclosecheck v0.5.1/go.mod h1:2g3dUjoS6AL4huFdv6wn55WpLIDjY7ZgUR4J8HOO/XQ= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= @@ -516,17 +368,14 @@ github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tM github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= github.com/sashamelentyev/usestdlibvars v1.25.0 h1:IK8SI2QyFzy/2OD2PYnhy84dpfNo9qADrRt6LH8vSzU= github.com/sashamelentyev/usestdlibvars v1.25.0/go.mod h1:9nl0jgOfHKWNFS43Ojw0i7aRoS4j6EBye3YBhmAIRF8= -github.com/securego/gosec/v2 v2.19.0 h1:gl5xMkOI0/E6Hxx0XCY2XujA3V7SNSefA8sC+3f1gnk= -github.com/securego/gosec/v2 v2.19.0/go.mod h1:hOkDcHz9J/XIgIlPDXalxjeVYsHxoWUc5zJSHxcB8YM= +github.com/securego/gosec/v2 v2.20.1-0.20240525090044-5f0084eb01a9 h1:rnO6Zp1YMQwv8AyxzuwsVohljJgp4L0ZqiCgtACsPsc= +github.com/securego/gosec/v2 v2.20.1-0.20240525090044-5f0084eb01a9/go.mod h1:dg7lPlu/xK/Ut9SedURCoZbVCR4yC7fM65DtH9/CDHs= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= @@ -557,7 +406,6 @@ github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRk github.com/stbenjam/no-sprintf-host-port v0.1.1 h1:tYugd/yrm1O0dV+ThCbaKZh195Dfm07ysF0U6JQXczc= github.com/stbenjam/no-sprintf-host-port v0.1.1/go.mod h1:TLhvtIvONRzdmkFiio4O8LHsN9N74I+PhRquPsxpL0I= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= @@ -595,8 +443,8 @@ github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+ github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/ultraware/funlen v0.1.0 h1:BuqclbkY6pO+cvxoq7OsktIXZpgBSkYTQtmwhAK81vI= github.com/ultraware/funlen v0.1.0/go.mod h1:XJqmOQja6DpxarLj6Jj1U7JuoS8PvL4nEqDaQhy22p4= -github.com/ultraware/whitespace v0.1.0 h1:O1HKYoh0kIeqE8sFqZf1o0qbORXUCOQFrlaQyZsczZw= -github.com/ultraware/whitespace v0.1.0/go.mod h1:/se4r3beMFNmewJ4Xmz0nMQ941GJt+qmSHGP9emHYe0= +github.com/ultraware/whitespace v0.1.1 h1:bTPOGejYFulW3PkcrqkeQwOd6NKOOXvmGD9bo/Gk8VQ= +github.com/ultraware/whitespace v0.1.1/go.mod h1:XcP1RLD81eV4BW8UhQlpaR+SDc2givTvyI8a586WjW8= github.com/uudashr/gocognit v1.1.2 h1:l6BAEKJqQH2UpKAPKdMfZf5kE4W/2xk8pfU1OVLvniI= github.com/uudashr/gocognit v1.1.2/go.mod h1:aAVdLURqcanke8h3vg35BC++eseDm66Z7KmchI5et4k= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= @@ -605,30 +453,24 @@ github.com/xen0n/gosmopolitan v1.2.2 h1:/p2KTnMzwRexIW8GlKawsTWOxn7UHA+jCMF/V8HH github.com/xen0n/gosmopolitan v1.2.2/go.mod h1:7XX7Mj61uLYrj0qmeN0zi7XDon9JRAEhYQqAPLVNTeg= github.com/yagipy/maintidx v1.0.0 h1:h5NvIsCz+nRDapQ0exNv4aJ0yXSI0420omVANTv3GJM= github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= -github.com/yeya24/promlinter v0.2.0 h1:xFKDQ82orCU5jQujdaD8stOHiv8UN68BSdn2a8u8Y3o= -github.com/yeya24/promlinter v0.2.0/go.mod h1:u54lkmBOZrpEbQQ6gox2zWKKLKu2SGe+2KOiextY+IA= +github.com/yeya24/promlinter v0.3.0 h1:JVDbMp08lVCP7Y6NP3qHroGAO6z2yGKQtS5JsjqtoFs= +github.com/yeya24/promlinter v0.3.0/go.mod h1:cDfJQQYv9uYciW60QT0eeHlFodotkYZlL+YcPQN+mW4= github.com/ykadowak/zerologlint v0.1.5 h1:Gy/fMz1dFQN9JZTPjv1hxEk+sRWm05row04Yoolgdiw= github.com/ykadowak/zerologlint v0.1.5/go.mod h1:KaUskqF3e/v59oPmdq1U1DnKcuHokl2/K1U4pmIELKg= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -gitlab.com/bosi/decorder v0.4.1 h1:VdsdfxhstabyhZovHafFw+9eJ6eU0d2CkFNJcZz/NU4= -gitlab.com/bosi/decorder v0.4.1/go.mod h1:jecSqWUew6Yle1pCr2eLWTensJMmsxHsBwt+PVbkAqA= -go-simpler.org/assert v0.7.0 h1:OzWWZqfNxt8cLS+MlUp6Tgk1HjPkmgdKBq9qvy8lZsA= -go-simpler.org/assert v0.7.0/go.mod h1:74Eqh5eI6vCK6Y5l3PI8ZYFXG4Sa+tkr70OIPJAUr28= -go-simpler.org/musttag v0.9.0 h1:Dzt6/tyP9ONr5g9h9P3cnYWCxeBFRkd0uJL/w+1Mxos= -go-simpler.org/musttag v0.9.0/go.mod h1:gA9nThnalvNSKpEoyp3Ko4/vCX2xTpqKoUtNqXOnVR4= -go-simpler.org/sloglint v0.5.0 h1:2YCcd+YMuYpuqthCgubcF5lBSjb6berc5VMOYUHKrpY= -go-simpler.org/sloglint v0.5.0/go.mod h1:EUknX5s8iXqf18KQxKnaBHUPVriiPnOrPjjJcsaTcSQ= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +gitlab.com/bosi/decorder v0.4.2 h1:qbQaV3zgwnBZ4zPMhGLW4KZe7A7NwxEhJx39R3shffo= +gitlab.com/bosi/decorder v0.4.2/go.mod h1:muuhHoaJkA9QLcYHq4Mj8FJUwDZ+EirSHRiaTcTf6T8= +go-simpler.org/assert v0.9.0 h1:PfpmcSvL7yAnWyChSjOz6Sp6m9j5lyK8Ok9pEL31YkQ= +go-simpler.org/assert v0.9.0/go.mod h1:74Eqh5eI6vCK6Y5l3PI8ZYFXG4Sa+tkr70OIPJAUr28= +go-simpler.org/musttag v0.12.2 h1:J7lRc2ysXOq7eM8rwaTYnNrHd5JwjppzB6mScysB2Cs= +go-simpler.org/musttag v0.12.2/go.mod h1:uN1DVIasMTQKk6XSik7yrJoEysGtR2GRqvWnI9S7TYM= +go-simpler.org/sloglint v0.7.0 h1:rMZRxD9MbaGoRFobIOicMxZzum7AXNFDlez6xxJs5V4= +go-simpler.org/sloglint v0.7.0/go.mod h1:g9SXiSWY0JJh4LS39/Q0GxzP/QX2cVcbTOYhDpXrJEs= go.opentelemetry.io/build-tools v0.13.0 h1:0I3jJQ2zcJU8k4ZjyHNqUBX2Len1UvBIOzVP4b50g9A= go.opentelemetry.io/build-tools v0.13.0/go.mod h1:PEtg5iWjNI9WAlKXP/xll/hgbq/Cp4Ma4T1ssKB2T0Q= go.opentelemetry.io/build-tools/checkfile v0.13.0 h1:Nq13fOLpF9T+y4birZbfv6JurFC1Pla5UwC+t0GMbAo= @@ -649,10 +491,7 @@ go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= @@ -660,42 +499,14 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= -golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20240119083558-1b970713d09a h1:Q8/wZp0KX97QFTc2ywcOE0YRjZPVIx+MXInMzdvQqcA= -golang.org/x/exp v0.0.0-20240119083558-1b970713d09a/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= +golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f h1:phY1HzDcf18Aq9A8KkmRtY9WvOFIxN8wgfvy6Zm1DV8= golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -708,38 +519,14 @@ golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= @@ -748,61 +535,21 @@ golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -810,11 +557,9 @@ golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/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-20220702020025-31831981b65f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -826,8 +571,8 @@ golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 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= @@ -835,11 +580,9 @@ golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= -golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= +golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -848,58 +591,17 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= @@ -914,125 +616,34 @@ golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= -golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= -golang.org/x/vuln v1.1.0 h1:ECEdI+aEtjpF90eqEcDL5Q11DWSZAw5PJQWlp0+gWqc= -golang.org/x/vuln v1.1.0/go.mod h1:HT/Ar8fE34tbxWG2s7PYjVl+iIE4Er36/940Z+K540Y= +golang.org/x/tools v0.21.1-0.20240514024235-59d9797072e7 h1:DnP3aRQn/r68glNGB8/7+3iE77jA+YZZCxpfIXx2MdA= +golang.org/x/tools v0.21.1-0.20240514024235-59d9797072e7/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/vuln v1.1.1 h1:4nYQg4OSr7uYQMtjuuYqLAEVuTjY4k/CPMYqvv5OPcI= +golang.org/x/vuln v1.1.1/go.mod h1:hNgE+SKMSp2wHVUpW0Ow2ejgKpNJePdML+4YjxrVxik= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/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/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.4.7 h1:9MDAWxMoSnB6QoSqiVr7P5mtkT9pOc1kSxchzPCnqJs= honnef.co/go/tools v0.4.7/go.mod h1:+rnGS1THNh8zMwnd2oVOTL9QF6vmfyG6ZXBULae2uc0= mvdan.cc/gofumpt v0.6.0 h1:G3QvahNDmpD+Aek/bNOLrFR2XC6ZAdo62dZu65gmwGo= mvdan.cc/gofumpt v0.6.0/go.mod h1:4L0wf+kgIPZtcCWXynNS2e6bhmj73umwnuXSZarixzA= -mvdan.cc/unparam v0.0.0-20240104100049-c549a3470d14 h1:zCr3iRRgdk5eIikZNDphGcM6KGVTx3Yu+/Uu9Es254w= -mvdan.cc/unparam v0.0.0-20240104100049-c549a3470d14/go.mod h1:ZzZjEpJDOmx8TdVU6umamY3Xy0UAQUI2DHbf05USVbI= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +mvdan.cc/unparam v0.0.0-20240427195214-063aff900ca1 h1:Nykk7fggxChwLK4rUPYESzeIwqsuxXXlFEAh5YhaMRo= +mvdan.cc/unparam v0.0.0-20240427195214-063aff900ca1/go.mod h1:ZzZjEpJDOmx8TdVU6umamY3Xy0UAQUI2DHbf05USVbI= diff --git a/otelcol/buffered_core.go b/otelcol/buffered_core.go new file mode 100644 index 00000000000..447bf13cb52 --- /dev/null +++ b/otelcol/buffered_core.go @@ -0,0 +1,81 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// This logger implements zapcore.Core and is based on zaptest/observer. + +package otelcol // import "go.opentelemetry.io/collector/otelcol" + +import ( + "fmt" + "sync" + + "go.uber.org/zap/zapcore" +) + +type loggedEntry struct { + zapcore.Entry + Context []zapcore.Field +} + +func newBufferedCore(enab zapcore.LevelEnabler) *bufferedCore { + return &bufferedCore{LevelEnabler: enab} +} + +var _ zapcore.Core = (*bufferedCore)(nil) + +type bufferedCore struct { + zapcore.LevelEnabler + mu sync.RWMutex + logs []loggedEntry + context []zapcore.Field + logsTaken bool +} + +func (bc *bufferedCore) Level() zapcore.Level { + return zapcore.LevelOf(bc.LevelEnabler) +} + +func (bc *bufferedCore) Check(ent zapcore.Entry, ce *zapcore.CheckedEntry) *zapcore.CheckedEntry { + if bc.Enabled(ent.Level) { + return ce.AddCore(ent, bc) + } + return ce +} + +func (bc *bufferedCore) With(fields []zapcore.Field) zapcore.Core { + return &bufferedCore{ + LevelEnabler: bc.LevelEnabler, + logs: bc.logs, + logsTaken: bc.logsTaken, + context: append(bc.context, fields...), + } +} + +func (bc *bufferedCore) Write(ent zapcore.Entry, fields []zapcore.Field) error { + bc.mu.Lock() + defer bc.mu.Unlock() + if bc.logsTaken { + return fmt.Errorf("the buffered logs have already been taken so writing is no longer supported") + } + all := make([]zapcore.Field, 0, len(fields)+len(bc.context)) + all = append(all, bc.context...) + all = append(all, fields...) + bc.logs = append(bc.logs, loggedEntry{ent, all}) + return nil +} + +func (bc *bufferedCore) Sync() error { + return nil +} + +func (bc *bufferedCore) TakeLogs() []loggedEntry { + if !bc.logsTaken { + bc.mu.Lock() + defer bc.mu.Unlock() + logs := bc.logs + bc.logs = nil + bc.logsTaken = true + return logs + } + return nil +} diff --git a/otelcol/buffered_core_test.go b/otelcol/buffered_core_test.go new file mode 100644 index 00000000000..6417b8a1d9d --- /dev/null +++ b/otelcol/buffered_core_test.go @@ -0,0 +1,107 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otelcol + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zapcore" +) + +func Test_bufferedCore_Level(t *testing.T) { + bc := newBufferedCore(zapcore.InfoLevel) + assert.Equal(t, zapcore.InfoLevel, bc.Level()) +} + +func Test_bufferedCore_Check(t *testing.T) { + t.Run("check passed", func(t *testing.T) { + bc := newBufferedCore(zapcore.InfoLevel) + e := zapcore.Entry{ + Level: zapcore.InfoLevel, + } + expected := &zapcore.CheckedEntry{} + expected = expected.AddCore(e, bc) + ce := bc.Check(e, nil) + assert.Equal(t, expected, ce) + }) + + t.Run("check did not pass", func(t *testing.T) { + bc := newBufferedCore(zapcore.InfoLevel) + e := zapcore.Entry{ + Level: zapcore.DebugLevel, + } + ce := bc.Check(e, nil) + assert.Nil(t, ce) + }) +} + +func Test_bufferedCore_With(t *testing.T) { + bc := newBufferedCore(zapcore.InfoLevel) + bc.logsTaken = true + bc.context = []zapcore.Field{ + {Key: "original", String: "context"}, + } + inputs := []zapcore.Field{ + {Key: "test", String: "passed"}, + } + expected := []zapcore.Field{ + {Key: "original", String: "context"}, + {Key: "test", String: "passed"}, + } + newBC := bc.With(inputs) + assert.Equal(t, expected, newBC.(*bufferedCore).context) + assert.True(t, newBC.(*bufferedCore).logsTaken) +} + +func Test_bufferedCore_Write(t *testing.T) { + bc := newBufferedCore(zapcore.InfoLevel) + e := zapcore.Entry{ + Level: zapcore.DebugLevel, + Message: "test", + } + fields := []zapcore.Field{ + {Key: "field1", String: "value1"}, + } + err := bc.Write(e, fields) + require.NoError(t, err) + + expected := loggedEntry{ + e, + fields, + } + require.Equal(t, 1, len(bc.logs)) + require.Equal(t, expected, bc.logs[0]) +} + +func Test_bufferedCore_Sync(t *testing.T) { + bc := newBufferedCore(zapcore.InfoLevel) + assert.NoError(t, bc.Sync()) +} + +func Test_bufferedCore_TakeLogs(t *testing.T) { + bc := newBufferedCore(zapcore.InfoLevel) + e := zapcore.Entry{ + Level: zapcore.DebugLevel, + Message: "test", + } + fields := []zapcore.Field{ + {Key: "field1", String: "value1"}, + } + err := bc.Write(e, fields) + require.NoError(t, err) + + expected := []loggedEntry{ + { + e, + fields, + }, + } + assert.Equal(t, expected, bc.TakeLogs()) + assert.Nil(t, bc.logs) + + assert.Error(t, bc.Write(e, fields)) + assert.Nil(t, bc.TakeLogs()) +} diff --git a/otelcol/collector.go b/otelcol/collector.go index bca6e9b86dc..8f9839af6c8 100644 --- a/otelcol/collector.go +++ b/otelcol/collector.go @@ -1,12 +1,14 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Package service handles the command-line, configuration, and runs the -// OpenTelemetry Collector. +// Package otelcol handles the command-line, configuration, and runs the OpenTelemetry Collector. +// It contains the main [Collector] struct and its constructor [NewCollector]. +// [Collector.Run] starts the Collector and then blocks until it shuts down. package otelcol // import "go.opentelemetry.io/collector/otelcol" import ( "context" + "errors" "fmt" "os" "os/signal" @@ -15,6 +17,7 @@ import ( "go.uber.org/multierr" "go.uber.org/zap" + "go.uber.org/zap/zapcore" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/confmap" @@ -65,11 +68,6 @@ type CollectorSettings struct { // and manually handle the signals to shutdown the collector. DisableGracefulShutdown bool - // Deprecated: [v0.95.0] Use ConfigProviderSettings instead. - // ConfigProvider provides the service configuration. - // If the provider watches for configuration change, collector may reload the new configuration upon changes. - ConfigProvider ConfigProvider - // ConfigProviderSettings allows configuring the way the Collector retrieves its configuration // The Collector will reload based on configuration changes from the ConfigProvider if any // confmap.Providers watch for configuration changes. @@ -108,22 +106,23 @@ type Collector struct { // signalsChannel is used to receive termination signals from the OS. signalsChannel chan os.Signal // asyncErrorChannel is used to signal a fatal error from any component. - asyncErrorChannel chan error + asyncErrorChannel chan error + bc *bufferedCore + updateConfigProviderLogger func(core zapcore.Core) } // NewCollector creates and returns a new instance of Collector. func NewCollector(set CollectorSettings) (*Collector, error) { - var err error - configProvider := set.ConfigProvider - - set.ConfigProviderSettings.ResolverSettings.ProviderSettings = confmap.ProviderSettings{Logger: zap.NewNop()} - set.ConfigProviderSettings.ResolverSettings.ConverterSettings = confmap.ConverterSettings{} - - if configProvider == nil { - configProvider, err = NewConfigProvider(set.ConfigProviderSettings) - if err != nil { - return nil, err - } + bc := newBufferedCore(zapcore.DebugLevel) + cc := &collectorCore{core: bc} + options := append([]zap.Option{zap.WithCaller(true)}, set.LoggingOptions...) + logger := zap.New(cc, options...) + set.ConfigProviderSettings.ResolverSettings.ProviderSettings = confmap.ProviderSettings{Logger: logger} + set.ConfigProviderSettings.ResolverSettings.ConverterSettings = confmap.ConverterSettings{Logger: logger} + + configProvider, err := NewConfigProvider(set.ConfigProviderSettings) + if err != nil { + return nil, err } state := &atomic.Int32{} @@ -134,9 +133,11 @@ func NewCollector(set CollectorSettings) (*Collector, error) { shutdownChan: make(chan struct{}), // Per signal.Notify documentation, a size of the channel equaled with // the number of signals getting notified on is recommended. - signalsChannel: make(chan os.Signal, 3), - asyncErrorChannel: make(chan error), - configProvider: configProvider, + signalsChannel: make(chan os.Signal, 3), + asyncErrorChannel: make(chan error), + configProvider: configProvider, + bc: bc, + updateConfigProviderLogger: cc.SetCore, }, nil } @@ -157,7 +158,7 @@ func (col *Collector) Shutdown() { } } -// setupConfigurationComponents loads the config and starts the components. If all the steps succeeds it +// setupConfigurationComponents loads the config, creates the graph, and starts the components. If all the steps succeeds it // sets the col.service with the service currently running. func (col *Collector) setupConfigurationComponents(ctx context.Context) error { col.setCollectorState(StateStarting) @@ -202,6 +203,18 @@ func (col *Collector) setupConfigurationComponents(ctx context.Context) error { if err != nil { return err } + if col.updateConfigProviderLogger != nil { + col.updateConfigProviderLogger(col.service.Logger().Core()) + } + if col.bc != nil { + x := col.bc.TakeLogs() + for _, log := range x { + ce := col.service.Logger().Core().Check(log.Entry, nil) + if ce != nil { + ce.Write(log.Context...) + } + } + } if !col.set.SkipSettingGRPCLogger { grpclog.SetLogger(col.service.Logger(), cfg.Service.Telemetry.Logs.Level) @@ -243,12 +256,41 @@ func (col *Collector) DryRun(ctx context.Context) error { return cfg.Validate() } +func newFallbackLogger(options []zap.Option) (*zap.Logger, error) { + ec := zap.NewProductionEncoderConfig() + ec.EncodeTime = zapcore.ISO8601TimeEncoder + zapCfg := &zap.Config{ + Level: zap.NewAtomicLevelAt(zapcore.DebugLevel), + Encoding: "console", + EncoderConfig: ec, + OutputPaths: []string{"stderr"}, + ErrorOutputPaths: []string{"stderr"}, + } + return zapCfg.Build(options...) +} + // Run starts the collector according to the given configuration, and waits for it to complete. // Consecutive calls to Run are not allowed, Run shouldn't be called once a collector is shut down. // Sets up the control logic for config reloading and shutdown. func (col *Collector) Run(ctx context.Context) error { + // setupConfigurationComponents is the "main" function responsible for startup if err := col.setupConfigurationComponents(ctx); err != nil { col.setCollectorState(StateClosed) + logger, loggerErr := newFallbackLogger(col.set.LoggingOptions) + if loggerErr != nil { + return errors.Join(err, fmt.Errorf("unable to create fallback logger: %w", loggerErr)) + } + + if col.bc != nil { + x := col.bc.TakeLogs() + for _, log := range x { + ce := logger.Core().Check(log.Entry, nil) + if ce != nil { + ce.Write(log.Context...) + } + } + } + return err } diff --git a/otelcol/collector_core.go b/otelcol/collector_core.go new file mode 100644 index 00000000000..b0a379fedc9 --- /dev/null +++ b/otelcol/collector_core.go @@ -0,0 +1,58 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otelcol // import "go.opentelemetry.io/collector/otelcol" + +import ( + "sync" + + "go.uber.org/zap/zapcore" +) + +var _ zapcore.Core = (*collectorCore)(nil) + +type collectorCore struct { + core zapcore.Core + rw sync.RWMutex +} + +func (c *collectorCore) Enabled(l zapcore.Level) bool { + c.rw.RLock() + defer c.rw.RUnlock() + return c.core.Enabled(l) +} + +func (c *collectorCore) With(f []zapcore.Field) zapcore.Core { + c.rw.RLock() + defer c.rw.RUnlock() + return &collectorCore{ + core: c.core.With(f), + } +} + +func (c *collectorCore) Check(e zapcore.Entry, ce *zapcore.CheckedEntry) *zapcore.CheckedEntry { + c.rw.RLock() + defer c.rw.RUnlock() + if c.core.Enabled(e.Level) { + return ce.AddCore(e, c) + } + return ce +} + +func (c *collectorCore) Write(e zapcore.Entry, f []zapcore.Field) error { + c.rw.RLock() + defer c.rw.RUnlock() + return c.core.Write(e, f) +} + +func (c *collectorCore) Sync() error { + c.rw.RLock() + defer c.rw.RUnlock() + return c.core.Sync() +} + +func (c *collectorCore) SetCore(core zapcore.Core) { + c.rw.Lock() + defer c.rw.Unlock() + c.core = core +} diff --git a/otelcol/collector_core_test.go b/otelcol/collector_core_test.go new file mode 100644 index 00000000000..6b9deb031e6 --- /dev/null +++ b/otelcol/collector_core_test.go @@ -0,0 +1,89 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otelcol + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zapcore" +) + +func Test_collectorCore_Enabled(t *testing.T) { + cc := collectorCore{core: newBufferedCore(zapcore.InfoLevel)} + assert.True(t, cc.Enabled(zapcore.ErrorLevel)) + assert.False(t, cc.Enabled(zapcore.DebugLevel)) +} + +func Test_collectorCore_Check(t *testing.T) { + t.Run("check passed", func(t *testing.T) { + bc := newBufferedCore(zapcore.InfoLevel) + cc := collectorCore{core: bc} + e := zapcore.Entry{ + Level: zapcore.InfoLevel, + } + expected := &zapcore.CheckedEntry{} + expected = expected.AddCore(e, &cc) + ce := cc.Check(e, nil) + assert.Equal(t, expected, ce) + }) + + t.Run("check did not pass", func(t *testing.T) { + cc := collectorCore{core: newBufferedCore(zapcore.InfoLevel)} + e := zapcore.Entry{ + Level: zapcore.DebugLevel, + } + ce := cc.Check(e, nil) + assert.Nil(t, ce) + }) +} + +func Test_collectorCore_With(t *testing.T) { + cc := collectorCore{core: newBufferedCore(zapcore.InfoLevel)} + cc.core.(*bufferedCore).context = []zapcore.Field{ + {Key: "original", String: "context"}, + } + inputs := []zapcore.Field{ + {Key: "test", String: "passed"}, + } + expected := []zapcore.Field{ + {Key: "original", String: "context"}, + {Key: "test", String: "passed"}, + } + newCC := cc.With(inputs) + assert.Equal(t, expected, newCC.(*collectorCore).core.(*bufferedCore).context) +} + +func Test_collectorCore_Write(t *testing.T) { + cc := collectorCore{core: newBufferedCore(zapcore.InfoLevel)} + e := zapcore.Entry{ + Level: zapcore.DebugLevel, + Message: "test", + } + fields := []zapcore.Field{ + {Key: "field1", String: "value1"}, + } + err := cc.Write(e, fields) + require.NoError(t, err) + + expected := loggedEntry{ + e, + fields, + } + require.Equal(t, 1, len(cc.core.(*bufferedCore).logs)) + require.Equal(t, expected, cc.core.(*bufferedCore).logs[0]) +} + +func Test_collectorCore_Sync(t *testing.T) { + cc := collectorCore{core: newBufferedCore(zapcore.InfoLevel)} + assert.NoError(t, cc.Sync()) +} + +func Test_collectorCore_SetCore(t *testing.T) { + cc := collectorCore{core: newBufferedCore(zapcore.InfoLevel)} + newCore := newBufferedCore(zapcore.DebugLevel) + cc.SetCore(newCore) + assert.Equal(t, zapcore.DebugLevel, cc.core.(*bufferedCore).LevelEnabler) +} diff --git a/otelcol/collector_test.go b/otelcol/collector_test.go index b96a6fc15db..68eb3b54318 100644 --- a/otelcol/collector_test.go +++ b/otelcol/collector_test.go @@ -82,16 +82,17 @@ func (p mockCfgProvider) Watch() <-chan error { } func TestCollectorStateAfterConfigChange(t *testing.T) { - provider, err := NewConfigProvider(newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-nop.yaml")})) - require.NoError(t, err) - watcher := make(chan error, 1) col, err := NewCollector(CollectorSettings{ - BuildInfo: component.NewDefaultBuildInfo(), - Factories: nopFactories, - ConfigProvider: &mockCfgProvider{ConfigProvider: provider, watcher: watcher}, + BuildInfo: component.NewDefaultBuildInfo(), + Factories: nopFactories, + // this will be overwritten, but we need something to get past validation + ConfigProviderSettings: newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-nop.yaml")}), }) require.NoError(t, err) + provider, err := NewConfigProvider(newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-nop.yaml")})) + require.NoError(t, err) + col.configProvider = &mockCfgProvider{ConfigProvider: provider, watcher: watcher} wg := startCollector(context.Background(), t, col) @@ -157,15 +158,11 @@ func TestComponentStatusWatcher(t *testing.T) { factory := extensiontest.NewStatusWatcherExtensionFactory(onStatusChanged) factories.Extensions[factory.Type()] = factory - // Read config from file. This config uses 3 "unhealthy" processors. - validProvider, err := NewConfigProvider(newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-statuswatcher.yaml")})) - require.NoError(t, err) - // Create a collector col, err := NewCollector(CollectorSettings{ - BuildInfo: component.NewDefaultBuildInfo(), - Factories: func() (Factories, error) { return factories, nil }, - ConfigProvider: validProvider, + BuildInfo: component.NewDefaultBuildInfo(), + Factories: func() (Factories, error) { return factories, nil }, + ConfigProviderSettings: newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-statuswatcher.yaml")}), }) require.NoError(t, err) diff --git a/otelcol/collector_windows.go b/otelcol/collector_windows.go index cc0a3611628..3df08386bbf 100644 --- a/otelcol/collector_windows.go +++ b/otelcol/collector_windows.go @@ -202,7 +202,7 @@ func (w windowsEventLogCore) Sync() error { func withWindowsCore(elog *eventlog.Log, serviceConfig **service.Config) func(zapcore.Core) zapcore.Core { return func(core zapcore.Core) zapcore.Core { - if serviceConfig != nil { + if serviceConfig != nil && *serviceConfig != nil { for _, output := range (*serviceConfig).Telemetry.Logs.OutputPaths { if output != "stdout" && output != "stderr" { // A log file was specified in the configuration, so we should not use the Windows Event Log diff --git a/otelcol/command.go b/otelcol/command.go index 9db850bcc13..648b3a5ffda 100644 --- a/otelcol/command.go +++ b/otelcol/command.go @@ -43,22 +43,20 @@ func NewCommand(set CollectorSettings) *cobra.Command { // Puts command line flags from flags into the CollectorSettings, to be used during config resolution. func updateSettingsUsingFlags(set *CollectorSettings, flags *flag.FlagSet) error { - if set.ConfigProvider == nil { - resolverSet := &set.ConfigProviderSettings.ResolverSettings - configFlags := getConfigFlag(flags) + resolverSet := &set.ConfigProviderSettings.ResolverSettings + configFlags := getConfigFlag(flags) - if len(configFlags) > 0 { - resolverSet.URIs = configFlags - } - if len(resolverSet.URIs) == 0 { - return errors.New("at least one config flag must be provided") - } - // Provide a default set of providers and converters if none have been specified. - // TODO: Remove this after CollectorSettings.ConfigProvider is removed and instead - // do it in the builder. - if len(resolverSet.ProviderFactories) == 0 && len(resolverSet.ConverterFactories) == 0 { - set.ConfigProviderSettings = newDefaultConfigProviderSettings(resolverSet.URIs) - } + if len(configFlags) > 0 { + resolverSet.URIs = configFlags + } + if len(resolverSet.URIs) == 0 { + return errors.New("at least one config flag must be provided") + } + // Provide a default set of providers and converters if none have been specified. + // TODO: Remove this after CollectorSettings.ConfigProvider is removed and instead + // do it in the builder. + if len(resolverSet.ProviderFactories) == 0 && len(resolverSet.ConverterFactories) == 0 { + set.ConfigProviderSettings = newDefaultConfigProviderSettings(resolverSet.URIs) } return nil } diff --git a/otelcol/command_components_test.go b/otelcol/command_components_test.go index c4e3c7fbf29..d144d1dc32a 100644 --- a/otelcol/command_components_test.go +++ b/otelcol/command_components_test.go @@ -17,13 +17,10 @@ import ( ) func TestNewBuildSubCommand(t *testing.T) { - cfgProvider, err := NewConfigProvider(newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-nop.yaml")})) - require.NoError(t, err) - set := CollectorSettings{ - BuildInfo: component.NewDefaultBuildInfo(), - Factories: nopFactories, - ConfigProvider: cfgProvider, + BuildInfo: component.NewDefaultBuildInfo(), + Factories: nopFactories, + ConfigProviderSettings: newDefaultConfigProviderSettings([]string{filepath.Join("testdata", "otelcol-nop.yaml")}), } cmd := NewCommand(set) cmd.SetArgs([]string{"components"}) diff --git a/otelcol/command_validate.go b/otelcol/command_validate.go index 72d20d476d8..486bc50e716 100644 --- a/otelcol/command_validate.go +++ b/otelcol/command_validate.go @@ -4,7 +4,6 @@ package otelcol // import "go.opentelemetry.io/collector/otelcol" import ( - "errors" "flag" "github.com/spf13/cobra" @@ -17,18 +16,8 @@ func newValidateSubCommand(set CollectorSettings, flagSet *flag.FlagSet) *cobra. Short: "Validates the config without running the collector", Args: cobra.ExactArgs(0), RunE: func(cmd *cobra.Command, _ []string) error { - if set.ConfigProvider == nil { - var err error - - configFlags := getConfigFlag(flagSet) - if len(configFlags) == 0 { - return errors.New("at least one config flag must be provided") - } - - set.ConfigProvider, err = NewConfigProvider(newDefaultConfigProviderSettings(configFlags)) - if err != nil { - return err - } + if err := updateSettingsUsingFlags(&set, flagSet); err != nil { + return err } col, err := NewCollector(set) if err != nil { diff --git a/otelcol/command_validate_test.go b/otelcol/command_validate_test.go index 30d291d4a56..4aa09d7ff13 100644 --- a/otelcol/command_validate_test.go +++ b/otelcol/command_validate_test.go @@ -23,18 +23,14 @@ func TestValidateSubCommandNoConfig(t *testing.T) { } func TestValidateSubCommandInvalidComponents(t *testing.T) { - cfgProvider, err := NewConfigProvider( - ConfigProviderSettings{ - ResolverSettings: confmap.ResolverSettings{ - URIs: []string{filepath.Join("testdata", "otelcol-invalid-components.yaml")}, - ProviderFactories: []confmap.ProviderFactory{fileprovider.NewFactory()}, - ConverterFactories: []confmap.ConverterFactory{expandconverter.NewFactory()}, - }, - }) - require.NoError(t, err) - - cmd := newValidateSubCommand(CollectorSettings{Factories: nopFactories, ConfigProvider: cfgProvider}, flags(featuregate.GlobalRegistry())) - err = cmd.Execute() + cmd := newValidateSubCommand(CollectorSettings{Factories: nopFactories, ConfigProviderSettings: ConfigProviderSettings{ + ResolverSettings: confmap.ResolverSettings{ + URIs: []string{filepath.Join("testdata", "otelcol-invalid-components.yaml")}, + ProviderFactories: []confmap.ProviderFactory{fileprovider.NewFactory()}, + ConverterFactories: []confmap.ConverterFactory{expandconverter.NewFactory()}, + }, + }}, flags(featuregate.GlobalRegistry())) + err := cmd.Execute() require.Error(t, err) require.Contains(t, err.Error(), "unknown type: \"nosuchprocessor\"") } diff --git a/otelcol/config.go b/otelcol/config.go index 7c27bd40201..e622617721b 100644 --- a/otelcol/config.go +++ b/otelcol/config.go @@ -20,21 +20,21 @@ var ( // Config defines the configuration for the various elements of collector or agent. type Config struct { // Receivers is a map of ComponentID to Receivers. - Receivers map[component.ID]component.Config + Receivers map[component.ID]component.Config `mapstructure:"receivers"` // Exporters is a map of ComponentID to Exporters. - Exporters map[component.ID]component.Config + Exporters map[component.ID]component.Config `mapstructure:"exporters"` // Processors is a map of ComponentID to Processors. - Processors map[component.ID]component.Config + Processors map[component.ID]component.Config `mapstructure:"processors"` // Connectors is a map of ComponentID to connectors. - Connectors map[component.ID]component.Config + Connectors map[component.ID]component.Config `mapstructure:"connectors"` // Extensions is a map of ComponentID to extensions. - Extensions map[component.ID]component.Config + Extensions map[component.ID]component.Config `mapstructure:"extensions"` - Service service.Config + Service service.Config `mapstructure:"service"` } // Validate returns an error if the config is invalid. diff --git a/otelcol/configprovider.go b/otelcol/configprovider.go index 477541fd4bd..6360b536509 100644 --- a/otelcol/configprovider.go +++ b/otelcol/configprovider.go @@ -67,8 +67,8 @@ type configProvider struct { mapResolver *confmap.Resolver } -var _ ConfigProvider = &configProvider{} -var _ ConfmapProvider = &configProvider{} +var _ ConfigProvider = (*configProvider)(nil) +var _ ConfmapProvider = (*configProvider)(nil) // ConfigProviderSettings are the settings to configure the behavior of the ConfigProvider. type ConfigProviderSettings struct { diff --git a/otelcol/go.mod b/otelcol/go.mod index a24906b5d07..40f978da2f8 100644 --- a/otelcol/go.mod +++ b/otelcol/go.mod @@ -1,39 +1,39 @@ module go.opentelemetry.io/collector/otelcol -go 1.21 +go 1.21.0 require ( github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.100.0 - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 - go.opentelemetry.io/collector/confmap v0.100.0 - go.opentelemetry.io/collector/confmap/converter/expandconverter v0.100.0 - go.opentelemetry.io/collector/confmap/provider/envprovider v0.100.0 - go.opentelemetry.io/collector/confmap/provider/fileprovider v0.100.0 - go.opentelemetry.io/collector/confmap/provider/httpprovider v0.100.0 - go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.100.0 - go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.100.0 - go.opentelemetry.io/collector/connector v0.100.0 - go.opentelemetry.io/collector/exporter v0.100.0 - go.opentelemetry.io/collector/extension v0.100.0 - go.opentelemetry.io/collector/featuregate v1.7.0 - go.opentelemetry.io/collector/processor v0.100.0 - go.opentelemetry.io/collector/receiver v0.100.0 - go.opentelemetry.io/collector/service v0.100.0 + go.opentelemetry.io/collector/component v0.102.1 + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 + go.opentelemetry.io/collector/confmap v0.102.1 + go.opentelemetry.io/collector/confmap/converter/expandconverter v0.102.1 + go.opentelemetry.io/collector/confmap/provider/envprovider v0.102.1 + go.opentelemetry.io/collector/confmap/provider/fileprovider v0.102.1 + go.opentelemetry.io/collector/confmap/provider/httpprovider v0.102.1 + go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.102.1 + go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.102.1 + go.opentelemetry.io/collector/connector v0.102.1 + go.opentelemetry.io/collector/exporter v0.102.1 + go.opentelemetry.io/collector/extension v0.102.1 + go.opentelemetry.io/collector/featuregate v1.9.0 + go.opentelemetry.io/collector/processor v0.102.1 + go.opentelemetry.io/collector/receiver v0.102.1 + go.opentelemetry.io/collector/service v0.102.1 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 - golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa - golang.org/x/sys v0.19.0 - google.golang.org/grpc v1.63.2 + golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 + golang.org/x/sys v0.20.0 + google.golang.org/grpc v1.64.0 gopkg.in/yaml.v3 v3.0.1 ) require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -42,8 +42,8 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect + github.com/hashicorp/go-version v1.7.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect @@ -56,45 +56,45 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.53.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - github.com/shirou/gopsutil/v3 v3.24.3 // indirect + github.com/prometheus/procfs v0.15.0 // indirect + github.com/shirou/gopsutil/v3 v3.24.4 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.100.0 // indirect - go.opentelemetry.io/collector/consumer v0.100.0 // indirect - go.opentelemetry.io/collector/pdata v1.7.0 // indirect - go.opentelemetry.io/collector/pdata/testdata v0.100.0 // indirect - go.opentelemetry.io/collector/semconv v0.100.0 // indirect - go.opentelemetry.io/contrib/config v0.6.0 // indirect - go.opentelemetry.io/contrib/propagators/b3 v1.26.0 // indirect - go.opentelemetry.io/otel v1.26.0 // indirect - go.opentelemetry.io/otel/bridge/opencensus v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 // indirect - go.opentelemetry.io/otel/metric v1.26.0 // indirect - go.opentelemetry.io/otel/sdk v1.26.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect - go.opentelemetry.io/otel/trace v1.26.0 // indirect + go.opentelemetry.io/collector v0.102.1 // indirect + go.opentelemetry.io/collector/consumer v0.102.1 // indirect + go.opentelemetry.io/collector/pdata v1.9.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.102.1 // indirect + go.opentelemetry.io/collector/semconv v0.102.1 // indirect + go.opentelemetry.io/contrib/config v0.7.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.27.0 // indirect + go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/bridge/opencensus v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect go.opentelemetry.io/proto/otlp v1.2.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/text v0.15.0 // indirect gonum.org/v1/gonum v0.15.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/protobuf v1.34.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/protobuf v1.34.1 // indirect ) replace go.opentelemetry.io/collector => ../ diff --git a/otelcol/go.sum b/otelcol/go.sum index ccfb176713a..6c46ac8b08a 100644 --- a/otelcol/go.sum +++ b/otelcol/go.sum @@ -5,8 +5,8 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -56,10 +56,10 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -91,20 +91,20 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= -github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= +github.com/shirou/gopsutil/v3 v3.24.4 h1:dEHgzZXt4LMNm+oYELpzl9YCqV65Yr/6SfrvgRBtXeU= +github.com/shirou/gopsutil/v3 v3.24.4/go.mod h1:lTd2mdiOspcqLgAnr9/nGi71NkeMpWKdmhuxm9GusH8= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= @@ -134,40 +134,40 @@ github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/config v0.6.0 h1:M1SRD1Z15XHPGk61tMLI1up77XT5FdrqQSRrlH0fYuk= -go.opentelemetry.io/contrib/config v0.6.0/go.mod h1:t+/kzmRWLN7J+4F/dD4fFvlYCmCO63WYwy/B00IC++c= -go.opentelemetry.io/contrib/propagators/b3 v1.26.0 h1:wgFbVA+bK2k+fGVfDOCOG4cfDAoppyr5sI2dVlh8MWM= -go.opentelemetry.io/contrib/propagators/b3 v1.26.0/go.mod h1:DDktFXxA+fyItAAM0Sbl5OBH7KOsCTjvbBdPKtoIf/k= -go.opentelemetry.io/contrib/zpages v0.51.0 h1:psVr4JTWd0qtISPj9EA6AODGJ09bvsOxWiuKqiGdSCA= -go.opentelemetry.io/contrib/zpages v0.51.0/go.mod h1:PKtp+NEp1gTTLmFHpynYgYCSkKtisPntOb9S1mQjFKg= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/bridge/opencensus v1.26.0 h1:DZzxj9QjznMVoehskOJnFP2gsTCWtDTFBDvFhPAY7nc= -go.opentelemetry.io/otel/bridge/opencensus v1.26.0/go.mod h1:rJiX0KrF5m8Tm1XE8jLczpAv5zUaDcvhKecFG0ZoFG4= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 h1:+hm+I+KigBy3M24/h1p/NHkUx/evbLH0PNcjpMyCHc4= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0/go.mod h1:NjC8142mLvvNT6biDpaMjyz78kyEHIwAJlSX0N9P5KI= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 h1:HGZWGmCVRCVyAs2GQaiHQPbDHo+ObFWeUEOd+zDnp64= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0/go.mod h1:SaH+v38LSCHddyk7RGlU9uZyQoRrKao6IBnJw6Kbn+c= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 h1:1u/AyyOqAWzy+SkPxDpahCNZParHV8Vid1RnI2clyDE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0/go.mod h1:z46paqbJ9l7c9fIPCXTqTGwhQZ5XoTIsfeFYWboizjs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 h1:Waw9Wfpo/IXzOI8bCB7DIk+0JZcqqsyn1JFnAc+iam8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0/go.mod h1:wnJIG4fOqyynOnnQF/eQb4/16VlX2EJAHhHgqIqWfAo= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 h1:1wp/gyxsuYtuE/JFxsQRtcCDtMrO2qMvlfXALU5wkzI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0/go.mod h1:gbTHmghkGgqxMomVQQMur1Nba4M0MQ8AYThXDUjsJ38= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 h1:5fnmgteaar1VcAA69huatudPduNFz7guRtCmfZCooZI= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0/go.mod h1:lsPccfZiz1cb1AhBPmicWM2E4F1VynFXEvD8SEBS4TM= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 h1:0W5o9SzoR15ocYHEQfvfipzcNog1lBxOLfnex91Hk6s= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0/go.mod h1:zVZ8nz+VSggWmnh6tTsJqXQ7rU4xLwRtna1M4x5jq58= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/contrib/config v0.7.0 h1:b1rK5tGTuhhPirJiMxOcyQfZs76j2VapY6ODn3b2Dbs= +go.opentelemetry.io/contrib/config v0.7.0/go.mod h1:8tdiFd8N5etOi3XzBmAoMxplEzI3TcL8dU5rM5/xcOQ= +go.opentelemetry.io/contrib/propagators/b3 v1.27.0 h1:IjgxbomVrV9za6bRi8fWCNXENs0co37SZedQilP2hm0= +go.opentelemetry.io/contrib/propagators/b3 v1.27.0/go.mod h1:Dv9obQz25lCisDvvs4dy28UPh974CxkahRDUPsY7y9E= +go.opentelemetry.io/contrib/zpages v0.52.0 h1:MPgkMy0Cp3O5EdfVXP0ss3ujhEibysTM4eszx7E7d+E= +go.opentelemetry.io/contrib/zpages v0.52.0/go.mod h1:fqG5AFdoYru3A3DnhibVuaaEfQV2WKxE7fYE1jgDRwk= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/bridge/opencensus v1.27.0 h1:ao9aGGHd+G4YfjBpGs6vbkvt5hoC67STlJA9fCnOAcs= +go.opentelemetry.io/otel/bridge/opencensus v1.27.0/go.mod h1:uRvWtAAXzyVOST0WMPX5JHGBaAvBws+2F8PcC5gMnTk= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 h1:QY7/0NeRPKlzusf40ZE4t1VlMKbqSNT7cJRYzWuja0s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0/go.mod h1:HVkSiDhTM9BoUJU8qE6j2eSWLLXvi1USXjyd2BXT8PY= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0 h1:/jlt1Y8gXWiHG9FBx6cJaIC5hYx5Fe64nC8w5Cylt/0= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0/go.mod h1:bmToOGOBZ4hA9ghphIc1PAf66VA8KOtsuy3+ScStG20= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0 h1:/0YaXu3755A/cFbtXp+21lkXgI0QE5avTWA2HjU9/WE= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0/go.mod h1:m7SFxp0/7IxmJPLIY3JhOcU9CoFzDaCPL6xxQIxhA+o= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -180,8 +180,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= -golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= +golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= +golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -196,8 +196,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -212,13 +212,13 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -238,19 +238,17 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 h1:P8OJ/WCl/Xo4E4zoe4/bifHpSmmKwARqyqE4nW6J2GQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -260,8 +258,8 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/otelcol/internal/configunmarshaler/configs.go b/otelcol/internal/configunmarshaler/configs.go index 05cc8b11296..7f864fdfd32 100644 --- a/otelcol/internal/configunmarshaler/configs.go +++ b/otelcol/internal/configunmarshaler/configs.go @@ -43,7 +43,7 @@ func (c *Configs[F]) Unmarshal(conf *confmap.Conf) error { // Now that the default config struct is created we can Unmarshal into it, // and it will apply user-defined config on top of the default. - if err := component.UnmarshalConfig(confmap.NewFromStringMap(value), cfg); err != nil { + if err := confmap.NewFromStringMap(value).Unmarshal(&cfg); err != nil { return errorUnmarshalError(id, err) } diff --git a/otelcol/unmarshaler.go b/otelcol/unmarshaler.go index a522d9fa60d..4967b0a731d 100644 --- a/otelcol/unmarshaler.go +++ b/otelcol/unmarshaler.go @@ -4,11 +4,6 @@ package otelcol // import "go.opentelemetry.io/collector/otelcol" import ( - "time" - - "go.uber.org/zap/zapcore" - - "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/connector" "go.opentelemetry.io/collector/exporter" @@ -32,6 +27,10 @@ type configSettings struct { // unmarshal the configSettings from a confmap.Conf. // After the config is unmarshalled, `Validate()` must be called to validate. func unmarshal(v *confmap.Conf, factories Factories) (*configSettings, error) { + + telFactory := telemetry.NewFactory() + defaultTelConfig := *telFactory.CreateDefaultConfig().(*telemetry.Config) + // Unmarshal top level sections and validate. cfg := &configSettings{ Receivers: configunmarshaler.NewConfigs(factories.Receivers), @@ -41,28 +40,7 @@ func unmarshal(v *confmap.Conf, factories Factories) (*configSettings, error) { Extensions: configunmarshaler.NewConfigs(factories.Extensions), // TODO: Add a component.ServiceFactory to allow this to be defined by the Service. Service: service.Config{ - Telemetry: telemetry.Config{ - Logs: telemetry.LogsConfig{ - Level: zapcore.InfoLevel, - Development: false, - Encoding: "console", - Sampling: &telemetry.LogsSamplingConfig{ - Enabled: true, - Tick: 10 * time.Second, - Initial: 10, - Thereafter: 100, - }, - OutputPaths: []string{"stderr"}, - ErrorOutputPaths: []string{"stderr"}, - DisableCaller: false, - DisableStacktrace: false, - InitialFields: map[string]any(nil), - }, - Metrics: telemetry.MetricsConfig{ - Level: configtelemetry.LevelNormal, - Address: ":8888", - }, - }, + Telemetry: defaultTelConfig, }, } diff --git a/pdata/go.mod b/pdata/go.mod index 81fa331f77c..72b6b3821cb 100644 --- a/pdata/go.mod +++ b/pdata/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/collector/pdata -go 1.21 +go 1.21.0 require ( github.com/gogo/protobuf v1.3.2 @@ -8,8 +8,8 @@ require ( github.com/stretchr/testify v1.9.0 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 - google.golang.org/grpc v1.63.2 - google.golang.org/protobuf v1.34.0 + google.golang.org/grpc v1.64.0 + google.golang.org/protobuf v1.34.1 ) require ( @@ -22,7 +22,7 @@ require ( golang.org/x/net v0.23.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/pdata/go.sum b/pdata/go.sum index 93e99b1aad8..fb87926ab78 100644 --- a/pdata/go.sum +++ b/pdata/go.sum @@ -70,12 +70,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/pdata/internal/cmd/pdatagen/internal/base_fields.go b/pdata/internal/cmd/pdatagen/internal/base_fields.go index 7e0f60dd679..523ef352149 100644 --- a/pdata/internal/cmd/pdatagen/internal/base_fields.go +++ b/pdata/internal/cmd/pdatagen/internal/base_fields.go @@ -9,10 +9,10 @@ import ( "text/template" ) -const accessorSliceTemplate = `// {{ .fieldName }} returns the {{ .fieldName }} associated with this {{ .structName }}. +const accessorSliceTemplate = `// {{ .fieldName }} returns the {{ .originFieldName }} associated with this {{ .structName }}. func (ms {{ .structName }}) {{ .fieldName }}() {{ .packageName }}{{ .returnType }} { {{- if .isCommon }} - return {{ .packageName }}{{ .returnType }}(internal.New{{ .returnType }}(&ms.{{ .origAccessor }}.{{ .fieldName }} + return {{ .packageName }}{{ .returnType }}(internal.New{{ .returnType }}(&ms.{{ .origAccessor }}.{{ .originFieldName }} {{- if .isBaseStructCommon -}} , internal.Get{{ .structName }}State(internal.{{ .structName }}(ms)) {{- else -}} @@ -20,7 +20,7 @@ func (ms {{ .structName }}) {{ .fieldName }}() {{ .packageName }}{{ .returnType {{- end -}} )) {{- else }} - return new{{ .returnType }}(&ms.{{ .origAccessor }}.{{ .fieldName }}, ms.state) + return new{{ .returnType }}(&ms.{{ .origAccessor }}.{{ .originFieldName }}, ms.state) {{- end }} }` @@ -42,7 +42,7 @@ const setTestValueTemplate = `{{ if .isCommon -}} {{- else -}} fillTest{{ .returnType }}(new {{- end -}} - {{ .returnType }}(&tv.orig.{{ .fieldName }}, tv.state))` + {{ .returnType }}(&tv.orig.{{ .originFieldName }}, tv.state))` const accessorsMessageValueTemplate = `// {{ .fieldName }} returns the {{ .lowerFieldName }} associated with this {{ .structName }}. func (ms {{ .structName }}) {{ .fieldName }}() {{ .packageName }}{{ .returnType }} { @@ -66,13 +66,13 @@ const accessorsMessageValueTestTemplate = `func Test{{ .structName }}_{{ .fieldN const accessorsPrimitiveTemplate = `// {{ .fieldName }} returns the {{ .lowerFieldName }} associated with this {{ .structName }}. func (ms {{ .structName }}) {{ .fieldName }}() {{ .packageName }}{{ .returnType }} { - return ms.{{ .origAccessor }}.{{ .fieldName }} + return ms.{{ .origAccessor }}.{{ .originFieldName }} } // Set{{ .fieldName }} replaces the {{ .lowerFieldName }} associated with this {{ .structName }}. func (ms {{ .structName }}) Set{{ .fieldName }}(v {{ .returnType }}) { ms.{{ .stateAccessor }}.AssertMutable() - ms.{{ .origAccessor }}.{{ .fieldName }} = v + ms.{{ .origAccessor }}.{{ .originFieldName }} = v }` const accessorsPrimitiveSliceTemplate = `// {{ .fieldName }} returns the {{ .lowerFieldName }} associated with this {{ .structName }}. @@ -106,7 +106,7 @@ const oneOfTypeAccessorTestTemplate = `func Test{{ .structName }}_{{ .typeFuncNa const accessorsOneOfMessageTemplate = `// {{ .fieldName }} returns the {{ .lowerFieldName }} associated with this {{ .structName }}. // -// Calling this function when {{ .originOneOfTypeFuncName }}() != {{ .typeName }} returns an invalid +// Calling this function when {{ .originOneOfTypeFuncName }}() != {{ .typeName }} returns an invalid // zero-initialized instance of {{ .returnType }}. Note that using such {{ .returnType }} instance can cause panic. // // Calling this function on zero-initialized {{ .structName }} will cause a panic. @@ -254,8 +254,9 @@ type baseField interface { } type sliceField struct { - fieldName string - returnSlice baseSlice + fieldName string + originFieldName string + returnSlice baseSlice } func (sf *sliceField) GenerateAccessors(ms *messageValueStruct) string { @@ -304,6 +305,12 @@ func (sf *sliceField) templateFields(ms *messageValueStruct) map[string]any { "stateAccessor": stateAccessor(ms), "isCommon": usedByOtherDataTypes(sf.returnSlice.getPackageName()), "isBaseStructCommon": usedByOtherDataTypes(ms.packageName), + "originFieldName": func() string { + if sf.originFieldName == "" { + return sf.fieldName + } + return sf.originFieldName + }(), } } @@ -347,11 +354,12 @@ func (mf *messageValueField) GenerateCopyToValue(*messageValueStruct) string { func (mf *messageValueField) templateFields(ms *messageValueStruct) map[string]any { return map[string]any{ - "isCommon": usedByOtherDataTypes(mf.returnMessage.packageName), - "structName": ms.getName(), - "fieldName": mf.fieldName, - "lowerFieldName": strings.ToLower(mf.fieldName), - "returnType": mf.returnMessage.getName(), + "isCommon": usedByOtherDataTypes(mf.returnMessage.packageName), + "structName": ms.getName(), + "fieldName": mf.fieldName, + "originFieldName": mf.fieldName, + "lowerFieldName": strings.ToLower(mf.fieldName), + "returnType": mf.returnMessage.getName(), "packageName": func() string { if mf.returnMessage.packageName != ms.packageName { return mf.returnMessage.packageName + "." @@ -366,10 +374,11 @@ func (mf *messageValueField) templateFields(ms *messageValueStruct) map[string]a var _ baseField = (*messageValueField)(nil) type primitiveField struct { - fieldName string - returnType string - defaultVal string - testVal string + fieldName string + originFieldName string + returnType string + defaultVal string + testVal string } func (pf *primitiveField) GenerateAccessors(ms *messageValueStruct) string { @@ -391,7 +400,11 @@ func (pf *primitiveField) GenerateAccessorsTest(ms *messageValueStruct) string { } func (pf *primitiveField) GenerateSetWithTestValue(*messageValueStruct) string { - return "\ttv.orig." + pf.fieldName + " = " + pf.testVal + originFieldName := pf.fieldName + if pf.originFieldName != "" { + originFieldName = pf.originFieldName + } + return "\ttv.orig." + originFieldName + " = " + pf.testVal } func (pf *primitiveField) GenerateCopyToValue(*messageValueStruct) string { @@ -410,6 +423,12 @@ func (pf *primitiveField) templateFields(ms *messageValueStruct) map[string]any "origAccessor": origAccessor(ms), "stateAccessor": stateAccessor(ms), "originStructName": ms.originFullName, + "originFieldName": func() string { + if pf.originFieldName == "" { + return pf.fieldName + } + return pf.originFieldName + }(), } } diff --git a/pdata/internal/cmd/pdatagen/internal/packages.go b/pdata/internal/cmd/pdatagen/internal/packages.go index f44b597708a..340912dbc01 100644 --- a/pdata/internal/cmd/pdatagen/internal/packages.go +++ b/pdata/internal/cmd/pdatagen/internal/packages.go @@ -25,6 +25,8 @@ var AllPackages = []*Package{ pmetricotlp, ptrace, ptraceotlp, + pprofile, + pprofileotlp, } // Package is a struct used to generate files. diff --git a/pdata/internal/cmd/pdatagen/internal/pcommon_package.go b/pdata/internal/cmd/pdatagen/internal/pcommon_package.go index 5926279694d..6491792b4cf 100644 --- a/pdata/internal/cmd/pdatagen/internal/pcommon_package.go +++ b/pdata/internal/cmd/pdatagen/internal/pcommon_package.go @@ -24,6 +24,8 @@ var pcommon = &Package{ byteSlice, float64Slice, uInt64Slice, + int64Slice, + stringSlice, }, } @@ -164,19 +166,51 @@ var resourceField = &messageValueField{ } var byteSlice = &primitiveSliceStruct{ - structName: "ByteSlice", - packageName: "pcommon", - itemType: "byte", + structName: "ByteSlice", + packageName: "pcommon", + itemType: "byte", + testOrigVal: "1, 2, 3", + testInterfaceOrigVal: []interface{}{1, 2, 3}, + testSetVal: "5", + testNewVal: "1, 5, 3", } var float64Slice = &primitiveSliceStruct{ - structName: "Float64Slice", - packageName: "pcommon", - itemType: "float64", + structName: "Float64Slice", + packageName: "pcommon", + itemType: "float64", + testOrigVal: "1, 2, 3", + testInterfaceOrigVal: []interface{}{1, 2, 3}, + testSetVal: "5", + testNewVal: "1, 5, 3", } var uInt64Slice = &primitiveSliceStruct{ - structName: "UInt64Slice", - packageName: "pcommon", - itemType: "uint64", + structName: "UInt64Slice", + packageName: "pcommon", + itemType: "uint64", + testOrigVal: "1, 2, 3", + testInterfaceOrigVal: []interface{}{1, 2, 3}, + testSetVal: "5", + testNewVal: "1, 5, 3", +} + +var int64Slice = &primitiveSliceStruct{ + structName: "Int64Slice", + packageName: "pcommon", + itemType: "int64", + testOrigVal: "1, 2, 3", + testInterfaceOrigVal: []interface{}{1, 2, 3}, + testSetVal: "5", + testNewVal: "1, 5, 3", +} + +var stringSlice = &primitiveSliceStruct{ + structName: "StringSlice", + packageName: "pcommon", + itemType: "string", + testOrigVal: `"a", "b", "c"`, + testInterfaceOrigVal: []interface{}{`"a"`, `"b"`, `"c"`}, + testSetVal: `"d"`, + testNewVal: `"a", "d", "c"`, } diff --git a/pdata/internal/cmd/pdatagen/internal/pprofile_otlp_package.go b/pdata/internal/cmd/pdatagen/internal/pprofile_otlp_package.go new file mode 100644 index 00000000000..ddd3a5df437 --- /dev/null +++ b/pdata/internal/cmd/pdatagen/internal/pprofile_otlp_package.go @@ -0,0 +1,43 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package internal // import "go.opentelemetry.io/collector/pdata/internal/cmd/pdatagen/internal" +import ( + "path/filepath" +) + +var pprofileotlp = &Package{ + name: "pprofileotlp", + path: filepath.Join("pprofile", "pprofileotlp"), + imports: []string{ + `otlpcollectorprofile "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/profiles/v1experimental"`, + }, + testImports: []string{ + `"testing"`, + ``, + `"github.com/stretchr/testify/assert"`, + }, + structs: []baseStruct{ + exportProfilesPartialSuccess, + }, +} + +var exportProfilesPartialSuccess = &messageValueStruct{ + structName: "ExportPartialSuccess", + description: "// ExportPartialSuccess represents the details of a partially successful export request.", + originFullName: "otlpcollectorprofile.ExportProfilesPartialSuccess", + fields: []baseField{ + &primitiveField{ + fieldName: "RejectedProfiles", + returnType: "int64", + defaultVal: `int64(0)`, + testVal: `int64(13)`, + }, + &primitiveField{ + fieldName: "ErrorMessage", + returnType: "string", + defaultVal: `""`, + testVal: `"error message"`, + }, + }, +} diff --git a/pdata/internal/cmd/pdatagen/internal/pprofile_package.go b/pdata/internal/cmd/pdatagen/internal/pprofile_package.go new file mode 100644 index 00000000000..bd300eae607 --- /dev/null +++ b/pdata/internal/cmd/pdatagen/internal/pprofile_package.go @@ -0,0 +1,603 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package internal // import "go.opentelemetry.io/collector/pdata/internal/cmd/pdatagen/internal" + +var pprofile = &Package{ + name: "pprofile", + path: "pprofile", + imports: []string{ + `"go.opentelemetry.io/collector/pdata/internal"`, + `"go.opentelemetry.io/collector/pdata/internal/data"`, + `otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental"`, + `"go.opentelemetry.io/collector/pdata/pcommon"`, + }, + testImports: []string{ + `"testing"`, + `"unsafe"`, + ``, + `"github.com/stretchr/testify/assert"`, + ``, + `"go.opentelemetry.io/collector/pdata/internal"`, + `otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental"`, + `"go.opentelemetry.io/collector/pdata/pcommon"`, + }, + structs: []baseStruct{ + resourceProfilesSlice, + resourceProfiles, + scopeProfilesSlice, + scopeProfiles, + profilesContainersSlice, + profileContainer, + profile, + valueTypeSlice, + valueType, + sampleSlice, + sample, + labelSlice, + label, + mappingSlice, + mapping, + locationSlice, + location, + lineSlice, + line, + functionSlice, + function, + attributeUnitSlice, + attributeUnit, + linkSlice, + link, + }, +} + +var resourceProfilesSlice = &sliceOfPtrs{ + structName: "ResourceProfilesSlice", + element: resourceProfiles, +} + +var resourceProfiles = &messageValueStruct{ + structName: "ResourceProfiles", + description: "// ResourceProfiles is a collection of profiles from a Resource.", + originFullName: "otlpprofiles.ResourceProfiles", + fields: []baseField{ + resourceField, + schemaURLField, + &sliceField{ + fieldName: "ScopeProfiles", + returnSlice: scopeProfilesSlice, + }, + }, +} + +var scopeProfilesSlice = &sliceOfPtrs{ + structName: "ScopeProfilesSlice", + element: scopeProfiles, +} + +var scopeProfiles = &messageValueStruct{ + structName: "ScopeProfiles", + description: "// ScopeProfiles is a collection of profiles from a LibraryInstrumentation.", + originFullName: "otlpprofiles.ScopeProfiles", + fields: []baseField{ + scopeField, + schemaURLField, + &sliceField{ + fieldName: "Profiles", + returnSlice: profilesContainersSlice, + }, + }, +} + +var profilesContainersSlice = &sliceOfPtrs{ + structName: "ProfilesContainersSlice", + element: profileContainer, +} + +var profileContainer = &messageValueStruct{ + structName: "ProfileContainer", + description: "// ProfileContainer are an experimental implementation of the OpenTelemetry Profiles Data Model.\n", + originFullName: "otlpprofiles.ProfileContainer", + fields: []baseField{ + &sliceField{ + fieldName: "ProfileID", + originFieldName: "ProfileId", + returnSlice: byteSlice, + }, + &primitiveTypedField{ + fieldName: "StartTime", + originFieldName: "StartTimeUnixNano", + returnType: timestampType, + }, + &primitiveTypedField{ + fieldName: "EndTime", + originFieldName: "EndTimeUnixNano", + returnType: timestampType, + }, + attributes, + droppedAttributesCount, + &messageValueField{ + fieldName: "Profile", + returnMessage: profile, + }, + }, +} + +var profile = &messageValueStruct{ + structName: "Profile", + description: "// Profile are an implementation of the pprofextended data model.\n", + originFullName: "otlpprofiles.Profile", + fields: []baseField{ + &sliceField{ + fieldName: "SampleType", + returnSlice: valueTypeSlice, + }, + &sliceField{ + fieldName: "Sample", + returnSlice: sampleSlice, + }, + &sliceField{ + fieldName: "Mapping", + returnSlice: mappingSlice, + }, + &sliceField{ + fieldName: "Location", + returnSlice: locationSlice, + }, + &sliceField{ + fieldName: "LocationIndices", + returnSlice: int64Slice, + }, + &sliceField{ + fieldName: "Function", + returnSlice: functionSlice, + }, + &sliceField{ + fieldName: "AttributeTable", + returnSlice: mapStruct, + }, + &sliceField{ + fieldName: "AttributeUnits", + returnSlice: attributeUnitSlice, + }, + &sliceField{ + fieldName: "LinkTable", + returnSlice: linkSlice, + }, + &sliceField{ + fieldName: "StringTable", + returnSlice: stringSlice, + }, + &primitiveField{ + fieldName: "DropFrames", + returnType: "int64", + defaultVal: "int64(0)", + testVal: "int64(1)", + }, + &primitiveField{ + fieldName: "KeepFrames", + returnType: "int64", + defaultVal: "int64(0)", + testVal: "int64(1)", + }, + &primitiveTypedField{ + fieldName: "StartTime", + originFieldName: "TimeNanos", + returnType: &primitiveType{ + structName: "Timestamp", + packageName: "pcommon", + rawType: "int64", + defaultVal: "0", + testVal: "1234567890", + }, + }, + &primitiveTypedField{ + fieldName: "Duration", + originFieldName: "DurationNanos", + returnType: &primitiveType{ + structName: "Timestamp", + packageName: "pcommon", + rawType: "int64", + defaultVal: "0", + testVal: "1234567890", + }, + }, + &messageValueField{ + fieldName: "PeriodType", + returnMessage: valueType, + }, + &primitiveField{ + fieldName: "Period", + returnType: "int64", + defaultVal: "int64(0)", + testVal: "int64(1)", + }, + &sliceField{ + fieldName: "Comment", + returnSlice: int64Slice, + }, + &primitiveField{ + fieldName: "DefaultSampleType", + returnType: "int64", + defaultVal: "int64(0)", + testVal: "int64(1)", + }, + }, +} + +var valueTypeSlice = &sliceOfValues{ + structName: "ValueTypeSlice", + element: valueType, +} + +var valueType = &messageValueStruct{ + structName: "ValueType", + description: "// ValueType describes the type and units of a value, with an optional aggregation temporality.", + originFullName: "otlpprofiles.ValueType", + fields: []baseField{ + &primitiveField{ + fieldName: "Type", + returnType: "int64", + defaultVal: "int64(0)", + testVal: "int64(1)", + }, + &primitiveField{ + fieldName: "Unit", + returnType: "int64", + defaultVal: "int64(0)", + testVal: "int64(1)", + }, + &primitiveField{ + fieldName: "AggregationTemporality", + returnType: "otlpprofiles.AggregationTemporality", + defaultVal: "otlpprofiles.AggregationTemporality(0)", + testVal: "otlpprofiles.AggregationTemporality(1)", + }, + }, +} + +var sampleSlice = &sliceOfValues{ + structName: "SampleSlice", + element: sample, +} + +var sample = &messageValueStruct{ + structName: "Sample", + description: "// Sample represents each record value encountered within a profiled program.", + originFullName: "otlpprofiles.Sample", + fields: []baseField{ + &sliceField{ + fieldName: "LocationIndex", + returnSlice: uInt64Slice, + }, + &primitiveField{ + fieldName: "LocationsStartIndex", + returnType: "uint64", + defaultVal: "uint64(0)", + testVal: "uint64(1)", + }, + &primitiveField{ + fieldName: "LocationsLength", + returnType: "uint64", + defaultVal: "uint64(0)", + testVal: "uint64(1)", + }, + &primitiveField{ + fieldName: "StacktraceIdIndex", + returnType: "uint32", + defaultVal: "uint32(0)", + testVal: "uint32(1)", + }, + &sliceField{ + fieldName: "Value", + returnSlice: int64Slice, + }, + &sliceField{ + fieldName: "Label", + returnSlice: labelSlice, + }, + &sliceField{ + fieldName: "Attributes", + returnSlice: uInt64Slice, + }, + &primitiveField{ + fieldName: "Link", + returnType: "uint64", + defaultVal: "uint64(0)", + testVal: "uint64(1)", + }, + &sliceField{ + fieldName: "TimestampsUnixNano", + returnSlice: uInt64Slice, + }, + }, +} + +var labelSlice = &sliceOfValues{ + structName: "LabelSlice", + element: label, +} + +var label = &messageValueStruct{ + structName: "Label", + description: "// Label provided additional context for a sample", + originFullName: "otlpprofiles.Label", + fields: []baseField{ + &primitiveField{ + fieldName: "Key", + returnType: "int64", + defaultVal: "int64(0)", + testVal: "int64(1)", + }, + &primitiveField{ + fieldName: "Str", + returnType: "int64", + defaultVal: "int64(0)", + testVal: "int64(1)", + }, + &primitiveField{ + fieldName: "Num", + returnType: "int64", + defaultVal: "int64(0)", + testVal: "int64(1)", + }, + &primitiveField{ + fieldName: "NumUnit", + returnType: "int64", + defaultVal: "int64(0)", + testVal: "int64(1)", + }, + }, +} + +var mappingSlice = &sliceOfValues{ + structName: "MappingSlice", + element: mapping, +} + +var mapping = &messageValueStruct{ + structName: "Mapping", + description: "// Mapping describes the mapping of a binary in memory, including its address range, file offset, and metadata like build ID", + originFullName: "otlpprofiles.Mapping", + fields: []baseField{ + &primitiveField{ + fieldName: "ID", + originFieldName: "Id", + returnType: "uint64", + defaultVal: "uint64(0)", + testVal: "uint64(1)", + }, + &primitiveField{ + fieldName: "MemoryStart", + returnType: "uint64", + defaultVal: "uint64(0)", + testVal: "uint64(1)", + }, + &primitiveField{ + fieldName: "MemoryLimit", + returnType: "uint64", + defaultVal: "uint64(0)", + testVal: "uint64(1)", + }, + &primitiveField{ + fieldName: "FileOffset", + returnType: "uint64", + defaultVal: "uint64(0)", + testVal: "uint64(1)", + }, + &primitiveField{ + fieldName: "Filename", + returnType: "int64", + defaultVal: "int64(0)", + testVal: "int64(1)", + }, + &primitiveField{ + fieldName: "BuildID", + originFieldName: "BuildId", + returnType: "int64", + defaultVal: "int64(0)", + testVal: "int64(1)", + }, + &primitiveField{ + fieldName: "BuildIDKind", + originFieldName: "BuildIdKind", + returnType: "otlpprofiles.BuildIdKind", + defaultVal: "otlpprofiles.BuildIdKind(0)", + testVal: "otlpprofiles.BuildIdKind(1)", + }, + &sliceField{ + fieldName: "Attributes", + returnSlice: uInt64Slice, + }, + &primitiveField{ + fieldName: "HasFunctions", + returnType: "bool", + defaultVal: "false", + testVal: "true", + }, + &primitiveField{ + fieldName: "HasFilenames", + returnType: "bool", + defaultVal: "false", + testVal: "true", + }, + &primitiveField{ + fieldName: "HasLineNumbers", + returnType: "bool", + defaultVal: "false", + testVal: "true", + }, + &primitiveField{ + fieldName: "HasInlineFrames", + returnType: "bool", + defaultVal: "false", + testVal: "true", + }, + }, +} + +var locationSlice = &sliceOfValues{ + structName: "LocationSlice", + element: location, +} +var location = &messageValueStruct{ + structName: "Location", + description: "// Location describes function and line table debug information.", + originFullName: "otlpprofiles.Location", + fields: []baseField{ + &primitiveField{ + fieldName: "ID", + originFieldName: "Id", + returnType: "uint64", + defaultVal: "uint64(0)", + testVal: "uint64(1)", + }, + &primitiveField{ + fieldName: "MappingIndex", + returnType: "uint64", + defaultVal: "uint64(0)", + testVal: "uint64(1)", + }, + &primitiveField{ + fieldName: "Address", + returnType: "uint64", + defaultVal: "uint64(0)", + testVal: "uint64(1)", + }, + &sliceField{ + fieldName: "Line", + returnSlice: lineSlice, + }, + &primitiveField{ + fieldName: "IsFolded", + returnType: "bool", + defaultVal: "false", + testVal: "true", + }, + &primitiveField{ + fieldName: "TypeIndex", + returnType: "uint32", + defaultVal: "uint32(0)", + testVal: "uint32(1)", + }, + &sliceField{ + fieldName: "Attributes", + returnSlice: uInt64Slice, + }, + }, +} + +var lineSlice = &sliceOfValues{ + structName: "LineSlice", + element: line, +} + +var line = &messageValueStruct{ + structName: "Line", + description: "// Line details a specific line in a source code, linked to a function.", + originFullName: "otlpprofiles.Line", + fields: []baseField{ + &primitiveField{ + fieldName: "FunctionIndex", + returnType: "uint64", + defaultVal: "uint64(0)", + testVal: "uint64(1)", + }, + &primitiveField{ + fieldName: "Line", + returnType: "int64", + defaultVal: "int64(0)", + testVal: "int64(1)", + }, + &primitiveField{ + fieldName: "Column", + returnType: "int64", + defaultVal: "int64(0)", + testVal: "int64(1)", + }, + }, +} + +var functionSlice = &sliceOfValues{ + structName: "FunctionSlice", + element: function, +} + +var function = &messageValueStruct{ + structName: "Function", + description: "// Function describes a function, including its human-readable name, system name, source file, and starting line number in the source.", + originFullName: "otlpprofiles.Function", + fields: []baseField{ + &primitiveField{ + fieldName: "ID", + originFieldName: "Id", + returnType: "uint64", + defaultVal: "uint64(0)", + testVal: "uint64(1)", + }, + &primitiveField{ + fieldName: "Name", + returnType: "int64", + defaultVal: "int64(0)", + testVal: "int64(1)", + }, + &primitiveField{ + fieldName: "SystemName", + returnType: "int64", + defaultVal: "int64(0)", + testVal: "int64(1)", + }, + &primitiveField{ + fieldName: "Filename", + returnType: "int64", + defaultVal: "int64(0)", + testVal: "int64(1)", + }, + &primitiveField{ + fieldName: "StartLine", + returnType: "int64", + defaultVal: "int64(0)", + testVal: "int64(1)", + }, + }, +} + +var attributeUnitSlice = &sliceOfValues{ + structName: "AttributeUnitSlice", + element: attributeUnit, +} + +var attributeUnit = &messageValueStruct{ + structName: "AttributeUnit", + description: "// AttributeUnit Represents a mapping between Attribute Keys and Units.", + originFullName: "otlpprofiles.AttributeUnit", + fields: []baseField{ + &primitiveField{ + fieldName: "AttributeKey", + returnType: "int64", + defaultVal: "int64(0)", + testVal: "int64(1)", + }, + &primitiveField{ + fieldName: "Unit", + returnType: "int64", + defaultVal: "int64(0)", + testVal: "int64(1)", + }, + }, +} + +var linkSlice = &sliceOfValues{ + structName: "LinkSlice", + element: link, +} + +var link = &messageValueStruct{ + structName: "Link", + description: "// Link represents a pointer from a profile Sample to a trace Span.", + originFullName: "otlpprofiles.Link", + fields: []baseField{ + traceIDField, + spanIDField, + }, +} diff --git a/pdata/internal/cmd/pdatagen/internal/primitive_slice_structs.go b/pdata/internal/cmd/pdatagen/internal/primitive_slice_structs.go index 6428e545c52..73e5a3a45e9 100644 --- a/pdata/internal/cmd/pdatagen/internal/primitive_slice_structs.go +++ b/pdata/internal/cmd/pdatagen/internal/primitive_slice_structs.go @@ -80,13 +80,13 @@ func (ms {{ .structName }}) EnsureCapacity(newCap int) { } // Append appends extra elements to {{ .structName }}. -// Equivalent of {{ .lowerStructName }} = append({{ .lowerStructName }}, elms...) +// Equivalent of {{ .lowerStructName }} = append({{ .lowerStructName }}, elms...) func (ms {{ .structName }}) Append(elms ...{{ .itemType }}) { ms.getState().AssertMutable() *ms.getOrig() = append(*ms.getOrig(), elms...) } -// MoveTo moves all elements from the current slice overriding the destination and +// MoveTo moves all elements from the current slice overriding the destination and // resetting the current instance to its zero value. func (ms {{ .structName }}) MoveTo(dest {{ .structName }}) { ms.getState().AssertMutable() @@ -109,42 +109,42 @@ func copy{{ .structName }}(dst, src []{{ .itemType }}) []{{ .itemType }} { const immutableSliceTestTemplate = `func TestNew{{ .structName }}(t *testing.T) { ms := New{{ .structName }}() assert.Equal(t, 0, ms.Len()) - ms.FromRaw([]{{ .itemType }}{1, 2, 3}) + ms.FromRaw([]{{ .itemType }}{ {{ .testOrigVal }} }) assert.Equal(t, 3, ms.Len()) - assert.Equal(t, []{{ .itemType }}{1, 2, 3}, ms.AsRaw()) - ms.SetAt(1, {{ .itemType }}(5)) - assert.Equal(t, []{{ .itemType }}{1, 5, 3}, ms.AsRaw()) - ms.FromRaw([]{{ .itemType }}{3}) + assert.Equal(t, []{{ .itemType }}{ {{ .testOrigVal }} }, ms.AsRaw()) + ms.SetAt(1, {{ .itemType }}( {{ .testSetVal }} )) + assert.Equal(t, []{{ .itemType }}{ {{ .testNewVal }} }, ms.AsRaw()) + ms.FromRaw([]{{ .itemType }}{ {{ index .testInterfaceOrigVal 2 }} }) assert.Equal(t, 1, ms.Len()) - assert.Equal(t, {{ .itemType }}(3), ms.At(0)) - + assert.Equal(t, {{ .itemType }}( {{ index .testInterfaceOrigVal 2 }} ), ms.At(0)) + cp := New{{ .structName }}() ms.CopyTo(cp) - ms.SetAt(0, {{ .itemType }}(2)) - assert.Equal(t, {{ .itemType }}(2), ms.At(0)) - assert.Equal(t, {{ .itemType }}(3), cp.At(0)) + ms.SetAt(0, {{ .itemType }}( {{ index .testInterfaceOrigVal 1 }} )) + assert.Equal(t, {{ .itemType }}( {{ index .testInterfaceOrigVal 1 }} ), ms.At(0)) + assert.Equal(t, {{ .itemType }}({{ index .testInterfaceOrigVal 2 }}), cp.At(0)) ms.CopyTo(cp) - assert.Equal(t, {{ .itemType }}(2), cp.At(0)) - + assert.Equal(t, {{ .itemType }}({{ index .testInterfaceOrigVal 1 }}), cp.At(0)) + mv := New{{ .structName }}() ms.MoveTo(mv) assert.Equal(t, 0, ms.Len()) assert.Equal(t, 1, mv.Len()) - assert.Equal(t, {{ .itemType }}(2), mv.At(0)) - ms.FromRaw([]{{ .itemType }}{1, 2, 3}) + assert.Equal(t, {{ .itemType }}({{ index .testInterfaceOrigVal 1 }}), mv.At(0)) + ms.FromRaw([]{{ .itemType }}{ {{ .testOrigVal }} }) ms.MoveTo(mv) assert.Equal(t, 3, mv.Len()) - assert.Equal(t, {{ .itemType }}(1), mv.At(0)) + assert.Equal(t, {{ .itemType }}({{ index .testInterfaceOrigVal 0 }}), mv.At(0)) } func Test{{ .structName }}ReadOnly(t *testing.T) { - raw := []{{ .itemType }}{1, 2, 3} + raw := []{{ .itemType }}{ {{ .testOrigVal }}} state := internal.StateReadOnly ms := {{ .structName }}(internal.New{{ .structName }}(&raw, &state)) assert.Equal(t, 3, ms.Len()) - assert.Equal(t, {{ .itemType }}(1), ms.At(0)) - assert.Panics(t, func() { ms.Append(1) }) + assert.Equal(t, {{ .itemType }}({{ index .testInterfaceOrigVal 0 }}), ms.At(0)) + assert.Panics(t, func() { ms.Append({{ index .testInterfaceOrigVal 0 }}) }) assert.Panics(t, func() { ms.EnsureCapacity(2) }) assert.Equal(t, raw, ms.AsRaw()) assert.Panics(t, func() { ms.FromRaw(raw) }) @@ -153,17 +153,17 @@ func Test{{ .structName }}ReadOnly(t *testing.T) { ms.CopyTo(ms2) assert.Equal(t, ms.AsRaw(), ms2.AsRaw()) assert.Panics(t, func() { ms2.CopyTo(ms) }) - + assert.Panics(t, func() { ms.MoveTo(ms2) }) assert.Panics(t, func() { ms2.MoveTo(ms) }) } func Test{{ .structName }}Append(t *testing.T) { ms := New{{ .structName }}() - ms.FromRaw([]{{ .itemType }}{1, 2, 3}) - ms.Append(4, 5) + ms.FromRaw([]{{ .itemType }}{ {{ .testOrigVal }} }) + ms.Append({{ .testSetVal }}, {{ .testSetVal }}) assert.Equal(t, 5, ms.Len()) - assert.Equal(t, {{ .itemType }}(5), ms.At(4)) + assert.Equal(t, {{ .itemType }}({{ .testSetVal }}), ms.At(4)) } func Test{{ .structName }}EnsureCapacity(t *testing.T) { @@ -190,6 +190,16 @@ func Get{{ .structName }}State(ms {{ .structName }}) *State { func New{{ .structName }}(orig *[]{{ .itemType }}, state *State) {{ .structName }} { return {{ .structName }}{orig: orig, state: state} +} + +func FillTest{{ .structName }}(tv {{ .structName}}) { +} + +func GenerateTest{{ .structName }}() {{ .structName }} { + state := StateMutable + var orig []{{ .itemType }} = nil + + return {{ .structName }}{&orig, &state} }` // primitiveSliceStruct generates a struct for a slice of primitive value elements. The structs are always generated @@ -198,6 +208,11 @@ type primitiveSliceStruct struct { structName string packageName string itemType string + + testOrigVal string + testInterfaceOrigVal []interface{} + testSetVal string + testNewVal string } func (iss *primitiveSliceStruct) getName() string { @@ -233,8 +248,12 @@ func (iss *primitiveSliceStruct) generateInternal(sb *bytes.Buffer) { func (iss *primitiveSliceStruct) templateFields() map[string]any { return map[string]any{ - "structName": iss.structName, - "itemType": iss.itemType, - "lowerStructName": strings.ToLower(iss.structName[:1]) + iss.structName[1:], + "structName": iss.structName, + "itemType": iss.itemType, + "lowerStructName": strings.ToLower(iss.structName[:1]) + iss.structName[1:], + "testOrigVal": iss.testOrigVal, + "testInterfaceOrigVal": iss.testInterfaceOrigVal, + "testSetVal": iss.testSetVal, + "testNewVal": iss.testNewVal, } } diff --git a/pdata/internal/data/protogen/collector/profiles/v1experimental/profiles_service.pb.go b/pdata/internal/data/protogen/collector/profiles/v1experimental/profiles_service.pb.go new file mode 100644 index 00000000000..f998cd3f8c5 --- /dev/null +++ b/pdata/internal/data/protogen/collector/profiles/v1experimental/profiles_service.pb.go @@ -0,0 +1,845 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: opentelemetry/proto/collector/profiles/v1experimental/profiles_service.proto + +package v1experimental + +import ( + context "context" + fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + + v1experimental "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type ExportProfilesServiceRequest struct { + // An array of ResourceProfiles. + // For data coming from a single resource this array will typically contain one + // element. Intermediary nodes (such as OpenTelemetry Collector) that receive + // data from multiple origins typically batch the data before forwarding further and + // in that case this array will contain multiple elements. + ResourceProfiles []*v1experimental.ResourceProfiles `protobuf:"bytes,1,rep,name=resource_profiles,json=resourceProfiles,proto3" json:"resource_profiles,omitempty"` +} + +func (m *ExportProfilesServiceRequest) Reset() { *m = ExportProfilesServiceRequest{} } +func (m *ExportProfilesServiceRequest) String() string { return proto.CompactTextString(m) } +func (*ExportProfilesServiceRequest) ProtoMessage() {} +func (*ExportProfilesServiceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_3d903b74e05b443d, []int{0} +} +func (m *ExportProfilesServiceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExportProfilesServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExportProfilesServiceRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ExportProfilesServiceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExportProfilesServiceRequest.Merge(m, src) +} +func (m *ExportProfilesServiceRequest) XXX_Size() int { + return m.Size() +} +func (m *ExportProfilesServiceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ExportProfilesServiceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ExportProfilesServiceRequest proto.InternalMessageInfo + +func (m *ExportProfilesServiceRequest) GetResourceProfiles() []*v1experimental.ResourceProfiles { + if m != nil { + return m.ResourceProfiles + } + return nil +} + +type ExportProfilesServiceResponse struct { + // The details of a partially successful export request. + // + // If the request is only partially accepted + // (i.e. when the server accepts only parts of the data and rejects the rest) + // the server MUST initialize the `partial_success` field and MUST + // set the `rejected_` with the number of items it rejected. + // + // Servers MAY also make use of the `partial_success` field to convey + // warnings/suggestions to senders even when the request was fully accepted. + // In such cases, the `rejected_` MUST have a value of `0` and + // the `error_message` MUST be non-empty. + // + // A `partial_success` message with an empty value (rejected_ = 0 and + // `error_message` = "") is equivalent to it not being set/present. Senders + // SHOULD interpret it the same way as in the full success case. + PartialSuccess ExportProfilesPartialSuccess `protobuf:"bytes,1,opt,name=partial_success,json=partialSuccess,proto3" json:"partial_success"` +} + +func (m *ExportProfilesServiceResponse) Reset() { *m = ExportProfilesServiceResponse{} } +func (m *ExportProfilesServiceResponse) String() string { return proto.CompactTextString(m) } +func (*ExportProfilesServiceResponse) ProtoMessage() {} +func (*ExportProfilesServiceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_3d903b74e05b443d, []int{1} +} +func (m *ExportProfilesServiceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExportProfilesServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExportProfilesServiceResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ExportProfilesServiceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExportProfilesServiceResponse.Merge(m, src) +} +func (m *ExportProfilesServiceResponse) XXX_Size() int { + return m.Size() +} +func (m *ExportProfilesServiceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ExportProfilesServiceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ExportProfilesServiceResponse proto.InternalMessageInfo + +func (m *ExportProfilesServiceResponse) GetPartialSuccess() ExportProfilesPartialSuccess { + if m != nil { + return m.PartialSuccess + } + return ExportProfilesPartialSuccess{} +} + +type ExportProfilesPartialSuccess struct { + // The number of rejected profiles. + // + // A `rejected_` field holding a `0` value indicates that the + // request was fully accepted. + RejectedProfiles int64 `protobuf:"varint,1,opt,name=rejected_profiles,json=rejectedProfiles,proto3" json:"rejected_profiles,omitempty"` + // A developer-facing human-readable message in English. It should be used + // either to explain why the server rejected parts of the data during a partial + // success or to convey warnings/suggestions during a full success. The message + // should offer guidance on how users can address such issues. + // + // error_message is an optional field. An error_message with an empty value + // is equivalent to it not being set. + ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` +} + +func (m *ExportProfilesPartialSuccess) Reset() { *m = ExportProfilesPartialSuccess{} } +func (m *ExportProfilesPartialSuccess) String() string { return proto.CompactTextString(m) } +func (*ExportProfilesPartialSuccess) ProtoMessage() {} +func (*ExportProfilesPartialSuccess) Descriptor() ([]byte, []int) { + return fileDescriptor_3d903b74e05b443d, []int{2} +} +func (m *ExportProfilesPartialSuccess) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExportProfilesPartialSuccess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExportProfilesPartialSuccess.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ExportProfilesPartialSuccess) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExportProfilesPartialSuccess.Merge(m, src) +} +func (m *ExportProfilesPartialSuccess) XXX_Size() int { + return m.Size() +} +func (m *ExportProfilesPartialSuccess) XXX_DiscardUnknown() { + xxx_messageInfo_ExportProfilesPartialSuccess.DiscardUnknown(m) +} + +var xxx_messageInfo_ExportProfilesPartialSuccess proto.InternalMessageInfo + +func (m *ExportProfilesPartialSuccess) GetRejectedProfiles() int64 { + if m != nil { + return m.RejectedProfiles + } + return 0 +} + +func (m *ExportProfilesPartialSuccess) GetErrorMessage() string { + if m != nil { + return m.ErrorMessage + } + return "" +} + +func init() { + proto.RegisterType((*ExportProfilesServiceRequest)(nil), "opentelemetry.proto.collector.profiles.v1experimental.ExportProfilesServiceRequest") + proto.RegisterType((*ExportProfilesServiceResponse)(nil), "opentelemetry.proto.collector.profiles.v1experimental.ExportProfilesServiceResponse") + proto.RegisterType((*ExportProfilesPartialSuccess)(nil), "opentelemetry.proto.collector.profiles.v1experimental.ExportProfilesPartialSuccess") +} + +func init() { + proto.RegisterFile("opentelemetry/proto/collector/profiles/v1experimental/profiles_service.proto", fileDescriptor_3d903b74e05b443d) +} + +var fileDescriptor_3d903b74e05b443d = []byte{ + // 437 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0x3f, 0xcb, 0xd3, 0x40, + 0x18, 0xcf, 0xf5, 0x95, 0x17, 0xbc, 0xaa, 0xd5, 0xd0, 0xa1, 0x14, 0x8d, 0x25, 0x2e, 0x01, 0xe1, + 0x42, 0x2b, 0x05, 0x11, 0x5c, 0x2a, 0xdd, 0x14, 0x43, 0x5a, 0x1c, 0x44, 0x08, 0x31, 0x7d, 0x0c, + 0x29, 0x69, 0xee, 0xbc, 0xbb, 0x96, 0xba, 0x89, 0xa3, 0x93, 0x1f, 0xc2, 0xc9, 0xdd, 0xef, 0x50, + 0xb7, 0x8e, 0x4e, 0x22, 0xed, 0x17, 0x79, 0x49, 0xae, 0x09, 0x4d, 0x68, 0x29, 0x94, 0x6e, 0x77, + 0xbf, 0xe3, 0xf7, 0xe7, 0xf9, 0x1d, 0x0f, 0x7e, 0x4d, 0x19, 0x24, 0x12, 0x62, 0x98, 0x81, 0xe4, + 0x5f, 0x6c, 0xc6, 0xa9, 0xa4, 0x76, 0x40, 0xe3, 0x18, 0x02, 0x49, 0x79, 0x7a, 0xff, 0x14, 0xc5, + 0x20, 0xec, 0x45, 0x17, 0x96, 0x0c, 0x78, 0x34, 0x83, 0x44, 0xfa, 0x71, 0x81, 0x7b, 0x02, 0xf8, + 0x22, 0x0a, 0x80, 0x64, 0x44, 0xbd, 0x5f, 0x52, 0x53, 0x20, 0x29, 0xd4, 0x48, 0xce, 0x22, 0x65, + 0xb5, 0x76, 0x33, 0xa4, 0x21, 0x55, 0xd6, 0xe9, 0x49, 0xf1, 0xda, 0x2f, 0x0e, 0x45, 0x3b, 0x15, + 0x48, 0x71, 0xcd, 0xef, 0x08, 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x8f, 0xad, 0xa1, 0xad, + 0xb7, 0x86, 0xf6, 0x77, 0x6b, 0x68, 0xf8, 0x79, 0x44, 0xcf, 0x33, 0x1d, 0x34, 0x2b, 0x7e, 0x4e, + 0xca, 0x73, 0xd0, 0xfb, 0x0f, 0x61, 0x55, 0x31, 0x2a, 0x6d, 0xed, 0xc4, 0x97, 0xbe, 0x1d, 0x25, + 0x12, 0x78, 0xe2, 0xc7, 0x76, 0x76, 0xcb, 0x2c, 0x43, 0x48, 0x4e, 0x2f, 0xf7, 0xaf, 0x5a, 0xff, + 0x2d, 0x83, 0x64, 0x5c, 0x68, 0x67, 0xae, 0xe4, 0x55, 0x91, 0x36, 0x0f, 0x45, 0xde, 0x75, 0x87, + 0x7b, 0xbc, 0x8f, 0xd7, 0x99, 0xc7, 0xb3, 0x9b, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8e, 0x3d, 0x57, + 0xb0, 0x54, 0x04, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// ProfilesServiceClient is the client API for ProfilesService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ProfilesServiceClient interface { + // For performance reasons, it is recommended to keep this RPC + // alive for the entire life of the application. + Export(ctx context.Context, in *ExportProfilesServiceRequest, opts ...grpc.CallOption) (*ExportProfilesServiceResponse, error) +} + +type profilesServiceClient struct { + cc *grpc.ClientConn +} + +func NewProfilesServiceClient(cc *grpc.ClientConn) ProfilesServiceClient { + return &profilesServiceClient{cc} +} + +func (c *profilesServiceClient) Export(ctx context.Context, in *ExportProfilesServiceRequest, opts ...grpc.CallOption) (*ExportProfilesServiceResponse, error) { + out := new(ExportProfilesServiceResponse) + err := c.cc.Invoke(ctx, "/opentelemetry.proto.collector.profiles.v1experimental.ProfilesService/Export", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ProfilesServiceServer is the server API for ProfilesService service. +type ProfilesServiceServer interface { + // For performance reasons, it is recommended to keep this RPC + // alive for the entire life of the application. + Export(context.Context, *ExportProfilesServiceRequest) (*ExportProfilesServiceResponse, error) +} + +// UnimplementedProfilesServiceServer can be embedded to have forward compatible implementations. +type UnimplementedProfilesServiceServer struct { +} + +func (*UnimplementedProfilesServiceServer) Export(ctx context.Context, req *ExportProfilesServiceRequest) (*ExportProfilesServiceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Export not implemented") +} + +func RegisterProfilesServiceServer(s *grpc.Server, srv ProfilesServiceServer) { + s.RegisterService(&_ProfilesService_serviceDesc, srv) +} + +func _ProfilesService_Export_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExportProfilesServiceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProfilesServiceServer).Export(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/opentelemetry.proto.collector.profiles.v1experimental.ProfilesService/Export", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProfilesServiceServer).Export(ctx, req.(*ExportProfilesServiceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _ProfilesService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "opentelemetry.proto.collector.profiles.v1experimental.ProfilesService", + HandlerType: (*ProfilesServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Export", + Handler: _ProfilesService_Export_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "opentelemetry/proto/collector/profiles/v1experimental/profiles_service.proto", +} + +func (m *ExportProfilesServiceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExportProfilesServiceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExportProfilesServiceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ResourceProfiles) > 0 { + for iNdEx := len(m.ResourceProfiles) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ResourceProfiles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProfilesService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ExportProfilesServiceResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExportProfilesServiceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExportProfilesServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.PartialSuccess.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProfilesService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ExportProfilesPartialSuccess) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExportProfilesPartialSuccess) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExportProfilesPartialSuccess) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ErrorMessage) > 0 { + i -= len(m.ErrorMessage) + copy(dAtA[i:], m.ErrorMessage) + i = encodeVarintProfilesService(dAtA, i, uint64(len(m.ErrorMessage))) + i-- + dAtA[i] = 0x12 + } + if m.RejectedProfiles != 0 { + i = encodeVarintProfilesService(dAtA, i, uint64(m.RejectedProfiles)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintProfilesService(dAtA []byte, offset int, v uint64) int { + offset -= sovProfilesService(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ExportProfilesServiceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ResourceProfiles) > 0 { + for _, e := range m.ResourceProfiles { + l = e.Size() + n += 1 + l + sovProfilesService(uint64(l)) + } + } + return n +} + +func (m *ExportProfilesServiceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.PartialSuccess.Size() + n += 1 + l + sovProfilesService(uint64(l)) + return n +} + +func (m *ExportProfilesPartialSuccess) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RejectedProfiles != 0 { + n += 1 + sovProfilesService(uint64(m.RejectedProfiles)) + } + l = len(m.ErrorMessage) + if l > 0 { + n += 1 + l + sovProfilesService(uint64(l)) + } + return n +} + +func sovProfilesService(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozProfilesService(x uint64) (n int) { + return sovProfilesService(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ExportProfilesServiceRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfilesService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExportProfilesServiceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExportProfilesServiceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceProfiles", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfilesService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProfilesService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProfilesService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceProfiles = append(m.ResourceProfiles, &v1experimental.ResourceProfiles{}) + if err := m.ResourceProfiles[len(m.ResourceProfiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProfilesService(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProfilesService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExportProfilesServiceResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfilesService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExportProfilesServiceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExportProfilesServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PartialSuccess", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfilesService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProfilesService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProfilesService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.PartialSuccess.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProfilesService(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProfilesService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExportProfilesPartialSuccess) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfilesService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExportProfilesPartialSuccess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExportProfilesPartialSuccess: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RejectedProfiles", wireType) + } + m.RejectedProfiles = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfilesService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RejectedProfiles |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ErrorMessage", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfilesService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProfilesService + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProfilesService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ErrorMessage = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProfilesService(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProfilesService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProfilesService(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProfilesService + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProfilesService + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProfilesService + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthProfilesService + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupProfilesService + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthProfilesService + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthProfilesService = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProfilesService = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupProfilesService = fmt.Errorf("proto: unexpected end of group") +) diff --git a/pdata/internal/data/protogen/profiles/v1experimental/pprofextended.pb.go b/pdata/internal/data/protogen/profiles/v1experimental/pprofextended.pb.go new file mode 100644 index 00000000000..64c91b3221e --- /dev/null +++ b/pdata/internal/data/protogen/profiles/v1experimental/pprofextended.pb.go @@ -0,0 +1,4919 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: opentelemetry/proto/profiles/v1experimental/pprofextended.proto + +package v1experimental + +import ( + fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + + go_opentelemetry_io_collector_pdata_internal_data "go.opentelemetry.io/collector/pdata/internal/data" + v1 "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Specifies the method of aggregating metric values, either DELTA (change since last report) +// or CUMULATIVE (total since a fixed start time). +type AggregationTemporality int32 + +const ( + // UNSPECIFIED is the default AggregationTemporality, it MUST not be used. + AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED AggregationTemporality = 0 + //* DELTA is an AggregationTemporality for a profiler which reports + //changes since last report time. Successive metrics contain aggregation of + //values from continuous and non-overlapping intervals. + // + //The values for a DELTA metric are based only on the time interval + //associated with one measurement cycle. There is no dependency on + //previous measurements like is the case for CUMULATIVE metrics. + // + //For example, consider a system measuring the number of requests that + //it receives and reports the sum of these requests every second as a + //DELTA metric: + // + //1. The system starts receiving at time=t_0. + //2. A request is received, the system measures 1 request. + //3. A request is received, the system measures 1 request. + //4. A request is received, the system measures 1 request. + //5. The 1 second collection cycle ends. A metric is exported for the + //number of requests received over the interval of time t_0 to + //t_0+1 with a value of 3. + //6. A request is received, the system measures 1 request. + //7. A request is received, the system measures 1 request. + //8. The 1 second collection cycle ends. A metric is exported for the + //number of requests received over the interval of time t_0+1 to + //t_0+2 with a value of 2. + AggregationTemporality_AGGREGATION_TEMPORALITY_DELTA AggregationTemporality = 1 + //* CUMULATIVE is an AggregationTemporality for a profiler which + //reports changes since a fixed start time. This means that current values + //of a CUMULATIVE metric depend on all previous measurements since the + //start time. Because of this, the sender is required to retain this state + //in some form. If this state is lost or invalidated, the CUMULATIVE metric + //values MUST be reset and a new fixed start time following the last + //reported measurement time sent MUST be used. + // + //For example, consider a system measuring the number of requests that + //it receives and reports the sum of these requests every second as a + //CUMULATIVE metric: + // + //1. The system starts receiving at time=t_0. + //2. A request is received, the system measures 1 request. + //3. A request is received, the system measures 1 request. + //4. A request is received, the system measures 1 request. + //5. The 1 second collection cycle ends. A metric is exported for the + //number of requests received over the interval of time t_0 to + //t_0+1 with a value of 3. + //6. A request is received, the system measures 1 request. + //7. A request is received, the system measures 1 request. + //8. The 1 second collection cycle ends. A metric is exported for the + //number of requests received over the interval of time t_0 to + //t_0+2 with a value of 5. + //9. The system experiences a fault and loses state. + //10. The system recovers and resumes receiving at time=t_1. + //11. A request is received, the system measures 1 request. + //12. The 1 second collection cycle ends. A metric is exported for the + //number of requests received over the interval of time t_1 to + //t_0+1 with a value of 1. + // + //Note: Even though, when reporting changes since last report time, using + //CUMULATIVE is valid, it is not recommended. + AggregationTemporality_AGGREGATION_TEMPORALITY_CUMULATIVE AggregationTemporality = 2 +) + +var AggregationTemporality_name = map[int32]string{ + 0: "AGGREGATION_TEMPORALITY_UNSPECIFIED", + 1: "AGGREGATION_TEMPORALITY_DELTA", + 2: "AGGREGATION_TEMPORALITY_CUMULATIVE", +} + +var AggregationTemporality_value = map[string]int32{ + "AGGREGATION_TEMPORALITY_UNSPECIFIED": 0, + "AGGREGATION_TEMPORALITY_DELTA": 1, + "AGGREGATION_TEMPORALITY_CUMULATIVE": 2, +} + +func (x AggregationTemporality) String() string { + return proto.EnumName(AggregationTemporality_name, int32(x)) +} + +func (AggregationTemporality) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_05f9ce3fdbeb046f, []int{0} +} + +// Indicates the semantics of the build_id field. +type BuildIdKind int32 + +const ( + // Linker-generated build ID, stored in the ELF binary notes. + BuildIdKind_BUILD_ID_LINKER BuildIdKind = 0 + // Build ID based on the content hash of the binary. Currently no particular + // hashing approach is standardized, so a given producer needs to define it + // themselves and thus unlike BUILD_ID_LINKER this kind of hash is producer-specific. + // We may choose to provide a standardized stable hash recommendation later. + BuildIdKind_BUILD_ID_BINARY_HASH BuildIdKind = 1 +) + +var BuildIdKind_name = map[int32]string{ + 0: "BUILD_ID_LINKER", + 1: "BUILD_ID_BINARY_HASH", +} + +var BuildIdKind_value = map[string]int32{ + "BUILD_ID_LINKER": 0, + "BUILD_ID_BINARY_HASH": 1, +} + +func (x BuildIdKind) String() string { + return proto.EnumName(BuildIdKind_name, int32(x)) +} + +func (BuildIdKind) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_05f9ce3fdbeb046f, []int{1} +} + +// Represents a complete profile, including sample types, samples, +// mappings to binaries, locations, functions, string table, and additional metadata. +type Profile struct { + // A description of the samples associated with each Sample.value. + // For a cpu profile this might be: + // [["cpu","nanoseconds"]] or [["wall","seconds"]] or [["syscall","count"]] + // For a heap profile, this might be: + // [["allocations","count"], ["space","bytes"]], + // If one of the values represents the number of events represented + // by the sample, by convention it should be at index 0 and use + // sample_type.unit == "count". + SampleType []ValueType `protobuf:"bytes,1,rep,name=sample_type,json=sampleType,proto3" json:"sample_type"` + // The set of samples recorded in this profile. + Sample []Sample `protobuf:"bytes,2,rep,name=sample,proto3" json:"sample"` + // Mapping from address ranges to the image/binary/library mapped + // into that address range. mapping[0] will be the main binary. + Mapping []Mapping `protobuf:"bytes,3,rep,name=mapping,proto3" json:"mapping"` + // Locations referenced by samples via location_indices. + Location []Location `protobuf:"bytes,4,rep,name=location,proto3" json:"location"` + // Array of locations referenced by samples. + LocationIndices []int64 `protobuf:"varint,15,rep,packed,name=location_indices,json=locationIndices,proto3" json:"location_indices,omitempty"` + // Functions referenced by locations. + Function []Function `protobuf:"bytes,5,rep,name=function,proto3" json:"function"` + // Lookup table for attributes. + AttributeTable []v1.KeyValue `protobuf:"bytes,16,rep,name=attribute_table,json=attributeTable,proto3" json:"attribute_table"` + // Represents a mapping between Attribute Keys and Units. + AttributeUnits []AttributeUnit `protobuf:"bytes,17,rep,name=attribute_units,json=attributeUnits,proto3" json:"attribute_units"` + // Lookup table for links. + LinkTable []Link `protobuf:"bytes,18,rep,name=link_table,json=linkTable,proto3" json:"link_table"` + // A common table for strings referenced by various messages. + // string_table[0] must always be "". + StringTable []string `protobuf:"bytes,6,rep,name=string_table,json=stringTable,proto3" json:"string_table,omitempty"` + // frames with Function.function_name fully matching the following + // regexp will be dropped from the samples, along with their successors. + DropFrames int64 `protobuf:"varint,7,opt,name=drop_frames,json=dropFrames,proto3" json:"drop_frames,omitempty"` + // frames with Function.function_name fully matching the following + // regexp will be kept, even if it matches drop_frames. + KeepFrames int64 `protobuf:"varint,8,opt,name=keep_frames,json=keepFrames,proto3" json:"keep_frames,omitempty"` + // Time of collection (UTC) represented as nanoseconds past the epoch. + TimeNanos int64 `protobuf:"varint,9,opt,name=time_nanos,json=timeNanos,proto3" json:"time_nanos,omitempty"` + // Duration of the profile, if a duration makes sense. + DurationNanos int64 `protobuf:"varint,10,opt,name=duration_nanos,json=durationNanos,proto3" json:"duration_nanos,omitempty"` + // The kind of events between sampled occurrences. + // e.g [ "cpu","cycles" ] or [ "heap","bytes" ] + PeriodType ValueType `protobuf:"bytes,11,opt,name=period_type,json=periodType,proto3" json:"period_type"` + // The number of events between sampled occurrences. + Period int64 `protobuf:"varint,12,opt,name=period,proto3" json:"period,omitempty"` + // Free-form text associated with the profile. The text is displayed as is + // to the user by the tools that read profiles (e.g. by pprof). This field + // should not be used to store any machine-readable information, it is only + // for human-friendly content. The profile must stay functional if this field + // is cleaned. + Comment []int64 `protobuf:"varint,13,rep,packed,name=comment,proto3" json:"comment,omitempty"` + // Index into the string table of the type of the preferred sample + // value. If unset, clients should default to the last sample value. + DefaultSampleType int64 `protobuf:"varint,14,opt,name=default_sample_type,json=defaultSampleType,proto3" json:"default_sample_type,omitempty"` +} + +func (m *Profile) Reset() { *m = Profile{} } +func (m *Profile) String() string { return proto.CompactTextString(m) } +func (*Profile) ProtoMessage() {} +func (*Profile) Descriptor() ([]byte, []int) { + return fileDescriptor_05f9ce3fdbeb046f, []int{0} +} +func (m *Profile) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Profile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Profile.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Profile) XXX_Merge(src proto.Message) { + xxx_messageInfo_Profile.Merge(m, src) +} +func (m *Profile) XXX_Size() int { + return m.Size() +} +func (m *Profile) XXX_DiscardUnknown() { + xxx_messageInfo_Profile.DiscardUnknown(m) +} + +var xxx_messageInfo_Profile proto.InternalMessageInfo + +func (m *Profile) GetSampleType() []ValueType { + if m != nil { + return m.SampleType + } + return nil +} + +func (m *Profile) GetSample() []Sample { + if m != nil { + return m.Sample + } + return nil +} + +func (m *Profile) GetMapping() []Mapping { + if m != nil { + return m.Mapping + } + return nil +} + +func (m *Profile) GetLocation() []Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *Profile) GetLocationIndices() []int64 { + if m != nil { + return m.LocationIndices + } + return nil +} + +func (m *Profile) GetFunction() []Function { + if m != nil { + return m.Function + } + return nil +} + +func (m *Profile) GetAttributeTable() []v1.KeyValue { + if m != nil { + return m.AttributeTable + } + return nil +} + +func (m *Profile) GetAttributeUnits() []AttributeUnit { + if m != nil { + return m.AttributeUnits + } + return nil +} + +func (m *Profile) GetLinkTable() []Link { + if m != nil { + return m.LinkTable + } + return nil +} + +func (m *Profile) GetStringTable() []string { + if m != nil { + return m.StringTable + } + return nil +} + +func (m *Profile) GetDropFrames() int64 { + if m != nil { + return m.DropFrames + } + return 0 +} + +func (m *Profile) GetKeepFrames() int64 { + if m != nil { + return m.KeepFrames + } + return 0 +} + +func (m *Profile) GetTimeNanos() int64 { + if m != nil { + return m.TimeNanos + } + return 0 +} + +func (m *Profile) GetDurationNanos() int64 { + if m != nil { + return m.DurationNanos + } + return 0 +} + +func (m *Profile) GetPeriodType() ValueType { + if m != nil { + return m.PeriodType + } + return ValueType{} +} + +func (m *Profile) GetPeriod() int64 { + if m != nil { + return m.Period + } + return 0 +} + +func (m *Profile) GetComment() []int64 { + if m != nil { + return m.Comment + } + return nil +} + +func (m *Profile) GetDefaultSampleType() int64 { + if m != nil { + return m.DefaultSampleType + } + return 0 +} + +// Represents a mapping between Attribute Keys and Units. +type AttributeUnit struct { + // Index into string table. + AttributeKey int64 `protobuf:"varint,1,opt,name=attribute_key,json=attributeKey,proto3" json:"attribute_key,omitempty"` + // Index into string table. + Unit int64 `protobuf:"varint,2,opt,name=unit,proto3" json:"unit,omitempty"` +} + +func (m *AttributeUnit) Reset() { *m = AttributeUnit{} } +func (m *AttributeUnit) String() string { return proto.CompactTextString(m) } +func (*AttributeUnit) ProtoMessage() {} +func (*AttributeUnit) Descriptor() ([]byte, []int) { + return fileDescriptor_05f9ce3fdbeb046f, []int{1} +} +func (m *AttributeUnit) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AttributeUnit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AttributeUnit.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *AttributeUnit) XXX_Merge(src proto.Message) { + xxx_messageInfo_AttributeUnit.Merge(m, src) +} +func (m *AttributeUnit) XXX_Size() int { + return m.Size() +} +func (m *AttributeUnit) XXX_DiscardUnknown() { + xxx_messageInfo_AttributeUnit.DiscardUnknown(m) +} + +var xxx_messageInfo_AttributeUnit proto.InternalMessageInfo + +func (m *AttributeUnit) GetAttributeKey() int64 { + if m != nil { + return m.AttributeKey + } + return 0 +} + +func (m *AttributeUnit) GetUnit() int64 { + if m != nil { + return m.Unit + } + return 0 +} + +// A pointer from a profile Sample to a trace Span. +// Connects a profile sample to a trace span, identified by unique trace and span IDs. +type Link struct { + // A unique identifier of a trace that this linked span is part of. The ID is a + // 16-byte array. + TraceId go_opentelemetry_io_collector_pdata_internal_data.TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.TraceID" json:"trace_id"` + // A unique identifier for the linked span. The ID is an 8-byte array. + SpanId go_opentelemetry_io_collector_pdata_internal_data.SpanID `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.SpanID" json:"span_id"` +} + +func (m *Link) Reset() { *m = Link{} } +func (m *Link) String() string { return proto.CompactTextString(m) } +func (*Link) ProtoMessage() {} +func (*Link) Descriptor() ([]byte, []int) { + return fileDescriptor_05f9ce3fdbeb046f, []int{2} +} +func (m *Link) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Link) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Link.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Link) XXX_Merge(src proto.Message) { + xxx_messageInfo_Link.Merge(m, src) +} +func (m *Link) XXX_Size() int { + return m.Size() +} +func (m *Link) XXX_DiscardUnknown() { + xxx_messageInfo_Link.DiscardUnknown(m) +} + +var xxx_messageInfo_Link proto.InternalMessageInfo + +// ValueType describes the type and units of a value, with an optional aggregation temporality. +type ValueType struct { + Type int64 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"` + Unit int64 `protobuf:"varint,2,opt,name=unit,proto3" json:"unit,omitempty"` + AggregationTemporality AggregationTemporality `protobuf:"varint,3,opt,name=aggregation_temporality,json=aggregationTemporality,proto3,enum=opentelemetry.proto.profiles.v1experimental.AggregationTemporality" json:"aggregation_temporality,omitempty"` +} + +func (m *ValueType) Reset() { *m = ValueType{} } +func (m *ValueType) String() string { return proto.CompactTextString(m) } +func (*ValueType) ProtoMessage() {} +func (*ValueType) Descriptor() ([]byte, []int) { + return fileDescriptor_05f9ce3fdbeb046f, []int{3} +} +func (m *ValueType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValueType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ValueType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ValueType) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValueType.Merge(m, src) +} +func (m *ValueType) XXX_Size() int { + return m.Size() +} +func (m *ValueType) XXX_DiscardUnknown() { + xxx_messageInfo_ValueType.DiscardUnknown(m) +} + +var xxx_messageInfo_ValueType proto.InternalMessageInfo + +func (m *ValueType) GetType() int64 { + if m != nil { + return m.Type + } + return 0 +} + +func (m *ValueType) GetUnit() int64 { + if m != nil { + return m.Unit + } + return 0 +} + +func (m *ValueType) GetAggregationTemporality() AggregationTemporality { + if m != nil { + return m.AggregationTemporality + } + return AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED +} + +// Each Sample records values encountered in some program +// context. The program context is typically a stack trace, perhaps +// augmented with auxiliary information like the thread-id, some +// indicator of a higher level request being handled etc. +type Sample struct { + // The indices recorded here correspond to locations in Profile.location. + // The leaf is at location_index[0]. [deprecated, superseded by locations_start_index / locations_length] + LocationIndex []uint64 `protobuf:"varint,1,rep,packed,name=location_index,json=locationIndex,proto3" json:"location_index,omitempty"` + // locations_start_index along with locations_length refers to to a slice of locations in Profile.location. + // Supersedes location_index. + LocationsStartIndex uint64 `protobuf:"varint,7,opt,name=locations_start_index,json=locationsStartIndex,proto3" json:"locations_start_index,omitempty"` + // locations_length along with locations_start_index refers to a slice of locations in Profile.location. + // Supersedes location_index. + LocationsLength uint64 `protobuf:"varint,8,opt,name=locations_length,json=locationsLength,proto3" json:"locations_length,omitempty"` + // A 128bit id that uniquely identifies this stacktrace, globally. Index into string table. [optional] + StacktraceIdIndex uint32 `protobuf:"varint,9,opt,name=stacktrace_id_index,json=stacktraceIdIndex,proto3" json:"stacktrace_id_index,omitempty"` + // The type and unit of each value is defined by the corresponding + // entry in Profile.sample_type. All samples must have the same + // number of values, the same as the length of Profile.sample_type. + // When aggregating multiple samples into a single sample, the + // result has a list of values that is the element-wise sum of the + // lists of the originals. + Value []int64 `protobuf:"varint,2,rep,packed,name=value,proto3" json:"value,omitempty"` + // label includes additional context for this sample. It can include + // things like a thread id, allocation size, etc. + // + // NOTE: While possible, having multiple values for the same label key is + // strongly discouraged and should never be used. Most tools (e.g. pprof) do + // not have good (or any) support for multi-value labels. And an even more + // discouraged case is having a string label and a numeric label of the same + // name on a sample. Again, possible to express, but should not be used. + // [deprecated, superseded by attributes] + Label []Label `protobuf:"bytes,3,rep,name=label,proto3" json:"label"` + // References to attributes in Profile.attribute_table. [optional] + Attributes []uint64 `protobuf:"varint,10,rep,packed,name=attributes,proto3" json:"attributes,omitempty"` + // Reference to link in Profile.link_table. [optional] + Link uint64 `protobuf:"varint,12,opt,name=link,proto3" json:"link,omitempty"` + // Timestamps associated with Sample represented in nanoseconds. These timestamps are expected + // to fall within the Profile's time range. [optional] + TimestampsUnixNano []uint64 `protobuf:"varint,13,rep,packed,name=timestamps_unix_nano,json=timestampsUnixNano,proto3" json:"timestamps_unix_nano,omitempty"` +} + +func (m *Sample) Reset() { *m = Sample{} } +func (m *Sample) String() string { return proto.CompactTextString(m) } +func (*Sample) ProtoMessage() {} +func (*Sample) Descriptor() ([]byte, []int) { + return fileDescriptor_05f9ce3fdbeb046f, []int{4} +} +func (m *Sample) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Sample) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Sample.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Sample) XXX_Merge(src proto.Message) { + xxx_messageInfo_Sample.Merge(m, src) +} +func (m *Sample) XXX_Size() int { + return m.Size() +} +func (m *Sample) XXX_DiscardUnknown() { + xxx_messageInfo_Sample.DiscardUnknown(m) +} + +var xxx_messageInfo_Sample proto.InternalMessageInfo + +func (m *Sample) GetLocationIndex() []uint64 { + if m != nil { + return m.LocationIndex + } + return nil +} + +func (m *Sample) GetLocationsStartIndex() uint64 { + if m != nil { + return m.LocationsStartIndex + } + return 0 +} + +func (m *Sample) GetLocationsLength() uint64 { + if m != nil { + return m.LocationsLength + } + return 0 +} + +func (m *Sample) GetStacktraceIdIndex() uint32 { + if m != nil { + return m.StacktraceIdIndex + } + return 0 +} + +func (m *Sample) GetValue() []int64 { + if m != nil { + return m.Value + } + return nil +} + +func (m *Sample) GetLabel() []Label { + if m != nil { + return m.Label + } + return nil +} + +func (m *Sample) GetAttributes() []uint64 { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *Sample) GetLink() uint64 { + if m != nil { + return m.Link + } + return 0 +} + +func (m *Sample) GetTimestampsUnixNano() []uint64 { + if m != nil { + return m.TimestampsUnixNano + } + return nil +} + +// Provides additional context for a sample, +// such as thread ID or allocation size, with optional units. [deprecated] +type Label struct { + Key int64 `protobuf:"varint,1,opt,name=key,proto3" json:"key,omitempty"` + // At most one of the following must be present + Str int64 `protobuf:"varint,2,opt,name=str,proto3" json:"str,omitempty"` + Num int64 `protobuf:"varint,3,opt,name=num,proto3" json:"num,omitempty"` + // Should only be present when num is present. + // Specifies the units of num. + // Use arbitrary string (for example, "requests") as a custom count unit. + // If no unit is specified, consumer may apply heuristic to deduce the unit. + // Consumers may also interpret units like "bytes" and "kilobytes" as memory + // units and units like "seconds" and "nanoseconds" as time units, + // and apply appropriate unit conversions to these. + NumUnit int64 `protobuf:"varint,4,opt,name=num_unit,json=numUnit,proto3" json:"num_unit,omitempty"` +} + +func (m *Label) Reset() { *m = Label{} } +func (m *Label) String() string { return proto.CompactTextString(m) } +func (*Label) ProtoMessage() {} +func (*Label) Descriptor() ([]byte, []int) { + return fileDescriptor_05f9ce3fdbeb046f, []int{5} +} +func (m *Label) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Label) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Label.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Label) XXX_Merge(src proto.Message) { + xxx_messageInfo_Label.Merge(m, src) +} +func (m *Label) XXX_Size() int { + return m.Size() +} +func (m *Label) XXX_DiscardUnknown() { + xxx_messageInfo_Label.DiscardUnknown(m) +} + +var xxx_messageInfo_Label proto.InternalMessageInfo + +func (m *Label) GetKey() int64 { + if m != nil { + return m.Key + } + return 0 +} + +func (m *Label) GetStr() int64 { + if m != nil { + return m.Str + } + return 0 +} + +func (m *Label) GetNum() int64 { + if m != nil { + return m.Num + } + return 0 +} + +func (m *Label) GetNumUnit() int64 { + if m != nil { + return m.NumUnit + } + return 0 +} + +// Describes the mapping of a binary in memory, including its address range, +// file offset, and metadata like build ID +type Mapping struct { + // Unique nonzero id for the mapping. [deprecated] + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // Address at which the binary (or DLL) is loaded into memory. + MemoryStart uint64 `protobuf:"varint,2,opt,name=memory_start,json=memoryStart,proto3" json:"memory_start,omitempty"` + // The limit of the address range occupied by this mapping. + MemoryLimit uint64 `protobuf:"varint,3,opt,name=memory_limit,json=memoryLimit,proto3" json:"memory_limit,omitempty"` + // Offset in the binary that corresponds to the first mapped address. + FileOffset uint64 `protobuf:"varint,4,opt,name=file_offset,json=fileOffset,proto3" json:"file_offset,omitempty"` + // The object this entry is loaded from. This can be a filename on + // disk for the main binary and shared libraries, or virtual + // abstractions like "[vdso]". + Filename int64 `protobuf:"varint,5,opt,name=filename,proto3" json:"filename,omitempty"` + // A string that uniquely identifies a particular program version + // with high probability. E.g., for binaries generated by GNU tools, + // it could be the contents of the .note.gnu.build-id field. + BuildId int64 `protobuf:"varint,6,opt,name=build_id,json=buildId,proto3" json:"build_id,omitempty"` + // Specifies the kind of build id. See BuildIdKind enum for more details [optional] + BuildIdKind BuildIdKind `protobuf:"varint,11,opt,name=build_id_kind,json=buildIdKind,proto3,enum=opentelemetry.proto.profiles.v1experimental.BuildIdKind" json:"build_id_kind,omitempty"` + // References to attributes in Profile.attribute_table. [optional] + Attributes []uint64 `protobuf:"varint,12,rep,packed,name=attributes,proto3" json:"attributes,omitempty"` + // The following fields indicate the resolution of symbolic info. + HasFunctions bool `protobuf:"varint,7,opt,name=has_functions,json=hasFunctions,proto3" json:"has_functions,omitempty"` + HasFilenames bool `protobuf:"varint,8,opt,name=has_filenames,json=hasFilenames,proto3" json:"has_filenames,omitempty"` + HasLineNumbers bool `protobuf:"varint,9,opt,name=has_line_numbers,json=hasLineNumbers,proto3" json:"has_line_numbers,omitempty"` + HasInlineFrames bool `protobuf:"varint,10,opt,name=has_inline_frames,json=hasInlineFrames,proto3" json:"has_inline_frames,omitempty"` +} + +func (m *Mapping) Reset() { *m = Mapping{} } +func (m *Mapping) String() string { return proto.CompactTextString(m) } +func (*Mapping) ProtoMessage() {} +func (*Mapping) Descriptor() ([]byte, []int) { + return fileDescriptor_05f9ce3fdbeb046f, []int{6} +} +func (m *Mapping) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Mapping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Mapping.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Mapping) XXX_Merge(src proto.Message) { + xxx_messageInfo_Mapping.Merge(m, src) +} +func (m *Mapping) XXX_Size() int { + return m.Size() +} +func (m *Mapping) XXX_DiscardUnknown() { + xxx_messageInfo_Mapping.DiscardUnknown(m) +} + +var xxx_messageInfo_Mapping proto.InternalMessageInfo + +func (m *Mapping) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *Mapping) GetMemoryStart() uint64 { + if m != nil { + return m.MemoryStart + } + return 0 +} + +func (m *Mapping) GetMemoryLimit() uint64 { + if m != nil { + return m.MemoryLimit + } + return 0 +} + +func (m *Mapping) GetFileOffset() uint64 { + if m != nil { + return m.FileOffset + } + return 0 +} + +func (m *Mapping) GetFilename() int64 { + if m != nil { + return m.Filename + } + return 0 +} + +func (m *Mapping) GetBuildId() int64 { + if m != nil { + return m.BuildId + } + return 0 +} + +func (m *Mapping) GetBuildIdKind() BuildIdKind { + if m != nil { + return m.BuildIdKind + } + return BuildIdKind_BUILD_ID_LINKER +} + +func (m *Mapping) GetAttributes() []uint64 { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *Mapping) GetHasFunctions() bool { + if m != nil { + return m.HasFunctions + } + return false +} + +func (m *Mapping) GetHasFilenames() bool { + if m != nil { + return m.HasFilenames + } + return false +} + +func (m *Mapping) GetHasLineNumbers() bool { + if m != nil { + return m.HasLineNumbers + } + return false +} + +func (m *Mapping) GetHasInlineFrames() bool { + if m != nil { + return m.HasInlineFrames + } + return false +} + +// Describes function and line table debug information. +type Location struct { + // Unique nonzero id for the location. A profile could use + // instruction addresses or any integer sequence as ids. [deprecated] + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // The index of the corresponding profile.Mapping for this location. + // It can be unset if the mapping is unknown or not applicable for + // this profile type. + MappingIndex uint64 `protobuf:"varint,2,opt,name=mapping_index,json=mappingIndex,proto3" json:"mapping_index,omitempty"` + // The instruction address for this location, if available. It + // should be within [Mapping.memory_start...Mapping.memory_limit] + // for the corresponding mapping. A non-leaf address may be in the + // middle of a call instruction. It is up to display tools to find + // the beginning of the instruction if necessary. + Address uint64 `protobuf:"varint,3,opt,name=address,proto3" json:"address,omitempty"` + // Multiple line indicates this location has inlined functions, + // where the last entry represents the caller into which the + // preceding entries were inlined. + // + // E.g., if memcpy() is inlined into printf: + // line[0].function_name == "memcpy" + // line[1].function_name == "printf" + Line []Line `protobuf:"bytes,4,rep,name=line,proto3" json:"line"` + // Provides an indication that multiple symbols map to this location's + // address, for example due to identical code folding by the linker. In that + // case the line information above represents one of the multiple + // symbols. This field must be recomputed when the symbolization state of the + // profile changes. + IsFolded bool `protobuf:"varint,5,opt,name=is_folded,json=isFolded,proto3" json:"is_folded,omitempty"` + // Type of frame (e.g. kernel, native, python, hotspot, php). Index into string table. + TypeIndex uint32 `protobuf:"varint,6,opt,name=type_index,json=typeIndex,proto3" json:"type_index,omitempty"` + // References to attributes in Profile.attribute_table. [optional] + Attributes []uint64 `protobuf:"varint,7,rep,packed,name=attributes,proto3" json:"attributes,omitempty"` +} + +func (m *Location) Reset() { *m = Location{} } +func (m *Location) String() string { return proto.CompactTextString(m) } +func (*Location) ProtoMessage() {} +func (*Location) Descriptor() ([]byte, []int) { + return fileDescriptor_05f9ce3fdbeb046f, []int{7} +} +func (m *Location) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Location) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Location.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Location) XXX_Merge(src proto.Message) { + xxx_messageInfo_Location.Merge(m, src) +} +func (m *Location) XXX_Size() int { + return m.Size() +} +func (m *Location) XXX_DiscardUnknown() { + xxx_messageInfo_Location.DiscardUnknown(m) +} + +var xxx_messageInfo_Location proto.InternalMessageInfo + +func (m *Location) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *Location) GetMappingIndex() uint64 { + if m != nil { + return m.MappingIndex + } + return 0 +} + +func (m *Location) GetAddress() uint64 { + if m != nil { + return m.Address + } + return 0 +} + +func (m *Location) GetLine() []Line { + if m != nil { + return m.Line + } + return nil +} + +func (m *Location) GetIsFolded() bool { + if m != nil { + return m.IsFolded + } + return false +} + +func (m *Location) GetTypeIndex() uint32 { + if m != nil { + return m.TypeIndex + } + return 0 +} + +func (m *Location) GetAttributes() []uint64 { + if m != nil { + return m.Attributes + } + return nil +} + +// Details a specific line in a source code, linked to a function. +type Line struct { + // The index of the corresponding profile.Function for this line. + FunctionIndex uint64 `protobuf:"varint,1,opt,name=function_index,json=functionIndex,proto3" json:"function_index,omitempty"` + // Line number in source code. + Line int64 `protobuf:"varint,2,opt,name=line,proto3" json:"line,omitempty"` + // Column number in source code. + Column int64 `protobuf:"varint,3,opt,name=column,proto3" json:"column,omitempty"` +} + +func (m *Line) Reset() { *m = Line{} } +func (m *Line) String() string { return proto.CompactTextString(m) } +func (*Line) ProtoMessage() {} +func (*Line) Descriptor() ([]byte, []int) { + return fileDescriptor_05f9ce3fdbeb046f, []int{8} +} +func (m *Line) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Line) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Line.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Line) XXX_Merge(src proto.Message) { + xxx_messageInfo_Line.Merge(m, src) +} +func (m *Line) XXX_Size() int { + return m.Size() +} +func (m *Line) XXX_DiscardUnknown() { + xxx_messageInfo_Line.DiscardUnknown(m) +} + +var xxx_messageInfo_Line proto.InternalMessageInfo + +func (m *Line) GetFunctionIndex() uint64 { + if m != nil { + return m.FunctionIndex + } + return 0 +} + +func (m *Line) GetLine() int64 { + if m != nil { + return m.Line + } + return 0 +} + +func (m *Line) GetColumn() int64 { + if m != nil { + return m.Column + } + return 0 +} + +// Describes a function, including its human-readable name, system name, +// source file, and starting line number in the source. +type Function struct { + // Unique nonzero id for the function. [deprecated] + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // Name of the function, in human-readable form if available. + Name int64 `protobuf:"varint,2,opt,name=name,proto3" json:"name,omitempty"` + // Name of the function, as identified by the system. + // For instance, it can be a C++ mangled name. + SystemName int64 `protobuf:"varint,3,opt,name=system_name,json=systemName,proto3" json:"system_name,omitempty"` + // Source file containing the function. + Filename int64 `protobuf:"varint,4,opt,name=filename,proto3" json:"filename,omitempty"` + // Line number in source file. + StartLine int64 `protobuf:"varint,5,opt,name=start_line,json=startLine,proto3" json:"start_line,omitempty"` +} + +func (m *Function) Reset() { *m = Function{} } +func (m *Function) String() string { return proto.CompactTextString(m) } +func (*Function) ProtoMessage() {} +func (*Function) Descriptor() ([]byte, []int) { + return fileDescriptor_05f9ce3fdbeb046f, []int{9} +} +func (m *Function) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Function) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Function.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Function) XXX_Merge(src proto.Message) { + xxx_messageInfo_Function.Merge(m, src) +} +func (m *Function) XXX_Size() int { + return m.Size() +} +func (m *Function) XXX_DiscardUnknown() { + xxx_messageInfo_Function.DiscardUnknown(m) +} + +var xxx_messageInfo_Function proto.InternalMessageInfo + +func (m *Function) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *Function) GetName() int64 { + if m != nil { + return m.Name + } + return 0 +} + +func (m *Function) GetSystemName() int64 { + if m != nil { + return m.SystemName + } + return 0 +} + +func (m *Function) GetFilename() int64 { + if m != nil { + return m.Filename + } + return 0 +} + +func (m *Function) GetStartLine() int64 { + if m != nil { + return m.StartLine + } + return 0 +} + +func init() { + proto.RegisterEnum("opentelemetry.proto.profiles.v1experimental.AggregationTemporality", AggregationTemporality_name, AggregationTemporality_value) + proto.RegisterEnum("opentelemetry.proto.profiles.v1experimental.BuildIdKind", BuildIdKind_name, BuildIdKind_value) + proto.RegisterType((*Profile)(nil), "opentelemetry.proto.profiles.v1experimental.Profile") + proto.RegisterType((*AttributeUnit)(nil), "opentelemetry.proto.profiles.v1experimental.AttributeUnit") + proto.RegisterType((*Link)(nil), "opentelemetry.proto.profiles.v1experimental.Link") + proto.RegisterType((*ValueType)(nil), "opentelemetry.proto.profiles.v1experimental.ValueType") + proto.RegisterType((*Sample)(nil), "opentelemetry.proto.profiles.v1experimental.Sample") + proto.RegisterType((*Label)(nil), "opentelemetry.proto.profiles.v1experimental.Label") + proto.RegisterType((*Mapping)(nil), "opentelemetry.proto.profiles.v1experimental.Mapping") + proto.RegisterType((*Location)(nil), "opentelemetry.proto.profiles.v1experimental.Location") + proto.RegisterType((*Line)(nil), "opentelemetry.proto.profiles.v1experimental.Line") + proto.RegisterType((*Function)(nil), "opentelemetry.proto.profiles.v1experimental.Function") +} + +func init() { + proto.RegisterFile("opentelemetry/proto/profiles/v1experimental/pprofextended.proto", fileDescriptor_05f9ce3fdbeb046f) +} + +var fileDescriptor_05f9ce3fdbeb046f = []byte{ + // 1483 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0xcd, 0x4f, 0x1b, 0x47, + 0x1b, 0xc7, 0x1f, 0xf8, 0xe3, 0x31, 0x06, 0x33, 0xe1, 0xe5, 0xdd, 0x37, 0xaf, 0x02, 0xc4, 0xa8, + 0x0d, 0x25, 0x92, 0x29, 0xa4, 0xad, 0xd2, 0xaa, 0x52, 0x6b, 0x82, 0x49, 0x56, 0x38, 0x86, 0x2e, + 0x86, 0x96, 0x2a, 0xd1, 0x6a, 0xf1, 0x0e, 0x66, 0xc4, 0xee, 0xec, 0x6a, 0x77, 0x8c, 0xb0, 0xd4, + 0x53, 0x8f, 0x51, 0x0f, 0x3d, 0xf7, 0x4f, 0xe8, 0xad, 0x7f, 0x41, 0xaf, 0x39, 0xe6, 0x52, 0xa9, + 0xea, 0x21, 0xaa, 0x92, 0xbf, 0xa1, 0xf7, 0x6a, 0x9e, 0x99, 0xb5, 0xcd, 0x47, 0x0e, 0x6e, 0x2f, + 0x68, 0x9e, 0xdf, 0xfc, 0xe6, 0x37, 0xcf, 0xec, 0xf3, 0x65, 0xe0, 0x8b, 0x20, 0x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, 0x88, 0xfb, 0x45, 0x89, 0xb4, 0x24, + 0x40, 0xde, 0x83, 0x69, 0xb7, 0x17, 0xa9, 0x14, 0x51, 0x14, 0x40, 0x4a, 0x39, 0x41, 0x15, 0xed, + 0x39, 0x94, 0xe4, 0x73, 0x02, 0x57, 0x95, 0x6a, 0x69, 0x29, 0xf5, 0xef, 0x4b, 0x55, 0x09, 0x62, + 0xa9, 0xce, 0x43, 0x4e, 0x59, 0xc6, 0x14, 0xde, 0xae, 0x2d, 0x62, 0x40, 0x5e, 0x26, 0x04, 0xe5, + 0xc2, 0x28, 0x63, 0xde, 0x26, 0x26, 0xa9, 0xc1, 0x2d, 0x97, 0x9e, 0x38, 0x3d, 0x4f, 0xd8, 0xa3, + 0x3d, 0x64, 0x1a, 0x8f, 0xcf, 0xea, 0xad, 0xfd, 0x41, 0x33, 0xa8, 0x3e, 0x81, 0xf2, 0xa5, 0x50, + 0x93, 0x65, 0x28, 0x0f, 0xf3, 0xe7, 0x8c, 0xf6, 0x8d, 0x14, 0x1e, 0x9d, 0x1a, 0x80, 0x3b, 0xb4, + 0x4f, 0x08, 0x64, 0x65, 0x6a, 0x19, 0x69, 0xdc, 0xc3, 0x75, 0xf5, 0xd7, 0x14, 0x64, 0x65, 0x3c, + 0xc9, 0x33, 0x28, 0x88, 0xc8, 0xe9, 0x50, 0x9b, 0xb9, 0x78, 0x78, 0x6a, 0xb3, 0x2e, 0x1f, 0xf6, + 0xc7, 0xeb, 0xc5, 0x4f, 0xbb, 0xc1, 0x95, 0x4f, 0xc3, 0x64, 0x43, 0xf4, 0x3c, 0xda, 0x11, 0x41, + 0xb4, 0x16, 0xba, 0x8e, 0x70, 0xd6, 0x18, 0x17, 0x34, 0xe2, 0x8e, 0xb7, 0x26, 0xad, 0x5a, 0x5b, + 0x2a, 0x99, 0x5b, 0x56, 0x1e, 0x25, 0x4d, 0x97, 0x1c, 0x41, 0x3e, 0x0e, 0x1d, 0x2e, 0xc5, 0xd3, + 0x28, 0xfe, 0xa5, 0x16, 0x7f, 0x38, 0xbe, 0xf8, 0x7e, 0xe8, 0x70, 0x73, 0xcb, 0xca, 0x49, 0x41, + 0xd3, 0xad, 0xfe, 0x92, 0x82, 0xe2, 0x20, 0x1a, 0xf2, 0x8d, 0xba, 0xfd, 0xe2, 0x1b, 0x85, 0xc6, + 0xae, 0xbe, 0x9b, 0x7c, 0x07, 0xff, 0x75, 0xba, 0xdd, 0x88, 0x76, 0x55, 0xb2, 0x08, 0xea, 0x87, + 0x41, 0xe4, 0x78, 0x4c, 0xf4, 0x8d, 0xcc, 0x52, 0x6a, 0x65, 0x7a, 0xe3, 0xd1, 0x78, 0x85, 0x37, + 0xd4, 0x6a, 0x0f, 0xa5, 0xac, 0x79, 0xe7, 0x46, 0xbc, 0xfa, 0x22, 0x03, 0x39, 0x15, 0x4e, 0x99, + 0xb2, 0xa3, 0x5d, 0x8d, 0x5e, 0xe0, 0xe4, 0xc8, 0x5a, 0xe5, 0x91, 0x9e, 0x46, 0x2f, 0xc8, 0x06, + 0xfc, 0x27, 0x01, 0x62, 0x3b, 0x16, 0x4e, 0x24, 0x34, 0x5b, 0x16, 0x51, 0xd6, 0xba, 0x35, 0xd8, + 0xdc, 0x97, 0x7b, 0xea, 0xcc, 0x48, 0xc3, 0x8c, 0x6d, 0x8f, 0xf2, 0xae, 0x38, 0xc5, 0x92, 0xca, + 0x0e, 0x1b, 0x66, 0xdc, 0x44, 0x58, 0x26, 0x60, 0x2c, 0x9c, 0xce, 0x59, 0x92, 0x02, 0x5a, 0x5c, + 0x16, 0x58, 0xd9, 0x9a, 0x1d, 0x6e, 0x99, 0xae, 0x92, 0x9e, 0x83, 0xc9, 0x73, 0xf9, 0xcd, 0x71, + 0x18, 0x65, 0x2c, 0x65, 0x90, 0x16, 0x4c, 0x7a, 0xce, 0x31, 0xf5, 0xf4, 0x38, 0xd9, 0x18, 0xaf, + 0xab, 0xc8, 0x93, 0xba, 0x9a, 0x94, 0x0c, 0x59, 0x00, 0x18, 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b, 0x66, + 0xab, 0x6e, 0x1d, 0xd9, 0x4f, 0xea, 0xfb, 0x4f, 0x2a, 0xa9, 0xcd, 0x9f, 0x52, 0x2f, 0xdf, 0x2c, + 0xa4, 0x5e, 0xbd, 0x59, 0x48, 0xfd, 0xf9, 0x66, 0x21, 0xf5, 0xe3, 0xdb, 0x85, 0x89, 0x57, 0x6f, + 0x17, 0x26, 0x7e, 0x7f, 0xbb, 0x30, 0xf1, 0xad, 0x35, 0xf6, 0x24, 0x56, 0xff, 0x1b, 0x75, 0x29, + 0x7f, 0xd7, 0xbf, 0x68, 0x3f, 0xa7, 0xef, 0xef, 0x86, 0x94, 0xb7, 0x07, 0x8a, 0x7b, 0x98, 0xbe, + 0x7b, 0x49, 0xfa, 0x1e, 0xae, 0x37, 0x46, 0xd8, 0xc7, 0x39, 0xd4, 0x7b, 0xf0, 0x77, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xef, 0x03, 0x47, 0x6d, 0x06, 0x0e, 0x00, 0x00, +} + +func (m *Profile) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Profile) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Profile) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.LinkTable) > 0 { + for iNdEx := len(m.LinkTable) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.LinkTable[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPprofextended(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x92 + } + } + if len(m.AttributeUnits) > 0 { + for iNdEx := len(m.AttributeUnits) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AttributeUnits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPprofextended(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + } + } + if len(m.AttributeTable) > 0 { + for iNdEx := len(m.AttributeTable) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AttributeTable[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPprofextended(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + } + } + if len(m.LocationIndices) > 0 { + dAtA2 := make([]byte, len(m.LocationIndices)*10) + var j1 int + for _, num1 := range m.LocationIndices { + num := uint64(num1) + for num >= 1<<7 { + dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA2[j1] = uint8(num) + j1++ + } + i -= j1 + copy(dAtA[i:], dAtA2[:j1]) + i = encodeVarintPprofextended(dAtA, i, uint64(j1)) + i-- + dAtA[i] = 0x7a + } + if m.DefaultSampleType != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.DefaultSampleType)) + i-- + dAtA[i] = 0x70 + } + if len(m.Comment) > 0 { + dAtA4 := make([]byte, len(m.Comment)*10) + var j3 int + for _, num1 := range m.Comment { + num := uint64(num1) + for num >= 1<<7 { + dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j3++ + } + dAtA4[j3] = uint8(num) + j3++ + } + i -= j3 + copy(dAtA[i:], dAtA4[:j3]) + i = encodeVarintPprofextended(dAtA, i, uint64(j3)) + i-- + dAtA[i] = 0x6a + } + if m.Period != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Period)) + i-- + dAtA[i] = 0x60 + } + { + size, err := m.PeriodType.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPprofextended(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + if m.DurationNanos != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.DurationNanos)) + i-- + dAtA[i] = 0x50 + } + if m.TimeNanos != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.TimeNanos)) + i-- + dAtA[i] = 0x48 + } + if m.KeepFrames != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.KeepFrames)) + i-- + dAtA[i] = 0x40 + } + if m.DropFrames != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.DropFrames)) + i-- + dAtA[i] = 0x38 + } + if len(m.StringTable) > 0 { + for iNdEx := len(m.StringTable) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.StringTable[iNdEx]) + copy(dAtA[i:], m.StringTable[iNdEx]) + i = encodeVarintPprofextended(dAtA, i, uint64(len(m.StringTable[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } + if len(m.Function) > 0 { + for iNdEx := len(m.Function) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Function[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPprofextended(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if len(m.Location) > 0 { + for iNdEx := len(m.Location) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Location[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPprofextended(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.Mapping) > 0 { + for iNdEx := len(m.Mapping) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Mapping[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPprofextended(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Sample) > 0 { + for iNdEx := len(m.Sample) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Sample[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPprofextended(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.SampleType) > 0 { + for iNdEx := len(m.SampleType) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SampleType[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPprofextended(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *AttributeUnit) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AttributeUnit) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AttributeUnit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Unit != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Unit)) + i-- + dAtA[i] = 0x10 + } + if m.AttributeKey != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.AttributeKey)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Link) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Link) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Link) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.SpanId.Size() + i -= size + if _, err := m.SpanId.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintPprofextended(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.TraceId.Size() + i -= size + if _, err := m.TraceId.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintPprofextended(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ValueType) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValueType) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValueType) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AggregationTemporality != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.AggregationTemporality)) + i-- + dAtA[i] = 0x18 + } + if m.Unit != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Unit)) + i-- + dAtA[i] = 0x10 + } + if m.Type != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Sample) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Sample) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Sample) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TimestampsUnixNano) > 0 { + dAtA7 := make([]byte, len(m.TimestampsUnixNano)*10) + var j6 int + for _, num := range m.TimestampsUnixNano { + for num >= 1<<7 { + dAtA7[j6] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j6++ + } + dAtA7[j6] = uint8(num) + j6++ + } + i -= j6 + copy(dAtA[i:], dAtA7[:j6]) + i = encodeVarintPprofextended(dAtA, i, uint64(j6)) + i-- + dAtA[i] = 0x6a + } + if m.Link != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Link)) + i-- + dAtA[i] = 0x60 + } + if len(m.Attributes) > 0 { + dAtA9 := make([]byte, len(m.Attributes)*10) + var j8 int + for _, num := range m.Attributes { + for num >= 1<<7 { + dAtA9[j8] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j8++ + } + dAtA9[j8] = uint8(num) + j8++ + } + i -= j8 + copy(dAtA[i:], dAtA9[:j8]) + i = encodeVarintPprofextended(dAtA, i, uint64(j8)) + i-- + dAtA[i] = 0x52 + } + if m.StacktraceIdIndex != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.StacktraceIdIndex)) + i-- + dAtA[i] = 0x48 + } + if m.LocationsLength != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.LocationsLength)) + i-- + dAtA[i] = 0x40 + } + if m.LocationsStartIndex != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.LocationsStartIndex)) + i-- + dAtA[i] = 0x38 + } + if len(m.Label) > 0 { + for iNdEx := len(m.Label) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Label[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPprofextended(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Value) > 0 { + dAtA11 := make([]byte, len(m.Value)*10) + var j10 int + for _, num1 := range m.Value { + num := uint64(num1) + for num >= 1<<7 { + dAtA11[j10] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j10++ + } + dAtA11[j10] = uint8(num) + j10++ + } + i -= j10 + copy(dAtA[i:], dAtA11[:j10]) + i = encodeVarintPprofextended(dAtA, i, uint64(j10)) + i-- + dAtA[i] = 0x12 + } + if len(m.LocationIndex) > 0 { + dAtA13 := make([]byte, len(m.LocationIndex)*10) + var j12 int + for _, num := range m.LocationIndex { + for num >= 1<<7 { + dAtA13[j12] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j12++ + } + dAtA13[j12] = uint8(num) + j12++ + } + i -= j12 + copy(dAtA[i:], dAtA13[:j12]) + i = encodeVarintPprofextended(dAtA, i, uint64(j12)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Label) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Label) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Label) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.NumUnit != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.NumUnit)) + i-- + dAtA[i] = 0x20 + } + if m.Num != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Num)) + i-- + dAtA[i] = 0x18 + } + if m.Str != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Str)) + i-- + dAtA[i] = 0x10 + } + if m.Key != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Key)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Mapping) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Mapping) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Mapping) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + dAtA15 := make([]byte, len(m.Attributes)*10) + var j14 int + for _, num := range m.Attributes { + for num >= 1<<7 { + dAtA15[j14] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j14++ + } + dAtA15[j14] = uint8(num) + j14++ + } + i -= j14 + copy(dAtA[i:], dAtA15[:j14]) + i = encodeVarintPprofextended(dAtA, i, uint64(j14)) + i-- + dAtA[i] = 0x62 + } + if m.BuildIdKind != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.BuildIdKind)) + i-- + dAtA[i] = 0x58 + } + if m.HasInlineFrames { + i-- + if m.HasInlineFrames { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x50 + } + if m.HasLineNumbers { + i-- + if m.HasLineNumbers { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 + } + if m.HasFilenames { + i-- + if m.HasFilenames { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + if m.HasFunctions { + i-- + if m.HasFunctions { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 + } + if m.BuildId != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.BuildId)) + i-- + dAtA[i] = 0x30 + } + if m.Filename != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Filename)) + i-- + dAtA[i] = 0x28 + } + if m.FileOffset != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.FileOffset)) + i-- + dAtA[i] = 0x20 + } + if m.MemoryLimit != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.MemoryLimit)) + i-- + dAtA[i] = 0x18 + } + if m.MemoryStart != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.MemoryStart)) + i-- + dAtA[i] = 0x10 + } + if m.Id != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Location) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Location) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Location) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + dAtA17 := make([]byte, len(m.Attributes)*10) + var j16 int + for _, num := range m.Attributes { + for num >= 1<<7 { + dAtA17[j16] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j16++ + } + dAtA17[j16] = uint8(num) + j16++ + } + i -= j16 + copy(dAtA[i:], dAtA17[:j16]) + i = encodeVarintPprofextended(dAtA, i, uint64(j16)) + i-- + dAtA[i] = 0x3a + } + if m.TypeIndex != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.TypeIndex)) + i-- + dAtA[i] = 0x30 + } + if m.IsFolded { + i-- + if m.IsFolded { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if len(m.Line) > 0 { + for iNdEx := len(m.Line) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Line[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPprofextended(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if m.Address != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Address)) + i-- + dAtA[i] = 0x18 + } + if m.MappingIndex != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.MappingIndex)) + i-- + dAtA[i] = 0x10 + } + if m.Id != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Line) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Line) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Line) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Column != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Column)) + i-- + dAtA[i] = 0x18 + } + if m.Line != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Line)) + i-- + dAtA[i] = 0x10 + } + if m.FunctionIndex != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.FunctionIndex)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Function) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Function) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Function) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.StartLine != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.StartLine)) + i-- + dAtA[i] = 0x28 + } + if m.Filename != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Filename)) + i-- + dAtA[i] = 0x20 + } + if m.SystemName != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.SystemName)) + i-- + dAtA[i] = 0x18 + } + if m.Name != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Name)) + i-- + dAtA[i] = 0x10 + } + if m.Id != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintPprofextended(dAtA []byte, offset int, v uint64) int { + offset -= sovPprofextended(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Profile) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.SampleType) > 0 { + for _, e := range m.SampleType { + l = e.Size() + n += 1 + l + sovPprofextended(uint64(l)) + } + } + if len(m.Sample) > 0 { + for _, e := range m.Sample { + l = e.Size() + n += 1 + l + sovPprofextended(uint64(l)) + } + } + if len(m.Mapping) > 0 { + for _, e := range m.Mapping { + l = e.Size() + n += 1 + l + sovPprofextended(uint64(l)) + } + } + if len(m.Location) > 0 { + for _, e := range m.Location { + l = e.Size() + n += 1 + l + sovPprofextended(uint64(l)) + } + } + if len(m.Function) > 0 { + for _, e := range m.Function { + l = e.Size() + n += 1 + l + sovPprofextended(uint64(l)) + } + } + if len(m.StringTable) > 0 { + for _, s := range m.StringTable { + l = len(s) + n += 1 + l + sovPprofextended(uint64(l)) + } + } + if m.DropFrames != 0 { + n += 1 + sovPprofextended(uint64(m.DropFrames)) + } + if m.KeepFrames != 0 { + n += 1 + sovPprofextended(uint64(m.KeepFrames)) + } + if m.TimeNanos != 0 { + n += 1 + sovPprofextended(uint64(m.TimeNanos)) + } + if m.DurationNanos != 0 { + n += 1 + sovPprofextended(uint64(m.DurationNanos)) + } + l = m.PeriodType.Size() + n += 1 + l + sovPprofextended(uint64(l)) + if m.Period != 0 { + n += 1 + sovPprofextended(uint64(m.Period)) + } + if len(m.Comment) > 0 { + l = 0 + for _, e := range m.Comment { + l += sovPprofextended(uint64(e)) + } + n += 1 + sovPprofextended(uint64(l)) + l + } + if m.DefaultSampleType != 0 { + n += 1 + sovPprofextended(uint64(m.DefaultSampleType)) + } + if len(m.LocationIndices) > 0 { + l = 0 + for _, e := range m.LocationIndices { + l += sovPprofextended(uint64(e)) + } + n += 1 + sovPprofextended(uint64(l)) + l + } + if len(m.AttributeTable) > 0 { + for _, e := range m.AttributeTable { + l = e.Size() + n += 2 + l + sovPprofextended(uint64(l)) + } + } + if len(m.AttributeUnits) > 0 { + for _, e := range m.AttributeUnits { + l = e.Size() + n += 2 + l + sovPprofextended(uint64(l)) + } + } + if len(m.LinkTable) > 0 { + for _, e := range m.LinkTable { + l = e.Size() + n += 2 + l + sovPprofextended(uint64(l)) + } + } + return n +} + +func (m *AttributeUnit) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AttributeKey != 0 { + n += 1 + sovPprofextended(uint64(m.AttributeKey)) + } + if m.Unit != 0 { + n += 1 + sovPprofextended(uint64(m.Unit)) + } + return n +} + +func (m *Link) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.TraceId.Size() + n += 1 + l + sovPprofextended(uint64(l)) + l = m.SpanId.Size() + n += 1 + l + sovPprofextended(uint64(l)) + return n +} + +func (m *ValueType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Type != 0 { + n += 1 + sovPprofextended(uint64(m.Type)) + } + if m.Unit != 0 { + n += 1 + sovPprofextended(uint64(m.Unit)) + } + if m.AggregationTemporality != 0 { + n += 1 + sovPprofextended(uint64(m.AggregationTemporality)) + } + return n +} + +func (m *Sample) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.LocationIndex) > 0 { + l = 0 + for _, e := range m.LocationIndex { + l += sovPprofextended(uint64(e)) + } + n += 1 + sovPprofextended(uint64(l)) + l + } + if len(m.Value) > 0 { + l = 0 + for _, e := range m.Value { + l += sovPprofextended(uint64(e)) + } + n += 1 + sovPprofextended(uint64(l)) + l + } + if len(m.Label) > 0 { + for _, e := range m.Label { + l = e.Size() + n += 1 + l + sovPprofextended(uint64(l)) + } + } + if m.LocationsStartIndex != 0 { + n += 1 + sovPprofextended(uint64(m.LocationsStartIndex)) + } + if m.LocationsLength != 0 { + n += 1 + sovPprofextended(uint64(m.LocationsLength)) + } + if m.StacktraceIdIndex != 0 { + n += 1 + sovPprofextended(uint64(m.StacktraceIdIndex)) + } + if len(m.Attributes) > 0 { + l = 0 + for _, e := range m.Attributes { + l += sovPprofextended(uint64(e)) + } + n += 1 + sovPprofextended(uint64(l)) + l + } + if m.Link != 0 { + n += 1 + sovPprofextended(uint64(m.Link)) + } + if len(m.TimestampsUnixNano) > 0 { + l = 0 + for _, e := range m.TimestampsUnixNano { + l += sovPprofextended(uint64(e)) + } + n += 1 + sovPprofextended(uint64(l)) + l + } + return n +} + +func (m *Label) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Key != 0 { + n += 1 + sovPprofextended(uint64(m.Key)) + } + if m.Str != 0 { + n += 1 + sovPprofextended(uint64(m.Str)) + } + if m.Num != 0 { + n += 1 + sovPprofextended(uint64(m.Num)) + } + if m.NumUnit != 0 { + n += 1 + sovPprofextended(uint64(m.NumUnit)) + } + return n +} + +func (m *Mapping) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovPprofextended(uint64(m.Id)) + } + if m.MemoryStart != 0 { + n += 1 + sovPprofextended(uint64(m.MemoryStart)) + } + if m.MemoryLimit != 0 { + n += 1 + sovPprofextended(uint64(m.MemoryLimit)) + } + if m.FileOffset != 0 { + n += 1 + sovPprofextended(uint64(m.FileOffset)) + } + if m.Filename != 0 { + n += 1 + sovPprofextended(uint64(m.Filename)) + } + if m.BuildId != 0 { + n += 1 + sovPprofextended(uint64(m.BuildId)) + } + if m.HasFunctions { + n += 2 + } + if m.HasFilenames { + n += 2 + } + if m.HasLineNumbers { + n += 2 + } + if m.HasInlineFrames { + n += 2 + } + if m.BuildIdKind != 0 { + n += 1 + sovPprofextended(uint64(m.BuildIdKind)) + } + if len(m.Attributes) > 0 { + l = 0 + for _, e := range m.Attributes { + l += sovPprofextended(uint64(e)) + } + n += 1 + sovPprofextended(uint64(l)) + l + } + return n +} + +func (m *Location) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovPprofextended(uint64(m.Id)) + } + if m.MappingIndex != 0 { + n += 1 + sovPprofextended(uint64(m.MappingIndex)) + } + if m.Address != 0 { + n += 1 + sovPprofextended(uint64(m.Address)) + } + if len(m.Line) > 0 { + for _, e := range m.Line { + l = e.Size() + n += 1 + l + sovPprofextended(uint64(l)) + } + } + if m.IsFolded { + n += 2 + } + if m.TypeIndex != 0 { + n += 1 + sovPprofextended(uint64(m.TypeIndex)) + } + if len(m.Attributes) > 0 { + l = 0 + for _, e := range m.Attributes { + l += sovPprofextended(uint64(e)) + } + n += 1 + sovPprofextended(uint64(l)) + l + } + return n +} + +func (m *Line) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FunctionIndex != 0 { + n += 1 + sovPprofextended(uint64(m.FunctionIndex)) + } + if m.Line != 0 { + n += 1 + sovPprofextended(uint64(m.Line)) + } + if m.Column != 0 { + n += 1 + sovPprofextended(uint64(m.Column)) + } + return n +} + +func (m *Function) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovPprofextended(uint64(m.Id)) + } + if m.Name != 0 { + n += 1 + sovPprofextended(uint64(m.Name)) + } + if m.SystemName != 0 { + n += 1 + sovPprofextended(uint64(m.SystemName)) + } + if m.Filename != 0 { + n += 1 + sovPprofextended(uint64(m.Filename)) + } + if m.StartLine != 0 { + n += 1 + sovPprofextended(uint64(m.StartLine)) + } + return n +} + +func sovPprofextended(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozPprofextended(x uint64) (n int) { + return sovPprofextended(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Profile) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Profile: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Profile: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SampleType", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SampleType = append(m.SampleType, ValueType{}) + if err := m.SampleType[len(m.SampleType)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sample", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sample = append(m.Sample, Sample{}) + if err := m.Sample[len(m.Sample)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mapping", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Mapping = append(m.Mapping, Mapping{}) + if err := m.Mapping[len(m.Mapping)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Location", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Location = append(m.Location, Location{}) + if err := m.Location[len(m.Location)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Function", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Function = append(m.Function, Function{}) + if err := m.Function[len(m.Function)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringTable", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StringTable = append(m.StringTable, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DropFrames", wireType) + } + m.DropFrames = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DropFrames |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field KeepFrames", wireType) + } + m.KeepFrames = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.KeepFrames |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeNanos", wireType) + } + m.TimeNanos = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TimeNanos |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DurationNanos", wireType) + } + m.DurationNanos = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DurationNanos |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PeriodType", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.PeriodType.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) + } + m.Period = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Period |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 13: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Comment = append(m.Comment, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Comment) == 0 { + m.Comment = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Comment = append(m.Comment, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) + } + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultSampleType", wireType) + } + m.DefaultSampleType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DefaultSampleType |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 15: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.LocationIndices = append(m.LocationIndices, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.LocationIndices) == 0 { + m.LocationIndices = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.LocationIndices = append(m.LocationIndices, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field LocationIndices", wireType) + } + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AttributeTable", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AttributeTable = append(m.AttributeTable, v1.KeyValue{}) + if err := m.AttributeTable[len(m.AttributeTable)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AttributeUnits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AttributeUnits = append(m.AttributeUnits, AttributeUnit{}) + if err := m.AttributeUnits[len(m.AttributeUnits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LinkTable", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LinkTable = append(m.LinkTable, Link{}) + if err := m.LinkTable[len(m.LinkTable)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPprofextended(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPprofextended + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AttributeUnit) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AttributeUnit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AttributeUnit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AttributeKey", wireType) + } + m.AttributeKey = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AttributeKey |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType) + } + m.Unit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Unit |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipPprofextended(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPprofextended + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Link) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Link: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Link: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TraceId", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TraceId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpanId", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SpanId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPprofextended(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPprofextended + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ValueType) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValueType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValueType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType) + } + m.Unit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Unit |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregationTemporality", wireType) + } + m.AggregationTemporality = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AggregationTemporality |= AggregationTemporality(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipPprofextended(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPprofextended + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Sample) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Sample: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Sample: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.LocationIndex = append(m.LocationIndex, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.LocationIndex) == 0 { + m.LocationIndex = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.LocationIndex = append(m.LocationIndex, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field LocationIndex", wireType) + } + case 2: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Value = append(m.Value, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Value) == 0 { + m.Value = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Value = append(m.Value, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Label = append(m.Label, Label{}) + if err := m.Label[len(m.Label)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LocationsStartIndex", wireType) + } + m.LocationsStartIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LocationsStartIndex |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LocationsLength", wireType) + } + m.LocationsLength = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LocationsLength |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StacktraceIdIndex", wireType) + } + m.StacktraceIdIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StacktraceIdIndex |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Attributes = append(m.Attributes, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Attributes) == 0 { + m.Attributes = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Attributes = append(m.Attributes, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Link", wireType) + } + m.Link = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Link |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 13: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.TimestampsUnixNano = append(m.TimestampsUnixNano, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.TimestampsUnixNano) == 0 { + m.TimestampsUnixNano = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.TimestampsUnixNano = append(m.TimestampsUnixNano, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field TimestampsUnixNano", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipPprofextended(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPprofextended + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Label) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Label: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Label: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + m.Key = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Key |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Str", wireType) + } + m.Str = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Str |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Num", wireType) + } + m.Num = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Num |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumUnit", wireType) + } + m.NumUnit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumUnit |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipPprofextended(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPprofextended + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Mapping) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Mapping: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Mapping: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemoryStart", wireType) + } + m.MemoryStart = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MemoryStart |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemoryLimit", wireType) + } + m.MemoryLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MemoryLimit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FileOffset", wireType) + } + m.FileOffset = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FileOffset |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Filename", wireType) + } + m.Filename = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Filename |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BuildId", wireType) + } + m.BuildId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BuildId |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HasFunctions", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.HasFunctions = bool(v != 0) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HasFilenames", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.HasFilenames = bool(v != 0) + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HasLineNumbers", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.HasLineNumbers = bool(v != 0) + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HasInlineFrames", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.HasInlineFrames = bool(v != 0) + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BuildIdKind", wireType) + } + m.BuildIdKind = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BuildIdKind |= BuildIdKind(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 12: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Attributes = append(m.Attributes, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Attributes) == 0 { + m.Attributes = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Attributes = append(m.Attributes, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipPprofextended(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPprofextended + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Location) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Location: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Location: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MappingIndex", wireType) + } + m.MappingIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MappingIndex |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + m.Address = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Address |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Line", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Line = append(m.Line, Line{}) + if err := m.Line[len(m.Line)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsFolded", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsFolded = bool(v != 0) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TypeIndex", wireType) + } + m.TypeIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TypeIndex |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Attributes = append(m.Attributes, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Attributes) == 0 { + m.Attributes = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Attributes = append(m.Attributes, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipPprofextended(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPprofextended + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Line) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Line: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Line: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FunctionIndex", wireType) + } + m.FunctionIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FunctionIndex |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Line", wireType) + } + m.Line = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Line |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Column", wireType) + } + m.Column = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Column |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipPprofextended(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPprofextended + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Function) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Function: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Function: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + m.Name = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Name |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SystemName", wireType) + } + m.SystemName = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SystemName |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Filename", wireType) + } + m.Filename = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Filename |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StartLine", wireType) + } + m.StartLine = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StartLine |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipPprofextended(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPprofextended + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipPprofextended(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPprofextended + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPprofextended + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPprofextended + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthPprofextended + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupPprofextended + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthPprofextended + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthPprofextended = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPprofextended = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupPprofextended = fmt.Errorf("proto: unexpected end of group") +) diff --git a/pdata/internal/data/protogen/profiles/v1experimental/profiles.pb.go b/pdata/internal/data/protogen/profiles/v1experimental/profiles.pb.go new file mode 100644 index 00000000000..6e4662c248b --- /dev/null +++ b/pdata/internal/data/protogen/profiles/v1experimental/profiles.pb.go @@ -0,0 +1,1482 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: opentelemetry/proto/profiles/v1experimental/profiles.proto + +package v1experimental + +import ( + encoding_binary "encoding/binary" + fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + + v11 "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" + v1 "go.opentelemetry.io/collector/pdata/internal/data/protogen/resource/v1" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// ProfilesData represents the profiles data that can be stored in persistent storage, +// OR can be embedded by other protocols that transfer OTLP profiles data but do not +// implement the OTLP protocol. +// +// The main difference between this message and collector protocol is that +// in this message there will not be any "control" or "metadata" specific to +// OTLP protocol. +// +// When new fields are added into this message, the OTLP request MUST be updated +// as well. +type ProfilesData struct { + // An array of ResourceProfiles. + // For data coming from a single resource this array will typically contain + // one element. Intermediary nodes that receive data from multiple origins + // typically batch the data before forwarding further and in that case this + // array will contain multiple elements. + ResourceProfiles []*ResourceProfiles `protobuf:"bytes,1,rep,name=resource_profiles,json=resourceProfiles,proto3" json:"resource_profiles,omitempty"` +} + +func (m *ProfilesData) Reset() { *m = ProfilesData{} } +func (m *ProfilesData) String() string { return proto.CompactTextString(m) } +func (*ProfilesData) ProtoMessage() {} +func (*ProfilesData) Descriptor() ([]byte, []int) { + return fileDescriptor_394731f2296acea3, []int{0} +} +func (m *ProfilesData) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProfilesData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProfilesData.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ProfilesData) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProfilesData.Merge(m, src) +} +func (m *ProfilesData) XXX_Size() int { + return m.Size() +} +func (m *ProfilesData) XXX_DiscardUnknown() { + xxx_messageInfo_ProfilesData.DiscardUnknown(m) +} + +var xxx_messageInfo_ProfilesData proto.InternalMessageInfo + +func (m *ProfilesData) GetResourceProfiles() []*ResourceProfiles { + if m != nil { + return m.ResourceProfiles + } + return nil +} + +// A collection of ScopeProfiles from a Resource. +type ResourceProfiles struct { + // The resource for the profiles in this message. + // If this field is not set then no resource info is known. + Resource v1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource"` + // A list of ScopeProfiles that originate from a resource. + ScopeProfiles []*ScopeProfiles `protobuf:"bytes,2,rep,name=scope_profiles,json=scopeProfiles,proto3" json:"scope_profiles,omitempty"` + // The Schema URL, if known. This is the identifier of the Schema that the resource data + // is recorded in. To learn more about Schema URL see + // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url + // This schema_url applies to the data in the "resource" field. It does not apply + // to the data in the "scope_profiles" field which have their own schema_url field. + SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"` +} + +func (m *ResourceProfiles) Reset() { *m = ResourceProfiles{} } +func (m *ResourceProfiles) String() string { return proto.CompactTextString(m) } +func (*ResourceProfiles) ProtoMessage() {} +func (*ResourceProfiles) Descriptor() ([]byte, []int) { + return fileDescriptor_394731f2296acea3, []int{1} +} +func (m *ResourceProfiles) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceProfiles) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResourceProfiles.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ResourceProfiles) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceProfiles.Merge(m, src) +} +func (m *ResourceProfiles) XXX_Size() int { + return m.Size() +} +func (m *ResourceProfiles) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceProfiles.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceProfiles proto.InternalMessageInfo + +func (m *ResourceProfiles) GetResource() v1.Resource { + if m != nil { + return m.Resource + } + return v1.Resource{} +} + +func (m *ResourceProfiles) GetScopeProfiles() []*ScopeProfiles { + if m != nil { + return m.ScopeProfiles + } + return nil +} + +func (m *ResourceProfiles) GetSchemaUrl() string { + if m != nil { + return m.SchemaUrl + } + return "" +} + +// A collection of ProfileContainers produced by an InstrumentationScope. +type ScopeProfiles struct { + // The instrumentation scope information for the profiles in this message. + // Semantically when InstrumentationScope isn't set, it is equivalent with + // an empty instrumentation scope name (unknown). + Scope v11.InstrumentationScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope"` + // A list of ProfileContainers that originate from an instrumentation scope. + Profiles []*ProfileContainer `protobuf:"bytes,2,rep,name=profiles,proto3" json:"profiles,omitempty"` + // The Schema URL, if known. This is the identifier of the Schema that the metric data + // is recorded in. To learn more about Schema URL see + // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url + // This schema_url applies to all profiles in the "profiles" field. + SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"` +} + +func (m *ScopeProfiles) Reset() { *m = ScopeProfiles{} } +func (m *ScopeProfiles) String() string { return proto.CompactTextString(m) } +func (*ScopeProfiles) ProtoMessage() {} +func (*ScopeProfiles) Descriptor() ([]byte, []int) { + return fileDescriptor_394731f2296acea3, []int{2} +} +func (m *ScopeProfiles) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ScopeProfiles) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ScopeProfiles.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ScopeProfiles) XXX_Merge(src proto.Message) { + xxx_messageInfo_ScopeProfiles.Merge(m, src) +} +func (m *ScopeProfiles) XXX_Size() int { + return m.Size() +} +func (m *ScopeProfiles) XXX_DiscardUnknown() { + xxx_messageInfo_ScopeProfiles.DiscardUnknown(m) +} + +var xxx_messageInfo_ScopeProfiles proto.InternalMessageInfo + +func (m *ScopeProfiles) GetScope() v11.InstrumentationScope { + if m != nil { + return m.Scope + } + return v11.InstrumentationScope{} +} + +func (m *ScopeProfiles) GetProfiles() []*ProfileContainer { + if m != nil { + return m.Profiles + } + return nil +} + +func (m *ScopeProfiles) GetSchemaUrl() string { + if m != nil { + return m.SchemaUrl + } + return "" +} + +// A ProfileContainer represents a single profile. It wraps pprof profile with OpenTelemetry specific metadata. +type ProfileContainer struct { + // A globally unique identifier for a profile. The ID is a 16-byte array. An ID with + // all zeroes is considered invalid. + // + // This field is required. + ProfileId []byte `protobuf:"bytes,1,opt,name=profile_id,json=profileId,proto3" json:"profile_id,omitempty"` + // start_time_unix_nano is the start time of the profile. + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. + // + // This field is semantically required and it is expected that end_time >= start_time. + StartTimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=start_time_unix_nano,json=startTimeUnixNano,proto3" json:"start_time_unix_nano,omitempty"` + // end_time_unix_nano is the end time of the profile. + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. + // + // This field is semantically required and it is expected that end_time >= start_time. + EndTimeUnixNano uint64 `protobuf:"fixed64,3,opt,name=end_time_unix_nano,json=endTimeUnixNano,proto3" json:"end_time_unix_nano,omitempty"` + // attributes is a collection of key/value pairs. Note, global attributes + // like server name can be set using the resource API. Examples of attributes: + // + // "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" + // "/http/server_latency": 300 + // "abc.com/myattribute": true + // "abc.com/score": 10.239 + // + // The OpenTelemetry API specification further restricts the allowed value types: + // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute + // Attribute keys MUST be unique (it is not allowed to have more than one + // attribute with the same key). + Attributes []v11.KeyValue `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes"` + // dropped_attributes_count is the number of attributes that were discarded. Attributes + // can be discarded because their keys are too long or because there are too many + // attributes. If this value is 0, then no attributes were dropped. + DroppedAttributesCount uint32 `protobuf:"varint,5,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"` + // Specifies format of the original payload. Common values are defined in semantic conventions. [required if original_payload is present] + OriginalPayloadFormat string `protobuf:"bytes,6,opt,name=original_payload_format,json=originalPayloadFormat,proto3" json:"original_payload_format,omitempty"` + // Original payload can be stored in this field. This can be useful for users who want to get the original payload. + // Formats such as JFR are highly extensible and can contain more information than what is defined in this spec. + // Inclusion of original payload should be configurable by the user. Default behavior should be to not include the original payload. + // If the original payload is in pprof format, it SHOULD not be included in this field. + // The field is optional, however if it is present `profile` MUST be present and contain the same profiling information. + OriginalPayload []byte `protobuf:"bytes,7,opt,name=original_payload,json=originalPayload,proto3" json:"original_payload,omitempty"` + // This is a reference to a pprof profile. Required, even when original_payload is present. + Profile Profile `protobuf:"bytes,8,opt,name=profile,proto3" json:"profile"` +} + +func (m *ProfileContainer) Reset() { *m = ProfileContainer{} } +func (m *ProfileContainer) String() string { return proto.CompactTextString(m) } +func (*ProfileContainer) ProtoMessage() {} +func (*ProfileContainer) Descriptor() ([]byte, []int) { + return fileDescriptor_394731f2296acea3, []int{3} +} +func (m *ProfileContainer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProfileContainer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProfileContainer.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ProfileContainer) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProfileContainer.Merge(m, src) +} +func (m *ProfileContainer) XXX_Size() int { + return m.Size() +} +func (m *ProfileContainer) XXX_DiscardUnknown() { + xxx_messageInfo_ProfileContainer.DiscardUnknown(m) +} + +var xxx_messageInfo_ProfileContainer proto.InternalMessageInfo + +func (m *ProfileContainer) GetProfileId() []byte { + if m != nil { + return m.ProfileId + } + return nil +} + +func (m *ProfileContainer) GetStartTimeUnixNano() uint64 { + if m != nil { + return m.StartTimeUnixNano + } + return 0 +} + +func (m *ProfileContainer) GetEndTimeUnixNano() uint64 { + if m != nil { + return m.EndTimeUnixNano + } + return 0 +} + +func (m *ProfileContainer) GetAttributes() []v11.KeyValue { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *ProfileContainer) GetDroppedAttributesCount() uint32 { + if m != nil { + return m.DroppedAttributesCount + } + return 0 +} + +func (m *ProfileContainer) GetOriginalPayloadFormat() string { + if m != nil { + return m.OriginalPayloadFormat + } + return "" +} + +func (m *ProfileContainer) GetOriginalPayload() []byte { + if m != nil { + return m.OriginalPayload + } + return nil +} + +func (m *ProfileContainer) GetProfile() Profile { + if m != nil { + return m.Profile + } + return Profile{} +} + +func init() { + proto.RegisterType((*ProfilesData)(nil), "opentelemetry.proto.profiles.v1experimental.ProfilesData") + proto.RegisterType((*ResourceProfiles)(nil), "opentelemetry.proto.profiles.v1experimental.ResourceProfiles") + proto.RegisterType((*ScopeProfiles)(nil), "opentelemetry.proto.profiles.v1experimental.ScopeProfiles") + proto.RegisterType((*ProfileContainer)(nil), "opentelemetry.proto.profiles.v1experimental.ProfileContainer") +} + +func init() { + proto.RegisterFile("opentelemetry/proto/profiles/v1experimental/profiles.proto", fileDescriptor_394731f2296acea3) +} + +var fileDescriptor_394731f2296acea3 = []byte{ + // 652 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x51, 0x6b, 0xdb, 0x3a, + 0x14, 0xc7, 0xe3, 0xa6, 0x4d, 0x52, 0xb5, 0xb9, 0x4d, 0x45, 0xef, 0xbd, 0xa6, 0x70, 0x73, 0x43, + 0x5e, 0x96, 0xae, 0x60, 0x93, 0x76, 0x8c, 0x51, 0x18, 0x63, 0xed, 0x36, 0xe8, 0xca, 0xd6, 0xe0, + 0xb5, 0x85, 0xed, 0xc5, 0xa8, 0xf1, 0x69, 0xa6, 0x61, 0x4b, 0x46, 0x96, 0x43, 0xba, 0x4f, 0xb1, + 0xcf, 0xb1, 0x4f, 0xd2, 0xc7, 0xee, 0x6d, 0x6c, 0x30, 0x46, 0xfb, 0xb2, 0x7e, 0x8b, 0x61, 0x59, + 0xf6, 0x12, 0x93, 0x51, 0xb2, 0x17, 0x23, 0x9f, 0xf3, 0x3f, 0xbf, 0xa3, 0xff, 0x91, 0x10, 0xda, + 0xe1, 0x21, 0x30, 0x09, 0x3e, 0x04, 0x20, 0xc5, 0xb9, 0x1d, 0x0a, 0x2e, 0x79, 0xf2, 0x3d, 0xa3, + 0x3e, 0x44, 0xf6, 0xb0, 0x0b, 0xa3, 0x10, 0x04, 0x0d, 0x80, 0x49, 0xe2, 0xe7, 0x71, 0x4b, 0xc9, + 0xf0, 0xe6, 0x44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e, 0xc1, 0xc1, 0x87, 0x68, 0x41, 0x91, 0xb4, + 0xcb, 0xed, 0xa9, 0x5b, 0xd2, 0x97, 0x63, 0xd8, 0xb5, 0xf6, 0x59, 0x24, 0x45, 0xac, 0x76, 0x24, + 0x29, 0x67, 0x8a, 0xa5, 0xfd, 0xa6, 0x1c, 0xfc, 0x1a, 0xd5, 0x0a, 0x36, 0x67, 0x3b, 0x31, 0xbd, + 0xb3, 0x3d, 0xce, 0x24, 0xa1, 0x0c, 0x84, 0x93, 0xe3, 0x6e, 0x31, 0xd9, 0xfe, 0x54, 0x46, 0x8d, + 0x62, 0x75, 0x52, 0xa3, 0xeb, 0x5d, 0xea, 0x29, 0x93, 0xcb, 0xce, 0xa2, 0x8e, 0xec, 0x7b, 0xd8, + 0x46, 0x6b, 0x91, 0x24, 0x42, 0xba, 0x92, 0x06, 0xe0, 0xc6, 0x8c, 0x8e, 0x5c, 0x46, 0x18, 0x37, + 0xe7, 0x5a, 0x46, 0xa7, 0xe2, 0xac, 0xaa, 0xdc, 0x11, 0x0d, 0xe0, 0x98, 0xd1, 0xd1, 0x4b, 0xc2, + 0x38, 0xde, 0x44, 0x18, 0x98, 0x57, 0x94, 0x97, 0x95, 0x7c, 0x05, 0x98, 0x37, 0x21, 0x7e, 0x81, + 0x10, 0x91, 0x52, 0xd0, 0xd3, 0x58, 0x42, 0x64, 0xce, 0xab, 0x69, 0xdc, 0xb9, 0x65, 0xc2, 0x07, + 0x70, 0x7e, 0x42, 0xfc, 0x38, 0x9b, 0xea, 0x18, 0x00, 0x3f, 0x40, 0xa6, 0x27, 0x78, 0x18, 0x82, + 0xe7, 0xfe, 0x8a, 0xba, 0x7d, 0x1e, 0x33, 0x69, 0x2e, 0xb4, 0x8c, 0x4e, 0xdd, 0xf9, 0x47, 0xe7, + 0x1f, 0xe7, 0xe9, 0xbd, 0x24, 0x8b, 0xef, 0xa3, 0x7f, 0xb9, 0xa0, 0x03, 0xca, 0x88, 0xef, 0x86, + 0xe4, 0xdc, 0xe7, 0xc4, 0x73, 0xcf, 0xb8, 0x08, 0x88, 0x34, 0x2b, 0x6a, 0x8c, 0x7f, 0x67, 0xe9, + 0x5e, 0x9a, 0x7d, 0xa6, 0x92, 0x78, 0x03, 0x35, 0x8a, 0x75, 0x66, 0x55, 0xcd, 0x70, 0xa5, 0x50, + 0x80, 0x8f, 0x50, 0x55, 0x8f, 0xd5, 0xac, 0xa9, 0xab, 0x74, 0xef, 0x4f, 0x8e, 0x5d, 0xbb, 0xce, + 0x50, 0xbb, 0x5f, 0x8d, 0x8b, 0xab, 0xa6, 0x71, 0x79, 0xd5, 0x34, 0xbe, 0x5f, 0x35, 0x8d, 0x0f, + 0xd7, 0xcd, 0xd2, 0xe5, 0x75, 0xb3, 0xf4, 0xf9, 0xba, 0x59, 0x42, 0x16, 0xe5, 0xb3, 0x74, 0xd8, + 0xad, 0x67, 0x77, 0xbe, 0x97, 0xc8, 0x7a, 0xc6, 0x1b, 0x67, 0x50, 0x04, 0xd0, 0xe4, 0x45, 0xf4, + 0x7d, 0xe8, 0x4b, 0x2e, 0xec, 0xd0, 0x23, 0x92, 0xd8, 0x94, 0x49, 0x10, 0x8c, 0xf8, 0xb6, 0xfa, + 0x53, 0x1d, 0x06, 0xc0, 0x7e, 0xf7, 0xb8, 0x7d, 0x9c, 0xdb, 0x3c, 0x0c, 0x81, 0x1d, 0xe5, 0x44, + 0xd5, 0x2b, 0x33, 0x17, 0x59, 0x27, 0xdd, 0xa7, 0x63, 0xea, 0xd3, 0x8a, 0xe2, 0x6d, 0xff, 0x0c, + 0x00, 0x00, 0xff, 0xff, 0xe1, 0x89, 0x49, 0xa4, 0x1b, 0x06, 0x00, 0x00, +} + +func (m *ProfilesData) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ProfilesData) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProfilesData) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ResourceProfiles) > 0 { + for iNdEx := len(m.ResourceProfiles) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ResourceProfiles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProfiles(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ResourceProfiles) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceProfiles) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceProfiles) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SchemaUrl) > 0 { + i -= len(m.SchemaUrl) + copy(dAtA[i:], m.SchemaUrl) + i = encodeVarintProfiles(dAtA, i, uint64(len(m.SchemaUrl))) + i-- + dAtA[i] = 0x1a + } + if len(m.ScopeProfiles) > 0 { + for iNdEx := len(m.ScopeProfiles) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ScopeProfiles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProfiles(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProfiles(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ScopeProfiles) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ScopeProfiles) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ScopeProfiles) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SchemaUrl) > 0 { + i -= len(m.SchemaUrl) + copy(dAtA[i:], m.SchemaUrl) + i = encodeVarintProfiles(dAtA, i, uint64(len(m.SchemaUrl))) + i-- + dAtA[i] = 0x1a + } + if len(m.Profiles) > 0 { + for iNdEx := len(m.Profiles) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Profiles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProfiles(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Scope.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProfiles(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ProfileContainer) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ProfileContainer) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProfileContainer) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Profile.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProfiles(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + if len(m.OriginalPayload) > 0 { + i -= len(m.OriginalPayload) + copy(dAtA[i:], m.OriginalPayload) + i = encodeVarintProfiles(dAtA, i, uint64(len(m.OriginalPayload))) + i-- + dAtA[i] = 0x3a + } + if len(m.OriginalPayloadFormat) > 0 { + i -= len(m.OriginalPayloadFormat) + copy(dAtA[i:], m.OriginalPayloadFormat) + i = encodeVarintProfiles(dAtA, i, uint64(len(m.OriginalPayloadFormat))) + i-- + dAtA[i] = 0x32 + } + if m.DroppedAttributesCount != 0 { + i = encodeVarintProfiles(dAtA, i, uint64(m.DroppedAttributesCount)) + i-- + dAtA[i] = 0x28 + } + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProfiles(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if m.EndTimeUnixNano != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.EndTimeUnixNano)) + i-- + dAtA[i] = 0x19 + } + if m.StartTimeUnixNano != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.StartTimeUnixNano)) + i-- + dAtA[i] = 0x11 + } + if len(m.ProfileId) > 0 { + i -= len(m.ProfileId) + copy(dAtA[i:], m.ProfileId) + i = encodeVarintProfiles(dAtA, i, uint64(len(m.ProfileId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintProfiles(dAtA []byte, offset int, v uint64) int { + offset -= sovProfiles(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ProfilesData) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ResourceProfiles) > 0 { + for _, e := range m.ResourceProfiles { + l = e.Size() + n += 1 + l + sovProfiles(uint64(l)) + } + } + return n +} + +func (m *ResourceProfiles) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Resource.Size() + n += 1 + l + sovProfiles(uint64(l)) + if len(m.ScopeProfiles) > 0 { + for _, e := range m.ScopeProfiles { + l = e.Size() + n += 1 + l + sovProfiles(uint64(l)) + } + } + l = len(m.SchemaUrl) + if l > 0 { + n += 1 + l + sovProfiles(uint64(l)) + } + return n +} + +func (m *ScopeProfiles) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Scope.Size() + n += 1 + l + sovProfiles(uint64(l)) + if len(m.Profiles) > 0 { + for _, e := range m.Profiles { + l = e.Size() + n += 1 + l + sovProfiles(uint64(l)) + } + } + l = len(m.SchemaUrl) + if l > 0 { + n += 1 + l + sovProfiles(uint64(l)) + } + return n +} + +func (m *ProfileContainer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ProfileId) + if l > 0 { + n += 1 + l + sovProfiles(uint64(l)) + } + if m.StartTimeUnixNano != 0 { + n += 9 + } + if m.EndTimeUnixNano != 0 { + n += 9 + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovProfiles(uint64(l)) + } + } + if m.DroppedAttributesCount != 0 { + n += 1 + sovProfiles(uint64(m.DroppedAttributesCount)) + } + l = len(m.OriginalPayloadFormat) + if l > 0 { + n += 1 + l + sovProfiles(uint64(l)) + } + l = len(m.OriginalPayload) + if l > 0 { + n += 1 + l + sovProfiles(uint64(l)) + } + l = m.Profile.Size() + n += 1 + l + sovProfiles(uint64(l)) + return n +} + +func sovProfiles(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozProfiles(x uint64) (n int) { + return sovProfiles(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ProfilesData) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ProfilesData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProfilesData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceProfiles", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceProfiles = append(m.ResourceProfiles, &ResourceProfiles{}) + if err := m.ResourceProfiles[len(m.ResourceProfiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProfiles(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProfiles + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceProfiles) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceProfiles: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceProfiles: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ScopeProfiles", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ScopeProfiles = append(m.ScopeProfiles, &ScopeProfiles{}) + if err := m.ScopeProfiles[len(m.ScopeProfiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SchemaUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProfiles(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProfiles + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ScopeProfiles) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ScopeProfiles: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ScopeProfiles: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Scope.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Profiles", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Profiles = append(m.Profiles, &ProfileContainer{}) + if err := m.Profiles[len(m.Profiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SchemaUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProfiles(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProfiles + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ProfileContainer) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ProfileContainer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProfileContainer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProfileId", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProfileId = append(m.ProfileId[:0], dAtA[iNdEx:postIndex]...) + if m.ProfileId == nil { + m.ProfileId = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) + } + m.StartTimeUnixNano = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.StartTimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 3: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field EndTimeUnixNano", wireType) + } + m.EndTimeUnixNano = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.EndTimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, v11.KeyValue{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) + } + m.DroppedAttributesCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DroppedAttributesCount |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OriginalPayloadFormat", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OriginalPayloadFormat = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OriginalPayload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OriginalPayload = append(m.OriginalPayload[:0], dAtA[iNdEx:postIndex]...) + if m.OriginalPayload == nil { + m.OriginalPayload = []byte{} + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Profile", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Profile.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProfiles(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProfiles + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProfiles(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProfiles + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProfiles + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProfiles + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthProfiles + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupProfiles + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthProfiles + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthProfiles = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProfiles = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupProfiles = fmt.Errorf("proto: unexpected end of group") +) diff --git a/pdata/internal/generated_wrapper_byteslice.go b/pdata/internal/generated_wrapper_byteslice.go index ea3a3d95cd1..1f3548b2055 100644 --- a/pdata/internal/generated_wrapper_byteslice.go +++ b/pdata/internal/generated_wrapper_byteslice.go @@ -22,3 +22,13 @@ func GetByteSliceState(ms ByteSlice) *State { func NewByteSlice(orig *[]byte, state *State) ByteSlice { return ByteSlice{orig: orig, state: state} } + +func FillTestByteSlice(tv ByteSlice) { +} + +func GenerateTestByteSlice() ByteSlice { + state := StateMutable + var orig []byte = nil + + return ByteSlice{&orig, &state} +} diff --git a/pdata/internal/generated_wrapper_float64slice.go b/pdata/internal/generated_wrapper_float64slice.go index 88d6c33d78e..f13349cded6 100644 --- a/pdata/internal/generated_wrapper_float64slice.go +++ b/pdata/internal/generated_wrapper_float64slice.go @@ -22,3 +22,13 @@ func GetFloat64SliceState(ms Float64Slice) *State { func NewFloat64Slice(orig *[]float64, state *State) Float64Slice { return Float64Slice{orig: orig, state: state} } + +func FillTestFloat64Slice(tv Float64Slice) { +} + +func GenerateTestFloat64Slice() Float64Slice { + state := StateMutable + var orig []float64 = nil + + return Float64Slice{&orig, &state} +} diff --git a/pdata/internal/generated_wrapper_int64slice.go b/pdata/internal/generated_wrapper_int64slice.go new file mode 100644 index 00000000000..cd85707b15c --- /dev/null +++ b/pdata/internal/generated_wrapper_int64slice.go @@ -0,0 +1,34 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +type Int64Slice struct { + orig *[]int64 + state *State +} + +func GetOrigInt64Slice(ms Int64Slice) *[]int64 { + return ms.orig +} + +func GetInt64SliceState(ms Int64Slice) *State { + return ms.state +} + +func NewInt64Slice(orig *[]int64, state *State) Int64Slice { + return Int64Slice{orig: orig, state: state} +} + +func FillTestInt64Slice(tv Int64Slice) { +} + +func GenerateTestInt64Slice() Int64Slice { + state := StateMutable + var orig []int64 = nil + + return Int64Slice{&orig, &state} +} diff --git a/pdata/internal/generated_wrapper_stringslice.go b/pdata/internal/generated_wrapper_stringslice.go new file mode 100644 index 00000000000..508912653f9 --- /dev/null +++ b/pdata/internal/generated_wrapper_stringslice.go @@ -0,0 +1,34 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +type StringSlice struct { + orig *[]string + state *State +} + +func GetOrigStringSlice(ms StringSlice) *[]string { + return ms.orig +} + +func GetStringSliceState(ms StringSlice) *State { + return ms.state +} + +func NewStringSlice(orig *[]string, state *State) StringSlice { + return StringSlice{orig: orig, state: state} +} + +func FillTestStringSlice(tv StringSlice) { +} + +func GenerateTestStringSlice() StringSlice { + state := StateMutable + var orig []string = nil + + return StringSlice{&orig, &state} +} diff --git a/pdata/internal/generated_wrapper_uint64slice.go b/pdata/internal/generated_wrapper_uint64slice.go index fed633ae260..bbb4a4fafec 100644 --- a/pdata/internal/generated_wrapper_uint64slice.go +++ b/pdata/internal/generated_wrapper_uint64slice.go @@ -22,3 +22,13 @@ func GetUInt64SliceState(ms UInt64Slice) *State { func NewUInt64Slice(orig *[]uint64, state *State) UInt64Slice { return UInt64Slice{orig: orig, state: state} } + +func FillTestUInt64Slice(tv UInt64Slice) { +} + +func GenerateTestUInt64Slice() UInt64Slice { + state := StateMutable + var orig []uint64 = nil + + return UInt64Slice{&orig, &state} +} diff --git a/pdata/pcommon/generated_byteslice_test.go b/pdata/pcommon/generated_byteslice_test.go index 9594e0d11d5..1c0dc8219cd 100644 --- a/pdata/pcommon/generated_byteslice_test.go +++ b/pdata/pcommon/generated_byteslice_test.go @@ -69,7 +69,7 @@ func TestByteSliceReadOnly(t *testing.T) { func TestByteSliceAppend(t *testing.T) { ms := NewByteSlice() ms.FromRaw([]byte{1, 2, 3}) - ms.Append(4, 5) + ms.Append(5, 5) assert.Equal(t, 5, ms.Len()) assert.Equal(t, byte(5), ms.At(4)) } diff --git a/pdata/pcommon/generated_float64slice_test.go b/pdata/pcommon/generated_float64slice_test.go index 7d2dd87bece..d8cbefb212e 100644 --- a/pdata/pcommon/generated_float64slice_test.go +++ b/pdata/pcommon/generated_float64slice_test.go @@ -69,7 +69,7 @@ func TestFloat64SliceReadOnly(t *testing.T) { func TestFloat64SliceAppend(t *testing.T) { ms := NewFloat64Slice() ms.FromRaw([]float64{1, 2, 3}) - ms.Append(4, 5) + ms.Append(5, 5) assert.Equal(t, 5, ms.Len()) assert.Equal(t, float64(5), ms.At(4)) } diff --git a/pdata/pcommon/generated_int64slice.go b/pdata/pcommon/generated_int64slice.go new file mode 100644 index 00000000000..e50cd3cc3a5 --- /dev/null +++ b/pdata/pcommon/generated_int64slice.go @@ -0,0 +1,108 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pcommon + +import ( + "go.opentelemetry.io/collector/pdata/internal" +) + +// Int64Slice represents a []int64 slice. +// The instance of Int64Slice can be assigned to multiple objects since it's immutable. +// +// Must use NewInt64Slice function to create new instances. +// Important: zero-initialized instance is not valid for use. +type Int64Slice internal.Int64Slice + +func (ms Int64Slice) getOrig() *[]int64 { + return internal.GetOrigInt64Slice(internal.Int64Slice(ms)) +} + +func (ms Int64Slice) getState() *internal.State { + return internal.GetInt64SliceState(internal.Int64Slice(ms)) +} + +// NewInt64Slice creates a new empty Int64Slice. +func NewInt64Slice() Int64Slice { + orig := []int64(nil) + state := internal.StateMutable + return Int64Slice(internal.NewInt64Slice(&orig, &state)) +} + +// AsRaw returns a copy of the []int64 slice. +func (ms Int64Slice) AsRaw() []int64 { + return copyInt64Slice(nil, *ms.getOrig()) +} + +// FromRaw copies raw []int64 into the slice Int64Slice. +func (ms Int64Slice) FromRaw(val []int64) { + ms.getState().AssertMutable() + *ms.getOrig() = copyInt64Slice(*ms.getOrig(), val) +} + +// Len returns length of the []int64 slice value. +// Equivalent of len(int64Slice). +func (ms Int64Slice) Len() int { + return len(*ms.getOrig()) +} + +// At returns an item from particular index. +// Equivalent of int64Slice[i]. +func (ms Int64Slice) At(i int) int64 { + return (*ms.getOrig())[i] +} + +// SetAt sets int64 item at particular index. +// Equivalent of int64Slice[i] = val +func (ms Int64Slice) SetAt(i int, val int64) { + ms.getState().AssertMutable() + (*ms.getOrig())[i] = val +} + +// EnsureCapacity ensures Int64Slice has at least the specified capacity. +// 1. If the newCap <= cap, then is no change in capacity. +// 2. If the newCap > cap, then the slice capacity will be expanded to the provided value which will be equivalent of: +// buf := make([]int64, len(int64Slice), newCap) +// copy(buf, int64Slice) +// int64Slice = buf +func (ms Int64Slice) EnsureCapacity(newCap int) { + ms.getState().AssertMutable() + oldCap := cap(*ms.getOrig()) + if newCap <= oldCap { + return + } + + newOrig := make([]int64, len(*ms.getOrig()), newCap) + copy(newOrig, *ms.getOrig()) + *ms.getOrig() = newOrig +} + +// Append appends extra elements to Int64Slice. +// Equivalent of int64Slice = append(int64Slice, elms...) +func (ms Int64Slice) Append(elms ...int64) { + ms.getState().AssertMutable() + *ms.getOrig() = append(*ms.getOrig(), elms...) +} + +// MoveTo moves all elements from the current slice overriding the destination and +// resetting the current instance to its zero value. +func (ms Int64Slice) MoveTo(dest Int64Slice) { + ms.getState().AssertMutable() + dest.getState().AssertMutable() + *dest.getOrig() = *ms.getOrig() + *ms.getOrig() = nil +} + +// CopyTo copies all elements from the current slice overriding the destination. +func (ms Int64Slice) CopyTo(dest Int64Slice) { + dest.getState().AssertMutable() + *dest.getOrig() = copyInt64Slice(*dest.getOrig(), *ms.getOrig()) +} + +func copyInt64Slice(dst, src []int64) []int64 { + dst = dst[:0] + return append(dst, src...) +} diff --git a/pdata/pcommon/generated_int64slice_test.go b/pdata/pcommon/generated_int64slice_test.go new file mode 100644 index 00000000000..868e2088ca9 --- /dev/null +++ b/pdata/pcommon/generated_int64slice_test.go @@ -0,0 +1,83 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pcommon + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" +) + +func TestNewInt64Slice(t *testing.T) { + ms := NewInt64Slice() + assert.Equal(t, 0, ms.Len()) + ms.FromRaw([]int64{1, 2, 3}) + assert.Equal(t, 3, ms.Len()) + assert.Equal(t, []int64{1, 2, 3}, ms.AsRaw()) + ms.SetAt(1, int64(5)) + assert.Equal(t, []int64{1, 5, 3}, ms.AsRaw()) + ms.FromRaw([]int64{3}) + assert.Equal(t, 1, ms.Len()) + assert.Equal(t, int64(3), ms.At(0)) + + cp := NewInt64Slice() + ms.CopyTo(cp) + ms.SetAt(0, int64(2)) + assert.Equal(t, int64(2), ms.At(0)) + assert.Equal(t, int64(3), cp.At(0)) + ms.CopyTo(cp) + assert.Equal(t, int64(2), cp.At(0)) + + mv := NewInt64Slice() + ms.MoveTo(mv) + assert.Equal(t, 0, ms.Len()) + assert.Equal(t, 1, mv.Len()) + assert.Equal(t, int64(2), mv.At(0)) + ms.FromRaw([]int64{1, 2, 3}) + ms.MoveTo(mv) + assert.Equal(t, 3, mv.Len()) + assert.Equal(t, int64(1), mv.At(0)) +} + +func TestInt64SliceReadOnly(t *testing.T) { + raw := []int64{1, 2, 3} + state := internal.StateReadOnly + ms := Int64Slice(internal.NewInt64Slice(&raw, &state)) + + assert.Equal(t, 3, ms.Len()) + assert.Equal(t, int64(1), ms.At(0)) + assert.Panics(t, func() { ms.Append(1) }) + assert.Panics(t, func() { ms.EnsureCapacity(2) }) + assert.Equal(t, raw, ms.AsRaw()) + assert.Panics(t, func() { ms.FromRaw(raw) }) + + ms2 := NewInt64Slice() + ms.CopyTo(ms2) + assert.Equal(t, ms.AsRaw(), ms2.AsRaw()) + assert.Panics(t, func() { ms2.CopyTo(ms) }) + + assert.Panics(t, func() { ms.MoveTo(ms2) }) + assert.Panics(t, func() { ms2.MoveTo(ms) }) +} + +func TestInt64SliceAppend(t *testing.T) { + ms := NewInt64Slice() + ms.FromRaw([]int64{1, 2, 3}) + ms.Append(5, 5) + assert.Equal(t, 5, ms.Len()) + assert.Equal(t, int64(5), ms.At(4)) +} + +func TestInt64SliceEnsureCapacity(t *testing.T) { + ms := NewInt64Slice() + ms.EnsureCapacity(4) + assert.Equal(t, 4, cap(*ms.getOrig())) + ms.EnsureCapacity(2) + assert.Equal(t, 4, cap(*ms.getOrig())) +} diff --git a/pdata/pcommon/generated_stringslice.go b/pdata/pcommon/generated_stringslice.go new file mode 100644 index 00000000000..02a75c7a65c --- /dev/null +++ b/pdata/pcommon/generated_stringslice.go @@ -0,0 +1,108 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pcommon + +import ( + "go.opentelemetry.io/collector/pdata/internal" +) + +// StringSlice represents a []string slice. +// The instance of StringSlice can be assigned to multiple objects since it's immutable. +// +// Must use NewStringSlice function to create new instances. +// Important: zero-initialized instance is not valid for use. +type StringSlice internal.StringSlice + +func (ms StringSlice) getOrig() *[]string { + return internal.GetOrigStringSlice(internal.StringSlice(ms)) +} + +func (ms StringSlice) getState() *internal.State { + return internal.GetStringSliceState(internal.StringSlice(ms)) +} + +// NewStringSlice creates a new empty StringSlice. +func NewStringSlice() StringSlice { + orig := []string(nil) + state := internal.StateMutable + return StringSlice(internal.NewStringSlice(&orig, &state)) +} + +// AsRaw returns a copy of the []string slice. +func (ms StringSlice) AsRaw() []string { + return copyStringSlice(nil, *ms.getOrig()) +} + +// FromRaw copies raw []string into the slice StringSlice. +func (ms StringSlice) FromRaw(val []string) { + ms.getState().AssertMutable() + *ms.getOrig() = copyStringSlice(*ms.getOrig(), val) +} + +// Len returns length of the []string slice value. +// Equivalent of len(stringSlice). +func (ms StringSlice) Len() int { + return len(*ms.getOrig()) +} + +// At returns an item from particular index. +// Equivalent of stringSlice[i]. +func (ms StringSlice) At(i int) string { + return (*ms.getOrig())[i] +} + +// SetAt sets string item at particular index. +// Equivalent of stringSlice[i] = val +func (ms StringSlice) SetAt(i int, val string) { + ms.getState().AssertMutable() + (*ms.getOrig())[i] = val +} + +// EnsureCapacity ensures StringSlice has at least the specified capacity. +// 1. If the newCap <= cap, then is no change in capacity. +// 2. If the newCap > cap, then the slice capacity will be expanded to the provided value which will be equivalent of: +// buf := make([]string, len(stringSlice), newCap) +// copy(buf, stringSlice) +// stringSlice = buf +func (ms StringSlice) EnsureCapacity(newCap int) { + ms.getState().AssertMutable() + oldCap := cap(*ms.getOrig()) + if newCap <= oldCap { + return + } + + newOrig := make([]string, len(*ms.getOrig()), newCap) + copy(newOrig, *ms.getOrig()) + *ms.getOrig() = newOrig +} + +// Append appends extra elements to StringSlice. +// Equivalent of stringSlice = append(stringSlice, elms...) +func (ms StringSlice) Append(elms ...string) { + ms.getState().AssertMutable() + *ms.getOrig() = append(*ms.getOrig(), elms...) +} + +// MoveTo moves all elements from the current slice overriding the destination and +// resetting the current instance to its zero value. +func (ms StringSlice) MoveTo(dest StringSlice) { + ms.getState().AssertMutable() + dest.getState().AssertMutable() + *dest.getOrig() = *ms.getOrig() + *ms.getOrig() = nil +} + +// CopyTo copies all elements from the current slice overriding the destination. +func (ms StringSlice) CopyTo(dest StringSlice) { + dest.getState().AssertMutable() + *dest.getOrig() = copyStringSlice(*dest.getOrig(), *ms.getOrig()) +} + +func copyStringSlice(dst, src []string) []string { + dst = dst[:0] + return append(dst, src...) +} diff --git a/pdata/pcommon/generated_stringslice_test.go b/pdata/pcommon/generated_stringslice_test.go new file mode 100644 index 00000000000..c4a3b6b38a2 --- /dev/null +++ b/pdata/pcommon/generated_stringslice_test.go @@ -0,0 +1,83 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pcommon + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" +) + +func TestNewStringSlice(t *testing.T) { + ms := NewStringSlice() + assert.Equal(t, 0, ms.Len()) + ms.FromRaw([]string{"a", "b", "c"}) + assert.Equal(t, 3, ms.Len()) + assert.Equal(t, []string{"a", "b", "c"}, ms.AsRaw()) + ms.SetAt(1, string("d")) + assert.Equal(t, []string{"a", "d", "c"}, ms.AsRaw()) + ms.FromRaw([]string{"c"}) + assert.Equal(t, 1, ms.Len()) + assert.Equal(t, string("c"), ms.At(0)) + + cp := NewStringSlice() + ms.CopyTo(cp) + ms.SetAt(0, string("b")) + assert.Equal(t, string("b"), ms.At(0)) + assert.Equal(t, string("c"), cp.At(0)) + ms.CopyTo(cp) + assert.Equal(t, string("b"), cp.At(0)) + + mv := NewStringSlice() + ms.MoveTo(mv) + assert.Equal(t, 0, ms.Len()) + assert.Equal(t, 1, mv.Len()) + assert.Equal(t, string("b"), mv.At(0)) + ms.FromRaw([]string{"a", "b", "c"}) + ms.MoveTo(mv) + assert.Equal(t, 3, mv.Len()) + assert.Equal(t, string("a"), mv.At(0)) +} + +func TestStringSliceReadOnly(t *testing.T) { + raw := []string{"a", "b", "c"} + state := internal.StateReadOnly + ms := StringSlice(internal.NewStringSlice(&raw, &state)) + + assert.Equal(t, 3, ms.Len()) + assert.Equal(t, string("a"), ms.At(0)) + assert.Panics(t, func() { ms.Append("a") }) + assert.Panics(t, func() { ms.EnsureCapacity(2) }) + assert.Equal(t, raw, ms.AsRaw()) + assert.Panics(t, func() { ms.FromRaw(raw) }) + + ms2 := NewStringSlice() + ms.CopyTo(ms2) + assert.Equal(t, ms.AsRaw(), ms2.AsRaw()) + assert.Panics(t, func() { ms2.CopyTo(ms) }) + + assert.Panics(t, func() { ms.MoveTo(ms2) }) + assert.Panics(t, func() { ms2.MoveTo(ms) }) +} + +func TestStringSliceAppend(t *testing.T) { + ms := NewStringSlice() + ms.FromRaw([]string{"a", "b", "c"}) + ms.Append("d", "d") + assert.Equal(t, 5, ms.Len()) + assert.Equal(t, string("d"), ms.At(4)) +} + +func TestStringSliceEnsureCapacity(t *testing.T) { + ms := NewStringSlice() + ms.EnsureCapacity(4) + assert.Equal(t, 4, cap(*ms.getOrig())) + ms.EnsureCapacity(2) + assert.Equal(t, 4, cap(*ms.getOrig())) +} diff --git a/pdata/pcommon/generated_uint64slice_test.go b/pdata/pcommon/generated_uint64slice_test.go index 9120f84b5e2..27013b985b9 100644 --- a/pdata/pcommon/generated_uint64slice_test.go +++ b/pdata/pcommon/generated_uint64slice_test.go @@ -69,7 +69,7 @@ func TestUInt64SliceReadOnly(t *testing.T) { func TestUInt64SliceAppend(t *testing.T) { ms := NewUInt64Slice() ms.FromRaw([]uint64{1, 2, 3}) - ms.Append(4, 5) + ms.Append(5, 5) assert.Equal(t, 5, ms.Len()) assert.Equal(t, uint64(5), ms.At(4)) } diff --git a/pdata/plog/plogotlp/grpc_test.go b/pdata/plog/plogotlp/grpc_test.go index 9f8722fcefe..95ce393db0e 100644 --- a/pdata/plog/plogotlp/grpc_test.go +++ b/pdata/plog/plogotlp/grpc_test.go @@ -15,6 +15,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials/insecure" + "google.golang.org/grpc/resolver" "google.golang.org/grpc/status" "google.golang.org/grpc/test/bufconn" @@ -36,12 +37,12 @@ func TestGrpc(t *testing.T) { wg.Wait() }) - cc, err := grpc.Dial("bufnet", + resolver.SetDefaultScheme("passthrough") + cc, err := grpc.NewClient("bufnet", grpc.WithContextDialer(func(context.Context, string) (net.Conn, error) { return lis.Dial() }), - grpc.WithTransportCredentials(insecure.NewCredentials()), - grpc.WithBlock()) + grpc.WithTransportCredentials(insecure.NewCredentials())) assert.NoError(t, err) t.Cleanup(func() { assert.NoError(t, cc.Close()) @@ -69,12 +70,11 @@ func TestGrpcError(t *testing.T) { wg.Wait() }) - cc, err := grpc.Dial("bufnet", + cc, err := grpc.NewClient("bufnet", grpc.WithContextDialer(func(context.Context, string) (net.Conn, error) { return lis.Dial() }), - grpc.WithTransportCredentials(insecure.NewCredentials()), - grpc.WithBlock()) + grpc.WithTransportCredentials(insecure.NewCredentials())) assert.NoError(t, err) t.Cleanup(func() { assert.NoError(t, cc.Close()) diff --git a/pdata/pmetric/pmetricotlp/grpc_test.go b/pdata/pmetric/pmetricotlp/grpc_test.go index 074d4a5978f..e397f1d3e0c 100644 --- a/pdata/pmetric/pmetricotlp/grpc_test.go +++ b/pdata/pmetric/pmetricotlp/grpc_test.go @@ -15,6 +15,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials/insecure" + "google.golang.org/grpc/resolver" "google.golang.org/grpc/status" "google.golang.org/grpc/test/bufconn" @@ -36,12 +37,12 @@ func TestGrpc(t *testing.T) { wg.Wait() }) - cc, err := grpc.Dial("bufnet", + resolver.SetDefaultScheme("passthrough") + cc, err := grpc.NewClient("bufnet", grpc.WithContextDialer(func(context.Context, string) (net.Conn, error) { return lis.Dial() }), - grpc.WithTransportCredentials(insecure.NewCredentials()), - grpc.WithBlock()) + grpc.WithTransportCredentials(insecure.NewCredentials())) assert.NoError(t, err) t.Cleanup(func() { assert.NoError(t, cc.Close()) @@ -69,12 +70,11 @@ func TestGrpcError(t *testing.T) { wg.Wait() }) - cc, err := grpc.Dial("bufnet", + cc, err := grpc.NewClient("bufnet", grpc.WithContextDialer(func(context.Context, string) (net.Conn, error) { return lis.Dial() }), - grpc.WithTransportCredentials(insecure.NewCredentials()), - grpc.WithBlock()) + grpc.WithTransportCredentials(insecure.NewCredentials())) assert.NoError(t, err) t.Cleanup(func() { assert.NoError(t, cc.Close()) diff --git a/pdata/pprofile/Makefile b/pdata/pprofile/Makefile new file mode 100644 index 00000000000..ded7a36092d --- /dev/null +++ b/pdata/pprofile/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common diff --git a/pdata/pprofile/generated_attributeunit.go b/pdata/pprofile/generated_attributeunit.go new file mode 100644 index 00000000000..bb6f5e4d0dd --- /dev/null +++ b/pdata/pprofile/generated_attributeunit.go @@ -0,0 +1,75 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +// AttributeUnit Represents a mapping between Attribute Keys and Units. +// +// This is a reference type, if passed by value and callee modifies it the +// caller will see the modification. +// +// Must use NewAttributeUnit function to create new instances. +// Important: zero-initialized instance is not valid for use. +type AttributeUnit struct { + orig *otlpprofiles.AttributeUnit + state *internal.State +} + +func newAttributeUnit(orig *otlpprofiles.AttributeUnit, state *internal.State) AttributeUnit { + return AttributeUnit{orig: orig, state: state} +} + +// NewAttributeUnit creates a new empty AttributeUnit. +// +// This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, +// OR directly access the member if this is embedded in another struct. +func NewAttributeUnit() AttributeUnit { + state := internal.StateMutable + return newAttributeUnit(&otlpprofiles.AttributeUnit{}, &state) +} + +// MoveTo moves all properties from the current struct overriding the destination and +// resetting the current instance to its zero value +func (ms AttributeUnit) MoveTo(dest AttributeUnit) { + ms.state.AssertMutable() + dest.state.AssertMutable() + *dest.orig = *ms.orig + *ms.orig = otlpprofiles.AttributeUnit{} +} + +// AttributeKey returns the attributekey associated with this AttributeUnit. +func (ms AttributeUnit) AttributeKey() int64 { + return ms.orig.AttributeKey +} + +// SetAttributeKey replaces the attributekey associated with this AttributeUnit. +func (ms AttributeUnit) SetAttributeKey(v int64) { + ms.state.AssertMutable() + ms.orig.AttributeKey = v +} + +// Unit returns the unit associated with this AttributeUnit. +func (ms AttributeUnit) Unit() int64 { + return ms.orig.Unit +} + +// SetUnit replaces the unit associated with this AttributeUnit. +func (ms AttributeUnit) SetUnit(v int64) { + ms.state.AssertMutable() + ms.orig.Unit = v +} + +// CopyTo copies all properties from the current struct overriding the destination. +func (ms AttributeUnit) CopyTo(dest AttributeUnit) { + dest.state.AssertMutable() + dest.SetAttributeKey(ms.AttributeKey()) + dest.SetUnit(ms.Unit()) +} diff --git a/pdata/pprofile/generated_attributeunit_test.go b/pdata/pprofile/generated_attributeunit_test.go new file mode 100644 index 00000000000..e4a54c99b12 --- /dev/null +++ b/pdata/pprofile/generated_attributeunit_test.go @@ -0,0 +1,68 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +func TestAttributeUnit_MoveTo(t *testing.T) { + ms := generateTestAttributeUnit() + dest := NewAttributeUnit() + ms.MoveTo(dest) + assert.Equal(t, NewAttributeUnit(), ms) + assert.Equal(t, generateTestAttributeUnit(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newAttributeUnit(&otlpprofiles.AttributeUnit{}, &sharedState)) }) + assert.Panics(t, func() { newAttributeUnit(&otlpprofiles.AttributeUnit{}, &sharedState).MoveTo(dest) }) +} + +func TestAttributeUnit_CopyTo(t *testing.T) { + ms := NewAttributeUnit() + orig := NewAttributeUnit() + orig.CopyTo(ms) + assert.Equal(t, orig, ms) + orig = generateTestAttributeUnit() + orig.CopyTo(ms) + assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newAttributeUnit(&otlpprofiles.AttributeUnit{}, &sharedState)) }) +} + +func TestAttributeUnit_AttributeKey(t *testing.T) { + ms := NewAttributeUnit() + assert.Equal(t, int64(0), ms.AttributeKey()) + ms.SetAttributeKey(int64(1)) + assert.Equal(t, int64(1), ms.AttributeKey()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newAttributeUnit(&otlpprofiles.AttributeUnit{}, &sharedState).SetAttributeKey(int64(1)) }) +} + +func TestAttributeUnit_Unit(t *testing.T) { + ms := NewAttributeUnit() + assert.Equal(t, int64(0), ms.Unit()) + ms.SetUnit(int64(1)) + assert.Equal(t, int64(1), ms.Unit()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newAttributeUnit(&otlpprofiles.AttributeUnit{}, &sharedState).SetUnit(int64(1)) }) +} + +func generateTestAttributeUnit() AttributeUnit { + tv := NewAttributeUnit() + fillTestAttributeUnit(tv) + return tv +} + +func fillTestAttributeUnit(tv AttributeUnit) { + tv.orig.AttributeKey = int64(1) + tv.orig.Unit = int64(1) +} diff --git a/pdata/pprofile/generated_attributeunitslice.go b/pdata/pprofile/generated_attributeunitslice.go new file mode 100644 index 00000000000..95274cfe446 --- /dev/null +++ b/pdata/pprofile/generated_attributeunitslice.go @@ -0,0 +1,136 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +// AttributeUnitSlice logically represents a slice of AttributeUnit. +// +// This is a reference type. If passed by value and callee modifies it, the +// caller will see the modification. +// +// Must use NewAttributeUnitSlice function to create new instances. +// Important: zero-initialized instance is not valid for use. +type AttributeUnitSlice struct { + orig *[]otlpprofiles.AttributeUnit + state *internal.State +} + +func newAttributeUnitSlice(orig *[]otlpprofiles.AttributeUnit, state *internal.State) AttributeUnitSlice { + return AttributeUnitSlice{orig: orig, state: state} +} + +// NewAttributeUnitSlice creates a AttributeUnitSlice with 0 elements. +// Can use "EnsureCapacity" to initialize with a given capacity. +func NewAttributeUnitSlice() AttributeUnitSlice { + orig := []otlpprofiles.AttributeUnit(nil) + state := internal.StateMutable + return newAttributeUnitSlice(&orig, &state) +} + +// Len returns the number of elements in the slice. +// +// Returns "0" for a newly instance created with "NewAttributeUnitSlice()". +func (es AttributeUnitSlice) Len() int { + return len(*es.orig) +} + +// At returns the element at the given index. +// +// This function is used mostly for iterating over all the values in the slice: +// +// for i := 0; i < es.Len(); i++ { +// e := es.At(i) +// ... // Do something with the element +// } +func (es AttributeUnitSlice) At(i int) AttributeUnit { + return newAttributeUnit(&(*es.orig)[i], es.state) +} + +// EnsureCapacity is an operation that ensures the slice has at least the specified capacity. +// 1. If the newCap <= cap then no change in capacity. +// 2. If the newCap > cap then the slice capacity will be expanded to equal newCap. +// +// Here is how a new AttributeUnitSlice can be initialized: +// +// es := NewAttributeUnitSlice() +// es.EnsureCapacity(4) +// for i := 0; i < 4; i++ { +// e := es.AppendEmpty() +// // Here should set all the values for e. +// } +func (es AttributeUnitSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() + oldCap := cap(*es.orig) + if newCap <= oldCap { + return + } + + newOrig := make([]otlpprofiles.AttributeUnit, len(*es.orig), newCap) + copy(newOrig, *es.orig) + *es.orig = newOrig +} + +// AppendEmpty will append to the end of the slice an empty AttributeUnit. +// It returns the newly added AttributeUnit. +func (es AttributeUnitSlice) AppendEmpty() AttributeUnit { + es.state.AssertMutable() + *es.orig = append(*es.orig, otlpprofiles.AttributeUnit{}) + return es.At(es.Len() - 1) +} + +// MoveAndAppendTo moves all elements from the current slice and appends them to the dest. +// The current slice will be cleared. +func (es AttributeUnitSlice) MoveAndAppendTo(dest AttributeUnitSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() + if *dest.orig == nil { + // We can simply move the entire vector and avoid any allocations. + *dest.orig = *es.orig + } else { + *dest.orig = append(*dest.orig, *es.orig...) + } + *es.orig = nil +} + +// RemoveIf calls f sequentially for each element present in the slice. +// If f returns true, the element is removed from the slice. +func (es AttributeUnitSlice) RemoveIf(f func(AttributeUnit) bool) { + es.state.AssertMutable() + newLen := 0 + for i := 0; i < len(*es.orig); i++ { + if f(es.At(i)) { + continue + } + if newLen == i { + // Nothing to move, element is at the right place. + newLen++ + continue + } + (*es.orig)[newLen] = (*es.orig)[i] + newLen++ + } + *es.orig = (*es.orig)[:newLen] +} + +// CopyTo copies all elements from the current slice overriding the destination. +func (es AttributeUnitSlice) CopyTo(dest AttributeUnitSlice) { + dest.state.AssertMutable() + srcLen := es.Len() + destCap := cap(*dest.orig) + if srcLen <= destCap { + (*dest.orig) = (*dest.orig)[:srcLen:destCap] + } else { + (*dest.orig) = make([]otlpprofiles.AttributeUnit, srcLen) + } + for i := range *es.orig { + newAttributeUnit(&(*es.orig)[i], es.state).CopyTo(newAttributeUnit(&(*dest.orig)[i], dest.state)) + } +} diff --git a/pdata/pprofile/generated_attributeunitslice_test.go b/pdata/pprofile/generated_attributeunitslice_test.go new file mode 100644 index 00000000000..0dd3420015a --- /dev/null +++ b/pdata/pprofile/generated_attributeunitslice_test.go @@ -0,0 +1,137 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +func TestAttributeUnitSlice(t *testing.T) { + es := NewAttributeUnitSlice() + assert.Equal(t, 0, es.Len()) + state := internal.StateMutable + es = newAttributeUnitSlice(&[]otlpprofiles.AttributeUnit{}, &state) + assert.Equal(t, 0, es.Len()) + + emptyVal := NewAttributeUnit() + testVal := generateTestAttributeUnit() + for i := 0; i < 7; i++ { + el := es.AppendEmpty() + assert.Equal(t, emptyVal, es.At(i)) + fillTestAttributeUnit(el) + assert.Equal(t, testVal, es.At(i)) + } + assert.Equal(t, 7, es.Len()) +} + +func TestAttributeUnitSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newAttributeUnitSlice(&[]otlpprofiles.AttributeUnit{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewAttributeUnitSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + +func TestAttributeUnitSlice_CopyTo(t *testing.T) { + dest := NewAttributeUnitSlice() + // Test CopyTo to empty + NewAttributeUnitSlice().CopyTo(dest) + assert.Equal(t, NewAttributeUnitSlice(), dest) + + // Test CopyTo larger slice + generateTestAttributeUnitSlice().CopyTo(dest) + assert.Equal(t, generateTestAttributeUnitSlice(), dest) + + // Test CopyTo same size slice + generateTestAttributeUnitSlice().CopyTo(dest) + assert.Equal(t, generateTestAttributeUnitSlice(), dest) +} + +func TestAttributeUnitSlice_EnsureCapacity(t *testing.T) { + es := generateTestAttributeUnitSlice() + + // Test ensure smaller capacity. + const ensureSmallLen = 4 + es.EnsureCapacity(ensureSmallLen) + assert.Less(t, ensureSmallLen, es.Len()) + assert.Equal(t, es.Len(), cap(*es.orig)) + assert.Equal(t, generateTestAttributeUnitSlice(), es) + + // Test ensure larger capacity + const ensureLargeLen = 9 + es.EnsureCapacity(ensureLargeLen) + assert.Less(t, generateTestAttributeUnitSlice().Len(), ensureLargeLen) + assert.Equal(t, ensureLargeLen, cap(*es.orig)) + assert.Equal(t, generateTestAttributeUnitSlice(), es) +} + +func TestAttributeUnitSlice_MoveAndAppendTo(t *testing.T) { + // Test MoveAndAppendTo to empty + expectedSlice := generateTestAttributeUnitSlice() + dest := NewAttributeUnitSlice() + src := generateTestAttributeUnitSlice() + src.MoveAndAppendTo(dest) + assert.Equal(t, generateTestAttributeUnitSlice(), dest) + assert.Equal(t, 0, src.Len()) + assert.Equal(t, expectedSlice.Len(), dest.Len()) + + // Test MoveAndAppendTo empty slice + src.MoveAndAppendTo(dest) + assert.Equal(t, generateTestAttributeUnitSlice(), dest) + assert.Equal(t, 0, src.Len()) + assert.Equal(t, expectedSlice.Len(), dest.Len()) + + // Test MoveAndAppendTo not empty slice + generateTestAttributeUnitSlice().MoveAndAppendTo(dest) + assert.Equal(t, 2*expectedSlice.Len(), dest.Len()) + for i := 0; i < expectedSlice.Len(); i++ { + assert.Equal(t, expectedSlice.At(i), dest.At(i)) + assert.Equal(t, expectedSlice.At(i), dest.At(i+expectedSlice.Len())) + } +} + +func TestAttributeUnitSlice_RemoveIf(t *testing.T) { + // Test RemoveIf on empty slice + emptySlice := NewAttributeUnitSlice() + emptySlice.RemoveIf(func(el AttributeUnit) bool { + t.Fail() + return false + }) + + // Test RemoveIf + filtered := generateTestAttributeUnitSlice() + pos := 0 + filtered.RemoveIf(func(el AttributeUnit) bool { + pos++ + return pos%3 == 0 + }) + assert.Equal(t, 5, filtered.Len()) +} + +func generateTestAttributeUnitSlice() AttributeUnitSlice { + es := NewAttributeUnitSlice() + fillTestAttributeUnitSlice(es) + return es +} + +func fillTestAttributeUnitSlice(es AttributeUnitSlice) { + *es.orig = make([]otlpprofiles.AttributeUnit, 7) + for i := 0; i < 7; i++ { + (*es.orig)[i] = otlpprofiles.AttributeUnit{} + fillTestAttributeUnit(newAttributeUnit(&(*es.orig)[i], es.state)) + } +} diff --git a/pdata/pprofile/generated_function.go b/pdata/pprofile/generated_function.go new file mode 100644 index 00000000000..324b8c7b109 --- /dev/null +++ b/pdata/pprofile/generated_function.go @@ -0,0 +1,111 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +// Function describes a function, including its human-readable name, system name, source file, and starting line number in the source. +// +// This is a reference type, if passed by value and callee modifies it the +// caller will see the modification. +// +// Must use NewFunction function to create new instances. +// Important: zero-initialized instance is not valid for use. +type Function struct { + orig *otlpprofiles.Function + state *internal.State +} + +func newFunction(orig *otlpprofiles.Function, state *internal.State) Function { + return Function{orig: orig, state: state} +} + +// NewFunction creates a new empty Function. +// +// This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, +// OR directly access the member if this is embedded in another struct. +func NewFunction() Function { + state := internal.StateMutable + return newFunction(&otlpprofiles.Function{}, &state) +} + +// MoveTo moves all properties from the current struct overriding the destination and +// resetting the current instance to its zero value +func (ms Function) MoveTo(dest Function) { + ms.state.AssertMutable() + dest.state.AssertMutable() + *dest.orig = *ms.orig + *ms.orig = otlpprofiles.Function{} +} + +// ID returns the id associated with this Function. +func (ms Function) ID() uint64 { + return ms.orig.Id +} + +// SetID replaces the id associated with this Function. +func (ms Function) SetID(v uint64) { + ms.state.AssertMutable() + ms.orig.Id = v +} + +// Name returns the name associated with this Function. +func (ms Function) Name() int64 { + return ms.orig.Name +} + +// SetName replaces the name associated with this Function. +func (ms Function) SetName(v int64) { + ms.state.AssertMutable() + ms.orig.Name = v +} + +// SystemName returns the systemname associated with this Function. +func (ms Function) SystemName() int64 { + return ms.orig.SystemName +} + +// SetSystemName replaces the systemname associated with this Function. +func (ms Function) SetSystemName(v int64) { + ms.state.AssertMutable() + ms.orig.SystemName = v +} + +// Filename returns the filename associated with this Function. +func (ms Function) Filename() int64 { + return ms.orig.Filename +} + +// SetFilename replaces the filename associated with this Function. +func (ms Function) SetFilename(v int64) { + ms.state.AssertMutable() + ms.orig.Filename = v +} + +// StartLine returns the startline associated with this Function. +func (ms Function) StartLine() int64 { + return ms.orig.StartLine +} + +// SetStartLine replaces the startline associated with this Function. +func (ms Function) SetStartLine(v int64) { + ms.state.AssertMutable() + ms.orig.StartLine = v +} + +// CopyTo copies all properties from the current struct overriding the destination. +func (ms Function) CopyTo(dest Function) { + dest.state.AssertMutable() + dest.SetID(ms.ID()) + dest.SetName(ms.Name()) + dest.SetSystemName(ms.SystemName()) + dest.SetFilename(ms.Filename()) + dest.SetStartLine(ms.StartLine()) +} diff --git a/pdata/pprofile/generated_function_test.go b/pdata/pprofile/generated_function_test.go new file mode 100644 index 00000000000..83f0ace5d10 --- /dev/null +++ b/pdata/pprofile/generated_function_test.go @@ -0,0 +1,98 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +func TestFunction_MoveTo(t *testing.T) { + ms := generateTestFunction() + dest := NewFunction() + ms.MoveTo(dest) + assert.Equal(t, NewFunction(), ms) + assert.Equal(t, generateTestFunction(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newFunction(&otlpprofiles.Function{}, &sharedState)) }) + assert.Panics(t, func() { newFunction(&otlpprofiles.Function{}, &sharedState).MoveTo(dest) }) +} + +func TestFunction_CopyTo(t *testing.T) { + ms := NewFunction() + orig := NewFunction() + orig.CopyTo(ms) + assert.Equal(t, orig, ms) + orig = generateTestFunction() + orig.CopyTo(ms) + assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newFunction(&otlpprofiles.Function{}, &sharedState)) }) +} + +func TestFunction_ID(t *testing.T) { + ms := NewFunction() + assert.Equal(t, uint64(0), ms.ID()) + ms.SetID(uint64(1)) + assert.Equal(t, uint64(1), ms.ID()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newFunction(&otlpprofiles.Function{}, &sharedState).SetID(uint64(1)) }) +} + +func TestFunction_Name(t *testing.T) { + ms := NewFunction() + assert.Equal(t, int64(0), ms.Name()) + ms.SetName(int64(1)) + assert.Equal(t, int64(1), ms.Name()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newFunction(&otlpprofiles.Function{}, &sharedState).SetName(int64(1)) }) +} + +func TestFunction_SystemName(t *testing.T) { + ms := NewFunction() + assert.Equal(t, int64(0), ms.SystemName()) + ms.SetSystemName(int64(1)) + assert.Equal(t, int64(1), ms.SystemName()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newFunction(&otlpprofiles.Function{}, &sharedState).SetSystemName(int64(1)) }) +} + +func TestFunction_Filename(t *testing.T) { + ms := NewFunction() + assert.Equal(t, int64(0), ms.Filename()) + ms.SetFilename(int64(1)) + assert.Equal(t, int64(1), ms.Filename()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newFunction(&otlpprofiles.Function{}, &sharedState).SetFilename(int64(1)) }) +} + +func TestFunction_StartLine(t *testing.T) { + ms := NewFunction() + assert.Equal(t, int64(0), ms.StartLine()) + ms.SetStartLine(int64(1)) + assert.Equal(t, int64(1), ms.StartLine()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newFunction(&otlpprofiles.Function{}, &sharedState).SetStartLine(int64(1)) }) +} + +func generateTestFunction() Function { + tv := NewFunction() + fillTestFunction(tv) + return tv +} + +func fillTestFunction(tv Function) { + tv.orig.Id = uint64(1) + tv.orig.Name = int64(1) + tv.orig.SystemName = int64(1) + tv.orig.Filename = int64(1) + tv.orig.StartLine = int64(1) +} diff --git a/pdata/pprofile/generated_functionslice.go b/pdata/pprofile/generated_functionslice.go new file mode 100644 index 00000000000..171ba345b01 --- /dev/null +++ b/pdata/pprofile/generated_functionslice.go @@ -0,0 +1,136 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +// FunctionSlice logically represents a slice of Function. +// +// This is a reference type. If passed by value and callee modifies it, the +// caller will see the modification. +// +// Must use NewFunctionSlice function to create new instances. +// Important: zero-initialized instance is not valid for use. +type FunctionSlice struct { + orig *[]otlpprofiles.Function + state *internal.State +} + +func newFunctionSlice(orig *[]otlpprofiles.Function, state *internal.State) FunctionSlice { + return FunctionSlice{orig: orig, state: state} +} + +// NewFunctionSlice creates a FunctionSlice with 0 elements. +// Can use "EnsureCapacity" to initialize with a given capacity. +func NewFunctionSlice() FunctionSlice { + orig := []otlpprofiles.Function(nil) + state := internal.StateMutable + return newFunctionSlice(&orig, &state) +} + +// Len returns the number of elements in the slice. +// +// Returns "0" for a newly instance created with "NewFunctionSlice()". +func (es FunctionSlice) Len() int { + return len(*es.orig) +} + +// At returns the element at the given index. +// +// This function is used mostly for iterating over all the values in the slice: +// +// for i := 0; i < es.Len(); i++ { +// e := es.At(i) +// ... // Do something with the element +// } +func (es FunctionSlice) At(i int) Function { + return newFunction(&(*es.orig)[i], es.state) +} + +// EnsureCapacity is an operation that ensures the slice has at least the specified capacity. +// 1. If the newCap <= cap then no change in capacity. +// 2. If the newCap > cap then the slice capacity will be expanded to equal newCap. +// +// Here is how a new FunctionSlice can be initialized: +// +// es := NewFunctionSlice() +// es.EnsureCapacity(4) +// for i := 0; i < 4; i++ { +// e := es.AppendEmpty() +// // Here should set all the values for e. +// } +func (es FunctionSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() + oldCap := cap(*es.orig) + if newCap <= oldCap { + return + } + + newOrig := make([]otlpprofiles.Function, len(*es.orig), newCap) + copy(newOrig, *es.orig) + *es.orig = newOrig +} + +// AppendEmpty will append to the end of the slice an empty Function. +// It returns the newly added Function. +func (es FunctionSlice) AppendEmpty() Function { + es.state.AssertMutable() + *es.orig = append(*es.orig, otlpprofiles.Function{}) + return es.At(es.Len() - 1) +} + +// MoveAndAppendTo moves all elements from the current slice and appends them to the dest. +// The current slice will be cleared. +func (es FunctionSlice) MoveAndAppendTo(dest FunctionSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() + if *dest.orig == nil { + // We can simply move the entire vector and avoid any allocations. + *dest.orig = *es.orig + } else { + *dest.orig = append(*dest.orig, *es.orig...) + } + *es.orig = nil +} + +// RemoveIf calls f sequentially for each element present in the slice. +// If f returns true, the element is removed from the slice. +func (es FunctionSlice) RemoveIf(f func(Function) bool) { + es.state.AssertMutable() + newLen := 0 + for i := 0; i < len(*es.orig); i++ { + if f(es.At(i)) { + continue + } + if newLen == i { + // Nothing to move, element is at the right place. + newLen++ + continue + } + (*es.orig)[newLen] = (*es.orig)[i] + newLen++ + } + *es.orig = (*es.orig)[:newLen] +} + +// CopyTo copies all elements from the current slice overriding the destination. +func (es FunctionSlice) CopyTo(dest FunctionSlice) { + dest.state.AssertMutable() + srcLen := es.Len() + destCap := cap(*dest.orig) + if srcLen <= destCap { + (*dest.orig) = (*dest.orig)[:srcLen:destCap] + } else { + (*dest.orig) = make([]otlpprofiles.Function, srcLen) + } + for i := range *es.orig { + newFunction(&(*es.orig)[i], es.state).CopyTo(newFunction(&(*dest.orig)[i], dest.state)) + } +} diff --git a/pdata/pprofile/generated_functionslice_test.go b/pdata/pprofile/generated_functionslice_test.go new file mode 100644 index 00000000000..c4311bf52d9 --- /dev/null +++ b/pdata/pprofile/generated_functionslice_test.go @@ -0,0 +1,137 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +func TestFunctionSlice(t *testing.T) { + es := NewFunctionSlice() + assert.Equal(t, 0, es.Len()) + state := internal.StateMutable + es = newFunctionSlice(&[]otlpprofiles.Function{}, &state) + assert.Equal(t, 0, es.Len()) + + emptyVal := NewFunction() + testVal := generateTestFunction() + for i := 0; i < 7; i++ { + el := es.AppendEmpty() + assert.Equal(t, emptyVal, es.At(i)) + fillTestFunction(el) + assert.Equal(t, testVal, es.At(i)) + } + assert.Equal(t, 7, es.Len()) +} + +func TestFunctionSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newFunctionSlice(&[]otlpprofiles.Function{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewFunctionSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + +func TestFunctionSlice_CopyTo(t *testing.T) { + dest := NewFunctionSlice() + // Test CopyTo to empty + NewFunctionSlice().CopyTo(dest) + assert.Equal(t, NewFunctionSlice(), dest) + + // Test CopyTo larger slice + generateTestFunctionSlice().CopyTo(dest) + assert.Equal(t, generateTestFunctionSlice(), dest) + + // Test CopyTo same size slice + generateTestFunctionSlice().CopyTo(dest) + assert.Equal(t, generateTestFunctionSlice(), dest) +} + +func TestFunctionSlice_EnsureCapacity(t *testing.T) { + es := generateTestFunctionSlice() + + // Test ensure smaller capacity. + const ensureSmallLen = 4 + es.EnsureCapacity(ensureSmallLen) + assert.Less(t, ensureSmallLen, es.Len()) + assert.Equal(t, es.Len(), cap(*es.orig)) + assert.Equal(t, generateTestFunctionSlice(), es) + + // Test ensure larger capacity + const ensureLargeLen = 9 + es.EnsureCapacity(ensureLargeLen) + assert.Less(t, generateTestFunctionSlice().Len(), ensureLargeLen) + assert.Equal(t, ensureLargeLen, cap(*es.orig)) + assert.Equal(t, generateTestFunctionSlice(), es) +} + +func TestFunctionSlice_MoveAndAppendTo(t *testing.T) { + // Test MoveAndAppendTo to empty + expectedSlice := generateTestFunctionSlice() + dest := NewFunctionSlice() + src := generateTestFunctionSlice() + src.MoveAndAppendTo(dest) + assert.Equal(t, generateTestFunctionSlice(), dest) + assert.Equal(t, 0, src.Len()) + assert.Equal(t, expectedSlice.Len(), dest.Len()) + + // Test MoveAndAppendTo empty slice + src.MoveAndAppendTo(dest) + assert.Equal(t, generateTestFunctionSlice(), dest) + assert.Equal(t, 0, src.Len()) + assert.Equal(t, expectedSlice.Len(), dest.Len()) + + // Test MoveAndAppendTo not empty slice + generateTestFunctionSlice().MoveAndAppendTo(dest) + assert.Equal(t, 2*expectedSlice.Len(), dest.Len()) + for i := 0; i < expectedSlice.Len(); i++ { + assert.Equal(t, expectedSlice.At(i), dest.At(i)) + assert.Equal(t, expectedSlice.At(i), dest.At(i+expectedSlice.Len())) + } +} + +func TestFunctionSlice_RemoveIf(t *testing.T) { + // Test RemoveIf on empty slice + emptySlice := NewFunctionSlice() + emptySlice.RemoveIf(func(el Function) bool { + t.Fail() + return false + }) + + // Test RemoveIf + filtered := generateTestFunctionSlice() + pos := 0 + filtered.RemoveIf(func(el Function) bool { + pos++ + return pos%3 == 0 + }) + assert.Equal(t, 5, filtered.Len()) +} + +func generateTestFunctionSlice() FunctionSlice { + es := NewFunctionSlice() + fillTestFunctionSlice(es) + return es +} + +func fillTestFunctionSlice(es FunctionSlice) { + *es.orig = make([]otlpprofiles.Function, 7) + for i := 0; i < 7; i++ { + (*es.orig)[i] = otlpprofiles.Function{} + fillTestFunction(newFunction(&(*es.orig)[i], es.state)) + } +} diff --git a/pdata/pprofile/generated_label.go b/pdata/pprofile/generated_label.go new file mode 100644 index 00000000000..fc93d13b390 --- /dev/null +++ b/pdata/pprofile/generated_label.go @@ -0,0 +1,99 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +// Label provided additional context for a sample +// +// This is a reference type, if passed by value and callee modifies it the +// caller will see the modification. +// +// Must use NewLabel function to create new instances. +// Important: zero-initialized instance is not valid for use. +type Label struct { + orig *otlpprofiles.Label + state *internal.State +} + +func newLabel(orig *otlpprofiles.Label, state *internal.State) Label { + return Label{orig: orig, state: state} +} + +// NewLabel creates a new empty Label. +// +// This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, +// OR directly access the member if this is embedded in another struct. +func NewLabel() Label { + state := internal.StateMutable + return newLabel(&otlpprofiles.Label{}, &state) +} + +// MoveTo moves all properties from the current struct overriding the destination and +// resetting the current instance to its zero value +func (ms Label) MoveTo(dest Label) { + ms.state.AssertMutable() + dest.state.AssertMutable() + *dest.orig = *ms.orig + *ms.orig = otlpprofiles.Label{} +} + +// Key returns the key associated with this Label. +func (ms Label) Key() int64 { + return ms.orig.Key +} + +// SetKey replaces the key associated with this Label. +func (ms Label) SetKey(v int64) { + ms.state.AssertMutable() + ms.orig.Key = v +} + +// Str returns the str associated with this Label. +func (ms Label) Str() int64 { + return ms.orig.Str +} + +// SetStr replaces the str associated with this Label. +func (ms Label) SetStr(v int64) { + ms.state.AssertMutable() + ms.orig.Str = v +} + +// Num returns the num associated with this Label. +func (ms Label) Num() int64 { + return ms.orig.Num +} + +// SetNum replaces the num associated with this Label. +func (ms Label) SetNum(v int64) { + ms.state.AssertMutable() + ms.orig.Num = v +} + +// NumUnit returns the numunit associated with this Label. +func (ms Label) NumUnit() int64 { + return ms.orig.NumUnit +} + +// SetNumUnit replaces the numunit associated with this Label. +func (ms Label) SetNumUnit(v int64) { + ms.state.AssertMutable() + ms.orig.NumUnit = v +} + +// CopyTo copies all properties from the current struct overriding the destination. +func (ms Label) CopyTo(dest Label) { + dest.state.AssertMutable() + dest.SetKey(ms.Key()) + dest.SetStr(ms.Str()) + dest.SetNum(ms.Num()) + dest.SetNumUnit(ms.NumUnit()) +} diff --git a/pdata/pprofile/generated_label_test.go b/pdata/pprofile/generated_label_test.go new file mode 100644 index 00000000000..c4ed6722376 --- /dev/null +++ b/pdata/pprofile/generated_label_test.go @@ -0,0 +1,88 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +func TestLabel_MoveTo(t *testing.T) { + ms := generateTestLabel() + dest := NewLabel() + ms.MoveTo(dest) + assert.Equal(t, NewLabel(), ms) + assert.Equal(t, generateTestLabel(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newLabel(&otlpprofiles.Label{}, &sharedState)) }) + assert.Panics(t, func() { newLabel(&otlpprofiles.Label{}, &sharedState).MoveTo(dest) }) +} + +func TestLabel_CopyTo(t *testing.T) { + ms := NewLabel() + orig := NewLabel() + orig.CopyTo(ms) + assert.Equal(t, orig, ms) + orig = generateTestLabel() + orig.CopyTo(ms) + assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newLabel(&otlpprofiles.Label{}, &sharedState)) }) +} + +func TestLabel_Key(t *testing.T) { + ms := NewLabel() + assert.Equal(t, int64(0), ms.Key()) + ms.SetKey(int64(1)) + assert.Equal(t, int64(1), ms.Key()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newLabel(&otlpprofiles.Label{}, &sharedState).SetKey(int64(1)) }) +} + +func TestLabel_Str(t *testing.T) { + ms := NewLabel() + assert.Equal(t, int64(0), ms.Str()) + ms.SetStr(int64(1)) + assert.Equal(t, int64(1), ms.Str()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newLabel(&otlpprofiles.Label{}, &sharedState).SetStr(int64(1)) }) +} + +func TestLabel_Num(t *testing.T) { + ms := NewLabel() + assert.Equal(t, int64(0), ms.Num()) + ms.SetNum(int64(1)) + assert.Equal(t, int64(1), ms.Num()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newLabel(&otlpprofiles.Label{}, &sharedState).SetNum(int64(1)) }) +} + +func TestLabel_NumUnit(t *testing.T) { + ms := NewLabel() + assert.Equal(t, int64(0), ms.NumUnit()) + ms.SetNumUnit(int64(1)) + assert.Equal(t, int64(1), ms.NumUnit()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newLabel(&otlpprofiles.Label{}, &sharedState).SetNumUnit(int64(1)) }) +} + +func generateTestLabel() Label { + tv := NewLabel() + fillTestLabel(tv) + return tv +} + +func fillTestLabel(tv Label) { + tv.orig.Key = int64(1) + tv.orig.Str = int64(1) + tv.orig.Num = int64(1) + tv.orig.NumUnit = int64(1) +} diff --git a/pdata/pprofile/generated_labelslice.go b/pdata/pprofile/generated_labelslice.go new file mode 100644 index 00000000000..5f865bfcbae --- /dev/null +++ b/pdata/pprofile/generated_labelslice.go @@ -0,0 +1,136 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +// LabelSlice logically represents a slice of Label. +// +// This is a reference type. If passed by value and callee modifies it, the +// caller will see the modification. +// +// Must use NewLabelSlice function to create new instances. +// Important: zero-initialized instance is not valid for use. +type LabelSlice struct { + orig *[]otlpprofiles.Label + state *internal.State +} + +func newLabelSlice(orig *[]otlpprofiles.Label, state *internal.State) LabelSlice { + return LabelSlice{orig: orig, state: state} +} + +// NewLabelSlice creates a LabelSlice with 0 elements. +// Can use "EnsureCapacity" to initialize with a given capacity. +func NewLabelSlice() LabelSlice { + orig := []otlpprofiles.Label(nil) + state := internal.StateMutable + return newLabelSlice(&orig, &state) +} + +// Len returns the number of elements in the slice. +// +// Returns "0" for a newly instance created with "NewLabelSlice()". +func (es LabelSlice) Len() int { + return len(*es.orig) +} + +// At returns the element at the given index. +// +// This function is used mostly for iterating over all the values in the slice: +// +// for i := 0; i < es.Len(); i++ { +// e := es.At(i) +// ... // Do something with the element +// } +func (es LabelSlice) At(i int) Label { + return newLabel(&(*es.orig)[i], es.state) +} + +// EnsureCapacity is an operation that ensures the slice has at least the specified capacity. +// 1. If the newCap <= cap then no change in capacity. +// 2. If the newCap > cap then the slice capacity will be expanded to equal newCap. +// +// Here is how a new LabelSlice can be initialized: +// +// es := NewLabelSlice() +// es.EnsureCapacity(4) +// for i := 0; i < 4; i++ { +// e := es.AppendEmpty() +// // Here should set all the values for e. +// } +func (es LabelSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() + oldCap := cap(*es.orig) + if newCap <= oldCap { + return + } + + newOrig := make([]otlpprofiles.Label, len(*es.orig), newCap) + copy(newOrig, *es.orig) + *es.orig = newOrig +} + +// AppendEmpty will append to the end of the slice an empty Label. +// It returns the newly added Label. +func (es LabelSlice) AppendEmpty() Label { + es.state.AssertMutable() + *es.orig = append(*es.orig, otlpprofiles.Label{}) + return es.At(es.Len() - 1) +} + +// MoveAndAppendTo moves all elements from the current slice and appends them to the dest. +// The current slice will be cleared. +func (es LabelSlice) MoveAndAppendTo(dest LabelSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() + if *dest.orig == nil { + // We can simply move the entire vector and avoid any allocations. + *dest.orig = *es.orig + } else { + *dest.orig = append(*dest.orig, *es.orig...) + } + *es.orig = nil +} + +// RemoveIf calls f sequentially for each element present in the slice. +// If f returns true, the element is removed from the slice. +func (es LabelSlice) RemoveIf(f func(Label) bool) { + es.state.AssertMutable() + newLen := 0 + for i := 0; i < len(*es.orig); i++ { + if f(es.At(i)) { + continue + } + if newLen == i { + // Nothing to move, element is at the right place. + newLen++ + continue + } + (*es.orig)[newLen] = (*es.orig)[i] + newLen++ + } + *es.orig = (*es.orig)[:newLen] +} + +// CopyTo copies all elements from the current slice overriding the destination. +func (es LabelSlice) CopyTo(dest LabelSlice) { + dest.state.AssertMutable() + srcLen := es.Len() + destCap := cap(*dest.orig) + if srcLen <= destCap { + (*dest.orig) = (*dest.orig)[:srcLen:destCap] + } else { + (*dest.orig) = make([]otlpprofiles.Label, srcLen) + } + for i := range *es.orig { + newLabel(&(*es.orig)[i], es.state).CopyTo(newLabel(&(*dest.orig)[i], dest.state)) + } +} diff --git a/pdata/pprofile/generated_labelslice_test.go b/pdata/pprofile/generated_labelslice_test.go new file mode 100644 index 00000000000..c399046f92e --- /dev/null +++ b/pdata/pprofile/generated_labelslice_test.go @@ -0,0 +1,137 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +func TestLabelSlice(t *testing.T) { + es := NewLabelSlice() + assert.Equal(t, 0, es.Len()) + state := internal.StateMutable + es = newLabelSlice(&[]otlpprofiles.Label{}, &state) + assert.Equal(t, 0, es.Len()) + + emptyVal := NewLabel() + testVal := generateTestLabel() + for i := 0; i < 7; i++ { + el := es.AppendEmpty() + assert.Equal(t, emptyVal, es.At(i)) + fillTestLabel(el) + assert.Equal(t, testVal, es.At(i)) + } + assert.Equal(t, 7, es.Len()) +} + +func TestLabelSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newLabelSlice(&[]otlpprofiles.Label{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewLabelSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + +func TestLabelSlice_CopyTo(t *testing.T) { + dest := NewLabelSlice() + // Test CopyTo to empty + NewLabelSlice().CopyTo(dest) + assert.Equal(t, NewLabelSlice(), dest) + + // Test CopyTo larger slice + generateTestLabelSlice().CopyTo(dest) + assert.Equal(t, generateTestLabelSlice(), dest) + + // Test CopyTo same size slice + generateTestLabelSlice().CopyTo(dest) + assert.Equal(t, generateTestLabelSlice(), dest) +} + +func TestLabelSlice_EnsureCapacity(t *testing.T) { + es := generateTestLabelSlice() + + // Test ensure smaller capacity. + const ensureSmallLen = 4 + es.EnsureCapacity(ensureSmallLen) + assert.Less(t, ensureSmallLen, es.Len()) + assert.Equal(t, es.Len(), cap(*es.orig)) + assert.Equal(t, generateTestLabelSlice(), es) + + // Test ensure larger capacity + const ensureLargeLen = 9 + es.EnsureCapacity(ensureLargeLen) + assert.Less(t, generateTestLabelSlice().Len(), ensureLargeLen) + assert.Equal(t, ensureLargeLen, cap(*es.orig)) + assert.Equal(t, generateTestLabelSlice(), es) +} + +func TestLabelSlice_MoveAndAppendTo(t *testing.T) { + // Test MoveAndAppendTo to empty + expectedSlice := generateTestLabelSlice() + dest := NewLabelSlice() + src := generateTestLabelSlice() + src.MoveAndAppendTo(dest) + assert.Equal(t, generateTestLabelSlice(), dest) + assert.Equal(t, 0, src.Len()) + assert.Equal(t, expectedSlice.Len(), dest.Len()) + + // Test MoveAndAppendTo empty slice + src.MoveAndAppendTo(dest) + assert.Equal(t, generateTestLabelSlice(), dest) + assert.Equal(t, 0, src.Len()) + assert.Equal(t, expectedSlice.Len(), dest.Len()) + + // Test MoveAndAppendTo not empty slice + generateTestLabelSlice().MoveAndAppendTo(dest) + assert.Equal(t, 2*expectedSlice.Len(), dest.Len()) + for i := 0; i < expectedSlice.Len(); i++ { + assert.Equal(t, expectedSlice.At(i), dest.At(i)) + assert.Equal(t, expectedSlice.At(i), dest.At(i+expectedSlice.Len())) + } +} + +func TestLabelSlice_RemoveIf(t *testing.T) { + // Test RemoveIf on empty slice + emptySlice := NewLabelSlice() + emptySlice.RemoveIf(func(el Label) bool { + t.Fail() + return false + }) + + // Test RemoveIf + filtered := generateTestLabelSlice() + pos := 0 + filtered.RemoveIf(func(el Label) bool { + pos++ + return pos%3 == 0 + }) + assert.Equal(t, 5, filtered.Len()) +} + +func generateTestLabelSlice() LabelSlice { + es := NewLabelSlice() + fillTestLabelSlice(es) + return es +} + +func fillTestLabelSlice(es LabelSlice) { + *es.orig = make([]otlpprofiles.Label, 7) + for i := 0; i < 7; i++ { + (*es.orig)[i] = otlpprofiles.Label{} + fillTestLabel(newLabel(&(*es.orig)[i], es.state)) + } +} diff --git a/pdata/pprofile/generated_line.go b/pdata/pprofile/generated_line.go new file mode 100644 index 00000000000..80147d393a5 --- /dev/null +++ b/pdata/pprofile/generated_line.go @@ -0,0 +1,87 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +// Line details a specific line in a source code, linked to a function. +// +// This is a reference type, if passed by value and callee modifies it the +// caller will see the modification. +// +// Must use NewLine function to create new instances. +// Important: zero-initialized instance is not valid for use. +type Line struct { + orig *otlpprofiles.Line + state *internal.State +} + +func newLine(orig *otlpprofiles.Line, state *internal.State) Line { + return Line{orig: orig, state: state} +} + +// NewLine creates a new empty Line. +// +// This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, +// OR directly access the member if this is embedded in another struct. +func NewLine() Line { + state := internal.StateMutable + return newLine(&otlpprofiles.Line{}, &state) +} + +// MoveTo moves all properties from the current struct overriding the destination and +// resetting the current instance to its zero value +func (ms Line) MoveTo(dest Line) { + ms.state.AssertMutable() + dest.state.AssertMutable() + *dest.orig = *ms.orig + *ms.orig = otlpprofiles.Line{} +} + +// FunctionIndex returns the functionindex associated with this Line. +func (ms Line) FunctionIndex() uint64 { + return ms.orig.FunctionIndex +} + +// SetFunctionIndex replaces the functionindex associated with this Line. +func (ms Line) SetFunctionIndex(v uint64) { + ms.state.AssertMutable() + ms.orig.FunctionIndex = v +} + +// Line returns the line associated with this Line. +func (ms Line) Line() int64 { + return ms.orig.Line +} + +// SetLine replaces the line associated with this Line. +func (ms Line) SetLine(v int64) { + ms.state.AssertMutable() + ms.orig.Line = v +} + +// Column returns the column associated with this Line. +func (ms Line) Column() int64 { + return ms.orig.Column +} + +// SetColumn replaces the column associated with this Line. +func (ms Line) SetColumn(v int64) { + ms.state.AssertMutable() + ms.orig.Column = v +} + +// CopyTo copies all properties from the current struct overriding the destination. +func (ms Line) CopyTo(dest Line) { + dest.state.AssertMutable() + dest.SetFunctionIndex(ms.FunctionIndex()) + dest.SetLine(ms.Line()) + dest.SetColumn(ms.Column()) +} diff --git a/pdata/pprofile/generated_line_test.go b/pdata/pprofile/generated_line_test.go new file mode 100644 index 00000000000..aef0f583145 --- /dev/null +++ b/pdata/pprofile/generated_line_test.go @@ -0,0 +1,78 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +func TestLine_MoveTo(t *testing.T) { + ms := generateTestLine() + dest := NewLine() + ms.MoveTo(dest) + assert.Equal(t, NewLine(), ms) + assert.Equal(t, generateTestLine(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newLine(&otlpprofiles.Line{}, &sharedState)) }) + assert.Panics(t, func() { newLine(&otlpprofiles.Line{}, &sharedState).MoveTo(dest) }) +} + +func TestLine_CopyTo(t *testing.T) { + ms := NewLine() + orig := NewLine() + orig.CopyTo(ms) + assert.Equal(t, orig, ms) + orig = generateTestLine() + orig.CopyTo(ms) + assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newLine(&otlpprofiles.Line{}, &sharedState)) }) +} + +func TestLine_FunctionIndex(t *testing.T) { + ms := NewLine() + assert.Equal(t, uint64(0), ms.FunctionIndex()) + ms.SetFunctionIndex(uint64(1)) + assert.Equal(t, uint64(1), ms.FunctionIndex()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newLine(&otlpprofiles.Line{}, &sharedState).SetFunctionIndex(uint64(1)) }) +} + +func TestLine_Line(t *testing.T) { + ms := NewLine() + assert.Equal(t, int64(0), ms.Line()) + ms.SetLine(int64(1)) + assert.Equal(t, int64(1), ms.Line()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newLine(&otlpprofiles.Line{}, &sharedState).SetLine(int64(1)) }) +} + +func TestLine_Column(t *testing.T) { + ms := NewLine() + assert.Equal(t, int64(0), ms.Column()) + ms.SetColumn(int64(1)) + assert.Equal(t, int64(1), ms.Column()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newLine(&otlpprofiles.Line{}, &sharedState).SetColumn(int64(1)) }) +} + +func generateTestLine() Line { + tv := NewLine() + fillTestLine(tv) + return tv +} + +func fillTestLine(tv Line) { + tv.orig.FunctionIndex = uint64(1) + tv.orig.Line = int64(1) + tv.orig.Column = int64(1) +} diff --git a/pdata/pprofile/generated_lineslice.go b/pdata/pprofile/generated_lineslice.go new file mode 100644 index 00000000000..b354560d090 --- /dev/null +++ b/pdata/pprofile/generated_lineslice.go @@ -0,0 +1,136 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +// LineSlice logically represents a slice of Line. +// +// This is a reference type. If passed by value and callee modifies it, the +// caller will see the modification. +// +// Must use NewLineSlice function to create new instances. +// Important: zero-initialized instance is not valid for use. +type LineSlice struct { + orig *[]otlpprofiles.Line + state *internal.State +} + +func newLineSlice(orig *[]otlpprofiles.Line, state *internal.State) LineSlice { + return LineSlice{orig: orig, state: state} +} + +// NewLineSlice creates a LineSlice with 0 elements. +// Can use "EnsureCapacity" to initialize with a given capacity. +func NewLineSlice() LineSlice { + orig := []otlpprofiles.Line(nil) + state := internal.StateMutable + return newLineSlice(&orig, &state) +} + +// Len returns the number of elements in the slice. +// +// Returns "0" for a newly instance created with "NewLineSlice()". +func (es LineSlice) Len() int { + return len(*es.orig) +} + +// At returns the element at the given index. +// +// This function is used mostly for iterating over all the values in the slice: +// +// for i := 0; i < es.Len(); i++ { +// e := es.At(i) +// ... // Do something with the element +// } +func (es LineSlice) At(i int) Line { + return newLine(&(*es.orig)[i], es.state) +} + +// EnsureCapacity is an operation that ensures the slice has at least the specified capacity. +// 1. If the newCap <= cap then no change in capacity. +// 2. If the newCap > cap then the slice capacity will be expanded to equal newCap. +// +// Here is how a new LineSlice can be initialized: +// +// es := NewLineSlice() +// es.EnsureCapacity(4) +// for i := 0; i < 4; i++ { +// e := es.AppendEmpty() +// // Here should set all the values for e. +// } +func (es LineSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() + oldCap := cap(*es.orig) + if newCap <= oldCap { + return + } + + newOrig := make([]otlpprofiles.Line, len(*es.orig), newCap) + copy(newOrig, *es.orig) + *es.orig = newOrig +} + +// AppendEmpty will append to the end of the slice an empty Line. +// It returns the newly added Line. +func (es LineSlice) AppendEmpty() Line { + es.state.AssertMutable() + *es.orig = append(*es.orig, otlpprofiles.Line{}) + return es.At(es.Len() - 1) +} + +// MoveAndAppendTo moves all elements from the current slice and appends them to the dest. +// The current slice will be cleared. +func (es LineSlice) MoveAndAppendTo(dest LineSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() + if *dest.orig == nil { + // We can simply move the entire vector and avoid any allocations. + *dest.orig = *es.orig + } else { + *dest.orig = append(*dest.orig, *es.orig...) + } + *es.orig = nil +} + +// RemoveIf calls f sequentially for each element present in the slice. +// If f returns true, the element is removed from the slice. +func (es LineSlice) RemoveIf(f func(Line) bool) { + es.state.AssertMutable() + newLen := 0 + for i := 0; i < len(*es.orig); i++ { + if f(es.At(i)) { + continue + } + if newLen == i { + // Nothing to move, element is at the right place. + newLen++ + continue + } + (*es.orig)[newLen] = (*es.orig)[i] + newLen++ + } + *es.orig = (*es.orig)[:newLen] +} + +// CopyTo copies all elements from the current slice overriding the destination. +func (es LineSlice) CopyTo(dest LineSlice) { + dest.state.AssertMutable() + srcLen := es.Len() + destCap := cap(*dest.orig) + if srcLen <= destCap { + (*dest.orig) = (*dest.orig)[:srcLen:destCap] + } else { + (*dest.orig) = make([]otlpprofiles.Line, srcLen) + } + for i := range *es.orig { + newLine(&(*es.orig)[i], es.state).CopyTo(newLine(&(*dest.orig)[i], dest.state)) + } +} diff --git a/pdata/pprofile/generated_lineslice_test.go b/pdata/pprofile/generated_lineslice_test.go new file mode 100644 index 00000000000..1f5a69ca3f4 --- /dev/null +++ b/pdata/pprofile/generated_lineslice_test.go @@ -0,0 +1,137 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +func TestLineSlice(t *testing.T) { + es := NewLineSlice() + assert.Equal(t, 0, es.Len()) + state := internal.StateMutable + es = newLineSlice(&[]otlpprofiles.Line{}, &state) + assert.Equal(t, 0, es.Len()) + + emptyVal := NewLine() + testVal := generateTestLine() + for i := 0; i < 7; i++ { + el := es.AppendEmpty() + assert.Equal(t, emptyVal, es.At(i)) + fillTestLine(el) + assert.Equal(t, testVal, es.At(i)) + } + assert.Equal(t, 7, es.Len()) +} + +func TestLineSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newLineSlice(&[]otlpprofiles.Line{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewLineSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + +func TestLineSlice_CopyTo(t *testing.T) { + dest := NewLineSlice() + // Test CopyTo to empty + NewLineSlice().CopyTo(dest) + assert.Equal(t, NewLineSlice(), dest) + + // Test CopyTo larger slice + generateTestLineSlice().CopyTo(dest) + assert.Equal(t, generateTestLineSlice(), dest) + + // Test CopyTo same size slice + generateTestLineSlice().CopyTo(dest) + assert.Equal(t, generateTestLineSlice(), dest) +} + +func TestLineSlice_EnsureCapacity(t *testing.T) { + es := generateTestLineSlice() + + // Test ensure smaller capacity. + const ensureSmallLen = 4 + es.EnsureCapacity(ensureSmallLen) + assert.Less(t, ensureSmallLen, es.Len()) + assert.Equal(t, es.Len(), cap(*es.orig)) + assert.Equal(t, generateTestLineSlice(), es) + + // Test ensure larger capacity + const ensureLargeLen = 9 + es.EnsureCapacity(ensureLargeLen) + assert.Less(t, generateTestLineSlice().Len(), ensureLargeLen) + assert.Equal(t, ensureLargeLen, cap(*es.orig)) + assert.Equal(t, generateTestLineSlice(), es) +} + +func TestLineSlice_MoveAndAppendTo(t *testing.T) { + // Test MoveAndAppendTo to empty + expectedSlice := generateTestLineSlice() + dest := NewLineSlice() + src := generateTestLineSlice() + src.MoveAndAppendTo(dest) + assert.Equal(t, generateTestLineSlice(), dest) + assert.Equal(t, 0, src.Len()) + assert.Equal(t, expectedSlice.Len(), dest.Len()) + + // Test MoveAndAppendTo empty slice + src.MoveAndAppendTo(dest) + assert.Equal(t, generateTestLineSlice(), dest) + assert.Equal(t, 0, src.Len()) + assert.Equal(t, expectedSlice.Len(), dest.Len()) + + // Test MoveAndAppendTo not empty slice + generateTestLineSlice().MoveAndAppendTo(dest) + assert.Equal(t, 2*expectedSlice.Len(), dest.Len()) + for i := 0; i < expectedSlice.Len(); i++ { + assert.Equal(t, expectedSlice.At(i), dest.At(i)) + assert.Equal(t, expectedSlice.At(i), dest.At(i+expectedSlice.Len())) + } +} + +func TestLineSlice_RemoveIf(t *testing.T) { + // Test RemoveIf on empty slice + emptySlice := NewLineSlice() + emptySlice.RemoveIf(func(el Line) bool { + t.Fail() + return false + }) + + // Test RemoveIf + filtered := generateTestLineSlice() + pos := 0 + filtered.RemoveIf(func(el Line) bool { + pos++ + return pos%3 == 0 + }) + assert.Equal(t, 5, filtered.Len()) +} + +func generateTestLineSlice() LineSlice { + es := NewLineSlice() + fillTestLineSlice(es) + return es +} + +func fillTestLineSlice(es LineSlice) { + *es.orig = make([]otlpprofiles.Line, 7) + for i := 0; i < 7; i++ { + (*es.orig)[i] = otlpprofiles.Line{} + fillTestLine(newLine(&(*es.orig)[i], es.state)) + } +} diff --git a/pdata/pprofile/generated_link.go b/pdata/pprofile/generated_link.go new file mode 100644 index 00000000000..70af00112b0 --- /dev/null +++ b/pdata/pprofile/generated_link.go @@ -0,0 +1,77 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "go.opentelemetry.io/collector/pdata/internal" + "go.opentelemetry.io/collector/pdata/internal/data" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" + "go.opentelemetry.io/collector/pdata/pcommon" +) + +// Link represents a pointer from a profile Sample to a trace Span. +// +// This is a reference type, if passed by value and callee modifies it the +// caller will see the modification. +// +// Must use NewLink function to create new instances. +// Important: zero-initialized instance is not valid for use. +type Link struct { + orig *otlpprofiles.Link + state *internal.State +} + +func newLink(orig *otlpprofiles.Link, state *internal.State) Link { + return Link{orig: orig, state: state} +} + +// NewLink creates a new empty Link. +// +// This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, +// OR directly access the member if this is embedded in another struct. +func NewLink() Link { + state := internal.StateMutable + return newLink(&otlpprofiles.Link{}, &state) +} + +// MoveTo moves all properties from the current struct overriding the destination and +// resetting the current instance to its zero value +func (ms Link) MoveTo(dest Link) { + ms.state.AssertMutable() + dest.state.AssertMutable() + *dest.orig = *ms.orig + *ms.orig = otlpprofiles.Link{} +} + +// TraceID returns the traceid associated with this Link. +func (ms Link) TraceID() pcommon.TraceID { + return pcommon.TraceID(ms.orig.TraceId) +} + +// SetTraceID replaces the traceid associated with this Link. +func (ms Link) SetTraceID(v pcommon.TraceID) { + ms.state.AssertMutable() + ms.orig.TraceId = data.TraceID(v) +} + +// SpanID returns the spanid associated with this Link. +func (ms Link) SpanID() pcommon.SpanID { + return pcommon.SpanID(ms.orig.SpanId) +} + +// SetSpanID replaces the spanid associated with this Link. +func (ms Link) SetSpanID(v pcommon.SpanID) { + ms.state.AssertMutable() + ms.orig.SpanId = data.SpanID(v) +} + +// CopyTo copies all properties from the current struct overriding the destination. +func (ms Link) CopyTo(dest Link) { + dest.state.AssertMutable() + dest.SetTraceID(ms.TraceID()) + dest.SetSpanID(ms.SpanID()) +} diff --git a/pdata/pprofile/generated_link_test.go b/pdata/pprofile/generated_link_test.go new file mode 100644 index 00000000000..8e10072d2dd --- /dev/null +++ b/pdata/pprofile/generated_link_test.go @@ -0,0 +1,68 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + "go.opentelemetry.io/collector/pdata/internal/data" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" + "go.opentelemetry.io/collector/pdata/pcommon" +) + +func TestLink_MoveTo(t *testing.T) { + ms := generateTestLink() + dest := NewLink() + ms.MoveTo(dest) + assert.Equal(t, NewLink(), ms) + assert.Equal(t, generateTestLink(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newLink(&otlpprofiles.Link{}, &sharedState)) }) + assert.Panics(t, func() { newLink(&otlpprofiles.Link{}, &sharedState).MoveTo(dest) }) +} + +func TestLink_CopyTo(t *testing.T) { + ms := NewLink() + orig := NewLink() + orig.CopyTo(ms) + assert.Equal(t, orig, ms) + orig = generateTestLink() + orig.CopyTo(ms) + assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newLink(&otlpprofiles.Link{}, &sharedState)) }) +} + +func TestLink_TraceID(t *testing.T) { + ms := NewLink() + assert.Equal(t, pcommon.TraceID(data.TraceID([16]byte{})), ms.TraceID()) + testValTraceID := pcommon.TraceID(data.TraceID([16]byte{1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1})) + ms.SetTraceID(testValTraceID) + assert.Equal(t, testValTraceID, ms.TraceID()) +} + +func TestLink_SpanID(t *testing.T) { + ms := NewLink() + assert.Equal(t, pcommon.SpanID(data.SpanID([8]byte{})), ms.SpanID()) + testValSpanID := pcommon.SpanID(data.SpanID([8]byte{8, 7, 6, 5, 4, 3, 2, 1})) + ms.SetSpanID(testValSpanID) + assert.Equal(t, testValSpanID, ms.SpanID()) +} + +func generateTestLink() Link { + tv := NewLink() + fillTestLink(tv) + return tv +} + +func fillTestLink(tv Link) { + tv.orig.TraceId = data.TraceID([16]byte{1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1}) + tv.orig.SpanId = data.SpanID([8]byte{8, 7, 6, 5, 4, 3, 2, 1}) +} diff --git a/pdata/pprofile/generated_linkslice.go b/pdata/pprofile/generated_linkslice.go new file mode 100644 index 00000000000..3ae925ac09c --- /dev/null +++ b/pdata/pprofile/generated_linkslice.go @@ -0,0 +1,136 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +// LinkSlice logically represents a slice of Link. +// +// This is a reference type. If passed by value and callee modifies it, the +// caller will see the modification. +// +// Must use NewLinkSlice function to create new instances. +// Important: zero-initialized instance is not valid for use. +type LinkSlice struct { + orig *[]otlpprofiles.Link + state *internal.State +} + +func newLinkSlice(orig *[]otlpprofiles.Link, state *internal.State) LinkSlice { + return LinkSlice{orig: orig, state: state} +} + +// NewLinkSlice creates a LinkSlice with 0 elements. +// Can use "EnsureCapacity" to initialize with a given capacity. +func NewLinkSlice() LinkSlice { + orig := []otlpprofiles.Link(nil) + state := internal.StateMutable + return newLinkSlice(&orig, &state) +} + +// Len returns the number of elements in the slice. +// +// Returns "0" for a newly instance created with "NewLinkSlice()". +func (es LinkSlice) Len() int { + return len(*es.orig) +} + +// At returns the element at the given index. +// +// This function is used mostly for iterating over all the values in the slice: +// +// for i := 0; i < es.Len(); i++ { +// e := es.At(i) +// ... // Do something with the element +// } +func (es LinkSlice) At(i int) Link { + return newLink(&(*es.orig)[i], es.state) +} + +// EnsureCapacity is an operation that ensures the slice has at least the specified capacity. +// 1. If the newCap <= cap then no change in capacity. +// 2. If the newCap > cap then the slice capacity will be expanded to equal newCap. +// +// Here is how a new LinkSlice can be initialized: +// +// es := NewLinkSlice() +// es.EnsureCapacity(4) +// for i := 0; i < 4; i++ { +// e := es.AppendEmpty() +// // Here should set all the values for e. +// } +func (es LinkSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() + oldCap := cap(*es.orig) + if newCap <= oldCap { + return + } + + newOrig := make([]otlpprofiles.Link, len(*es.orig), newCap) + copy(newOrig, *es.orig) + *es.orig = newOrig +} + +// AppendEmpty will append to the end of the slice an empty Link. +// It returns the newly added Link. +func (es LinkSlice) AppendEmpty() Link { + es.state.AssertMutable() + *es.orig = append(*es.orig, otlpprofiles.Link{}) + return es.At(es.Len() - 1) +} + +// MoveAndAppendTo moves all elements from the current slice and appends them to the dest. +// The current slice will be cleared. +func (es LinkSlice) MoveAndAppendTo(dest LinkSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() + if *dest.orig == nil { + // We can simply move the entire vector and avoid any allocations. + *dest.orig = *es.orig + } else { + *dest.orig = append(*dest.orig, *es.orig...) + } + *es.orig = nil +} + +// RemoveIf calls f sequentially for each element present in the slice. +// If f returns true, the element is removed from the slice. +func (es LinkSlice) RemoveIf(f func(Link) bool) { + es.state.AssertMutable() + newLen := 0 + for i := 0; i < len(*es.orig); i++ { + if f(es.At(i)) { + continue + } + if newLen == i { + // Nothing to move, element is at the right place. + newLen++ + continue + } + (*es.orig)[newLen] = (*es.orig)[i] + newLen++ + } + *es.orig = (*es.orig)[:newLen] +} + +// CopyTo copies all elements from the current slice overriding the destination. +func (es LinkSlice) CopyTo(dest LinkSlice) { + dest.state.AssertMutable() + srcLen := es.Len() + destCap := cap(*dest.orig) + if srcLen <= destCap { + (*dest.orig) = (*dest.orig)[:srcLen:destCap] + } else { + (*dest.orig) = make([]otlpprofiles.Link, srcLen) + } + for i := range *es.orig { + newLink(&(*es.orig)[i], es.state).CopyTo(newLink(&(*dest.orig)[i], dest.state)) + } +} diff --git a/pdata/pprofile/generated_linkslice_test.go b/pdata/pprofile/generated_linkslice_test.go new file mode 100644 index 00000000000..5d22fcd69ca --- /dev/null +++ b/pdata/pprofile/generated_linkslice_test.go @@ -0,0 +1,137 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +func TestLinkSlice(t *testing.T) { + es := NewLinkSlice() + assert.Equal(t, 0, es.Len()) + state := internal.StateMutable + es = newLinkSlice(&[]otlpprofiles.Link{}, &state) + assert.Equal(t, 0, es.Len()) + + emptyVal := NewLink() + testVal := generateTestLink() + for i := 0; i < 7; i++ { + el := es.AppendEmpty() + assert.Equal(t, emptyVal, es.At(i)) + fillTestLink(el) + assert.Equal(t, testVal, es.At(i)) + } + assert.Equal(t, 7, es.Len()) +} + +func TestLinkSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newLinkSlice(&[]otlpprofiles.Link{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewLinkSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + +func TestLinkSlice_CopyTo(t *testing.T) { + dest := NewLinkSlice() + // Test CopyTo to empty + NewLinkSlice().CopyTo(dest) + assert.Equal(t, NewLinkSlice(), dest) + + // Test CopyTo larger slice + generateTestLinkSlice().CopyTo(dest) + assert.Equal(t, generateTestLinkSlice(), dest) + + // Test CopyTo same size slice + generateTestLinkSlice().CopyTo(dest) + assert.Equal(t, generateTestLinkSlice(), dest) +} + +func TestLinkSlice_EnsureCapacity(t *testing.T) { + es := generateTestLinkSlice() + + // Test ensure smaller capacity. + const ensureSmallLen = 4 + es.EnsureCapacity(ensureSmallLen) + assert.Less(t, ensureSmallLen, es.Len()) + assert.Equal(t, es.Len(), cap(*es.orig)) + assert.Equal(t, generateTestLinkSlice(), es) + + // Test ensure larger capacity + const ensureLargeLen = 9 + es.EnsureCapacity(ensureLargeLen) + assert.Less(t, generateTestLinkSlice().Len(), ensureLargeLen) + assert.Equal(t, ensureLargeLen, cap(*es.orig)) + assert.Equal(t, generateTestLinkSlice(), es) +} + +func TestLinkSlice_MoveAndAppendTo(t *testing.T) { + // Test MoveAndAppendTo to empty + expectedSlice := generateTestLinkSlice() + dest := NewLinkSlice() + src := generateTestLinkSlice() + src.MoveAndAppendTo(dest) + assert.Equal(t, generateTestLinkSlice(), dest) + assert.Equal(t, 0, src.Len()) + assert.Equal(t, expectedSlice.Len(), dest.Len()) + + // Test MoveAndAppendTo empty slice + src.MoveAndAppendTo(dest) + assert.Equal(t, generateTestLinkSlice(), dest) + assert.Equal(t, 0, src.Len()) + assert.Equal(t, expectedSlice.Len(), dest.Len()) + + // Test MoveAndAppendTo not empty slice + generateTestLinkSlice().MoveAndAppendTo(dest) + assert.Equal(t, 2*expectedSlice.Len(), dest.Len()) + for i := 0; i < expectedSlice.Len(); i++ { + assert.Equal(t, expectedSlice.At(i), dest.At(i)) + assert.Equal(t, expectedSlice.At(i), dest.At(i+expectedSlice.Len())) + } +} + +func TestLinkSlice_RemoveIf(t *testing.T) { + // Test RemoveIf on empty slice + emptySlice := NewLinkSlice() + emptySlice.RemoveIf(func(el Link) bool { + t.Fail() + return false + }) + + // Test RemoveIf + filtered := generateTestLinkSlice() + pos := 0 + filtered.RemoveIf(func(el Link) bool { + pos++ + return pos%3 == 0 + }) + assert.Equal(t, 5, filtered.Len()) +} + +func generateTestLinkSlice() LinkSlice { + es := NewLinkSlice() + fillTestLinkSlice(es) + return es +} + +func fillTestLinkSlice(es LinkSlice) { + *es.orig = make([]otlpprofiles.Link, 7) + for i := 0; i < 7; i++ { + (*es.orig)[i] = otlpprofiles.Link{} + fillTestLink(newLink(&(*es.orig)[i], es.state)) + } +} diff --git a/pdata/pprofile/generated_location.go b/pdata/pprofile/generated_location.go new file mode 100644 index 00000000000..5ed030f6d6d --- /dev/null +++ b/pdata/pprofile/generated_location.go @@ -0,0 +1,124 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" + "go.opentelemetry.io/collector/pdata/pcommon" +) + +// Location describes function and line table debug information. +// +// This is a reference type, if passed by value and callee modifies it the +// caller will see the modification. +// +// Must use NewLocation function to create new instances. +// Important: zero-initialized instance is not valid for use. +type Location struct { + orig *otlpprofiles.Location + state *internal.State +} + +func newLocation(orig *otlpprofiles.Location, state *internal.State) Location { + return Location{orig: orig, state: state} +} + +// NewLocation creates a new empty Location. +// +// This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, +// OR directly access the member if this is embedded in another struct. +func NewLocation() Location { + state := internal.StateMutable + return newLocation(&otlpprofiles.Location{}, &state) +} + +// MoveTo moves all properties from the current struct overriding the destination and +// resetting the current instance to its zero value +func (ms Location) MoveTo(dest Location) { + ms.state.AssertMutable() + dest.state.AssertMutable() + *dest.orig = *ms.orig + *ms.orig = otlpprofiles.Location{} +} + +// ID returns the id associated with this Location. +func (ms Location) ID() uint64 { + return ms.orig.Id +} + +// SetID replaces the id associated with this Location. +func (ms Location) SetID(v uint64) { + ms.state.AssertMutable() + ms.orig.Id = v +} + +// MappingIndex returns the mappingindex associated with this Location. +func (ms Location) MappingIndex() uint64 { + return ms.orig.MappingIndex +} + +// SetMappingIndex replaces the mappingindex associated with this Location. +func (ms Location) SetMappingIndex(v uint64) { + ms.state.AssertMutable() + ms.orig.MappingIndex = v +} + +// Address returns the address associated with this Location. +func (ms Location) Address() uint64 { + return ms.orig.Address +} + +// SetAddress replaces the address associated with this Location. +func (ms Location) SetAddress(v uint64) { + ms.state.AssertMutable() + ms.orig.Address = v +} + +// Line returns the Line associated with this Location. +func (ms Location) Line() LineSlice { + return newLineSlice(&ms.orig.Line, ms.state) +} + +// IsFolded returns the isfolded associated with this Location. +func (ms Location) IsFolded() bool { + return ms.orig.IsFolded +} + +// SetIsFolded replaces the isfolded associated with this Location. +func (ms Location) SetIsFolded(v bool) { + ms.state.AssertMutable() + ms.orig.IsFolded = v +} + +// TypeIndex returns the typeindex associated with this Location. +func (ms Location) TypeIndex() uint32 { + return ms.orig.TypeIndex +} + +// SetTypeIndex replaces the typeindex associated with this Location. +func (ms Location) SetTypeIndex(v uint32) { + ms.state.AssertMutable() + ms.orig.TypeIndex = v +} + +// Attributes returns the Attributes associated with this Location. +func (ms Location) Attributes() pcommon.UInt64Slice { + return pcommon.UInt64Slice(internal.NewUInt64Slice(&ms.orig.Attributes, ms.state)) +} + +// CopyTo copies all properties from the current struct overriding the destination. +func (ms Location) CopyTo(dest Location) { + dest.state.AssertMutable() + dest.SetID(ms.ID()) + dest.SetMappingIndex(ms.MappingIndex()) + dest.SetAddress(ms.Address()) + ms.Line().CopyTo(dest.Line()) + dest.SetIsFolded(ms.IsFolded()) + dest.SetTypeIndex(ms.TypeIndex()) + ms.Attributes().CopyTo(dest.Attributes()) +} diff --git a/pdata/pprofile/generated_location_test.go b/pdata/pprofile/generated_location_test.go new file mode 100644 index 00000000000..60f6d553bb6 --- /dev/null +++ b/pdata/pprofile/generated_location_test.go @@ -0,0 +1,115 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" + "go.opentelemetry.io/collector/pdata/pcommon" +) + +func TestLocation_MoveTo(t *testing.T) { + ms := generateTestLocation() + dest := NewLocation() + ms.MoveTo(dest) + assert.Equal(t, NewLocation(), ms) + assert.Equal(t, generateTestLocation(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newLocation(&otlpprofiles.Location{}, &sharedState)) }) + assert.Panics(t, func() { newLocation(&otlpprofiles.Location{}, &sharedState).MoveTo(dest) }) +} + +func TestLocation_CopyTo(t *testing.T) { + ms := NewLocation() + orig := NewLocation() + orig.CopyTo(ms) + assert.Equal(t, orig, ms) + orig = generateTestLocation() + orig.CopyTo(ms) + assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newLocation(&otlpprofiles.Location{}, &sharedState)) }) +} + +func TestLocation_ID(t *testing.T) { + ms := NewLocation() + assert.Equal(t, uint64(0), ms.ID()) + ms.SetID(uint64(1)) + assert.Equal(t, uint64(1), ms.ID()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newLocation(&otlpprofiles.Location{}, &sharedState).SetID(uint64(1)) }) +} + +func TestLocation_MappingIndex(t *testing.T) { + ms := NewLocation() + assert.Equal(t, uint64(0), ms.MappingIndex()) + ms.SetMappingIndex(uint64(1)) + assert.Equal(t, uint64(1), ms.MappingIndex()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newLocation(&otlpprofiles.Location{}, &sharedState).SetMappingIndex(uint64(1)) }) +} + +func TestLocation_Address(t *testing.T) { + ms := NewLocation() + assert.Equal(t, uint64(0), ms.Address()) + ms.SetAddress(uint64(1)) + assert.Equal(t, uint64(1), ms.Address()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newLocation(&otlpprofiles.Location{}, &sharedState).SetAddress(uint64(1)) }) +} + +func TestLocation_Line(t *testing.T) { + ms := NewLocation() + assert.Equal(t, NewLineSlice(), ms.Line()) + fillTestLineSlice(ms.Line()) + assert.Equal(t, generateTestLineSlice(), ms.Line()) +} + +func TestLocation_IsFolded(t *testing.T) { + ms := NewLocation() + assert.Equal(t, false, ms.IsFolded()) + ms.SetIsFolded(true) + assert.Equal(t, true, ms.IsFolded()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newLocation(&otlpprofiles.Location{}, &sharedState).SetIsFolded(true) }) +} + +func TestLocation_TypeIndex(t *testing.T) { + ms := NewLocation() + assert.Equal(t, uint32(0), ms.TypeIndex()) + ms.SetTypeIndex(uint32(1)) + assert.Equal(t, uint32(1), ms.TypeIndex()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newLocation(&otlpprofiles.Location{}, &sharedState).SetTypeIndex(uint32(1)) }) +} + +func TestLocation_Attributes(t *testing.T) { + ms := NewLocation() + assert.Equal(t, pcommon.NewUInt64Slice(), ms.Attributes()) + internal.FillTestUInt64Slice(internal.UInt64Slice(ms.Attributes())) + assert.Equal(t, pcommon.UInt64Slice(internal.GenerateTestUInt64Slice()), ms.Attributes()) +} + +func generateTestLocation() Location { + tv := NewLocation() + fillTestLocation(tv) + return tv +} + +func fillTestLocation(tv Location) { + tv.orig.Id = uint64(1) + tv.orig.MappingIndex = uint64(1) + tv.orig.Address = uint64(1) + fillTestLineSlice(newLineSlice(&tv.orig.Line, tv.state)) + tv.orig.IsFolded = true + tv.orig.TypeIndex = uint32(1) + internal.FillTestUInt64Slice(internal.NewUInt64Slice(&tv.orig.Attributes, tv.state)) +} diff --git a/pdata/pprofile/generated_locationslice.go b/pdata/pprofile/generated_locationslice.go new file mode 100644 index 00000000000..e5751c4dcb6 --- /dev/null +++ b/pdata/pprofile/generated_locationslice.go @@ -0,0 +1,136 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +// LocationSlice logically represents a slice of Location. +// +// This is a reference type. If passed by value and callee modifies it, the +// caller will see the modification. +// +// Must use NewLocationSlice function to create new instances. +// Important: zero-initialized instance is not valid for use. +type LocationSlice struct { + orig *[]otlpprofiles.Location + state *internal.State +} + +func newLocationSlice(orig *[]otlpprofiles.Location, state *internal.State) LocationSlice { + return LocationSlice{orig: orig, state: state} +} + +// NewLocationSlice creates a LocationSlice with 0 elements. +// Can use "EnsureCapacity" to initialize with a given capacity. +func NewLocationSlice() LocationSlice { + orig := []otlpprofiles.Location(nil) + state := internal.StateMutable + return newLocationSlice(&orig, &state) +} + +// Len returns the number of elements in the slice. +// +// Returns "0" for a newly instance created with "NewLocationSlice()". +func (es LocationSlice) Len() int { + return len(*es.orig) +} + +// At returns the element at the given index. +// +// This function is used mostly for iterating over all the values in the slice: +// +// for i := 0; i < es.Len(); i++ { +// e := es.At(i) +// ... // Do something with the element +// } +func (es LocationSlice) At(i int) Location { + return newLocation(&(*es.orig)[i], es.state) +} + +// EnsureCapacity is an operation that ensures the slice has at least the specified capacity. +// 1. If the newCap <= cap then no change in capacity. +// 2. If the newCap > cap then the slice capacity will be expanded to equal newCap. +// +// Here is how a new LocationSlice can be initialized: +// +// es := NewLocationSlice() +// es.EnsureCapacity(4) +// for i := 0; i < 4; i++ { +// e := es.AppendEmpty() +// // Here should set all the values for e. +// } +func (es LocationSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() + oldCap := cap(*es.orig) + if newCap <= oldCap { + return + } + + newOrig := make([]otlpprofiles.Location, len(*es.orig), newCap) + copy(newOrig, *es.orig) + *es.orig = newOrig +} + +// AppendEmpty will append to the end of the slice an empty Location. +// It returns the newly added Location. +func (es LocationSlice) AppendEmpty() Location { + es.state.AssertMutable() + *es.orig = append(*es.orig, otlpprofiles.Location{}) + return es.At(es.Len() - 1) +} + +// MoveAndAppendTo moves all elements from the current slice and appends them to the dest. +// The current slice will be cleared. +func (es LocationSlice) MoveAndAppendTo(dest LocationSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() + if *dest.orig == nil { + // We can simply move the entire vector and avoid any allocations. + *dest.orig = *es.orig + } else { + *dest.orig = append(*dest.orig, *es.orig...) + } + *es.orig = nil +} + +// RemoveIf calls f sequentially for each element present in the slice. +// If f returns true, the element is removed from the slice. +func (es LocationSlice) RemoveIf(f func(Location) bool) { + es.state.AssertMutable() + newLen := 0 + for i := 0; i < len(*es.orig); i++ { + if f(es.At(i)) { + continue + } + if newLen == i { + // Nothing to move, element is at the right place. + newLen++ + continue + } + (*es.orig)[newLen] = (*es.orig)[i] + newLen++ + } + *es.orig = (*es.orig)[:newLen] +} + +// CopyTo copies all elements from the current slice overriding the destination. +func (es LocationSlice) CopyTo(dest LocationSlice) { + dest.state.AssertMutable() + srcLen := es.Len() + destCap := cap(*dest.orig) + if srcLen <= destCap { + (*dest.orig) = (*dest.orig)[:srcLen:destCap] + } else { + (*dest.orig) = make([]otlpprofiles.Location, srcLen) + } + for i := range *es.orig { + newLocation(&(*es.orig)[i], es.state).CopyTo(newLocation(&(*dest.orig)[i], dest.state)) + } +} diff --git a/pdata/pprofile/generated_locationslice_test.go b/pdata/pprofile/generated_locationslice_test.go new file mode 100644 index 00000000000..06d6946279f --- /dev/null +++ b/pdata/pprofile/generated_locationslice_test.go @@ -0,0 +1,137 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +func TestLocationSlice(t *testing.T) { + es := NewLocationSlice() + assert.Equal(t, 0, es.Len()) + state := internal.StateMutable + es = newLocationSlice(&[]otlpprofiles.Location{}, &state) + assert.Equal(t, 0, es.Len()) + + emptyVal := NewLocation() + testVal := generateTestLocation() + for i := 0; i < 7; i++ { + el := es.AppendEmpty() + assert.Equal(t, emptyVal, es.At(i)) + fillTestLocation(el) + assert.Equal(t, testVal, es.At(i)) + } + assert.Equal(t, 7, es.Len()) +} + +func TestLocationSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newLocationSlice(&[]otlpprofiles.Location{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewLocationSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + +func TestLocationSlice_CopyTo(t *testing.T) { + dest := NewLocationSlice() + // Test CopyTo to empty + NewLocationSlice().CopyTo(dest) + assert.Equal(t, NewLocationSlice(), dest) + + // Test CopyTo larger slice + generateTestLocationSlice().CopyTo(dest) + assert.Equal(t, generateTestLocationSlice(), dest) + + // Test CopyTo same size slice + generateTestLocationSlice().CopyTo(dest) + assert.Equal(t, generateTestLocationSlice(), dest) +} + +func TestLocationSlice_EnsureCapacity(t *testing.T) { + es := generateTestLocationSlice() + + // Test ensure smaller capacity. + const ensureSmallLen = 4 + es.EnsureCapacity(ensureSmallLen) + assert.Less(t, ensureSmallLen, es.Len()) + assert.Equal(t, es.Len(), cap(*es.orig)) + assert.Equal(t, generateTestLocationSlice(), es) + + // Test ensure larger capacity + const ensureLargeLen = 9 + es.EnsureCapacity(ensureLargeLen) + assert.Less(t, generateTestLocationSlice().Len(), ensureLargeLen) + assert.Equal(t, ensureLargeLen, cap(*es.orig)) + assert.Equal(t, generateTestLocationSlice(), es) +} + +func TestLocationSlice_MoveAndAppendTo(t *testing.T) { + // Test MoveAndAppendTo to empty + expectedSlice := generateTestLocationSlice() + dest := NewLocationSlice() + src := generateTestLocationSlice() + src.MoveAndAppendTo(dest) + assert.Equal(t, generateTestLocationSlice(), dest) + assert.Equal(t, 0, src.Len()) + assert.Equal(t, expectedSlice.Len(), dest.Len()) + + // Test MoveAndAppendTo empty slice + src.MoveAndAppendTo(dest) + assert.Equal(t, generateTestLocationSlice(), dest) + assert.Equal(t, 0, src.Len()) + assert.Equal(t, expectedSlice.Len(), dest.Len()) + + // Test MoveAndAppendTo not empty slice + generateTestLocationSlice().MoveAndAppendTo(dest) + assert.Equal(t, 2*expectedSlice.Len(), dest.Len()) + for i := 0; i < expectedSlice.Len(); i++ { + assert.Equal(t, expectedSlice.At(i), dest.At(i)) + assert.Equal(t, expectedSlice.At(i), dest.At(i+expectedSlice.Len())) + } +} + +func TestLocationSlice_RemoveIf(t *testing.T) { + // Test RemoveIf on empty slice + emptySlice := NewLocationSlice() + emptySlice.RemoveIf(func(el Location) bool { + t.Fail() + return false + }) + + // Test RemoveIf + filtered := generateTestLocationSlice() + pos := 0 + filtered.RemoveIf(func(el Location) bool { + pos++ + return pos%3 == 0 + }) + assert.Equal(t, 5, filtered.Len()) +} + +func generateTestLocationSlice() LocationSlice { + es := NewLocationSlice() + fillTestLocationSlice(es) + return es +} + +func fillTestLocationSlice(es LocationSlice) { + *es.orig = make([]otlpprofiles.Location, 7) + for i := 0; i < 7; i++ { + (*es.orig)[i] = otlpprofiles.Location{} + fillTestLocation(newLocation(&(*es.orig)[i], es.state)) + } +} diff --git a/pdata/pprofile/generated_mapping.go b/pdata/pprofile/generated_mapping.go new file mode 100644 index 00000000000..66c7cd165df --- /dev/null +++ b/pdata/pprofile/generated_mapping.go @@ -0,0 +1,190 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" + "go.opentelemetry.io/collector/pdata/pcommon" +) + +// Mapping describes the mapping of a binary in memory, including its address range, file offset, and metadata like build ID +// +// This is a reference type, if passed by value and callee modifies it the +// caller will see the modification. +// +// Must use NewMapping function to create new instances. +// Important: zero-initialized instance is not valid for use. +type Mapping struct { + orig *otlpprofiles.Mapping + state *internal.State +} + +func newMapping(orig *otlpprofiles.Mapping, state *internal.State) Mapping { + return Mapping{orig: orig, state: state} +} + +// NewMapping creates a new empty Mapping. +// +// This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, +// OR directly access the member if this is embedded in another struct. +func NewMapping() Mapping { + state := internal.StateMutable + return newMapping(&otlpprofiles.Mapping{}, &state) +} + +// MoveTo moves all properties from the current struct overriding the destination and +// resetting the current instance to its zero value +func (ms Mapping) MoveTo(dest Mapping) { + ms.state.AssertMutable() + dest.state.AssertMutable() + *dest.orig = *ms.orig + *ms.orig = otlpprofiles.Mapping{} +} + +// ID returns the id associated with this Mapping. +func (ms Mapping) ID() uint64 { + return ms.orig.Id +} + +// SetID replaces the id associated with this Mapping. +func (ms Mapping) SetID(v uint64) { + ms.state.AssertMutable() + ms.orig.Id = v +} + +// MemoryStart returns the memorystart associated with this Mapping. +func (ms Mapping) MemoryStart() uint64 { + return ms.orig.MemoryStart +} + +// SetMemoryStart replaces the memorystart associated with this Mapping. +func (ms Mapping) SetMemoryStart(v uint64) { + ms.state.AssertMutable() + ms.orig.MemoryStart = v +} + +// MemoryLimit returns the memorylimit associated with this Mapping. +func (ms Mapping) MemoryLimit() uint64 { + return ms.orig.MemoryLimit +} + +// SetMemoryLimit replaces the memorylimit associated with this Mapping. +func (ms Mapping) SetMemoryLimit(v uint64) { + ms.state.AssertMutable() + ms.orig.MemoryLimit = v +} + +// FileOffset returns the fileoffset associated with this Mapping. +func (ms Mapping) FileOffset() uint64 { + return ms.orig.FileOffset +} + +// SetFileOffset replaces the fileoffset associated with this Mapping. +func (ms Mapping) SetFileOffset(v uint64) { + ms.state.AssertMutable() + ms.orig.FileOffset = v +} + +// Filename returns the filename associated with this Mapping. +func (ms Mapping) Filename() int64 { + return ms.orig.Filename +} + +// SetFilename replaces the filename associated with this Mapping. +func (ms Mapping) SetFilename(v int64) { + ms.state.AssertMutable() + ms.orig.Filename = v +} + +// BuildID returns the buildid associated with this Mapping. +func (ms Mapping) BuildID() int64 { + return ms.orig.BuildId +} + +// SetBuildID replaces the buildid associated with this Mapping. +func (ms Mapping) SetBuildID(v int64) { + ms.state.AssertMutable() + ms.orig.BuildId = v +} + +// BuildIDKind returns the buildidkind associated with this Mapping. +func (ms Mapping) BuildIDKind() otlpprofiles.BuildIdKind { + return ms.orig.BuildIdKind +} + +// SetBuildIDKind replaces the buildidkind associated with this Mapping. +func (ms Mapping) SetBuildIDKind(v otlpprofiles.BuildIdKind) { + ms.state.AssertMutable() + ms.orig.BuildIdKind = v +} + +// Attributes returns the Attributes associated with this Mapping. +func (ms Mapping) Attributes() pcommon.UInt64Slice { + return pcommon.UInt64Slice(internal.NewUInt64Slice(&ms.orig.Attributes, ms.state)) +} + +// HasFunctions returns the hasfunctions associated with this Mapping. +func (ms Mapping) HasFunctions() bool { + return ms.orig.HasFunctions +} + +// SetHasFunctions replaces the hasfunctions associated with this Mapping. +func (ms Mapping) SetHasFunctions(v bool) { + ms.state.AssertMutable() + ms.orig.HasFunctions = v +} + +// HasFilenames returns the hasfilenames associated with this Mapping. +func (ms Mapping) HasFilenames() bool { + return ms.orig.HasFilenames +} + +// SetHasFilenames replaces the hasfilenames associated with this Mapping. +func (ms Mapping) SetHasFilenames(v bool) { + ms.state.AssertMutable() + ms.orig.HasFilenames = v +} + +// HasLineNumbers returns the haslinenumbers associated with this Mapping. +func (ms Mapping) HasLineNumbers() bool { + return ms.orig.HasLineNumbers +} + +// SetHasLineNumbers replaces the haslinenumbers associated with this Mapping. +func (ms Mapping) SetHasLineNumbers(v bool) { + ms.state.AssertMutable() + ms.orig.HasLineNumbers = v +} + +// HasInlineFrames returns the hasinlineframes associated with this Mapping. +func (ms Mapping) HasInlineFrames() bool { + return ms.orig.HasInlineFrames +} + +// SetHasInlineFrames replaces the hasinlineframes associated with this Mapping. +func (ms Mapping) SetHasInlineFrames(v bool) { + ms.state.AssertMutable() + ms.orig.HasInlineFrames = v +} + +// CopyTo copies all properties from the current struct overriding the destination. +func (ms Mapping) CopyTo(dest Mapping) { + dest.state.AssertMutable() + dest.SetID(ms.ID()) + dest.SetMemoryStart(ms.MemoryStart()) + dest.SetMemoryLimit(ms.MemoryLimit()) + dest.SetFileOffset(ms.FileOffset()) + dest.SetFilename(ms.Filename()) + dest.SetBuildID(ms.BuildID()) + dest.SetBuildIDKind(ms.BuildIDKind()) + ms.Attributes().CopyTo(dest.Attributes()) + dest.SetHasFunctions(ms.HasFunctions()) + dest.SetHasFilenames(ms.HasFilenames()) + dest.SetHasLineNumbers(ms.HasLineNumbers()) + dest.SetHasInlineFrames(ms.HasInlineFrames()) +} diff --git a/pdata/pprofile/generated_mapping_test.go b/pdata/pprofile/generated_mapping_test.go new file mode 100644 index 00000000000..6a50c205084 --- /dev/null +++ b/pdata/pprofile/generated_mapping_test.go @@ -0,0 +1,167 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" + "go.opentelemetry.io/collector/pdata/pcommon" +) + +func TestMapping_MoveTo(t *testing.T) { + ms := generateTestMapping() + dest := NewMapping() + ms.MoveTo(dest) + assert.Equal(t, NewMapping(), ms) + assert.Equal(t, generateTestMapping(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newMapping(&otlpprofiles.Mapping{}, &sharedState)) }) + assert.Panics(t, func() { newMapping(&otlpprofiles.Mapping{}, &sharedState).MoveTo(dest) }) +} + +func TestMapping_CopyTo(t *testing.T) { + ms := NewMapping() + orig := NewMapping() + orig.CopyTo(ms) + assert.Equal(t, orig, ms) + orig = generateTestMapping() + orig.CopyTo(ms) + assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newMapping(&otlpprofiles.Mapping{}, &sharedState)) }) +} + +func TestMapping_ID(t *testing.T) { + ms := NewMapping() + assert.Equal(t, uint64(0), ms.ID()) + ms.SetID(uint64(1)) + assert.Equal(t, uint64(1), ms.ID()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newMapping(&otlpprofiles.Mapping{}, &sharedState).SetID(uint64(1)) }) +} + +func TestMapping_MemoryStart(t *testing.T) { + ms := NewMapping() + assert.Equal(t, uint64(0), ms.MemoryStart()) + ms.SetMemoryStart(uint64(1)) + assert.Equal(t, uint64(1), ms.MemoryStart()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newMapping(&otlpprofiles.Mapping{}, &sharedState).SetMemoryStart(uint64(1)) }) +} + +func TestMapping_MemoryLimit(t *testing.T) { + ms := NewMapping() + assert.Equal(t, uint64(0), ms.MemoryLimit()) + ms.SetMemoryLimit(uint64(1)) + assert.Equal(t, uint64(1), ms.MemoryLimit()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newMapping(&otlpprofiles.Mapping{}, &sharedState).SetMemoryLimit(uint64(1)) }) +} + +func TestMapping_FileOffset(t *testing.T) { + ms := NewMapping() + assert.Equal(t, uint64(0), ms.FileOffset()) + ms.SetFileOffset(uint64(1)) + assert.Equal(t, uint64(1), ms.FileOffset()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newMapping(&otlpprofiles.Mapping{}, &sharedState).SetFileOffset(uint64(1)) }) +} + +func TestMapping_Filename(t *testing.T) { + ms := NewMapping() + assert.Equal(t, int64(0), ms.Filename()) + ms.SetFilename(int64(1)) + assert.Equal(t, int64(1), ms.Filename()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newMapping(&otlpprofiles.Mapping{}, &sharedState).SetFilename(int64(1)) }) +} + +func TestMapping_BuildID(t *testing.T) { + ms := NewMapping() + assert.Equal(t, int64(0), ms.BuildID()) + ms.SetBuildID(int64(1)) + assert.Equal(t, int64(1), ms.BuildID()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newMapping(&otlpprofiles.Mapping{}, &sharedState).SetBuildID(int64(1)) }) +} + +func TestMapping_BuildIDKind(t *testing.T) { + ms := NewMapping() + assert.Equal(t, otlpprofiles.BuildIdKind(0), ms.BuildIDKind()) + ms.SetBuildIDKind(otlpprofiles.BuildIdKind(1)) + assert.Equal(t, otlpprofiles.BuildIdKind(1), ms.BuildIDKind()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newMapping(&otlpprofiles.Mapping{}, &sharedState).SetBuildIDKind(otlpprofiles.BuildIdKind(1)) }) +} + +func TestMapping_Attributes(t *testing.T) { + ms := NewMapping() + assert.Equal(t, pcommon.NewUInt64Slice(), ms.Attributes()) + internal.FillTestUInt64Slice(internal.UInt64Slice(ms.Attributes())) + assert.Equal(t, pcommon.UInt64Slice(internal.GenerateTestUInt64Slice()), ms.Attributes()) +} + +func TestMapping_HasFunctions(t *testing.T) { + ms := NewMapping() + assert.Equal(t, false, ms.HasFunctions()) + ms.SetHasFunctions(true) + assert.Equal(t, true, ms.HasFunctions()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newMapping(&otlpprofiles.Mapping{}, &sharedState).SetHasFunctions(true) }) +} + +func TestMapping_HasFilenames(t *testing.T) { + ms := NewMapping() + assert.Equal(t, false, ms.HasFilenames()) + ms.SetHasFilenames(true) + assert.Equal(t, true, ms.HasFilenames()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newMapping(&otlpprofiles.Mapping{}, &sharedState).SetHasFilenames(true) }) +} + +func TestMapping_HasLineNumbers(t *testing.T) { + ms := NewMapping() + assert.Equal(t, false, ms.HasLineNumbers()) + ms.SetHasLineNumbers(true) + assert.Equal(t, true, ms.HasLineNumbers()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newMapping(&otlpprofiles.Mapping{}, &sharedState).SetHasLineNumbers(true) }) +} + +func TestMapping_HasInlineFrames(t *testing.T) { + ms := NewMapping() + assert.Equal(t, false, ms.HasInlineFrames()) + ms.SetHasInlineFrames(true) + assert.Equal(t, true, ms.HasInlineFrames()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newMapping(&otlpprofiles.Mapping{}, &sharedState).SetHasInlineFrames(true) }) +} + +func generateTestMapping() Mapping { + tv := NewMapping() + fillTestMapping(tv) + return tv +} + +func fillTestMapping(tv Mapping) { + tv.orig.Id = uint64(1) + tv.orig.MemoryStart = uint64(1) + tv.orig.MemoryLimit = uint64(1) + tv.orig.FileOffset = uint64(1) + tv.orig.Filename = int64(1) + tv.orig.BuildId = int64(1) + tv.orig.BuildIdKind = otlpprofiles.BuildIdKind(1) + internal.FillTestUInt64Slice(internal.NewUInt64Slice(&tv.orig.Attributes, tv.state)) + tv.orig.HasFunctions = true + tv.orig.HasFilenames = true + tv.orig.HasLineNumbers = true + tv.orig.HasInlineFrames = true +} diff --git a/pdata/pprofile/generated_mappingslice.go b/pdata/pprofile/generated_mappingslice.go new file mode 100644 index 00000000000..cf0f1361483 --- /dev/null +++ b/pdata/pprofile/generated_mappingslice.go @@ -0,0 +1,136 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +// MappingSlice logically represents a slice of Mapping. +// +// This is a reference type. If passed by value and callee modifies it, the +// caller will see the modification. +// +// Must use NewMappingSlice function to create new instances. +// Important: zero-initialized instance is not valid for use. +type MappingSlice struct { + orig *[]otlpprofiles.Mapping + state *internal.State +} + +func newMappingSlice(orig *[]otlpprofiles.Mapping, state *internal.State) MappingSlice { + return MappingSlice{orig: orig, state: state} +} + +// NewMappingSlice creates a MappingSlice with 0 elements. +// Can use "EnsureCapacity" to initialize with a given capacity. +func NewMappingSlice() MappingSlice { + orig := []otlpprofiles.Mapping(nil) + state := internal.StateMutable + return newMappingSlice(&orig, &state) +} + +// Len returns the number of elements in the slice. +// +// Returns "0" for a newly instance created with "NewMappingSlice()". +func (es MappingSlice) Len() int { + return len(*es.orig) +} + +// At returns the element at the given index. +// +// This function is used mostly for iterating over all the values in the slice: +// +// for i := 0; i < es.Len(); i++ { +// e := es.At(i) +// ... // Do something with the element +// } +func (es MappingSlice) At(i int) Mapping { + return newMapping(&(*es.orig)[i], es.state) +} + +// EnsureCapacity is an operation that ensures the slice has at least the specified capacity. +// 1. If the newCap <= cap then no change in capacity. +// 2. If the newCap > cap then the slice capacity will be expanded to equal newCap. +// +// Here is how a new MappingSlice can be initialized: +// +// es := NewMappingSlice() +// es.EnsureCapacity(4) +// for i := 0; i < 4; i++ { +// e := es.AppendEmpty() +// // Here should set all the values for e. +// } +func (es MappingSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() + oldCap := cap(*es.orig) + if newCap <= oldCap { + return + } + + newOrig := make([]otlpprofiles.Mapping, len(*es.orig), newCap) + copy(newOrig, *es.orig) + *es.orig = newOrig +} + +// AppendEmpty will append to the end of the slice an empty Mapping. +// It returns the newly added Mapping. +func (es MappingSlice) AppendEmpty() Mapping { + es.state.AssertMutable() + *es.orig = append(*es.orig, otlpprofiles.Mapping{}) + return es.At(es.Len() - 1) +} + +// MoveAndAppendTo moves all elements from the current slice and appends them to the dest. +// The current slice will be cleared. +func (es MappingSlice) MoveAndAppendTo(dest MappingSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() + if *dest.orig == nil { + // We can simply move the entire vector and avoid any allocations. + *dest.orig = *es.orig + } else { + *dest.orig = append(*dest.orig, *es.orig...) + } + *es.orig = nil +} + +// RemoveIf calls f sequentially for each element present in the slice. +// If f returns true, the element is removed from the slice. +func (es MappingSlice) RemoveIf(f func(Mapping) bool) { + es.state.AssertMutable() + newLen := 0 + for i := 0; i < len(*es.orig); i++ { + if f(es.At(i)) { + continue + } + if newLen == i { + // Nothing to move, element is at the right place. + newLen++ + continue + } + (*es.orig)[newLen] = (*es.orig)[i] + newLen++ + } + *es.orig = (*es.orig)[:newLen] +} + +// CopyTo copies all elements from the current slice overriding the destination. +func (es MappingSlice) CopyTo(dest MappingSlice) { + dest.state.AssertMutable() + srcLen := es.Len() + destCap := cap(*dest.orig) + if srcLen <= destCap { + (*dest.orig) = (*dest.orig)[:srcLen:destCap] + } else { + (*dest.orig) = make([]otlpprofiles.Mapping, srcLen) + } + for i := range *es.orig { + newMapping(&(*es.orig)[i], es.state).CopyTo(newMapping(&(*dest.orig)[i], dest.state)) + } +} diff --git a/pdata/pprofile/generated_mappingslice_test.go b/pdata/pprofile/generated_mappingslice_test.go new file mode 100644 index 00000000000..b25cb952ce1 --- /dev/null +++ b/pdata/pprofile/generated_mappingslice_test.go @@ -0,0 +1,137 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +func TestMappingSlice(t *testing.T) { + es := NewMappingSlice() + assert.Equal(t, 0, es.Len()) + state := internal.StateMutable + es = newMappingSlice(&[]otlpprofiles.Mapping{}, &state) + assert.Equal(t, 0, es.Len()) + + emptyVal := NewMapping() + testVal := generateTestMapping() + for i := 0; i < 7; i++ { + el := es.AppendEmpty() + assert.Equal(t, emptyVal, es.At(i)) + fillTestMapping(el) + assert.Equal(t, testVal, es.At(i)) + } + assert.Equal(t, 7, es.Len()) +} + +func TestMappingSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newMappingSlice(&[]otlpprofiles.Mapping{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewMappingSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + +func TestMappingSlice_CopyTo(t *testing.T) { + dest := NewMappingSlice() + // Test CopyTo to empty + NewMappingSlice().CopyTo(dest) + assert.Equal(t, NewMappingSlice(), dest) + + // Test CopyTo larger slice + generateTestMappingSlice().CopyTo(dest) + assert.Equal(t, generateTestMappingSlice(), dest) + + // Test CopyTo same size slice + generateTestMappingSlice().CopyTo(dest) + assert.Equal(t, generateTestMappingSlice(), dest) +} + +func TestMappingSlice_EnsureCapacity(t *testing.T) { + es := generateTestMappingSlice() + + // Test ensure smaller capacity. + const ensureSmallLen = 4 + es.EnsureCapacity(ensureSmallLen) + assert.Less(t, ensureSmallLen, es.Len()) + assert.Equal(t, es.Len(), cap(*es.orig)) + assert.Equal(t, generateTestMappingSlice(), es) + + // Test ensure larger capacity + const ensureLargeLen = 9 + es.EnsureCapacity(ensureLargeLen) + assert.Less(t, generateTestMappingSlice().Len(), ensureLargeLen) + assert.Equal(t, ensureLargeLen, cap(*es.orig)) + assert.Equal(t, generateTestMappingSlice(), es) +} + +func TestMappingSlice_MoveAndAppendTo(t *testing.T) { + // Test MoveAndAppendTo to empty + expectedSlice := generateTestMappingSlice() + dest := NewMappingSlice() + src := generateTestMappingSlice() + src.MoveAndAppendTo(dest) + assert.Equal(t, generateTestMappingSlice(), dest) + assert.Equal(t, 0, src.Len()) + assert.Equal(t, expectedSlice.Len(), dest.Len()) + + // Test MoveAndAppendTo empty slice + src.MoveAndAppendTo(dest) + assert.Equal(t, generateTestMappingSlice(), dest) + assert.Equal(t, 0, src.Len()) + assert.Equal(t, expectedSlice.Len(), dest.Len()) + + // Test MoveAndAppendTo not empty slice + generateTestMappingSlice().MoveAndAppendTo(dest) + assert.Equal(t, 2*expectedSlice.Len(), dest.Len()) + for i := 0; i < expectedSlice.Len(); i++ { + assert.Equal(t, expectedSlice.At(i), dest.At(i)) + assert.Equal(t, expectedSlice.At(i), dest.At(i+expectedSlice.Len())) + } +} + +func TestMappingSlice_RemoveIf(t *testing.T) { + // Test RemoveIf on empty slice + emptySlice := NewMappingSlice() + emptySlice.RemoveIf(func(el Mapping) bool { + t.Fail() + return false + }) + + // Test RemoveIf + filtered := generateTestMappingSlice() + pos := 0 + filtered.RemoveIf(func(el Mapping) bool { + pos++ + return pos%3 == 0 + }) + assert.Equal(t, 5, filtered.Len()) +} + +func generateTestMappingSlice() MappingSlice { + es := NewMappingSlice() + fillTestMappingSlice(es) + return es +} + +func fillTestMappingSlice(es MappingSlice) { + *es.orig = make([]otlpprofiles.Mapping, 7) + for i := 0; i < 7; i++ { + (*es.orig)[i] = otlpprofiles.Mapping{} + fillTestMapping(newMapping(&(*es.orig)[i], es.state)) + } +} diff --git a/pdata/pprofile/generated_profile.go b/pdata/pprofile/generated_profile.go new file mode 100644 index 00000000000..38f1cf3f0f3 --- /dev/null +++ b/pdata/pprofile/generated_profile.go @@ -0,0 +1,196 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" + "go.opentelemetry.io/collector/pdata/pcommon" +) + +// Profile are an implementation of the pprofextended data model. + +// This is a reference type, if passed by value and callee modifies it the +// caller will see the modification. +// +// Must use NewProfile function to create new instances. +// Important: zero-initialized instance is not valid for use. +type Profile struct { + orig *otlpprofiles.Profile + state *internal.State +} + +func newProfile(orig *otlpprofiles.Profile, state *internal.State) Profile { + return Profile{orig: orig, state: state} +} + +// NewProfile creates a new empty Profile. +// +// This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, +// OR directly access the member if this is embedded in another struct. +func NewProfile() Profile { + state := internal.StateMutable + return newProfile(&otlpprofiles.Profile{}, &state) +} + +// MoveTo moves all properties from the current struct overriding the destination and +// resetting the current instance to its zero value +func (ms Profile) MoveTo(dest Profile) { + ms.state.AssertMutable() + dest.state.AssertMutable() + *dest.orig = *ms.orig + *ms.orig = otlpprofiles.Profile{} +} + +// SampleType returns the SampleType associated with this Profile. +func (ms Profile) SampleType() ValueTypeSlice { + return newValueTypeSlice(&ms.orig.SampleType, ms.state) +} + +// Sample returns the Sample associated with this Profile. +func (ms Profile) Sample() SampleSlice { + return newSampleSlice(&ms.orig.Sample, ms.state) +} + +// Mapping returns the Mapping associated with this Profile. +func (ms Profile) Mapping() MappingSlice { + return newMappingSlice(&ms.orig.Mapping, ms.state) +} + +// Location returns the Location associated with this Profile. +func (ms Profile) Location() LocationSlice { + return newLocationSlice(&ms.orig.Location, ms.state) +} + +// LocationIndices returns the LocationIndices associated with this Profile. +func (ms Profile) LocationIndices() pcommon.Int64Slice { + return pcommon.Int64Slice(internal.NewInt64Slice(&ms.orig.LocationIndices, ms.state)) +} + +// Function returns the Function associated with this Profile. +func (ms Profile) Function() FunctionSlice { + return newFunctionSlice(&ms.orig.Function, ms.state) +} + +// AttributeTable returns the AttributeTable associated with this Profile. +func (ms Profile) AttributeTable() pcommon.Map { + return pcommon.Map(internal.NewMap(&ms.orig.AttributeTable, ms.state)) +} + +// AttributeUnits returns the AttributeUnits associated with this Profile. +func (ms Profile) AttributeUnits() AttributeUnitSlice { + return newAttributeUnitSlice(&ms.orig.AttributeUnits, ms.state) +} + +// LinkTable returns the LinkTable associated with this Profile. +func (ms Profile) LinkTable() LinkSlice { + return newLinkSlice(&ms.orig.LinkTable, ms.state) +} + +// StringTable returns the StringTable associated with this Profile. +func (ms Profile) StringTable() pcommon.StringSlice { + return pcommon.StringSlice(internal.NewStringSlice(&ms.orig.StringTable, ms.state)) +} + +// DropFrames returns the dropframes associated with this Profile. +func (ms Profile) DropFrames() int64 { + return ms.orig.DropFrames +} + +// SetDropFrames replaces the dropframes associated with this Profile. +func (ms Profile) SetDropFrames(v int64) { + ms.state.AssertMutable() + ms.orig.DropFrames = v +} + +// KeepFrames returns the keepframes associated with this Profile. +func (ms Profile) KeepFrames() int64 { + return ms.orig.KeepFrames +} + +// SetKeepFrames replaces the keepframes associated with this Profile. +func (ms Profile) SetKeepFrames(v int64) { + ms.state.AssertMutable() + ms.orig.KeepFrames = v +} + +// StartTime returns the starttime associated with this Profile. +func (ms Profile) StartTime() pcommon.Timestamp { + return pcommon.Timestamp(ms.orig.TimeNanos) +} + +// SetStartTime replaces the starttime associated with this Profile. +func (ms Profile) SetStartTime(v pcommon.Timestamp) { + ms.state.AssertMutable() + ms.orig.TimeNanos = int64(v) +} + +// Duration returns the duration associated with this Profile. +func (ms Profile) Duration() pcommon.Timestamp { + return pcommon.Timestamp(ms.orig.DurationNanos) +} + +// SetDuration replaces the duration associated with this Profile. +func (ms Profile) SetDuration(v pcommon.Timestamp) { + ms.state.AssertMutable() + ms.orig.DurationNanos = int64(v) +} + +// PeriodType returns the periodtype associated with this Profile. +func (ms Profile) PeriodType() ValueType { + return newValueType(&ms.orig.PeriodType, ms.state) +} + +// Period returns the period associated with this Profile. +func (ms Profile) Period() int64 { + return ms.orig.Period +} + +// SetPeriod replaces the period associated with this Profile. +func (ms Profile) SetPeriod(v int64) { + ms.state.AssertMutable() + ms.orig.Period = v +} + +// Comment returns the Comment associated with this Profile. +func (ms Profile) Comment() pcommon.Int64Slice { + return pcommon.Int64Slice(internal.NewInt64Slice(&ms.orig.Comment, ms.state)) +} + +// DefaultSampleType returns the defaultsampletype associated with this Profile. +func (ms Profile) DefaultSampleType() int64 { + return ms.orig.DefaultSampleType +} + +// SetDefaultSampleType replaces the defaultsampletype associated with this Profile. +func (ms Profile) SetDefaultSampleType(v int64) { + ms.state.AssertMutable() + ms.orig.DefaultSampleType = v +} + +// CopyTo copies all properties from the current struct overriding the destination. +func (ms Profile) CopyTo(dest Profile) { + dest.state.AssertMutable() + ms.SampleType().CopyTo(dest.SampleType()) + ms.Sample().CopyTo(dest.Sample()) + ms.Mapping().CopyTo(dest.Mapping()) + ms.Location().CopyTo(dest.Location()) + ms.LocationIndices().CopyTo(dest.LocationIndices()) + ms.Function().CopyTo(dest.Function()) + ms.AttributeTable().CopyTo(dest.AttributeTable()) + ms.AttributeUnits().CopyTo(dest.AttributeUnits()) + ms.LinkTable().CopyTo(dest.LinkTable()) + ms.StringTable().CopyTo(dest.StringTable()) + dest.SetDropFrames(ms.DropFrames()) + dest.SetKeepFrames(ms.KeepFrames()) + dest.SetStartTime(ms.StartTime()) + dest.SetDuration(ms.Duration()) + ms.PeriodType().CopyTo(dest.PeriodType()) + dest.SetPeriod(ms.Period()) + ms.Comment().CopyTo(dest.Comment()) + dest.SetDefaultSampleType(ms.DefaultSampleType()) +} diff --git a/pdata/pprofile/generated_profile_test.go b/pdata/pprofile/generated_profile_test.go new file mode 100644 index 00000000000..e040f2c0dc4 --- /dev/null +++ b/pdata/pprofile/generated_profile_test.go @@ -0,0 +1,202 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" + "go.opentelemetry.io/collector/pdata/pcommon" +) + +func TestProfile_MoveTo(t *testing.T) { + ms := generateTestProfile() + dest := NewProfile() + ms.MoveTo(dest) + assert.Equal(t, NewProfile(), ms) + assert.Equal(t, generateTestProfile(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newProfile(&otlpprofiles.Profile{}, &sharedState)) }) + assert.Panics(t, func() { newProfile(&otlpprofiles.Profile{}, &sharedState).MoveTo(dest) }) +} + +func TestProfile_CopyTo(t *testing.T) { + ms := NewProfile() + orig := NewProfile() + orig.CopyTo(ms) + assert.Equal(t, orig, ms) + orig = generateTestProfile() + orig.CopyTo(ms) + assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newProfile(&otlpprofiles.Profile{}, &sharedState)) }) +} + +func TestProfile_SampleType(t *testing.T) { + ms := NewProfile() + assert.Equal(t, NewValueTypeSlice(), ms.SampleType()) + fillTestValueTypeSlice(ms.SampleType()) + assert.Equal(t, generateTestValueTypeSlice(), ms.SampleType()) +} + +func TestProfile_Sample(t *testing.T) { + ms := NewProfile() + assert.Equal(t, NewSampleSlice(), ms.Sample()) + fillTestSampleSlice(ms.Sample()) + assert.Equal(t, generateTestSampleSlice(), ms.Sample()) +} + +func TestProfile_Mapping(t *testing.T) { + ms := NewProfile() + assert.Equal(t, NewMappingSlice(), ms.Mapping()) + fillTestMappingSlice(ms.Mapping()) + assert.Equal(t, generateTestMappingSlice(), ms.Mapping()) +} + +func TestProfile_Location(t *testing.T) { + ms := NewProfile() + assert.Equal(t, NewLocationSlice(), ms.Location()) + fillTestLocationSlice(ms.Location()) + assert.Equal(t, generateTestLocationSlice(), ms.Location()) +} + +func TestProfile_LocationIndices(t *testing.T) { + ms := NewProfile() + assert.Equal(t, pcommon.NewInt64Slice(), ms.LocationIndices()) + internal.FillTestInt64Slice(internal.Int64Slice(ms.LocationIndices())) + assert.Equal(t, pcommon.Int64Slice(internal.GenerateTestInt64Slice()), ms.LocationIndices()) +} + +func TestProfile_Function(t *testing.T) { + ms := NewProfile() + assert.Equal(t, NewFunctionSlice(), ms.Function()) + fillTestFunctionSlice(ms.Function()) + assert.Equal(t, generateTestFunctionSlice(), ms.Function()) +} + +func TestProfile_AttributeTable(t *testing.T) { + ms := NewProfile() + assert.Equal(t, pcommon.NewMap(), ms.AttributeTable()) + internal.FillTestMap(internal.Map(ms.AttributeTable())) + assert.Equal(t, pcommon.Map(internal.GenerateTestMap()), ms.AttributeTable()) +} + +func TestProfile_AttributeUnits(t *testing.T) { + ms := NewProfile() + assert.Equal(t, NewAttributeUnitSlice(), ms.AttributeUnits()) + fillTestAttributeUnitSlice(ms.AttributeUnits()) + assert.Equal(t, generateTestAttributeUnitSlice(), ms.AttributeUnits()) +} + +func TestProfile_LinkTable(t *testing.T) { + ms := NewProfile() + assert.Equal(t, NewLinkSlice(), ms.LinkTable()) + fillTestLinkSlice(ms.LinkTable()) + assert.Equal(t, generateTestLinkSlice(), ms.LinkTable()) +} + +func TestProfile_StringTable(t *testing.T) { + ms := NewProfile() + assert.Equal(t, pcommon.NewStringSlice(), ms.StringTable()) + internal.FillTestStringSlice(internal.StringSlice(ms.StringTable())) + assert.Equal(t, pcommon.StringSlice(internal.GenerateTestStringSlice()), ms.StringTable()) +} + +func TestProfile_DropFrames(t *testing.T) { + ms := NewProfile() + assert.Equal(t, int64(0), ms.DropFrames()) + ms.SetDropFrames(int64(1)) + assert.Equal(t, int64(1), ms.DropFrames()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newProfile(&otlpprofiles.Profile{}, &sharedState).SetDropFrames(int64(1)) }) +} + +func TestProfile_KeepFrames(t *testing.T) { + ms := NewProfile() + assert.Equal(t, int64(0), ms.KeepFrames()) + ms.SetKeepFrames(int64(1)) + assert.Equal(t, int64(1), ms.KeepFrames()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newProfile(&otlpprofiles.Profile{}, &sharedState).SetKeepFrames(int64(1)) }) +} + +func TestProfile_StartTime(t *testing.T) { + ms := NewProfile() + assert.Equal(t, pcommon.Timestamp(0), ms.StartTime()) + testValStartTime := pcommon.Timestamp(1234567890) + ms.SetStartTime(testValStartTime) + assert.Equal(t, testValStartTime, ms.StartTime()) +} + +func TestProfile_Duration(t *testing.T) { + ms := NewProfile() + assert.Equal(t, pcommon.Timestamp(0), ms.Duration()) + testValDuration := pcommon.Timestamp(1234567890) + ms.SetDuration(testValDuration) + assert.Equal(t, testValDuration, ms.Duration()) +} + +func TestProfile_PeriodType(t *testing.T) { + ms := NewProfile() + fillTestValueType(ms.PeriodType()) + assert.Equal(t, generateTestValueType(), ms.PeriodType()) +} + +func TestProfile_Period(t *testing.T) { + ms := NewProfile() + assert.Equal(t, int64(0), ms.Period()) + ms.SetPeriod(int64(1)) + assert.Equal(t, int64(1), ms.Period()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newProfile(&otlpprofiles.Profile{}, &sharedState).SetPeriod(int64(1)) }) +} + +func TestProfile_Comment(t *testing.T) { + ms := NewProfile() + assert.Equal(t, pcommon.NewInt64Slice(), ms.Comment()) + internal.FillTestInt64Slice(internal.Int64Slice(ms.Comment())) + assert.Equal(t, pcommon.Int64Slice(internal.GenerateTestInt64Slice()), ms.Comment()) +} + +func TestProfile_DefaultSampleType(t *testing.T) { + ms := NewProfile() + assert.Equal(t, int64(0), ms.DefaultSampleType()) + ms.SetDefaultSampleType(int64(1)) + assert.Equal(t, int64(1), ms.DefaultSampleType()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newProfile(&otlpprofiles.Profile{}, &sharedState).SetDefaultSampleType(int64(1)) }) +} + +func generateTestProfile() Profile { + tv := NewProfile() + fillTestProfile(tv) + return tv +} + +func fillTestProfile(tv Profile) { + fillTestValueTypeSlice(newValueTypeSlice(&tv.orig.SampleType, tv.state)) + fillTestSampleSlice(newSampleSlice(&tv.orig.Sample, tv.state)) + fillTestMappingSlice(newMappingSlice(&tv.orig.Mapping, tv.state)) + fillTestLocationSlice(newLocationSlice(&tv.orig.Location, tv.state)) + internal.FillTestInt64Slice(internal.NewInt64Slice(&tv.orig.LocationIndices, tv.state)) + fillTestFunctionSlice(newFunctionSlice(&tv.orig.Function, tv.state)) + internal.FillTestMap(internal.NewMap(&tv.orig.AttributeTable, tv.state)) + fillTestAttributeUnitSlice(newAttributeUnitSlice(&tv.orig.AttributeUnits, tv.state)) + fillTestLinkSlice(newLinkSlice(&tv.orig.LinkTable, tv.state)) + internal.FillTestStringSlice(internal.NewStringSlice(&tv.orig.StringTable, tv.state)) + tv.orig.DropFrames = int64(1) + tv.orig.KeepFrames = int64(1) + tv.orig.TimeNanos = 1234567890 + tv.orig.DurationNanos = 1234567890 + fillTestValueType(newValueType(&tv.orig.PeriodType, tv.state)) + tv.orig.Period = int64(1) + internal.FillTestInt64Slice(internal.NewInt64Slice(&tv.orig.Comment, tv.state)) + tv.orig.DefaultSampleType = int64(1) +} diff --git a/pdata/pprofile/generated_profilecontainer.go b/pdata/pprofile/generated_profilecontainer.go new file mode 100644 index 00000000000..6bf15a98b45 --- /dev/null +++ b/pdata/pprofile/generated_profilecontainer.go @@ -0,0 +1,106 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" + "go.opentelemetry.io/collector/pdata/pcommon" +) + +// ProfileContainer are an experimental implementation of the OpenTelemetry Profiles Data Model. + +// This is a reference type, if passed by value and callee modifies it the +// caller will see the modification. +// +// Must use NewProfileContainer function to create new instances. +// Important: zero-initialized instance is not valid for use. +type ProfileContainer struct { + orig *otlpprofiles.ProfileContainer + state *internal.State +} + +func newProfileContainer(orig *otlpprofiles.ProfileContainer, state *internal.State) ProfileContainer { + return ProfileContainer{orig: orig, state: state} +} + +// NewProfileContainer creates a new empty ProfileContainer. +// +// This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, +// OR directly access the member if this is embedded in another struct. +func NewProfileContainer() ProfileContainer { + state := internal.StateMutable + return newProfileContainer(&otlpprofiles.ProfileContainer{}, &state) +} + +// MoveTo moves all properties from the current struct overriding the destination and +// resetting the current instance to its zero value +func (ms ProfileContainer) MoveTo(dest ProfileContainer) { + ms.state.AssertMutable() + dest.state.AssertMutable() + *dest.orig = *ms.orig + *ms.orig = otlpprofiles.ProfileContainer{} +} + +// ProfileID returns the ProfileId associated with this ProfileContainer. +func (ms ProfileContainer) ProfileID() pcommon.ByteSlice { + return pcommon.ByteSlice(internal.NewByteSlice(&ms.orig.ProfileId, ms.state)) +} + +// StartTime returns the starttime associated with this ProfileContainer. +func (ms ProfileContainer) StartTime() pcommon.Timestamp { + return pcommon.Timestamp(ms.orig.StartTimeUnixNano) +} + +// SetStartTime replaces the starttime associated with this ProfileContainer. +func (ms ProfileContainer) SetStartTime(v pcommon.Timestamp) { + ms.state.AssertMutable() + ms.orig.StartTimeUnixNano = uint64(v) +} + +// EndTime returns the endtime associated with this ProfileContainer. +func (ms ProfileContainer) EndTime() pcommon.Timestamp { + return pcommon.Timestamp(ms.orig.EndTimeUnixNano) +} + +// SetEndTime replaces the endtime associated with this ProfileContainer. +func (ms ProfileContainer) SetEndTime(v pcommon.Timestamp) { + ms.state.AssertMutable() + ms.orig.EndTimeUnixNano = uint64(v) +} + +// Attributes returns the Attributes associated with this ProfileContainer. +func (ms ProfileContainer) Attributes() pcommon.Map { + return pcommon.Map(internal.NewMap(&ms.orig.Attributes, ms.state)) +} + +// DroppedAttributesCount returns the droppedattributescount associated with this ProfileContainer. +func (ms ProfileContainer) DroppedAttributesCount() uint32 { + return ms.orig.DroppedAttributesCount +} + +// SetDroppedAttributesCount replaces the droppedattributescount associated with this ProfileContainer. +func (ms ProfileContainer) SetDroppedAttributesCount(v uint32) { + ms.state.AssertMutable() + ms.orig.DroppedAttributesCount = v +} + +// Profile returns the profile associated with this ProfileContainer. +func (ms ProfileContainer) Profile() Profile { + return newProfile(&ms.orig.Profile, ms.state) +} + +// CopyTo copies all properties from the current struct overriding the destination. +func (ms ProfileContainer) CopyTo(dest ProfileContainer) { + dest.state.AssertMutable() + ms.ProfileID().CopyTo(dest.ProfileID()) + dest.SetStartTime(ms.StartTime()) + dest.SetEndTime(ms.EndTime()) + ms.Attributes().CopyTo(dest.Attributes()) + dest.SetDroppedAttributesCount(ms.DroppedAttributesCount()) + ms.Profile().CopyTo(dest.Profile()) +} diff --git a/pdata/pprofile/generated_profilecontainer_test.go b/pdata/pprofile/generated_profilecontainer_test.go new file mode 100644 index 00000000000..72a922a457d --- /dev/null +++ b/pdata/pprofile/generated_profilecontainer_test.go @@ -0,0 +1,102 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" + "go.opentelemetry.io/collector/pdata/pcommon" +) + +func TestProfileContainer_MoveTo(t *testing.T) { + ms := generateTestProfileContainer() + dest := NewProfileContainer() + ms.MoveTo(dest) + assert.Equal(t, NewProfileContainer(), ms) + assert.Equal(t, generateTestProfileContainer(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newProfileContainer(&otlpprofiles.ProfileContainer{}, &sharedState)) }) + assert.Panics(t, func() { newProfileContainer(&otlpprofiles.ProfileContainer{}, &sharedState).MoveTo(dest) }) +} + +func TestProfileContainer_CopyTo(t *testing.T) { + ms := NewProfileContainer() + orig := NewProfileContainer() + orig.CopyTo(ms) + assert.Equal(t, orig, ms) + orig = generateTestProfileContainer() + orig.CopyTo(ms) + assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newProfileContainer(&otlpprofiles.ProfileContainer{}, &sharedState)) }) +} + +func TestProfileContainer_ProfileID(t *testing.T) { + ms := NewProfileContainer() + assert.Equal(t, pcommon.NewByteSlice(), ms.ProfileID()) + internal.FillTestByteSlice(internal.ByteSlice(ms.ProfileID())) + assert.Equal(t, pcommon.ByteSlice(internal.GenerateTestByteSlice()), ms.ProfileID()) +} + +func TestProfileContainer_StartTime(t *testing.T) { + ms := NewProfileContainer() + assert.Equal(t, pcommon.Timestamp(0), ms.StartTime()) + testValStartTime := pcommon.Timestamp(1234567890) + ms.SetStartTime(testValStartTime) + assert.Equal(t, testValStartTime, ms.StartTime()) +} + +func TestProfileContainer_EndTime(t *testing.T) { + ms := NewProfileContainer() + assert.Equal(t, pcommon.Timestamp(0), ms.EndTime()) + testValEndTime := pcommon.Timestamp(1234567890) + ms.SetEndTime(testValEndTime) + assert.Equal(t, testValEndTime, ms.EndTime()) +} + +func TestProfileContainer_Attributes(t *testing.T) { + ms := NewProfileContainer() + assert.Equal(t, pcommon.NewMap(), ms.Attributes()) + internal.FillTestMap(internal.Map(ms.Attributes())) + assert.Equal(t, pcommon.Map(internal.GenerateTestMap()), ms.Attributes()) +} + +func TestProfileContainer_DroppedAttributesCount(t *testing.T) { + ms := NewProfileContainer() + assert.Equal(t, uint32(0), ms.DroppedAttributesCount()) + ms.SetDroppedAttributesCount(uint32(17)) + assert.Equal(t, uint32(17), ms.DroppedAttributesCount()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + newProfileContainer(&otlpprofiles.ProfileContainer{}, &sharedState).SetDroppedAttributesCount(uint32(17)) + }) +} + +func TestProfileContainer_Profile(t *testing.T) { + ms := NewProfileContainer() + fillTestProfile(ms.Profile()) + assert.Equal(t, generateTestProfile(), ms.Profile()) +} + +func generateTestProfileContainer() ProfileContainer { + tv := NewProfileContainer() + fillTestProfileContainer(tv) + return tv +} + +func fillTestProfileContainer(tv ProfileContainer) { + internal.FillTestByteSlice(internal.NewByteSlice(&tv.orig.ProfileId, tv.state)) + tv.orig.StartTimeUnixNano = 1234567890 + tv.orig.EndTimeUnixNano = 1234567890 + internal.FillTestMap(internal.NewMap(&tv.orig.Attributes, tv.state)) + tv.orig.DroppedAttributesCount = uint32(17) + fillTestProfile(newProfile(&tv.orig.Profile, tv.state)) +} diff --git a/pdata/pprofile/generated_profilescontainersslice.go b/pdata/pprofile/generated_profilescontainersslice.go new file mode 100644 index 00000000000..74ac2cc4578 --- /dev/null +++ b/pdata/pprofile/generated_profilescontainersslice.go @@ -0,0 +1,152 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "sort" + + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +// ProfilesContainersSlice logically represents a slice of ProfileContainer. +// +// This is a reference type. If passed by value and callee modifies it, the +// caller will see the modification. +// +// Must use NewProfilesContainersSlice function to create new instances. +// Important: zero-initialized instance is not valid for use. +type ProfilesContainersSlice struct { + orig *[]*otlpprofiles.ProfileContainer + state *internal.State +} + +func newProfilesContainersSlice(orig *[]*otlpprofiles.ProfileContainer, state *internal.State) ProfilesContainersSlice { + return ProfilesContainersSlice{orig: orig, state: state} +} + +// NewProfilesContainersSlice creates a ProfilesContainersSlice with 0 elements. +// Can use "EnsureCapacity" to initialize with a given capacity. +func NewProfilesContainersSlice() ProfilesContainersSlice { + orig := []*otlpprofiles.ProfileContainer(nil) + state := internal.StateMutable + return newProfilesContainersSlice(&orig, &state) +} + +// Len returns the number of elements in the slice. +// +// Returns "0" for a newly instance created with "NewProfilesContainersSlice()". +func (es ProfilesContainersSlice) Len() int { + return len(*es.orig) +} + +// At returns the element at the given index. +// +// This function is used mostly for iterating over all the values in the slice: +// +// for i := 0; i < es.Len(); i++ { +// e := es.At(i) +// ... // Do something with the element +// } +func (es ProfilesContainersSlice) At(i int) ProfileContainer { + return newProfileContainer((*es.orig)[i], es.state) +} + +// EnsureCapacity is an operation that ensures the slice has at least the specified capacity. +// 1. If the newCap <= cap then no change in capacity. +// 2. If the newCap > cap then the slice capacity will be expanded to equal newCap. +// +// Here is how a new ProfilesContainersSlice can be initialized: +// +// es := NewProfilesContainersSlice() +// es.EnsureCapacity(4) +// for i := 0; i < 4; i++ { +// e := es.AppendEmpty() +// // Here should set all the values for e. +// } +func (es ProfilesContainersSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() + oldCap := cap(*es.orig) + if newCap <= oldCap { + return + } + + newOrig := make([]*otlpprofiles.ProfileContainer, len(*es.orig), newCap) + copy(newOrig, *es.orig) + *es.orig = newOrig +} + +// AppendEmpty will append to the end of the slice an empty ProfileContainer. +// It returns the newly added ProfileContainer. +func (es ProfilesContainersSlice) AppendEmpty() ProfileContainer { + es.state.AssertMutable() + *es.orig = append(*es.orig, &otlpprofiles.ProfileContainer{}) + return es.At(es.Len() - 1) +} + +// MoveAndAppendTo moves all elements from the current slice and appends them to the dest. +// The current slice will be cleared. +func (es ProfilesContainersSlice) MoveAndAppendTo(dest ProfilesContainersSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() + if *dest.orig == nil { + // We can simply move the entire vector and avoid any allocations. + *dest.orig = *es.orig + } else { + *dest.orig = append(*dest.orig, *es.orig...) + } + *es.orig = nil +} + +// RemoveIf calls f sequentially for each element present in the slice. +// If f returns true, the element is removed from the slice. +func (es ProfilesContainersSlice) RemoveIf(f func(ProfileContainer) bool) { + es.state.AssertMutable() + newLen := 0 + for i := 0; i < len(*es.orig); i++ { + if f(es.At(i)) { + continue + } + if newLen == i { + // Nothing to move, element is at the right place. + newLen++ + continue + } + (*es.orig)[newLen] = (*es.orig)[i] + newLen++ + } + *es.orig = (*es.orig)[:newLen] +} + +// CopyTo copies all elements from the current slice overriding the destination. +func (es ProfilesContainersSlice) CopyTo(dest ProfilesContainersSlice) { + dest.state.AssertMutable() + srcLen := es.Len() + destCap := cap(*dest.orig) + if srcLen <= destCap { + (*dest.orig) = (*dest.orig)[:srcLen:destCap] + for i := range *es.orig { + newProfileContainer((*es.orig)[i], es.state).CopyTo(newProfileContainer((*dest.orig)[i], dest.state)) + } + return + } + origs := make([]otlpprofiles.ProfileContainer, srcLen) + wrappers := make([]*otlpprofiles.ProfileContainer, srcLen) + for i := range *es.orig { + wrappers[i] = &origs[i] + newProfileContainer((*es.orig)[i], es.state).CopyTo(newProfileContainer(wrappers[i], dest.state)) + } + *dest.orig = wrappers +} + +// Sort sorts the ProfileContainer elements within ProfilesContainersSlice given the +// provided less function so that two instances of ProfilesContainersSlice +// can be compared. +func (es ProfilesContainersSlice) Sort(less func(a, b ProfileContainer) bool) { + es.state.AssertMutable() + sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) +} diff --git a/pdata/pprofile/generated_profilescontainersslice_test.go b/pdata/pprofile/generated_profilescontainersslice_test.go new file mode 100644 index 00000000000..428fd677c3a --- /dev/null +++ b/pdata/pprofile/generated_profilescontainersslice_test.go @@ -0,0 +1,154 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "testing" + "unsafe" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +func TestProfilesContainersSlice(t *testing.T) { + es := NewProfilesContainersSlice() + assert.Equal(t, 0, es.Len()) + state := internal.StateMutable + es = newProfilesContainersSlice(&[]*otlpprofiles.ProfileContainer{}, &state) + assert.Equal(t, 0, es.Len()) + + emptyVal := NewProfileContainer() + testVal := generateTestProfileContainer() + for i := 0; i < 7; i++ { + el := es.AppendEmpty() + assert.Equal(t, emptyVal, es.At(i)) + fillTestProfileContainer(el) + assert.Equal(t, testVal, es.At(i)) + } + assert.Equal(t, 7, es.Len()) +} + +func TestProfilesContainersSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newProfilesContainersSlice(&[]*otlpprofiles.ProfileContainer{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewProfilesContainersSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + +func TestProfilesContainersSlice_CopyTo(t *testing.T) { + dest := NewProfilesContainersSlice() + // Test CopyTo to empty + NewProfilesContainersSlice().CopyTo(dest) + assert.Equal(t, NewProfilesContainersSlice(), dest) + + // Test CopyTo larger slice + generateTestProfilesContainersSlice().CopyTo(dest) + assert.Equal(t, generateTestProfilesContainersSlice(), dest) + + // Test CopyTo same size slice + generateTestProfilesContainersSlice().CopyTo(dest) + assert.Equal(t, generateTestProfilesContainersSlice(), dest) +} + +func TestProfilesContainersSlice_EnsureCapacity(t *testing.T) { + es := generateTestProfilesContainersSlice() + + // Test ensure smaller capacity. + const ensureSmallLen = 4 + es.EnsureCapacity(ensureSmallLen) + assert.Less(t, ensureSmallLen, es.Len()) + assert.Equal(t, es.Len(), cap(*es.orig)) + assert.Equal(t, generateTestProfilesContainersSlice(), es) + + // Test ensure larger capacity + const ensureLargeLen = 9 + es.EnsureCapacity(ensureLargeLen) + assert.Less(t, generateTestProfilesContainersSlice().Len(), ensureLargeLen) + assert.Equal(t, ensureLargeLen, cap(*es.orig)) + assert.Equal(t, generateTestProfilesContainersSlice(), es) +} + +func TestProfilesContainersSlice_MoveAndAppendTo(t *testing.T) { + // Test MoveAndAppendTo to empty + expectedSlice := generateTestProfilesContainersSlice() + dest := NewProfilesContainersSlice() + src := generateTestProfilesContainersSlice() + src.MoveAndAppendTo(dest) + assert.Equal(t, generateTestProfilesContainersSlice(), dest) + assert.Equal(t, 0, src.Len()) + assert.Equal(t, expectedSlice.Len(), dest.Len()) + + // Test MoveAndAppendTo empty slice + src.MoveAndAppendTo(dest) + assert.Equal(t, generateTestProfilesContainersSlice(), dest) + assert.Equal(t, 0, src.Len()) + assert.Equal(t, expectedSlice.Len(), dest.Len()) + + // Test MoveAndAppendTo not empty slice + generateTestProfilesContainersSlice().MoveAndAppendTo(dest) + assert.Equal(t, 2*expectedSlice.Len(), dest.Len()) + for i := 0; i < expectedSlice.Len(); i++ { + assert.Equal(t, expectedSlice.At(i), dest.At(i)) + assert.Equal(t, expectedSlice.At(i), dest.At(i+expectedSlice.Len())) + } +} + +func TestProfilesContainersSlice_RemoveIf(t *testing.T) { + // Test RemoveIf on empty slice + emptySlice := NewProfilesContainersSlice() + emptySlice.RemoveIf(func(el ProfileContainer) bool { + t.Fail() + return false + }) + + // Test RemoveIf + filtered := generateTestProfilesContainersSlice() + pos := 0 + filtered.RemoveIf(func(el ProfileContainer) bool { + pos++ + return pos%3 == 0 + }) + assert.Equal(t, 5, filtered.Len()) +} + +func TestProfilesContainersSlice_Sort(t *testing.T) { + es := generateTestProfilesContainersSlice() + es.Sort(func(a, b ProfileContainer) bool { + return uintptr(unsafe.Pointer(a.orig)) < uintptr(unsafe.Pointer(b.orig)) + }) + for i := 1; i < es.Len(); i++ { + assert.True(t, uintptr(unsafe.Pointer(es.At(i-1).orig)) < uintptr(unsafe.Pointer(es.At(i).orig))) + } + es.Sort(func(a, b ProfileContainer) bool { + return uintptr(unsafe.Pointer(a.orig)) > uintptr(unsafe.Pointer(b.orig)) + }) + for i := 1; i < es.Len(); i++ { + assert.True(t, uintptr(unsafe.Pointer(es.At(i-1).orig)) > uintptr(unsafe.Pointer(es.At(i).orig))) + } +} + +func generateTestProfilesContainersSlice() ProfilesContainersSlice { + es := NewProfilesContainersSlice() + fillTestProfilesContainersSlice(es) + return es +} + +func fillTestProfilesContainersSlice(es ProfilesContainersSlice) { + *es.orig = make([]*otlpprofiles.ProfileContainer, 7) + for i := 0; i < 7; i++ { + (*es.orig)[i] = &otlpprofiles.ProfileContainer{} + fillTestProfileContainer(newProfileContainer((*es.orig)[i], es.state)) + } +} diff --git a/pdata/pprofile/generated_resourceprofiles.go b/pdata/pprofile/generated_resourceprofiles.go new file mode 100644 index 00000000000..35c0161d7d7 --- /dev/null +++ b/pdata/pprofile/generated_resourceprofiles.go @@ -0,0 +1,76 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" + "go.opentelemetry.io/collector/pdata/pcommon" +) + +// ResourceProfiles is a collection of profiles from a Resource. +// +// This is a reference type, if passed by value and callee modifies it the +// caller will see the modification. +// +// Must use NewResourceProfiles function to create new instances. +// Important: zero-initialized instance is not valid for use. +type ResourceProfiles struct { + orig *otlpprofiles.ResourceProfiles + state *internal.State +} + +func newResourceProfiles(orig *otlpprofiles.ResourceProfiles, state *internal.State) ResourceProfiles { + return ResourceProfiles{orig: orig, state: state} +} + +// NewResourceProfiles creates a new empty ResourceProfiles. +// +// This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, +// OR directly access the member if this is embedded in another struct. +func NewResourceProfiles() ResourceProfiles { + state := internal.StateMutable + return newResourceProfiles(&otlpprofiles.ResourceProfiles{}, &state) +} + +// MoveTo moves all properties from the current struct overriding the destination and +// resetting the current instance to its zero value +func (ms ResourceProfiles) MoveTo(dest ResourceProfiles) { + ms.state.AssertMutable() + dest.state.AssertMutable() + *dest.orig = *ms.orig + *ms.orig = otlpprofiles.ResourceProfiles{} +} + +// Resource returns the resource associated with this ResourceProfiles. +func (ms ResourceProfiles) Resource() pcommon.Resource { + return pcommon.Resource(internal.NewResource(&ms.orig.Resource, ms.state)) +} + +// SchemaUrl returns the schemaurl associated with this ResourceProfiles. +func (ms ResourceProfiles) SchemaUrl() string { + return ms.orig.SchemaUrl +} + +// SetSchemaUrl replaces the schemaurl associated with this ResourceProfiles. +func (ms ResourceProfiles) SetSchemaUrl(v string) { + ms.state.AssertMutable() + ms.orig.SchemaUrl = v +} + +// ScopeProfiles returns the ScopeProfiles associated with this ResourceProfiles. +func (ms ResourceProfiles) ScopeProfiles() ScopeProfilesSlice { + return newScopeProfilesSlice(&ms.orig.ScopeProfiles, ms.state) +} + +// CopyTo copies all properties from the current struct overriding the destination. +func (ms ResourceProfiles) CopyTo(dest ResourceProfiles) { + dest.state.AssertMutable() + ms.Resource().CopyTo(dest.Resource()) + dest.SetSchemaUrl(ms.SchemaUrl()) + ms.ScopeProfiles().CopyTo(dest.ScopeProfiles()) +} diff --git a/pdata/pprofile/generated_resourceprofiles_test.go b/pdata/pprofile/generated_resourceprofiles_test.go new file mode 100644 index 00000000000..b4da47c3a8c --- /dev/null +++ b/pdata/pprofile/generated_resourceprofiles_test.go @@ -0,0 +1,76 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" + "go.opentelemetry.io/collector/pdata/pcommon" +) + +func TestResourceProfiles_MoveTo(t *testing.T) { + ms := generateTestResourceProfiles() + dest := NewResourceProfiles() + ms.MoveTo(dest) + assert.Equal(t, NewResourceProfiles(), ms) + assert.Equal(t, generateTestResourceProfiles(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newResourceProfiles(&otlpprofiles.ResourceProfiles{}, &sharedState)) }) + assert.Panics(t, func() { newResourceProfiles(&otlpprofiles.ResourceProfiles{}, &sharedState).MoveTo(dest) }) +} + +func TestResourceProfiles_CopyTo(t *testing.T) { + ms := NewResourceProfiles() + orig := NewResourceProfiles() + orig.CopyTo(ms) + assert.Equal(t, orig, ms) + orig = generateTestResourceProfiles() + orig.CopyTo(ms) + assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newResourceProfiles(&otlpprofiles.ResourceProfiles{}, &sharedState)) }) +} + +func TestResourceProfiles_Resource(t *testing.T) { + ms := NewResourceProfiles() + internal.FillTestResource(internal.Resource(ms.Resource())) + assert.Equal(t, pcommon.Resource(internal.GenerateTestResource()), ms.Resource()) +} + +func TestResourceProfiles_SchemaUrl(t *testing.T) { + ms := NewResourceProfiles() + assert.Equal(t, "", ms.SchemaUrl()) + ms.SetSchemaUrl("https://opentelemetry.io/schemas/1.5.0") + assert.Equal(t, "https://opentelemetry.io/schemas/1.5.0", ms.SchemaUrl()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + newResourceProfiles(&otlpprofiles.ResourceProfiles{}, &sharedState).SetSchemaUrl("https://opentelemetry.io/schemas/1.5.0") + }) +} + +func TestResourceProfiles_ScopeProfiles(t *testing.T) { + ms := NewResourceProfiles() + assert.Equal(t, NewScopeProfilesSlice(), ms.ScopeProfiles()) + fillTestScopeProfilesSlice(ms.ScopeProfiles()) + assert.Equal(t, generateTestScopeProfilesSlice(), ms.ScopeProfiles()) +} + +func generateTestResourceProfiles() ResourceProfiles { + tv := NewResourceProfiles() + fillTestResourceProfiles(tv) + return tv +} + +func fillTestResourceProfiles(tv ResourceProfiles) { + internal.FillTestResource(internal.NewResource(&tv.orig.Resource, tv.state)) + tv.orig.SchemaUrl = "https://opentelemetry.io/schemas/1.5.0" + fillTestScopeProfilesSlice(newScopeProfilesSlice(&tv.orig.ScopeProfiles, tv.state)) +} diff --git a/pdata/pprofile/generated_resourceprofilesslice.go b/pdata/pprofile/generated_resourceprofilesslice.go new file mode 100644 index 00000000000..b8ea2a71ba1 --- /dev/null +++ b/pdata/pprofile/generated_resourceprofilesslice.go @@ -0,0 +1,152 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "sort" + + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +// ResourceProfilesSlice logically represents a slice of ResourceProfiles. +// +// This is a reference type. If passed by value and callee modifies it, the +// caller will see the modification. +// +// Must use NewResourceProfilesSlice function to create new instances. +// Important: zero-initialized instance is not valid for use. +type ResourceProfilesSlice struct { + orig *[]*otlpprofiles.ResourceProfiles + state *internal.State +} + +func newResourceProfilesSlice(orig *[]*otlpprofiles.ResourceProfiles, state *internal.State) ResourceProfilesSlice { + return ResourceProfilesSlice{orig: orig, state: state} +} + +// NewResourceProfilesSlice creates a ResourceProfilesSlice with 0 elements. +// Can use "EnsureCapacity" to initialize with a given capacity. +func NewResourceProfilesSlice() ResourceProfilesSlice { + orig := []*otlpprofiles.ResourceProfiles(nil) + state := internal.StateMutable + return newResourceProfilesSlice(&orig, &state) +} + +// Len returns the number of elements in the slice. +// +// Returns "0" for a newly instance created with "NewResourceProfilesSlice()". +func (es ResourceProfilesSlice) Len() int { + return len(*es.orig) +} + +// At returns the element at the given index. +// +// This function is used mostly for iterating over all the values in the slice: +// +// for i := 0; i < es.Len(); i++ { +// e := es.At(i) +// ... // Do something with the element +// } +func (es ResourceProfilesSlice) At(i int) ResourceProfiles { + return newResourceProfiles((*es.orig)[i], es.state) +} + +// EnsureCapacity is an operation that ensures the slice has at least the specified capacity. +// 1. If the newCap <= cap then no change in capacity. +// 2. If the newCap > cap then the slice capacity will be expanded to equal newCap. +// +// Here is how a new ResourceProfilesSlice can be initialized: +// +// es := NewResourceProfilesSlice() +// es.EnsureCapacity(4) +// for i := 0; i < 4; i++ { +// e := es.AppendEmpty() +// // Here should set all the values for e. +// } +func (es ResourceProfilesSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() + oldCap := cap(*es.orig) + if newCap <= oldCap { + return + } + + newOrig := make([]*otlpprofiles.ResourceProfiles, len(*es.orig), newCap) + copy(newOrig, *es.orig) + *es.orig = newOrig +} + +// AppendEmpty will append to the end of the slice an empty ResourceProfiles. +// It returns the newly added ResourceProfiles. +func (es ResourceProfilesSlice) AppendEmpty() ResourceProfiles { + es.state.AssertMutable() + *es.orig = append(*es.orig, &otlpprofiles.ResourceProfiles{}) + return es.At(es.Len() - 1) +} + +// MoveAndAppendTo moves all elements from the current slice and appends them to the dest. +// The current slice will be cleared. +func (es ResourceProfilesSlice) MoveAndAppendTo(dest ResourceProfilesSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() + if *dest.orig == nil { + // We can simply move the entire vector and avoid any allocations. + *dest.orig = *es.orig + } else { + *dest.orig = append(*dest.orig, *es.orig...) + } + *es.orig = nil +} + +// RemoveIf calls f sequentially for each element present in the slice. +// If f returns true, the element is removed from the slice. +func (es ResourceProfilesSlice) RemoveIf(f func(ResourceProfiles) bool) { + es.state.AssertMutable() + newLen := 0 + for i := 0; i < len(*es.orig); i++ { + if f(es.At(i)) { + continue + } + if newLen == i { + // Nothing to move, element is at the right place. + newLen++ + continue + } + (*es.orig)[newLen] = (*es.orig)[i] + newLen++ + } + *es.orig = (*es.orig)[:newLen] +} + +// CopyTo copies all elements from the current slice overriding the destination. +func (es ResourceProfilesSlice) CopyTo(dest ResourceProfilesSlice) { + dest.state.AssertMutable() + srcLen := es.Len() + destCap := cap(*dest.orig) + if srcLen <= destCap { + (*dest.orig) = (*dest.orig)[:srcLen:destCap] + for i := range *es.orig { + newResourceProfiles((*es.orig)[i], es.state).CopyTo(newResourceProfiles((*dest.orig)[i], dest.state)) + } + return + } + origs := make([]otlpprofiles.ResourceProfiles, srcLen) + wrappers := make([]*otlpprofiles.ResourceProfiles, srcLen) + for i := range *es.orig { + wrappers[i] = &origs[i] + newResourceProfiles((*es.orig)[i], es.state).CopyTo(newResourceProfiles(wrappers[i], dest.state)) + } + *dest.orig = wrappers +} + +// Sort sorts the ResourceProfiles elements within ResourceProfilesSlice given the +// provided less function so that two instances of ResourceProfilesSlice +// can be compared. +func (es ResourceProfilesSlice) Sort(less func(a, b ResourceProfiles) bool) { + es.state.AssertMutable() + sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) +} diff --git a/pdata/pprofile/generated_resourceprofilesslice_test.go b/pdata/pprofile/generated_resourceprofilesslice_test.go new file mode 100644 index 00000000000..3d319fc8b16 --- /dev/null +++ b/pdata/pprofile/generated_resourceprofilesslice_test.go @@ -0,0 +1,154 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "testing" + "unsafe" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +func TestResourceProfilesSlice(t *testing.T) { + es := NewResourceProfilesSlice() + assert.Equal(t, 0, es.Len()) + state := internal.StateMutable + es = newResourceProfilesSlice(&[]*otlpprofiles.ResourceProfiles{}, &state) + assert.Equal(t, 0, es.Len()) + + emptyVal := NewResourceProfiles() + testVal := generateTestResourceProfiles() + for i := 0; i < 7; i++ { + el := es.AppendEmpty() + assert.Equal(t, emptyVal, es.At(i)) + fillTestResourceProfiles(el) + assert.Equal(t, testVal, es.At(i)) + } + assert.Equal(t, 7, es.Len()) +} + +func TestResourceProfilesSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newResourceProfilesSlice(&[]*otlpprofiles.ResourceProfiles{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewResourceProfilesSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + +func TestResourceProfilesSlice_CopyTo(t *testing.T) { + dest := NewResourceProfilesSlice() + // Test CopyTo to empty + NewResourceProfilesSlice().CopyTo(dest) + assert.Equal(t, NewResourceProfilesSlice(), dest) + + // Test CopyTo larger slice + generateTestResourceProfilesSlice().CopyTo(dest) + assert.Equal(t, generateTestResourceProfilesSlice(), dest) + + // Test CopyTo same size slice + generateTestResourceProfilesSlice().CopyTo(dest) + assert.Equal(t, generateTestResourceProfilesSlice(), dest) +} + +func TestResourceProfilesSlice_EnsureCapacity(t *testing.T) { + es := generateTestResourceProfilesSlice() + + // Test ensure smaller capacity. + const ensureSmallLen = 4 + es.EnsureCapacity(ensureSmallLen) + assert.Less(t, ensureSmallLen, es.Len()) + assert.Equal(t, es.Len(), cap(*es.orig)) + assert.Equal(t, generateTestResourceProfilesSlice(), es) + + // Test ensure larger capacity + const ensureLargeLen = 9 + es.EnsureCapacity(ensureLargeLen) + assert.Less(t, generateTestResourceProfilesSlice().Len(), ensureLargeLen) + assert.Equal(t, ensureLargeLen, cap(*es.orig)) + assert.Equal(t, generateTestResourceProfilesSlice(), es) +} + +func TestResourceProfilesSlice_MoveAndAppendTo(t *testing.T) { + // Test MoveAndAppendTo to empty + expectedSlice := generateTestResourceProfilesSlice() + dest := NewResourceProfilesSlice() + src := generateTestResourceProfilesSlice() + src.MoveAndAppendTo(dest) + assert.Equal(t, generateTestResourceProfilesSlice(), dest) + assert.Equal(t, 0, src.Len()) + assert.Equal(t, expectedSlice.Len(), dest.Len()) + + // Test MoveAndAppendTo empty slice + src.MoveAndAppendTo(dest) + assert.Equal(t, generateTestResourceProfilesSlice(), dest) + assert.Equal(t, 0, src.Len()) + assert.Equal(t, expectedSlice.Len(), dest.Len()) + + // Test MoveAndAppendTo not empty slice + generateTestResourceProfilesSlice().MoveAndAppendTo(dest) + assert.Equal(t, 2*expectedSlice.Len(), dest.Len()) + for i := 0; i < expectedSlice.Len(); i++ { + assert.Equal(t, expectedSlice.At(i), dest.At(i)) + assert.Equal(t, expectedSlice.At(i), dest.At(i+expectedSlice.Len())) + } +} + +func TestResourceProfilesSlice_RemoveIf(t *testing.T) { + // Test RemoveIf on empty slice + emptySlice := NewResourceProfilesSlice() + emptySlice.RemoveIf(func(el ResourceProfiles) bool { + t.Fail() + return false + }) + + // Test RemoveIf + filtered := generateTestResourceProfilesSlice() + pos := 0 + filtered.RemoveIf(func(el ResourceProfiles) bool { + pos++ + return pos%3 == 0 + }) + assert.Equal(t, 5, filtered.Len()) +} + +func TestResourceProfilesSlice_Sort(t *testing.T) { + es := generateTestResourceProfilesSlice() + es.Sort(func(a, b ResourceProfiles) bool { + return uintptr(unsafe.Pointer(a.orig)) < uintptr(unsafe.Pointer(b.orig)) + }) + for i := 1; i < es.Len(); i++ { + assert.True(t, uintptr(unsafe.Pointer(es.At(i-1).orig)) < uintptr(unsafe.Pointer(es.At(i).orig))) + } + es.Sort(func(a, b ResourceProfiles) bool { + return uintptr(unsafe.Pointer(a.orig)) > uintptr(unsafe.Pointer(b.orig)) + }) + for i := 1; i < es.Len(); i++ { + assert.True(t, uintptr(unsafe.Pointer(es.At(i-1).orig)) > uintptr(unsafe.Pointer(es.At(i).orig))) + } +} + +func generateTestResourceProfilesSlice() ResourceProfilesSlice { + es := NewResourceProfilesSlice() + fillTestResourceProfilesSlice(es) + return es +} + +func fillTestResourceProfilesSlice(es ResourceProfilesSlice) { + *es.orig = make([]*otlpprofiles.ResourceProfiles, 7) + for i := 0; i < 7; i++ { + (*es.orig)[i] = &otlpprofiles.ResourceProfiles{} + fillTestResourceProfiles(newResourceProfiles((*es.orig)[i], es.state)) + } +} diff --git a/pdata/pprofile/generated_sample.go b/pdata/pprofile/generated_sample.go new file mode 100644 index 00000000000..3627b60f7e2 --- /dev/null +++ b/pdata/pprofile/generated_sample.go @@ -0,0 +1,130 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" + "go.opentelemetry.io/collector/pdata/pcommon" +) + +// Sample represents each record value encountered within a profiled program. +// +// This is a reference type, if passed by value and callee modifies it the +// caller will see the modification. +// +// Must use NewSample function to create new instances. +// Important: zero-initialized instance is not valid for use. +type Sample struct { + orig *otlpprofiles.Sample + state *internal.State +} + +func newSample(orig *otlpprofiles.Sample, state *internal.State) Sample { + return Sample{orig: orig, state: state} +} + +// NewSample creates a new empty Sample. +// +// This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, +// OR directly access the member if this is embedded in another struct. +func NewSample() Sample { + state := internal.StateMutable + return newSample(&otlpprofiles.Sample{}, &state) +} + +// MoveTo moves all properties from the current struct overriding the destination and +// resetting the current instance to its zero value +func (ms Sample) MoveTo(dest Sample) { + ms.state.AssertMutable() + dest.state.AssertMutable() + *dest.orig = *ms.orig + *ms.orig = otlpprofiles.Sample{} +} + +// LocationIndex returns the LocationIndex associated with this Sample. +func (ms Sample) LocationIndex() pcommon.UInt64Slice { + return pcommon.UInt64Slice(internal.NewUInt64Slice(&ms.orig.LocationIndex, ms.state)) +} + +// LocationsStartIndex returns the locationsstartindex associated with this Sample. +func (ms Sample) LocationsStartIndex() uint64 { + return ms.orig.LocationsStartIndex +} + +// SetLocationsStartIndex replaces the locationsstartindex associated with this Sample. +func (ms Sample) SetLocationsStartIndex(v uint64) { + ms.state.AssertMutable() + ms.orig.LocationsStartIndex = v +} + +// LocationsLength returns the locationslength associated with this Sample. +func (ms Sample) LocationsLength() uint64 { + return ms.orig.LocationsLength +} + +// SetLocationsLength replaces the locationslength associated with this Sample. +func (ms Sample) SetLocationsLength(v uint64) { + ms.state.AssertMutable() + ms.orig.LocationsLength = v +} + +// StacktraceIdIndex returns the stacktraceidindex associated with this Sample. +func (ms Sample) StacktraceIdIndex() uint32 { + return ms.orig.StacktraceIdIndex +} + +// SetStacktraceIdIndex replaces the stacktraceidindex associated with this Sample. +func (ms Sample) SetStacktraceIdIndex(v uint32) { + ms.state.AssertMutable() + ms.orig.StacktraceIdIndex = v +} + +// Value returns the Value associated with this Sample. +func (ms Sample) Value() pcommon.Int64Slice { + return pcommon.Int64Slice(internal.NewInt64Slice(&ms.orig.Value, ms.state)) +} + +// Label returns the Label associated with this Sample. +func (ms Sample) Label() LabelSlice { + return newLabelSlice(&ms.orig.Label, ms.state) +} + +// Attributes returns the Attributes associated with this Sample. +func (ms Sample) Attributes() pcommon.UInt64Slice { + return pcommon.UInt64Slice(internal.NewUInt64Slice(&ms.orig.Attributes, ms.state)) +} + +// Link returns the link associated with this Sample. +func (ms Sample) Link() uint64 { + return ms.orig.Link +} + +// SetLink replaces the link associated with this Sample. +func (ms Sample) SetLink(v uint64) { + ms.state.AssertMutable() + ms.orig.Link = v +} + +// TimestampsUnixNano returns the TimestampsUnixNano associated with this Sample. +func (ms Sample) TimestampsUnixNano() pcommon.UInt64Slice { + return pcommon.UInt64Slice(internal.NewUInt64Slice(&ms.orig.TimestampsUnixNano, ms.state)) +} + +// CopyTo copies all properties from the current struct overriding the destination. +func (ms Sample) CopyTo(dest Sample) { + dest.state.AssertMutable() + ms.LocationIndex().CopyTo(dest.LocationIndex()) + dest.SetLocationsStartIndex(ms.LocationsStartIndex()) + dest.SetLocationsLength(ms.LocationsLength()) + dest.SetStacktraceIdIndex(ms.StacktraceIdIndex()) + ms.Value().CopyTo(dest.Value()) + ms.Label().CopyTo(dest.Label()) + ms.Attributes().CopyTo(dest.Attributes()) + dest.SetLink(ms.Link()) + ms.TimestampsUnixNano().CopyTo(dest.TimestampsUnixNano()) +} diff --git a/pdata/pprofile/generated_sample_test.go b/pdata/pprofile/generated_sample_test.go new file mode 100644 index 00000000000..bebc54b18ea --- /dev/null +++ b/pdata/pprofile/generated_sample_test.go @@ -0,0 +1,129 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" + "go.opentelemetry.io/collector/pdata/pcommon" +) + +func TestSample_MoveTo(t *testing.T) { + ms := generateTestSample() + dest := NewSample() + ms.MoveTo(dest) + assert.Equal(t, NewSample(), ms) + assert.Equal(t, generateTestSample(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newSample(&otlpprofiles.Sample{}, &sharedState)) }) + assert.Panics(t, func() { newSample(&otlpprofiles.Sample{}, &sharedState).MoveTo(dest) }) +} + +func TestSample_CopyTo(t *testing.T) { + ms := NewSample() + orig := NewSample() + orig.CopyTo(ms) + assert.Equal(t, orig, ms) + orig = generateTestSample() + orig.CopyTo(ms) + assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newSample(&otlpprofiles.Sample{}, &sharedState)) }) +} + +func TestSample_LocationIndex(t *testing.T) { + ms := NewSample() + assert.Equal(t, pcommon.NewUInt64Slice(), ms.LocationIndex()) + internal.FillTestUInt64Slice(internal.UInt64Slice(ms.LocationIndex())) + assert.Equal(t, pcommon.UInt64Slice(internal.GenerateTestUInt64Slice()), ms.LocationIndex()) +} + +func TestSample_LocationsStartIndex(t *testing.T) { + ms := NewSample() + assert.Equal(t, uint64(0), ms.LocationsStartIndex()) + ms.SetLocationsStartIndex(uint64(1)) + assert.Equal(t, uint64(1), ms.LocationsStartIndex()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newSample(&otlpprofiles.Sample{}, &sharedState).SetLocationsStartIndex(uint64(1)) }) +} + +func TestSample_LocationsLength(t *testing.T) { + ms := NewSample() + assert.Equal(t, uint64(0), ms.LocationsLength()) + ms.SetLocationsLength(uint64(1)) + assert.Equal(t, uint64(1), ms.LocationsLength()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newSample(&otlpprofiles.Sample{}, &sharedState).SetLocationsLength(uint64(1)) }) +} + +func TestSample_StacktraceIdIndex(t *testing.T) { + ms := NewSample() + assert.Equal(t, uint32(0), ms.StacktraceIdIndex()) + ms.SetStacktraceIdIndex(uint32(1)) + assert.Equal(t, uint32(1), ms.StacktraceIdIndex()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newSample(&otlpprofiles.Sample{}, &sharedState).SetStacktraceIdIndex(uint32(1)) }) +} + +func TestSample_Value(t *testing.T) { + ms := NewSample() + assert.Equal(t, pcommon.NewInt64Slice(), ms.Value()) + internal.FillTestInt64Slice(internal.Int64Slice(ms.Value())) + assert.Equal(t, pcommon.Int64Slice(internal.GenerateTestInt64Slice()), ms.Value()) +} + +func TestSample_Label(t *testing.T) { + ms := NewSample() + assert.Equal(t, NewLabelSlice(), ms.Label()) + fillTestLabelSlice(ms.Label()) + assert.Equal(t, generateTestLabelSlice(), ms.Label()) +} + +func TestSample_Attributes(t *testing.T) { + ms := NewSample() + assert.Equal(t, pcommon.NewUInt64Slice(), ms.Attributes()) + internal.FillTestUInt64Slice(internal.UInt64Slice(ms.Attributes())) + assert.Equal(t, pcommon.UInt64Slice(internal.GenerateTestUInt64Slice()), ms.Attributes()) +} + +func TestSample_Link(t *testing.T) { + ms := NewSample() + assert.Equal(t, uint64(0), ms.Link()) + ms.SetLink(uint64(1)) + assert.Equal(t, uint64(1), ms.Link()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newSample(&otlpprofiles.Sample{}, &sharedState).SetLink(uint64(1)) }) +} + +func TestSample_TimestampsUnixNano(t *testing.T) { + ms := NewSample() + assert.Equal(t, pcommon.NewUInt64Slice(), ms.TimestampsUnixNano()) + internal.FillTestUInt64Slice(internal.UInt64Slice(ms.TimestampsUnixNano())) + assert.Equal(t, pcommon.UInt64Slice(internal.GenerateTestUInt64Slice()), ms.TimestampsUnixNano()) +} + +func generateTestSample() Sample { + tv := NewSample() + fillTestSample(tv) + return tv +} + +func fillTestSample(tv Sample) { + internal.FillTestUInt64Slice(internal.NewUInt64Slice(&tv.orig.LocationIndex, tv.state)) + tv.orig.LocationsStartIndex = uint64(1) + tv.orig.LocationsLength = uint64(1) + tv.orig.StacktraceIdIndex = uint32(1) + internal.FillTestInt64Slice(internal.NewInt64Slice(&tv.orig.Value, tv.state)) + fillTestLabelSlice(newLabelSlice(&tv.orig.Label, tv.state)) + internal.FillTestUInt64Slice(internal.NewUInt64Slice(&tv.orig.Attributes, tv.state)) + tv.orig.Link = uint64(1) + internal.FillTestUInt64Slice(internal.NewUInt64Slice(&tv.orig.TimestampsUnixNano, tv.state)) +} diff --git a/pdata/pprofile/generated_sampleslice.go b/pdata/pprofile/generated_sampleslice.go new file mode 100644 index 00000000000..da2a128cd6f --- /dev/null +++ b/pdata/pprofile/generated_sampleslice.go @@ -0,0 +1,136 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +// SampleSlice logically represents a slice of Sample. +// +// This is a reference type. If passed by value and callee modifies it, the +// caller will see the modification. +// +// Must use NewSampleSlice function to create new instances. +// Important: zero-initialized instance is not valid for use. +type SampleSlice struct { + orig *[]otlpprofiles.Sample + state *internal.State +} + +func newSampleSlice(orig *[]otlpprofiles.Sample, state *internal.State) SampleSlice { + return SampleSlice{orig: orig, state: state} +} + +// NewSampleSlice creates a SampleSlice with 0 elements. +// Can use "EnsureCapacity" to initialize with a given capacity. +func NewSampleSlice() SampleSlice { + orig := []otlpprofiles.Sample(nil) + state := internal.StateMutable + return newSampleSlice(&orig, &state) +} + +// Len returns the number of elements in the slice. +// +// Returns "0" for a newly instance created with "NewSampleSlice()". +func (es SampleSlice) Len() int { + return len(*es.orig) +} + +// At returns the element at the given index. +// +// This function is used mostly for iterating over all the values in the slice: +// +// for i := 0; i < es.Len(); i++ { +// e := es.At(i) +// ... // Do something with the element +// } +func (es SampleSlice) At(i int) Sample { + return newSample(&(*es.orig)[i], es.state) +} + +// EnsureCapacity is an operation that ensures the slice has at least the specified capacity. +// 1. If the newCap <= cap then no change in capacity. +// 2. If the newCap > cap then the slice capacity will be expanded to equal newCap. +// +// Here is how a new SampleSlice can be initialized: +// +// es := NewSampleSlice() +// es.EnsureCapacity(4) +// for i := 0; i < 4; i++ { +// e := es.AppendEmpty() +// // Here should set all the values for e. +// } +func (es SampleSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() + oldCap := cap(*es.orig) + if newCap <= oldCap { + return + } + + newOrig := make([]otlpprofiles.Sample, len(*es.orig), newCap) + copy(newOrig, *es.orig) + *es.orig = newOrig +} + +// AppendEmpty will append to the end of the slice an empty Sample. +// It returns the newly added Sample. +func (es SampleSlice) AppendEmpty() Sample { + es.state.AssertMutable() + *es.orig = append(*es.orig, otlpprofiles.Sample{}) + return es.At(es.Len() - 1) +} + +// MoveAndAppendTo moves all elements from the current slice and appends them to the dest. +// The current slice will be cleared. +func (es SampleSlice) MoveAndAppendTo(dest SampleSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() + if *dest.orig == nil { + // We can simply move the entire vector and avoid any allocations. + *dest.orig = *es.orig + } else { + *dest.orig = append(*dest.orig, *es.orig...) + } + *es.orig = nil +} + +// RemoveIf calls f sequentially for each element present in the slice. +// If f returns true, the element is removed from the slice. +func (es SampleSlice) RemoveIf(f func(Sample) bool) { + es.state.AssertMutable() + newLen := 0 + for i := 0; i < len(*es.orig); i++ { + if f(es.At(i)) { + continue + } + if newLen == i { + // Nothing to move, element is at the right place. + newLen++ + continue + } + (*es.orig)[newLen] = (*es.orig)[i] + newLen++ + } + *es.orig = (*es.orig)[:newLen] +} + +// CopyTo copies all elements from the current slice overriding the destination. +func (es SampleSlice) CopyTo(dest SampleSlice) { + dest.state.AssertMutable() + srcLen := es.Len() + destCap := cap(*dest.orig) + if srcLen <= destCap { + (*dest.orig) = (*dest.orig)[:srcLen:destCap] + } else { + (*dest.orig) = make([]otlpprofiles.Sample, srcLen) + } + for i := range *es.orig { + newSample(&(*es.orig)[i], es.state).CopyTo(newSample(&(*dest.orig)[i], dest.state)) + } +} diff --git a/pdata/pprofile/generated_sampleslice_test.go b/pdata/pprofile/generated_sampleslice_test.go new file mode 100644 index 00000000000..7533e51cc45 --- /dev/null +++ b/pdata/pprofile/generated_sampleslice_test.go @@ -0,0 +1,137 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +func TestSampleSlice(t *testing.T) { + es := NewSampleSlice() + assert.Equal(t, 0, es.Len()) + state := internal.StateMutable + es = newSampleSlice(&[]otlpprofiles.Sample{}, &state) + assert.Equal(t, 0, es.Len()) + + emptyVal := NewSample() + testVal := generateTestSample() + for i := 0; i < 7; i++ { + el := es.AppendEmpty() + assert.Equal(t, emptyVal, es.At(i)) + fillTestSample(el) + assert.Equal(t, testVal, es.At(i)) + } + assert.Equal(t, 7, es.Len()) +} + +func TestSampleSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newSampleSlice(&[]otlpprofiles.Sample{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewSampleSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + +func TestSampleSlice_CopyTo(t *testing.T) { + dest := NewSampleSlice() + // Test CopyTo to empty + NewSampleSlice().CopyTo(dest) + assert.Equal(t, NewSampleSlice(), dest) + + // Test CopyTo larger slice + generateTestSampleSlice().CopyTo(dest) + assert.Equal(t, generateTestSampleSlice(), dest) + + // Test CopyTo same size slice + generateTestSampleSlice().CopyTo(dest) + assert.Equal(t, generateTestSampleSlice(), dest) +} + +func TestSampleSlice_EnsureCapacity(t *testing.T) { + es := generateTestSampleSlice() + + // Test ensure smaller capacity. + const ensureSmallLen = 4 + es.EnsureCapacity(ensureSmallLen) + assert.Less(t, ensureSmallLen, es.Len()) + assert.Equal(t, es.Len(), cap(*es.orig)) + assert.Equal(t, generateTestSampleSlice(), es) + + // Test ensure larger capacity + const ensureLargeLen = 9 + es.EnsureCapacity(ensureLargeLen) + assert.Less(t, generateTestSampleSlice().Len(), ensureLargeLen) + assert.Equal(t, ensureLargeLen, cap(*es.orig)) + assert.Equal(t, generateTestSampleSlice(), es) +} + +func TestSampleSlice_MoveAndAppendTo(t *testing.T) { + // Test MoveAndAppendTo to empty + expectedSlice := generateTestSampleSlice() + dest := NewSampleSlice() + src := generateTestSampleSlice() + src.MoveAndAppendTo(dest) + assert.Equal(t, generateTestSampleSlice(), dest) + assert.Equal(t, 0, src.Len()) + assert.Equal(t, expectedSlice.Len(), dest.Len()) + + // Test MoveAndAppendTo empty slice + src.MoveAndAppendTo(dest) + assert.Equal(t, generateTestSampleSlice(), dest) + assert.Equal(t, 0, src.Len()) + assert.Equal(t, expectedSlice.Len(), dest.Len()) + + // Test MoveAndAppendTo not empty slice + generateTestSampleSlice().MoveAndAppendTo(dest) + assert.Equal(t, 2*expectedSlice.Len(), dest.Len()) + for i := 0; i < expectedSlice.Len(); i++ { + assert.Equal(t, expectedSlice.At(i), dest.At(i)) + assert.Equal(t, expectedSlice.At(i), dest.At(i+expectedSlice.Len())) + } +} + +func TestSampleSlice_RemoveIf(t *testing.T) { + // Test RemoveIf on empty slice + emptySlice := NewSampleSlice() + emptySlice.RemoveIf(func(el Sample) bool { + t.Fail() + return false + }) + + // Test RemoveIf + filtered := generateTestSampleSlice() + pos := 0 + filtered.RemoveIf(func(el Sample) bool { + pos++ + return pos%3 == 0 + }) + assert.Equal(t, 5, filtered.Len()) +} + +func generateTestSampleSlice() SampleSlice { + es := NewSampleSlice() + fillTestSampleSlice(es) + return es +} + +func fillTestSampleSlice(es SampleSlice) { + *es.orig = make([]otlpprofiles.Sample, 7) + for i := 0; i < 7; i++ { + (*es.orig)[i] = otlpprofiles.Sample{} + fillTestSample(newSample(&(*es.orig)[i], es.state)) + } +} diff --git a/pdata/pprofile/generated_scopeprofiles.go b/pdata/pprofile/generated_scopeprofiles.go new file mode 100644 index 00000000000..e213b2660ba --- /dev/null +++ b/pdata/pprofile/generated_scopeprofiles.go @@ -0,0 +1,76 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" + "go.opentelemetry.io/collector/pdata/pcommon" +) + +// ScopeProfiles is a collection of profiles from a LibraryInstrumentation. +// +// This is a reference type, if passed by value and callee modifies it the +// caller will see the modification. +// +// Must use NewScopeProfiles function to create new instances. +// Important: zero-initialized instance is not valid for use. +type ScopeProfiles struct { + orig *otlpprofiles.ScopeProfiles + state *internal.State +} + +func newScopeProfiles(orig *otlpprofiles.ScopeProfiles, state *internal.State) ScopeProfiles { + return ScopeProfiles{orig: orig, state: state} +} + +// NewScopeProfiles creates a new empty ScopeProfiles. +// +// This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, +// OR directly access the member if this is embedded in another struct. +func NewScopeProfiles() ScopeProfiles { + state := internal.StateMutable + return newScopeProfiles(&otlpprofiles.ScopeProfiles{}, &state) +} + +// MoveTo moves all properties from the current struct overriding the destination and +// resetting the current instance to its zero value +func (ms ScopeProfiles) MoveTo(dest ScopeProfiles) { + ms.state.AssertMutable() + dest.state.AssertMutable() + *dest.orig = *ms.orig + *ms.orig = otlpprofiles.ScopeProfiles{} +} + +// Scope returns the scope associated with this ScopeProfiles. +func (ms ScopeProfiles) Scope() pcommon.InstrumentationScope { + return pcommon.InstrumentationScope(internal.NewInstrumentationScope(&ms.orig.Scope, ms.state)) +} + +// SchemaUrl returns the schemaurl associated with this ScopeProfiles. +func (ms ScopeProfiles) SchemaUrl() string { + return ms.orig.SchemaUrl +} + +// SetSchemaUrl replaces the schemaurl associated with this ScopeProfiles. +func (ms ScopeProfiles) SetSchemaUrl(v string) { + ms.state.AssertMutable() + ms.orig.SchemaUrl = v +} + +// Profiles returns the Profiles associated with this ScopeProfiles. +func (ms ScopeProfiles) Profiles() ProfilesContainersSlice { + return newProfilesContainersSlice(&ms.orig.Profiles, ms.state) +} + +// CopyTo copies all properties from the current struct overriding the destination. +func (ms ScopeProfiles) CopyTo(dest ScopeProfiles) { + dest.state.AssertMutable() + ms.Scope().CopyTo(dest.Scope()) + dest.SetSchemaUrl(ms.SchemaUrl()) + ms.Profiles().CopyTo(dest.Profiles()) +} diff --git a/pdata/pprofile/generated_scopeprofiles_test.go b/pdata/pprofile/generated_scopeprofiles_test.go new file mode 100644 index 00000000000..42fa23907f6 --- /dev/null +++ b/pdata/pprofile/generated_scopeprofiles_test.go @@ -0,0 +1,76 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" + "go.opentelemetry.io/collector/pdata/pcommon" +) + +func TestScopeProfiles_MoveTo(t *testing.T) { + ms := generateTestScopeProfiles() + dest := NewScopeProfiles() + ms.MoveTo(dest) + assert.Equal(t, NewScopeProfiles(), ms) + assert.Equal(t, generateTestScopeProfiles(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newScopeProfiles(&otlpprofiles.ScopeProfiles{}, &sharedState)) }) + assert.Panics(t, func() { newScopeProfiles(&otlpprofiles.ScopeProfiles{}, &sharedState).MoveTo(dest) }) +} + +func TestScopeProfiles_CopyTo(t *testing.T) { + ms := NewScopeProfiles() + orig := NewScopeProfiles() + orig.CopyTo(ms) + assert.Equal(t, orig, ms) + orig = generateTestScopeProfiles() + orig.CopyTo(ms) + assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newScopeProfiles(&otlpprofiles.ScopeProfiles{}, &sharedState)) }) +} + +func TestScopeProfiles_Scope(t *testing.T) { + ms := NewScopeProfiles() + internal.FillTestInstrumentationScope(internal.InstrumentationScope(ms.Scope())) + assert.Equal(t, pcommon.InstrumentationScope(internal.GenerateTestInstrumentationScope()), ms.Scope()) +} + +func TestScopeProfiles_SchemaUrl(t *testing.T) { + ms := NewScopeProfiles() + assert.Equal(t, "", ms.SchemaUrl()) + ms.SetSchemaUrl("https://opentelemetry.io/schemas/1.5.0") + assert.Equal(t, "https://opentelemetry.io/schemas/1.5.0", ms.SchemaUrl()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + newScopeProfiles(&otlpprofiles.ScopeProfiles{}, &sharedState).SetSchemaUrl("https://opentelemetry.io/schemas/1.5.0") + }) +} + +func TestScopeProfiles_Profiles(t *testing.T) { + ms := NewScopeProfiles() + assert.Equal(t, NewProfilesContainersSlice(), ms.Profiles()) + fillTestProfilesContainersSlice(ms.Profiles()) + assert.Equal(t, generateTestProfilesContainersSlice(), ms.Profiles()) +} + +func generateTestScopeProfiles() ScopeProfiles { + tv := NewScopeProfiles() + fillTestScopeProfiles(tv) + return tv +} + +func fillTestScopeProfiles(tv ScopeProfiles) { + internal.FillTestInstrumentationScope(internal.NewInstrumentationScope(&tv.orig.Scope, tv.state)) + tv.orig.SchemaUrl = "https://opentelemetry.io/schemas/1.5.0" + fillTestProfilesContainersSlice(newProfilesContainersSlice(&tv.orig.Profiles, tv.state)) +} diff --git a/pdata/pprofile/generated_scopeprofilesslice.go b/pdata/pprofile/generated_scopeprofilesslice.go new file mode 100644 index 00000000000..766ee38310b --- /dev/null +++ b/pdata/pprofile/generated_scopeprofilesslice.go @@ -0,0 +1,152 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "sort" + + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +// ScopeProfilesSlice logically represents a slice of ScopeProfiles. +// +// This is a reference type. If passed by value and callee modifies it, the +// caller will see the modification. +// +// Must use NewScopeProfilesSlice function to create new instances. +// Important: zero-initialized instance is not valid for use. +type ScopeProfilesSlice struct { + orig *[]*otlpprofiles.ScopeProfiles + state *internal.State +} + +func newScopeProfilesSlice(orig *[]*otlpprofiles.ScopeProfiles, state *internal.State) ScopeProfilesSlice { + return ScopeProfilesSlice{orig: orig, state: state} +} + +// NewScopeProfilesSlice creates a ScopeProfilesSlice with 0 elements. +// Can use "EnsureCapacity" to initialize with a given capacity. +func NewScopeProfilesSlice() ScopeProfilesSlice { + orig := []*otlpprofiles.ScopeProfiles(nil) + state := internal.StateMutable + return newScopeProfilesSlice(&orig, &state) +} + +// Len returns the number of elements in the slice. +// +// Returns "0" for a newly instance created with "NewScopeProfilesSlice()". +func (es ScopeProfilesSlice) Len() int { + return len(*es.orig) +} + +// At returns the element at the given index. +// +// This function is used mostly for iterating over all the values in the slice: +// +// for i := 0; i < es.Len(); i++ { +// e := es.At(i) +// ... // Do something with the element +// } +func (es ScopeProfilesSlice) At(i int) ScopeProfiles { + return newScopeProfiles((*es.orig)[i], es.state) +} + +// EnsureCapacity is an operation that ensures the slice has at least the specified capacity. +// 1. If the newCap <= cap then no change in capacity. +// 2. If the newCap > cap then the slice capacity will be expanded to equal newCap. +// +// Here is how a new ScopeProfilesSlice can be initialized: +// +// es := NewScopeProfilesSlice() +// es.EnsureCapacity(4) +// for i := 0; i < 4; i++ { +// e := es.AppendEmpty() +// // Here should set all the values for e. +// } +func (es ScopeProfilesSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() + oldCap := cap(*es.orig) + if newCap <= oldCap { + return + } + + newOrig := make([]*otlpprofiles.ScopeProfiles, len(*es.orig), newCap) + copy(newOrig, *es.orig) + *es.orig = newOrig +} + +// AppendEmpty will append to the end of the slice an empty ScopeProfiles. +// It returns the newly added ScopeProfiles. +func (es ScopeProfilesSlice) AppendEmpty() ScopeProfiles { + es.state.AssertMutable() + *es.orig = append(*es.orig, &otlpprofiles.ScopeProfiles{}) + return es.At(es.Len() - 1) +} + +// MoveAndAppendTo moves all elements from the current slice and appends them to the dest. +// The current slice will be cleared. +func (es ScopeProfilesSlice) MoveAndAppendTo(dest ScopeProfilesSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() + if *dest.orig == nil { + // We can simply move the entire vector and avoid any allocations. + *dest.orig = *es.orig + } else { + *dest.orig = append(*dest.orig, *es.orig...) + } + *es.orig = nil +} + +// RemoveIf calls f sequentially for each element present in the slice. +// If f returns true, the element is removed from the slice. +func (es ScopeProfilesSlice) RemoveIf(f func(ScopeProfiles) bool) { + es.state.AssertMutable() + newLen := 0 + for i := 0; i < len(*es.orig); i++ { + if f(es.At(i)) { + continue + } + if newLen == i { + // Nothing to move, element is at the right place. + newLen++ + continue + } + (*es.orig)[newLen] = (*es.orig)[i] + newLen++ + } + *es.orig = (*es.orig)[:newLen] +} + +// CopyTo copies all elements from the current slice overriding the destination. +func (es ScopeProfilesSlice) CopyTo(dest ScopeProfilesSlice) { + dest.state.AssertMutable() + srcLen := es.Len() + destCap := cap(*dest.orig) + if srcLen <= destCap { + (*dest.orig) = (*dest.orig)[:srcLen:destCap] + for i := range *es.orig { + newScopeProfiles((*es.orig)[i], es.state).CopyTo(newScopeProfiles((*dest.orig)[i], dest.state)) + } + return + } + origs := make([]otlpprofiles.ScopeProfiles, srcLen) + wrappers := make([]*otlpprofiles.ScopeProfiles, srcLen) + for i := range *es.orig { + wrappers[i] = &origs[i] + newScopeProfiles((*es.orig)[i], es.state).CopyTo(newScopeProfiles(wrappers[i], dest.state)) + } + *dest.orig = wrappers +} + +// Sort sorts the ScopeProfiles elements within ScopeProfilesSlice given the +// provided less function so that two instances of ScopeProfilesSlice +// can be compared. +func (es ScopeProfilesSlice) Sort(less func(a, b ScopeProfiles) bool) { + es.state.AssertMutable() + sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) +} diff --git a/pdata/pprofile/generated_scopeprofilesslice_test.go b/pdata/pprofile/generated_scopeprofilesslice_test.go new file mode 100644 index 00000000000..831dafdec09 --- /dev/null +++ b/pdata/pprofile/generated_scopeprofilesslice_test.go @@ -0,0 +1,154 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "testing" + "unsafe" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +func TestScopeProfilesSlice(t *testing.T) { + es := NewScopeProfilesSlice() + assert.Equal(t, 0, es.Len()) + state := internal.StateMutable + es = newScopeProfilesSlice(&[]*otlpprofiles.ScopeProfiles{}, &state) + assert.Equal(t, 0, es.Len()) + + emptyVal := NewScopeProfiles() + testVal := generateTestScopeProfiles() + for i := 0; i < 7; i++ { + el := es.AppendEmpty() + assert.Equal(t, emptyVal, es.At(i)) + fillTestScopeProfiles(el) + assert.Equal(t, testVal, es.At(i)) + } + assert.Equal(t, 7, es.Len()) +} + +func TestScopeProfilesSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newScopeProfilesSlice(&[]*otlpprofiles.ScopeProfiles{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewScopeProfilesSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + +func TestScopeProfilesSlice_CopyTo(t *testing.T) { + dest := NewScopeProfilesSlice() + // Test CopyTo to empty + NewScopeProfilesSlice().CopyTo(dest) + assert.Equal(t, NewScopeProfilesSlice(), dest) + + // Test CopyTo larger slice + generateTestScopeProfilesSlice().CopyTo(dest) + assert.Equal(t, generateTestScopeProfilesSlice(), dest) + + // Test CopyTo same size slice + generateTestScopeProfilesSlice().CopyTo(dest) + assert.Equal(t, generateTestScopeProfilesSlice(), dest) +} + +func TestScopeProfilesSlice_EnsureCapacity(t *testing.T) { + es := generateTestScopeProfilesSlice() + + // Test ensure smaller capacity. + const ensureSmallLen = 4 + es.EnsureCapacity(ensureSmallLen) + assert.Less(t, ensureSmallLen, es.Len()) + assert.Equal(t, es.Len(), cap(*es.orig)) + assert.Equal(t, generateTestScopeProfilesSlice(), es) + + // Test ensure larger capacity + const ensureLargeLen = 9 + es.EnsureCapacity(ensureLargeLen) + assert.Less(t, generateTestScopeProfilesSlice().Len(), ensureLargeLen) + assert.Equal(t, ensureLargeLen, cap(*es.orig)) + assert.Equal(t, generateTestScopeProfilesSlice(), es) +} + +func TestScopeProfilesSlice_MoveAndAppendTo(t *testing.T) { + // Test MoveAndAppendTo to empty + expectedSlice := generateTestScopeProfilesSlice() + dest := NewScopeProfilesSlice() + src := generateTestScopeProfilesSlice() + src.MoveAndAppendTo(dest) + assert.Equal(t, generateTestScopeProfilesSlice(), dest) + assert.Equal(t, 0, src.Len()) + assert.Equal(t, expectedSlice.Len(), dest.Len()) + + // Test MoveAndAppendTo empty slice + src.MoveAndAppendTo(dest) + assert.Equal(t, generateTestScopeProfilesSlice(), dest) + assert.Equal(t, 0, src.Len()) + assert.Equal(t, expectedSlice.Len(), dest.Len()) + + // Test MoveAndAppendTo not empty slice + generateTestScopeProfilesSlice().MoveAndAppendTo(dest) + assert.Equal(t, 2*expectedSlice.Len(), dest.Len()) + for i := 0; i < expectedSlice.Len(); i++ { + assert.Equal(t, expectedSlice.At(i), dest.At(i)) + assert.Equal(t, expectedSlice.At(i), dest.At(i+expectedSlice.Len())) + } +} + +func TestScopeProfilesSlice_RemoveIf(t *testing.T) { + // Test RemoveIf on empty slice + emptySlice := NewScopeProfilesSlice() + emptySlice.RemoveIf(func(el ScopeProfiles) bool { + t.Fail() + return false + }) + + // Test RemoveIf + filtered := generateTestScopeProfilesSlice() + pos := 0 + filtered.RemoveIf(func(el ScopeProfiles) bool { + pos++ + return pos%3 == 0 + }) + assert.Equal(t, 5, filtered.Len()) +} + +func TestScopeProfilesSlice_Sort(t *testing.T) { + es := generateTestScopeProfilesSlice() + es.Sort(func(a, b ScopeProfiles) bool { + return uintptr(unsafe.Pointer(a.orig)) < uintptr(unsafe.Pointer(b.orig)) + }) + for i := 1; i < es.Len(); i++ { + assert.True(t, uintptr(unsafe.Pointer(es.At(i-1).orig)) < uintptr(unsafe.Pointer(es.At(i).orig))) + } + es.Sort(func(a, b ScopeProfiles) bool { + return uintptr(unsafe.Pointer(a.orig)) > uintptr(unsafe.Pointer(b.orig)) + }) + for i := 1; i < es.Len(); i++ { + assert.True(t, uintptr(unsafe.Pointer(es.At(i-1).orig)) > uintptr(unsafe.Pointer(es.At(i).orig))) + } +} + +func generateTestScopeProfilesSlice() ScopeProfilesSlice { + es := NewScopeProfilesSlice() + fillTestScopeProfilesSlice(es) + return es +} + +func fillTestScopeProfilesSlice(es ScopeProfilesSlice) { + *es.orig = make([]*otlpprofiles.ScopeProfiles, 7) + for i := 0; i < 7; i++ { + (*es.orig)[i] = &otlpprofiles.ScopeProfiles{} + fillTestScopeProfiles(newScopeProfiles((*es.orig)[i], es.state)) + } +} diff --git a/pdata/pprofile/generated_valuetype.go b/pdata/pprofile/generated_valuetype.go new file mode 100644 index 00000000000..32280993a2d --- /dev/null +++ b/pdata/pprofile/generated_valuetype.go @@ -0,0 +1,87 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +// ValueType describes the type and units of a value, with an optional aggregation temporality. +// +// This is a reference type, if passed by value and callee modifies it the +// caller will see the modification. +// +// Must use NewValueType function to create new instances. +// Important: zero-initialized instance is not valid for use. +type ValueType struct { + orig *otlpprofiles.ValueType + state *internal.State +} + +func newValueType(orig *otlpprofiles.ValueType, state *internal.State) ValueType { + return ValueType{orig: orig, state: state} +} + +// NewValueType creates a new empty ValueType. +// +// This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, +// OR directly access the member if this is embedded in another struct. +func NewValueType() ValueType { + state := internal.StateMutable + return newValueType(&otlpprofiles.ValueType{}, &state) +} + +// MoveTo moves all properties from the current struct overriding the destination and +// resetting the current instance to its zero value +func (ms ValueType) MoveTo(dest ValueType) { + ms.state.AssertMutable() + dest.state.AssertMutable() + *dest.orig = *ms.orig + *ms.orig = otlpprofiles.ValueType{} +} + +// Type returns the type associated with this ValueType. +func (ms ValueType) Type() int64 { + return ms.orig.Type +} + +// SetType replaces the type associated with this ValueType. +func (ms ValueType) SetType(v int64) { + ms.state.AssertMutable() + ms.orig.Type = v +} + +// Unit returns the unit associated with this ValueType. +func (ms ValueType) Unit() int64 { + return ms.orig.Unit +} + +// SetUnit replaces the unit associated with this ValueType. +func (ms ValueType) SetUnit(v int64) { + ms.state.AssertMutable() + ms.orig.Unit = v +} + +// AggregationTemporality returns the aggregationtemporality associated with this ValueType. +func (ms ValueType) AggregationTemporality() otlpprofiles.AggregationTemporality { + return ms.orig.AggregationTemporality +} + +// SetAggregationTemporality replaces the aggregationtemporality associated with this ValueType. +func (ms ValueType) SetAggregationTemporality(v otlpprofiles.AggregationTemporality) { + ms.state.AssertMutable() + ms.orig.AggregationTemporality = v +} + +// CopyTo copies all properties from the current struct overriding the destination. +func (ms ValueType) CopyTo(dest ValueType) { + dest.state.AssertMutable() + dest.SetType(ms.Type()) + dest.SetUnit(ms.Unit()) + dest.SetAggregationTemporality(ms.AggregationTemporality()) +} diff --git a/pdata/pprofile/generated_valuetype_test.go b/pdata/pprofile/generated_valuetype_test.go new file mode 100644 index 00000000000..d2b557f2294 --- /dev/null +++ b/pdata/pprofile/generated_valuetype_test.go @@ -0,0 +1,80 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +func TestValueType_MoveTo(t *testing.T) { + ms := generateTestValueType() + dest := NewValueType() + ms.MoveTo(dest) + assert.Equal(t, NewValueType(), ms) + assert.Equal(t, generateTestValueType(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.MoveTo(newValueType(&otlpprofiles.ValueType{}, &sharedState)) }) + assert.Panics(t, func() { newValueType(&otlpprofiles.ValueType{}, &sharedState).MoveTo(dest) }) +} + +func TestValueType_CopyTo(t *testing.T) { + ms := NewValueType() + orig := NewValueType() + orig.CopyTo(ms) + assert.Equal(t, orig, ms) + orig = generateTestValueType() + orig.CopyTo(ms) + assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { ms.CopyTo(newValueType(&otlpprofiles.ValueType{}, &sharedState)) }) +} + +func TestValueType_Type(t *testing.T) { + ms := NewValueType() + assert.Equal(t, int64(0), ms.Type()) + ms.SetType(int64(1)) + assert.Equal(t, int64(1), ms.Type()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newValueType(&otlpprofiles.ValueType{}, &sharedState).SetType(int64(1)) }) +} + +func TestValueType_Unit(t *testing.T) { + ms := NewValueType() + assert.Equal(t, int64(0), ms.Unit()) + ms.SetUnit(int64(1)) + assert.Equal(t, int64(1), ms.Unit()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { newValueType(&otlpprofiles.ValueType{}, &sharedState).SetUnit(int64(1)) }) +} + +func TestValueType_AggregationTemporality(t *testing.T) { + ms := NewValueType() + assert.Equal(t, otlpprofiles.AggregationTemporality(0), ms.AggregationTemporality()) + ms.SetAggregationTemporality(otlpprofiles.AggregationTemporality(1)) + assert.Equal(t, otlpprofiles.AggregationTemporality(1), ms.AggregationTemporality()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + newValueType(&otlpprofiles.ValueType{}, &sharedState).SetAggregationTemporality(otlpprofiles.AggregationTemporality(1)) + }) +} + +func generateTestValueType() ValueType { + tv := NewValueType() + fillTestValueType(tv) + return tv +} + +func fillTestValueType(tv ValueType) { + tv.orig.Type = int64(1) + tv.orig.Unit = int64(1) + tv.orig.AggregationTemporality = otlpprofiles.AggregationTemporality(1) +} diff --git a/pdata/pprofile/generated_valuetypeslice.go b/pdata/pprofile/generated_valuetypeslice.go new file mode 100644 index 00000000000..4049bbd2e16 --- /dev/null +++ b/pdata/pprofile/generated_valuetypeslice.go @@ -0,0 +1,136 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +// ValueTypeSlice logically represents a slice of ValueType. +// +// This is a reference type. If passed by value and callee modifies it, the +// caller will see the modification. +// +// Must use NewValueTypeSlice function to create new instances. +// Important: zero-initialized instance is not valid for use. +type ValueTypeSlice struct { + orig *[]otlpprofiles.ValueType + state *internal.State +} + +func newValueTypeSlice(orig *[]otlpprofiles.ValueType, state *internal.State) ValueTypeSlice { + return ValueTypeSlice{orig: orig, state: state} +} + +// NewValueTypeSlice creates a ValueTypeSlice with 0 elements. +// Can use "EnsureCapacity" to initialize with a given capacity. +func NewValueTypeSlice() ValueTypeSlice { + orig := []otlpprofiles.ValueType(nil) + state := internal.StateMutable + return newValueTypeSlice(&orig, &state) +} + +// Len returns the number of elements in the slice. +// +// Returns "0" for a newly instance created with "NewValueTypeSlice()". +func (es ValueTypeSlice) Len() int { + return len(*es.orig) +} + +// At returns the element at the given index. +// +// This function is used mostly for iterating over all the values in the slice: +// +// for i := 0; i < es.Len(); i++ { +// e := es.At(i) +// ... // Do something with the element +// } +func (es ValueTypeSlice) At(i int) ValueType { + return newValueType(&(*es.orig)[i], es.state) +} + +// EnsureCapacity is an operation that ensures the slice has at least the specified capacity. +// 1. If the newCap <= cap then no change in capacity. +// 2. If the newCap > cap then the slice capacity will be expanded to equal newCap. +// +// Here is how a new ValueTypeSlice can be initialized: +// +// es := NewValueTypeSlice() +// es.EnsureCapacity(4) +// for i := 0; i < 4; i++ { +// e := es.AppendEmpty() +// // Here should set all the values for e. +// } +func (es ValueTypeSlice) EnsureCapacity(newCap int) { + es.state.AssertMutable() + oldCap := cap(*es.orig) + if newCap <= oldCap { + return + } + + newOrig := make([]otlpprofiles.ValueType, len(*es.orig), newCap) + copy(newOrig, *es.orig) + *es.orig = newOrig +} + +// AppendEmpty will append to the end of the slice an empty ValueType. +// It returns the newly added ValueType. +func (es ValueTypeSlice) AppendEmpty() ValueType { + es.state.AssertMutable() + *es.orig = append(*es.orig, otlpprofiles.ValueType{}) + return es.At(es.Len() - 1) +} + +// MoveAndAppendTo moves all elements from the current slice and appends them to the dest. +// The current slice will be cleared. +func (es ValueTypeSlice) MoveAndAppendTo(dest ValueTypeSlice) { + es.state.AssertMutable() + dest.state.AssertMutable() + if *dest.orig == nil { + // We can simply move the entire vector and avoid any allocations. + *dest.orig = *es.orig + } else { + *dest.orig = append(*dest.orig, *es.orig...) + } + *es.orig = nil +} + +// RemoveIf calls f sequentially for each element present in the slice. +// If f returns true, the element is removed from the slice. +func (es ValueTypeSlice) RemoveIf(f func(ValueType) bool) { + es.state.AssertMutable() + newLen := 0 + for i := 0; i < len(*es.orig); i++ { + if f(es.At(i)) { + continue + } + if newLen == i { + // Nothing to move, element is at the right place. + newLen++ + continue + } + (*es.orig)[newLen] = (*es.orig)[i] + newLen++ + } + *es.orig = (*es.orig)[:newLen] +} + +// CopyTo copies all elements from the current slice overriding the destination. +func (es ValueTypeSlice) CopyTo(dest ValueTypeSlice) { + dest.state.AssertMutable() + srcLen := es.Len() + destCap := cap(*dest.orig) + if srcLen <= destCap { + (*dest.orig) = (*dest.orig)[:srcLen:destCap] + } else { + (*dest.orig) = make([]otlpprofiles.ValueType, srcLen) + } + for i := range *es.orig { + newValueType(&(*es.orig)[i], es.state).CopyTo(newValueType(&(*dest.orig)[i], dest.state)) + } +} diff --git a/pdata/pprofile/generated_valuetypeslice_test.go b/pdata/pprofile/generated_valuetypeslice_test.go new file mode 100644 index 00000000000..ac4ab1d7dab --- /dev/null +++ b/pdata/pprofile/generated_valuetypeslice_test.go @@ -0,0 +1,137 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofile + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +func TestValueTypeSlice(t *testing.T) { + es := NewValueTypeSlice() + assert.Equal(t, 0, es.Len()) + state := internal.StateMutable + es = newValueTypeSlice(&[]otlpprofiles.ValueType{}, &state) + assert.Equal(t, 0, es.Len()) + + emptyVal := NewValueType() + testVal := generateTestValueType() + for i := 0; i < 7; i++ { + el := es.AppendEmpty() + assert.Equal(t, emptyVal, es.At(i)) + fillTestValueType(el) + assert.Equal(t, testVal, es.At(i)) + } + assert.Equal(t, 7, es.Len()) +} + +func TestValueTypeSliceReadOnly(t *testing.T) { + sharedState := internal.StateReadOnly + es := newValueTypeSlice(&[]otlpprofiles.ValueType{}, &sharedState) + assert.Equal(t, 0, es.Len()) + assert.Panics(t, func() { es.AppendEmpty() }) + assert.Panics(t, func() { es.EnsureCapacity(2) }) + es2 := NewValueTypeSlice() + es.CopyTo(es2) + assert.Panics(t, func() { es2.CopyTo(es) }) + assert.Panics(t, func() { es.MoveAndAppendTo(es2) }) + assert.Panics(t, func() { es2.MoveAndAppendTo(es) }) +} + +func TestValueTypeSlice_CopyTo(t *testing.T) { + dest := NewValueTypeSlice() + // Test CopyTo to empty + NewValueTypeSlice().CopyTo(dest) + assert.Equal(t, NewValueTypeSlice(), dest) + + // Test CopyTo larger slice + generateTestValueTypeSlice().CopyTo(dest) + assert.Equal(t, generateTestValueTypeSlice(), dest) + + // Test CopyTo same size slice + generateTestValueTypeSlice().CopyTo(dest) + assert.Equal(t, generateTestValueTypeSlice(), dest) +} + +func TestValueTypeSlice_EnsureCapacity(t *testing.T) { + es := generateTestValueTypeSlice() + + // Test ensure smaller capacity. + const ensureSmallLen = 4 + es.EnsureCapacity(ensureSmallLen) + assert.Less(t, ensureSmallLen, es.Len()) + assert.Equal(t, es.Len(), cap(*es.orig)) + assert.Equal(t, generateTestValueTypeSlice(), es) + + // Test ensure larger capacity + const ensureLargeLen = 9 + es.EnsureCapacity(ensureLargeLen) + assert.Less(t, generateTestValueTypeSlice().Len(), ensureLargeLen) + assert.Equal(t, ensureLargeLen, cap(*es.orig)) + assert.Equal(t, generateTestValueTypeSlice(), es) +} + +func TestValueTypeSlice_MoveAndAppendTo(t *testing.T) { + // Test MoveAndAppendTo to empty + expectedSlice := generateTestValueTypeSlice() + dest := NewValueTypeSlice() + src := generateTestValueTypeSlice() + src.MoveAndAppendTo(dest) + assert.Equal(t, generateTestValueTypeSlice(), dest) + assert.Equal(t, 0, src.Len()) + assert.Equal(t, expectedSlice.Len(), dest.Len()) + + // Test MoveAndAppendTo empty slice + src.MoveAndAppendTo(dest) + assert.Equal(t, generateTestValueTypeSlice(), dest) + assert.Equal(t, 0, src.Len()) + assert.Equal(t, expectedSlice.Len(), dest.Len()) + + // Test MoveAndAppendTo not empty slice + generateTestValueTypeSlice().MoveAndAppendTo(dest) + assert.Equal(t, 2*expectedSlice.Len(), dest.Len()) + for i := 0; i < expectedSlice.Len(); i++ { + assert.Equal(t, expectedSlice.At(i), dest.At(i)) + assert.Equal(t, expectedSlice.At(i), dest.At(i+expectedSlice.Len())) + } +} + +func TestValueTypeSlice_RemoveIf(t *testing.T) { + // Test RemoveIf on empty slice + emptySlice := NewValueTypeSlice() + emptySlice.RemoveIf(func(el ValueType) bool { + t.Fail() + return false + }) + + // Test RemoveIf + filtered := generateTestValueTypeSlice() + pos := 0 + filtered.RemoveIf(func(el ValueType) bool { + pos++ + return pos%3 == 0 + }) + assert.Equal(t, 5, filtered.Len()) +} + +func generateTestValueTypeSlice() ValueTypeSlice { + es := NewValueTypeSlice() + fillTestValueTypeSlice(es) + return es +} + +func fillTestValueTypeSlice(es ValueTypeSlice) { + *es.orig = make([]otlpprofiles.ValueType, 7) + for i := 0; i < 7; i++ { + (*es.orig)[i] = otlpprofiles.ValueType{} + fillTestValueType(newValueType(&(*es.orig)[i], es.state)) + } +} diff --git a/pdata/pprofile/go.mod b/pdata/pprofile/go.mod new file mode 100644 index 00000000000..76e0d91d9ad --- /dev/null +++ b/pdata/pprofile/go.mod @@ -0,0 +1,27 @@ +module go.opentelemetry.io/collector/pdata/pprofile + +go 1.21.0 + +toolchain go1.21.11 + +require ( + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/pdata v1.9.0 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + +replace go.opentelemetry.io/collector/pdata => ../ diff --git a/pdata/pprofile/go.sum b/pdata/pprofile/go.sum new file mode 100644 index 00000000000..d4ff00537b4 --- /dev/null +++ b/pdata/pprofile/go.sum @@ -0,0 +1,67 @@ +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +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/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +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.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +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= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +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/pdata/pprofile/pprofileotlp/generated_exportpartialsuccess.go b/pdata/pprofile/pprofileotlp/generated_exportpartialsuccess.go new file mode 100644 index 00000000000..2bc9e3dab81 --- /dev/null +++ b/pdata/pprofile/pprofileotlp/generated_exportpartialsuccess.go @@ -0,0 +1,75 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofileotlp + +import ( + "go.opentelemetry.io/collector/pdata/internal" + otlpcollectorprofile "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/profiles/v1experimental" +) + +// ExportPartialSuccess represents the details of a partially successful export request. +// +// This is a reference type, if passed by value and callee modifies it the +// caller will see the modification. +// +// Must use NewExportPartialSuccess function to create new instances. +// Important: zero-initialized instance is not valid for use. +type ExportPartialSuccess struct { + orig *otlpcollectorprofile.ExportProfilesPartialSuccess + state *internal.State +} + +func newExportPartialSuccess(orig *otlpcollectorprofile.ExportProfilesPartialSuccess, state *internal.State) ExportPartialSuccess { + return ExportPartialSuccess{orig: orig, state: state} +} + +// NewExportPartialSuccess creates a new empty ExportPartialSuccess. +// +// This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, +// OR directly access the member if this is embedded in another struct. +func NewExportPartialSuccess() ExportPartialSuccess { + state := internal.StateMutable + return newExportPartialSuccess(&otlpcollectorprofile.ExportProfilesPartialSuccess{}, &state) +} + +// MoveTo moves all properties from the current struct overriding the destination and +// resetting the current instance to its zero value +func (ms ExportPartialSuccess) MoveTo(dest ExportPartialSuccess) { + ms.state.AssertMutable() + dest.state.AssertMutable() + *dest.orig = *ms.orig + *ms.orig = otlpcollectorprofile.ExportProfilesPartialSuccess{} +} + +// RejectedProfiles returns the rejectedprofiles associated with this ExportPartialSuccess. +func (ms ExportPartialSuccess) RejectedProfiles() int64 { + return ms.orig.RejectedProfiles +} + +// SetRejectedProfiles replaces the rejectedprofiles associated with this ExportPartialSuccess. +func (ms ExportPartialSuccess) SetRejectedProfiles(v int64) { + ms.state.AssertMutable() + ms.orig.RejectedProfiles = v +} + +// ErrorMessage returns the errormessage associated with this ExportPartialSuccess. +func (ms ExportPartialSuccess) ErrorMessage() string { + return ms.orig.ErrorMessage +} + +// SetErrorMessage replaces the errormessage associated with this ExportPartialSuccess. +func (ms ExportPartialSuccess) SetErrorMessage(v string) { + ms.state.AssertMutable() + ms.orig.ErrorMessage = v +} + +// CopyTo copies all properties from the current struct overriding the destination. +func (ms ExportPartialSuccess) CopyTo(dest ExportPartialSuccess) { + dest.state.AssertMutable() + dest.SetRejectedProfiles(ms.RejectedProfiles()) + dest.SetErrorMessage(ms.ErrorMessage()) +} diff --git a/pdata/pprofile/pprofileotlp/generated_exportpartialsuccess_test.go b/pdata/pprofile/pprofileotlp/generated_exportpartialsuccess_test.go new file mode 100644 index 00000000000..73eb11b3026 --- /dev/null +++ b/pdata/pprofile/pprofileotlp/generated_exportpartialsuccess_test.go @@ -0,0 +1,78 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pprofileotlp + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/collector/pdata/internal" + otlpcollectorprofile "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/profiles/v1experimental" +) + +func TestExportPartialSuccess_MoveTo(t *testing.T) { + ms := generateTestExportPartialSuccess() + dest := NewExportPartialSuccess() + ms.MoveTo(dest) + assert.Equal(t, NewExportPartialSuccess(), ms) + assert.Equal(t, generateTestExportPartialSuccess(), dest) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + ms.MoveTo(newExportPartialSuccess(&otlpcollectorprofile.ExportProfilesPartialSuccess{}, &sharedState)) + }) + assert.Panics(t, func() { + newExportPartialSuccess(&otlpcollectorprofile.ExportProfilesPartialSuccess{}, &sharedState).MoveTo(dest) + }) +} + +func TestExportPartialSuccess_CopyTo(t *testing.T) { + ms := NewExportPartialSuccess() + orig := NewExportPartialSuccess() + orig.CopyTo(ms) + assert.Equal(t, orig, ms) + orig = generateTestExportPartialSuccess() + orig.CopyTo(ms) + assert.Equal(t, orig, ms) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + ms.CopyTo(newExportPartialSuccess(&otlpcollectorprofile.ExportProfilesPartialSuccess{}, &sharedState)) + }) +} + +func TestExportPartialSuccess_RejectedProfiles(t *testing.T) { + ms := NewExportPartialSuccess() + assert.Equal(t, int64(0), ms.RejectedProfiles()) + ms.SetRejectedProfiles(int64(13)) + assert.Equal(t, int64(13), ms.RejectedProfiles()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + newExportPartialSuccess(&otlpcollectorprofile.ExportProfilesPartialSuccess{}, &sharedState).SetRejectedProfiles(int64(13)) + }) +} + +func TestExportPartialSuccess_ErrorMessage(t *testing.T) { + ms := NewExportPartialSuccess() + assert.Equal(t, "", ms.ErrorMessage()) + ms.SetErrorMessage("error message") + assert.Equal(t, "error message", ms.ErrorMessage()) + sharedState := internal.StateReadOnly + assert.Panics(t, func() { + newExportPartialSuccess(&otlpcollectorprofile.ExportProfilesPartialSuccess{}, &sharedState).SetErrorMessage("error message") + }) +} + +func generateTestExportPartialSuccess() ExportPartialSuccess { + tv := NewExportPartialSuccess() + fillTestExportPartialSuccess(tv) + return tv +} + +func fillTestExportPartialSuccess(tv ExportPartialSuccess) { + tv.orig.RejectedProfiles = int64(13) + tv.orig.ErrorMessage = "error message" +} diff --git a/pdata/ptrace/ptraceotlp/grpc_test.go b/pdata/ptrace/ptraceotlp/grpc_test.go index e07044f8671..2fee7aa5a05 100644 --- a/pdata/ptrace/ptraceotlp/grpc_test.go +++ b/pdata/ptrace/ptraceotlp/grpc_test.go @@ -15,6 +15,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials/insecure" + "google.golang.org/grpc/resolver" "google.golang.org/grpc/status" "google.golang.org/grpc/test/bufconn" @@ -36,12 +37,12 @@ func TestGrpc(t *testing.T) { wg.Wait() }) - cc, err := grpc.Dial("bufnet", + resolver.SetDefaultScheme("passthrough") + cc, err := grpc.NewClient("bufnet", grpc.WithContextDialer(func(context.Context, string) (net.Conn, error) { return lis.Dial() }), - grpc.WithTransportCredentials(insecure.NewCredentials()), - grpc.WithBlock()) + grpc.WithTransportCredentials(insecure.NewCredentials())) assert.NoError(t, err) t.Cleanup(func() { assert.NoError(t, cc.Close()) @@ -69,12 +70,11 @@ func TestGrpcError(t *testing.T) { wg.Wait() }) - cc, err := grpc.Dial("bufnet", + cc, err := grpc.NewClient("bufnet", grpc.WithContextDialer(func(context.Context, string) (net.Conn, error) { return lis.Dial() }), - grpc.WithTransportCredentials(insecure.NewCredentials()), - grpc.WithBlock()) + grpc.WithTransportCredentials(insecure.NewCredentials())) assert.NoError(t, err) t.Cleanup(func() { assert.NoError(t, cc.Close()) diff --git a/pdata/testdata/go.mod b/pdata/testdata/go.mod index a92f19a2e54..547a6ba16e3 100644 --- a/pdata/testdata/go.mod +++ b/pdata/testdata/go.mod @@ -1,8 +1,8 @@ module go.opentelemetry.io/collector/pdata/testdata -go 1.21 +go 1.21.0 -require go.opentelemetry.io/collector/pdata v1.7.0 +require go.opentelemetry.io/collector/pdata v1.9.0 require ( github.com/gogo/protobuf v1.3.2 // indirect @@ -13,9 +13,9 @@ require ( golang.org/x/net v0.23.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.34.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect ) replace go.opentelemetry.io/collector/pdata => ../ diff --git a/pdata/testdata/go.sum b/pdata/testdata/go.sum index 54657892220..3dc378522b4 100644 --- a/pdata/testdata/go.sum +++ b/pdata/testdata/go.sum @@ -58,11 +58,11 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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/processor/batchprocessor/batch_processor_test.go b/processor/batchprocessor/batch_processor_test.go index 6e8033fb387..2cb189c13c3 100644 --- a/processor/batchprocessor/batch_processor_test.go +++ b/processor/batchprocessor/batch_processor_test.go @@ -13,6 +13,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/sdk/metric/metricdata" "go.opentelemetry.io/collector/client" "go.opentelemetry.io/collector/component/componenttest" @@ -165,17 +167,14 @@ func TestBatchProcessorSpansDeliveredEnforceBatchSize(t *testing.T) { } func TestBatchProcessorSentBySize(t *testing.T) { - telemetryTest(t, testBatchProcessorSentBySize) -} - -func testBatchProcessorSentBySize(t *testing.T, tel testTelemetry) { + tel := setupTestTelemetry() sizer := &ptrace.ProtoMarshaler{} sink := new(consumertest.TracesSink) cfg := createDefaultConfig().(*Config) sendBatchSize := 20 cfg.SendBatchSize = uint32(sendBatchSize) cfg.Timeout = 500 * time.Millisecond - creationSet := tel.NewProcessorCreateSettings() + creationSet := tel.NewCreateSettings() creationSet.MetricsLevel = configtelemetry.LevelDetailed batcher, err := newBatchTracesProcessor(creationSet, sink, cfg) require.NoError(t, err) @@ -188,7 +187,7 @@ func testBatchProcessorSentBySize(t *testing.T, tel testTelemetry) { sizeSum := 0 for requestNum := 0; requestNum < requestCount; requestNum++ { td := testdata.GenerateTraces(spansPerRequest) - sizeSum += sizer.TracesSize(td) + assert.NoError(t, batcher.ConsumeTraces(context.Background(), td)) } @@ -204,6 +203,7 @@ func testBatchProcessorSentBySize(t *testing.T, tel testTelemetry) { receivedTraces := sink.AllTraces() require.EqualValues(t, expectedBatchesNum, len(receivedTraces)) for _, td := range receivedTraces { + sizeSum += sizer.TracesSize(td) rss := td.ResourceSpans() require.Equal(t, expectedBatchingFactor, rss.Len()) for i := 0; i < expectedBatchingFactor; i++ { @@ -211,19 +211,83 @@ func testBatchProcessorSentBySize(t *testing.T, tel testTelemetry) { } } - tel.assertMetrics(t, expectedMetrics{ - sendCount: float64(expectedBatchesNum), - sendSizeSum: float64(sink.SpanCount()), - sendSizeBytesSum: float64(sizeSum), - sizeTrigger: float64(expectedBatchesNum), + tel.assertMetrics(t, []metricdata.Metrics{ + { + Name: "processor_batch_batch_send_size_bytes", + Description: "Number of bytes in batch that was sent", + Unit: "By", + Data: metricdata.Histogram[int64]{ + Temporality: metricdata.CumulativeTemporality, + DataPoints: []metricdata.HistogramDataPoint[int64]{ + { + Attributes: attribute.NewSet(attribute.String("processor", "batch")), + Count: uint64(expectedBatchesNum), + Bounds: []float64{10, 25, 50, 75, 100, 250, 500, 750, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 20000, 30000, 50000, + 100_000, 200_000, 300_000, 400_000, 500_000, 600_000, 700_000, 800_000, 900_000, + 1000_000, 2000_000, 3000_000, 4000_000, 5000_000, 6000_000, 7000_000, 8000_000, 9000_000}, + BucketCounts: []uint64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, uint64(expectedBatchesNum), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + Sum: int64(sizeSum), + Min: metricdata.NewExtrema(int64(sizeSum / expectedBatchesNum)), + Max: metricdata.NewExtrema(int64(sizeSum / expectedBatchesNum)), + }, + }, + }, + }, + { + Name: "processor_batch_batch_send_size", + Description: "Number of units in the batch", + Unit: "1", + Data: metricdata.Histogram[int64]{ + Temporality: metricdata.CumulativeTemporality, + DataPoints: []metricdata.HistogramDataPoint[int64]{ + { + Attributes: attribute.NewSet(attribute.String("processor", "batch")), + Count: uint64(expectedBatchesNum), + Bounds: []float64{10, 25, 50, 75, 100, 250, 500, 750, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 20000, 30000, 50000, 100000}, + BucketCounts: []uint64{0, uint64(expectedBatchesNum), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + Sum: int64(sink.SpanCount()), + Min: metricdata.NewExtrema(int64(sendBatchSize)), + Max: metricdata.NewExtrema(int64(sendBatchSize)), + }, + }, + }, + }, + { + Name: "processor_batch_batch_size_trigger_send", + Description: "Number of times the batch was sent due to a size trigger", + Unit: "1", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: true, + DataPoints: []metricdata.DataPoint[int64]{ + { + Value: int64(expectedBatchesNum), + Attributes: attribute.NewSet(attribute.String("processor", "batch")), + }, + }, + }, + }, + { + Name: "processor_batch_metadata_cardinality", + Description: "Number of distinct metadata value combinations being processed", + Unit: "1", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: false, + DataPoints: []metricdata.DataPoint[int64]{ + { + Value: 1, + Attributes: attribute.NewSet(attribute.String("processor", "batch")), + }, + }, + }, + }, }) } func TestBatchProcessorSentBySizeWithMaxSize(t *testing.T) { - telemetryTest(t, testBatchProcessorSentBySizeWithMaxSize) -} - -func testBatchProcessorSentBySizeWithMaxSize(t *testing.T, tel testTelemetry) { + tel := setupTestTelemetry() + sizer := &ptrace.ProtoMarshaler{} sink := new(consumertest.TracesSink) cfg := createDefaultConfig().(*Config) sendBatchSize := 20 @@ -231,7 +295,7 @@ func testBatchProcessorSentBySizeWithMaxSize(t *testing.T, tel testTelemetry) { cfg.SendBatchSize = uint32(sendBatchSize) cfg.SendBatchMaxSize = uint32(sendBatchMaxSize) cfg.Timeout = 500 * time.Millisecond - creationSet := tel.NewProcessorCreateSettings() + creationSet := tel.NewCreateSettings() creationSet.MetricsLevel = configtelemetry.LevelDetailed batcher, err := newBatchTracesProcessor(creationSet, sink, cfg) require.NoError(t, err) @@ -242,6 +306,8 @@ func testBatchProcessorSentBySizeWithMaxSize(t *testing.T, tel testTelemetry) { totalSpans := requestCount * spansPerRequest start := time.Now() + + sizeSum := 0 for requestNum := 0; requestNum < requestCount; requestNum++ { td := testdata.GenerateTraces(spansPerRequest) assert.NoError(t, batcher.ConsumeTraces(context.Background(), td)) @@ -258,12 +324,105 @@ func testBatchProcessorSentBySizeWithMaxSize(t *testing.T, tel testTelemetry) { require.Equal(t, totalSpans, sink.SpanCount()) receivedTraces := sink.AllTraces() require.EqualValues(t, expectedBatchesNum, len(receivedTraces)) + // we have to count the size after it was processed since splitTraces will cause some + // repeated ResourceSpan data to be sent through the processor + var min, max int + for _, td := range receivedTraces { + if min == 0 || sizer.TracesSize(td) < min { + min = sizer.TracesSize(td) + } + if sizer.TracesSize(td) > max { + max = sizer.TracesSize(td) + } + sizeSum += sizer.TracesSize(td) + } - tel.assertMetrics(t, expectedMetrics{ - sendCount: float64(expectedBatchesNum), - sendSizeSum: float64(sink.SpanCount()), - sizeTrigger: math.Floor(float64(totalSpans) / float64(sendBatchMaxSize)), - timeoutTrigger: 1, + tel.assertMetrics(t, []metricdata.Metrics{ + { + Name: "processor_batch_batch_send_size_bytes", + Description: "Number of bytes in batch that was sent", + Unit: "By", + Data: metricdata.Histogram[int64]{ + Temporality: metricdata.CumulativeTemporality, + DataPoints: []metricdata.HistogramDataPoint[int64]{ + { + Attributes: attribute.NewSet(attribute.String("processor", "batch")), + Count: uint64(expectedBatchesNum), + Bounds: []float64{10, 25, 50, 75, 100, 250, 500, 750, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 20000, 30000, 50000, + 100_000, 200_000, 300_000, 400_000, 500_000, 600_000, 700_000, 800_000, 900_000, + 1000_000, 2000_000, 3000_000, 4000_000, 5000_000, 6000_000, 7000_000, 8000_000, 9000_000}, + BucketCounts: []uint64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, uint64(expectedBatchesNum - 1), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + Sum: int64(sizeSum), + Min: metricdata.NewExtrema(int64(min)), + Max: metricdata.NewExtrema(int64(max)), + }, + }, + }, + }, + { + Name: "processor_batch_batch_send_size", + Description: "Number of units in the batch", + Unit: "1", + Data: metricdata.Histogram[int64]{ + Temporality: metricdata.CumulativeTemporality, + DataPoints: []metricdata.HistogramDataPoint[int64]{ + { + Attributes: attribute.NewSet(attribute.String("processor", "batch")), + Count: uint64(expectedBatchesNum), + Bounds: []float64{10, 25, 50, 75, 100, 250, 500, 750, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 20000, 30000, 50000, 100000}, + BucketCounts: []uint64{0, 1, uint64(expectedBatchesNum - 1), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + Sum: int64(sink.SpanCount()), + Min: metricdata.NewExtrema(int64(sendBatchSize - 1)), + Max: metricdata.NewExtrema(int64(cfg.SendBatchMaxSize)), + }, + }, + }, + }, + { + Name: "processor_batch_batch_size_trigger_send", + Description: "Number of times the batch was sent due to a size trigger", + Unit: "1", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: true, + DataPoints: []metricdata.DataPoint[int64]{ + { + Value: int64(expectedBatchesNum - 1), + Attributes: attribute.NewSet(attribute.String("processor", "batch")), + }, + }, + }, + }, + { + Name: "processor_batch_timeout_trigger_send", + Description: "Number of times the batch was sent due to a timeout trigger", + Unit: "1", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: true, + DataPoints: []metricdata.DataPoint[int64]{ + { + Value: 1, + Attributes: attribute.NewSet(attribute.String("processor", "batch")), + }, + }, + }, + }, + { + Name: "processor_batch_metadata_cardinality", + Description: "Number of distinct metadata value combinations being processed", + Unit: "1", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: false, + DataPoints: []metricdata.DataPoint[int64]{ + { + Value: 1, + Attributes: attribute.NewSet(attribute.String("processor", "batch")), + }, + }, + }, + }, }) } @@ -394,10 +553,7 @@ func TestBatchMetricProcessor_ReceivingData(t *testing.T) { } func TestBatchMetricProcessorBatchSize(t *testing.T) { - telemetryTest(t, testBatchMetricProcessorBatchSize) -} - -func testBatchMetricProcessorBatchSize(t *testing.T, tel testTelemetry) { + tel := setupTestTelemetry() sizer := &pmetric.ProtoMarshaler{} // Instantiate the batch processor with low config values to test data @@ -413,7 +569,7 @@ func testBatchMetricProcessorBatchSize(t *testing.T, tel testTelemetry) { dataPointsPerRequest := metricsPerRequest * dataPointsPerMetric sink := new(consumertest.MetricsSink) - creationSet := tel.NewProcessorCreateSettings() + creationSet := tel.NewCreateSettings() creationSet.MetricsLevel = configtelemetry.LevelDetailed batcher, err := newBatchMetricsProcessor(creationSet, sink, &cfg) require.NoError(t, err) @@ -444,11 +600,77 @@ func testBatchMetricProcessorBatchSize(t *testing.T, tel testTelemetry) { } } - tel.assertMetrics(t, expectedMetrics{ - sendCount: float64(expectedBatchesNum), - sendSizeSum: float64(sink.DataPointCount()), - sendSizeBytesSum: float64(size), - sizeTrigger: 20, + tel.assertMetrics(t, []metricdata.Metrics{ + { + Name: "processor_batch_batch_send_size_bytes", + Description: "Number of bytes in batch that was sent", + Unit: "By", + Data: metricdata.Histogram[int64]{ + Temporality: metricdata.CumulativeTemporality, + DataPoints: []metricdata.HistogramDataPoint[int64]{ + { + Attributes: attribute.NewSet(attribute.String("processor", "batch")), + Count: uint64(expectedBatchesNum), + Bounds: []float64{10, 25, 50, 75, 100, 250, 500, 750, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 20000, 30000, 50000, + 100_000, 200_000, 300_000, 400_000, 500_000, 600_000, 700_000, 800_000, 900_000, + 1000_000, 2000_000, 3000_000, 4000_000, 5000_000, 6000_000, 7000_000, 8000_000, 9000_000}, + BucketCounts: []uint64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, uint64(expectedBatchesNum), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + Sum: int64(size), + Min: metricdata.NewExtrema(int64(size / expectedBatchesNum)), + Max: metricdata.NewExtrema(int64(size / expectedBatchesNum)), + }, + }, + }, + }, + { + Name: "processor_batch_batch_send_size", + Description: "Number of units in the batch", + Unit: "1", + Data: metricdata.Histogram[int64]{ + Temporality: metricdata.CumulativeTemporality, + DataPoints: []metricdata.HistogramDataPoint[int64]{ + { + Attributes: attribute.NewSet(attribute.String("processor", "batch")), + Count: uint64(expectedBatchesNum), + Bounds: []float64{10, 25, 50, 75, 100, 250, 500, 750, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 20000, 30000, 50000, 100000}, + BucketCounts: []uint64{0, 0, uint64(expectedBatchesNum), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + Sum: int64(sink.DataPointCount()), + Min: metricdata.NewExtrema(int64(cfg.SendBatchSize)), + Max: metricdata.NewExtrema(int64(cfg.SendBatchSize)), + }, + }, + }, + }, + { + Name: "processor_batch_batch_size_trigger_send", + Description: "Number of times the batch was sent due to a size trigger", + Unit: "1", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: true, + DataPoints: []metricdata.DataPoint[int64]{ + { + Value: int64(expectedBatchesNum), + Attributes: attribute.NewSet(attribute.String("processor", "batch")), + }, + }, + }, + }, + { + Name: "processor_batch_metadata_cardinality", + Description: "Number of distinct metadata value combinations being processed", + Unit: "1", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: false, + DataPoints: []metricdata.DataPoint[int64]{ + { + Value: 1, + Attributes: attribute.NewSet(attribute.String("processor", "batch")), + }, + }, + }, + }, }) } @@ -713,10 +935,7 @@ func TestBatchLogProcessor_ReceivingData(t *testing.T) { } func TestBatchLogProcessor_BatchSize(t *testing.T) { - telemetryTest(t, testBatchLogProcessorBatchSize) -} - -func testBatchLogProcessorBatchSize(t *testing.T, tel testTelemetry) { + tel := setupTestTelemetry() sizer := &plog.ProtoMarshaler{} // Instantiate the batch processor with low config values to test data @@ -730,7 +949,7 @@ func testBatchLogProcessorBatchSize(t *testing.T, tel testTelemetry) { logsPerRequest := 5 sink := new(consumertest.LogsSink) - creationSet := tel.NewProcessorCreateSettings() + creationSet := tel.NewCreateSettings() creationSet.MetricsLevel = configtelemetry.LevelDetailed batcher, err := newBatchLogsProcessor(creationSet, sink, &cfg) require.NoError(t, err) @@ -761,11 +980,77 @@ func testBatchLogProcessorBatchSize(t *testing.T, tel testTelemetry) { } } - tel.assertMetrics(t, expectedMetrics{ - sendCount: float64(expectedBatchesNum), - sendSizeSum: float64(sink.LogRecordCount()), - sendSizeBytesSum: float64(size), - sizeTrigger: float64(expectedBatchesNum), + tel.assertMetrics(t, []metricdata.Metrics{ + { + Name: "processor_batch_batch_send_size_bytes", + Description: "Number of bytes in batch that was sent", + Unit: "By", + Data: metricdata.Histogram[int64]{ + Temporality: metricdata.CumulativeTemporality, + DataPoints: []metricdata.HistogramDataPoint[int64]{ + { + Attributes: attribute.NewSet(attribute.String("processor", "batch")), + Count: uint64(expectedBatchesNum), + Bounds: []float64{10, 25, 50, 75, 100, 250, 500, 750, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 20000, 30000, 50000, + 100_000, 200_000, 300_000, 400_000, 500_000, 600_000, 700_000, 800_000, 900_000, + 1000_000, 2000_000, 3000_000, 4000_000, 5000_000, 6000_000, 7000_000, 8000_000, 9000_000}, + BucketCounts: []uint64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, uint64(expectedBatchesNum), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + Sum: int64(size), + Min: metricdata.NewExtrema(int64(size / expectedBatchesNum)), + Max: metricdata.NewExtrema(int64(size / expectedBatchesNum)), + }, + }, + }, + }, + { + Name: "processor_batch_batch_send_size", + Description: "Number of units in the batch", + Unit: "1", + Data: metricdata.Histogram[int64]{ + Temporality: metricdata.CumulativeTemporality, + DataPoints: []metricdata.HistogramDataPoint[int64]{ + { + Attributes: attribute.NewSet(attribute.String("processor", "batch")), + Count: uint64(expectedBatchesNum), + Bounds: []float64{10, 25, 50, 75, 100, 250, 500, 750, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 20000, 30000, 50000, 100000}, + BucketCounts: []uint64{0, 0, uint64(expectedBatchesNum), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + Sum: int64(sink.LogRecordCount()), + Min: metricdata.NewExtrema(int64(cfg.SendBatchSize)), + Max: metricdata.NewExtrema(int64(cfg.SendBatchSize)), + }, + }, + }, + }, + { + Name: "processor_batch_batch_size_trigger_send", + Description: "Number of times the batch was sent due to a size trigger", + Unit: "1", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: true, + DataPoints: []metricdata.DataPoint[int64]{ + { + Value: int64(expectedBatchesNum), + Attributes: attribute.NewSet(attribute.String("processor", "batch")), + }, + }, + }, + }, + { + Name: "processor_batch_metadata_cardinality", + Description: "Number of distinct metadata value combinations being processed", + Unit: "1", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: false, + DataPoints: []metricdata.DataPoint[int64]{ + { + Value: 1, + Attributes: attribute.NewSet(attribute.String("processor", "batch")), + }, + }, + }, + }, }) } diff --git a/processor/batchprocessor/config_test.go b/processor/batchprocessor/config_test.go index 981f28a97fa..c5d3f693f92 100644 --- a/processor/batchprocessor/config_test.go +++ b/processor/batchprocessor/config_test.go @@ -11,7 +11,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/confmaptest" ) @@ -19,7 +18,7 @@ import ( func TestUnmarshalDefaultConfig(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig() - assert.NoError(t, component.UnmarshalConfig(confmap.New(), cfg)) + assert.NoError(t, confmap.New().Unmarshal(&cfg)) assert.Equal(t, factory.CreateDefaultConfig(), cfg) } @@ -28,7 +27,7 @@ func TestUnmarshalConfig(t *testing.T) { require.NoError(t, err) factory := NewFactory() cfg := factory.CreateDefaultConfig() - assert.NoError(t, component.UnmarshalConfig(cm, cfg)) + assert.NoError(t, cm.Unmarshal(&cfg)) assert.Equal(t, &Config{ SendBatchSize: uint32(10000), diff --git a/processor/batchprocessor/documentation.md b/processor/batchprocessor/documentation.md new file mode 100644 index 00000000000..c27bb1818c6 --- /dev/null +++ b/processor/batchprocessor/documentation.md @@ -0,0 +1,47 @@ +[comment]: <> (Code generated by mdatagen. DO NOT EDIT.) + +# batch + +## Internal Telemetry + +The following telemetry is emitted by this component. + +### processor_batch_batch_send_size + +Number of units in the batch + +| Unit | Metric Type | Value Type | +| ---- | ----------- | ---------- | +| 1 | Histogram | Int | + +### processor_batch_batch_send_size_bytes + +Number of bytes in batch that was sent + +| Unit | Metric Type | Value Type | +| ---- | ----------- | ---------- | +| By | Histogram | Int | + +### processor_batch_batch_size_trigger_send + +Number of times the batch was sent due to a size trigger + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | + +### processor_batch_metadata_cardinality + +Number of distinct metadata value combinations being processed + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | false | + +### processor_batch_timeout_trigger_send + +Number of times the batch was sent due to a timeout trigger + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | diff --git a/processor/batchprocessor/generated_component_telemetry_test.go b/processor/batchprocessor/generated_component_telemetry_test.go new file mode 100644 index 00000000000..425cd854d90 --- /dev/null +++ b/processor/batchprocessor/generated_component_telemetry_test.go @@ -0,0 +1,76 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package batchprocessor + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/processor" + "go.opentelemetry.io/collector/processor/processortest" +) + +type componentTestTelemetry struct { + reader *sdkmetric.ManualReader + meterProvider *sdkmetric.MeterProvider +} + +func (tt *componentTestTelemetry) NewCreateSettings() processor.CreateSettings { + settings := processortest.NewNopCreateSettings() + settings.MeterProvider = tt.meterProvider + settings.ID = component.NewID(component.MustNewType("batch")) + + return settings +} + +func setupTestTelemetry() componentTestTelemetry { + reader := sdkmetric.NewManualReader() + return componentTestTelemetry{ + reader: reader, + meterProvider: sdkmetric.NewMeterProvider(sdkmetric.WithReader(reader)), + } +} + +func (tt *componentTestTelemetry) assertMetrics(t *testing.T, expected []metricdata.Metrics) { + var md metricdata.ResourceMetrics + require.NoError(t, tt.reader.Collect(context.Background(), &md)) + // ensure all required metrics are present + for _, want := range expected { + got := tt.getMetric(want.Name, md) + metricdatatest.AssertEqual(t, want, got, metricdatatest.IgnoreTimestamp()) + } + + // ensure no additional metrics are emitted + require.Equal(t, len(expected), tt.len(md)) +} + +func (tt *componentTestTelemetry) getMetric(name string, got metricdata.ResourceMetrics) metricdata.Metrics { + for _, sm := range got.ScopeMetrics { + for _, m := range sm.Metrics { + if m.Name == name { + return m + } + } + } + + return metricdata.Metrics{} +} + +func (tt *componentTestTelemetry) len(got metricdata.ResourceMetrics) int { + metricsCount := 0 + for _, sm := range got.ScopeMetrics { + metricsCount += len(sm.Metrics) + } + + return metricsCount +} + +func (tt *componentTestTelemetry) Shutdown(ctx context.Context) error { + return tt.meterProvider.Shutdown(ctx) +} diff --git a/processor/batchprocessor/generated_component_test.go b/processor/batchprocessor/generated_component_test.go index 656dad9986b..0e6c4960b89 100644 --- a/processor/batchprocessor/generated_component_test.go +++ b/processor/batchprocessor/generated_component_test.go @@ -64,7 +64,7 @@ func TestComponentLifecycle(t *testing.T) { cfg := factory.CreateDefaultConfig() sub, err := cm.Sub("tests::config") require.NoError(t, err) - require.NoError(t, component.UnmarshalConfig(sub, cfg)) + require.NoError(t, sub.Unmarshal(&cfg)) for _, test := range tests { t.Run(test.name+"-shutdown", func(t *testing.T) { diff --git a/processor/batchprocessor/go.mod b/processor/batchprocessor/go.mod index eeeeba8a4a1..17fffdc8ac2 100644 --- a/processor/batchprocessor/go.mod +++ b/processor/batchprocessor/go.mod @@ -1,34 +1,28 @@ module go.opentelemetry.io/collector/processor/batchprocessor -go 1.21 +go 1.21.0 require ( - github.com/prometheus/client_golang v1.19.0 - github.com/prometheus/client_model v0.6.1 - github.com/prometheus/common v0.53.0 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector v0.100.0 - go.opentelemetry.io/collector/component v0.100.0 - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 - go.opentelemetry.io/collector/confmap v0.100.0 - go.opentelemetry.io/collector/consumer v0.100.0 - go.opentelemetry.io/collector/pdata v1.7.0 - go.opentelemetry.io/collector/pdata/testdata v0.100.0 - go.opentelemetry.io/collector/processor v0.100.0 - go.opentelemetry.io/otel v1.26.0 - go.opentelemetry.io/otel/exporters/prometheus v0.48.0 - go.opentelemetry.io/otel/metric v1.26.0 - go.opentelemetry.io/otel/sdk v1.26.0 - go.opentelemetry.io/otel/sdk/metric v1.26.0 - go.opentelemetry.io/otel/trace v1.26.0 + go.opentelemetry.io/collector v0.102.1 + go.opentelemetry.io/collector/component v0.102.1 + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 + go.opentelemetry.io/collector/confmap v0.102.1 + go.opentelemetry.io/collector/consumer v0.102.1 + go.opentelemetry.io/collector/pdata v1.9.0 + go.opentelemetry.io/collector/pdata/testdata v0.102.1 + go.opentelemetry.io/collector/processor v0.102.1 + go.opentelemetry.io/otel v1.27.0 + go.opentelemetry.io/otel/metric v1.27.0 + go.opentelemetry.io/otel/sdk/metric v1.27.0 + go.opentelemetry.io/otel/trace v1.27.0 go.uber.org/goleak v1.3.0 - go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -44,13 +38,19 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.34.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.53.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/processor/batchprocessor/go.sum b/processor/batchprocessor/go.sum index 4394e616fe3..c2df9c2579c 100644 --- a/processor/batchprocessor/go.sum +++ b/processor/batchprocessor/go.sum @@ -1,7 +1,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -44,14 +44,14 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -60,18 +60,18 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -87,20 +87,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -109,12 +109,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/processor/batchprocessor/internal/metadata/generated_telemetry.go b/processor/batchprocessor/internal/metadata/generated_telemetry.go index 9a1991a4795..76356cdc162 100644 --- a/processor/batchprocessor/internal/metadata/generated_telemetry.go +++ b/processor/batchprocessor/internal/metadata/generated_telemetry.go @@ -3,10 +3,16 @@ package metadata import ( + "context" + "errors" + + "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" ) func Meter(settings component.TelemetrySettings) metric.Meter { @@ -16,3 +22,93 @@ func Meter(settings component.TelemetrySettings) metric.Meter { func Tracer(settings component.TelemetrySettings) trace.Tracer { return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/processor/batchprocessor") } + +// TelemetryBuilder provides an interface for components to report telemetry +// as defined in metadata and user config. +type TelemetryBuilder struct { + ProcessorBatchBatchSendSize metric.Int64Histogram + ProcessorBatchBatchSendSizeBytes metric.Int64Histogram + ProcessorBatchBatchSizeTriggerSend metric.Int64Counter + ProcessorBatchMetadataCardinality metric.Int64ObservableUpDownCounter + observeProcessorBatchMetadataCardinality func() int64 + ProcessorBatchTimeoutTriggerSend metric.Int64Counter + level configtelemetry.Level + attributeSet attribute.Set +} + +// telemetryBuilderOption applies changes to default builder. +type telemetryBuilderOption func(*TelemetryBuilder) + +// WithLevel sets the current telemetry level for the component. +func WithLevel(lvl configtelemetry.Level) telemetryBuilderOption { + return func(builder *TelemetryBuilder) { + builder.level = lvl + } +} + +// WithAttributeSet applies a set of attributes for asynchronous instruments. +func WithAttributeSet(set attribute.Set) telemetryBuilderOption { + return func(builder *TelemetryBuilder) { + builder.attributeSet = set + } +} + +// WithProcessorBatchMetadataCardinalityCallback sets callback for observable ProcessorBatchMetadataCardinality metric. +func WithProcessorBatchMetadataCardinalityCallback(cb func() int64) telemetryBuilderOption { + return func(builder *TelemetryBuilder) { + builder.observeProcessorBatchMetadataCardinality = cb + } +} + +// NewTelemetryBuilder provides a struct with methods to update all internal telemetry +// for a component +func NewTelemetryBuilder(settings component.TelemetrySettings, options ...telemetryBuilderOption) (*TelemetryBuilder, error) { + builder := TelemetryBuilder{level: configtelemetry.LevelBasic} + for _, op := range options { + op(&builder) + } + var ( + err, errs error + meter metric.Meter + ) + if builder.level >= configtelemetry.LevelNormal { + meter = Meter(settings) + } else { + meter = noop.Meter{} + } + builder.ProcessorBatchBatchSendSize, err = meter.Int64Histogram( + "processor_batch_batch_send_size", + metric.WithDescription("Number of units in the batch"), + metric.WithUnit("1"), metric.WithExplicitBucketBoundaries([]float64{10, 25, 50, 75, 100, 250, 500, 750, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 20000, 30000, 50000, 100000}...), + ) + errs = errors.Join(errs, err) + builder.ProcessorBatchBatchSendSizeBytes, err = meter.Int64Histogram( + "processor_batch_batch_send_size_bytes", + metric.WithDescription("Number of bytes in batch that was sent"), + metric.WithUnit("By"), metric.WithExplicitBucketBoundaries([]float64{10, 25, 50, 75, 100, 250, 500, 750, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 20000, 30000, 50000, 100000, 200000, 300000, 400000, 500000, 600000, 700000, 800000, 900000, 1e+06, 2e+06, 3e+06, 4e+06, 5e+06, 6e+06, 7e+06, 8e+06, 9e+06}...), + ) + errs = errors.Join(errs, err) + builder.ProcessorBatchBatchSizeTriggerSend, err = meter.Int64Counter( + "processor_batch_batch_size_trigger_send", + metric.WithDescription("Number of times the batch was sent due to a size trigger"), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + builder.ProcessorBatchMetadataCardinality, err = meter.Int64ObservableUpDownCounter( + "processor_batch_metadata_cardinality", + metric.WithDescription("Number of distinct metadata value combinations being processed"), + metric.WithUnit("1"), + metric.WithInt64Callback(func(_ context.Context, o metric.Int64Observer) error { + o.Observe(builder.observeProcessorBatchMetadataCardinality(), metric.WithAttributeSet(builder.attributeSet)) + return nil + }), + ) + errs = errors.Join(errs, err) + builder.ProcessorBatchTimeoutTriggerSend, err = meter.Int64Counter( + "processor_batch_timeout_trigger_send", + metric.WithDescription("Number of times the batch was sent due to a timeout trigger"), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + return &builder, errs +} diff --git a/processor/batchprocessor/internal/metadata/generated_telemetry_test.go b/processor/batchprocessor/internal/metadata/generated_telemetry_test.go index 22002cbff85..6480073f1dc 100644 --- a/processor/batchprocessor/internal/metadata/generated_telemetry_test.go +++ b/processor/batchprocessor/internal/metadata/generated_telemetry_test.go @@ -61,3 +61,16 @@ func TestProviders(t *testing.T) { require.Fail(t, "returned Meter not mockTracer") } } + +func TestNewTelemetryBuilder(t *testing.T) { + set := component.TelemetrySettings{ + MeterProvider: mockMeterProvider{}, + TracerProvider: mockTracerProvider{}, + } + applied := false + _, err := NewTelemetryBuilder(set, func(b *TelemetryBuilder) { + applied = true + }) + require.NoError(t, err) + require.True(t, applied) +} diff --git a/processor/batchprocessor/metadata.yaml b/processor/batchprocessor/metadata.yaml index d96e0f80d9b..dd47697b850 100644 --- a/processor/batchprocessor/metadata.yaml +++ b/processor/batchprocessor/metadata.yaml @@ -7,3 +7,42 @@ status: distributions: [core, contrib] tests: + +telemetry: + level: normal + metrics: + processor_batch_batch_size_trigger_send: + enabled: true + description: Number of times the batch was sent due to a size trigger + unit: 1 + sum: + value_type: int + monotonic: true + processor_batch_timeout_trigger_send: + enabled: true + description: Number of times the batch was sent due to a timeout trigger + unit: 1 + sum: + value_type: int + monotonic: true + processor_batch_batch_send_size: + enabled: true + description: Number of units in the batch + unit: 1 + histogram: + value_type: int + bucket_boundaries: [10, 25, 50, 75, 100, 250, 500, 750, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 20000, 30000, 50000, 100000] + processor_batch_batch_send_size_bytes: + enabled: true + description: Number of bytes in batch that was sent + unit: By + histogram: + value_type: int + bucket_boundaries: [10, 25, 50, 75, 100, 250, 500, 750, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 20000, 30000, 50000, 100_000, 200_000, 300_000, 400_000, 500_000, 600_000, 700_000, 800_000, 900_000, 1000_000, 2000_000, 3000_000, 4000_000, 5000_000, 6000_000, 7000_000, 8000_000, 9000_000] + processor_batch_metadata_cardinality: + enabled: true + description: Number of distinct metadata value combinations being processed + unit: 1 + sum: + value_type: int + async: true diff --git a/processor/batchprocessor/metrics.go b/processor/batchprocessor/metrics.go index 95fe7f28e16..2aecaeeddc7 100644 --- a/processor/batchprocessor/metrics.go +++ b/processor/batchprocessor/metrics.go @@ -8,15 +8,11 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/metric" - noopmetric "go.opentelemetry.io/otel/metric/noop" - "go.uber.org/multierr" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" "go.opentelemetry.io/collector/processor" "go.opentelemetry.io/collector/processor/batchprocessor/internal/metadata" - "go.opentelemetry.io/collector/processor/processorhelper" ) type trigger int @@ -28,99 +24,45 @@ const ( ) type batchProcessorTelemetry struct { - level configtelemetry.Level detailed bool exportCtx context.Context - processorAttr []attribute.KeyValue - batchSizeTriggerSend metric.Int64Counter - timeoutTriggerSend metric.Int64Counter - batchSendSize metric.Int64Histogram - batchSendSizeBytes metric.Int64Histogram - batchMetadataCardinality metric.Int64ObservableUpDownCounter + processorAttr attribute.Set + telemetryBuilder *metadata.TelemetryBuilder } func newBatchProcessorTelemetry(set processor.CreateSettings, currentMetadataCardinality func() int) (*batchProcessorTelemetry, error) { - bpt := &batchProcessorTelemetry{ - processorAttr: []attribute.KeyValue{attribute.String(obsmetrics.ProcessorKey, set.ID.String())}, - exportCtx: context.Background(), - level: set.MetricsLevel, - detailed: set.MetricsLevel == configtelemetry.LevelDetailed, - } + attrs := attribute.NewSet(attribute.String(obsmetrics.ProcessorKey, set.ID.String())) - if err := bpt.createOtelMetrics(set.TelemetrySettings, currentMetadataCardinality); err != nil { - return nil, err - } - - return bpt, nil -} - -func (bpt *batchProcessorTelemetry) createOtelMetrics(set component.TelemetrySettings, currentMetadataCardinality func() int) error { - var ( - errors, err error - meter metric.Meter + telemetryBuilder, err := metadata.NewTelemetryBuilder(set.TelemetrySettings, + metadata.WithLevel(set.MetricsLevel), + metadata.WithProcessorBatchMetadataCardinalityCallback(func() int64 { return int64(currentMetadataCardinality()) }), + metadata.WithAttributeSet(attrs), ) - // BatchProcessor are emitted starting from Normal level only. - if bpt.level >= configtelemetry.LevelNormal { - meter = metadata.Meter(set) - } else { - meter = noopmetric.Meter{} + if err != nil { + return nil, err } - bpt.batchSizeTriggerSend, err = meter.Int64Counter( - processorhelper.BuildCustomMetricName(typeStr, "batch_size_trigger_send"), - metric.WithDescription("Number of times the batch was sent due to a size trigger"), - metric.WithUnit("1"), - ) - errors = multierr.Append(errors, err) - - bpt.timeoutTriggerSend, err = meter.Int64Counter( - processorhelper.BuildCustomMetricName(typeStr, "timeout_trigger_send"), - metric.WithDescription("Number of times the batch was sent due to a timeout trigger"), - metric.WithUnit("1"), - ) - errors = multierr.Append(errors, err) - - bpt.batchSendSize, err = meter.Int64Histogram( - processorhelper.BuildCustomMetricName(typeStr, "batch_send_size"), - metric.WithDescription("Number of units in the batch"), - metric.WithUnit("1"), - ) - errors = multierr.Append(errors, err) - - bpt.batchSendSizeBytes, err = meter.Int64Histogram( - processorhelper.BuildCustomMetricName(typeStr, "batch_send_size_bytes"), - metric.WithDescription("Number of bytes in batch that was sent"), - metric.WithUnit("By"), - ) - errors = multierr.Append(errors, err) - - bpt.batchMetadataCardinality, err = meter.Int64ObservableUpDownCounter( - processorhelper.BuildCustomMetricName(typeStr, "metadata_cardinality"), - metric.WithDescription("Number of distinct metadata value combinations being processed"), - metric.WithUnit("1"), - metric.WithInt64Callback(func(_ context.Context, obs metric.Int64Observer) error { - obs.Observe(int64(currentMetadataCardinality())) - return nil - }), - ) - errors = multierr.Append(errors, err) - - return errors + return &batchProcessorTelemetry{ + exportCtx: context.Background(), + detailed: set.MetricsLevel == configtelemetry.LevelDetailed, + telemetryBuilder: telemetryBuilder, + processorAttr: attrs, + }, nil } func (bpt *batchProcessorTelemetry) record(trigger trigger, sent, bytes int64) { switch trigger { case triggerBatchSize: - bpt.batchSizeTriggerSend.Add(bpt.exportCtx, 1, metric.WithAttributes(bpt.processorAttr...)) + bpt.telemetryBuilder.ProcessorBatchBatchSizeTriggerSend.Add(bpt.exportCtx, 1, metric.WithAttributeSet(bpt.processorAttr)) case triggerTimeout: - bpt.timeoutTriggerSend.Add(bpt.exportCtx, 1, metric.WithAttributes(bpt.processorAttr...)) + bpt.telemetryBuilder.ProcessorBatchTimeoutTriggerSend.Add(bpt.exportCtx, 1, metric.WithAttributeSet(bpt.processorAttr)) } - bpt.batchSendSize.Record(bpt.exportCtx, sent, metric.WithAttributes(bpt.processorAttr...)) + bpt.telemetryBuilder.ProcessorBatchBatchSendSize.Record(bpt.exportCtx, sent, metric.WithAttributeSet(bpt.processorAttr)) if bpt.detailed { - bpt.batchSendSizeBytes.Record(bpt.exportCtx, bytes, metric.WithAttributes(bpt.processorAttr...)) + bpt.telemetryBuilder.ProcessorBatchBatchSendSizeBytes.Record(bpt.exportCtx, bytes, metric.WithAttributeSet(bpt.processorAttr)) } } diff --git a/processor/batchprocessor/metrics_test.go b/processor/batchprocessor/metrics_test.go deleted file mode 100644 index 47345e99d57..00000000000 --- a/processor/batchprocessor/metrics_test.go +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package batchprocessor - -import ( - "context" - "fmt" - "math" - "net/http" - "net/http/httptest" - "testing" - - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promhttp" - io_prometheus_client "github.com/prometheus/client_model/go" - "github.com/prometheus/common/expfmt" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - otelprom "go.opentelemetry.io/otel/exporters/prometheus" - sdkmetric "go.opentelemetry.io/otel/sdk/metric" - "go.opentelemetry.io/otel/sdk/resource" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/processor" - "go.opentelemetry.io/collector/processor/processorhelper" - "go.opentelemetry.io/collector/processor/processortest" -) - -type testTelemetry struct { - promHandler http.Handler - meterProvider *sdkmetric.MeterProvider -} - -type expectedMetrics struct { - // processor_batch_batch_send_size_count - // processor_batch_batch_send_size_bytes_count - sendCount float64 - // processor_batch_batch_send_size_sum - sendSizeSum float64 - // processor_batch_batch_send_size_bytes_sum - sendSizeBytesSum float64 - // processor_batch_batch_size_trigger_send - sizeTrigger float64 - // processor_batch_batch_timeout_trigger_send - timeoutTrigger float64 -} - -func telemetryTest(t *testing.T, testFunc func(t *testing.T, tel testTelemetry)) { - t.Run("WithOTel", func(t *testing.T) { - testFunc(t, setupTelemetry(t)) - }) -} - -func setupTelemetry(t *testing.T) testTelemetry { - telemetry := testTelemetry{} - - promReg := prometheus.NewRegistry() - exporter, err := otelprom.New(otelprom.WithRegisterer(promReg), otelprom.WithoutUnits(), otelprom.WithoutScopeInfo(), otelprom.WithoutCounterSuffixes()) - require.NoError(t, err) - - telemetry.meterProvider = sdkmetric.NewMeterProvider( - sdkmetric.WithResource(resource.Empty()), - sdkmetric.WithReader(exporter), - sdkmetric.WithView(batchViews()...), - ) - - telemetry.promHandler = promhttp.HandlerFor(promReg, promhttp.HandlerOpts{}) - - t.Cleanup(func() { assert.NoError(t, telemetry.meterProvider.Shutdown(context.Background())) }) - - return telemetry -} - -func (tt *testTelemetry) NewProcessorCreateSettings() processor.CreateSettings { - settings := processortest.NewNopCreateSettings() - settings.MeterProvider = tt.meterProvider - settings.ID = component.MustNewID("batch") - - return settings -} - -func (tt *testTelemetry) assertMetrics(t *testing.T, expected expectedMetrics) { - req, err := http.NewRequest(http.MethodGet, "/metrics", nil) - require.NoError(t, err) - - rr := httptest.NewRecorder() - tt.promHandler.ServeHTTP(rr, req) - - var parser expfmt.TextParser - metrics, err := parser.TextToMetricFamilies(rr.Body) - require.NoError(t, err) - - if expected.sendSizeBytesSum > 0 { - name := "processor_batch_batch_send_size_bytes" - metric := tt.getMetric(t, name, io_prometheus_client.MetricType_HISTOGRAM, metrics) - - assertFloat(t, expected.sendSizeBytesSum, metric.GetHistogram().GetSampleSum(), name) - assertFloat(t, expected.sendCount, float64(metric.GetHistogram().GetSampleCount()), name) - - tt.assertBoundaries(t, - []float64{10, 25, 50, 75, 100, 250, 500, 750, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 20000, 30000, 50000, - 100_000, 200_000, 300_000, 400_000, 500_000, 600_000, 700_000, 800_000, 900_000, - 1000_000, 2000_000, 3000_000, 4000_000, 5000_000, 6000_000, 7000_000, 8000_000, 9000_000, math.Inf(1)}, - metric.GetHistogram(), - name, - ) - } - - if expected.sendSizeSum > 0 { - name := "processor_batch_batch_send_size" - metric := tt.getMetric(t, name, io_prometheus_client.MetricType_HISTOGRAM, metrics) - - assertFloat(t, expected.sendSizeSum, metric.GetHistogram().GetSampleSum(), name) - assertFloat(t, expected.sendCount, float64(metric.GetHistogram().GetSampleCount()), name) - - tt.assertBoundaries(t, - []float64{10, 25, 50, 75, 100, 250, 500, 750, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 20000, 30000, 50000, 100000, math.Inf(1)}, - metric.GetHistogram(), - name, - ) - } - - if expected.sizeTrigger > 0 { - name := "processor_batch_batch_size_trigger_send" - metric := tt.getMetric(t, name, io_prometheus_client.MetricType_COUNTER, metrics) - - assertFloat(t, expected.sizeTrigger, metric.GetCounter().GetValue(), name) - } - - if expected.timeoutTrigger > 0 { - name := "processor_batch_timeout_trigger_send" - metric := tt.getMetric(t, name, io_prometheus_client.MetricType_COUNTER, metrics) - - assertFloat(t, expected.timeoutTrigger, metric.GetCounter().GetValue(), name) - } -} - -func (tt *testTelemetry) assertBoundaries(t *testing.T, expected []float64, histogram *io_prometheus_client.Histogram, metric string) { - var got []float64 - for _, bucket := range histogram.GetBucket() { - got = append(got, bucket.GetUpperBound()) - } - - if len(expected) != len(got) { - assert.Failf(t, "different boundaries size", "metric '%s' expected boundaries '%x' but got '%x'", metric, expected, got) - return - } - - for i := range expected { - if math.Abs(expected[i]-got[i]) > 0.00001 { - assert.Failf(t, "unexpected boundary", "boundary for metric '%s' did not match, expected '%f' got '%f'", metric, expected[i], got[i]) - } - } - -} - -func (tt *testTelemetry) getMetric(t *testing.T, name string, mtype io_prometheus_client.MetricType, got map[string]*io_prometheus_client.MetricFamily) *io_prometheus_client.Metric { - metricFamily, ok := got[name] - require.True(t, ok, "expected metric '%s' not found", name) - require.Equal(t, mtype, metricFamily.GetType()) - - metric, err := getSingleMetric(metricFamily) - require.NoError(t, err) - - return metric -} - -func getSingleMetric(metric *io_prometheus_client.MetricFamily) (*io_prometheus_client.Metric, error) { - if l := len(metric.Metric); l != 1 { - return nil, fmt.Errorf("expected metric '%s' with one set of attributes, but found %d", metric.GetName(), l) - } - first := metric.Metric[0] - - if len(first.Label) != 1 || "processor" != first.Label[0].GetName() || "batch" != first.Label[0].GetValue() { - return nil, fmt.Errorf("expected metric '%s' with a single `batch=processor` attribute but got '%s'", metric.GetName(), first.GetLabel()) - } - - return first, nil -} - -func assertFloat(t *testing.T, expected, got float64, metric string) { - if math.Abs(expected-got) > 0.00001 { - assert.Failf(t, "unexpected metric value", "value for metric '%s' did not match, expected '%f' got '%f'", metric, expected, got) - } -} - -func batchViews() []sdkmetric.View { - return []sdkmetric.View{ - sdkmetric.NewView( - sdkmetric.Instrument{Name: processorhelper.BuildCustomMetricName("batch", "batch_send_size")}, - sdkmetric.Stream{Aggregation: sdkmetric.AggregationExplicitBucketHistogram{ - Boundaries: []float64{10, 25, 50, 75, 100, 250, 500, 750, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 20000, 30000, 50000, 100000}, - }}, - ), - sdkmetric.NewView( - sdkmetric.Instrument{Name: processorhelper.BuildCustomMetricName("batch", "batch_send_size_bytes")}, - sdkmetric.Stream{Aggregation: sdkmetric.AggregationExplicitBucketHistogram{ - Boundaries: []float64{10, 25, 50, 75, 100, 250, 500, 750, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 20000, 30000, 50000, - 100_000, 200_000, 300_000, 400_000, 500_000, 600_000, 700_000, 800_000, 900_000, - 1000_000, 2000_000, 3000_000, 4000_000, 5000_000, 6000_000, 7000_000, 8000_000, 9000_000}, - }}, - ), - } -} diff --git a/processor/go.mod b/processor/go.mod index e569ac163d8..7b8aeedddf3 100644 --- a/processor/go.mod +++ b/processor/go.mod @@ -1,27 +1,27 @@ module go.opentelemetry.io/collector/processor -go 1.21 +go 1.21.0 require ( github.com/google/uuid v1.6.0 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector v0.100.0 - go.opentelemetry.io/collector/component v0.100.0 - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 - go.opentelemetry.io/collector/consumer v0.100.0 - go.opentelemetry.io/collector/pdata v1.7.0 - go.opentelemetry.io/collector/pdata/testdata v0.100.0 - go.opentelemetry.io/otel v1.26.0 - go.opentelemetry.io/otel/metric v1.26.0 - go.opentelemetry.io/otel/trace v1.26.0 + go.opentelemetry.io/collector v0.102.1 + go.opentelemetry.io/collector/component v0.102.1 + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 + go.opentelemetry.io/collector/consumer v0.102.1 + go.opentelemetry.io/collector/pdata v1.9.0 + go.opentelemetry.io/collector/pdata/testdata v0.102.1 + go.opentelemetry.io/otel v1.27.0 + go.opentelemetry.io/otel/metric v1.27.0 + go.opentelemetry.io/otel/sdk/metric v1.27.0 + go.opentelemetry.io/otel/trace v1.27.0 go.uber.org/goleak v1.3.0 - go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -36,20 +36,20 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.53.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector/confmap v0.100.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect - go.opentelemetry.io/otel/sdk v1.26.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.34.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect + go.opentelemetry.io/collector/confmap v0.102.1 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/processor/go.sum b/processor/go.sum index 4394e616fe3..c2df9c2579c 100644 --- a/processor/go.sum +++ b/processor/go.sum @@ -1,7 +1,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -44,14 +44,14 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -60,18 +60,18 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -87,20 +87,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -109,12 +109,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/processor/memorylimiterprocessor/generated_component_test.go b/processor/memorylimiterprocessor/generated_component_test.go index 7144d4a3901..0805632c347 100644 --- a/processor/memorylimiterprocessor/generated_component_test.go +++ b/processor/memorylimiterprocessor/generated_component_test.go @@ -64,7 +64,7 @@ func TestComponentLifecycle(t *testing.T) { cfg := factory.CreateDefaultConfig() sub, err := cm.Sub("tests::config") require.NoError(t, err) - require.NoError(t, component.UnmarshalConfig(sub, cfg)) + require.NoError(t, sub.Unmarshal(&cfg)) for _, test := range tests { t.Run(test.name+"-lifecycle", func(t *testing.T) { diff --git a/processor/memorylimiterprocessor/go.mod b/processor/memorylimiterprocessor/go.mod index 87ab2ea6753..ee6c64cc8cb 100644 --- a/processor/memorylimiterprocessor/go.mod +++ b/processor/memorylimiterprocessor/go.mod @@ -1,23 +1,21 @@ module go.opentelemetry.io/collector/processor/memorylimiterprocessor -go 1.21 +go 1.21.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector v0.100.0 - go.opentelemetry.io/collector/component v0.100.0 - go.opentelemetry.io/collector/confmap v0.100.0 - go.opentelemetry.io/collector/consumer v0.100.0 - go.opentelemetry.io/collector/pdata v1.7.0 - go.opentelemetry.io/collector/processor v0.100.0 - go.opentelemetry.io/otel/metric v1.26.0 - go.opentelemetry.io/otel/trace v1.26.0 + go.opentelemetry.io/collector v0.102.1 + go.opentelemetry.io/collector/component v0.102.1 + go.opentelemetry.io/collector/confmap v0.102.1 + go.opentelemetry.io/collector/consumer v0.102.1 + go.opentelemetry.io/collector/pdata v1.9.0 + go.opentelemetry.io/collector/processor v0.102.1 go.uber.org/goleak v1.3.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -36,28 +34,30 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.53.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - github.com/shirou/gopsutil/v3 v3.24.3 // indirect + github.com/prometheus/procfs v0.15.0 // indirect + github.com/shirou/gopsutil/v3 v3.24.4 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect - go.opentelemetry.io/collector/pdata/testdata v0.100.0 // indirect - go.opentelemetry.io/otel v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect - go.opentelemetry.io/otel/sdk v1.26.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.102.1 // indirect + go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.34.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/processor/memorylimiterprocessor/go.sum b/processor/memorylimiterprocessor/go.sum index a2c03ed5c2f..8c3cf825d2f 100644 --- a/processor/memorylimiterprocessor/go.sum +++ b/processor/memorylimiterprocessor/go.sum @@ -1,7 +1,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -52,18 +52,18 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= -github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= +github.com/shirou/gopsutil/v3 v3.24.4 h1:dEHgzZXt4LMNm+oYELpzl9YCqV65Yr/6SfrvgRBtXeU= +github.com/shirou/gopsutil/v3 v3.24.4/go.mod h1:lTd2mdiOspcqLgAnr9/nGi71NkeMpWKdmhuxm9GusH8= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -84,18 +84,18 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -111,8 +111,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -123,13 +123,13 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -138,12 +138,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/processor/memorylimiterprocessor/internal/metadata/generated_telemetry.go b/processor/memorylimiterprocessor/internal/metadata/generated_telemetry.go deleted file mode 100644 index 9ae63c09a87..00000000000 --- a/processor/memorylimiterprocessor/internal/metadata/generated_telemetry.go +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" - - "go.opentelemetry.io/collector/component" -) - -func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter("go.opentelemetry.io/collector/processor/memorylimiterprocessor") -} - -func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/processor/memorylimiterprocessor") -} diff --git a/processor/memorylimiterprocessor/internal/metadata/generated_telemetry_test.go b/processor/memorylimiterprocessor/internal/metadata/generated_telemetry_test.go deleted file mode 100644 index 21c22f3a34c..00000000000 --- a/processor/memorylimiterprocessor/internal/metadata/generated_telemetry_test.go +++ /dev/null @@ -1,63 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "testing" - - "github.com/stretchr/testify/require" - "go.opentelemetry.io/otel/metric" - embeddedmetric "go.opentelemetry.io/otel/metric/embedded" - noopmetric "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" - embeddedtrace "go.opentelemetry.io/otel/trace/embedded" - nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" -) - -type mockMeter struct { - noopmetric.Meter - name string -} -type mockMeterProvider struct { - embeddedmetric.MeterProvider -} - -func (m mockMeterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter { - return mockMeter{name: name} -} - -type mockTracer struct { - nooptrace.Tracer - name string -} - -type mockTracerProvider struct { - embeddedtrace.TracerProvider -} - -func (m mockTracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { - return mockTracer{name: name} -} - -func TestProviders(t *testing.T) { - set := component.TelemetrySettings{ - MeterProvider: mockMeterProvider{}, - TracerProvider: mockTracerProvider{}, - } - - meter := Meter(set) - if m, ok := meter.(mockMeter); ok { - require.Equal(t, "go.opentelemetry.io/collector/processor/memorylimiterprocessor", m.name) - } else { - require.Fail(t, "returned Meter not mockMeter") - } - - tracer := Tracer(set) - if m, ok := tracer.(mockTracer); ok { - require.Equal(t, "go.opentelemetry.io/collector/processor/memorylimiterprocessor", m.name) - } else { - require.Fail(t, "returned Meter not mockTracer") - } -} diff --git a/processor/memorylimiterprocessor/memorylimiter_test.go b/processor/memorylimiterprocessor/memorylimiter_test.go index 10bc8d7911c..0c103157346 100644 --- a/processor/memorylimiterprocessor/memorylimiter_test.go +++ b/processor/memorylimiterprocessor/memorylimiter_test.go @@ -56,7 +56,9 @@ func TestNoDataLoss(t *testing.T) { limiter, err := newMemoryLimiterProcessor(set, cfg) require.NoError(t, err) - processor, err := processorhelper.NewLogsProcessor(context.Background(), processor.CreateSettings{}, cfg, exporter, + processor, err := processorhelper.NewLogsProcessor(context.Background(), processor.CreateSettings{ + ID: component.MustNewID("nop"), + }, cfg, exporter, limiter.processLogs, processorhelper.WithStart(limiter.start), processorhelper.WithShutdown(limiter.shutdown)) diff --git a/processor/processorhelper/documentation.md b/processor/processorhelper/documentation.md new file mode 100644 index 00000000000..073fc9a7219 --- /dev/null +++ b/processor/processorhelper/documentation.md @@ -0,0 +1,79 @@ +[comment]: <> (Code generated by mdatagen. DO NOT EDIT.) + +# processorhelper + +## Internal Telemetry + +The following telemetry is emitted by this component. + +### processor_accepted_log_records + +Number of log records successfully pushed into the next component in the pipeline. + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | + +### processor_accepted_metric_points + +Number of metric points successfully pushed into the next component in the pipeline. + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | + +### processor_accepted_spans + +Number of spans successfully pushed into the next component in the pipeline. + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | + +### processor_dropped_log_records + +Number of log records that were dropped. + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | + +### processor_dropped_metric_points + +Number of metric points that were dropped. + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | + +### processor_dropped_spans + +Number of spans that were dropped. + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | + +### processor_refused_log_records + +Number of log records that were rejected by the next component in the pipeline. + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | + +### processor_refused_metric_points + +Number of metric points that were rejected by the next component in the pipeline. + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | + +### processor_refused_spans + +Number of spans that were rejected by the next component in the pipeline. + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | diff --git a/processor/processorhelper/generated_component_telemetry_test.go b/processor/processorhelper/generated_component_telemetry_test.go new file mode 100644 index 00000000000..95da78895e0 --- /dev/null +++ b/processor/processorhelper/generated_component_telemetry_test.go @@ -0,0 +1,76 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package processorhelper + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/processor" + "go.opentelemetry.io/collector/processor/processortest" +) + +type componentTestTelemetry struct { + reader *sdkmetric.ManualReader + meterProvider *sdkmetric.MeterProvider +} + +func (tt *componentTestTelemetry) NewCreateSettings() processor.CreateSettings { + settings := processortest.NewNopCreateSettings() + settings.MeterProvider = tt.meterProvider + settings.ID = component.NewID(component.MustNewType("processorhelper")) + + return settings +} + +func setupTestTelemetry() componentTestTelemetry { + reader := sdkmetric.NewManualReader() + return componentTestTelemetry{ + reader: reader, + meterProvider: sdkmetric.NewMeterProvider(sdkmetric.WithReader(reader)), + } +} + +func (tt *componentTestTelemetry) assertMetrics(t *testing.T, expected []metricdata.Metrics) { + var md metricdata.ResourceMetrics + require.NoError(t, tt.reader.Collect(context.Background(), &md)) + // ensure all required metrics are present + for _, want := range expected { + got := tt.getMetric(want.Name, md) + metricdatatest.AssertEqual(t, want, got, metricdatatest.IgnoreTimestamp()) + } + + // ensure no additional metrics are emitted + require.Equal(t, len(expected), tt.len(md)) +} + +func (tt *componentTestTelemetry) getMetric(name string, got metricdata.ResourceMetrics) metricdata.Metrics { + for _, sm := range got.ScopeMetrics { + for _, m := range sm.Metrics { + if m.Name == name { + return m + } + } + } + + return metricdata.Metrics{} +} + +func (tt *componentTestTelemetry) len(got metricdata.ResourceMetrics) int { + metricsCount := 0 + for _, sm := range got.ScopeMetrics { + metricsCount += len(sm.Metrics) + } + + return metricsCount +} + +func (tt *componentTestTelemetry) Shutdown(ctx context.Context) error { + return tt.meterProvider.Shutdown(ctx) +} diff --git a/processor/processorhelper/package_test.go b/processor/processorhelper/generated_package_test.go similarity index 62% rename from processor/processorhelper/package_test.go rename to processor/processorhelper/generated_package_test.go index e9823cee56e..2f76dc96200 100644 --- a/processor/processorhelper/package_test.go +++ b/processor/processorhelper/generated_package_test.go @@ -1,5 +1,4 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 +// Code generated by mdatagen. DO NOT EDIT. package processorhelper diff --git a/processor/processorhelper/internal/metadata/generated_telemetry.go b/processor/processorhelper/internal/metadata/generated_telemetry.go new file mode 100644 index 00000000000..568b689edd5 --- /dev/null +++ b/processor/processorhelper/internal/metadata/generated_telemetry.go @@ -0,0 +1,120 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "errors" + + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/metric/noop" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("go.opentelemetry.io/collector/processor/processorhelper") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/processor/processorhelper") +} + +// TelemetryBuilder provides an interface for components to report telemetry +// as defined in metadata and user config. +type TelemetryBuilder struct { + ProcessorAcceptedLogRecords metric.Int64Counter + ProcessorAcceptedMetricPoints metric.Int64Counter + ProcessorAcceptedSpans metric.Int64Counter + ProcessorDroppedLogRecords metric.Int64Counter + ProcessorDroppedMetricPoints metric.Int64Counter + ProcessorDroppedSpans metric.Int64Counter + ProcessorRefusedLogRecords metric.Int64Counter + ProcessorRefusedMetricPoints metric.Int64Counter + ProcessorRefusedSpans metric.Int64Counter + level configtelemetry.Level +} + +// telemetryBuilderOption applies changes to default builder. +type telemetryBuilderOption func(*TelemetryBuilder) + +// WithLevel sets the current telemetry level for the component. +func WithLevel(lvl configtelemetry.Level) telemetryBuilderOption { + return func(builder *TelemetryBuilder) { + builder.level = lvl + } +} + +// NewTelemetryBuilder provides a struct with methods to update all internal telemetry +// for a component +func NewTelemetryBuilder(settings component.TelemetrySettings, options ...telemetryBuilderOption) (*TelemetryBuilder, error) { + builder := TelemetryBuilder{level: configtelemetry.LevelBasic} + for _, op := range options { + op(&builder) + } + var ( + err, errs error + meter metric.Meter + ) + if builder.level >= configtelemetry.LevelBasic { + meter = Meter(settings) + } else { + meter = noop.Meter{} + } + builder.ProcessorAcceptedLogRecords, err = meter.Int64Counter( + "processor_accepted_log_records", + metric.WithDescription("Number of log records successfully pushed into the next component in the pipeline."), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + builder.ProcessorAcceptedMetricPoints, err = meter.Int64Counter( + "processor_accepted_metric_points", + metric.WithDescription("Number of metric points successfully pushed into the next component in the pipeline."), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + builder.ProcessorAcceptedSpans, err = meter.Int64Counter( + "processor_accepted_spans", + metric.WithDescription("Number of spans successfully pushed into the next component in the pipeline."), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + builder.ProcessorDroppedLogRecords, err = meter.Int64Counter( + "processor_dropped_log_records", + metric.WithDescription("Number of log records that were dropped."), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + builder.ProcessorDroppedMetricPoints, err = meter.Int64Counter( + "processor_dropped_metric_points", + metric.WithDescription("Number of metric points that were dropped."), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + builder.ProcessorDroppedSpans, err = meter.Int64Counter( + "processor_dropped_spans", + metric.WithDescription("Number of spans that were dropped."), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + builder.ProcessorRefusedLogRecords, err = meter.Int64Counter( + "processor_refused_log_records", + metric.WithDescription("Number of log records that were rejected by the next component in the pipeline."), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + builder.ProcessorRefusedMetricPoints, err = meter.Int64Counter( + "processor_refused_metric_points", + metric.WithDescription("Number of metric points that were rejected by the next component in the pipeline."), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + builder.ProcessorRefusedSpans, err = meter.Int64Counter( + "processor_refused_spans", + metric.WithDescription("Number of spans that were rejected by the next component in the pipeline."), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + return &builder, errs +} diff --git a/connector/forwardconnector/internal/metadata/generated_telemetry_test.go b/processor/processorhelper/internal/metadata/generated_telemetry_test.go similarity index 73% rename from connector/forwardconnector/internal/metadata/generated_telemetry_test.go rename to processor/processorhelper/internal/metadata/generated_telemetry_test.go index 658ab380f97..1fb64bf6023 100644 --- a/connector/forwardconnector/internal/metadata/generated_telemetry_test.go +++ b/processor/processorhelper/internal/metadata/generated_telemetry_test.go @@ -49,15 +49,28 @@ func TestProviders(t *testing.T) { meter := Meter(set) if m, ok := meter.(mockMeter); ok { - require.Equal(t, "go.opentelemetry.io/collector/connector/forwardconnector", m.name) + require.Equal(t, "go.opentelemetry.io/collector/processor/processorhelper", m.name) } else { require.Fail(t, "returned Meter not mockMeter") } tracer := Tracer(set) if m, ok := tracer.(mockTracer); ok { - require.Equal(t, "go.opentelemetry.io/collector/connector/forwardconnector", m.name) + require.Equal(t, "go.opentelemetry.io/collector/processor/processorhelper", m.name) } else { require.Fail(t, "returned Meter not mockTracer") } } + +func TestNewTelemetryBuilder(t *testing.T) { + set := component.TelemetrySettings{ + MeterProvider: mockMeterProvider{}, + TracerProvider: mockTracerProvider{}, + } + applied := false + _, err := NewTelemetryBuilder(set, func(b *TelemetryBuilder) { + applied = true + }) + require.NoError(t, err) + require.True(t, applied) +} diff --git a/processor/processorhelper/metadata.yaml b/processor/processorhelper/metadata.yaml new file mode 100644 index 00000000000..7e0c72f5c9c --- /dev/null +++ b/processor/processorhelper/metadata.yaml @@ -0,0 +1,82 @@ +type: processorhelper + +status: + class: processor + not_component: true + stability: + beta: [traces, metrics, logs] + distributions: [core, contrib] + +telemetry: + metrics: + processor_accepted_spans: + enabled: true + description: Number of spans successfully pushed into the next component in the pipeline. + unit: 1 + sum: + value_type: int + monotonic: true + + processor_refused_spans: + enabled: true + description: Number of spans that were rejected by the next component in the pipeline. + unit: 1 + sum: + value_type: int + monotonic: true + + processor_dropped_spans: + enabled: true + description: Number of spans that were dropped. + unit: 1 + sum: + value_type: int + monotonic: true + + processor_accepted_metric_points: + enabled: true + description: Number of metric points successfully pushed into the next component in the pipeline. + unit: 1 + sum: + value_type: int + monotonic: true + + processor_refused_metric_points: + enabled: true + description: Number of metric points that were rejected by the next component in the pipeline. + unit: 1 + sum: + value_type: int + monotonic: true + + processor_dropped_metric_points: + enabled: true + description: Number of metric points that were dropped. + unit: 1 + sum: + value_type: int + monotonic: true + + processor_accepted_log_records: + enabled: true + description: Number of log records successfully pushed into the next component in the pipeline. + unit: 1 + sum: + value_type: int + monotonic: true + + processor_refused_log_records: + enabled: true + description: Number of log records that were rejected by the next component in the pipeline. + unit: 1 + sum: + value_type: int + monotonic: true + + processor_dropped_log_records: + enabled: true + description: Number of log records that were dropped. + unit: 1 + sum: + value_type: int + monotonic: true \ No newline at end of file diff --git a/processor/processorhelper/obsreport.go b/processor/processorhelper/obsreport.go index 17b20704f0d..51aa26a9a88 100644 --- a/processor/processorhelper/obsreport.go +++ b/processor/processorhelper/obsreport.go @@ -9,17 +9,12 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/metric" - "go.uber.org/multierr" "go.uber.org/zap" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" "go.opentelemetry.io/collector/processor" -) - -var ( - processorScope = obsmetrics.Scope + obsmetrics.SpanNameSep + obsmetrics.ProcessorKey + "go.opentelemetry.io/collector/processor/processorhelper/internal/metadata" ) // BuildCustomMetricName is used to be build a metric name following @@ -38,21 +33,10 @@ func BuildCustomMetricName(configType, metric string) string { // ObsReport is a helper to add observability to a processor. type ObsReport struct { - level configtelemetry.Level - logger *zap.Logger - otelAttrs []attribute.KeyValue - - acceptedSpansCounter metric.Int64Counter - refusedSpansCounter metric.Int64Counter - droppedSpansCounter metric.Int64Counter - acceptedMetricPointsCounter metric.Int64Counter - refusedMetricPointsCounter metric.Int64Counter - droppedMetricPointsCounter metric.Int64Counter - acceptedLogRecordsCounter metric.Int64Counter - refusedLogRecordsCounter metric.Int64Counter - droppedLogRecordsCounter metric.Int64Counter + otelAttrs []attribute.KeyValue + telemetryBuilder *metadata.TelemetryBuilder } // ObsReportSettings are settings for creating an ObsReport. @@ -67,106 +51,34 @@ func NewObsReport(cfg ObsReportSettings) (*ObsReport, error) { } func newObsReport(cfg ObsReportSettings) (*ObsReport, error) { - report := &ObsReport{ - level: cfg.ProcessorCreateSettings.MetricsLevel, + telemetryBuilder, err := metadata.NewTelemetryBuilder(cfg.ProcessorCreateSettings.TelemetrySettings, metadata.WithLevel(cfg.ProcessorCreateSettings.MetricsLevel)) + if err != nil { + return nil, err + } + return &ObsReport{ logger: cfg.ProcessorCreateSettings.Logger, otelAttrs: []attribute.KeyValue{ attribute.String(obsmetrics.ProcessorKey, cfg.ProcessorID.String()), }, - } - - if err := report.createOtelMetrics(cfg); err != nil { - return nil, err - } - - return report, nil -} - -func (or *ObsReport) createOtelMetrics(cfg ObsReportSettings) error { - meter := cfg.ProcessorCreateSettings.MeterProvider.Meter(processorScope) - var errors, err error - - or.acceptedSpansCounter, err = meter.Int64Counter( - obsmetrics.ProcessorMetricPrefix+obsmetrics.AcceptedSpansKey, - metric.WithDescription("Number of spans successfully pushed into the next component in the pipeline."), - metric.WithUnit("1"), - ) - errors = multierr.Append(errors, err) - - or.refusedSpansCounter, err = meter.Int64Counter( - obsmetrics.ProcessorMetricPrefix+obsmetrics.RefusedSpansKey, - metric.WithDescription("Number of spans that were rejected by the next component in the pipeline."), - metric.WithUnit("1"), - ) - errors = multierr.Append(errors, err) - - or.droppedSpansCounter, err = meter.Int64Counter( - obsmetrics.ProcessorMetricPrefix+obsmetrics.DroppedSpansKey, - metric.WithDescription("Number of spans that were dropped."), - metric.WithUnit("1"), - ) - errors = multierr.Append(errors, err) - - or.acceptedMetricPointsCounter, err = meter.Int64Counter( - obsmetrics.ProcessorMetricPrefix+obsmetrics.AcceptedMetricPointsKey, - metric.WithDescription("Number of metric points successfully pushed into the next component in the pipeline."), - metric.WithUnit("1"), - ) - errors = multierr.Append(errors, err) - - or.refusedMetricPointsCounter, err = meter.Int64Counter( - obsmetrics.ProcessorMetricPrefix+obsmetrics.RefusedMetricPointsKey, - metric.WithDescription("Number of metric points that were rejected by the next component in the pipeline."), - metric.WithUnit("1"), - ) - errors = multierr.Append(errors, err) - - or.droppedMetricPointsCounter, err = meter.Int64Counter( - obsmetrics.ProcessorMetricPrefix+obsmetrics.DroppedMetricPointsKey, - metric.WithDescription("Number of metric points that were dropped."), - metric.WithUnit("1"), - ) - errors = multierr.Append(errors, err) - - or.acceptedLogRecordsCounter, err = meter.Int64Counter( - obsmetrics.ProcessorMetricPrefix+obsmetrics.AcceptedLogRecordsKey, - metric.WithDescription("Number of log records successfully pushed into the next component in the pipeline."), - metric.WithUnit("1"), - ) - errors = multierr.Append(errors, err) - - or.refusedLogRecordsCounter, err = meter.Int64Counter( - obsmetrics.ProcessorMetricPrefix+obsmetrics.RefusedLogRecordsKey, - metric.WithDescription("Number of log records that were rejected by the next component in the pipeline."), - metric.WithUnit("1"), - ) - errors = multierr.Append(errors, err) - - or.droppedLogRecordsCounter, err = meter.Int64Counter( - obsmetrics.ProcessorMetricPrefix+obsmetrics.DroppedLogRecordsKey, - metric.WithDescription("Number of log records that were dropped."), - metric.WithUnit("1"), - ) - errors = multierr.Append(errors, err) - - return errors + telemetryBuilder: telemetryBuilder, + }, nil } func (or *ObsReport) recordData(ctx context.Context, dataType component.DataType, accepted, refused, dropped int64) { var acceptedCount, refusedCount, droppedCount metric.Int64Counter switch dataType { case component.DataTypeTraces: - acceptedCount = or.acceptedSpansCounter - refusedCount = or.refusedSpansCounter - droppedCount = or.droppedSpansCounter + acceptedCount = or.telemetryBuilder.ProcessorAcceptedSpans + refusedCount = or.telemetryBuilder.ProcessorRefusedSpans + droppedCount = or.telemetryBuilder.ProcessorDroppedSpans case component.DataTypeMetrics: - acceptedCount = or.acceptedMetricPointsCounter - refusedCount = or.refusedMetricPointsCounter - droppedCount = or.droppedMetricPointsCounter + acceptedCount = or.telemetryBuilder.ProcessorAcceptedMetricPoints + refusedCount = or.telemetryBuilder.ProcessorRefusedMetricPoints + droppedCount = or.telemetryBuilder.ProcessorDroppedMetricPoints case component.DataTypeLogs: - acceptedCount = or.acceptedLogRecordsCounter - refusedCount = or.refusedLogRecordsCounter - droppedCount = or.droppedLogRecordsCounter + acceptedCount = or.telemetryBuilder.ProcessorAcceptedLogRecords + refusedCount = or.telemetryBuilder.ProcessorRefusedLogRecords + droppedCount = or.telemetryBuilder.ProcessorDroppedLogRecords } acceptedCount.Add(ctx, accepted, metric.WithAttributes(or.otelAttrs...)) @@ -176,63 +88,45 @@ func (or *ObsReport) recordData(ctx context.Context, dataType component.DataType // TracesAccepted reports that the trace data was accepted. func (or *ObsReport) TracesAccepted(ctx context.Context, numSpans int) { - if or.level != configtelemetry.LevelNone { - or.recordData(ctx, component.DataTypeTraces, int64(numSpans), int64(0), int64(0)) - } + or.recordData(ctx, component.DataTypeTraces, int64(numSpans), int64(0), int64(0)) } // TracesRefused reports that the trace data was refused. func (or *ObsReport) TracesRefused(ctx context.Context, numSpans int) { - if or.level != configtelemetry.LevelNone { - or.recordData(ctx, component.DataTypeTraces, int64(0), int64(numSpans), int64(0)) - } + or.recordData(ctx, component.DataTypeTraces, int64(0), int64(numSpans), int64(0)) } // TracesDropped reports that the trace data was dropped. func (or *ObsReport) TracesDropped(ctx context.Context, numSpans int) { - if or.level != configtelemetry.LevelNone { - or.recordData(ctx, component.DataTypeTraces, int64(0), int64(0), int64(numSpans)) - } + or.recordData(ctx, component.DataTypeTraces, int64(0), int64(0), int64(numSpans)) } // MetricsAccepted reports that the metrics were accepted. func (or *ObsReport) MetricsAccepted(ctx context.Context, numPoints int) { - if or.level != configtelemetry.LevelNone { - or.recordData(ctx, component.DataTypeMetrics, int64(numPoints), int64(0), int64(0)) - } + or.recordData(ctx, component.DataTypeMetrics, int64(numPoints), int64(0), int64(0)) } // MetricsRefused reports that the metrics were refused. func (or *ObsReport) MetricsRefused(ctx context.Context, numPoints int) { - if or.level != configtelemetry.LevelNone { - or.recordData(ctx, component.DataTypeMetrics, int64(0), int64(numPoints), int64(0)) - } + or.recordData(ctx, component.DataTypeMetrics, int64(0), int64(numPoints), int64(0)) } // MetricsDropped reports that the metrics were dropped. func (or *ObsReport) MetricsDropped(ctx context.Context, numPoints int) { - if or.level != configtelemetry.LevelNone { - or.recordData(ctx, component.DataTypeMetrics, int64(0), int64(0), int64(numPoints)) - } + or.recordData(ctx, component.DataTypeMetrics, int64(0), int64(0), int64(numPoints)) } // LogsAccepted reports that the logs were accepted. func (or *ObsReport) LogsAccepted(ctx context.Context, numRecords int) { - if or.level != configtelemetry.LevelNone { - or.recordData(ctx, component.DataTypeLogs, int64(numRecords), int64(0), int64(0)) - } + or.recordData(ctx, component.DataTypeLogs, int64(numRecords), int64(0), int64(0)) } // LogsRefused reports that the logs were refused. func (or *ObsReport) LogsRefused(ctx context.Context, numRecords int) { - if or.level != configtelemetry.LevelNone { - or.recordData(ctx, component.DataTypeLogs, int64(0), int64(numRecords), int64(0)) - } + or.recordData(ctx, component.DataTypeLogs, int64(0), int64(numRecords), int64(0)) } // LogsDropped reports that the logs were dropped. func (or *ObsReport) LogsDropped(ctx context.Context, numRecords int) { - if or.level != configtelemetry.LevelNone { - or.recordData(ctx, component.DataTypeLogs, int64(0), int64(0), int64(numRecords)) - } + or.recordData(ctx, component.DataTypeLogs, int64(0), int64(0), int64(numRecords)) } diff --git a/processor/processorhelper/obsreport_test.go b/processor/processorhelper/obsreport_test.go index d80c1c180f6..d9313234874 100644 --- a/processor/processorhelper/obsreport_test.go +++ b/processor/processorhelper/obsreport_test.go @@ -12,6 +12,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/processor" ) @@ -172,12 +173,71 @@ func TestCheckProcessorLogViews(t *testing.T) { assert.Error(t, tt.CheckProcessorLogs(0, 0, 9)) } -func testTelemetry(t *testing.T, id component.ID, testFunc func(t *testing.T, tt componenttest.TestTelemetry)) { - t.Run("WithOTel", func(t *testing.T) { - tt, err := componenttest.SetupTelemetry(id) - require.NoError(t, err) - t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) +func TestNoMetrics(t *testing.T) { + // ensure if LevelNone is configured, no metrics are emitted by the component + testTelemetry(t, processorID, func(t *testing.T, tt componenttest.TestTelemetry) { + const accepted = 29 + const refused = 11 + const dropped = 17 + set := tt.TelemetrySettings() + set.MetricsLevel = configtelemetry.LevelNone + + por, err := NewObsReport(ObsReportSettings{ + ProcessorID: processorID, + ProcessorCreateSettings: processor.CreateSettings{ID: processorID, TelemetrySettings: set, BuildInfo: component.NewDefaultBuildInfo()}, + }) + assert.NoError(t, err) + + por.TracesAccepted(context.Background(), accepted) + por.TracesRefused(context.Background(), refused) + por.TracesDropped(context.Background(), dropped) + + require.Error(t, tt.CheckProcessorTraces(accepted, refused, dropped)) + }) + testTelemetry(t, processorID, func(t *testing.T, tt componenttest.TestTelemetry) { + const accepted = 29 + const refused = 11 + const dropped = 17 + set := tt.TelemetrySettings() + set.MetricsLevel = configtelemetry.LevelNone + + por, err := NewObsReport(ObsReportSettings{ + ProcessorID: processorID, + ProcessorCreateSettings: processor.CreateSettings{ID: processorID, TelemetrySettings: set, BuildInfo: component.NewDefaultBuildInfo()}, + }) + assert.NoError(t, err) + + por.MetricsAccepted(context.Background(), accepted) + por.MetricsRefused(context.Background(), refused) + por.MetricsDropped(context.Background(), dropped) - testFunc(t, tt) + require.Error(t, tt.CheckProcessorMetrics(accepted, refused, dropped)) }) + testTelemetry(t, processorID, func(t *testing.T, tt componenttest.TestTelemetry) { + const accepted = 29 + const refused = 11 + const dropped = 17 + set := tt.TelemetrySettings() + set.MetricsLevel = configtelemetry.LevelNone + + por, err := NewObsReport(ObsReportSettings{ + ProcessorID: processorID, + ProcessorCreateSettings: processor.CreateSettings{ID: processorID, TelemetrySettings: set, BuildInfo: component.NewDefaultBuildInfo()}, + }) + assert.NoError(t, err) + + por.LogsAccepted(context.Background(), accepted) + por.LogsRefused(context.Background(), refused) + por.LogsDropped(context.Background(), dropped) + + require.Error(t, tt.CheckProcessorLogs(accepted, refused, dropped)) + }) +} + +func testTelemetry(t *testing.T, id component.ID, testFunc func(t *testing.T, tt componenttest.TestTelemetry)) { + tt, err := componenttest.SetupTelemetry(id) + require.NoError(t, err) + t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) + + testFunc(t, tt) } diff --git a/processor/processorhelper/processor.go b/processor/processorhelper/processor.go index 3aeb70a4126..8bdaa4fbf73 100644 --- a/processor/processorhelper/processor.go +++ b/processor/processorhelper/processor.go @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +//go:generate mdatagen metadata.yaml + package processorhelper // import "go.opentelemetry.io/collector/processor/processorhelper" import ( diff --git a/proto_patch.sed b/proto_patch.sed index 4130ca2b12b..47dd40af35a 100644 --- a/proto_patch.sed +++ b/proto_patch.sed @@ -1,6 +1,6 @@ s+go.opentelemetry.io/proto/otlp/+go.opentelemetry.io/collector/pdata/internal/data/protogen/+g -s+package opentelemetry.proto.\(.*\).v1;+package opentelemetry.proto.\1.v1;\ +s+package opentelemetry.proto.\(.*\).v\(.*\);+package opentelemetry.proto.\1.v\2;\ \ import "gogoproto/gogo.proto";+g @@ -47,3 +47,39 @@ s+optional \(.*\) \(.*\) = \(.*\);+ oneof \2_ { \1 \2 = \3;}+g s+\(.*\)PartialSuccess partial_success = \(.*\);+\1PartialSuccess partial_success = \2\ [ (gogoproto.nullable) = false ];+g + +# +# Profiles replacements +# +s+opentelemetry.proto.profiles.v1experimental.Profile \(.*\);+opentelemetry.proto.profiles.v1experimental.Profile \1\ + [ (gogoproto.nullable) = false ];+g + +s+repeated ValueType \(.*\);+repeated ValueType \1\ + [ (gogoproto.nullable) = false ];+g + +s+repeated Sample \(.*\);+repeated Sample \1\ + [ (gogoproto.nullable) = false ];+g + +s+repeated Mapping \(.*\);+repeated Mapping \1\ + [ (gogoproto.nullable) = false ];+g + +s+repeated Location \(.*\);+repeated Location \1\ + [ (gogoproto.nullable) = false ];+g + +s+repeated Label \(.*\);+repeated Label \1\ + [ (gogoproto.nullable) = false ];+g + +s+repeated Function \(.*\);+repeated Function \1\ + [ (gogoproto.nullable) = false ];+g + +s+repeated AttributeUnit \(.*\);+repeated AttributeUnit \1\ + [ (gogoproto.nullable) = false ];+g + +s+repeated Link link_table \(.*\);+repeated Link link_table \1\ + [ (gogoproto.nullable) = false ];+g + +s+repeated Line \(.*\);+repeated Line \1\ + [ (gogoproto.nullable) = false ];+g + +s+ValueType period_type \(.*\);+ValueType period_type \1\ + [ (gogoproto.nullable) = false ];+g diff --git a/receiver/go.mod b/receiver/go.mod index 600c47a82ef..5603b533739 100644 --- a/receiver/go.mod +++ b/receiver/go.mod @@ -1,19 +1,20 @@ module go.opentelemetry.io/collector/receiver -go 1.21 +go 1.21.0 require ( github.com/google/uuid v1.6.0 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector v0.100.0 - go.opentelemetry.io/collector/component v0.100.0 - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 - go.opentelemetry.io/collector/consumer v0.100.0 - go.opentelemetry.io/collector/pdata v1.7.0 - go.opentelemetry.io/otel v1.26.0 - go.opentelemetry.io/otel/metric v1.26.0 - go.opentelemetry.io/otel/sdk v1.26.0 - go.opentelemetry.io/otel/trace v1.26.0 + go.opentelemetry.io/collector v0.102.1 + go.opentelemetry.io/collector/component v0.102.1 + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 + go.opentelemetry.io/collector/consumer v0.102.1 + go.opentelemetry.io/collector/pdata v1.9.0 + go.opentelemetry.io/otel v1.27.0 + go.opentelemetry.io/otel/metric v1.27.0 + go.opentelemetry.io/otel/sdk v1.27.0 + go.opentelemetry.io/otel/sdk/metric v1.27.0 + go.opentelemetry.io/otel/trace v1.27.0 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 @@ -21,7 +22,7 @@ require ( require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -36,19 +37,18 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.53.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector/confmap v0.100.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.34.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect + go.opentelemetry.io/collector/confmap v0.102.1 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/receiver/go.sum b/receiver/go.sum index 4394e616fe3..c2df9c2579c 100644 --- a/receiver/go.sum +++ b/receiver/go.sum @@ -1,7 +1,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -44,14 +44,14 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -60,18 +60,18 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -87,20 +87,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -109,12 +109,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/receiver/nopreceiver/generated_component_test.go b/receiver/nopreceiver/generated_component_test.go index 14f8840b1e7..92e563ad645 100644 --- a/receiver/nopreceiver/generated_component_test.go +++ b/receiver/nopreceiver/generated_component_test.go @@ -59,7 +59,7 @@ func TestComponentLifecycle(t *testing.T) { cfg := factory.CreateDefaultConfig() sub, err := cm.Sub("tests::config") require.NoError(t, err) - require.NoError(t, component.UnmarshalConfig(sub, cfg)) + require.NoError(t, sub.Unmarshal(&cfg)) for _, test := range tests { t.Run(test.name+"-shutdown", func(t *testing.T) { diff --git a/receiver/nopreceiver/go.mod b/receiver/nopreceiver/go.mod index 8f2e843d625..ba9b0e509e2 100644 --- a/receiver/nopreceiver/go.mod +++ b/receiver/nopreceiver/go.mod @@ -1,23 +1,19 @@ module go.opentelemetry.io/collector/receiver/nopreceiver -go 1.21 - -toolchain go1.21.6 +go 1.21.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.100.0 - go.opentelemetry.io/collector/confmap v0.100.0 - go.opentelemetry.io/collector/consumer v0.100.0 - go.opentelemetry.io/collector/receiver v0.100.0 - go.opentelemetry.io/otel/metric v1.26.0 - go.opentelemetry.io/otel/trace v1.26.0 + go.opentelemetry.io/collector/component v0.102.1 + go.opentelemetry.io/collector/confmap v0.102.1 + go.opentelemetry.io/collector/consumer v0.102.1 + go.opentelemetry.io/collector/receiver v0.102.1 go.uber.org/goleak v1.3.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -33,24 +29,26 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.53.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect - go.opentelemetry.io/collector/pdata v1.7.0 // indirect - go.opentelemetry.io/otel v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect - go.opentelemetry.io/otel/sdk v1.26.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 // indirect + go.opentelemetry.io/collector/pdata v1.9.0 // indirect + go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.34.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/receiver/nopreceiver/go.sum b/receiver/nopreceiver/go.sum index 4394e616fe3..c2df9c2579c 100644 --- a/receiver/nopreceiver/go.sum +++ b/receiver/nopreceiver/go.sum @@ -1,7 +1,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -44,14 +44,14 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -60,18 +60,18 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -87,20 +87,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -109,12 +109,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/receiver/nopreceiver/internal/metadata/generated_telemetry.go b/receiver/nopreceiver/internal/metadata/generated_telemetry.go deleted file mode 100644 index 9f3838ece6c..00000000000 --- a/receiver/nopreceiver/internal/metadata/generated_telemetry.go +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" - - "go.opentelemetry.io/collector/component" -) - -func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter("go.opentelemetry.io/collector/receiver/nopreceiver") -} - -func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/receiver/nopreceiver") -} diff --git a/receiver/nopreceiver/internal/metadata/generated_telemetry_test.go b/receiver/nopreceiver/internal/metadata/generated_telemetry_test.go deleted file mode 100644 index 95dde48b83a..00000000000 --- a/receiver/nopreceiver/internal/metadata/generated_telemetry_test.go +++ /dev/null @@ -1,63 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "testing" - - "github.com/stretchr/testify/require" - "go.opentelemetry.io/otel/metric" - embeddedmetric "go.opentelemetry.io/otel/metric/embedded" - noopmetric "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" - embeddedtrace "go.opentelemetry.io/otel/trace/embedded" - nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" -) - -type mockMeter struct { - noopmetric.Meter - name string -} -type mockMeterProvider struct { - embeddedmetric.MeterProvider -} - -func (m mockMeterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter { - return mockMeter{name: name} -} - -type mockTracer struct { - nooptrace.Tracer - name string -} - -type mockTracerProvider struct { - embeddedtrace.TracerProvider -} - -func (m mockTracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { - return mockTracer{name: name} -} - -func TestProviders(t *testing.T) { - set := component.TelemetrySettings{ - MeterProvider: mockMeterProvider{}, - TracerProvider: mockTracerProvider{}, - } - - meter := Meter(set) - if m, ok := meter.(mockMeter); ok { - require.Equal(t, "go.opentelemetry.io/collector/receiver/nopreceiver", m.name) - } else { - require.Fail(t, "returned Meter not mockMeter") - } - - tracer := Tracer(set) - if m, ok := tracer.(mockTracer); ok { - require.Equal(t, "go.opentelemetry.io/collector/receiver/nopreceiver", m.name) - } else { - require.Fail(t, "returned Meter not mockTracer") - } -} diff --git a/receiver/otlpreceiver/config_test.go b/receiver/otlpreceiver/config_test.go index 9604d507812..3059f97471d 100644 --- a/receiver/otlpreceiver/config_test.go +++ b/receiver/otlpreceiver/config_test.go @@ -25,7 +25,7 @@ func TestUnmarshalDefaultConfig(t *testing.T) { require.NoError(t, err) factory := NewFactory() cfg := factory.CreateDefaultConfig() - assert.NoError(t, component.UnmarshalConfig(cm, cfg)) + assert.NoError(t, cm.Unmarshal(&cfg)) assert.Equal(t, factory.CreateDefaultConfig(), cfg) } @@ -34,7 +34,7 @@ func TestUnmarshalConfigOnlyGRPC(t *testing.T) { require.NoError(t, err) factory := NewFactory() cfg := factory.CreateDefaultConfig() - assert.NoError(t, component.UnmarshalConfig(cm, cfg)) + assert.NoError(t, cm.Unmarshal(&cfg)) defaultOnlyGRPC := factory.CreateDefaultConfig().(*Config) defaultOnlyGRPC.HTTP = nil @@ -46,7 +46,7 @@ func TestUnmarshalConfigOnlyHTTP(t *testing.T) { require.NoError(t, err) factory := NewFactory() cfg := factory.CreateDefaultConfig() - assert.NoError(t, component.UnmarshalConfig(cm, cfg)) + assert.NoError(t, cm.Unmarshal(&cfg)) defaultOnlyHTTP := factory.CreateDefaultConfig().(*Config) defaultOnlyHTTP.GRPC = nil @@ -58,7 +58,7 @@ func TestUnmarshalConfigOnlyHTTPNull(t *testing.T) { require.NoError(t, err) factory := NewFactory() cfg := factory.CreateDefaultConfig() - assert.NoError(t, component.UnmarshalConfig(cm, cfg)) + assert.NoError(t, cm.Unmarshal(&cfg)) defaultOnlyHTTP := factory.CreateDefaultConfig().(*Config) defaultOnlyHTTP.GRPC = nil @@ -70,7 +70,7 @@ func TestUnmarshalConfigOnlyHTTPEmptyMap(t *testing.T) { require.NoError(t, err) factory := NewFactory() cfg := factory.CreateDefaultConfig() - assert.NoError(t, component.UnmarshalConfig(cm, cfg)) + assert.NoError(t, cm.Unmarshal(&cfg)) defaultOnlyHTTP := factory.CreateDefaultConfig().(*Config) defaultOnlyHTTP.GRPC = nil @@ -82,7 +82,7 @@ func TestUnmarshalConfig(t *testing.T) { require.NoError(t, err) factory := NewFactory() cfg := factory.CreateDefaultConfig() - assert.NoError(t, component.UnmarshalConfig(cm, cfg)) + assert.NoError(t, cm.Unmarshal(&cfg)) assert.Equal(t, &Config{ Protocols: Protocols{ @@ -143,7 +143,7 @@ func TestUnmarshalConfigUnix(t *testing.T) { require.NoError(t, err) factory := NewFactory() cfg := factory.CreateDefaultConfig() - assert.NoError(t, component.UnmarshalConfig(cm, cfg)) + assert.NoError(t, cm.Unmarshal(&cfg)) assert.Equal(t, &Config{ Protocols: Protocols{ @@ -171,7 +171,7 @@ func TestUnmarshalConfigTypoDefaultProtocol(t *testing.T) { require.NoError(t, err) factory := NewFactory() cfg := factory.CreateDefaultConfig() - assert.EqualError(t, component.UnmarshalConfig(cm, cfg), "1 error(s) decoding:\n\n* 'protocols' has invalid keys: htttp") + assert.EqualError(t, cm.Unmarshal(&cfg), "1 error(s) decoding:\n\n* 'protocols' has invalid keys: htttp") } func TestUnmarshalConfigInvalidProtocol(t *testing.T) { @@ -179,7 +179,7 @@ func TestUnmarshalConfigInvalidProtocol(t *testing.T) { require.NoError(t, err) factory := NewFactory() cfg := factory.CreateDefaultConfig() - assert.EqualError(t, component.UnmarshalConfig(cm, cfg), "1 error(s) decoding:\n\n* 'protocols' has invalid keys: thrift") + assert.EqualError(t, cm.Unmarshal(&cfg), "1 error(s) decoding:\n\n* 'protocols' has invalid keys: thrift") } func TestUnmarshalConfigEmptyProtocols(t *testing.T) { @@ -187,7 +187,7 @@ func TestUnmarshalConfigEmptyProtocols(t *testing.T) { require.NoError(t, err) factory := NewFactory() cfg := factory.CreateDefaultConfig() - assert.NoError(t, component.UnmarshalConfig(cm, cfg)) + assert.NoError(t, cm.Unmarshal(&cfg)) assert.EqualError(t, component.ValidateConfig(cfg), "must specify at least one protocol when using the OTLP receiver") } @@ -216,7 +216,7 @@ func TestUnmarshalConfigInvalidSignalPath(t *testing.T) { require.NoError(t, err) factory := NewFactory() cfg := factory.CreateDefaultConfig() - assert.EqualError(t, component.UnmarshalConfig(cm, cfg), "invalid HTTP URL path set for signal: parse \":invalid\": missing protocol scheme") + assert.EqualError(t, cm.Unmarshal(&cfg), "invalid HTTP URL path set for signal: parse \":invalid\": missing protocol scheme") }) } } @@ -224,6 +224,6 @@ func TestUnmarshalConfigInvalidSignalPath(t *testing.T) { func TestUnmarshalConfigEmpty(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig() - assert.NoError(t, component.UnmarshalConfig(confmap.New(), cfg)) + assert.NoError(t, confmap.New().Unmarshal(&cfg)) assert.EqualError(t, component.ValidateConfig(cfg), "must specify at least one protocol when using the OTLP receiver") } diff --git a/receiver/otlpreceiver/generated_component_test.go b/receiver/otlpreceiver/generated_component_test.go index e4c99be47ac..0f54074cff2 100644 --- a/receiver/otlpreceiver/generated_component_test.go +++ b/receiver/otlpreceiver/generated_component_test.go @@ -59,7 +59,7 @@ func TestComponentLifecycle(t *testing.T) { cfg := factory.CreateDefaultConfig() sub, err := cm.Sub("tests::config") require.NoError(t, err) - require.NoError(t, component.UnmarshalConfig(sub, cfg)) + require.NoError(t, sub.Unmarshal(&cfg)) for _, test := range tests { t.Run(test.name+"-shutdown", func(t *testing.T) { diff --git a/receiver/otlpreceiver/go.mod b/receiver/otlpreceiver/go.mod index b104a35ba7a..1b88460e0b6 100644 --- a/receiver/otlpreceiver/go.mod +++ b/receiver/otlpreceiver/go.mod @@ -1,35 +1,33 @@ module go.opentelemetry.io/collector/receiver/otlpreceiver -go 1.21 +go 1.21.0 require ( github.com/gogo/protobuf v1.3.2 github.com/klauspost/compress v1.17.8 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector v0.100.0 - go.opentelemetry.io/collector/component v0.100.0 - go.opentelemetry.io/collector/config/configgrpc v0.100.0 - go.opentelemetry.io/collector/config/confighttp v0.100.0 - go.opentelemetry.io/collector/config/confignet v0.100.0 - go.opentelemetry.io/collector/config/configtls v0.100.0 - go.opentelemetry.io/collector/confmap v0.100.0 - go.opentelemetry.io/collector/consumer v0.100.0 - go.opentelemetry.io/collector/pdata v1.7.0 - go.opentelemetry.io/collector/pdata/testdata v0.100.0 - go.opentelemetry.io/collector/receiver v0.100.0 - go.opentelemetry.io/otel/metric v1.26.0 - go.opentelemetry.io/otel/trace v1.26.0 + go.opentelemetry.io/collector v0.102.1 + go.opentelemetry.io/collector/component v0.102.1 + go.opentelemetry.io/collector/config/configgrpc v0.102.1 + go.opentelemetry.io/collector/config/confighttp v0.102.1 + go.opentelemetry.io/collector/config/confignet v0.102.1 + go.opentelemetry.io/collector/config/configtls v0.102.1 + go.opentelemetry.io/collector/confmap v0.102.1 + go.opentelemetry.io/collector/consumer v0.102.1 + go.opentelemetry.io/collector/pdata v1.9.0 + go.opentelemetry.io/collector/pdata/testdata v0.102.1 + go.opentelemetry.io/collector/receiver v0.102.1 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda - google.golang.org/grpc v1.63.2 - google.golang.org/protobuf v1.34.0 + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 + google.golang.org/grpc v1.64.0 + google.golang.org/protobuf v1.34.1 ) require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect @@ -38,8 +36,8 @@ require ( github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect + github.com/hashicorp/go-version v1.7.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect @@ -50,39 +48,41 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mostynb/go-grpc-compression v1.2.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.53.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect github.com/rs/cors v1.10.1 // indirect - go.opentelemetry.io/collector/config/configauth v0.100.0 // indirect - go.opentelemetry.io/collector/config/configcompression v1.7.0 // indirect - go.opentelemetry.io/collector/config/configopaque v1.7.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 // indirect - go.opentelemetry.io/collector/config/internal v0.100.0 // indirect - go.opentelemetry.io/collector/extension v0.100.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.100.0 // indirect - go.opentelemetry.io/collector/featuregate v1.7.0 // indirect - go.opentelemetry.io/contrib/config v0.6.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 // indirect - go.opentelemetry.io/otel v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 // indirect - go.opentelemetry.io/otel/sdk v1.26.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.102.1 // indirect + go.opentelemetry.io/collector/config/configcompression v1.9.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.9.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 // indirect + go.opentelemetry.io/collector/config/internal v0.102.1 // indirect + go.opentelemetry.io/collector/extension v0.102.1 // indirect + go.opentelemetry.io/collector/extension/auth v0.102.1 // indirect + go.opentelemetry.io/collector/featuregate v1.9.0 // indirect + go.opentelemetry.io/contrib/config v0.7.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 // indirect + go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect go.opentelemetry.io/proto/otlp v1.2.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/receiver/otlpreceiver/go.sum b/receiver/otlpreceiver/go.sum index ee0cdcbf90e..0dca59da058 100644 --- a/receiver/otlpreceiver/go.sum +++ b/receiver/otlpreceiver/go.sum @@ -2,8 +2,8 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -27,10 +27,10 @@ github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 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/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -60,16 +60,16 @@ github.com/mostynb/go-grpc-compression v1.2.2 h1:XaDbnRvt2+1vgr0b/l0qh4mJAfIxE0b github.com/mostynb/go-grpc-compression v1.2.2/go.mod h1:GOCr2KBxXcblCuczg3YdLQlcin1/NfyDA348ckuCH6w= 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/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -78,38 +78,38 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/contrib/config v0.6.0 h1:M1SRD1Z15XHPGk61tMLI1up77XT5FdrqQSRrlH0fYuk= -go.opentelemetry.io/contrib/config v0.6.0/go.mod h1:t+/kzmRWLN7J+4F/dD4fFvlYCmCO63WYwy/B00IC++c= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 h1:A3SayB3rNyt+1S6qpI9mHPkeHTZbD7XILEqWnYZb2l0= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0/go.mod h1:27iA5uvhuRNmalO+iEUdVn5ZMj2qy10Mm+XRIpRmyuU= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 h1:Xs2Ncz0gNihqu9iosIZ5SkBbWo5T8JhhLJFMQL1qmLI= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0/go.mod h1:vy+2G/6NvVMpwGX/NyLqcC41fxepnuKHk16E6IZUcJc= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 h1:+hm+I+KigBy3M24/h1p/NHkUx/evbLH0PNcjpMyCHc4= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0/go.mod h1:NjC8142mLvvNT6biDpaMjyz78kyEHIwAJlSX0N9P5KI= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 h1:HGZWGmCVRCVyAs2GQaiHQPbDHo+ObFWeUEOd+zDnp64= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0/go.mod h1:SaH+v38LSCHddyk7RGlU9uZyQoRrKao6IBnJw6Kbn+c= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 h1:1u/AyyOqAWzy+SkPxDpahCNZParHV8Vid1RnI2clyDE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0/go.mod h1:z46paqbJ9l7c9fIPCXTqTGwhQZ5XoTIsfeFYWboizjs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 h1:Waw9Wfpo/IXzOI8bCB7DIk+0JZcqqsyn1JFnAc+iam8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0/go.mod h1:wnJIG4fOqyynOnnQF/eQb4/16VlX2EJAHhHgqIqWfAo= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 h1:1wp/gyxsuYtuE/JFxsQRtcCDtMrO2qMvlfXALU5wkzI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0/go.mod h1:gbTHmghkGgqxMomVQQMur1Nba4M0MQ8AYThXDUjsJ38= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 h1:5fnmgteaar1VcAA69huatudPduNFz7guRtCmfZCooZI= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0/go.mod h1:lsPccfZiz1cb1AhBPmicWM2E4F1VynFXEvD8SEBS4TM= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 h1:0W5o9SzoR15ocYHEQfvfipzcNog1lBxOLfnex91Hk6s= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0/go.mod h1:zVZ8nz+VSggWmnh6tTsJqXQ7rU4xLwRtna1M4x5jq58= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/contrib/config v0.7.0 h1:b1rK5tGTuhhPirJiMxOcyQfZs76j2VapY6ODn3b2Dbs= +go.opentelemetry.io/contrib/config v0.7.0/go.mod h1:8tdiFd8N5etOi3XzBmAoMxplEzI3TcL8dU5rM5/xcOQ= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 h1:vS1Ao/R55RNV4O7TA2Qopok8yN+X0LIP6RVWLFkprck= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0/go.mod h1:BMsdeOxN04K0L5FNUBfjFdvwWGNe/rkmSwH4Aelu/X0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 h1:9l89oX4ba9kHbBol3Xin3leYJ+252h0zszDtBwyKe2A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0/go.mod h1:XLZfZboOJWHNKUv7eH0inh0E9VV6eWDFB/9yJyTLPp0= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 h1:QY7/0NeRPKlzusf40ZE4t1VlMKbqSNT7cJRYzWuja0s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0/go.mod h1:HVkSiDhTM9BoUJU8qE6j2eSWLLXvi1USXjyd2BXT8PY= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0 h1:/jlt1Y8gXWiHG9FBx6cJaIC5hYx5Fe64nC8w5Cylt/0= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0/go.mod h1:bmToOGOBZ4hA9ghphIc1PAf66VA8KOtsuy3+ScStG20= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0 h1:/0YaXu3755A/cFbtXp+21lkXgI0QE5avTWA2HjU9/WE= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0/go.mod h1:m7SFxp0/7IxmJPLIY3JhOcU9CoFzDaCPL6xxQIxhA+o= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -127,20 +127,20 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -149,16 +149,14 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 h1:P8OJ/WCl/Xo4E4zoe4/bifHpSmmKwARqyqE4nW6J2GQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/receiver/otlpreceiver/internal/logs/otlp_test.go b/receiver/otlpreceiver/internal/logs/otlp_test.go index cc87f527681..645be7e946e 100644 --- a/receiver/otlpreceiver/internal/logs/otlp_test.go +++ b/receiver/otlpreceiver/internal/logs/otlp_test.go @@ -74,7 +74,7 @@ func TestExport_PermanentErrorConsumer(t *testing.T) { func makeLogsServiceClient(t *testing.T, lc consumer.Logs) plogotlp.GRPCClient { addr := otlpReceiverOnGRPCServer(t, lc) - cc, err := grpc.NewClient(addr.String(), grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) + cc, err := grpc.NewClient(addr.String(), grpc.WithTransportCredentials(insecure.NewCredentials())) require.NoError(t, err, "Failed to create the TraceServiceClient: %v", err) t.Cleanup(func() { require.NoError(t, cc.Close()) diff --git a/receiver/otlpreceiver/internal/metadata/generated_telemetry.go b/receiver/otlpreceiver/internal/metadata/generated_telemetry.go deleted file mode 100644 index 6115bffcf56..00000000000 --- a/receiver/otlpreceiver/internal/metadata/generated_telemetry.go +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" - - "go.opentelemetry.io/collector/component" -) - -func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter("go.opentelemetry.io/collector/receiver/otlpreceiver") -} - -func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/receiver/otlpreceiver") -} diff --git a/receiver/otlpreceiver/internal/metadata/generated_telemetry_test.go b/receiver/otlpreceiver/internal/metadata/generated_telemetry_test.go deleted file mode 100644 index 155056b256a..00000000000 --- a/receiver/otlpreceiver/internal/metadata/generated_telemetry_test.go +++ /dev/null @@ -1,63 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "testing" - - "github.com/stretchr/testify/require" - "go.opentelemetry.io/otel/metric" - embeddedmetric "go.opentelemetry.io/otel/metric/embedded" - noopmetric "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" - embeddedtrace "go.opentelemetry.io/otel/trace/embedded" - nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" -) - -type mockMeter struct { - noopmetric.Meter - name string -} -type mockMeterProvider struct { - embeddedmetric.MeterProvider -} - -func (m mockMeterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter { - return mockMeter{name: name} -} - -type mockTracer struct { - nooptrace.Tracer - name string -} - -type mockTracerProvider struct { - embeddedtrace.TracerProvider -} - -func (m mockTracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { - return mockTracer{name: name} -} - -func TestProviders(t *testing.T) { - set := component.TelemetrySettings{ - MeterProvider: mockMeterProvider{}, - TracerProvider: mockTracerProvider{}, - } - - meter := Meter(set) - if m, ok := meter.(mockMeter); ok { - require.Equal(t, "go.opentelemetry.io/collector/receiver/otlpreceiver", m.name) - } else { - require.Fail(t, "returned Meter not mockMeter") - } - - tracer := Tracer(set) - if m, ok := tracer.(mockTracer); ok { - require.Equal(t, "go.opentelemetry.io/collector/receiver/otlpreceiver", m.name) - } else { - require.Fail(t, "returned Meter not mockTracer") - } -} diff --git a/receiver/otlpreceiver/internal/metrics/otlp_test.go b/receiver/otlpreceiver/internal/metrics/otlp_test.go index accd6102e27..3a87b34b724 100644 --- a/receiver/otlpreceiver/internal/metrics/otlp_test.go +++ b/receiver/otlpreceiver/internal/metrics/otlp_test.go @@ -75,7 +75,7 @@ func TestExport_PermanentErrorConsumer(t *testing.T) { func makeMetricsServiceClient(t *testing.T, mc consumer.Metrics) pmetricotlp.GRPCClient { addr := otlpReceiverOnGRPCServer(t, mc) - cc, err := grpc.NewClient(addr.String(), grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) + cc, err := grpc.NewClient(addr.String(), grpc.WithTransportCredentials(insecure.NewCredentials())) require.NoError(t, err, "Failed to create the MetricsServiceClient: %v", err) t.Cleanup(func() { require.NoError(t, cc.Close()) diff --git a/receiver/otlpreceiver/internal/trace/otlp_test.go b/receiver/otlpreceiver/internal/trace/otlp_test.go index f0dab89069d..ab538923729 100644 --- a/receiver/otlpreceiver/internal/trace/otlp_test.go +++ b/receiver/otlpreceiver/internal/trace/otlp_test.go @@ -71,7 +71,7 @@ func TestExport_PermanentErrorConsumer(t *testing.T) { func makeTraceServiceClient(t *testing.T, tc consumer.Traces) ptraceotlp.GRPCClient { addr := otlpReceiverOnGRPCServer(t, tc) - cc, err := grpc.NewClient(addr.String(), grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) + cc, err := grpc.NewClient(addr.String(), grpc.WithTransportCredentials(insecure.NewCredentials())) require.NoError(t, err, "Failed to create the TraceServiceClient: %v", err) t.Cleanup(func() { require.NoError(t, cc.Close()) diff --git a/receiver/otlpreceiver/otlp_test.go b/receiver/otlpreceiver/otlp_test.go index 1920ac8de91..14eecbcdac1 100644 --- a/receiver/otlpreceiver/otlp_test.go +++ b/receiver/otlpreceiver/otlp_test.go @@ -566,7 +566,7 @@ func TestOTLPReceiverGRPCTracesIngestTest(t *testing.T) { require.NoError(t, recv.Start(context.Background(), componenttest.NewNopHost())) t.Cleanup(func() { require.NoError(t, recv.Shutdown(context.Background())) }) - cc, err := grpc.NewClient(addr, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) + cc, err := grpc.NewClient(addr, grpc.WithTransportCredentials(insecure.NewCredentials())) require.NoError(t, err) defer func() { assert.NoError(t, cc.Close()) @@ -722,11 +722,12 @@ func TestGRPCMaxRecvSize(t *testing.T) { recv := newReceiver(t, componenttest.NewNopTelemetrySettings(), cfg, otlpReceiverID, sink) require.NoError(t, recv.Start(context.Background(), componenttest.NewNopHost())) - cc, err := grpc.NewClient(addr, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) + cc, err := grpc.NewClient(addr, grpc.WithTransportCredentials(insecure.NewCredentials())) require.NoError(t, err) td := testdata.GenerateTraces(50000) - require.Error(t, exportTraces(cc, td)) + err = exportTraces(cc, td) + require.Error(t, err) assert.NoError(t, cc.Close()) require.NoError(t, recv.Shutdown(context.Background())) @@ -735,7 +736,7 @@ func TestGRPCMaxRecvSize(t *testing.T) { require.NoError(t, recv.Start(context.Background(), componenttest.NewNopHost())) t.Cleanup(func() { require.NoError(t, recv.Shutdown(context.Background())) }) - cc, err = grpc.NewClient(addr, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) + cc, err = grpc.NewClient(addr, grpc.WithTransportCredentials(insecure.NewCredentials())) require.NoError(t, err) defer func() { assert.NoError(t, cc.Close()) @@ -1008,7 +1009,7 @@ func TestShutdown(t *testing.T) { require.NotNil(t, r) require.NoError(t, r.Start(context.Background(), componenttest.NewNopHost())) - conn, err := grpc.NewClient(endpointGrpc, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) + conn, err := grpc.NewClient(endpointGrpc, grpc.WithTransportCredentials(insecure.NewCredentials())) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, conn.Close()) @@ -1147,7 +1148,7 @@ func (esc *errOrSinkConsumer) ConsumeMetrics(ctx context.Context, md pmetric.Met return esc.MetricsSink.ConsumeMetrics(ctx, md) } -// ConsumeMetrics stores metrics to this sink. +// ConsumeLogs stores metrics to this sink. func (esc *errOrSinkConsumer) ConsumeLogs(ctx context.Context, ld plog.Logs) error { esc.mu.Lock() defer esc.mu.Unlock() diff --git a/receiver/receiverhelper/documentation.md b/receiver/receiverhelper/documentation.md new file mode 100644 index 00000000000..457a856618e --- /dev/null +++ b/receiver/receiverhelper/documentation.md @@ -0,0 +1,55 @@ +[comment]: <> (Code generated by mdatagen. DO NOT EDIT.) + +# receiverhelper + +## Internal Telemetry + +The following telemetry is emitted by this component. + +### receiver_accepted_log_records + +Number of log records successfully pushed into the pipeline. + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | + +### receiver_accepted_metric_points + +Number of metric points successfully pushed into the pipeline. + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | + +### receiver_accepted_spans + +Number of spans successfully pushed into the pipeline. + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | + +### receiver_refused_log_records + +Number of log records that could not be pushed into the pipeline. + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | + +### receiver_refused_metric_points + +Number of metric points that could not be pushed into the pipeline. + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | + +### receiver_refused_spans + +Number of spans that could not be pushed into the pipeline. + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | diff --git a/receiver/receiverhelper/generated_component_telemetry_test.go b/receiver/receiverhelper/generated_component_telemetry_test.go new file mode 100644 index 00000000000..41d3c0bf81f --- /dev/null +++ b/receiver/receiverhelper/generated_component_telemetry_test.go @@ -0,0 +1,76 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package receiverhelper + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/receiver" + "go.opentelemetry.io/collector/receiver/receivertest" +) + +type componentTestTelemetry struct { + reader *sdkmetric.ManualReader + meterProvider *sdkmetric.MeterProvider +} + +func (tt *componentTestTelemetry) NewCreateSettings() receiver.CreateSettings { + settings := receivertest.NewNopCreateSettings() + settings.MeterProvider = tt.meterProvider + settings.ID = component.NewID(component.MustNewType("receiverhelper")) + + return settings +} + +func setupTestTelemetry() componentTestTelemetry { + reader := sdkmetric.NewManualReader() + return componentTestTelemetry{ + reader: reader, + meterProvider: sdkmetric.NewMeterProvider(sdkmetric.WithReader(reader)), + } +} + +func (tt *componentTestTelemetry) assertMetrics(t *testing.T, expected []metricdata.Metrics) { + var md metricdata.ResourceMetrics + require.NoError(t, tt.reader.Collect(context.Background(), &md)) + // ensure all required metrics are present + for _, want := range expected { + got := tt.getMetric(want.Name, md) + metricdatatest.AssertEqual(t, want, got, metricdatatest.IgnoreTimestamp()) + } + + // ensure no additional metrics are emitted + require.Equal(t, len(expected), tt.len(md)) +} + +func (tt *componentTestTelemetry) getMetric(name string, got metricdata.ResourceMetrics) metricdata.Metrics { + for _, sm := range got.ScopeMetrics { + for _, m := range sm.Metrics { + if m.Name == name { + return m + } + } + } + + return metricdata.Metrics{} +} + +func (tt *componentTestTelemetry) len(got metricdata.ResourceMetrics) int { + metricsCount := 0 + for _, sm := range got.ScopeMetrics { + metricsCount += len(sm.Metrics) + } + + return metricsCount +} + +func (tt *componentTestTelemetry) Shutdown(ctx context.Context) error { + return tt.meterProvider.Shutdown(ctx) +} diff --git a/receiver/receiverhelper/package_test.go b/receiver/receiverhelper/generated_package_test.go similarity index 62% rename from receiver/receiverhelper/package_test.go rename to receiver/receiverhelper/generated_package_test.go index 7b9bf829fc9..3e71ceab063 100644 --- a/receiver/receiverhelper/package_test.go +++ b/receiver/receiverhelper/generated_package_test.go @@ -1,5 +1,4 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 +// Code generated by mdatagen. DO NOT EDIT. package receiverhelper diff --git a/receiver/receiverhelper/internal/metadata/generated_telemetry.go b/receiver/receiverhelper/internal/metadata/generated_telemetry.go new file mode 100644 index 00000000000..ee70b2e498f --- /dev/null +++ b/receiver/receiverhelper/internal/metadata/generated_telemetry.go @@ -0,0 +1,99 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "errors" + + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/metric/noop" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("go.opentelemetry.io/collector/receiver/receiverhelper") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/receiver/receiverhelper") +} + +// TelemetryBuilder provides an interface for components to report telemetry +// as defined in metadata and user config. +type TelemetryBuilder struct { + ReceiverAcceptedLogRecords metric.Int64Counter + ReceiverAcceptedMetricPoints metric.Int64Counter + ReceiverAcceptedSpans metric.Int64Counter + ReceiverRefusedLogRecords metric.Int64Counter + ReceiverRefusedMetricPoints metric.Int64Counter + ReceiverRefusedSpans metric.Int64Counter + level configtelemetry.Level +} + +// telemetryBuilderOption applies changes to default builder. +type telemetryBuilderOption func(*TelemetryBuilder) + +// WithLevel sets the current telemetry level for the component. +func WithLevel(lvl configtelemetry.Level) telemetryBuilderOption { + return func(builder *TelemetryBuilder) { + builder.level = lvl + } +} + +// NewTelemetryBuilder provides a struct with methods to update all internal telemetry +// for a component +func NewTelemetryBuilder(settings component.TelemetrySettings, options ...telemetryBuilderOption) (*TelemetryBuilder, error) { + builder := TelemetryBuilder{level: configtelemetry.LevelBasic} + for _, op := range options { + op(&builder) + } + var ( + err, errs error + meter metric.Meter + ) + if builder.level >= configtelemetry.LevelBasic { + meter = Meter(settings) + } else { + meter = noop.Meter{} + } + builder.ReceiverAcceptedLogRecords, err = meter.Int64Counter( + "receiver_accepted_log_records", + metric.WithDescription("Number of log records successfully pushed into the pipeline."), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + builder.ReceiverAcceptedMetricPoints, err = meter.Int64Counter( + "receiver_accepted_metric_points", + metric.WithDescription("Number of metric points successfully pushed into the pipeline."), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + builder.ReceiverAcceptedSpans, err = meter.Int64Counter( + "receiver_accepted_spans", + metric.WithDescription("Number of spans successfully pushed into the pipeline."), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + builder.ReceiverRefusedLogRecords, err = meter.Int64Counter( + "receiver_refused_log_records", + metric.WithDescription("Number of log records that could not be pushed into the pipeline."), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + builder.ReceiverRefusedMetricPoints, err = meter.Int64Counter( + "receiver_refused_metric_points", + metric.WithDescription("Number of metric points that could not be pushed into the pipeline."), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + builder.ReceiverRefusedSpans, err = meter.Int64Counter( + "receiver_refused_spans", + metric.WithDescription("Number of spans that could not be pushed into the pipeline."), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + return &builder, errs +} diff --git a/exporter/nopexporter/internal/metadata/generated_telemetry_test.go b/receiver/receiverhelper/internal/metadata/generated_telemetry_test.go similarity index 73% rename from exporter/nopexporter/internal/metadata/generated_telemetry_test.go rename to receiver/receiverhelper/internal/metadata/generated_telemetry_test.go index 13312b17e0d..65b40921527 100644 --- a/exporter/nopexporter/internal/metadata/generated_telemetry_test.go +++ b/receiver/receiverhelper/internal/metadata/generated_telemetry_test.go @@ -49,15 +49,28 @@ func TestProviders(t *testing.T) { meter := Meter(set) if m, ok := meter.(mockMeter); ok { - require.Equal(t, "go.opentelemetry.io/collector/exporter/nopexporter", m.name) + require.Equal(t, "go.opentelemetry.io/collector/receiver/receiverhelper", m.name) } else { require.Fail(t, "returned Meter not mockMeter") } tracer := Tracer(set) if m, ok := tracer.(mockTracer); ok { - require.Equal(t, "go.opentelemetry.io/collector/exporter/nopexporter", m.name) + require.Equal(t, "go.opentelemetry.io/collector/receiver/receiverhelper", m.name) } else { require.Fail(t, "returned Meter not mockTracer") } } + +func TestNewTelemetryBuilder(t *testing.T) { + set := component.TelemetrySettings{ + MeterProvider: mockMeterProvider{}, + TracerProvider: mockTracerProvider{}, + } + applied := false + _, err := NewTelemetryBuilder(set, func(b *TelemetryBuilder) { + applied = true + }) + require.NoError(t, err) + require.True(t, applied) +} diff --git a/receiver/receiverhelper/metadata.yaml b/receiver/receiverhelper/metadata.yaml new file mode 100644 index 00000000000..2897d549a70 --- /dev/null +++ b/receiver/receiverhelper/metadata.yaml @@ -0,0 +1,58 @@ +type: receiverhelper + +status: + class: receiver + not_component: true + stability: + beta: [traces, metrics, logs] + distributions: [core, contrib] + +telemetry: + metrics: + receiver_accepted_spans: + enabled: true + description: Number of spans successfully pushed into the pipeline. + unit: 1 + sum: + value_type: int + monotonic: true + + receiver_refused_spans: + enabled: true + description: Number of spans that could not be pushed into the pipeline. + unit: 1 + sum: + value_type: int + monotonic: true + + receiver_accepted_metric_points: + enabled: true + description: Number of metric points successfully pushed into the pipeline. + unit: 1 + sum: + value_type: int + monotonic: true + + receiver_refused_metric_points: + enabled: true + description: Number of metric points that could not be pushed into the pipeline. + unit: 1 + sum: + value_type: int + monotonic: true + + receiver_accepted_log_records: + enabled: true + description: Number of log records successfully pushed into the pipeline. + unit: 1 + sum: + value_type: int + monotonic: true + + receiver_refused_log_records: + enabled: true + description: Number of log records that could not be pushed into the pipeline. + unit: 1 + sum: + value_type: int + monotonic: true \ No newline at end of file diff --git a/receiver/receiverhelper/obsreport.go b/receiver/receiverhelper/obsreport.go index ae1422b68f1..18ff7556454 100644 --- a/receiver/receiverhelper/obsreport.go +++ b/receiver/receiverhelper/obsreport.go @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +//go:generate mdatagen metadata.yaml + package receiverhelper // import "go.opentelemetry.io/collector/receiver/receiverhelper" import ( @@ -10,17 +12,13 @@ import ( "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/trace" - "go.uber.org/multierr" "go.uber.org/zap" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" "go.opentelemetry.io/collector/receiver" -) - -const ( - receiverScope = obsmetrics.Scope + obsmetrics.SpanNameSep + obsmetrics.ReceiverKey + "go.opentelemetry.io/collector/receiver/receiverhelper/internal/metadata" ) // ObsReport is a helper to add observability to a receiver. @@ -30,17 +28,10 @@ type ObsReport struct { transport string longLivedCtx bool tracer trace.Tracer - meter metric.Meter logger *zap.Logger - otelAttrs []attribute.KeyValue - - acceptedSpansCounter metric.Int64Counter - refusedSpansCounter metric.Int64Counter - acceptedMetricPointsCounter metric.Int64Counter - refusedMetricPointsCounter metric.Int64Counter - acceptedLogRecordsCounter metric.Int64Counter - refusedLogRecordsCounter metric.Int64Counter + otelAttrs []attribute.KeyValue + telemetryBuilder *metadata.TelemetryBuilder } // ObsReportSettings are settings for creating an ObsReport. @@ -62,74 +53,24 @@ func NewObsReport(cfg ObsReportSettings) (*ObsReport, error) { } func newReceiver(cfg ObsReportSettings) (*ObsReport, error) { - rec := &ObsReport{ + telemetryBuilder, err := metadata.NewTelemetryBuilder(cfg.ReceiverCreateSettings.TelemetrySettings) + if err != nil { + return nil, err + } + return &ObsReport{ level: cfg.ReceiverCreateSettings.TelemetrySettings.MetricsLevel, spanNamePrefix: obsmetrics.ReceiverPrefix + cfg.ReceiverID.String(), transport: cfg.Transport, longLivedCtx: cfg.LongLivedCtx, tracer: cfg.ReceiverCreateSettings.TracerProvider.Tracer(cfg.ReceiverID.String()), - meter: cfg.ReceiverCreateSettings.MeterProvider.Meter(receiverScope), logger: cfg.ReceiverCreateSettings.Logger, otelAttrs: []attribute.KeyValue{ attribute.String(obsmetrics.ReceiverKey, cfg.ReceiverID.String()), attribute.String(obsmetrics.TransportKey, cfg.Transport), }, - } - - if err := rec.createOtelMetrics(); err != nil { - return nil, err - } - - return rec, nil -} - -func (rec *ObsReport) createOtelMetrics() error { - var errors, err error - - rec.acceptedSpansCounter, err = rec.meter.Int64Counter( - obsmetrics.ReceiverMetricPrefix+obsmetrics.AcceptedSpansKey, - metric.WithDescription("Number of spans successfully pushed into the pipeline."), - metric.WithUnit("1"), - ) - errors = multierr.Append(errors, err) - - rec.refusedSpansCounter, err = rec.meter.Int64Counter( - obsmetrics.ReceiverMetricPrefix+obsmetrics.RefusedSpansKey, - metric.WithDescription("Number of spans that could not be pushed into the pipeline."), - metric.WithUnit("1"), - ) - errors = multierr.Append(errors, err) - - rec.acceptedMetricPointsCounter, err = rec.meter.Int64Counter( - obsmetrics.ReceiverMetricPrefix+obsmetrics.AcceptedMetricPointsKey, - metric.WithDescription("Number of metric points successfully pushed into the pipeline."), - metric.WithUnit("1"), - ) - errors = multierr.Append(errors, err) - - rec.refusedMetricPointsCounter, err = rec.meter.Int64Counter( - obsmetrics.ReceiverMetricPrefix+obsmetrics.RefusedMetricPointsKey, - metric.WithDescription("Number of metric points that could not be pushed into the pipeline."), - metric.WithUnit("1"), - ) - errors = multierr.Append(errors, err) - - rec.acceptedLogRecordsCounter, err = rec.meter.Int64Counter( - obsmetrics.ReceiverMetricPrefix+obsmetrics.AcceptedLogRecordsKey, - metric.WithDescription("Number of log records successfully pushed into the pipeline."), - metric.WithUnit("1"), - ) - errors = multierr.Append(errors, err) - - rec.refusedLogRecordsCounter, err = rec.meter.Int64Counter( - obsmetrics.ReceiverMetricPrefix+obsmetrics.RefusedLogRecordsKey, - metric.WithDescription("Number of log records that could not be pushed into the pipeline."), - metric.WithUnit("1"), - ) - errors = multierr.Append(errors, err) - - return errors + telemetryBuilder: telemetryBuilder, + }, nil } // StartTracesOp is called when a request is received from a client. @@ -263,14 +204,14 @@ func (rec *ObsReport) recordMetrics(receiverCtx context.Context, dataType compon var acceptedMeasure, refusedMeasure metric.Int64Counter switch dataType { case component.DataTypeTraces: - acceptedMeasure = rec.acceptedSpansCounter - refusedMeasure = rec.refusedSpansCounter + acceptedMeasure = rec.telemetryBuilder.ReceiverAcceptedSpans + refusedMeasure = rec.telemetryBuilder.ReceiverRefusedSpans case component.DataTypeMetrics: - acceptedMeasure = rec.acceptedMetricPointsCounter - refusedMeasure = rec.refusedMetricPointsCounter + acceptedMeasure = rec.telemetryBuilder.ReceiverAcceptedMetricPoints + refusedMeasure = rec.telemetryBuilder.ReceiverRefusedMetricPoints case component.DataTypeLogs: - acceptedMeasure = rec.acceptedLogRecordsCounter - refusedMeasure = rec.refusedLogRecordsCounter + acceptedMeasure = rec.telemetryBuilder.ReceiverAcceptedLogRecords + refusedMeasure = rec.telemetryBuilder.ReceiverRefusedLogRecords } acceptedMeasure.Add(receiverCtx, int64(numAccepted), metric.WithAttributes(rec.otelAttrs...)) diff --git a/receiver/receiverhelper/obsreport_test.go b/receiver/receiverhelper/obsreport_test.go index 3a417e176aa..b6d52f9bed0 100644 --- a/receiver/receiverhelper/obsreport_test.go +++ b/receiver/receiverhelper/obsreport_test.go @@ -297,11 +297,9 @@ func TestCheckReceiverLogsViews(t *testing.T) { } func testTelemetry(t *testing.T, id component.ID, testFunc func(t *testing.T, tt componenttest.TestTelemetry)) { - t.Run("WithOTel", func(t *testing.T) { - tt, err := componenttest.SetupTelemetry(id) - require.NoError(t, err) - t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) + tt, err := componenttest.SetupTelemetry(id) + require.NoError(t, err) + t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - testFunc(t, tt) - }) + testFunc(t, tt) } diff --git a/receiver/scraperhelper/doc.go b/receiver/scraperhelper/doc.go index f936c187381..a1e5cb26f1d 100644 --- a/receiver/scraperhelper/doc.go +++ b/receiver/scraperhelper/doc.go @@ -1,5 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +//go:generate mdatagen metadata.yaml + // Package scraperhelper provides utilities for scrapers. package scraperhelper // import "go.opentelemetry.io/collector/receiver/scraperhelper" diff --git a/receiver/scraperhelper/documentation.md b/receiver/scraperhelper/documentation.md new file mode 100644 index 00000000000..b3f2ae00b94 --- /dev/null +++ b/receiver/scraperhelper/documentation.md @@ -0,0 +1,23 @@ +[comment]: <> (Code generated by mdatagen. DO NOT EDIT.) + +# scraperhelper + +## Internal Telemetry + +The following telemetry is emitted by this component. + +### scraper_errored_metric_points + +Number of metric points that were unable to be scraped. + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | + +### scraper_scraped_metric_points + +Number of metric points successfully scraped. + +| Unit | Metric Type | Value Type | Monotonic | +| ---- | ----------- | ---------- | --------- | +| 1 | Sum | Int | true | diff --git a/receiver/scraperhelper/generated_component_telemetry_test.go b/receiver/scraperhelper/generated_component_telemetry_test.go new file mode 100644 index 00000000000..7eeed50b953 --- /dev/null +++ b/receiver/scraperhelper/generated_component_telemetry_test.go @@ -0,0 +1,76 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package scraperhelper + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/receiver" + "go.opentelemetry.io/collector/receiver/receivertest" +) + +type componentTestTelemetry struct { + reader *sdkmetric.ManualReader + meterProvider *sdkmetric.MeterProvider +} + +func (tt *componentTestTelemetry) NewCreateSettings() receiver.CreateSettings { + settings := receivertest.NewNopCreateSettings() + settings.MeterProvider = tt.meterProvider + settings.ID = component.NewID(component.MustNewType("scraperhelper")) + + return settings +} + +func setupTestTelemetry() componentTestTelemetry { + reader := sdkmetric.NewManualReader() + return componentTestTelemetry{ + reader: reader, + meterProvider: sdkmetric.NewMeterProvider(sdkmetric.WithReader(reader)), + } +} + +func (tt *componentTestTelemetry) assertMetrics(t *testing.T, expected []metricdata.Metrics) { + var md metricdata.ResourceMetrics + require.NoError(t, tt.reader.Collect(context.Background(), &md)) + // ensure all required metrics are present + for _, want := range expected { + got := tt.getMetric(want.Name, md) + metricdatatest.AssertEqual(t, want, got, metricdatatest.IgnoreTimestamp()) + } + + // ensure no additional metrics are emitted + require.Equal(t, len(expected), tt.len(md)) +} + +func (tt *componentTestTelemetry) getMetric(name string, got metricdata.ResourceMetrics) metricdata.Metrics { + for _, sm := range got.ScopeMetrics { + for _, m := range sm.Metrics { + if m.Name == name { + return m + } + } + } + + return metricdata.Metrics{} +} + +func (tt *componentTestTelemetry) len(got metricdata.ResourceMetrics) int { + metricsCount := 0 + for _, sm := range got.ScopeMetrics { + metricsCount += len(sm.Metrics) + } + + return metricsCount +} + +func (tt *componentTestTelemetry) Shutdown(ctx context.Context) error { + return tt.meterProvider.Shutdown(ctx) +} diff --git a/receiver/scraperhelper/package_test.go b/receiver/scraperhelper/generated_package_test.go similarity index 62% rename from receiver/scraperhelper/package_test.go rename to receiver/scraperhelper/generated_package_test.go index a9a536a78d9..b88f94c44a0 100644 --- a/receiver/scraperhelper/package_test.go +++ b/receiver/scraperhelper/generated_package_test.go @@ -1,5 +1,4 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 +// Code generated by mdatagen. DO NOT EDIT. package scraperhelper diff --git a/receiver/scraperhelper/internal/metadata/generated_telemetry.go b/receiver/scraperhelper/internal/metadata/generated_telemetry.go new file mode 100644 index 00000000000..e8835809d4b --- /dev/null +++ b/receiver/scraperhelper/internal/metadata/generated_telemetry.go @@ -0,0 +1,71 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "errors" + + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/metric/noop" + "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" +) + +func Meter(settings component.TelemetrySettings) metric.Meter { + return settings.MeterProvider.Meter("go.opentelemetry.io/collector/receiver/scraperhelper") +} + +func Tracer(settings component.TelemetrySettings) trace.Tracer { + return settings.TracerProvider.Tracer("go.opentelemetry.io/collector/receiver/scraperhelper") +} + +// TelemetryBuilder provides an interface for components to report telemetry +// as defined in metadata and user config. +type TelemetryBuilder struct { + ScraperErroredMetricPoints metric.Int64Counter + ScraperScrapedMetricPoints metric.Int64Counter + level configtelemetry.Level +} + +// telemetryBuilderOption applies changes to default builder. +type telemetryBuilderOption func(*TelemetryBuilder) + +// WithLevel sets the current telemetry level for the component. +func WithLevel(lvl configtelemetry.Level) telemetryBuilderOption { + return func(builder *TelemetryBuilder) { + builder.level = lvl + } +} + +// NewTelemetryBuilder provides a struct with methods to update all internal telemetry +// for a component +func NewTelemetryBuilder(settings component.TelemetrySettings, options ...telemetryBuilderOption) (*TelemetryBuilder, error) { + builder := TelemetryBuilder{level: configtelemetry.LevelBasic} + for _, op := range options { + op(&builder) + } + var ( + err, errs error + meter metric.Meter + ) + if builder.level >= configtelemetry.LevelBasic { + meter = Meter(settings) + } else { + meter = noop.Meter{} + } + builder.ScraperErroredMetricPoints, err = meter.Int64Counter( + "scraper_errored_metric_points", + metric.WithDescription("Number of metric points that were unable to be scraped."), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + builder.ScraperScrapedMetricPoints, err = meter.Int64Counter( + "scraper_scraped_metric_points", + metric.WithDescription("Number of metric points successfully scraped."), + metric.WithUnit("1"), + ) + errs = errors.Join(errs, err) + return &builder, errs +} diff --git a/exporter/debugexporter/internal/metadata/generated_telemetry_test.go b/receiver/scraperhelper/internal/metadata/generated_telemetry_test.go similarity index 73% rename from exporter/debugexporter/internal/metadata/generated_telemetry_test.go rename to receiver/scraperhelper/internal/metadata/generated_telemetry_test.go index ed6c580e677..4973ec82ec9 100644 --- a/exporter/debugexporter/internal/metadata/generated_telemetry_test.go +++ b/receiver/scraperhelper/internal/metadata/generated_telemetry_test.go @@ -49,15 +49,28 @@ func TestProviders(t *testing.T) { meter := Meter(set) if m, ok := meter.(mockMeter); ok { - require.Equal(t, "go.opentelemetry.io/collector/exporter/debugexporter", m.name) + require.Equal(t, "go.opentelemetry.io/collector/receiver/scraperhelper", m.name) } else { require.Fail(t, "returned Meter not mockMeter") } tracer := Tracer(set) if m, ok := tracer.(mockTracer); ok { - require.Equal(t, "go.opentelemetry.io/collector/exporter/debugexporter", m.name) + require.Equal(t, "go.opentelemetry.io/collector/receiver/scraperhelper", m.name) } else { require.Fail(t, "returned Meter not mockTracer") } } + +func TestNewTelemetryBuilder(t *testing.T) { + set := component.TelemetrySettings{ + MeterProvider: mockMeterProvider{}, + TracerProvider: mockTracerProvider{}, + } + applied := false + _, err := NewTelemetryBuilder(set, func(b *TelemetryBuilder) { + applied = true + }) + require.NoError(t, err) + require.True(t, applied) +} diff --git a/receiver/scraperhelper/metadata.yaml b/receiver/scraperhelper/metadata.yaml new file mode 100644 index 00000000000..33a1080e7dd --- /dev/null +++ b/receiver/scraperhelper/metadata.yaml @@ -0,0 +1,26 @@ +type: scraperhelper + +status: + class: receiver + not_component: true + stability: + beta: [traces, metrics, logs] + distributions: [core, contrib] + +telemetry: + metrics: + scraper_scraped_metric_points: + enabled: true + description: Number of metric points successfully scraped. + unit: 1 + sum: + value_type: int + monotonic: true + + scraper_errored_metric_points: + enabled: true + description: Number of metric points that were unable to be scraped. + unit: 1 + sum: + value_type: int + monotonic: true \ No newline at end of file diff --git a/receiver/scraperhelper/obsreport.go b/receiver/scraperhelper/obsreport.go index 89ad80fdc08..9c10f7002a8 100644 --- a/receiver/scraperhelper/obsreport.go +++ b/receiver/scraperhelper/obsreport.go @@ -11,7 +11,6 @@ import ( "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/trace" - "go.uber.org/multierr" "go.uber.org/zap" "go.opentelemetry.io/collector/component" @@ -19,10 +18,7 @@ import ( "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" "go.opentelemetry.io/collector/receiver" "go.opentelemetry.io/collector/receiver/scrapererror" -) - -var ( - scraperScope = obsmetrics.Scope + obsmetrics.SpanNameSep + obsmetrics.ScraperKey + "go.opentelemetry.io/collector/receiver/scraperhelper/internal/metadata" ) // ObsReport is a helper to add observability to a scraper. @@ -34,9 +30,8 @@ type ObsReport struct { logger *zap.Logger - otelAttrs []attribute.KeyValue - scrapedMetricsPoints metric.Int64Counter - erroredMetricsPoints metric.Int64Counter + otelAttrs []attribute.KeyValue + telemetryBuilder *metadata.TelemetryBuilder } // ObsReportSettings are settings for creating an ObsReport. @@ -52,7 +47,11 @@ func NewObsReport(cfg ObsReportSettings) (*ObsReport, error) { } func newScraper(cfg ObsReportSettings) (*ObsReport, error) { - scraper := &ObsReport{ + telemetryBuilder, err := metadata.NewTelemetryBuilder(cfg.ReceiverCreateSettings.TelemetrySettings) + if err != nil { + return nil, err + } + return &ObsReport{ level: cfg.ReceiverCreateSettings.TelemetrySettings.MetricsLevel, receiverID: cfg.ReceiverID, scraper: cfg.Scraper, @@ -63,35 +62,8 @@ func newScraper(cfg ObsReportSettings) (*ObsReport, error) { attribute.String(obsmetrics.ReceiverKey, cfg.ReceiverID.String()), attribute.String(obsmetrics.ScraperKey, cfg.Scraper.String()), }, - } - - if err := scraper.createOtelMetrics(cfg); err != nil { - return nil, err - } - - return scraper, nil -} - -func (s *ObsReport) createOtelMetrics(cfg ObsReportSettings) error { - meter := cfg.ReceiverCreateSettings.MeterProvider.Meter(scraperScope) - - var errors, err error - - s.scrapedMetricsPoints, err = meter.Int64Counter( - obsmetrics.ScraperPrefix+obsmetrics.ScrapedMetricPointsKey, - metric.WithDescription("Number of metric points successfully scraped."), - metric.WithUnit("1"), - ) - errors = multierr.Append(errors, err) - - s.erroredMetricsPoints, err = meter.Int64Counter( - obsmetrics.ScraperPrefix+obsmetrics.ErroredMetricPointsKey, - metric.WithDescription("Number of metric points that were unable to be scraped."), - metric.WithUnit("1"), - ) - errors = multierr.Append(errors, err) - - return errors + telemetryBuilder: telemetryBuilder, + }, nil } // StartMetricsOp is called when a scrape operation is started. The @@ -144,6 +116,6 @@ func (s *ObsReport) EndMetricsOp( } func (s *ObsReport) recordMetrics(scraperCtx context.Context, numScrapedMetrics, numErroredMetrics int) { - s.scrapedMetricsPoints.Add(scraperCtx, int64(numScrapedMetrics), metric.WithAttributes(s.otelAttrs...)) - s.erroredMetricsPoints.Add(scraperCtx, int64(numErroredMetrics), metric.WithAttributes(s.otelAttrs...)) + s.telemetryBuilder.ScraperScrapedMetricPoints.Add(scraperCtx, int64(numScrapedMetrics), metric.WithAttributes(s.otelAttrs...)) + s.telemetryBuilder.ScraperErroredMetricPoints.Add(scraperCtx, int64(numErroredMetrics), metric.WithAttributes(s.otelAttrs...)) } diff --git a/receiver/scraperhelper/obsreport_test.go b/receiver/scraperhelper/obsreport_test.go index 6ccbc8041cd..5e807962f0d 100644 --- a/receiver/scraperhelper/obsreport_test.go +++ b/receiver/scraperhelper/obsreport_test.go @@ -112,11 +112,9 @@ func TestCheckScraperMetricsViews(t *testing.T) { } func testTelemetry(t *testing.T, id component.ID, testFunc func(t *testing.T, tt componenttest.TestTelemetry)) { - t.Run("WithOTel", func(t *testing.T) { - tt, err := componenttest.SetupTelemetry(id) - require.NoError(t, err) - t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) + tt, err := componenttest.SetupTelemetry(id) + require.NoError(t, err) + t.Cleanup(func() { require.NoError(t, tt.Shutdown(context.Background())) }) - testFunc(t, tt) - }) + testFunc(t, tt) } diff --git a/renovate.json b/renovate.json index bcbc26dd133..46774c4aeec 100644 --- a/renovate.json +++ b/renovate.json @@ -52,9 +52,14 @@ }, { "matchManagers": ["gomod"], - "matchSourceUrlPrefixes": ["https://golang.org/x"], + "matchPackagePrefixes": ["golang.org/x"], "groupName": "All golang.org/x packages" }, + { + "matchManagers": ["gomod"], + "matchPackagePrefixes": ["go.opentelemetry.io/collector"], + "groupName": "All go.opentelemetry.io/collector packages" + }, { "matchManagers": ["gomod"], "matchSourceUrlPrefixes": ["https://go.opentelemetry.io/build-tools"], diff --git a/semconv/go.mod b/semconv/go.mod index ca3f2b7da1a..09c3f5a8d6d 100644 --- a/semconv/go.mod +++ b/semconv/go.mod @@ -1,9 +1,9 @@ module go.opentelemetry.io/collector/semconv -go 1.21 +go 1.21.0 require ( - github.com/hashicorp/go-version v1.6.0 + github.com/hashicorp/go-version v1.7.0 github.com/stretchr/testify v1.9.0 go.uber.org/goleak v1.3.0 ) diff --git a/semconv/go.sum b/semconv/go.sum index 180ea53240d..29f98ec389f 100644 --- a/semconv/go.sum +++ b/semconv/go.sum @@ -1,8 +1,8 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 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/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= diff --git a/service/go.mod b/service/go.mod index 3e31d3b760b..ce8f2e4673a 100644 --- a/service/go.mod +++ b/service/go.mod @@ -1,43 +1,43 @@ module go.opentelemetry.io/collector/service -go 1.21 +go 1.21.0 require ( github.com/google/uuid v1.6.0 - github.com/prometheus/client_golang v1.19.0 + github.com/prometheus/client_golang v1.19.1 github.com/prometheus/client_model v0.6.1 github.com/prometheus/common v0.53.0 - github.com/shirou/gopsutil/v3 v3.24.3 + github.com/shirou/gopsutil/v3 v3.24.4 github.com/stretchr/testify v1.9.0 go.opencensus.io v0.24.0 - go.opentelemetry.io/collector v0.100.0 - go.opentelemetry.io/collector/component v0.100.0 - go.opentelemetry.io/collector/config/confignet v0.100.0 - go.opentelemetry.io/collector/config/configtelemetry v0.100.0 - go.opentelemetry.io/collector/confmap v0.100.0 - go.opentelemetry.io/collector/connector v0.100.0 - go.opentelemetry.io/collector/consumer v0.100.0 - go.opentelemetry.io/collector/exporter v0.100.0 - go.opentelemetry.io/collector/extension v0.100.0 - go.opentelemetry.io/collector/extension/zpagesextension v0.100.0 - go.opentelemetry.io/collector/featuregate v1.7.0 - go.opentelemetry.io/collector/pdata v1.7.0 - go.opentelemetry.io/collector/pdata/testdata v0.100.0 - go.opentelemetry.io/collector/processor v0.100.0 - go.opentelemetry.io/collector/receiver v0.100.0 - go.opentelemetry.io/collector/semconv v0.100.0 - go.opentelemetry.io/contrib/config v0.6.0 - go.opentelemetry.io/contrib/propagators/b3 v1.26.0 - go.opentelemetry.io/otel v1.26.0 - go.opentelemetry.io/otel/bridge/opencensus v1.26.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 - go.opentelemetry.io/otel/exporters/prometheus v0.48.0 - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 - go.opentelemetry.io/otel/metric v1.26.0 - go.opentelemetry.io/otel/sdk v1.26.0 - go.opentelemetry.io/otel/sdk/metric v1.26.0 - go.opentelemetry.io/otel/trace v1.26.0 + go.opentelemetry.io/collector v0.102.1 + go.opentelemetry.io/collector/component v0.102.1 + go.opentelemetry.io/collector/config/confignet v0.102.1 + go.opentelemetry.io/collector/config/configtelemetry v0.102.1 + go.opentelemetry.io/collector/confmap v0.102.1 + go.opentelemetry.io/collector/connector v0.102.1 + go.opentelemetry.io/collector/consumer v0.102.1 + go.opentelemetry.io/collector/exporter v0.102.1 + go.opentelemetry.io/collector/extension v0.102.1 + go.opentelemetry.io/collector/extension/zpagesextension v0.102.1 + go.opentelemetry.io/collector/featuregate v1.9.0 + go.opentelemetry.io/collector/pdata v1.9.0 + go.opentelemetry.io/collector/pdata/testdata v0.102.1 + go.opentelemetry.io/collector/processor v0.102.1 + go.opentelemetry.io/collector/receiver v0.102.1 + go.opentelemetry.io/collector/semconv v0.102.1 + go.opentelemetry.io/contrib/config v0.7.0 + go.opentelemetry.io/contrib/propagators/b3 v1.27.0 + go.opentelemetry.io/otel v1.27.0 + go.opentelemetry.io/otel/bridge/opencensus v1.27.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0 + go.opentelemetry.io/otel/metric v1.27.0 + go.opentelemetry.io/otel/sdk v1.27.0 + go.opentelemetry.io/otel/sdk/metric v1.27.0 + go.opentelemetry.io/otel/trace v1.27.0 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 @@ -47,7 +47,7 @@ require ( require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -55,8 +55,8 @@ require ( github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect + github.com/hashicorp/go-version v1.7.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect @@ -68,24 +68,24 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.opentelemetry.io/contrib/zpages v0.51.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 // indirect + go.opentelemetry.io/contrib/zpages v0.52.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0 // indirect go.opentelemetry.io/proto/otlp v1.2.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.34.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/service/go.sum b/service/go.sum index db17fdf1402..6c7bface428 100644 --- a/service/go.sum +++ b/service/go.sum @@ -5,8 +5,8 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -55,10 +55,10 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -88,19 +88,19 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= -github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= -github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/shirou/gopsutil/v3 v3.24.4 h1:dEHgzZXt4LMNm+oYELpzl9YCqV65Yr/6SfrvgRBtXeU= +github.com/shirou/gopsutil/v3 v3.24.4/go.mod h1:lTd2mdiOspcqLgAnr9/nGi71NkeMpWKdmhuxm9GusH8= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= @@ -126,40 +126,40 @@ github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/config v0.6.0 h1:M1SRD1Z15XHPGk61tMLI1up77XT5FdrqQSRrlH0fYuk= -go.opentelemetry.io/contrib/config v0.6.0/go.mod h1:t+/kzmRWLN7J+4F/dD4fFvlYCmCO63WYwy/B00IC++c= -go.opentelemetry.io/contrib/propagators/b3 v1.26.0 h1:wgFbVA+bK2k+fGVfDOCOG4cfDAoppyr5sI2dVlh8MWM= -go.opentelemetry.io/contrib/propagators/b3 v1.26.0/go.mod h1:DDktFXxA+fyItAAM0Sbl5OBH7KOsCTjvbBdPKtoIf/k= -go.opentelemetry.io/contrib/zpages v0.51.0 h1:psVr4JTWd0qtISPj9EA6AODGJ09bvsOxWiuKqiGdSCA= -go.opentelemetry.io/contrib/zpages v0.51.0/go.mod h1:PKtp+NEp1gTTLmFHpynYgYCSkKtisPntOb9S1mQjFKg= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/bridge/opencensus v1.26.0 h1:DZzxj9QjznMVoehskOJnFP2gsTCWtDTFBDvFhPAY7nc= -go.opentelemetry.io/otel/bridge/opencensus v1.26.0/go.mod h1:rJiX0KrF5m8Tm1XE8jLczpAv5zUaDcvhKecFG0ZoFG4= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 h1:+hm+I+KigBy3M24/h1p/NHkUx/evbLH0PNcjpMyCHc4= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0/go.mod h1:NjC8142mLvvNT6biDpaMjyz78kyEHIwAJlSX0N9P5KI= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0 h1:HGZWGmCVRCVyAs2GQaiHQPbDHo+ObFWeUEOd+zDnp64= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.26.0/go.mod h1:SaH+v38LSCHddyk7RGlU9uZyQoRrKao6IBnJw6Kbn+c= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 h1:1u/AyyOqAWzy+SkPxDpahCNZParHV8Vid1RnI2clyDE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0/go.mod h1:z46paqbJ9l7c9fIPCXTqTGwhQZ5XoTIsfeFYWboizjs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 h1:Waw9Wfpo/IXzOI8bCB7DIk+0JZcqqsyn1JFnAc+iam8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0/go.mod h1:wnJIG4fOqyynOnnQF/eQb4/16VlX2EJAHhHgqIqWfAo= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 h1:1wp/gyxsuYtuE/JFxsQRtcCDtMrO2qMvlfXALU5wkzI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0/go.mod h1:gbTHmghkGgqxMomVQQMur1Nba4M0MQ8AYThXDUjsJ38= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0 h1:sBQe3VNGUjY9IKWQC6z2lNqa5iGbDSxhs60ABwK4y0s= -go.opentelemetry.io/otel/exporters/prometheus v0.48.0/go.mod h1:DtrbMzoZWwQHyrQmCfLam5DZbnmorsGbOtTbYHycU5o= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0 h1:5fnmgteaar1VcAA69huatudPduNFz7guRtCmfZCooZI= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.26.0/go.mod h1:lsPccfZiz1cb1AhBPmicWM2E4F1VynFXEvD8SEBS4TM= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0 h1:0W5o9SzoR15ocYHEQfvfipzcNog1lBxOLfnex91Hk6s= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0/go.mod h1:zVZ8nz+VSggWmnh6tTsJqXQ7rU4xLwRtna1M4x5jq58= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.26.0 h1:cWSks5tfriHPdWFnl+qpX3P681aAYqlZHcAyHw5aU9Y= -go.opentelemetry.io/otel/sdk/metric v1.26.0/go.mod h1:ClMFFknnThJCksebJwz7KIyEDHO+nTB6gK8obLy8RyE= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/contrib/config v0.7.0 h1:b1rK5tGTuhhPirJiMxOcyQfZs76j2VapY6ODn3b2Dbs= +go.opentelemetry.io/contrib/config v0.7.0/go.mod h1:8tdiFd8N5etOi3XzBmAoMxplEzI3TcL8dU5rM5/xcOQ= +go.opentelemetry.io/contrib/propagators/b3 v1.27.0 h1:IjgxbomVrV9za6bRi8fWCNXENs0co37SZedQilP2hm0= +go.opentelemetry.io/contrib/propagators/b3 v1.27.0/go.mod h1:Dv9obQz25lCisDvvs4dy28UPh974CxkahRDUPsY7y9E= +go.opentelemetry.io/contrib/zpages v0.52.0 h1:MPgkMy0Cp3O5EdfVXP0ss3ujhEibysTM4eszx7E7d+E= +go.opentelemetry.io/contrib/zpages v0.52.0/go.mod h1:fqG5AFdoYru3A3DnhibVuaaEfQV2WKxE7fYE1jgDRwk= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/bridge/opencensus v1.27.0 h1:ao9aGGHd+G4YfjBpGs6vbkvt5hoC67STlJA9fCnOAcs= +go.opentelemetry.io/otel/bridge/opencensus v1.27.0/go.mod h1:uRvWtAAXzyVOST0WMPX5JHGBaAvBws+2F8PcC5gMnTk= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 h1:QY7/0NeRPKlzusf40ZE4t1VlMKbqSNT7cJRYzWuja0s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0/go.mod h1:HVkSiDhTM9BoUJU8qE6j2eSWLLXvi1USXjyd2BXT8PY= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0 h1:/jlt1Y8gXWiHG9FBx6cJaIC5hYx5Fe64nC8w5Cylt/0= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0/go.mod h1:bmToOGOBZ4hA9ghphIc1PAf66VA8KOtsuy3+ScStG20= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0 h1:/0YaXu3755A/cFbtXp+21lkXgI0QE5avTWA2HjU9/WE= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0/go.mod h1:m7SFxp0/7IxmJPLIY3JhOcU9CoFzDaCPL6xxQIxhA+o= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -188,8 +188,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -204,13 +204,13 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -230,19 +230,17 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 h1:P8OJ/WCl/Xo4E4zoe4/bifHpSmmKwARqyqE4nW6J2GQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -252,8 +250,8 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= diff --git a/service/internal/graph/graph.go b/service/internal/graph/graph.go index 525c269a6de..c95d1f54b7e 100644 --- a/service/internal/graph/graph.go +++ b/service/internal/graph/graph.go @@ -1,6 +1,15 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +// Package graph contains the internal graph representation of the pipelines. +// +// [Build] is the constructor for a [Graph] object. The method calls out to helpers that transform the graph from a config +// to a DAG of components. The configuration undergoes additional validation here as well, and is used to instantiate +// the components of the pipeline. +// +// [Graph.StartAll] starts all components in each pipeline. +// +// [Graph.ShutdownAll] stops all components in each pipeline. package graph // import "go.opentelemetry.io/collector/service/internal/graph" import ( diff --git a/service/internal/graph/graph_test.go b/service/internal/graph/graph_test.go index eddd3098153..343f752b888 100644 --- a/service/internal/graph/graph_test.go +++ b/service/internal/graph/graph_test.go @@ -34,7 +34,7 @@ import ( "go.opentelemetry.io/collector/service/pipelines" ) -var _ component.Component = &testNode{} +var _ component.Component = (*testNode)(nil) type testNode struct { id component.ID diff --git a/service/internal/graph/nodes.go b/service/internal/graph/nodes.go index 13726d1c760..238bbf3b287 100644 --- a/service/internal/graph/nodes.go +++ b/service/internal/graph/nodes.go @@ -104,7 +104,7 @@ func (n *receiverNode) buildComponent(ctx context.Context, return nil } -var _ consumerNode = &processorNode{} +var _ consumerNode = (*processorNode)(nil) // Every processor instance is unique to one pipeline. // Therefore, nodeID is derived from "pipeline ID" and "component ID". @@ -152,7 +152,7 @@ func (n *processorNode) buildComponent(ctx context.Context, return nil } -var _ consumerNode = &exporterNode{} +var _ consumerNode = (*exporterNode)(nil) // An exporter instance can be shared by multiple pipelines of the same type. // Therefore, nodeID is derived from "pipeline type" and "component ID". @@ -200,7 +200,7 @@ func (n *exporterNode) buildComponent( return nil } -var _ consumerNode = &connectorNode{} +var _ consumerNode = (*connectorNode)(nil) // A connector instance connects one pipeline type to one other pipeline type. // Therefore, nodeID is derived from "exporter pipeline type", "receiver pipeline type", and "component ID". @@ -347,7 +347,7 @@ func (n *connectorNode) buildComponent( return nil } -var _ consumerNode = &capabilitiesNode{} +var _ consumerNode = (*capabilitiesNode)(nil) // Every pipeline has a "virtual" capabilities node immediately after the receiver(s). // There are two purposes for this node: @@ -374,7 +374,7 @@ func (n *capabilitiesNode) getConsumer() baseConsumer { return n } -var _ consumerNode = &fanOutNode{} +var _ consumerNode = (*fanOutNode)(nil) // Each pipeline has one fan-out node before exporters. // Therefore, nodeID is derived from "pipeline ID". diff --git a/service/service.go b/service/service.go index 902454c78f1..53ea3eebe65 100644 --- a/service/service.go +++ b/service/service.go @@ -89,16 +89,27 @@ func New(ctx context.Context, set Settings, cfg Config) (*Service, error) { }, collectorConf: set.CollectorConf, } - tel, err := telemetry.New(ctx, telemetry.Settings{BuildInfo: set.BuildInfo, ZapOptions: set.LoggingOptions}, cfg.Telemetry) - if err != nil { - return nil, fmt.Errorf("failed to get logger: %w", err) - } // Fetch data for internal telemetry like instance id and sdk version to provide for internal telemetry. res := resource.New(set.BuildInfo, cfg.Telemetry.Resource) pcommonRes := pdataFromSdk(res) - logger := tel.Logger() + telFactory := telemetry.NewFactory() + telset := telemetry.Settings{ + BuildInfo: set.BuildInfo, + ZapOptions: set.LoggingOptions, + } + + logger, err := telFactory.CreateLogger(ctx, telset, &cfg.Telemetry) + if err != nil { + return nil, fmt.Errorf("failed to create logger: %w", err) + } + + tracerProvider, err := telFactory.CreateTracerProvider(ctx, telset, &cfg.Telemetry) + if err != nil { + return nil, fmt.Errorf("failed to create tracer provider: %w", err) + } + logger.Info("Setting up own telemetry...") mp, err := newMeterProvider( meterProviderSettings{ @@ -116,7 +127,7 @@ func New(ctx context.Context, set Settings, cfg Config) (*Service, error) { srv.telemetrySettings = servicetelemetry.TelemetrySettings{ Logger: logger, MeterProvider: mp, - TracerProvider: tel.TracerProvider(), + TracerProvider: tracerProvider, MetricsLevel: cfg.Telemetry.Metrics.Level, // Construct telemetry attributes from build info and config's resource attributes. Resource: pcommonRes, diff --git a/service/service_test.go b/service/service_test.go index c538dc0027e..f8c0ad4dc4f 100644 --- a/service/service_test.go +++ b/service/service_test.go @@ -320,9 +320,9 @@ func TestServiceTelemetryRestart(t *testing.T) { // check telemetry server to ensure we get a response var resp *http.Response - // #nosec G107 resp, err = http.Get(telemetryURL) assert.NoError(t, err) + assert.NoError(t, resp.Body.Close()) assert.Equal(t, http.StatusOK, resp.StatusCode) // Shutdown the service @@ -338,8 +338,8 @@ func TestServiceTelemetryRestart(t *testing.T) { // check telemetry server to ensure we get a response require.Eventually(t, func() bool { - // #nosec G107 resp, err = http.Get(telemetryURL) + assert.NoError(t, resp.Body.Close()) return err == nil }, 500*time.Millisecond, diff --git a/service/telemetry.go b/service/telemetry.go index 365ea3d23c5..c2a67c7f16f 100644 --- a/service/telemetry.go +++ b/service/telemetry.go @@ -9,11 +9,9 @@ import ( "net/http" "strconv" - ocmetric "go.opencensus.io/metric" - "go.opencensus.io/metric/metricproducer" "go.opentelemetry.io/contrib/config" "go.opentelemetry.io/otel/metric" - noopmetric "go.opentelemetry.io/otel/metric/noop" + "go.opentelemetry.io/otel/metric/noop" sdkmetric "go.opentelemetry.io/otel/sdk/metric" "go.opentelemetry.io/otel/sdk/resource" "go.uber.org/multierr" @@ -31,8 +29,7 @@ const ( type meterProvider struct { *sdkmetric.MeterProvider - ocRegistry *ocmetric.Registry - servers []*http.Server + servers []*http.Server } type meterProviderSettings struct { @@ -43,7 +40,7 @@ type meterProviderSettings struct { func newMeterProvider(set meterProviderSettings, disableHighCardinality bool) (metric.MeterProvider, error) { if set.cfg.Level == configtelemetry.LevelNone || (set.cfg.Address == "" && len(set.cfg.Readers) == 0) { - return noopmetric.NewMeterProvider(), nil + return noop.NewMeterProvider(), nil } if len(set.cfg.Address) != 0 { @@ -70,12 +67,8 @@ func newMeterProvider(set meterProviderSettings, disableHighCardinality bool) (m }) } - mp := &meterProvider{ - // Initialize the ocRegistry, still used by the process metrics. - ocRegistry: ocmetric.NewRegistry(), - } - metricproducer.GlobalManager().AddProducer(mp.ocRegistry) - opts := []sdkmetric.Option{} + mp := &meterProvider{} + var opts []sdkmetric.Option for _, reader := range set.cfg.Readers { // https://github.com/open-telemetry/opentelemetry-collector/issues/8045 r, server, err := proctelemetry.InitMetricReader(context.Background(), reader, set.asyncErrorChannel) @@ -111,8 +104,6 @@ func (mp *meterProvider) LogAboutServers(logger *zap.Logger, cfg telemetry.Metri // Shutdown the meter provider and all the associated resources. // The type signature of this method matches that of the sdkmetric.MeterProvider. func (mp *meterProvider) Shutdown(ctx context.Context) error { - metricproducer.GlobalManager().DeleteProducer(mp.ocRegistry) - var errs error for _, server := range mp.servers { if server != nil { diff --git a/service/telemetry/factory.go b/service/telemetry/factory.go new file mode 100644 index 00000000000..c236d3c5733 --- /dev/null +++ b/service/telemetry/factory.go @@ -0,0 +1,59 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package telemetry // import "go.opentelemetry.io/collector/service/telemetry" + +import ( + "context" + "time" + + "go.opentelemetry.io/otel/trace" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" + "go.opentelemetry.io/collector/service/telemetry/internal" +) + +func createDefaultConfig() component.Config { + return &Config{ + Logs: LogsConfig{ + Level: zapcore.InfoLevel, + Development: false, + Encoding: "console", + Sampling: &LogsSamplingConfig{ + Enabled: true, + Tick: 10 * time.Second, + Initial: 10, + Thereafter: 100, + }, + OutputPaths: []string{"stderr"}, + ErrorOutputPaths: []string{"stderr"}, + DisableCaller: false, + DisableStacktrace: false, + InitialFields: map[string]any(nil), + }, + Metrics: MetricsConfig{ + Level: configtelemetry.LevelNormal, + Address: ":8888", + }, + } +} + +// Factory is a telemetry factory. +type Factory = internal.Factory + +// NewFactory creates a new Factory. +func NewFactory() Factory { + return internal.NewFactory(createDefaultConfig, + internal.WithLogger(func(_ context.Context, set Settings, cfg component.Config) (*zap.Logger, error) { + c := *cfg.(*Config) + return newLogger(c.Logs, set.ZapOptions) + }), + internal.WithTracerProvider(func(ctx context.Context, _ Settings, cfg component.Config) (trace.TracerProvider, error) { + c := *cfg.(*Config) + return newTracerProvider(ctx, c) + }), + ) +} diff --git a/service/telemetry/internal/factory.go b/service/telemetry/internal/factory.go new file mode 100644 index 00000000000..f1368c9704d --- /dev/null +++ b/service/telemetry/internal/factory.go @@ -0,0 +1,116 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package internal // import "go.opentelemetry.io/collector/service/telemetry/internal" + +import ( + "context" + + "go.opentelemetry.io/otel/trace" + tracenoop "go.opentelemetry.io/otel/trace/noop" + "go.uber.org/zap" + + "go.opentelemetry.io/collector/component" +) + +// CreateSettings holds configuration for building Telemetry. +type CreateSettings struct { + BuildInfo component.BuildInfo + AsyncErrorChannel chan error + ZapOptions []zap.Option +} + +// Factory is factory interface for telemetry. +// This interface cannot be directly implemented. Implementations must +// use the NewFactory to implement it. +type Factory interface { + // CreateDefaultConfig creates the default configuration for the telemetry. + // TODO: Should we just inherit from component.Factory? + CreateDefaultConfig() component.Config + + // CreateLogger creates a logger. + CreateLogger(ctx context.Context, set CreateSettings, cfg component.Config) (*zap.Logger, error) + + // CreateTracerProvider creates a TracerProvider. + CreateTracerProvider(ctx context.Context, set CreateSettings, cfg component.Config) (trace.TracerProvider, error) + + // TODO: Add CreateMeterProvider. + + // unexportedFactoryFunc is used to prevent external implementations of Factory. + unexportedFactoryFunc() +} + +// FactoryOption apply changes to Factory. +type FactoryOption interface { + // applyTelemetryFactoryOption applies the option. + applyTelemetryFactoryOption(o *factory) +} + +var _ FactoryOption = (*factoryOptionFunc)(nil) + +// factoryOptionFunc is an FactoryOption created through a function. +type factoryOptionFunc func(*factory) + +func (f factoryOptionFunc) applyTelemetryFactoryOption(o *factory) { + f(o) +} + +var _ Factory = (*factory)(nil) + +// factory is the implementation of Factory. +type factory struct { + createDefaultConfig component.CreateDefaultConfigFunc + CreateLoggerFunc + CreateTracerProviderFunc +} + +func (f *factory) CreateDefaultConfig() component.Config { + return f.createDefaultConfig() +} + +// CreateLoggerFunc is the equivalent of Factory.CreateLogger. +type CreateLoggerFunc func(context.Context, CreateSettings, component.Config) (*zap.Logger, error) + +// WithLogger overrides the default no-op logger. +func WithLogger(createLogger CreateLoggerFunc) FactoryOption { + return factoryOptionFunc(func(o *factory) { + o.CreateLoggerFunc = createLogger + }) +} + +func (f *factory) CreateLogger(ctx context.Context, set CreateSettings, cfg component.Config) (*zap.Logger, error) { + if f.CreateLoggerFunc == nil { + return zap.NewNop(), nil + } + return f.CreateLoggerFunc(ctx, set, cfg) +} + +// CreateTracerProviderFunc is the equivalent of Factory.CreateTracerProvider. +type CreateTracerProviderFunc func(context.Context, CreateSettings, component.Config) (trace.TracerProvider, error) + +// WithTracerProvider overrides the default no-op tracer provider. +func WithTracerProvider(createTracerProvider CreateTracerProviderFunc) FactoryOption { + return factoryOptionFunc(func(o *factory) { + o.CreateTracerProviderFunc = createTracerProvider + }) +} + +func (f *factory) CreateTracerProvider(ctx context.Context, set CreateSettings, cfg component.Config) (trace.TracerProvider, error) { + if f.CreateTracerProviderFunc == nil { + return tracenoop.NewTracerProvider(), nil + } + return f.CreateTracerProviderFunc(ctx, set, cfg) +} + +func (f *factory) unexportedFactoryFunc() {} + +// NewFactory returns a new Factory. +func NewFactory(createDefaultConfig component.CreateDefaultConfigFunc, options ...FactoryOption) Factory { + f := &factory{ + createDefaultConfig: createDefaultConfig, + } + for _, op := range options { + op.applyTelemetryFactoryOption(f) + } + return f +} diff --git a/service/telemetry/logger.go b/service/telemetry/logger.go new file mode 100644 index 00000000000..eb675bc459f --- /dev/null +++ b/service/telemetry/logger.go @@ -0,0 +1,53 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package telemetry // import "go.opentelemetry.io/collector/service/telemetry" + +import ( + "go.uber.org/zap" + "go.uber.org/zap/zapcore" +) + +func newLogger(cfg LogsConfig, options []zap.Option) (*zap.Logger, error) { + // Copied from NewProductionConfig. + zapCfg := &zap.Config{ + Level: zap.NewAtomicLevelAt(cfg.Level), + Development: cfg.Development, + Encoding: cfg.Encoding, + EncoderConfig: zap.NewProductionEncoderConfig(), + OutputPaths: cfg.OutputPaths, + ErrorOutputPaths: cfg.ErrorOutputPaths, + DisableCaller: cfg.DisableCaller, + DisableStacktrace: cfg.DisableStacktrace, + InitialFields: cfg.InitialFields, + } + + if zapCfg.Encoding == "console" { + // Human-readable timestamps for console format of logs. + zapCfg.EncoderConfig.EncodeTime = zapcore.ISO8601TimeEncoder + } + + logger, err := zapCfg.Build(options...) + if err != nil { + return nil, err + } + if cfg.Sampling != nil && cfg.Sampling.Enabled { + logger = newSampledLogger(logger, cfg.Sampling) + } + + return logger, nil +} + +func newSampledLogger(logger *zap.Logger, sc *LogsSamplingConfig) *zap.Logger { + // Create a logger that samples every Nth message after the first M messages every S seconds + // where N = sc.Thereafter, M = sc.Initial, S = sc.Tick. + opts := zap.WrapCore(func(core zapcore.Core) zapcore.Core { + return zapcore.NewSamplerWithOptions( + core, + sc.Tick, + sc.Initial, + sc.Thereafter, + ) + }) + return logger.WithOptions(opts) +} diff --git a/service/telemetry/telemetry.go b/service/telemetry/telemetry.go index 008a50c07ea..c9346c26d59 100644 --- a/service/telemetry/telemetry.go +++ b/service/telemetry/telemetry.go @@ -4,170 +4,8 @@ package telemetry // import "go.opentelemetry.io/collector/service/telemetry" import ( - "context" - "errors" - - "go.opentelemetry.io/contrib/config" - "go.opentelemetry.io/contrib/propagators/b3" - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/propagation" - sdktrace "go.opentelemetry.io/otel/sdk/trace" - "go.opentelemetry.io/otel/trace" - "go.uber.org/multierr" - "go.uber.org/zap" - "go.uber.org/zap/zapcore" - - "go.opentelemetry.io/collector/component" -) - -const ( - // supported trace propagators - traceContextPropagator = "tracecontext" - b3Propagator = "b3" -) - -var ( - errUnsupportedPropagator = errors.New("unsupported trace propagator") + "go.opentelemetry.io/collector/service/telemetry/internal" ) -type Telemetry struct { - logger *zap.Logger - tracerProvider trace.TracerProvider -} - -func (t *Telemetry) TracerProvider() trace.TracerProvider { - return t.tracerProvider -} - -func (t *Telemetry) Logger() *zap.Logger { - return t.logger -} - -func (t *Telemetry) Shutdown(ctx context.Context) error { - // TODO: Sync logger. - if tp, ok := t.tracerProvider.(*sdktrace.TracerProvider); ok { - return multierr.Combine( - tp.Shutdown(ctx), - ) - } - // should this return an error? - return nil -} - // Settings holds configuration for building Telemetry. -type Settings struct { - BuildInfo component.BuildInfo - ZapOptions []zap.Option -} - -// New creates a new Telemetry from Config. -func New(ctx context.Context, set Settings, cfg Config) (*Telemetry, error) { - logger, err := newLogger(cfg.Logs, set.ZapOptions) - if err != nil { - return nil, err - } - - sdk, err := config.NewSDK( - config.WithContext(ctx), - config.WithOpenTelemetryConfiguration( - config.OpenTelemetryConfiguration{ - TracerProvider: &config.TracerProvider{ - Processors: cfg.Traces.Processors, - // TODO: once https://github.com/open-telemetry/opentelemetry-configuration/issues/83 is resolved, - // configuration for sampler should be done here via something like the following: - // - // Sampler: &config.Sampler{ - // ParentBased: &config.SamplerParentBased{ - // LocalParentSampled: &config.Sampler{ - // AlwaysOn: config.SamplerAlwaysOn{}, - // }, - // LocalParentNotSampled: &config.Sampler{ - // RecordOnly: config.SamplerRecordOnly{}, - // }, - // RemoteParentSampled: &config.Sampler{ - // AlwaysOn: config.SamplerAlwaysOn{}, - // }, - // RemoteParentNotSampled: &config.Sampler{ - // RecordOnly: config.SamplerRecordOnly{}, - // }, - // }, - // }, - }, - }, - ), - ) - - if err != nil { - return nil, err - } - - if tp, err := textMapPropagatorFromConfig(cfg.Traces.Propagators); err == nil { - otel.SetTextMapPropagator(tp) - } else { - return nil, err - } - - return &Telemetry{ - logger: logger, - tracerProvider: sdk.TracerProvider(), - }, nil -} - -func textMapPropagatorFromConfig(props []string) (propagation.TextMapPropagator, error) { - var textMapPropagators []propagation.TextMapPropagator - for _, prop := range props { - switch prop { - case traceContextPropagator: - textMapPropagators = append(textMapPropagators, propagation.TraceContext{}) - case b3Propagator: - textMapPropagators = append(textMapPropagators, b3.New()) - default: - return nil, errUnsupportedPropagator - } - } - return propagation.NewCompositeTextMapPropagator(textMapPropagators...), nil -} - -func newLogger(cfg LogsConfig, options []zap.Option) (*zap.Logger, error) { - // Copied from NewProductionConfig. - zapCfg := &zap.Config{ - Level: zap.NewAtomicLevelAt(cfg.Level), - Development: cfg.Development, - Encoding: cfg.Encoding, - EncoderConfig: zap.NewProductionEncoderConfig(), - OutputPaths: cfg.OutputPaths, - ErrorOutputPaths: cfg.ErrorOutputPaths, - DisableCaller: cfg.DisableCaller, - DisableStacktrace: cfg.DisableStacktrace, - InitialFields: cfg.InitialFields, - } - - if zapCfg.Encoding == "console" { - // Human-readable timestamps for console format of logs. - zapCfg.EncoderConfig.EncodeTime = zapcore.ISO8601TimeEncoder - } - - logger, err := zapCfg.Build(options...) - if err != nil { - return nil, err - } - if cfg.Sampling != nil && cfg.Sampling.Enabled { - logger = newSampledLogger(logger, cfg.Sampling) - } - - return logger, nil -} - -func newSampledLogger(logger *zap.Logger, sc *LogsSamplingConfig) *zap.Logger { - // Create a logger that samples every Nth message after the first M messages every S seconds - // where N = sc.Thereafter, M = sc.Initial, S = sc.Tick. - opts := zap.WrapCore(func(core zapcore.Core) zapcore.Core { - return zapcore.NewSamplerWithOptions( - core, - sc.Tick, - sc.Initial, - sc.Thereafter, - ) - }) - return logger.WithOptions(opts) -} +type Settings = internal.CreateSettings diff --git a/service/telemetry/telemetry_test.go b/service/telemetry/telemetry_test.go index c72d8c75e55..25c42d01830 100644 --- a/service/telemetry/telemetry_test.go +++ b/service/telemetry/telemetry_test.go @@ -9,9 +9,6 @@ import ( "time" "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/otel/trace/noop" "go.uber.org/zap" "go.uber.org/zap/zapcore" @@ -55,13 +52,15 @@ func TestTelemetryConfiguration(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - telemetry, err := New(context.Background(), Settings{ZapOptions: []zap.Option{}}, *tt.cfg) + f := NewFactory() + set := Settings{ZapOptions: []zap.Option{}} + logger, err := f.CreateLogger(context.Background(), set, tt.cfg) if tt.success { assert.NoError(t, err) - assert.NotNil(t, telemetry) + assert.NotNil(t, logger) } else { assert.Error(t, err) - assert.Nil(t, telemetry) + assert.Nil(t, logger) } }) } @@ -111,33 +110,12 @@ func TestSampledLogger(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - telemetry, err := New(context.Background(), Settings{ZapOptions: []zap.Option{}}, *tt.cfg) + f := NewFactory() + ctx := context.Background() + set := Settings{ZapOptions: []zap.Option{}} + logger, err := f.CreateLogger(ctx, set, tt.cfg) assert.NoError(t, err) - assert.NotNil(t, telemetry) - assert.NotNil(t, telemetry.Logger()) - }) - } -} - -func TestTelemetryShutdown(t *testing.T) { - tests := []struct { - name string - provider trace.TracerProvider - wantErr error - }{ - { - name: "No provider", - }, - { - name: "Non-SDK provider", - provider: noop.NewTracerProvider(), - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - telemetry := Telemetry{tracerProvider: tt.provider} - err := telemetry.Shutdown(context.Background()) - require.Equal(t, tt.wantErr, err) + assert.NotNil(t, logger) }) } } diff --git a/service/telemetry/tracer.go b/service/telemetry/tracer.go new file mode 100644 index 00000000000..d235ca3aaf2 --- /dev/null +++ b/service/telemetry/tracer.go @@ -0,0 +1,85 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package telemetry // import "go.opentelemetry.io/collector/service/telemetry" + +import ( + "context" + "errors" + + "go.opentelemetry.io/contrib/config" + "go.opentelemetry.io/contrib/propagators/b3" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/propagation" + "go.opentelemetry.io/otel/trace" +) + +const ( + // supported trace propagators + traceContextPropagator = "tracecontext" + b3Propagator = "b3" +) + +var ( + errUnsupportedPropagator = errors.New("unsupported trace propagator") +) + +// New creates a new Telemetry from Config. +func newTracerProvider(ctx context.Context, cfg Config) (trace.TracerProvider, error) { + sdk, err := config.NewSDK( + config.WithContext(ctx), + config.WithOpenTelemetryConfiguration( + config.OpenTelemetryConfiguration{ + TracerProvider: &config.TracerProvider{ + Processors: cfg.Traces.Processors, + // TODO: once https://github.com/open-telemetry/opentelemetry-configuration/issues/83 is resolved, + // configuration for sampler should be done here via something like the following: + // + // Sampler: &config.Sampler{ + // ParentBased: &config.SamplerParentBased{ + // LocalParentSampled: &config.Sampler{ + // AlwaysOn: config.SamplerAlwaysOn{}, + // }, + // LocalParentNotSampled: &config.Sampler{ + // RecordOnly: config.SamplerRecordOnly{}, + // }, + // RemoteParentSampled: &config.Sampler{ + // AlwaysOn: config.SamplerAlwaysOn{}, + // }, + // RemoteParentNotSampled: &config.Sampler{ + // RecordOnly: config.SamplerRecordOnly{}, + // }, + // }, + // }, + }, + }, + ), + ) + + if err != nil { + return nil, err + } + + if tp, err := textMapPropagatorFromConfig(cfg.Traces.Propagators); err == nil { + otel.SetTextMapPropagator(tp) + } else { + return nil, err + } + + return sdk.TracerProvider(), nil +} + +func textMapPropagatorFromConfig(props []string) (propagation.TextMapPropagator, error) { + var textMapPropagators []propagation.TextMapPropagator + for _, prop := range props { + switch prop { + case traceContextPropagator: + textMapPropagators = append(textMapPropagators, propagation.TraceContext{}) + case b3Propagator: + textMapPropagators = append(textMapPropagators, b3.New()) + default: + return nil, errUnsupportedPropagator + } + } + return propagation.NewCompositeTextMapPropagator(textMapPropagators...), nil +} diff --git a/versions.yaml b/versions.yaml index 0c8cf222c6a..49c6b625c58 100644 --- a/versions.yaml +++ b/versions.yaml @@ -3,14 +3,14 @@ module-sets: stable: - version: v1.7.0 + version: v1.9.0 modules: - go.opentelemetry.io/collector/featuregate - go.opentelemetry.io/collector/pdata - go.opentelemetry.io/collector/config/configopaque - go.opentelemetry.io/collector/config/configcompression beta: - version: v0.100.0 + version: v0.102.1 modules: - go.opentelemetry.io/collector - go.opentelemetry.io/collector/cmd/builder @@ -46,6 +46,7 @@ module-sets: - go.opentelemetry.io/collector/extension/zpagesextension - go.opentelemetry.io/collector/extension/memorylimiterextension - go.opentelemetry.io/collector/otelcol + - go.opentelemetry.io/collector/pdata/pprofile - go.opentelemetry.io/collector/pdata/testdata - go.opentelemetry.io/collector/processor - go.opentelemetry.io/collector/processor/batchprocessor From 264364ba2426b06ea76eafe48c2d4c92d10b3b73 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Jun 2024 00:42:21 +0000 Subject: [PATCH 5/5] Bump github.com/mostynb/go-grpc-compression in /cmd/otelcorecol Bumps [github.com/mostynb/go-grpc-compression](https://github.com/mostynb/go-grpc-compression) from 1.2.2 to 1.2.3. - [Release notes](https://github.com/mostynb/go-grpc-compression/releases) - [Commits](https://github.com/mostynb/go-grpc-compression/compare/v1.2.2...v1.2.3) --- updated-dependencies: - dependency-name: github.com/mostynb/go-grpc-compression dependency-type: indirect ... Signed-off-by: dependabot[bot] --- cmd/otelcorecol/go.mod | 2 +- cmd/otelcorecol/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/otelcorecol/go.mod b/cmd/otelcorecol/go.mod index 92ad5205864..e46b90f1b52 100644 --- a/cmd/otelcorecol/go.mod +++ b/cmd/otelcorecol/go.mod @@ -64,7 +64,7 @@ require ( github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/mostynb/go-grpc-compression v1.2.2 // indirect + github.com/mostynb/go-grpc-compression v1.2.3 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect diff --git a/cmd/otelcorecol/go.sum b/cmd/otelcorecol/go.sum index cb8ee7f11f2..841ab0eb97e 100644 --- a/cmd/otelcorecol/go.sum +++ b/cmd/otelcorecol/go.sum @@ -95,8 +95,8 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mostynb/go-grpc-compression v1.2.2 h1:XaDbnRvt2+1vgr0b/l0qh4mJAfIxE0bKXtz2Znl3GGI= -github.com/mostynb/go-grpc-compression v1.2.2/go.mod h1:GOCr2KBxXcblCuczg3YdLQlcin1/NfyDA348ckuCH6w= +github.com/mostynb/go-grpc-compression v1.2.3 h1:42/BKWMy0KEJGSdWvzqIyOZ95YcR9mLPqKctH7Uo//I= +github.com/mostynb/go-grpc-compression v1.2.3/go.mod h1:AghIxF3P57umzqM9yz795+y1Vjs47Km/Y2FE6ouQ7Lg= 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/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw=

=|#7mWyVaI#RDTa zuckK0Xfv6Key+OnPdM-SW0Xg>bGa!hZb*etS(X;1pUvK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